diff --git a/database.mwb b/database.mwb index ce850ba..82f3394 100644 Binary files a/database.mwb and b/database.mwb differ diff --git a/lib/themefunctions.php b/lib/themefunctions.php index 6a15ce1..b1f19db 100644 --- a/lib/themefunctions.php +++ b/lib/themefunctions.php @@ -84,6 +84,23 @@ function get_component($name, $context = null, $echo = true) { } } +function get_icon($name, $context = null, $echo = true) { + $db = getdatabase(); + if ($context == null) { + $context = get_page_slug(false); + } + $pageid = $db->get("pages", "pageid", ["AND" => ["slug" => $context, "siteid" => getsiteid()]]); + $content = ""; + if ($db->has("icons", ["AND" => ["pageid" => $pageid, "name" => $name]])) { + $content = $db->get("icons", "content", ["AND" => ["pageid" => $pageid, "name" => $name]]); + } + if ($echo) { + echo $content; + } else { + return $content; + } +} + function get_page_content($slug = null) { get_component("content", $slug); } diff --git a/public/contact.php b/public/contact.php new file mode 100644 index 0000000..30f7b29 --- /dev/null +++ b/public/contact.php @@ -0,0 +1,9 @@ +