include("admin/db_config.php"); $page_url1=$protocol.$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI']; $page_url1=str_replace('index.php','',$page_url1); $page_url2=trim(str_replace('www.','',$page_url1)); //---shifting redirection $s_chk=$mysqli->query("select red_url from shift_ji where j_url='$page_url1' and s_stat='1'"); if($s_chk->num_rows!=0) { $mysqli->close(); $s_chkrow=$s_chk->fetch_object(); header("HTTP/1.1 301 Moved Permanently"); header("Location: $s_chkrow->red_url"); exit(); } //---------------------- $sel_jshort=$mysqli->query("select journal from journal_information where (home_url='".$page_url1."' || home_url='".$page_url2."')"); if($sel_jshort->num_rows==0) { $mysqli->close(); echo file_get_contents($domain_path."404.php"); exit(); } $sel_jshort_row=$sel_jshort->fetch_object(); $journal_info=$mysqli->query("SELECT ji.*,ap.page_url,ors.page_views FROM journal_information ji left join adv_pages ap on ap.journal=ji.journal left join online_readers ors on ors.journal=ji.journal WHERE ji.journal ='".$sel_jshort_row->journal."'"); $journal_info_rows=$journal_info->fetch_object(); $seo_info=$mysqli->query("select seo_title,seo_key,seo_desc from seo_info where journal='".$journal_info_rows->journal."' and pagetype='Home'"); $seo_info_rows=$seo_info->fetch_object(); //to het journal list content $list_content=$mysqli->query("select * from homepage where journal='".$journal_info_rows->journal."' and content_type!='' order by recordListingID asc"); ?>