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

📄 inc_typeunit_admin.php

📁 强大的PHP内容管理系统尽量不要让站长把时间都花费在为您修正说明上。压缩包解压
💻 PHP
📖 第 1 页 / 共 2 页
字号:
				 echo "</td><td width='10%'><label>";
				 echo "<input name='sortrank{$ID}' type='text' id='sortrank{$ID}' value='{$rank}' size='2' maxlength='4' style='text-align:center;' />";
				 echo "</label></td></tr>";
			     echo "</table>\r\n <div id='suns".$ID."'>";
			      }
				  //带封面的频道
				  else if($ispart==1)
	          {
				 echo "<table width='96%' border='0' cellpadding='1' cellspacing='0' align='center' style='margin:0px auto' class='tblist2'>\r\n";
				 echo "<tr align='center'>";
				 echo "<td width='7%'></td>";
				 echo "<td width='6%'>[ID:".$ID."]</td>";
				 echo "<td width='27%' align='left'><img style='cursor:hand' onClick=\"LoadSuns('suns".$ID."',$ID);\" src='images/class_sopen.gif' width='11' height='15' border='0' align='absmiddle' />  <a href='catalog_do.php?cid=".$ID."&dopost=listArchives' style='font-size:14px; text-decoration:none;'>{$nss}".$typeName."</a></td>";
				 echo "<td width='10%'>(文档:".$this->GetTotalArc($ID).")</td>";
				 echo "<td width='10%'>$channeltype</td>\r\n";
				 echo "<td width='34%' align='right' style='letter-spacing:1px;'>";
				 echo "</td><td width='10%'><label>";
				 echo "<input name='sortrank{$ID}' type='text' id='sortrank{$ID}' value='{$rank}' size='2' maxlength='4' style='text-align:center;' />";
				 echo "</label></td></tr>";
			     echo "</table>\r\n <div id='suns".$ID."'>";
			     }
				 //独立页面
				 else if($ispart==2)
				 {
				 echo "<table width='96%' border='0' cellpadding='1' cellspacing='0' align='center' style='margin:0px auto' class='tblist2'>\r\n";
				 echo "<tr align='center'>";
				 echo "<td width='7%'></td>";
				 echo "<td width='6%'>[ID:".$ID."]</td>";
				 echo "<td width='27%' align='left'><img style='cursor:hand' onClick=\"LoadSuns('suns".$ID."',$ID);\" src='images/class_sopen.gif' width='11' height='15' border='0' align='absmiddle' />  <a href='catalog_do.php?cid=".$ID."&dopost=listArchives' style='font-size:14px; text-decoration:none;'>{$nss}".$typeName."</a></td>";
				 echo "<td width='10%'>(文档:".$this->GetTotalArc($ID).")</td>";
				 echo "<td width='10%'>独立页</td>\r\n";
				 echo "<td width='34%' align='right' style='letter-spacing:1px;'>";
				 echo "</td><td width='10%'><label>";
				 echo "<input name='sortrank{$ID}' type='text' id='textfield2' value='{$rank}' size='2' maxlength='4' style='text-align:center;' />";
				 echo "</label></td></tr>";
			     echo "</table>\r\n <div id='suns".$ID."'>";
			     }
			     $this->LogicListAllSunType($ID," ",true);
			  }
		  }
			echo "</div>\r\n";
		}
	}
	//获得子类目的递归调用
	function LogicListAllSunType($ID,$step,$needcheck=true)
	{
		$fid = $ID;
		$this->dsql->SetQuery("Select ID,reID,typedir,typename,ispart,sortrank,ishidden,channeltype From #@__arctype where reID='".$ID."' order by sortrank");
		$this->dsql->Execute('s'.$fid);
		while($row=$this->dsql->GetObject('s'.$fid))
		{
			  $typeDir = $row->typedir;
			  $typeName = $row->typename;
			  $reID = $row->reID;
			  $ID = $row->ID;
			  $ispart = $row->ispart;
			  $channeltype = $row->channeltype;
			  if($step=="  ") $stepdd = 2;
			  else $stepdd = 3;
			  $rank = $row->sortrank;
			  if($row->ishidden=='1') $nss = "<font color='red'>[隐]</font>";
			  else  $nss = "";
			  //有权限栏目
			  if(in_array($ID,$this->aChannels) || $needcheck===false || $this->isAdminAll===true)
			  {
			  	 //互动栏目
			   if($channeltype<-1)
			    {
				 echo "<table width='96%' border='0' cellspacing='1' cellpadding='0' align='center' style='margin:0px auto' class='tblist2'>\r\n";
				 echo "<tr align='center' class='trlbg' oncontextmenu=\"CommonMenuWd(this,$ID,'".urlencode($typeName)."')\">\r\n";
				 echo "<td width='7%'><input class='np' type='checkbox' name='tids[]' value='{$ID}'></td>";
				 echo "<td width='6%'>[ID:".$ID."]</td>";
				 echo "<td width='27%' align='left'>$step   ├  <a href='catalog_do.php?cid=".$ID."&dopost=listArchives' style='font-size:14px; text-decoration:none;'>{$nss}".$typeName."</a><font color='red'>[互]</font> </td>";
				 echo "<td width='10%'>(文档:".$this->GetTotalArc($ID).")</td>";
				 echo "<td width='8%'>$channeltype</td>\r\n";
				 echo "<td width='34%' align='right' style='letter-spacing:1px;'>";
				 echo "<a href='{$GLOBALS['cfg_plus_dir']}/list.php?tid={$ID}' target='_blank'>预览</a> ";
				 echo "| <a href='catalog_do.php?cid={$ID}&dopost=listArchives'>列出</a> ";
				 echo "| <a href='catalog_add.php?ID={$ID}'>添加</a> ";
				 echo "| <a href='catalog_edit.php?ID={$ID}'>修改</a> ";
				 echo "| <a href='catalog_move.php?job=movelist&typeid={$ID}'>移动</a> ";
				 echo "| <a href='catalog_del.php?ID={$ID}&typeoldname=".urlencode($typeName)."'>删除</a> ";
				 echo "</td><td width='8%'><label>";
				 echo "<input name='sortrank{$ID}' type='text' id='textfield2' value='{$rank}' size='2' maxlength='4' style='text-align:center;' />";
				 echo "</label></td></tr>";
				 echo "    </table>\r\n";
			    }
			    //普通列表
			    else if($ispart==0)
			    {
				 echo "<table width='96%' border='0' cellspacing='1' cellpadding='0' align='center' style='margin:0px auto' class='tblist2'>\r\n";
				 echo "<tr align='center' class='trlbg'  oncontextmenu=\"CommonMenu(this,$ID,'".urlencode($typeName)."')\">\r\n";
				 echo "<td width='7%'><input class='np' type='checkbox' name='tids[]' value='{$ID}'></td>";
				 echo "<td width='6%'>[ID:".$ID."]</td>";
				 echo "<td width='27%' align='left'>$step   ├  <a href='catalog_do.php?cid=".$ID."&dopost=listArchives' style='font-size:14px; text-decoration:none;'>{$nss}".$typeName."</a> </td>";
				 echo "<td width='10%'>(文档:".$this->GetTotalArc($ID).")</td>";
				 echo "<td width='8%'>$channeltype</td>\r\n";
				 echo "<td width='34%' align='right' style='letter-spacing:1px;'>";
				 echo "<a href='{$GLOBALS['cfg_plus_dir']}/list.php?tid={$ID}' target='_blank'>预览</a> ";
				 echo "| <a href='catalog_do.php?cid={$ID}&dopost=listArchives'>内容</a> ";
				 echo "| <a href='catalog_add.php?ID={$ID}'>添加</a> ";
				 echo "| <a href='catalog_edit.php?ID={$ID}'>修改</a> ";
				 echo "| <a href='catalog_move.php?job=movelist&typeid={$ID}'>移动</a> ";
				 echo "| <a href='catalog_del.php?ID={$ID}&typeoldname=".urlencode($typeName)."'>删除</a> ";
				 echo "</td><td width='8%'><label>";
				 echo "<input name='sortrank{$ID}' type='text' id='textfield2' value='{$rank}' size='2' maxlength='4' style='text-align:center;' />";
				 echo "</label></td></tr>";
				 echo "    </table>\r\n";

			    }
			    //封面频道
			    else if($ispart==1)
			    {
				 echo "<table width='96%' border='0' cellspacing='1' cellpadding='0' align='center' style='margin:0px auto' class='tblist2'>\r\n";
				 echo "<tr align='center' class='trlbg' oncontextmenu=\"CommonMenuPart(this,$ID,'".urlencode($typeName)."')\">\r\n";
				 echo "<td width='7%'><input class='np' type='checkbox' name='tids[]' value='{$ID}'></td>";
				 echo "<td width='6%'>[ID:".$ID."]</td>";
				 echo "<td width='27%' align='left'>$step   ├  <a href='catalog_do.php?cid=".$ID."&dopost=listArchives' style='font-size:14px; text-decoration:none;'>{$nss}".$typeName."</a><font color='red'>[封面]</font></td>";
				 echo "<td width='10%'>(文档:".$this->GetTotalArc($ID).")</td>";
				 echo "<td width='8%'>$channeltype</td>\r\n";
				 echo "<td width='34%' align='right' style='letter-spacing:1px;'>";
				 echo "<a href='{$GLOBALS['cfg_plus_dir']}/list.php?tid={$ID}' target='_blank'>预览</a> ";
				 echo "| <a href='catalog_do.php?cid={$ID}&dopost=listArchives'>列出</a> ";
				 echo "| <a href='catalog_add.php?ID={$ID}'>添加</a> ";
				 echo "| <a href='catalog_edit.php?ID={$ID}'>修改</a> ";
				 echo "| <a href='catalog_move.php?job=movelist&typeid={$ID}'>移动</a> ";
				 echo "| <a href='catalog_del.php?ID={$ID}&typeoldname=".urlencode($typeName)."'>删除</a> ";
				 echo "</td><td width='8%'><label>";
				 echo "<input name='sortrank{$ID}' type='text' id='textfield2' value='{$rank}' size='2' maxlength='4' style='text-align:center;' />";
				 echo "</label></td></tr>";
				 echo "    </table>\r\n";
			    }
			    //独立页面
			    else if($ispart==2)
			    {
				 echo "<table width='96%' border='0' cellspacing='1' cellpadding='0' align='center' style='margin:0px auto' class='tblist2'>\r\n";
				 echo "<tr align='center' class='trlbg' oncontextmenu=\"SingleMenu(this,$ID,'".urlencode($typeName)."')\">\r\n";
				 echo "<td width='7%'><input class='np' type='checkbox' name='tids[]' value='{$ID}'></td>";
				 echo "<td width='6%'>[ID:".$ID."]</td>";
				 echo "<td width='27%' align='left'>$step   ├  <a href='catalog_do.php?cid=".$ID."&dopost=listArchives' style='font-size:14px; text-decoration:none;'>{$nss}".$typeName."</a><font color='red'>[封面]</font></td>";
				 echo "<td width='10%'>(文档:".$this->GetTotalArc($ID).")</td>";
				 echo "<td width='8%'>独立页</td>\r\n";
				 echo "<td width='34%' align='right' style='letter-spacing:1px;'>";
				 echo "<a href='{$GLOBALS['cfg_plus_dir']}/list.php?tid={$ID}' target='_blank'>预览</a> ";
				 echo "| <a href='catalog_do.php?cid={$ID}&dopost=listArchives'>内容</a> ";
				 echo "| <a href='catalog_add.php?ID={$ID}'>添加</a> ";
				 echo "| <a href='catalog_edit.php?ID={$ID}'>修改</a> ";
				 echo "| <a href='catalog_move.php?job=movelist&typeid={$ID}'>移动</a> ";
				 echo "| <a href='catalog_del.php?ID={$ID}&typeoldname=".urlencode($typeName)."'>删除</a> ";
				 echo "</td><td width='8%'><label>";
				 echo "<input name='sortrank{$ID}' type='text' id='textfield2' value='{$rank}' size='2' maxlength='4' style='text-align:center;' />";
				 echo "</label></td></tr>";
			     echo "    </table>\r\n";
				}
				//跳转网址
			    else if($ispart==3)
			    {
				 echo "<table width='96%' border='0' cellspacing='1' cellpadding='0' align='center' style='margin:0px auto' class='tblist2'>\r\n";
				 echo "<tr align='center' class='trlbg'>\r\n";
				 echo "<td width='7%'><input class='np' type='checkbox' name='tids[]' value='{$ID}'></td>";
				 echo "<td width='6%'>[ID:".$ID."]</td>";
				 echo "<td width='27%' align='left'>$step   ├  <a href='{$GLOBALS['cfg_plus_dir']}/list.php?tid={$ID}' target='_blank' style='font-size:14px; text-decoration:none;'>{$nss}".$typeName."</a><font color='red'>[跳转]</font></td>";
				 echo "<td width='10%'>(文档:0)</td>";
				 echo "<td width='8%'>跳转</td>\r\n";
				 echo "<td width='34%' align='right' style='letter-spacing:1px;'>";
				 echo "<a href='{$GLOBALS['cfg_plus_dir']}/list.php?tid={$ID}' target='_blank'>预览</a> ";
				 echo "| <a href='catalog_edit.php?ID={$ID}'>修改</a> ";
				 echo "| <a href='catalog_del.php?ID={$ID}&typeoldname=".urlencode($typeName)."'>删除</a> ";
				 echo "</td><td width='8%'><label>";
				 echo "<input name='sortrank{$ID}' type='text' id='textfield2' value='{$rank}' size='2' maxlength='4' style='text-align:center;' />";
				 echo "</label></td></tr>";
			     echo "    </table>\r\n";
				}
			  $this->LogicListAllSunType($ID,$step." ",false);
		  }//if 有权限
		}//End while
	}
	//------------------------------------------------------
	//-----返回与某个目相关的下级目录的类目ID列表(删类目或文章时调用)
	//------------------------------------------------------
	function GetSunTypes($ID,$channel=0)
	{
		$this->idArray[$this->idCounter]=$ID;
		$this->idCounter++;
		$fid = $ID;
	  if($channel!=0) $csql = " And channeltype=$channel ";
	  else $csql = "";
		$this->dsql->SetQuery("Select ID From #@__arctype where reID=$ID $csql");
		$this->dsql->Execute("gs".$fid);
		while($row=$this->dsql->GetObject("gs".$fid)){
			$nid = $row->ID;
			$this->GetSunTypes($nid,$channel);
		}
		return $this->idArray;
	}
	//----------------------------------------------------------------------------
	//获得某ID的下级ID(包括本身)的SQL语句“($tb.typeid=id1 or $tb.typeid=id2...)”
	//----------------------------------------------------------------------------
	function GetSunID($ID,$tb="#@__archives",$channel=0)
	{
		$this->sunID = "";
		$this->idCounter = 0;
		$this->idArray = "";
		$this->GetSunTypes($ID,$channel);
		$this->dsql->Close();
		$this->dsql = 0;
		$rquery = "";
		for($i=0;$i<$this->idCounter;$i++)
		{
			if($i!=0) $rquery .= " Or ".$tb.".typeid='".$this->idArray[$i]."' ";
			else      $rquery .= "    ".$tb.".typeid='".$this->idArray[$i]."' ";
		}
		reset($this->idArray);
		$this->idCounter = 0;
		return " (".$rquery.") ";
	}
	//----------------------------------------
	//删类目
	//----------------------------------------
	function DelType($ID,$isDelFile,$delson=true)
	{
		$this->idCounter = 0;
		$this->idArray = "";
		if($delson){
		   $this->GetSunTypes($ID);
	  }else{
	  	$this->idArray = array();
	  	$this->idArray[] = $ID;
	  }
		//删数据库里的相关记录
		foreach($this->idArray as $id)
		{
			$myrow = $this->dsql->GetOne("Select c.maintable,c.addtable From #@__arctype t left join #@__channeltype c  on c.ID=t.channeltype where t.ID='$id'",MYSQL_ASSOC);
		  if($myrow['maintable']=='') $myrow['maintable'] = '#@__archives';
		  //删数据库信息
		  $this->dsql->ExecuteNoneQuery("Delete From `{$myrow['maintable']}` where typeid='$id'");
		  if($myrow['addtable']!="") $this->dsql->ExecuteNoneQuery("Delete From `{$myrow['addtable']}` where typeid='$id'");
			$this->dsql->ExecuteNoneQuery("update `{$myrow['maintable']}` set typeid2=0 where typeid2='$id'");
			$this->dsql->ExecuteNoneQuery("Delete From `#@__spec` where typeid='$id'");
			$this->dsql->ExecuteNoneQuery("Delete From `#@__feedback` where typeid='$id'");
		  $this->dsql->ExecuteNoneQuery("Delete From `#@__arctype` where ID='$id'");
		  $this->dsql->ExecuteNoneQuery("Delete From `#@__full_search` where typeid='$id'");
		}
		@reset($this->idArray);
		$this->idCounter = 0;
		return true;
	}
	//---------------------------
	//---- 删指定目录的所有文件
	//---------------------------
	function RmDirFile($indir)
	{
   		if(!file_exists($indir)) return;
   		$dh = dir($indir);
   		while($file = $dh->read()) {
      	if($file == "." || $file == "..") continue;
      	else if(is_file("$indir/$file")) @unlink("$indir/$file");
     	 	else{
         		$this->RmDirFile("$indir/$file");
      	}
      	if(is_dir("$indir/$file")){
         	@rmdir("$indir/$file");
      	}
   		}
   		$dh->close();
   		return(1);
	}
}
?>

⌨️ 快捷键说明

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