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

📄 mawhole.php

📁 FTB安装版 v1.3(虚拟形象)FTB安装版 v1.3(虚拟形象)
💻 PHP
📖 第 1 页 / 共 2 页
字号:
				if (file_exists("{$idpath}forum$forumid/$detail[5].u")) unlink("{$idpath}forum$forumid/$detail[5].u");
//删除该主题的全部附件
$upload_path=opendir("upload/");
while($upload_file=readdir($upload_path)){
if(($upload_file!=".") && ($upload_file!="..") && ($upload_file!="")) $upload_array[]=$upload_file;}
closedir($upload_path);
$upload_count=count($upload_array);
for($k=0;$k<=$upload_count;$k++){
if(ereg("^forum".$forumid."_".$detail[5],$upload_array[$k])) unlink("upload/$upload_array[$k]");}
				break;
			
		}
	}}
	$oldlist=implode("",$oldlist);
	writetofile("{$idpath}forum$forumid/list.php",$oldlist);

	if ($action=="del") {
//----change the information in newforum's last_mo.php
		$temp=explode("|",readfromfile("{$idpath}forum$forumid/last_mo.php"));
		for ($ii=0; $ii<$countq;$ii++){
		$temp[1]--;}
		writetofile("{$idpath}forum$forumid/last_mo.php","$temp[0]|$temp[1]");

//----change the information of the total posts of the bbs
		$temp=explode("|",readfromfile("bbsdata/newuser.php"));
		for ($ii=0; $ii<$countq;$ii++){
		$temp[2]--;}
		writetofile("bbsdata/newuser.php","$temp[0]|$temp[1]|$temp[2]");
	}
	// 删除主题或回复后更新首页最后更新列表
if(!file_exists("{$idpath}forum$forumid")) return;
$oldlist=readfromfile("{$idpath}forum$forumid/list.php");
$oldlist=explode("\n",$oldlist);
for($i=0;$i<count($oldlist);$i++){
$newlist=explode("|",$oldlist[$i]);
if($newlist[10]==0){
if(file_exists("{$idpath}forum$forumid/last_mo.php")){
$filecc=readfromfile("{$idpath}forum$forumid/last_mo.php");
$temp=explode('|',$filecc);
$art_count=$temp[1];}
$tempList=explode(",",$newlist[8]);
$newlist[2]=get_date($tempList[2]).' '.get_time($tempList[2]);
$new_line="$newlist[0],$tempList[1],$newlist[2],$newlist[5],reply|$art_count";
writetofile("{$idpath}forum$forumid/last_mo.php",$new_line);break;}}
//--------------------
if (file_exists("bbsdata/forumevent.php")) 
$forumevent=explode("\n",readfromfile("bbsdata/forumevent.php"));
else $forumevent[0]="";
$newevent="批量删贴|$forumid||$topic_name|$topic_author|无聊的帖子|-$del_rvrc|-$del_ofstar|$timestamp|$username|\n";
$forumevent=implode("\n",$forumevent);
writetofile("bbsdata/forumevent.php",$newevent.$forumevent);
jump_page("thread.php?forumid=$forumid","执行成功",
"管理程式已经成功执行了操作:删除贴子
<ul>
<li><a href='thread.php?forumid=$forumid'>返回版块</a></li><br><br>
<li><a href='index.php'>返回论坛</a></li><br>
</ul><br>");
}
//移动贴子
if ($step && $rvrcdel="rvrcdel" && ( $action=="move" || $action=="copy" )&& file_exists("$idpath/forum$forumid/list.php"))
{
	if (file_exists("$idpath/forum$forumid/list.php")) {
		
 		$filename=explode("|",$filenamervrc);
 		$filecount=count($filename);
 		for ($m=0;$m<$filecount;$m++)
 		{
 		
//------get the line from the original list------
		$fp=fopen("$idpath/forum$forumid/list.php","r");
		flock($fp,LOCK_SH);
		$oldlist=file("$idpath/forum$forumid/list.php");
		fclose($fp);
		$count=count($oldlist);
		for ($i=0; $i<$count; $i++) {
			$detail=explode("|",$oldlist[$i]);
			if ($detail[5]==$filename[$m]) {
			$detail=explode("|",$oldlist[$i]);
			$detail[3]=$forumid.",".$username.",".$timestamp;
			$oldlist[$i]=implode("|",$detail);
				$gotline=$oldlist[$i];
				unset($oldlist[$i]);
				break;
			}
		}

		if ($action=="move") {
		//------Delete from the original list-------
			$oldlist=implode("",$oldlist);
			writetofile("$idpath/forum$forumid/list.php",$oldlist);
		}

//------move the file---------
		$fileinfo=explode("|",$gotline);
		$source="$idpath/forum$forumid/$fileinfo[5]";

		if (file_exists("$idpath/forum$newforumid/list.php")) {
			$newlist=readfromfile("$idpath/forum$newforumid/list.php");
			$desname=get_next_filename($newlist,$newforumid);
		} else {
			$newlist="";
			$desname="f_1";
		}

		copy($source, "$idpath/forum$newforumid/$desname");

		if ($action=="move") unlink($source);
		if (file_exists($source.".sta")) {
			copy($source.".sta", "$idpath/forum$newforumid/$desname.sta");
			if ($action=="move") unlink($source.".sta");
		}
			if (file_exists($source.".u")) {
			copy($source.".u", "$idpath/forum$newforumid/$desname.u");
			if ($action=="move") unlink($source.".u");
		}

//------write to the target LIST-----
		$gotline=str_replace($fileinfo[5],$desname,$gotline);
		$newlist=$gotline.$newlist;
		$newlist=push_heldtopics($newlist);
		writetofile("$idpath/forum$newforumid/list.php",$newlist);

//----change the information in newforum's last_mo.php
		$temp=explode("|",readfromfile("$idpath/forum$newforumid/last_mo.php"));
		$temp[0]="$detail[0],$detail[1],".get_date($timestamp)." ".get_time($timestamp).",$desname";
		$temp[1]++;
		writetofile("$idpath/forum$newforumid/last_mo.php","$temp[0]|$temp[1]");

//----change the information in oldforum's last_mo.php
		$temp=explode("|",readfromfile("$idpath/forum$forumid/last_mo.php"));
		$temp[1]--;
		writetofile("$idpath/forum$forumid/last_mo.php","$temp[0]|$temp[1]");
}
if($action=="move") $actionname="移动贴子";else $actionname="复制贴子";
	jump_page("thread.php?forumid=$forumid","执行成功",
"管理程式已经成功执行了操作:$actionname
<ul>
<li><a href='thread.php?forumid=$forumid'>返回版块</a></li><br><br>
<li><a href='index.php'>返回论坛</a></li><br>
</ul><br>");
	}
}


function print_err() {
global $status;
$title="发生错误";
$content="管理程式发生了错误,情况:<br>
<br>$status<br><ul>
<li><a href='javascript:history.back(1)'>返回前一页</a></li>
</ul>";
msg_box($title,$content);
}
function print_confirm() {
global $forumid,$idpath,$filenamervrc,$article,$list_color1,$list_color2,$action,$titlecolor,$bordercolor,$subcolor,$tablewidth,$idpath,$style_path;
if ($action=="del") $actioname="删除";
elseif ($action=="move") $actioname="移动";
elseif ($action=="copy") $actioname="复制";
$filenamervrc1=explode("|",$filenamervrc);
$count=count($filenamervrc1);
if ($action=="move" || $action=="copy")
{
	
$forumfile="bbsdata/forumdata.php";
if (file_exists($forumfile)) {
	$forumdata=file($forumfile);
	$fcount=count($forumdata);
	$ncount=$count;
}
	$forumonly="";
	for($i=0; $i<$fcount; $i++) {
	  $detail=explode("|",$forumdata[$i]);
	  if ($detail[0]=="category") $forumselect.="<option value=\"$detail[3]\">$detail[1]</option>";
		else{
			if ($detail[4]==0){
				$forumselect.="<option value=\"$detail[3]\">&nbsp;|- $detail[1]</option>";
				$forumonly.="<option value=\"$detail[3]\">$detail[1]</option>";}
			else{
				$forumselect.="<option value=\"$detail[3]\">&nbsp;&nbsp;&nbsp;|- $detail[1]</option>";
				$forumonly.="<option value=\"$detail[3]\">&nbsp;|- $detail[1]</option>";}
		}
	}
} 
$title="你确定要 $actioname 以下贴子吗?(共$count 篇):";
if ($action=="move" || $action=="copy") $content="选择目的版块:<select name=newforumid>".$forumonly."</select><p>";
$content.="管理程式需要您确认这次操作:<br>
<a href='javascript:history.back(1)'>返回前一页</a>(取消此次操作)
<input name=action type=hidden value=$action>
<input name=forumid type=hidden value=$forumid>
<input name=step type=hidden value=2>
<input type=submit name=Submit value=确认并继续 style=\"color: #000000;height:18px; background-color: #f3f3f3; border-style: solid; border-width: 1\" onMouseOver =\"this.style.backgroundColor='#FFC864'\" onMouseOut =\"this.style.backgroundColor='#f3f3f3'\">(将执行此次操作)<br>";


 
print <<<EOT
<form name="form1" method="post" action="mawhole.php?filenamervrc=$filenamervrc">
<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>$title</td>
   </tr>
   <tr bgcolor=FFFFFF> 
    <td>
	<table cellspacing=0 cellpadding=0 width=$tablewidth align=center border=1 bgcolor=$titlecolor bordercolor=$bordercolor>

  <tr align=center height=26>

  <td width=30  bgcolor=$titlecolor>列表</td>
	 

    <td width=* class=title  bgcolor=$titlecolor><b>主&nbsp;&nbsp;题</b> </td>

    

    <td width=85  bgcolor=$titlecolor><b class=title>作 者</b></td>
 <td width=160 bgcolor=$titlecolor><b class=title>发 贴 时 间</b></td>
   

  </tr>

</table>
EOT;
	

for ($ii=0; $ii<$count;$ii++){
	$filename=trim($filenamervrc1[$ii]);
	$articlelist=file("$idpath/forum$forumid/$filename");

list($topic_name,$topic_author,$topic_content,$topic_date,$topic_area)=explode("|",$articlelist[0]);
	$toplang=strlen($topic_content);
	$title_back=$topic_content;
	

$title_back = str_replace("\"","“",$title_back);

$title_back = str_replace("\'","‘",$title_back);
$topic_date=getfulldate($topic_date);



if (strlen($title_back)>=700) $title_back=substr($title_back,0,694)."......";
$topic_name="<a href='read.php?forumid=$forumid&filename=$filename'\" title=\"$title_back\">$topic_name</a>";
$iii=$ii+1;

print <<<EOT
<table cellspacing=0 cellpadding=0 width=$tablewidth align=center border=1 bordercolor=$bordercolor>

<tr align=center height=25 bgcolor=$list_color1>


<td width=30 >$iii</td>	

<td width=* bgcolor=$list_color2 align=left>$icon&nbsp;<acronym title=\"$des\">$topic_name ($toplang 字节)</acronym>$multipage <DIV ALIGN=Right><font color=#FF8BA2> $toplangg </font></div></td>



<td width=85 ><a href=\"profile.php?job=show&target=$topic_author\">$topic_author</a></td>
<td width=160  bgcolor=$titlecolor>$topic_date</td>
</tr>

</table>

EOT;
}
print <<<EOT
	<br><br><center>$content </center></td>
   </tr>
   <tr align=left> 
    <td  bgcolor=$titlecolor>&nbsp;</td>
   </tr>
  </table>
 </td>
 </tr>
</table>
</form>
EOT;


}


⌨️ 快捷键说明

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