⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 badman.php

📁 FTB安装版 v1.3(虚拟形象)FTB安装版 v1.3(虚拟形象)
💻 PHP
字号:
<?
require("global.php");
require("userdata/style.php");
require("header.php");echo"$headertp";
$check_user=0;
if ($login_status==1 && $username==$manager) $check_user=1;

if (file_exists("bbsdata/superadmin.php")) {
		include("bbsdata/superadmin.php");
		if ($login_status==1 && $superadmin && in_array($username,$superadmin)) {
	    $check_user=1;	}
	}
if(empty($job)){
if ($login_status==1 && $check_user==0 && file_exists("bbsdata/admin.php")) {
$adminlist=file("bbsdata/admin.php");
$admincount=count($adminlist);
for ($i=0; $i<$admincount; $i++) {
$detail=explode("|", str_replace("\n","", $adminlist[$i]));
if ($detail[0]==$forumid && $detail[1]==$username) $check_user=1;
}
}

get_father_info();
if ($exists_forum_father==1) {
if (file_exists("bbsdata/admin.php")) {
	$adminlist=file("bbsdata/admin.php");
	$count=count($adminlist);
	for ($i=0; $i<$count; $i++) {
		$detail=explode("|", trim($adminlist[$i]));
		$admin_list[]=$detail[1];
		if ($detail[0]==$father_id && $username==$detail[1]) $check_user=1;
	}
}
}

if ($check_user==0) {
$status="您没有权利进行操作,请您以合适的身份登录(管理员,斑竹)";
headguide("您正处在<br>{$bbs_title} <br>警察局---抓犯人程式",
"<a href=\"thread.php?forumid=$forumid\">$forum_name</a>",
"抓犯人程式","no");
print_err($status);
exit;
}

function print_err($status) {
global $forumid;
$title="发生错误";
$content="管理程序发生了错误,情况:<br>
<br>$status<br><ul>
<li><a href=badman.php?forumid=$forumid>返回</a></li>
</ul>";
msg_box($title,$content);
}

if ($action=="add") {
if ($adduser=="") $error1="用户名没有填写<br>";
if ($badate<1 || $badate>100) $error1.="关闭日期天数有错<br>";
if ($badrvrc<0 || $badrvrc>50) $error1.="扣除威望不在范围之内<br>";
if ($badmoney<0 || $badmoney>300) $error1.="扣除金钱不在范围之内<br>";
if (!file_exists("$userpath/$adduser.php")) $error1.="找不到指定用户<br>";
if ($error1!="")
 {
print_err($error1);require("footer.php");echo"$footertp";exit;
}
$badmanfile ="userdata/badman/".$forumid.".php";
if (file_exists($badmanfile)) {
$badman=explode("\n",readfromfile($badmanfile));
$i=count($badman);
$badman[$i]=$adduser."|".time()."|".$badate."|".$badrvrc."|".$badmoney."|".$username."|".$badreson;
writetofile($badmanfile,implode("\n",$badman));
}else {
$badman=$adduser."|".time()."|".$badate."|".$badrvrc."|".$badmoney."|".$username."|".$badreson;
writetofile($badmanfile,$badman);
}

$useri=get_user_info($adduser);
$useri[16]=$useri[16]-$badrvrc*10;
$useri[24]=$useri[24]-$badmoney;
$uu=implode('|',$useri);
writetofile("$userpath/$adduser.php",$uu);

headguide("您正处在<br>{$bbs_title}<br>警察局---抓犯人程式",
"<a href=\"thread.php?forumid=$forumid\">$forum_name</a>",
"抓犯人程式","no");
print <<<EOT
<table width=$tablewidth border=0 cellspacing=0 cellpadding=0 align=center bgcolor=$bordercolor>
 <tr>
 <td>
  <table width=100% border=0 cellspacing=1 cellpadding=3>
   <tr> 
    <td class=title  bgcolor=$titlecolor>欢迎来到警察局 / 抓犯人程式</td>
   </tr>
		<td bgcolor=$article_color1 valign=middle colspan=2>
		<font color=#333333><center><b>所有的信息已经保存</b></center><br><br>
		<b>犯人处罚信息</b><br><br>
		$tab_top
		<b>犯人:$adduser
		<br>处罚:入狱 $badate 天;剥夺威望 $badrvrc 点;罚款 $badmoney $money_title
		<br>原因:$badreson </b><br>
		$tab_bottom
		<br><br><center><a href="badman.php?forumid=$forumid">继续抓犯人</a>   <a href="thread.php?forumid=$forumid">返回版块</a></center>
		</td></tr></td>
   </tr>
  </table>
 </td>
 </tr>
</table>
EOT;
require("footer.php");echo"$footertp";
	exit;
}
elseif ($action=="del")
{
$badmanfile ="userdata/badman/".$forumid.".php";
if (file_exists($badmanfile)) {
$badman=explode("\n",readfromfile($badmanfile));
}

$c=count($badman);
for ($i=0;$i<$c;$i++)
{
$baduser=explode("|",$badman[$i]);
      $surdate=intval(($timestamp-$baduser[1])/86400);
        $surdate=$baduser[2]-$surdate;
if ($surdate< 0) unset($badman[$i]);
}
unset($badman[$select]);
writetofile($badmanfile,implode("\n",$badman));
if($badman[1]==""&&$select==0) unlink($badmanfile);

headguide("您正处在<br>{$bbs_title}<br>警察局---抓犯人程式",
"<a href=\"thread.php?forumid=$forumid\">$forum_name</a>",
"抓犯人程式","no");
print <<<EOT
<table width=$tablewidth border=0 cellspacing=0 cellpadding=0 align=center bgcolor=$bordercolor>
 <tr>
 <td>
  <table width=100% border=0 cellspacing=1 cellpadding=3>
   <tr> 
    <td class=title bgcolor=$titlecolor>欢迎来到警察局 / 抓犯人程式</td>
   </tr><tr>
<td bgcolor=$article_color2 valign=middle colspan=2>
<font color=#333333><center><b>所有的信息已经保存</b></center><br><br>
<center><a href="badman.php?forumid=$forumid">释放更多的犯人</a>   <a href="thread.php?forumid=$forumid">返回版块</a></center>
</td></tr>
  </table>
 </td>
 </tr>
</table>
EOT;
require("footer.php");echo"$footertp";
exit;
}

headguide("您正处在<br>{$bbs_title}<br>警察局---抓犯人程式",
"<a href=\"thread.php?forumid=$forumid\">$forum_name</a>",
"抓犯人程式","no");
 

?>


<table width=<?=$tablewidth?> border=0 cellspacing=0 cellpadding=0 align=center bgcolor=<?=$bordercolor?>>
 <tr>
 <td>
  <table width=100% border=0 cellspacing=1 cellpadding=3>
   <tr bgcolor=$titlecolor>
    <td bgColor=<?=$titlecolor?>><font color=#000000>
<b>警察局---抓犯人程式</b></td>
   </tr>
<tr>
<td bgcolor=<?=$article_color1?> valign=middle colspan=2>
<form name="form1" method="post" action="badman.php?forumid=<?=$forumid?>">
<input type=hidden name="action" value="add">
 <input type=hidden name="forumid" value=<?=$forumid?>>
<font color=#000000>
<b>输入犯人及处罚信息,不要滥用职权哦~</b><br><br>
<?=$tab_top?>
用户名:<input name="adduser" type="text" id="adduser" size="10">
关押原因:<input name="badreson" type="text" id="badreson" size="20" maxlength="100">
被关天数:<input name="badate" type="text" id="badate" size="3" maxlength="3" value=3>
扣除威望值:<input name="badrvrc" type="text" id="badrvrc" size="3" maxlength="3" value=1>
扣除金钱值:<input name="badmoney" type="text" id="badmoney" size="3" maxlength="4" value=10>
<input type="submit" name="Submit" value="提交">
 </form>
<?=$tab_bottom?>
</font></td>
</tr>
<tr>
<td bgcolor=<?=$article_color2?> valign=middle colspan=2><b>犯人列表:</b><br><br><center>
<?
$badmanfile ="userdata/badman/".$forumid.".php";
if(file_exists($badmanfile)) {
$badman=explode("\n",readfromfile($badmanfile));
$c=count($badman);
?>
<form name="form2" method="post" action="badman.php?forumid=<?=$forumid?>">
<input type=hidden name="action" value="del">
 <input type=hidden name="forumid" value=<?=$forumid?>>
      <select name="select" size=<?=$c;?> multiple>
<? for($i=0;$i<$c;$i++){
      $baduser=explode("|",$badman[$i]);
       $surdate=intval(($timestamp-$baduser[1])/86400);
        $surdate=$baduser[2]-$surdate;
      ?>
      <option value=<?=$i?>><?=$baduser[0]?>于<?=date("Y-m-d",$baduser[1])?>被<?=$baduser[5]?>关了<?=$baduser[2]?>天,扣掉威望值<?=$baduser[3]?>点,金钱<?=$baduser[4]?><?=$money_title?>.原因:<?=$baduser[6]?></option>
<?}?>
    </select>
    <input name="badel" type="submit" id="badel" value="释放出狱">
  </p>
  </form>
<?
}
else
{
?>
本版暂时没有关押任何犯人。
<?
}
?>
<br>
</td>
   </tr>
  </table>
 </td>
 </tr>
</table>

<?
 require("footer.php");echo"$footertp";
exit;
}
if($job==supmg){
if ($check_user==0) {
$status="您没有权利进行操作,请您以合适的身份登录(管理员,斑竹)";
headguide("您正处在<br>{$bbs_title} <br>警察局---抓犯人程式",
"<a href=\"smanager.php\">总版主管理</a></a>",
"抓犯人程式","no");
print_err($status);
exit;
}

function print_err($status) {
$title="发生错误";
$content="管理程序发生了错误,情况:<br>
<br>$status<br><ul>
<li><a href=\"smanager.php\">返回</a></li>
</ul>";
msg_box($title,$content);
}

if ($action=="add") {
if ($adduser=="") $error1="用户名没有填写<br>";
if ($badate<1 || $badate>100) $error1.="关闭日期天数有错<br>";
if ($badrvrc<0 || $badrvrc>50) $error1.="扣除威望不在范围之内<br>";
if ($badmoney<0 || $badmoney>300) $error1.="扣除金钱不在范围之内<br>";
if (!file_exists("$userpath/$adduser.php")) $error1.="找不到指定用户<br>";
if ($error1!="")
 {
print_err($error1);require("footer.php");echo"$footertp";exit;
}
$badmanfile ="userdata/badman/system.php";
if (file_exists($badmanfile)) {
$badman=explode("\n",readfromfile($badmanfile));
$i=count($badman);
$badman[$i]=$adduser."|".time()."|".$badate."|".$badrvrc."|".$badmoney."|".$username."|".$badreson;
writetofile($badmanfile,implode("\n",$badman));
}else {
$badman=$adduser."|".time()."|".$badate."|".$badrvrc."|".$badmoney."|".$username."|".$badreson;
writetofile($badmanfile,$badman);
}

$useri=get_user_info($adduser);
$useri[16]=$useri[16]-$badrvrc*10;
$useri[24]=$useri[24]-$badmoney;
$uu=implode('|',$useri);
writetofile("$userpath/$adduser.php",$uu);

headguide("您正处在<br>{$bbs_title}<br>警察局---抓犯人程式",
"<a href=\"smanager.php\">总版主管理</a>",
"抓犯人程式","no");
print <<<EOT
<table width=$tablewidth border=0 cellspacing=0 cellpadding=0 align=center bgcolor=$bordercolor>
 <tr>
 <td>
  <table width=100% border=0 cellspacing=1 cellpadding=3>
   <tr> 
    <td class=title bgcolor=$titlecolor>欢迎来到警察局 / 抓犯人程式</td>
   </tr>
    <td bgcolor=$article_color1 valign=middle colspan=2>
    <font color=#333333><center><b>所有的信息已经保存</b></center><br><br>
    <b>犯人处罚信息</b><br><br>
    $tab_top
    <b>犯人:$adduser
    <br>处罚:入狱 $badate 天;剥夺威望 $badrvrc 点;罚款 $badmoney $money_title
    <br>原因:$badreson </b><br>
    $tab_bottom
    <br><br><center><a href="badman.php?job=supmg">继续抓犯人</a>   <a href="smanager.php">返回管理</a></center>
    </td></tr></td>
   </tr>
  </table>
 </td>
 </tr>
</table>
EOT;
require("footer.php");echo"$footertp";
  exit;
}
elseif ($action=="del")
{
$badmanfile ="userdata/badman/system.php";
if (file_exists($badmanfile)) {
$badman=explode("\n",readfromfile($badmanfile));
}

$c=count($badman);
for ($i=0;$i<$c;$i++)
{
$baduser=explode("|",$badman[$i]);
      $surdate=intval(($timestamp-$baduser[1])/86400);
        $surdate=$baduser[2]-$surdate;
if ($surdate< 0) unset($badman[$i]);
}
unset($badman[$select]);
$ofstarbad=implode("\n",$badman);
writetofile($badmanfile,$ofstarbad);
if($badman[1]==""&&$select==0) unlink($badmanfile);

headguide("您正处在<br>{$bbs_title}<br>警察局---抓犯人程式",
"<a href=\"smanager.php\">总版主管理</a>",
"抓犯人程式","no");
print <<<EOT
<table width=$tablewidth border=0 cellspacing=0 cellpadding=0 align=center bgcolor=$bordercolor>
 <tr>
 <td>
  <table width=100% border=0 cellspacing=1 cellpadding=3>
   <tr> 
    <td class=title bgcolor=$titlecolor>欢迎来到警察局 / 抓犯人程式</td>
   </tr><tr>
<td bgcolor=$article_color2 valign=middle colspan=2>
<font color=#333333><center><b>所有的信息已经保存</b></center><br><br>
<center><a href="badman.php?job=supmg">释放更多的犯人</a>   <a href="smanager.php">返回管理</a></center>
</td></tr>
  </table>
 </td>
 </tr>
</table>
EOT;
require("footer.php");echo"$footertp";
exit;
}

headguide("您正处在<br>{$bbs_title}<br>警察局---抓犯人程式",
"<a href=\"smanager.php\">总版主管理</a>",
"抓犯人程式","no");

?>


<table width=<?=$tablewidth?> border=0 cellspacing=0 cellpadding=0 align=center bgcolor=<?=$bordercolor?>>
 <tr>
 <td>
  <table width=100% border=0 cellspacing=1 cellpadding=3>
   <tr>
    <td bgColor=<?=$titlecolor?>><font color=#000000>
<b>警察局---抓犯人程式</b></td>
   </tr>
<tr>
<td bgcolor=<?=$article_color1?> valign=middle colspan=2>
<form name="form1" method="post" action="badman.php?job=supmg">
<input type=hidden name="action" value="add">
<font color=#000000>
<b>输入犯人及处罚信息,不要滥用职权哦~</b><br><br>
<?=$tab_top?>
用户名:<input name="adduser" type="text" id="adduser" size="10">
关押原因:<input name="badreson" type="text" id="badreson" size="20" maxlength="100">
被关天数:<input name="badate" type="text" id="badate" size="3" maxlength="3" value=3>
扣除威望值:<input name="badrvrc" type="text" id="badrvrc" size="3" maxlength="3" value=1>
扣除金钱值:<input name="badmoney" type="text" id="badmoney" size="3" maxlength="4" value=10>
<input type="submit" name="Submit" value="提交">
 </form>
<?=$tab_bottom?>
</font></td>
</tr>
<tr>
<td bgcolor=<?=$article_color2?> valign=middle colspan=2><b>犯人列表:</b><br><br><center>
<?
$badmanfile ="userdata/badman/system.php";
if(file_exists($badmanfile)) {
$badman=explode("\n",readfromfile($badmanfile));
$c=count($badman);
?>
<form name="form2" method="post" action="badman.php?job=supmg">
<input type=hidden name="action" value="del">
      <select name="select" size=<?=$c;?> multiple>
<? for($i=0;$i<$c;$i++){
      $baduser=explode("|",$badman[$i]);
       $surdate=intval(($timestamp-$baduser[1])/86400);
        $surdate=$baduser[2]-$surdate;
      ?>
      <option value=<?=$i?>><?=$baduser[0]?>于<?=date("Y-m-d",$baduser[1])?>被<?=$baduser[5]?>关了<?=$baduser[2]?>天,扣掉威望值<?=$baduser[3]?>点,金钱<?=$baduser[4]?><?=$money_title?>.原因:<?=$baduser[6]?></option>
<?}?>
    </select>
    <input name="badel" type="submit" id="badel" value="释放出狱">
  </p>
  </form>
<?
}
else
{
?>
本论坛暂时没有关押任何犯人。
<?
}
?>
<br>
</td>
   </tr>
  </table>
 </td>
 </tr>
</table>

<?
 require("footer.php");echo"$footertp";
exit;
}?>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -