listspe.php

来自「仿榕树下文章系统春节版 1. 将makpass.php文件的root_pass修」· PHP 代码 · 共 257 行

PHP
257
字号
<?require("head.php");require("config.php");require("xqfunc.php");//////////////////格式化输入数据////////////////////////////////////////////if (!ereg ("^[a-zA-Z]{1,20}$",$spe) or !isset($spe) or !isset($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";$file_spe_sort=file("data/xq.cgi");$file_spe_count=count($file_spe_sort)-1;$file_sort=file("data/"."xq.php");$file_count=count($file_sort)-1;$total_file=0;$yz=0;$yz1=0;$yz2=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) {        $yz=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){            $msg.="&nbsp;<img src=./images/dottype1.gif>&nbsp;<b><a class=shadow2 href=list.php?form=$form&type=$file_typename[1]>$file_typename[2]</a></b>";            $yz1=1;            }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] ;        }        else if ($file_name[0]=="form")        echo "<img src=./images/dot.gif>"."&nbsp;<a class=shadow2 href=listform.php?form=$file_name[1]>$file_name[2]"."</a> \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";for ($i=0;$i<=$file_spe_count;$i++) {        $file_spe_code=explode("|",$file_spe_sort[$i]);        if($file_spe_code[1]==$spe){        $spe_name=$file_spe_code[2];        $spe_com=$file_spe_code[3];        $yz2=1;        }        }echo "<table border=0  cellspacing=0 cellpadding=3 width=735><tr><td>\n";echo "&nbsp;>> $spe_name"."[".$type_name."]"." - $spe_com\n";echo "</td></tr></table>";if ($yz2!=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>";for ($i=0;$i<=$file_count;$i++) {        $file_name=explode("|",$file_sort[$i]);        if ($file_name[0]=="type")        echo "<option value=".$file_name[1].">".$file_name[2]."</option>";        }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/spe/$spe.spe");$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/$filelist_name[1]/$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%>\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/spe/$spe.spe");$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_hot_sort=file("data/spe/$spe.spe");$file_hot_count=count($file_hot_sort)-1;    for ($j=0;$j<=$file_hot_count;$j++){      $file_hot_name=explode("|",$file_hot_sort[$j]);  if ( "$file_hot_name[0]" && "$file_hot_name[0]" != '.' && "$file_hot_name[0]" != '..') {  $file_hot_array=file("data/$file_hot_name[1]/$file_hot_name[0].num");  $file_hot_info=explode("|",$file_hot_array[0]);     $filelist_array_hot[$file_hot_array[0]]=$file_hot_info[17];  }  }@arsort($filelist_array_hot);@reset($filelist_array_hot);for ($counter=1; $counter<=$page_list_new; $counter++) {    $file_new_sort=@key($filelist_array_hot);    $file_new_info=explode("|",$file_new_sort);    if ( "$file_new_info[0]" && "$file_new_info[0]" != '.' && "$file_new_info[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";    if (!(@next($filelist_array_hot))) break;}}echo "</table>\n";echo "</td>\n";echo "</tr>\n";echo "<TR > <TD  colspan='2' vAlign=top width='100%'><P align=right class=small><A href='http://qiji.wo.to'></A></P></TD></TR></TBODY></TABLE></DIV></TD></TR>";echo "</table>\n";echo "<hr width=735 color=$biankuang_color>";require("foot.php");?>

⌨️ 快捷键说明

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