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

📄 list.php

📁 仿榕树下文章系统春节版 1. 将makpass.php文件的root_pass修改成你自己的登陆密码,同时修改$user成只有你自己知道的目录名称。 将data目录里的user目录修改成和上面$use
💻 PHP
字号:
<?
require("head.php");
require("config.php");
require("xqfunc.php");
if (!ereg ("^[0-9]{10,20}$",$form) or !isset($form) or !isset($type) or !ereg ("^[a-zA_Z]{1,10}$",$type)) {
  $msg="没有此二级分类";
  $turn_page="index.php";
  head_form();
  error_0($msg,$turn_page);
  exit;
  }
//////////////////格式化输入数据////////////////////////////////////////////
echo "<title>文章管理</title>\n";
echo "<center>\n";
echo "<br><table border=0 bgcolor=\"$main_color\" cellspacing=1 cellpadding=3 width=735>\n";
echo "<tr bgcolor=$main_color>\n";
echo "<td class=shadow2>\n";
echo "<img src=./images/dot.gif>\n";
echo "<a class=shadow2 href=index.php>文章首页</a> \n";
$total_file=0;
$file_sort=file("data/"."xq.php");
$file_count=count($file_sort)-1;
$renzheng=0;
$renzheng2=0;
for ($i=0;$i<=$file_count;$i++) {
        $file_name=explode("|",$file_sort[$i]);
        $total_file=$total_file+$file_name[4];
        if ($file_name[1]==$form) {
        $renzheng=1;
        static $msg;
        for ($j=$i+1;$j<=$file_count;$j++) {
            $file_typename=explode("|",$file_sort[$j]);
            if ($file_typename[0]=="form"){
           break;            }
            if ($file_typename[1]==$type){
            $renzheng2=1;
            $msg.="&nbsp;<img src=./images/dottype1.gif>&nbsp;<b>$file_typename[2]</b>"; }
            else
            $msg.="&nbsp;<img src=./images/dottype.gif>&nbsp;<a class=shadow2 href=list.php?form=$form&type=$file_typename[1]>$file_typename[2]</a>";
            }  }

        if ($file_name[1]==$type)
        {$type_file=$file_name[4];
        $type_name=$file_name[2];
        $type_com=$file_name[3] ;
        }
        if ($file_name[0]=="form")    {
           if ($file_name[1]=="$form")
               echo "<img src=./images/folderall.gif>"."&nbsp;<a class=shadow2 href=listform.php?form=$file_name[1]>$file_name[2]"."</a> \n";
           else
               echo "<img src=./images/dot.gif>"."&nbsp;<a class=shadow2 href=listform.php?form=$file_name[1]>$file_name[2]"."</a> \n";
         }
        if ($file_name[0]=="type")
        $get_type_name=$get_type_name."<option value=$file_name[1]>$file_name[2]</option>\n";
        }

echo "</td>\n";
echo "</tr>\n";
echo "<tr bgcolor=$fuse_color>\n";
echo "<td class=shadow2>\n";
echo  $msg;
echo "</td>\n";
echo "</tr>\n";
echo "</table>\n";
echo "<table border=0  cellspacing=0 cellpadding=3 width=735><tr><td>\n";
echo "&nbsp;>> $type_name - $type_com\n";
echo "</td></tr></table>";
if ($renzheng!=1 or $renzheng2!=1) {
  $msg="没有此一级分类";
  $turn_page="index.php";
  error_0($msg,$turn_page);
  exit;
  }
//////////////////////////////以下为搜索表单////////////////////////////////////
$type_file=chop($type_file);
echo "<table border=0 cellpadding=10 cellspacing=0 style='border-collapse:collapse' bordercolor=#$main_color width=735>\n";
echo "<tr>\n";
echo "<td class=shadow2 width=190 valign=bottom>\n";
echo "<img src=images/list.gif> 文章总数/文章分类:<b><font color=red>$type_file</font>/$total_file</b>";
echo "</td>\n";
echo "</td>\n";
echo "<form method='post' action='search.php'>";
echo "<td align=right valign=bottom>\n";
echo "<img src='./images/search.gif' width=16 heigth=16> ";
echo "标题<input type=checkbox name=title value='1' ";
echo ">\n";
echo "内容<input type=checkbox name=text value='1' ";
echo ">\n";
echo "<input class=border type=text name=keyword size=12 style='color:#000000; background-color:$fuse_color'>\n";
echo "<select size=1 name=searchtype style='color:#000000; border-style:solid; border-width:1; background-color:$fuse_color'>\n";
echo "<option value='all'>-=所有分类=-</option>";
echo $get_type_name;
echo "</select> \n";
echo "<input class=border type=submit value=搜索 name=search style='color: #000000; background-color: $main_color'>\n";
echo "</td>";
echo"</form>";
echo "</tr>\n";
echo "</table>\n";
////////////以下为分页显示文章///////////////////////////////////
echo "<table border=0 cellspacing=0 style='border-collapse:collapse' width=735 height=233 cellpadding=3>\n";
echo "<tr>\n";
echo "<td width=60% height=233 valign=top>\n";
$filelist_array=file("data/$type/list.php");
$total_file=count($filelist_array);
$recnum = $page_list_pg;
$listnum = 10;
$totalnum = intval(($total_file)/$recnum)+1;
echo "<table border=1 cellpadding=3 cellspacing=0 style='border-collapse:collapse' bordercolor=$main_color width=100%>\n";
echo "<tr>\n";
echo "<td width=100% align=right>\n";
page_menu($totalnum);
echo "</td>\n";
echo "</tr>\n";
echo "</table>\n";
///////////////////////////////////////// ///////////////////////////////////
echo "<center><table border=0 bgcolor=\"$fuse_color\" cellspacing=1 cellpadding=1 width=100%>\n";

if ( !$p ) { $p = 1; }
        for( $i = $total_file-(($p-1)*$recnum); $i > $total_file-($p*$recnum);$i--) {
                $filelist_name=explode("|",$filelist_array[$i]);
  if ( "$filelist_name[0]" && "$filelist_name[0]" != '.' && "$filelist_name[0]" != '..') {
  $NO = $i+1;
  $xqfile_array=file("data/$type/$filelist_name[0].num");
  $xqfile_info=explode("|",$xqfile_array[0]);

  $len = strlen($xqfile_info[1]);
  if ($len <= $page_list_code)
    $title = $xqfile_info[1];
  else
    $title =substr($xqfile_info[1],0,$page_list_code)."...";
  echo "<tr><td width=22 height=\"22\"align=center bgcolor=\"$fuse_color\" onmouseover=\"this.bgColor='white';\" onmouseout=\"this.bgColor='$fuse_color';\">";
  echo "$NO</td>";
  echo "<td height=\"22\" bgcolor=\"white\" onmouseover=\"this.bgColor='$fuse_color';\" onmouseout=\"this.bgColor='white';\">";
  echo "</b><a target=_blank href='show.php?type=$type&id=$xqfile_info[0]'><span style=font:9pt>$title</span></a>";
  if (!empty($xqfile_info[5])) {
        $FILE = split("\.", $xqfile_info[5]);
        $FILE_count=count($FILE);
        $ftype = GET_FILE_TYPE($FILE[$FILE_count-1]);
echo ".<a href=\"artdown.php?type=$type&id=$xqfile_info[0]\" target=blank><IMG border=0 SRC='images/file/$ftype'></a>/$xqfile_info[19]\n";
}
  if ($xqfile_info[2]!="")
  echo " - <font color=#c0c0c0>$xqfile_info[2]/文 </font>";
  $xqfile_time=explode(" ",$xqfile_info[6]);
  echo "<font color=#c0c0c0>$xqfile_time[0]</font><br>";
  echo "</td>\n";
echo "</tr>\n";
   }
  }

echo "</table></center>\n";
//////////////////////////////////////////////////////////////////////
echo "<table border=1 cellpadding=3 cellspacing=0 style='border-collapse:collapse' bordercolor=$main_color width=100%>\n";
echo "<tr>\n";
echo "<td width=100% align=right >\n";
page_menu($totalnum);
echo "</td>\n";
echo "</tr>\n";
echo "</table><br>\n";
//////////////////////////////////////////////////////////////////////
echo "<a href=\"usermail.php\" ><img border=0 src=./images/email.gif> 订阅文章 </a>";
echo "<a href=\"userput.php\" ><img border=0 src=./images/mail.gif> 提交文章 </a>";
echo "<a href=\"usersent.php\" ><img border=0 src=./images/top.gif> 注册用户</a>";
echo "<td width=40% valign=top>\n";

////////////////////显示专题//////////////////////////////////////////
echo "<table border=0 bgcolor=$main_color cellspacing=1 cellpadding=1 width=100%>";
echo "<TR><TD valign=top><img src='./images/spe.gif' width=16 heigth=16><A href=\"http://jlqiji.wo.to#\" onclick=\"return toggleMenu('VoteMenu')\"> 本类专题</A>";
echo "<DIV id=VoteMenu><FIELDSET class=fieldset1>";
      $file_spe_sort=file("data/xq.cgi");
       $file_spe_count=count($file_spe_sort)-1;
for ($i=$file_spe_count;$i>=$file_spe_count-$page_list_new+1;$i--)  {
      $file_spe_code=explode("|",$file_spe_sort[$i]);
      if ( "$file_spe_code[0]" && "$file_spe_code[0]" != '.' && "$file_spe_code[0]" != '..' && $file_spe_code[0]==$type){
echo "<img src=./images/spe1.gif>&nbsp;<a class=shadow2 href=listspe.php?form=$form&type=$type&spe=$file_spe_code[1] title='$file_spe_code[3]' target=blank>$file_spe_code[2]</a>";
echo " <font color=#c0c0c0>文章数:$file_spe_code[4]</font><br>";}}
echo "</DIV></TD></TR></table>";
///////////////////推荐文章/////////////////////////////////////////
echo "<br><table border=0 bgcolor=\"$main_color\" cellspacing=1 cellpadding=1 width=100%>\n";
echo "<tr>\n";
echo "<td width=100% bgcolor=$main_color>\n";
echo "<img src='./images/search2.gif' width=16 heigth=16> 推荐文章\n";
echo "</td>\n";
echo "</tr>\n";
$file_new_sort=file("data/$type".".tui");
$file_new_count=count($file_new_sort)-1;
for ($i=$file_new_count;$i>=$file_new_count-$page_list_new+1;$i--) {
        $file_new_name=explode("|",$file_new_sort[$i]);
    if ( "$file_new_name[0]" && "$file_new_name[0]" != '.' && "$file_new_name[0]" != '..') {
  $file_new_array=file("data/$file_new_name[1]/$file_new_name[0].num");
  $file_new_info=explode("|",$file_new_array[0]);
     $len = strlen($file_new_info[1]);
  if ($len <= $new_hot_code)
     $title = $file_new_info[1];
  else
    $title =substr($file_new_info[1],0,$new_hot_code)."...";
echo "<tr><td align=left bgcolor=\"white\" onmouseover=\"this.bgColor='$fuse_color';\" onmouseout=\"this.bgColor='white';\">";
echo "<img src=./images/dot1.gif>&nbsp;<a target=_blank href=show.php?type=$file_new_name[1]&id=$file_new_info[0]>$title</a>\n";
if (empty($file_new_info[2]))
$file_new_info[2]="未知";
echo "<font color=#c0c0c0>文:$file_new_info[2]</font>";
echo "<br>";
echo "</td>\n";
echo "</tr>\n";
 }
}
echo "</table><br>\n";
/////////////////////////////本类最新文章//////////////////////////////////////////////////
echo "<table border=0 bgcolor=\"$main_color\" cellspacing=1 cellpadding=1 width=100%>\n";
echo "<tr>\n";
echo "<td width=100% bgcolor=$main_color>\n";
echo "<img src='./images/search2.gif' width=16 heigth=16> 本类最新文章\n";
echo "</td>\n";
echo "</tr>\n";
$file_new_sort=@file("data/$type".".new");
$file_new_count=count($file_new_sort)-1;
for ($i=$file_new_count;$i>=$file_new_count-$page_list_new+1;$i--) {
        $file_new_name=explode("|",$file_new_sort[$i]);
    if ( "$file_new_name[0]" && "$file_new_name[0]" != '.' && "$file_new_name[0]" != '..') {
  $file_new_array=@file("data/$file_new_name[1]/$file_new_name[0].num");
  $file_new_info=explode("|",$file_new_array[0]);

     $len = strlen($file_new_info[1]);
  if ($len <= $new_hot_code)
     $title = $file_new_info[1];
  else
    $title =substr($file_new_info[1],0,$new_hot_code)."...";
echo "<tr><td align=left bgcolor=\"white\" onmouseover=\"this.bgColor='$fuse_color';\" onmouseout=\"this.bgColor='white';\">";
echo "<img src=./images/dot1.gif>&nbsp;<a target=_blank href=show.php?type=$type&id=$file_new_info[0]>$title</a>\n";
$file_time=explode(" ",$file_new_info[6]);
echo "<font color=#c0c0c0>-$file_time[0]</font>";
echo "<br>";
echo "</td>\n";
echo "</tr>\n";
 }
}
echo "</table>\n";

echo "<br>\n";

/////////////////////本类热门文章/////////////////////////////////////////////////////////
echo "<table border=0 bgcolor=\"$main_color\" cellspacing=1 cellpadding=1 width=100%>\n";
echo "<tr>\n";
echo "<td width=100% bgcolor=$main_color>\n";
echo "<img src='./images/search2.gif' width=16 heigth=16> 本类热门文章\n";
echo "</td>\n";
echo "</tr>\n";
$file_new_sort=@file("data/$type".".hot");
$file_new_count=count($file_new_sort)-1;
for ($i=0;$i<=$page_list_new;$i++) {
        $file_new_name=explode("|",$file_new_sort[$i]);
    if ( "$file_new_name[0]" && "$file_new_name[0]" != '.' && "$file_new_name[0]" != '..') {
  $file_new_array=@file("data/$file_new_name[1]/$file_new_name[0].num");
  $file_new_info=explode("|",$file_new_array[0]);

     $len = strlen($file_new_info[1]);
  if ($len <= $new_hot_code)
     $title = $file_new_info[1];
  else
    $title =substr($file_new_info[1],0,$new_hot_code)."...";
echo "<tr><td align=left bgcolor=\"white\" onmouseover=\"this.bgColor='$fuse_color';\" onmouseout=\"this.bgColor='white';\">";
echo "<img src=./images/dot1.gif>&nbsp;<a target=_blank href=show.php?type=$type&id=$file_new_info[0]>$title</a>\n";
echo "<font color=#c0c0c0>阅:</font><font color=red>$file_new_info[16]/$file_new_info[17]</font>";
echo " <font color=#c0c0c0>评:$file_new_info[18]</font>";
echo "<br>";
echo "</td>\n";
echo "</tr>\n";
 }
}
echo "</table>\n";
//////////////////////////////////////////////////////////////////
echo "</td>\n";
echo "</tr>\n";
echo "</table>\n";
echo "<hr width=735 color=$biankuang_color>";
require("foot.php");
?>

⌨️ 快捷键说明

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