马上注册,免费下载更多dz插件网资源。
您需要 登录 才可以下载或查看,没有账号?立即注册
×
- <?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()+3600*3);$isview = true;}else{$p = (empty($_POST["pwd"])) ? "需要密码才能查看,请输入密码。" : "<div style="color:#F00;">密码不正确,请重新输入。</div>";}}else{$isview = false;$p = "请输入密码查看,获取密码可联系我。";}}?><?php if($isview){?><!DOCTYPE html><html><head><meta http-equiv="Content-Type" content="text/html;charset=utf-8" /><title>后台能管理</title><style type="text/css">body{background:none;}.passport{width:400px;position:absolute;left:50%;top:50%;margin-left:-200px;margin-top:-55px;font-size:18px;text-align:center;line-height:30px;color:red;}</style><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><script> function del(id){ if(confirm("确定要删除吗?")){ window.location='?id='+id; } }</script><script> function xiugai(ab){ if(confirm("确定要修改吗?")){ window.location='?ab='+ab; } }</script><script language=javascript> function CheckPost() { if (myform.title.value.length<2) { alert("标题不能少于2个字符"); myform.title.focus(); return false; } if (myform.name.value=="") { alert("昵称不能为空"); myform.name.focus(); return false; } if (myform.content.value.length<10) { alert("内容不能少于10个字符"); myform.content.focus(); return false; } }</script><?phpif($_GET["id"]<>''){$id = $_GET["id"];$info = file_get_contents("chongdian.txt");$column = explode("@@@",$info); unset($column[$id]);$noinfo = implode("@@@",$column); file_put_contents("chongdian.txt",$noinfo); echo "<script language=javascript>alert('删除成功!');window.location='1.php'</script>";}?><?phpif($_GET["ab"]<>''){$id = $_GET["ab"];$filename="chongdian.txt";$file = fopen($filename, "r+");// 修改文件内容,将"Hello World"替换为"Hello PHP" $file_contents = file_get_contents($filename);$file_contents = str_replace($message[3], "123", $file_contents);fwrite($file, $file_contents); echo "<script language=javascript>alert('修改成功!');window.location='1.php'</script>";}?><body><form name="myform" method="post" onsubmit="return CheckPost()" action=""><table width="550" border="0" align="center" cellpadding="5" cellspacing="1" bgcolor="#B3B3B3"> <tr> <td height="25" align="center" bgcolor="#EBEBEB"><a href="1.php">查看信息</a> | <a href="1.php?tj=add">赞助充值登记</a></td> </tr></table><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">是否处理</th><th width="76" bgcolor="#EBEBEB">姓名</th><th width="77" bgcolor="#EBEBEB">电话</th><th width="133" bgcolor="#EBEBEB">内容</th><th width="78" bgcolor="#EBEBEB">操作</th><th width="78" bgcolor="#EBEBEB">修改</th></tr><?php$info = file_get_contents("chongdian.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"></th> <?php echo $message[4];?><td align="center" bgcolor="#FFFFFF"><?php echo $message[0];?> </th></td><td align="center" bgcolor="#FFFFFF"><?php echo $message[3];?></th><td align="center" bgcolor="#FFFFFF"><?php echo $message[1];?> </th><td align="center" bgcolor="#FFFFFF"><?php echo "<a href='javascript:del({$keys})'>删除</a>"; ?><td align="center" bgcolor="#FFFFFF"><?php echo "<a href='1.php?ab=xiugai'>修改</a>";?></tr><?php }}?></table><?php if($_GET["tj"] == add){?><?phpif($_POST[submit]){$title = $_POST["title"];$name = $_POST["content"];$face = $_POST["face"];$content = $_POST["name"];$addtime = "未处理";$insert = "{$title}%%{$name}%%{$face}%%{$content}%%{$addtime}@@@";$content = file_get_contents("chongdian.txt"); file_put_contents("chongdian.txt",$content.$insert); echo "<script language=javascript>alert('留言成功!');window.location='1.php'</script>"; }?> <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" brder="1"><tr> <td width="95" align="center" bgcolor="#FFFFFF"><div align="center"> 姓名:</div></td> <td width="432" bgcolor="#FFFFFF"><input type="text" name="title"/> *</td></tr><tr> <td align="center" bgcolor="#FFFFFF"><div align="center">电话:</div></td> <td bgcolor="#FFFFFF"><input name="name" type="text" id="name"/> *</td> </tr><tr> <td align="center" bgcolor="#FFFFFF"><div align="center">内容:</div></td> <td bgcolor="#FFFFFF"><input name="content" type="text" value=""> </td></tr><tr> <td colspan="2" align="center" bgcolor="#FFFFFF"> <input name="submit" type="submit"value="提交" /> <input name="reset" type="reset" value="重填"/> </td> </tr></table></form><?php }?><table width="100" border="0" align="center" cellpadding="0" cellspacing="0"> <tr> <td height="5"></td> </tr></table><table width="550" height="20" border="0" align="center" cellpadding="5" cellspacing="1" bgcolor="#CCCCCC"> <tr> <td align="left" bgcolor="#FFFFFF"> Copyright @<?php echo date('Y');?> <a target="_blank">Suanban</a> All Rights Reserved. Build V.01</td> </tr></table></body></html><?php }else{?><!DOCTYPE html><html><head><meta http-equiv="Content-Type" content="text/html;charset=utf-8" /><title>后台能管1理</title><style type="text/css">body{background:none;}.passport{border:1px solid red;background-color:#FFFFCC;width:400px;height:100px;position:absolute;left:49.9%;top:49.9%;margin-left:-200px;margin-top:-55px;font-size:14px;text-align:center;line-height:30px;color:#746A6A;}</style></head><body><div class="passport"><div style="padding-top:20px;"><form action="" method="post" style="margin:0px;">输入查看密码<input type="password" name="pwd" /> <input type="submit" value="查看" /></form><?php echo $p;?></div></div></body></html><?php }?>
复制代码 点击后面的修改,该行前面的未处理变更为已经处理。
我没弄成,有懂的看看代码?如何实现?https://3.suanban.cn/1.php 密码:123
©DZ插件网所发布的一切资源仅限用于学习和研究目的;不得将上述内容用于商业或者非法用途,否则,一切后果请用户自负。 网站部分内容来源于网络,版权争议与本站无关。您必须在下载后的24个小时之内,从您的电脑中彻底删除上述内容。如果您喜欢该程序,请支持正版软件,得到更好的正版服务。 您在本站任何的赞助购买、下载、查阅、回复等行为等均表示接受并同意签订《DZ插件网免责声明协议》。 如有侵权请邮件与我们联系处理: discuzaddons@vip.qq.com 并出示相关证明以便删除。敬请谅解!
|
|