format('Y-m-d H:i:s'); $date = date('Y/m/d H:i:s');
//Check if exist
if(clearParam(strtolower(" " . $un . $p1))){
$fglobal = file_get_contents("themes/jaxtheme/globalt_ad.html");
$fglobal = str_replace("%mytitle%","Admin",$fglobal);
$fglobal = str_replace("%menu%","",$fglobal);
$fglobal = str_replace("%content%","Bad Request. We have noted your IP.",$fglobal);
echo $fglobal;
}
else{ //log in
$login_st = logindb($un, $p1);
if (count($login_st)>0){
$_SESSION['una'] = $login_st['1']['USERNAME'];
$_SESSION['fn'] = $login_st['1']['FIRSTNAME'];
$_SESSION['ln'] = $login_st['1']['LASTNAME'];
$_SESSION['datec'] = $login_st['1']['DATEC'];
header('Location: jaxadmd.php');
exit;
}
else{
$form_t = file_get_contents("themes/jaxtheme/adl_form.html");
$fglobal = file_get_contents("themes/jaxtheme/globalt_ad.html");
$fglobal = str_replace("%mytitle%","Admin",$fglobal);
$fglobal = str_replace("%menu%","",$fglobal);
$fglobal = str_replace("%content%","Invalid login" . $form_t,$fglobal);
echo $fglobal;
}
}
}
else{ //Invalid access
if(isset($_GET["n"])){
if($_GET["n"]=="n4"){
$form_t = file_get_contents("themes/jaxtheme/adl_form.html");
$fglobal = file_get_contents("themes/jaxtheme/globalt_ad.html");
$fglobal = str_replace("%mytitle%","Admin",$fglobal);
$fglobal = str_replace("%menu%","",$fglobal);
$fglobal = str_replace("%content%",$form_t,$fglobal);
echo $fglobal;
}else{
$fglobal = file_get_contents("themes/jaxtheme/globalt_ad.html");
$fglobal = str_replace("%mytitle%","Admin",$fglobal);
$fglobal = str_replace("%menu%","",$fglobal);
$fglobal = str_replace("%content%","Invalid acess",$fglobal);
echo $fglobal;
}
}
else{
$fglobal = file_get_contents("themes/jaxtheme/globalt_ad.html");
$fglobal = str_replace("%mytitle%","Admin",$fglobal);
$fglobal = str_replace("%menu%","",$fglobal);
$fglobal = str_replace("%content%","Invalid acess",$fglobal);
echo $fglobal;
}
}
?>