Please remove /installfiles directory to view page."); } //Fetch Settings require('fetch_settings.php'); //Detect Mobile Phone Device $isMobile = false; $userAgent = strtolower($_SERVER['HTTPS_USER_AGENT']); $mobileAgents = array("iphone","android","webos","ipod","blackberry"); $mobileAgent = ""; for($i=0;$iassign('settingsrow',$settingsRow); //Fetch language support require(LANGFILE); $xtpl->assign('lang', $lang); //Define Template Vars $xtpl->assign('styleHref', 'skins/'.$settingsArray['skin'].($isMobile?'/style_mobile.css':'/style.css')); $xtpl->assign('formAction', 'store_locator_results.php'); $xtpl->assign('formMethod', 'GET'); $xtpl->assign('skinLoc','skins/'.$settingsArray['skin']); $emailArray = @explode("@", $settingsArray['contactEmail']); $xtpl->assign('siteEmail',sprintf("", $emailArray[0], $emailArray[1])); $xtpl->assign('sitePhone',$settingsArray['contactPhone']); $xtpl->assign('countryIso', $settingsArray['countryIso']); $xtpl->assign('pageTitle', $settingsArray['pageTitle']); $xtpl->assign('metaKeywords', $settingsArray['metaKeywords']); $xtpl->assign('metaDescription', $settingsArray['metaDescription']); //Build Page Script $js = "\n"; $js .= "\n"; if(!$isMobile){//load non mobile script //$js .= "\n"; $js .= "\n"; $js .= "\n"; $js .= "\n"; $js .= "\n"; $js .= "\n"; $js .= "\n"; }else{//load mobile script $js .= "\n"; $js .= "\n"; $js .= "\n"; $js .= "\n"; $js .= "\n"; } //Load Localize Script (if needed, non moible) if($settingsRow['enablelocal']=="1" && !$isMobile){//requires script loading of google maps v3 above $js .= "\n"; } //Display Google Geomap (if enabled) if($settingsRow['enablegeomap']=="1"){ $js .= "\n"; $js .= "\n"; $xtpl->parse('main.geomap'); } //Assign Page Script to template $xtpl->assign('pageScript', $js); //Fetch countries $sql = "select * from countries where iso is not null and iso != '' order by name asc"; $result = $mysql->exSql($sql) or die($mysql->debugPrint()); while($row = mysql_fetch_assoc($result)){ if(DEFAULTLANG!=CURRENTLANG){ $translatedText = fetchTranslation(CURRENTLANG,DEFAULTLANG, sprintf("country-%s", $row['iso']), $row['name']); $row['name'] = $translatedText; } if($row['iso'] == $settingsArray['countryIso']){ $row['selected'] = "selected"; } $xtpl->assign('country', $row); $xtpl->parse('main.countryisooption1'); $xtpl->parse('main.countryisooption2'); } //Fetch categories $sql = "select * from categories order by Title asc"; $result = $mysql->exSql($sql) or die($mysql->debugPrint()); while($row = mysql_fetch_assoc($result)){ if(DEFAULTLANG!=CURRENTLANG){ $translatedText = fetchTranslation(CURRENTLANG,DEFAULTLANG, sprintf("cat-%s", $row['id']), $row['Title']); $row['Title'] = $translatedText; } $xtpl->assign('category', $row); $xtpl->parse('main.categories1'); $xtpl->parse('main.categories2'); } //Fetch services $sql = "select * from services order by Title asc"; $result = $mysql->exSql($sql) or die($mysql->debugPrint()); while($row = mysql_fetch_assoc($result)){ if(DEFAULTLANG!=CURRENTLANG){ $translatedText = fetchTranslation(CURRENTLANG,DEFAULTLANG, sprintf("serv-%s", $row['id']), $row['Title']); $row['Title'] = $translatedText; } $xtpl->assign('service', $row); $xtpl->parse('main.services1'); $xtpl->parse('main.services2'); } //Parse template and output $xtpl->parse('main'); $xtpl->out('main'); //Save cached version of page (if needed) if($settingsRow['enablecaching']=="1"){ require('dynamic_cache_footer.php'); } ?>