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

📄 list.php

📁 Try2php整站系统(Try2php CMS)Try2php整站系统(Try2php CMS)
💻 PHP
字号:
<?//========================================Begin of Main========================================?>
<?if ($_GET[act]=="list" or $_GET[act]=="view" or $_GET[act]=="Search")
{

if ($_GET[act]=="list" or $_GET[act]=="view" or $_GET[act]=="Search"){
    if ($_GET[tree]=="no") $TreeMenu="no";
        else if ($_GET[tree]=="yes") $TreeMenu="show";
            
                

//-----------------------------------------------Begin of List-----------------------------------------------?>
<td valign="top">
<?if ($_GET[act]=="list" or $_GET[act]=="Search"){?>
<div id="List">
<table width='95%' border='0' align='center' cellpadding='0' cellspacing='1' bgcolor='#8CAEBD' valign="top">
 <tr>
   <td bgcolor='#FFFFFF' valign='top'>
<table border='0' cellspacing='2' cellpadding='2' width='100%'>
<?if ($class[type]!="information")
{
    if ($_GET[act]=="Search"){?>
<tr align='center'>
<td width='100%' heigth='30' background='images/line.gif' class='view2' colspan="5">
以下是您查找的[<font color=red><?=$_SESSION['SchCon']?></font>]的结果:
</td>
</tr>
<?}?>

<tr align='center' background='images/line.gif'>
<td width='100%' height='30' background='images/line.gif' class='view2' colspan=2>文章标题</td>
<td nowrap background='images/line.gif'>提交者</td>
<td nowrap background='images/line.gif'>文章类别</td>
<td nowrap background='images/line.gif'>发布日期</td>
<td nowrap background='images/line.gif'>点击数</td>	

</tr>
<?
if ($type_id!=0) $sql_type=" and typeid='".$type_id."'";
else $sql_type="";

mysql_query("SET NAMES 'UTF8'");
if ($_GET[act]=="Search"){
if ($module!="")
{
$query_types = "select * from ".$prefix."types where module='".$module."' order by orderid";
$result_types = mysql_query($query_types);
$rows_types = @mysql_num_rows($result_types);
for($i=$line_b;$i<$line;$i++)
{
    @mysql_data_seek($result_types,$i);
    $Stype_id = @mysql_fetch_array($result_types);

    $SchType="a".$Stype_id[typeid];
    
    if ($_GET[$SchType]=="s") $SchTypeSQL.=" or ".$prefix_f."_title like '%".$_SESSION['SchCon']."%' and typeid='".$Stype_id[typeid]."'";
}
if ($SchTypeSQL=="") $SchTypeSQL=" or ".$prefix_f."_title like '%".$_SESSION['SchCon']."%'";


$query_ar = "select * from ".$prefix.$module." where 1=2".$SchTypeSQL." order by id desc";
}

else if ($module=="")
{
$module=$S_module;

$query_class = "select * from ".$prefix."class where module='".$module."'";
$result_class = mysql_query($query_class);
@mysql_data_seek($result_class,1);
$class = @mysql_fetch_array($result_class);
        
$prefix_f=substr($class[type],0,2);

$title=$prefix_f."_title";
$user=$prefix_f."_user";
$time00=$prefix_f."_time00";
$clicks=$prefix_f."_clicks";
$content0=$prefix_f."_content0";

$query_ar = "select * from ".$prefix.$module." where ".$prefix_f."_title like '%".$_SESSION['SchCon']."%' order by id desc";
}
}
else
$query_ar = "select * from ".$prefix.$module." where 1=1".$sql_type." order by id desc";
$result_ar = mysql_query($query_ar);
$rows_ar = @mysql_num_rows($result_ar);

if ($line>$rows_ar) $line=$rows_ar;
else
{

if ($page>0)
{
	$line_b=$line*($page-1);
	$line=$line*$page;
	if ($line>$rows_ar) $line=$rows_ar;
}
}

for($i=$line_b;$i<$line;$i++)
{
        @mysql_data_seek($result_ar,$i);
        $ArList = @mysql_fetch_array($result_ar);

$query_type = "select * from ".$prefix."types where module='".$module."' and typeid='".$ArList[typeid]."'";
$result_type = mysql_query($query_type);

        @mysql_data_seek($result_type,1);
        $type_name = @mysql_fetch_array($result_type);
?>
<tr onmouseover="this.style.background='<?=$Mcolor?>';" onmouseout="this.style.background=''">
<td align=right width=1%><a href='index.php?act=viewer&module=<?=$module?>&typeid=<?=$type_id?>&id=<?=$ArList[id]?>&page=<?=$page?>&tree=no' target=_blank><img src='images/NewWindow.png'></a></td>
<td width='90%' align='left'>
<a style="cursor:pointer" onclick="document.title='<?=$ArList[$title]?>——<?=$SiteInfo[se_sitename]?>',send_request('index.php?act=view&module=<?=$module?>&typeid=<?=$type_id?>&id=<?=$ArList[id]?>&page=<?=$page?>&tree=no','List')" title='完整标题: <?="$ArList[$title]";?>

所在分类: <?="$type_name[name]";?>

添加作者: <?="$ArList[$user]";?>

添加日期: <?="$ArList[$time00]";?>

总共点击: <?="$ArList[$clicks]";?>次

点击查看'><?=substr($ArList[$title],0,63);?> </a></td>
<td nowrap align='left'><?="$ArList[$user]";?></td>
<td nowrap align='left'>
<a style="cursor:pointer" onclick="send_request('index.php?act=list&module=<?="$module";?>&typeid=<?="$ArList[typeid]";?>','List')"><?="$type_name[name]";?></a></td>
<td nowrap align='center'><?="$ArList[$time00]";?></td>
<td nowrap align='right'><?="$ArList[$clicks]";?></td>
</tr>
<?}

if ($rows_ar==0){?>
    <td><?="对不起,没有您要查找的内容";?></td>
<?}
}
else{
mysql_query("SET NAMES 'UTF-8'");
$query_class = "select * from ".$prefix."class where module='".$module."'";
$result_class = mysql_query($query_class);
@mysql_data_seek($result_class,0);
$class = @mysql_fetch_array($result_class);
?>
<tr><td bgcolor='#DEE7EF' align=center height=30 colspan=3><div class=2emborder><p><?=$class[conname];?></p></div></td></tr>
<tr><td width=2%> </td><td bgcolor='#FFFFFF'><?=$info[in_content0]?></td><td width=2%></td></tr>
<?}?>
</table>

</td>
</tr>
</table>



<?if ($class[type]!="information"){?>
<p><center>

<?$AllPage=ceil($rows_ar / $settings[se_line]);
if ($type_id!=0) $page_type="&typeid=".$type_id;
?>

Page: &nbsp;<?="$page";?> &nbsp; of &nbsp; <?="$AllPage";?><p>

<?
for ($i=1;$i<$AllPage+1;$i++)
{?>
[&nbsp;<a style="cursor:pointer" onclick="send_request('index.php?act=<?=$_GET[act]?>&module=<?="$module";?><?="$page_type"?>&page=<?="$i";?>&tree=no','List')"><font size="2"><?=$i?></font></a>&nbsp;]
<?}?>
</p><?}?>
	</td>
	</tr>
</table></div>
<?//-----------------------------------------------End of List-----------------------------------------------
//-----------------------------------------------Begin of Content-----------------------------------------------?>
<?}
}}

⌨️ 快捷键说明

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