"; echo "You cannot access this page directly " . $location_id; die(); } else { //nothing load with the section_id $isFriendlyUrl = false; } } else if (isset($_GET['section_name'])) { $section_name = $_GET['section_name']; $regexp = "/^[\/a-zA-Z0-9_-]{1,100}$/"; if (!preg_match($regexp, $section_name)) { header("Location:/index.php"); exit(); } else { $isFriendlyUrl = true; } } else { header("Location:/sitemap.php"); exit(); } if ($isFriendlyUrl) { $ret = mysql_query("SELECT t4.page_title, t4.keyword_meta_tag, t4.abstract_meta_tag, t4.description_meta_tag, t4.content, t3.address, t4.section_id, t4.noindex, t4.nofollow, t4.hasaltlink, t3.hreflang FROM `friendly_url` t1, friendly_url_parents t2, locations t3, content t4 WHERE t1.location_id = t2.parent_loc_id AND t2.child_loc_id = $location_id and t1.url='$section_name' and t1.section_id=t4.section_id and t3.id=t2.child_loc_id and t4.location_id=t2.child_loc_id"); } else { $ret = mysql_query("select page_title,keyword_meta_tag,abstract_meta_tag,description_meta_tag,content,address, section_id, content.noindex, content.nofollow, content.hasaltlink, locations.hreflang from content, locations where location_id=locations.id and location_id=$location_id and section_id=$section_id"); } if (mysql_num_rows($ret)==0) { header("Location:/sitemap.php"); exit(); $page_title = ""; $meta_tag = ""; $content = ""; $address = ""; } else { $row = mysql_fetch_assoc($ret); $page_title = stripslashes($row['page_title']); $keyword_meta_tag = stripslashes($row['keyword_meta_tag']); $abstract_meta_tag = stripslashes($row['abstract_meta_tag']); $description_meta_tag = stripslashes($row['description_meta_tag']); $content = stripslashes($row['content']); $address = stripslashes($row['address']); $section_id = $row['section_id']; $noindex = $row['noindex']; $nofollow = $row['nofollow']; $hasaltlink = $row['hasaltlink']; $hreflang = stripslashes($row['hreflang']); } if ($section_id==5) { //used to toggle display $javascript = ''; } include("../".$path_to_common."comps/top.php"); include("../".$path_to_common."comps/left.php"); ?>