$q = $_GET['q']; // from URL $c2 = $_GET['c2']; // from URL, subpages 03, 24 if($q!=""){ $q = $_REQUEST['q']; //from submmit form $sa = $_REQUEST['sa']; //from submmit form } else{ $sa = $_GET['sa']; // from URL } $my_filename = strtolower(trim($_SERVER['PHP_SELF'])); if($my_filename=="/index_en.php" ){ //for home page include_once("inc/global_var.php"); $my_url = substr($my_filename, -12); //google search ignore $my_url $inc_file="en/inc.inc"; $header_links_path="http://www.china-info.net/en/sublinks/"; $css_path="http://www.china-info.net/code/en.css"; $gsearch_file="en/gsearch.php"; $page_id="0000"; $numberofpage=0; $result_once_file="en/result_once.php"; //start from here $yt_video_file="en/yt_video.php"; $search_result_file="en/search_result.php"; $horizontal_ad_file="en/ad01.php"; //horizontal ad $square_ad_file="en/ad02.php"; //image square ad $text_ad_file="en/ad03.php"; //image square text ad $linklist_ad_file="en/ad04.php"; //image vertical link list ad $sublinks_db_file="sublink_db/sublink_db".$page_id.".inc"; $content2_db_file="content2_db/content2_db".$page_id.".inc"; //movie stars list $header_file="en/header.php"; $footer_file="en/footer.php"; $display_yt_video_file="en/display_yt_video.php"; $copyright_file="en/copyright.php"; include_once($inc_file); include_once("en/sublinks.php"); //sub links function include_once("en/content2.php"); //sub links function //include("en/videositelink.inc"); } else{ //for sublink pages $page_id = substr($my_filename, -8,4); $numberofpage =(string)intval($page_id); $my_url = substr($my_filename, -13); //google search ignore $my_url include_once("../../inc/global_var.php"); $inc_file="../inc.inc"; $header_links_path="http://www.china-info.net/en/sublinks/"; $css_path="http://www.china-info.net/code/en.css"; $gsearch_file="../gsearch.php"; $result_once_file="../result_once.php"; //start from here $yt_video_file="../yt_video.php"; $search_result_file="../search_result.php"; $horizontal_ad_file="../ad01.php"; //horizontal ad $square_ad_file="../ad02.php"; //image square ad $text_ad_file="../ad03.php"; //image square text ad $linklist_ad_file="../ad04.php"; //image vertical link list ad $sublinks_db_file="../sublink_db/sublink_db".$page_id.".inc"; $content2_db_file="../content2_db/content2_db".$page_id.".inc"; $header_file="../header.php"; $footer_file="../footer.php"; $display_yt_video_file="../display_yt_video.php"; $copyright_file="../copyright.php"; include_once($inc_file); include_once("../sublinks.php"); //sub links function include_once("../content2.php"); //sub links function //include("../videositelink.inc"); } $result_url=$result_once_file; //display the result on this page at first time only . $result_url=$result_url.$result_link[$numberofpage]; function ae_detect_ie(){ //detect IE if (isset($_SERVER['HTTP_USER_AGENT']) && (strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE') !== false)) return true; else return false; } ?>