0) { PageRedirect('http://www.juxtadigital.com'); } $url=strip_tags($REQUEST_URI); $url_array=explode("/",$url); array_shift($url_array); //the first one is empty anyway //get the url between first / and ? if there is one $url1 = implode("/", $url_array); $url2 = explode("/?", $url1); $url3 = explode("?", $url2[0]); $url = $url3[0]; //died on the same day if($url_array[0] == Lookup("Pages", "intPageID", "strFriendlyURL", 536) || $url_array[0] == "DOTSD" || $prmID == 536){ $url = "died-on-the-same-day"; if ($url_array[1] == "day"){ $prmDay = $url_array[2]; $prmMonth = $url_array[4]; }else if ($url_array[1] == "month"){ $prmDay = $url_array[4]; $prmMonth = $url_array[2]; } } //notice provider list form if($url_array[0] == "funeral-home-directory"){ //we got a request for the funeral home entry form $url = "funeral-home-directory"; } //notice provider entry form if($url_array[0] == "funeral-home"){ //we got a request for the funeral home entry form $url = "funeral-home"; } //notice provider display if($url_array[0] == "funeral-home-profile"){ //we got a request for the funeral home entry form $url = "funeral-home-profile"; if(isset($url_array[2]) && is_numeric($url_array[2])){ $prmProviderID = $url_array[2]; }else if(isset($url_array[2]) && $url_array[2] == "death-notice"){ $strSQL = "select intNoticeID from Notices where strFriendlyURL = " . QueryFormatString($url_array[3]); $db->query( stripslashes($strSQL)); if ($db->ReadRow()) { $prmNoticeID = $db->RowData['intNoticeID']; } $strSQL = "select intNoticeProvider from Notices where intNoticeID = " . $prmNoticeID; $db->query( stripslashes($strSQL)); if ($db->ReadRow()) { $prmProviderID = $db->RowData['intNoticeProvider']; } }else if(isset($url_array[1])){ $strSQL = "select intProviderID from NoticeProviders where strURL = " . QueryFormatString($url_array[1]); $db->query( stripslashes($strSQL)); if ($db->ReadRow()) { $prmProviderID = $db->RowData['intProviderID']; } } } //death notice entry if($url_array[0] == "death-notice-entry"){ //we got a request for the death notice entry if (strlen($url_array[1]) > 6) { $strSQL = "select intNoticeID from Notices where strFriendlyURL = " . QueryFormatString($url_array[1]); $db->query( stripslashes($strSQL)); if ($db->ReadRow()) { $prmNoticeID = $db->RowData['intNoticeID']; } } else { $prmNoticeID = $url_array[1]; } $url = "death-notice-entry"; } //death notice detail if($url_array[0] == "death-notice"){ //we got a request for the death notice detail if ($url_array[2] == 'map') { $varDisplayCurrentMap = 1; } if (strlen($url_array[1]) > 6) { $strSQL = "select intNoticeID from Notices where strFriendlyURL = " . QueryFormatString($url_array[1]); $db->query( stripslashes($strSQL)); if ($db->ReadRow()) { $prmNoticeID = $db->RowData['intNoticeID']; } } else { if(is_numeric($url_array[1])){ $prmNoticeID = $url_array[1]; } } $url = "death-notice"; } //death notice list if($url_array[0] == "search-death-notices"){ //we got a request for the death notice list if($url_array[1] == 'pending') { $EditSubmit = 1; $pending = 1; } $url = "search-death-notices"; } if(file_exists($DOCUMENT_ROOT."/".$url) and ($SCRIPT_FILENAME!=$DOCUMENT_ROOT."/".$url) and ($REQUEST_URI!="/")){ include($DOCUMENT_ROOT."/".$url); exit(); } //2. if not, go ahead and check for dynamic content. if($url_array[0] == "" || $url_array[0] == "index.php"){ //we got a request for the index $prmID = IsSet($prmID) ? $prmID : 0; $prmMID = isset($prmMID) ? $prmMID : 0; $prmSizeID = IsSet($prmSizeID) ? $prmSizeID : 0; $prmDisplayLeftFlyouts = 1; $db = new cDB(); $dbMedia = new cDB(); //include '_incPageSetup.php'; $prmDisplayCrumb = 1; $prmDisplayPrint = 1; $prmPrintLink = $appRootURL . '/printmedia.php/prmMediaID/' . $prmMID; $prmPageTitle = strip_tags( $prmMediaTitle ); $strSQL = "select txtMetaTags, txtMetaDescription from Codes where intCodeID = 260"; $db->query( stripslashes($strSQL)); if ($db->ReadRow()) { $prmMetaTags = $db->RowData['txtMetaTags']; $prmMetaDescription = $db->RowData['txtMetaDescription']; } $MasterAdScheme = 6; include '_incHTMLHeaders.php'; include '_incHomepageSetup.php'; include '_incPageHead.php'; include '_incLeftNavigation.php'; include '_incHomeContent.php'; include '_incRightHomeContent.php'; include '_incHTMLFooters.php'; exit(); } $db1 = new cDB(); //Get the Page ID $intPageID = Lookup("Pages", "strFriendlyURL", "intPageID", "'".$url."'"); $prmID = $intPageID; //or get the Media ID $intMediaID = Lookup("MediaLibrary", "strFriendlyURL", "intMediaID", "'".$url."'"); $prmMID = $intMediaID; if($prmID > 0){ include 'page.php'; exit(); }else if($prmMID > 0){ $mainCSS = "page.css"; include 'viewmedia.php'; exit(); }else{ $prmID = 549; //Error Page ID include 'page.php'; exit(); } /********************************************************************************************************** End Url handler ***********************************************************************************************************/ ?>