$param = isset($_GET['param']) ? strip_tags($_GET['param']) : 0; $template = null; $vars = array(); $baseUrl = 'http://' . $_SERVER['HTTP_HOST']; // Default meta data $metadata = array('ogTitle' => 'Lolgh', 'ogType' => 'website', 'ogImage' => $baseUrl . '/img/icon.png', 'ogUrl' => $baseUrl, 'ogDescription' => 'The LolGH strips are typically random and unordered strips depicting some isolated, stupid and funny events in Ghana, Africa and the world. Just jokes really!!! :)', 'twitterCard' => 'summary', 'twitterUrl' => $baseUrl, 'twitterTitle' => 'LolGH', 'twitterDescription' => 'The LolGH strips are typically random and unordered strips depicting some isolated, stupid and funny events in Ghana, Africa and the world. Just jokes really!!! :)', 'twitterImage' => $baseUrl . '/img/icon.png'); // Frontend Controller switch ($page) { case '': // Custom meta data $pageUrl = $baseUrl; $recentToon = $dao->fetchRecentToon(); $recentComic = $dao->fetchRecentComic(); $template = '@frontend/index.html'; $vars['pageTitle'] = 'A laugh a day...'; $vars['tweets'] = $twitter->getTimeLine(); $vars['recentToon'] = $recentToon; $vars['recentComic'] = $recentComic; break; case 'contact': if ($_POST) { $subject = 'Lolgh Contact'; array_walk_recursive($_POST, 'mysql_real_escape_string'); $from = strip_tags($_POST["email"]); // sender $name = strip_tags($_POST["name"]); $message = strip_tags($_POST["msg"]); $message = wordwrap($message, 70); // send mail to us mail("*****@*****.**", $subject, $message, "From: {$from}\n"); $emailVars = array('name' => $name, 'msg' => 'Thanks for getting in touch. We will be in touch shortly');