"); include("includes_01/header_04_no_menu.php"); echo ("



The WorldAirPics.com server appears to be down, please refresh this page or try again later.


WorldAirPics.com apologises for this interruption.












"); include("includes_01/footer_01.php"); echo (""); // bah, modify the "Not Found" error for your needs. exit(); } if (!(@mysql_select_db($db_name))) // If can't connect to database, error and exit(). { echo(" WorldAirPics.com "); include("includes_01/header_04_no_menu.php"); echo ("



The WorldAirPics.com server appears to be down, please refresh this page or try again later.


WorldAirPics.com apologises for this interruption.












"); include("includes_01/footer_01.php"); echo (""); // bah, modify the "Not Found" error for your needs. exit(); } if ($turn_website_on != 'yes') // Check if website is turned on or off, error and exit(). { echo(" WorldAirPics.com "); include("includes_01/header_04_no_menu.php"); echo ("



The $website_name_01 has been turned off for maintenance, please try again later.


$website_name_01 apologises for this interruption.












"); include("includes_01/footer_01.php"); echo (""); // bah, modify the "Not Found" error for your needs. exit(); } // Get the search variable from URL $var = @$_GET['q'] ; $var = stripslashes($var); //strip slashes from variable $var = stripslashes($var); $var = stripslashes($var); $var = stripslashes($var); $var = stripslashes($var); $var = stripslashes($var); $var = stripslashes($var); $var = stripslashes($var); $var = stripslashes($var); $var = stripslashes($var); $var = stripslashes($var); $var = stripslashes($var); $var = stripslashes($var); $var = stripslashes($var); $var = stripslashes($var); $var = str_replace("039", "", "$var"); $var = str_replace("&#;", "", "$var"); $var = str_replace("'", "", "$var"); $searchid = @$_GET['sid'] ; $query = trim($var); //trim whitespace from the stored variable $query = stripslashes($query); //strip slashes from variable //echo $query; //**********Start Referer Link & Hit Count Script********** $ref = @$_SERVER['HTTP_REFERER']; $ip = @$_SERVER['REMOTE_ADDR']; $useragent = @$_SERVER['HTTP_USER_AGENT']; $requested_page = "$PHP_SELF?q=$var&u=$var2&sort=$sort_var"; //*************************************************************** //Check for spiders / bots / crawlers first if(preg_match('/googlebot/i',$useragent,$matched)) { $browser_version=$matched[1]; $browser = 'Google Bot - '.$useragent.''; $search_browser = 'yes'; } elseif(preg_match('/mediapartners/i',$useragent,$matched)) { $browser_version=$matched[1]; $browser = 'Google Media Partners - '.$useragent.''; $search_browser = 'yes'; } elseif(preg_match('/msn/i',$useragent,$matched)) { $browser_version=$matched[1]; $browser = 'MSN - '.$useragent.''; $search_browser = 'yes'; } elseif(preg_match('/bing/i',$useragent,$matched)) { $browser_version=$matched[1]; $browser = 'Bing - '.$useragent.''; $search_browser = 'yes'; } elseif(preg_match('/yahoo/i',$useragent,$matched)) { $browser_version=$matched[1]; $browser = 'Yahoo - '.$useragent.''; $search_browser = 'yes'; } elseif(preg_match('/bot/i',$useragent,$matched)) { $browser_version=$matched[1]; $browser = 'Bot - '.$useragent.''; $search_browser = 'yes'; } elseif(preg_match('/spider/i',$useragent,$matched)) { $browser_version=$matched[1]; $browser = 'Spider - '.$useragent.''; $search_browser = 'yes'; } elseif(preg_match('/crawler/i',$useragent,$matched)) { $browser_version=$matched[1]; $browser = 'Crawler - '.$useragent.''; $search_browser = 'yes'; } elseif(preg_match('/trend/i',$useragent,$matched)) { $browser_version=$matched[1]; $browser = 'Trend - '.$useragent.''; $search_browser = 'yes'; } elseif(preg_match('/wget/i',$useragent,$matched)) { $browser_version=$matched[1]; $browser = 'Wget - '.$useragent.''; $search_browser = 'yes'; } elseif(preg_match('/scoutjet/i',$useragent,$matched)) { $browser_version=$matched[1]; $browser = 'ScoutJet - '.$useragent.''; $search_browser = 'yes'; } elseif(preg_match('/facebook/i',$useragent,$matched)) { $browser_version=$matched[1]; $browser = 'Facebook - '.$useragent.''; $search_browser = 'yes'; } elseif(preg_match('/blackberry/i',$useragent,$matched)) { $browser_version=$matched[1]; $browser = 'Blackberry'; $search_browser = 'no'; } elseif(preg_match('/nokia/i',$useragent,$matched)) { $browser_version=$matched[1]; $browser = 'Nokia'; $search_browser = 'no'; } //else if continues below /** * Get browsername and version * @param string user agent * @return string browser name and version or 'unknown' if unrecognized * @static * @access public */ //check for most popular browsers first //unfortunately that's ie. We also ignore opera and netscape 8 //because they sometimes send msie agent else if (strpos($useragent, 'MSIE') !== false && strpos($useragent, 'Opera') === false && strpos($useragent, 'Netscape') === false) { //deal with Blazer if (preg_match('/blazer/i',$useragent)) { (preg_match("/Blazer\/([0-9]{1}\.[0-9]{1}(\.[0-9])?)/",$useragent,$matched)); $browser_version=$matched[1]; $browser = 'Blazer '.$browser_version.''; $search_browser = 'no'; } //deal with IE else if (preg_match('/msie/i',$useragent)) { (preg_match("/MSIE ([0-9]{1}\.[0-9]{1,2})/", $useragent, $matched)); $browser_version=$matched[1]; $browser = 'Internet Explorer '.$browser_version.''; $search_browser = 'no'; } } else if (strpos($useragent, 'Gecko')) { //deal with Gecko based //if firefox if (preg_match('/firefox/i',$useragent)) { (preg_match("/Firefox\/([0-9]{1,2}\.[0-9]{1,2}(\.[0-9]{1,2})?)/", $useragent, $matched)); $browser_version=$matched[1]; $browser = 'Firefox '.$browser_version.''; $search_browser = 'no'; } //if Netscape (based on gecko) else if (preg_match('/netscape/i',$useragent)) { (preg_match("/Netscape\/([0-9]{1}\.[0-9]{1}(\.[0-9])?)/", $useragent, $matched)); $browser_version=$matched[1]; $browser = 'Netscape '.$browser_version.''; $search_browser = 'no'; } //check chrome before safari because chrome agent contains both else if (preg_match('/chrome/i',$useragent)) { (preg_match("/Chrome\/([^\s]+)/", $useragent, $matched)); $browser_version=$matched[1]; $browser = 'Chrome '.$browser_version.''; $search_browser = 'no'; } //if Safari (based on gecko) else if (preg_match('/safari/i',$useragent)) { (preg_match("/Safari\/([0-9]{2,3}(\.[0-9])?)/", $useragent, $matched)); $browser_version=$matched[1]; $browser = 'Safari '.$browser_version.''; $search_browser = 'no'; } //if Galeon (based on gecko) else if (preg_match('/galeon/i',$useragent)) { (preg_match("/Galeon\/([0-9]{1}\.[0-9]{1}(\.[0-9])?)/", $useragent, $matched)); $browser_version=$matched[1]; $browser = 'Galeon '.$browser_version.''; $search_browser = 'no'; } //if Konqueror (based on gecko) else if (preg_match('/konqueror/i',$useragent)) { (preg_match("/Konqueror\/([0-9]{1}\.[0-9]{1}(\.[0-9])?)/", $useragent, $matched)); $browser_version=$matched[1]; $browser = 'Konqueror '.$browser_version.''; $search_browser = 'no'; } // if Fennec (based on gecko) else if (preg_match('/fennec/i',$useragent)) { (preg_match("/Fennec\/([0-9]{1}\.[0-9]{1}(\.[0-9])?)/", $useragent, $matched)); $browser_version=$matched[1]; $browser = 'Fennec '.$browser_version.''; $search_browser = 'no'; } // if Maemo (based on gecko) else if (preg_match('/maemo/i',$useragent)) { (preg_match("/Maemo\/([0-9]{1}\.[0-9]{1}(\.[0-9])?)/", $useragent, $matched)); $browser_version=$matched[1]; $browser = 'Maemo '.$browser_version.''; $search_browser = 'no'; } } else if (strpos($useragent, 'Opera') !== false) { //deal with Opera if (preg_match('/opera/i',$useragent)) { (preg_match("/Opera[\/ ]([0-9]{1}\.[0-9]{1}([0-9])?)/", $useragent, $matched)); $browser_version=$matched[1]; $browser = 'Opera '.$browser_version.''; $search_browser = 'no'; } } else if (strpos($useragent, 'Lynx') !== false) { //deal with Lynx if (preg_match('/lynx/i',$useragent)) { (preg_match("/Lynx\/([0-9]{1}\.[0-9]{1}(\.[0-9])?)/",$useragent,$matched)); $browser_version=$matched[1]; $browser = 'Lynx '.$browser_version.''; $search_browser = 'no'; } } else if (strpos($useragent, 'Netscape') !== false) { //NN8 with IE string if (preg_match('/netscape/i',$useragent)) { (preg_match("/Netscape\/([0-9]{1}\.[0-9]{1}(\.[0-9])?)/",$useragent,$matched)); $browser_version=$matched[1]; $browser = 'Netscape '.$browser_version.''; $search_browser = 'no'; } } else { // browser not recognized! $browser= 'Unknown Browser'; $search_browser = 'no'; } /** * Get operating system * @param string user agent * @return string os name and version or 'unknown' in unrecognized os * @static * @access public */ $useragent = strtolower($useragent); //check for (aaargh) most popular first //winxp if (strpos($useragent, 'windows nt 5.1') !== false) { $os="Windows XP"; } else if (strpos($useragent, 'windows nt 6.0') !== false) { $os="Windows Vista"; } else if (strpos($useragent, 'windows 98') !== false) { $os="Windows 98"; } else if (strpos($useragent, 'windows nt 5.0') !== false) { $os="Windows 2000"; } else if (strpos($useragent, 'windows nt 5.2') !== false) { $os="Windows 2003 server"; } else if (strpos($useragent, 'windows nt 6.1') !== false) { $os="Windows 7"; } else if (strpos($useragent, 'windows nt') !== false) { $os="Windows NT"; } else if (strpos($useragent, 'win 9x 4.90') !== false && strpos($useragent, 'win me')) { $os="Windows ME"; } else if (strpos($useragent, 'win ce') !== false) { $os="Windows CE"; } else if (strpos($useragent, 'win 9x 4.90') !== false) { $os="Windows ME"; } else if (strpos($useragent, 'iphone') !== false) { $os="iPhone"; } // experimental else if (strpos($useragent, 'ipad') !== false) { $os="iPad"; } else if (strpos($useragent, 'webos') !== false) { $os="webOS"; } else if (strpos($useragent, 'symbian') !== false) { $os="Symbian"; } else if (strpos($useragent, 'android') !== false) { $os="Android"; } else if (strpos($useragent, 'blackberry') !== false) { $os="Blackberry"; } else if (strpos($useragent, 'mac os x') !== false) { $os="Mac OS X"; } else if (strpos($useragent, 'macintosh') !== false) { $os="Macintosh"; } else if (strpos($useragent, 'linux') !== false) { $os="Linux"; } else if (strpos($useragent, 'freebsd') !== false) { $os="Free BSD"; } else if (strpos($useragent, 'symbian') !== false) { $os="Symbian"; } else { // browser not recognized! $os= "Unknown OS"; } if ($ref =="") { $referrer_query = "insert into airpics_search_page_stats (requested_page, referring_url, browser, ip_address, operating_system, time) VALUES ('$requested_page', '$ref', '$browser $browser_version', '$ip', '$os', NOW())"; $referrer_result = mysql_query($referrer_query); if (!isset($referrer_result)) { echo ("Error in query.
Please go back and try again."); } } //**********End Referer Link Script********** //**********Last Page Visited - Must be after Update Photo Hits & Stats Script ********** // Function to generate random string function randomstring($chars) { srand((double) microtime() * 1000000); $allowchars = '0123456789'; while(++$n < ($chars+1)) $freturn .= $allowchars[rand(0, strlen($allowchars)-1)]; return $freturn; } $random = randomstring("5"); $current_time = time(); $trimmed_time = substr($current_time, 5); $random_id = "$trimmed_time$random"; $question_mark = "?"; $string = $_SERVER['QUERY_STRING']; $page_name = "$page_name$question_mark$string"; if ($search_browser !="yes") { $query_redirect = "insert into airpics_logging_redirect (redirect_url, unique_id, referring_url, browser, ip_address, operating_system, timestamp, search_browser) VALUES ('$page_name', '$random_id', '$ref', '$browser $browser_version', '$ip', '$os', NOW(), '$search_browser')"; $result_redirect = mysql_query($query_redirect); if (!isset($result_redirect)) { echo ("Error in query.
Please go back and try again."); } } //**********End Last Page Visited********** // ************************* Search script ************************* if ($query != 'full_list') { $query = str_replace("_", " ", "$query"); } //echo $query; $var2 = @$_GET['fields'] ; $sort_var = @$_GET['sort'] ; $full_text_search = @$_GET['ft'] ; //echo "$query
"; //echo "$var2
"; //echo "$sort_var
"; //echo "$full_text_search
"; //if ($var2 == '') //{ //$full_text_search = "yes"; //} //else //{ //$full_text_search = ""; //} if ($query == '24hours' && $sort_var == 'most_popular') { $search_period = 1; $title = "Most Popular Aircraft Pictures Of The Last 24 Hours"; $page_visit_link = "topday/"; } else if ($query == '48hours' && $sort_var == 'most_popular') { $search_period = 2; $title = "Most Popular Aircraft Pictures Of The Last 48 Hours"; $page_visit_link = "top48hours/"; } else if ($query == '7days' && $sort_var == 'most_popular') { $search_period = 7; $title = "Most Popular Aircraft Pictures Of The Last 7 Days"; $page_visit_link = "top7days/"; } else if ($query == 'month' && $sort_var == 'most_popular') { $search_period = 30; $title = "Most Popular Aircraft Pictures Of The Last Month"; $page_visit_link = "topmonth/"; } else if ($query == '6months' && $sort_var == 'most_popular') { $search_period = 180; $title = "Most Popular Aircraft Pictures Of The Last 6 Months"; $page_visit_link = "top6months/"; } else if ($query == 'year' && $sort_var == 'most_popular') { $search_period = 365; $title = "Most Popular Aircraft Pictures Of The Last Year"; $page_visit_link = "topyear/"; } else if ($query == 'full_list' && $sort_var == 'most_popular') { $search_period = '%'; $title = "Most Popular Aircraft Pictures Of All Time"; $page_visit_link = "topalltime/"; } else if ($query == 'edschoice') { $full_text_search = ''; $title = "Editor's Choice Aircraft Pictures"; $page_visit_link = "edschoice/"; } else if ($query == '24hours') { $search_period = 1; $title = "Aircraft Pictures Added In The Last 24 Hours"; $page_visit_link = "24hours/"; } else if ($query == '48hours') { $search_period = 2; $title = "Aircraft Pictures Added In The Last 48 Hours"; $page_visit_link = "48hours/"; } else if ($query == '7days') { $search_period = 7; $title = "Aircraft Pictures Added In The Last 7 Days"; $page_visit_link = "7days/"; } else if ($query == 'month') { $search_period = 30; $title = "Aircraft Pictures Added In The Last Month"; $page_visit_link = "month/"; } else if ($query == '6months') { $search_period = 180; $title = "Aircraft Pictures Added In The Last 6 Months"; $page_visit_link = "6months/"; } else if ($query == 'year') { $search_period = 365; $title = "Aircraft Pictures Added In The Last Year"; $page_visit_link = "year/"; } else if ($query == 'full_list') { $search_period = '%'; $title = "Full List Of Aircraft Pictures"; $page_visit_link = "full_list/"; } else { $query = $query; $title = $query; } if ($var2 == 'picture_category') { $title = "$query Pictures"; } if ($var2 == '' || $var2 == 'all' || $var2 == 'email' || $var2 == 'hidden_email') { $query2 = ("type,clean_type,type_search,generic,generic_search,reg,reg_search,cn,cn_search,code_number,code_number_search,photographer,photographer_search,location,clean_location,location_search,country,country_search,unit,unit_search,displayteam,airshow,airshow_search,date,date_search,year,operator,operator_search,information"); } else if ($var2 == 'type') { $query2 = ("type,type_search"); } else if ($var2 == 'generic') { $query2 = ("generic,generic_search"); } else if ($var2 == 'operator') { $query2 = ("operator,operator_search"); } else if ($var2 == 'reg') { $query2 = ("reg,reg_search"); } else if ($var2 == 'code_number') { $query2 = ("code_number,code_number_search"); } else if ($var2 == 'cn') { $query2 = ("cn,cn_search"); } else if ($var2 == 'location') { $query2 = ("location,clean_location,location_search"); } else if ($var2 == 'country') { $query2 = ("country,country_search"); } else if ($var2 == 'photographer') { $query2 = ("photographer,photographer_search"); } else if ($var2 == 'date') { $query2 = ("date,date_search,year"); } else if ($var2 == 'airshow') { $query2 = ("airshow,airshow_search"); } else if ($var2 == 'unit') { $query2 = ("unit,unit_search"); } else if ($var2 == 'information') { $query2 = ("information"); } // ************************* End Search script ************************* //$var_00 = $var; $var_00 = $query; //*************** Split Letters / Numbers *********************** $reg_keywords = $var_00; $words1 = preg_split('/(\d+)/', $reg_keywords); $words2 = preg_split('/(\D+)/', $reg_keywords); $reg_keywords_01 = array_merge($words1, $words2); //*************** List Letters / Numbers ************************ //new variable to store combined keywords $reg_value = ""; //combine keywords foreach($reg_keywords_01 as $reg_keywords_02) { $reg_value = $reg_value . " " . $reg_keywords_02; } $var_00 = $reg_value; //*************** End List Letters / Numbers ************************ //echo "
01 $var_00"; $var_00 = str_replace (" and ", " ", $var_00); //Removes " and ", replaces with single whitespace //echo "
0100: $var_00"; $var11 = str_replace (".", " ", $var_00); //echo "
01a $var_11"; $var22 = str_replace ("-", " ", $var11); //echo "
01b $var_22"; $var33 = str_replace ("+", " ", $var22); //echo "
01c $var_33"; $var44 = preg_replace('/[^a-z 0-9]/i', '', $var33); //echo "
01d $var_44"; $var55 = ereg_replace(" +", " ", $var44); //echo "
02 $var55"; $ExplodeIt = explode(" ","$var55"); // Lets get a Count Of the total Values in the array. $Count = count($ExplodeIt); // Lets get a Count Of the total Values in the array. if ($Count == 0) { $ExplodeIt = $var; } // Create a Loop to Output the Information. Make sure $i starts off at 0, this is where the first value is returned for ($i=0; $i < $Count; $i++) { if (strlen($ExplodeIt[$i]) == 3) { $extra_chars_3 = "_"; $ExplodeIt[$i] = "+$ExplodeIt[$i]$extra_chars_3 "; } else if (strlen($ExplodeIt[$i]) == 2) { $extra_chars_2 = "__"; $ExplodeIt[$i] = "+$ExplodeIt[$i]$extra_chars_2 "; } else if (strlen($ExplodeIt[$i]) == 1) { $extra_chars_1 = "___"; $ExplodeIt[$i] = "+$ExplodeIt[$i]$extra_chars_1 "; } else { $ExplodeIt[$i] = "+$ExplodeIt[$i] "; } } // Output the Information. Remember, It is looping so as many items that are in the array will do this loop that many times. $query_exploded = "$ExplodeIt[0]$ExplodeIt[1]$ExplodeIt[2]$ExplodeIt[3]$ExplodeIt[4]$ExplodeIt[5]$ExplodeIt[6]$ExplodeIt[7]$ExplodeIt[8]$ExplodeIt[9]$ExplodeIt[10]$ExplodeIt[11]$ExplodeIt[12]$ExplodeIt[13]$ExplodeIt[14]$ExplodeIt[15]$ExplodeIt[16]$ExplodeIt[17]$ExplodeIt[18]$ExplodeIt[19]"; //echo "
03 $query_exploded"; //$query_exploded_01 = str_replace("+", "", $query_exploded); //$query_exploded_01 = trim($query_exploded_01); $query_exploded_01 = $query_exploded; //echo "
04 $query_exploded_01"; // ************************* Sort script ************************* if ($sort_var == '' || $sort_var == 'latest') { $sort_var = "latest"; $query3 = " ORDER BY added DESC"; } else if ($sort_var == 'oldest') { $query3 = " ORDER BY added ASC"; } else if ($sort_var == 'most_popular') { $query3 = (" ORDER BY views DESC"); } else if ($sort_var == 'photographer_a_z') { $query3 = (" ORDER BY photographer ASC"); } else if ($sort_var == 'photographer_z_a') { $query3 = (" ORDER BY photographer DESC"); } else if ($sort_var == 'location_a_z') { $query3 = (" ORDER BY location ASC"); } else if ($sort_var == 'location_z_a') { $query3 = (" ORDER BY location DESC"); } else if ($sort_var == 'country_a_z') { $query3 = (" ORDER BY country ASC"); } else if ($sort_var == 'country_z_a') { $query3 = (" ORDER BY country DESC"); } else if ($sort_var == 'reg_a_z') { $query3 = (" ORDER BY reg ASC"); } else if ($sort_var == 'reg_z_a') { $query3 = (" ORDER BY reg DESC"); } else if ($sort_var == 'cn_a_z') { $query3 = (" ORDER BY cn ASC"); } else if ($sort_var == 'cn_z_a') { $query3 = (" ORDER BY cn DESC"); } else if ($sort_var == 'type_a_z') { $query3 = (" ORDER BY type ASC"); } else if ($sort_var == 'type_z_a') { $query3 = (" ORDER BY type DESC"); } else if ($sort_var == 'operator_a_z') { $query3 = (" ORDER BY operator ASC"); } else if ($sort_var == 'operator_z_a') { $query3 = (" ORDER BY operator DESC"); } //Picture Limit************************************ $limit = @$_GET['limit'] ; //if ((!($limit)) || ($limit != 5) || ($limit != 10) || ($limit != 20) || ($limit != 50)) if ($limit == 5 || $limit == 10 || $limit == 20 || $limit == 50) { $limit = $limit; // Default results per-page. } else { $limit = $database_search_limit; // Default results per-page. } if (!($page)) { $page = 0; } // Default page value. //************** GENERATE SEARCH ID ************** //If there is no search ID generate one //if (!isset($searchid)) //{ //$random_id taken from Redirect URL script above //$searchid = $random_id; //$query_sid = "INSERT INTO wap_search_id (ip, search_id, time, search_string) VALUES ('$ip', '$searchid', NOW(), '$search_string')"; //$result_sid = @mysql_query($query_sid); //if (!isset($result_sid)) //{ //echo ("Error in query.
Please go back and try again."); //exit(); //} //} // ********** PAGER SCRIPT ********** include("pagination/pager_class.php"); $pager = new pager; //echo $query; if ($full_text_search != 'yes' && ($query == '24hours' || $query == '48hours' || $query == '7days' || $query == 'month' || $query == '6months' || $query == 'year')) { $pager->sql = "SELECT * FROM $pictures_table WHERE display_picture='yes' and TO_DAYS(NOW()) - TO_DAYS(added) <= $search_period $query3"; $search_string = "TO_DAYS(NOW()) - TO_DAYS(added) <= $search_period $query3"; } else if ($full_text_search != 'yes' && ($query == 'edschoice')) { $pager->sql = "SELECT * FROM $pictures_table WHERE display_picture='yes' and edschoice like 'yes%' $query3"; $search_string = "edschoice like **yes%** $query3"; } else if ($full_text_search != 'yes' && $query == 'full_list') { $pager->sql = "SELECT * FROM $pictures_table WHERE display_picture='yes' $query3"; $search_string = " type like **%** $query3"; } else if ($full_text_search != 'yes' && $var2 == 'picture_category') { $pager->sql = "SELECT * FROM $pictures_table WHERE display_picture='yes' and subtype2='$query' or display_picture='yes' and picture_category='$query' $query3"; $search_string = "subtype2=**$query** or display_picture=**yes** and picture_category=**$query** $query3"; } else if ($full_text_search != 'yes' && $var2 == 'location') { $pager->sql = "SELECT * FROM $pictures_table WHERE display_picture='yes' and location='$query' or display_picture='yes' and clean_location='$query' or display_picture='yes' and location_search='$query' $query3"; $search_string = "location=**$query** or display_picture=**yes** and clean_location=**$query** or display_picture=**yes** and location_search=**$query** $query3"; } else if ($full_text_search != 'yes' && $var2 == 'operator') { $pager->sql = "SELECT * FROM $pictures_table WHERE display_picture='yes' and operator='$query' or display_picture='yes' and clean_operator='$query' or display_picture='yes' and operator_search='$query' $query3"; $search_string = "operator=**$query** or display_picture=**yes** and clean_operator=**$query** or display_picture=**yes** and operator_search=**$query** $query3"; } else if ($full_text_search != 'yes' && $var2 == 'type') { $pager->sql = "SELECT * FROM $pictures_table WHERE display_picture='yes' and type='$query' or display_picture='yes' and clean_type='$query' or display_picture='yes' and type_search='$query' $query3"; $search_string = "type=**$query** or display_picture=**yes** and clean_type=**$query** or display_picture=**yes** and type_search=**$query** $query3"; } //Code Number search fix else if ($full_text_search != 'yes' && $var2 == 'code_number') { $pager->sql = "SELECT * FROM $pictures_table WHERE display_picture='yes' and code_number like '%$query%' $query3"; $search_string = "display_picture=**yes** and code_number like **%$query%** $query3"; } else if ($full_text_search != 'yes' && $var2 == 'photographer') { $pager->sql = "SELECT * FROM $pictures_table WHERE display_picture='yes' and photographer='$query' or display_picture='yes' and photographer_search = ' $query_exploded_01' $query3"; $search_string = "photographer=**$query** or display_picture=**yes** and photographer_search = ** $query_exploded_01** $query3"; } //else if ($full_text_search != 'yes' && $var2 == 'reg') //{ //$pager->sql = "SELECT * FROM $pictures_table WHERE display_picture='yes' and reg='$query' or display_picture='yes' and clean_reg='$query' or display_picture='yes' and reg_search='$query' $query3"; //} //Reg search fix else if ($full_text_search != 'yes' && $var2 == 'reg') { $pager->sql = "SELECT * FROM $pictures_table WHERE display_picture='yes' and reg='$query' or display_picture='yes' and reg like '$query / %' or display_picture='yes' and reg like '% / $query' $query3"; $search_string = " display_picture=**yes** and reg = **$query** $query3"; } //else if ($full_text_search != 'yes') //{ //$pager->sql = "SELECT * FROM $pictures_table WHERE display_picture='yes' and $var2 = '$query' $query3"; //$search_string = "$var2 = **$query** $query3"; //} else if ($full_text_search != 'yes') { $pager->sql = "SELECT * FROM $pictures_table WHERE display_picture='yes' and type = '$query' or display_picture='yes' and type_search = '$query' or display_picture='yes' and generic = '$query' or display_picture='yes' and generic_search = '$query' or display_picture='yes' and reg = '$query' or display_picture='yes' and reg_search = '$query' or display_picture='yes' and cn = '$query' or display_picture='yes' and cn_search = '$query' or display_picture='yes' and code_number = '$query' or display_picture='yes' and code_number_search = '$query' or display_picture='yes' and photographer = '$query' or display_picture='yes' and photographer_search = '$query' or display_picture='yes' and location = '$query' or display_picture='yes' and clean_location = '$query' or display_picture='yes' and location_search = '$query' or display_picture='yes' and country = '$query' or display_picture='yes' and country_search = '$query' or display_picture='yes' and unit = '$query' or display_picture='yes' and unit_search = '$query' or display_picture='yes' and displayteam = '$query' or display_picture='yes' and airshow = '$query' or display_picture='yes' and airshow_search = '$query' or display_picture='yes' and date = '$query' or display_picture='yes' and date_search = '$query' or display_picture='yes' and year = '$query' or display_picture='yes' and operator = '$query' or display_picture='yes' and information = '$query' $query3"; $search_string = "$var2 = **$query** $query3"; } else if ($full_text_search == 'yes') { $pager->sql = "SELECT * FROM $pictures_table WHERE display_picture='yes' and MATCH($query2) AGAINST ('$query_exploded' IN BOOLEAN MODE) $query3"; $search_string = "MATCH($query2) AGAINST (**$query_exploded** IN BOOLEAN MODE) $query3"; } //************** GENERATE SEARCH ID ************** //If there is no search ID generate one //if (!isset($searchid)) //{ //$random_id taken from Redirect URL script above $query_sid = "select * from wap_search_id where ip = '$ip' and search_string = '$search_string'"; $result_sid = @mysql_query($query_sid); $numrows_sid=mysql_numrows($result_sid); $searchid=@mysql_result($result_sid,"searchid"); if (!isset($result_sid)) { echo ("Error in query.
Please go back and try again."); exit(); } //echo "
SEARCH ID: $searchid
"; //echo "
IP: $ip
"; //echo "
SEARCH STRING: $search_string
"; //echo "
NUMROWS: $numrows_sid
"; if ($numrows_sid == '0') { $searchid = $random_id; $query_sid = "INSERT INTO wap_search_id (ip, search_id, time, search_string) VALUES ('$ip', '$searchid', NOW(), '$search_string')"; $result_sid = @mysql_query($query_sid); if (!isset($result_sid)) { echo ("Error in query.
Please go back and try again."); exit(); } } else { $query_sid = "update wap_search_id set time = NOW() where ip = '$ip' and search_string = '$search_string'"; $result_sid = @mysql_query($query_sid); if (!isset($result_sid)) { echo ("Error in query.
Please go back and try again."); exit(); } } //} //************** SEARCH SCRIPT ************** $result = $pager->get_page_result(); // result set $numrows = $pager->get_page_num_rows(); // number of records in result set $nav_links = $pager->navigation(" ", "currentStyle"); // the navigation links (define a CSS class selector for the current link) $nav_info = $pager->page_info("to"); // information about the number of records on page ("to" is the text between the number) $simple_nav_links = $pager->back_forward_link(false); // the navigation with only the back and forward links, use true to use images $total_recs = $pager->get_total_rows(); // the total number of records $page_info = $pager->page_info(); $curr_pages = $pager->navigation(); $first_record = $pager->first_rec_no(); // first record of result set //echo $first_record; if ($numrows == 0){ $requested_page = "$HTTP_HOST$REQUEST_URI"; $referer = "$HTTP_REFERER"; $ip_address = "$REMOTE_ADDR"; $error_query = "insert into wap_search_errors (time, requested_page, referer, ip_address) VALUES (NOW(), '$requested_page', '$referer', '$ip_address')"; $error_result = mysql_query($error_query) or die("MySQL Error ".mysql_errno().": ".mysql_error()."
\nThe query was: ".$error_query); if (!isset($error_result)) { echo ("Error in query.
Please go back and try again."); //exit(); } echo(" $website_name_01 "); include("includes_01/header_includes.php"); echo(" "); include("includes_01/header_04.php"); require_once('/home/users/web/b2270/pow.frankjnr/htdocs/worldairpics/forum/SSI.php'); $logout_page = "$wap_login_link/logout.php?url=$random_id"; //if ($context['user']['is_admin']) //{ // echo ' // // Logged in as an admin // '; //} // 1= Admin // 2= Moderator // 9= Screener // 10= Premium Member $ad_free_groups = array(1, 2, 9,10); $no_adverts = FALSE; foreach ($ad_free_groups as $ad_free) if (in_array($ad_free, $user_info['groups'])) { $no_adverts = TRUE; break; } $username = $context['user']['name']; if ($context['user']['is_guest']) { echo "

You are not logged in. Please Login or Register
"; } else { echo "

You are logged in as $username - "; $_SESSION['logout_url'] = "$page_name"; ssi_logout($logout_page); echo "
"; } if ($no_adverts) { echo ""; } else { echo "


"; include("adverts/google_468_60.php"); echo "

"; } echo ("





No results were found for your search.


[ Click here to search for pictures. ]












"); include("includes_01/footer_01.php"); echo (""); // bah, modify the "Not Found" error for your needs. exit(); } //**********Page Title Script********** // // //$location=mysql_result($result,$i,"location"); //$operator=mysql_result($result,$i,"operator"); //$type=mysql_result($result,$i,"type"); // // //if ($var2 == 'operator' && $full_text_search != 'yes') //{ //$title = "$operator"; //} // //else if ($var2 == 'location' && $full_text_search != 'yes') //{ //$title = "$location"; //} // //else if ($var2 == 'type' && $full_text_search != 'yes') //{ //$title = "$type"; //} // //else //{ //$title = "$query"; //} // //echo "$query"; // //Title Setup if ($var2 == 'type' && $full_text_search != 'yes') { $title = "Pictures of $title aircraft"; } if ($var2 == 'photographer' && $full_text_search != 'yes') { $title = "Aircraft pictures taken by $title"; } else if ($var2 == 'date' && $full_text_search != 'yes') { $title = "Aircraft pictures taken on $title"; } else if ($var2 == 'location' && $full_text_search != 'yes') { $title = "Aircraft pictures taken at $title"; } else if ($var2 == 'country' && $full_text_search != 'yes') { $title = "Aircraft pictures taken in $title"; } else if ($var2 == 'reg' && $full_text_search != 'yes') { $title = "Pictures of aircraft with the reg $title"; } else if ($var2 == 'cn' && $full_text_search != 'yes') { $title = "Pictures of aircraft with the CN / MSN $title"; } else if ($var2 == 'operator' && $full_text_search != 'yes') { $title = "Pictures of $title aircraft"; } else if ($var2 == 'unit' && $full_text_search != 'yes') { $title = "Pictures of $title aircraft"; } else if ($var2 == 'displayteam' && $full_text_search != 'yes') { $title = "$title Pictures"; } else if ($var2 == 'airshow' && $full_text_search != 'yes') { $title = "$title Pictures"; } ?> <? echo "$website_name_01 : $title"; ?> , airliners, aviation photography, airshows, air show, air force, propliners, photos"> Aviation Photography Website, ">

You are not logged in. Please Login or Register





 


Displaying
 

Home   -   New Search
 
 
 

Home   -   New Search