web建站教程
  1. 首页
  2. vuejs
  3. js
  4. 好玩
  5. seo教程
  6. 前端知识
  7. 百度echarts
  8. 更多
    php入门
    nodejs
    mockjs
    reactjs
    mysql
    wordpress
    织梦cms
    帝国cms
    git教程
    IT知识
    模板大全
    休息站

帝国CMS如何删除分类信息密码

314 ℃
     

帝国cms如何删除分类信息密码,可以根据下面代码修改:

<?php
if($navinfor['password'])
{
echo "<a href='/e/delnews/fwxx.php?classid=[!–self.classid–]&amp;id=[!–id–]' target='_blank'>删除信息</a>(需密码)";
}
?>

这个文件下的内容

<?php
require("../class/connect.php");
include("../class/db_sql.php");
include("../class/config.php");
$link=db_connect();
$empire=new mysqlquery();
$id=(int)$_GET['id'];
$classid=(int)$_GET['classid'];
//检查参数
if(!$classid || !$id)
{
echo"<script>alert('Error!');history.go(-1);</script>";
exit();
}
if ($_POST['enews']=='DelNews')
{
$key=$_POST['key'];
$password=$_POST['password'];
//验证码
$checkplkey = getcvar ('checkplkey');
if (($key != $checkplkey OR empty ($checkplkey)))
{
printerror ('FailKey', 'history.go(-1)', 1);
}

$query="select password,id,title from {$dbtbpre}ecms_fwxx where id='$id' and classid='$classid'";
$r=$empire->fetch1($query);
if(!$r[id] or !$r[password])
{
echo"<script>alert('此信息密码为空或不存在,不能删除!');history.go(-1);</script>";
exit();
}
//验证信息密码
if ($password==$r[password])
{
$r=$empire->query("update {$dbtbpre}ecms_fwxx set checked='0' where classid='$classid' and id='$id'");
echo"<script>alert('您的删除请求已提交,该信息将在12小时内删除!');window.location='/';</script>";
}
else
{
echo"<script>alert('信息密码错误,请核对密码后再试!');window.location='fwxx.php?classid=$classid&id=$id';</script>";
}

}
else
{
?>
<script language="javascript" type="text/javascript">
function checkForm()
{
var frm;
frm = document.getElementById("form1");

if(frm.password.value == ""){
alert("密码不能为空!");
frm.password.focus();
return false;
}

if(frm.key.value.length < 4){
alert("请填写验证码");
frm.key.focus();
return false;
}

return true;
}
</script>

<?
include("../data/template/cp_1.php");
?>
<body onLoad="document.form1.password.focus()">
<form action="fwxx.php?classid=<?=$classid?>&id=<?=$id?>" method="post" name="form1" id="form1" onSubmit="return checkForm()">
<input name="enews" type="hidden" value="DelNews">
<table width="50%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td bgcolor="#FFFFFF"><table width="100%" border="0" cellpadding="5" cellspacing="1" bgcolor="#A3E7AD">
<tr>
<td height="30" colspan="2" bgcolor="#EBF8E1">&nbsp;&nbsp;<img src="../../265nn_images/icon_w.gif" width="10" height="13" align="absmiddle" /> <span class="000000_s">凭密码删除信息</span></td>
</tr>
<tr>
<td width="46%" align="right" bgcolor="#FFFFFF">请输入您发布信息时设定的管理密码:</td>
<td width="54%" bgcolor="#FFFFFF"><input type="password" id="password" name="password" /></td>
</tr>
<tr>
<td align="right" bgcolor="#FFFFFF">请输入验证码:</td>
<td bgcolor="#FFFFFF"><input name="key" type="text" id="key" size="4" />
<img src="/e/ShowKey?ecms" alt="验证码" align="absmiddle"> <span class="notes">请输入图中的4位数字</span></td>
</tr>
<tr>
<td height="50" colspan="2" bgcolor="#FFFFFF" align="center"><input name="Submit" type="image" id="Submit" value="确 定" src="../../265nn_images/banner_tj.gif"></td>
</tr>
</table></td>
</tr>
</table>
</form>
<?
include("../data/template/cp_2.php");
?>
<?
}
?>

html文本如何读取数据库代码示例

php表单提交报错显示适当的错误消息代码

php语法中sleep函数的基本用法

利用php语法中NOT IN排除多个字段功能

利用php语法中WHERE子句排除不等字段功能

标签: amp, classid, CMS网站, php语法

上面是“帝国CMS如何删除分类信息密码”的全面内容,想了解更多关于 帝国cms 内容,请继续关注web建站教程。

当前网址:https://ipkd.cn/webs_1354.html

声明:本站提供的所有资源部分来自互联网,如果有侵犯您的版权或其他权益,请发送到邮箱:admin@ipkd.cn,我们会在看到邮件的第一时间内为您处理!

当前位置: 网站首页 > 帝国cms
本文共计2903个字,预计阅读时长20分钟
生活小工具,收录了80多款小工具
上一篇: 推荐一个可以查询老黄历的网站,可以根据五行取名!
下一篇: 详细介绍HTTP状态码不同之处的原因(什么原因导致的)
x 打工人ai神器