1 Star 3 Fork 2

mojie126 / HDCN-PT

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
deletedisabled.php 1.26 KB
一键复制 编辑 原始数据 按行查看 历史
mojie126@foxmail.com 提交于 2014-11-12 16:16 . HDCN-PT初始化
<?php
require "include/bittorrent.php";
dbconn();
loggedinorreturn();
require_once(get_langfile_path());
if (get_user_class() < UC_SYSOP)
permissiondenied();
$shownotice=false;
if ($_SERVER["REQUEST_METHOD"] == "POST")
{
if ($_POST['sure'])
{
$delres = sql_query("SELECT id, username FROM users WHERE enabled='no'");
while ($arr = mysql_fetch_assoc($delres)){
record_op_log($CURUSER['id'],$arr['id'],$arr['username'],'del','被禁用的账号');
}
$res=sql_query("DELETE FROM users WHERE enabled='no'");
$deletecount=mysql_affected_rows();
$shownotice=true;
}
}
stdhead($lang_deletedisabled['head_delete_diasabled']);
begin_main_frame();
?>
<h1 align="center"><?php echo $lang_deletedisabled['text_delete_diasabled']?></h1>
<?php
if ($shownotice)
{
?>
<div style="text-align: center;"><?php echo $deletecount.$lang_deletedisabled['text_users_are_disabled']?></div>
<?php
}
else
{
?>
<div style="text-align: center;"><?php echo $lang_deletedisabled['text_delete_disabled_note']?></div>
<div style="text-align: center; margin-top: 10px;">
<form method="post" action="?">
<input type="hidden" name="sure" value="1" />
<input type="submit" value="<?php echo $lang_deletedisabled['submit_delete_all_disabled_users']?>" />
</form>
</div>
<?php
}
end_main_frame();
stdfoot();
?>
PHP
1
https://gitee.com/mojie126/HDCN-PT.git
git@gitee.com:mojie126/HDCN-PT.git
mojie126
HDCN-PT
HDCN-PT
master

搜索帮助