$location = $_SERVER['SERVER_NAME']; include 'xua/includes/GM_DBConnection.php'; $SQLZ = @mysql_query("SELECT * FROM SCMS_PAGES WHERE ACTIVE = 1 and Menu = 'yes' and level = 1 ORDER BY PAGEORDER ASC"); if (!$SQLZ) { $message = 'Fatal Error!'; $highl = "Bad"; } $SQLY = @mysql_query("SELECT * FROM SCMS_PAGES WHERE ACTIVE = 1 and level = 1 ORDER BY PAGEORDER ASC"); if (!$SQLY) { $message = 'Fatal Error!'; $highl = "Bad"; } if(isset($_GET['page'])){ $pageID = @$_GET['page']; }else{ $pageID = 3; } if ($pageID == ''){ $SQLB = @mysql_query("SELECT pageID FROM SCMS_PAGES WHERE PAGEORDER = (select Min(PAGEORDER) AS PageOrder from SCMS_PAGES where ACTIVE = 'yes')"); $filter = mysql_fetch_array($SQLB); $pageID = $filter['pageID']; } $SQLA = @mysql_query("SELECT * FROM SCMS_CONTENT where pageID = '$pageID' ORDER BY contentOrder ASC"); if (!$SQLZ) { $message = 'Fatal Error!'; $highl = "Bad"; } $SQLC = @mysql_query("SELECT * FROM SCMS_PAGES where pageID = '$pageID'"); $filter = mysql_fetch_array($SQLC); $ExternalPageURL = $filter['ExternalPageURL']; $pageName = $filter['PAGENAME']; $ThisMainPage = $filter['MainPage']; $ThisPage = $pageID; if ($ThisPage == '3'){ $SQL1 = @mysql_query("SELECT * FROM SCMS_CONTENT where pageID = '3'"); while ($filter1 = mysql_fetch_array($SQL1)) { $contentType = $filter1['contentType']; if ($contentType == "heading"){ $PageTitle = $filter1['content']; } } } else { $PageTitle = $pageName; } ?>