{$thisName}\n"; if($row['position']>=1000){ // separate out certain pages to appear below main group $TT .= $thisItem; }else{ // build main group $T .= $thisItem; } } #### Add staff page to subNav #### // $query = "SELECT id FROM {$CONFIG['dbTblPrefix']}staff WHERE enabled='y'"; // $result = SDIGsendQuery($query); // SDIGcheckQuery($result,$query); // $num_rows = mysql_num_rows($result); // if($num_rows > 0){ // $TT .= "
  • Key personnel
  • "; // } $TT .= "
  • Key personnel
  • \n"; #### Add consultants page to subNav #### // $query = "SELECT id FROM {$CONFIG['dbTblPrefix']}consultants WHERE enabled='y'"; // $result = SDIGsendQuery($query); // SDIGcheckQuery($result,$query); // $num_rows = mysql_num_rows($result); // if($num_rows > 0){ // $TT .= "
  • Consultants
  • "; // } $TT .= "
  • Consultants
  • \n"; $TEMPLATE['subNav'] = $T.$TT; // temp definition of images until launch, then they can be added to the db // $companyImageArray = array(); // $companyImageArray[3] = 'About Dransfield Properties Limited'; // $companyImageArray[5] = 'Public Consultation'; // $companyImageArray[6] = 'Our Approach'; // $companyImageArray[7] = 'Environmental charter'; // $companyImageArray[10] = 'Regeneration Through Retail'; // $companyImageArray[12] = 'Company Awards'; // $companyImageArray[17] = 'Charity Fundraising at DPL'; // $companyImageArray[19] = 'Site Constructive Update'; // $companyImageArray[20] = 'Working with Dransfield Properties'; // $companyImageArray[22] = 'The Ryegate Project'; #### Get page data #### if($id) $query = "SELECT * FROM {$CONFIG['dbTblPrefix']}pagesCompany WHERE id='{$id}' AND enabled='y'"; else $query = "SELECT * FROM {$CONFIG['dbTblPrefix']}pagesCompany WHERE intro='y' AND enabled='y' LIMIT 1"; $result = SDIGsendQuery($query); SDIGcheckQuery($result,$query); if($PAGE = mysql_fetch_assoc($result)){ foreach($PAGE AS $k => $v) $PAGEFORMATTED[$k] = htmlspecialchars($v); $TEMPLATE['h1'] = $PAGEFORMATTED['title']; $TEMPLATE['content'] = $PAGE['content']; #### Handle company image #### if($PAGE['imageType']){ $TEMPLATE['heroImage'] = "\"{$PAGEFORMATTED['title']}\""; }else{ $TEMPLATE['heroImage'] = ''; } // temp until larger images are available //$TEMPLATE['heroImage'] = $companyImageArray[$PAGE['id']]; //$TEMPLATE['heroImage'] = 'Placeholder image'; #### Increment hit counter without changing last updated date #### $query = "UPDATE {$CONFIG['dbTblPrefix']}pagesCompany SET requests=requests+1, updated=updated WHERE id='{$PAGE['id']}'"; $result = SDIGsendQuery($query); SDIGcheckQuery($result,$query); }else{ header("Location: {$CONFIG['domainPathToAppRoot']}company.php"); exit; } #### Set up contextual meta data #### $META['titleContext'] = $PAGE['title']; $META['descriptionContext'] = $PAGE['title']; require($CONFIG['incPathIncludes']."configMeta.inc.php"); #### Start HTML output #### require("header.php"); require($CONFIG['incPathTemplates']."template_company.php"); require("footer.php"); ?>