<?php
include_once("settings.php");
if($_POST['submit']){
$pass = $_POST['pass'];
if($pass != $admin_pass){
$message .="Parola de administrator este eronata, va rugam reincercati";
}else{
$onehour = 36400 + time(); 
setcookie(gbadmin, date("F jS - g:i a"), $onehour);
header('Location: sel_col.php');

}
}
}
if(!isset($_COOKIE['gbadmin'])){
?>
<form method="post">
  <table width="100%" border="0" align="center" cellpadding="1" cellspacing="0" bordercolor="#CCCCCC">
    <tr>
      <td height="20" bgcolor="#EFEFEF"><?php if(!isset($_POST['submit'])){?><center>Te afli in zona dedicata administratorului <br> 
Daca nu esti tu acela esti obligat sa parasesti aceasta pagina. <br>
I.P.-ul tau este memorat in baza noastra de date</center> <?php }else{ echo "".$message.""; }?><br><br></td>
    </tr>
    <tr>
      <td height="20" align="center" valign="middle" bgcolor="#EFEFEF"><center>Parola de Administrare:<br>
        <input name="pass" type="password" id="pass"></center></td>
    </tr>
    <tr>
      <td height="20" align="center" valign="middle" bgcolor="#EFEFEF"><center><input name="submit" type="submit" id="submit" value="Logare Administrator"></center></td>
    </tr>
  </table>
</form>
