session_name('asaswww');
session_start();
$guest = gethostbyaddr($_SERVER['REMOTE_ADDR']);
$update_time=false;
$page="main";
$name_regex = array("options" => array("regexp"=>"/^[a-zA-Z0-9_]+$/"));
$_value = filter_input(INPUT_GET, "psect", FILTER_VALIDATE_REGEXP, $name_regex);
if ($_value === FALSE){
echo "
Error: psect ";
die();
}else if($_value) $psect = $_value;
//if (isset($_GET["page"])) $page=$_GET["page"];
//else $page="main";
$_value = filter_input(INPUT_GET, "page", FILTER_VALIDATE_REGEXP, $name_regex);
if ($_value === FALSE){
echo "Error: page ";
die();
}else if($_value) $page = $_value;
$fixed=0;
if (isset($_GET["fix"]))
{
if($_GET["fix"] == 1) $fixed=1;
$_SESSION["fix"]=$fixed;
setcookie("fixed_menu_left", $fixed, time() + 365*3600);
}
else if (isset($_SESSION["fix"])) {
if($_SESSION["fix"] == 1) $fixed=1;
}else if (isset($_COOKIE["fixed_menu_left"])){
if($_COOKIE["fixed_menu_left"] == 1) $fixed=1;
$_SESSION["fix"]=$fixed;
}else
{
if ($guest=="aquila.astrouw.edu.pl") $fixed=0;
else $fixed=1;
$_SESSION["fix"]=$fixed;
}
if (isset($_GET["bandw"]))
{
$blackwhite=$_SESSION["bandw"]=$_GET["bandw"];
setcookie("asas_theme", $blackwhite, time() + 365*3600);
}
else if (isset($_SESSION["bandw"])) $blackwhite=$_SESSION["bandw"];
else if (isset($_COOKIE["asas_theme"])) $blackwhite=$_SESSION["bandw"]=$_COOKIE["asas_theme"];
else
{
if ($guest=="lupus.astrouw.edu.pl" || $guest=="as3.astrouw.edu.pl") $blackwhite=1;
else $blackwhite=0;
$_SESSION["bandw"]=$blackwhite;
}
if (isset($_SESSION['visited'])) $visited=$_SESSION['visited'];
else $visited=0;
$staff=0;
$robot=0;
if ($guest=="static.88-198-7-39.clients.your-server.de" || $guest=="netsprint.pl" || $guest=="222.46.18.34" || $guest=="crawling.wp.pl" || ereg("^crawl.+.googlebot.com",$guest) ) $robot=1;
if ( $guest=="phoenix.astrouw.edu.pl" || $guest=="lupus.astrouw.edu.pl" || $guest=="aquila.astrouw.edu.pl" || $guest=="as3.astrouw.edu.pl") $staff=1;
if (isset($_GET["ohoho"])) $_SESSION["ohoho"]=$_GET["ohoho"];
if (isset($_SESSION["ohoho"])) {$staff=1;}
$Title=array("news"=>"ASAS News",
"highlights"=>"ASAS Highlights",
"catalogues"=>"ASAS Catalogues",
"acvs"=>"ASAS Catalogue of Variable Stars",
"show"=>"ASAS Catalogue of Variable Stars",
"aasc"=>"ASAS All Stars Catalogue",
"atlas"=>"ASAS Sky Atlas",
"kepler"=>"ASAS variables in Kepler FOV",
"download"=>"ASAS Download",
"alerts"=>"ASAS Alerts",
"sotm"=>"ASAS Star of the Month",
"eclid"=>"ASAS Eclipsing",
"status"=>"ASAS Status",
"papers"=>"ASAS Papers",
"history"=>"ASAS History",
"gallery"=>"ASAS Gallery",
"links"=>"ASAS: Links",
"contact"=>"ASAS: Contact",
"workarea"=>"ASAS Work Area");
//$Restricted=array("sotm","eclipsing","eclgal","eclid","misc","miscgal");
$Restricted=array("sotm","misc","miscgal");
$Restr_n=count($Restricted);
?>
.css">
if (isset($Title[$page])) echo $Title[$page]; else echo "All Sky Automated Survey"; ?>
// Menu Division
if ($fixed==0) echo "