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();
}
//**********Picture Count**********
$numresults = mysql_query("SELECT * FROM $pictures_table WHERE display_picture='yes'"); // the query.
$numrows = mysql_num_rows($numresults); // Number of rows returned from above query.
//**********Referrer**********
$ref = @$_SERVER['HTTP_REFERER'];
$ip = @$_SERVER['REMOTE_ADDR'];
$useragent = @$_SERVER['HTTP_USER_AGENT'];
$requested_page = "$PHP_SELF?q=$var&u=$var2&sort=$sort_var";
//**********Last Page Visited**********
// 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";
$query_redirect = "insert into airpics_logging_redirect (redirect_url, unique_id, timestamp) VALUES ('$page_name', '$random_id', NOW())";
//echo "$current_time ";
//echo "$page_name ";
//echo "$trimmed_time ";
//echo "$random_id";
$result_redirect = mysql_query($query_redirect);
if (!isset($result_redirect))
{
echo ("Error in query. Please go back and try again.");
//exit();
}
//**********Start Referer Link Script**********
if ($ref != '') {
//Browser Check
if (preg_match('|MSIE ([0-9].[0-9]{1,2})|',$useragent,$matched)) {
$browser_version=$matched[1];
$browser = 'Internet Explorer';
} elseif (preg_match('|Netscape ([0-9].[0-9]{1,2})|',$useragent,$matched)) {
$browser_version=$matched[1];
$browser = 'Netscape';
} elseif (preg_match( '|Opera ([0-9].[0-9]{1,2})|',$useragent,$matched)) {
$browser_version=$matched[1];
$browser = 'Opera';
} elseif(preg_match('|Firefox/([0-9\.]+)|',$useragent,$matched)) {
$browser_version=$matched[1];
$browser = 'Firefox';
} elseif(preg_match('|Safari/([0-9\.]+)|',$useragent,$matched)) {
$browser_version=$matched[1];
$browser = 'Safari';
} else {
// browser not recognized!
//$browser_version = 0;
$browser= 'Other Browser';
}
//OS Check
//$useragent = $_SERVER['HTTP_USER_AGENT'];
if (strstr($useragent,'Win')) {
$os='Windows';
} else if (strstr($useragent,'Mac')) {
$os='Macintosh';
} else if (strstr($useragent,'Linux')) {
$os='Linux';
} else if (strstr($useragent,'Unix')) {
$os='Unix';
} else {
$os='Other';
}
$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.");
//exit();
}
}
//**********End Referer Link Script**********
?>
<? echo "$website_name_01 : Advanced Search"; ?>
, airliners, aviation photography, airshows, air show, air force, propliners, photos">
Aviation Photography Website, pictures and photos of ">