File: /www/wwwroot/www.laemx.com/gg/ht.php
<?php
header("Content-Type:text/html;charset=utf-8");
session_start();
if(isset($_POST['login']))
{
$username = trim($_POST['username']);
$password = trim($_POST['password']);
if(($username=='')||($password==''))
{
header('refresh:3;url=ht.html');
echo "改用户名或密码不能为空,3秒后跳转到登录页面";
exit;
}
else if(($username!='admin')||($password!='admin.2021'))
{
//用户名或密码错误
header('refresh:3;url=ht.html');
echo "用户名或密码错误,请重新登录!或者联系技术微信:wxmingyan-----小伙子不要乱来哦!我已经注意到你了";
exit;
}
else if(($username=='admin')&&($password=='admin.2021'))
{
//登录成功将信息保存到session中
$_SESSION['username']=$username;
$_SESSION['islogin']=1;
//如果勾选7天内自动保存,则将其保存到cookie
if($_POST['remember']=="yes")
{
setcookie("username",$username,time()+7*24*60*60);
setcookie("code",md5($username.md5($password)),time()+7*24*60*60);
}
else
{
setcookie("username",'',time()-1);
setcookie("code",'',time()-1);
}
//跳转到用户首页
// header('refresh:0.1;url=ht.php');
}
}
?>
<?php
header("Content-Type:text/html;charset=utf-8");
session_start();
//首先判断Cookie是否有记住用户信息
if(isset($_COOKIE['username']))
{
$_SESSION['username']=$_COOKIE['username'];
$_SESSION['islogin']=1;
}
if(isset($_SESSION['islogin']))
{
//已经登录
echo '<p style="text-align: center;font-size:18px;font-weight:700;line-height:50px;">';
echo $_SESSION['username'].":你好,欢迎进入个人中心! ";
echo "<a href='logout.php'>退出登录</a>";
echo '</p>';
}
else
{ //为登录
echo '
<script LANGUAGE="JavaScript">
window.location="ht.html";
</script>
';
}
?>
<form action="add.php" name="form" method="post" enctype="multipart/form-data">
<table width="550" border="0" align="center" cellpadding="5" cellspacing="1" bgcolor="#B3B3B3" brder="1">
<tbody><tr style="display:none">
<td width="62" align="center" bgcolor="#FFFFFF">性别:</td>
<td width="465" bgcolor="#FFFFFF"><input type="text" name="title">
*</td>
</tr>
<tr style="display:none">
<td align="center" bgcolor="#FFFFFF">微信昵称:</td>
<td bgcolor="#FFFFFF"><input name="name" type="text" id="name">
*</td>
</tr>
<tr style="display:none">
<td align="center" bgcolor="#FFFFFF">微信二维码:</td>
<td bgcolor="#FFFFFF">
<input type="file" name="file" value="" /></td>
</tr>
<tr>
<td align="center" bgcolor="#FFFFFF">line号码:</td>
<td bgcolor="#FFFFFF">
<input name="weixinhao" type="text" id="name"> </td>
</tr>
<tr>
<td align="center" bgcolor="#FFFFFF">line链接:</td>
<td bgcolor="#FFFFFF">
<input name="shouji" type="text" id="name"> </td>
</tr>
<tr>
<td colspan="2" align="center" bgcolor="#FFFFFF">
<input name="submit" type="submit" value="提交">
<input name="reset" type="reset" value="重填"> </td>
</tr>
</tbody></table>
</form>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="Copyright" content="60IE.NET CopyRight 2013" />
<title>微信管理中心</title>
<style type="text/css">
<!--
body,td,th {
font-family: 宋体;
font-size: 9pt;
color: #222;
}
body {
margin-left: 0px;
margin-top: 0px;
margin-right: 0px;
margin-bottom: 0px;
background-color: #FFFFFF;
line-height:20px;
}
a:link {
color: #222;
text-decoration: none;
}
a:visited {
text-decoration: none;
color: #222;
}
a:hover {
text-decoration: underline;
color: #FF0000;
}
a:active {
text-decoration: none;
color: #999999;
}
-->
</style>
<?php
if($_POST["id"]!=""){
$id = $_POST["id"];
$info = file_get_contents("info.txt");
$column = explode("@@@",$info); unset($column[$id]);
$noinfo = implode("@@@",$column);
file_put_contents("info.txt",$noinfo);
echo "<script language=javascript>alert('删除成功!');</script>";
}
?>
</head>
<body>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td height="5"></td>
</tr>
</table>
<table width="550" border="0" align="center" cellpadding="5" cellspacing="1" bgcolor="#B3B3B3">
<tr>
<th width="60" bgcolor="#EBEBEB">id</th>
<th width="133" bgcolor="#EBEBEB">line号码</th>
<th width="133" bgcolor="#EBEBEB">line 链接</th>
<th width="78" bgcolor="#EBEBEB">时间</th>
<th width="59" bgcolor="#EBEBEB">操作</th>
</tr>
<?php
$info = file_get_contents("info.txt");
$info = rtrim($info,"@");
if(strlen($info)>10){
$column = explode("@@@",$info);
foreach($column as $keys=>$values){
$message = explode("%%",$values);
?>
<tr>
<td align="center" bgcolor="#FFFFFF"><?php echo $keys;?></th>
<td align="center" bgcolor="#FFFFFF"><?php echo $message[3];?></th>
<td align="center" bgcolor="#FFFFFF"><?php echo $message[4];?></th>
<td align="center" bgcolor="#FFFFFF"><?php echo date("m/d H:i",$message[5]);?></th>
<td align="center" bgcolor="#FFFFFF"><form action="" name="form" method="post" enctype="multipart/form-data">
<?php
echo ' <input name="id" type="hidden" id="name" value="'.$keys.'"> ';
?>
<input name="submit" type="submit" value="删除">
</form>
</tr>
<?php
}
}
?>
</table>
<br>
<form action="zt.php" method="post" align="center">
<input type="radio" value="1" name="zt">047页面<br><br>
<input type="radio" value="2" name="zt">053页面<br><br>
<input name="tj" value="保存状态" id="tj" type="submit">
</form>
<table width="550" height="20" border="0" align="center" cellpadding="5" cellspacing="1" bgcolor="#CCCCCC">
<tr>
<td align="left" bgcolor="#FFFFFF"> 当前页面状态</td>
<td align="left" bgcolor="#FFFFFF">
<?php
$zt = file_get_contents("zt.txt");
if($zt=="1"){
echo"047页面";
}
if($zt=="2"){
echo"053页面";
}
if($zt==""){
echo"暂未设置,请尽快设置状态,默认为047";
}
if($zt!="1"&&$zt!="2"&&$zt!=""){
echo"状态错乱,请联系管理员";
}
?>
</td>
</tr>
</table>
<br><br>
<table width="550" height="20" border="0" align="center" cellpadding="5" cellspacing="1" bgcolor="#CCCCCC">
<tr>
<td align="left" bgcolor="#FFFFFF"> Copyright @2020 赛脑公司版权所有</td>
</tr>
</table>
</body>
</html>