public function loadHeader() { global $compS; global $pageSett; global $equrl; if (count($equrl) > 1) { $thispage = $equrl[0]; $a = array(); $b = 0; foreach ($equrl as $r) { if ($b > 0) { $a[] = $r; } $b++; } $customUrl = implode('/', $a); $customUrl = rtrim($customUrl, '/'); $getCustUrl_q = 'SELECT * FROM cms_content WHERE custom_url LIKE "' . $customUrl . '"'; $getCustUrl_r = mysql_query($getCustUrl_q); if (mysql_num_rows($getCustUrl_r)) { $custPathUrl_f = mysql_fetch_array($getCustUrl_r); $pageSett['custom_title'] = $custPathUrl_f['name']; $custPathUrl = $custPathUrl_f['name'] . ' - '; $_GET[$custPathUrl_f['recordset']] = $custPathUrl_f['id']; } else { Apps::redirect(_SITEROOT_ . $thispage); } } if (isset($pageSett['id'])) { if (isset($custPathUrl)) { $pageTitle = $pageSett['meta_title'] ? $custPathUrl . ' ' . $pageSett['meta_title'] . ' | ' . $compS['name'] : $custPathUrl . ' ' . $pageSett['title'] . ' | ' . $compS['name']; } else { $pageTitle = $pageSett['meta_title'] ? $pageSett['meta_title'] . ' | ' . $compS['name'] : $pageSett['title'] . ' | ' . $compS['name']; } } else { $pageTitle = "404 | " . $compS['name']; } $html = "<!DOCTYPE html>\n"; $html .= "<!--[if (gte IE 9)|!(IE)]><!--><html lang=\"en\"> <!--<![endif]-->\n"; $html .= "<head>\n"; $html .= "<meta charset=\"utf-8\">\n"; $html .= "<meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\">\n"; $html .= "<title>" . $pageTitle . "</title>\n"; $html .= "<meta name=\"keywords\" content=\"" . (!empty($pageSett['meta_keywords']) ? $pageSett['meta_keywords'] : $compS['meta_keywords']) . "\">\n"; $html .= "<meta name=\"description\" content=\"" . (!empty($pageSett['meta_description']) ? $pageSett['meta_description'] : $compS['meta_description']) . "\">\n"; $html .= "<meta name=\"robots\" content=\"index," . (!empty($pageSett['search_index']) && $pageSett['search_index'] == "yes" ? "follow" : "nofollow") . "\" />\n"; echo $html; }