<?php 
$password = "123";
$p = "";
if(isset($_COOKIE["isview"]) and $_COOKIE["isview"] == $password){ 
$isview = true;
}else{ 
if(isset($_POST["pwd"])){ 
if($_POST["pwd"] == $password){ 
//setcookie("isview",$_POST["pwd"],time()+36000*1);
//setcookie("isview",$_POST["pwd"],time()+60*1);
$isview = true;
}else{$p = (empty($_POST["pwd"])) ? "密码为空,请检查后重新再试!</span>" : "密码错误,请核对后重新再试!</span>";
} 
}else{$isview = false;
$p = "请输入密码以回车键确认登录。";
}
}?>
<?php if($isview)
{
?>



<!-- System.cont start -->

//内容界面

<!-- System.cont end -->

<?php 
}else{?>

<!-- System_login_begin -->

//登录界面

<form role="form" action="" method="post">
  <p> 欢迎使用</p>
  <div class="hxxCloud-group">
    <label> 用户名</label>
    <input type="text" name="uid" autocomplete="current-userid" class="hxxCloud-input">
  </div>
  <div class="hxxCloud-group password-group">
    <label> 密码</label>
    <input type="password" name="pwd" autocomplete="current-password" class="hxxCloud-input">
  </div>
  <p><button class="hxxCloud-btn login-btn"> 登 录</button>
  <div class="text-foot">
    <?php echo $p; ?>
  </div>
</form>

<!-- System_login_EOF -->

<?php }?>
分类: 前端开发

0 条评论

发表回复

Avatar placeholder

您的电子邮箱地址不会被公开。