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

📄 leftmenu.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";
            
                

if ($TreeMenu=="show"){
?>
<?//-----------------------------------------------Begin of LeftMenu-----------------------------------------------?>
<table border="0" width="100%" id="table199">
	<tr>
	<td class='left' width="20%" valign="top">
	
		<div class='boxs'>
  		<div class='border'><p>快速通道</p></div>
  		<div class='content'>

<?if ($class[type]!="information"){?>
<fieldset class='main'>
<legend><strong><p>文章分类</p></strong></legend>
<?
	mysql_query("SET NAMES 'UTF8'");
	$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);

if ($_GET[act]=="Search" and $module!="")
{

$_SESSION['SchCon']=htmlspecialchars($_POST[SchCon]);
for($i=0;$i<$rows_types;$i++)
{
        @mysql_data_seek($result_types,$i);
        $types = @mysql_fetch_array($result_types);
$query_sch = "select * from ".$prefix.$module." where ".$title." like '%".$_SESSION['SchCon']."%' and typeid='".$types[typeid]."'";
$result_sch = mysql_query($query_sch);
$rows_sch = @mysql_num_rows($result_sch);

$Sum_rows_sch=$Sum_rows_sch+$rows_sch;
        
        $SchType="a".$types[typeid];
        if ($_POST[$SchType]=="s"){
            $SchAll=1
?>
<img src='images/sort.gif'>&nbsp;<a style="cursor:pointer" onclick="send_request('index.php?act=Search&module=<?="$module";?>&a<?="$types[typeid]";?>=s&tree=no','List')"><?="$types[name]";?> (<?=$rows_sch;?>)</a><br>
<?}}
if ($SchAll==1){?>
<img src='images/sort.gif'>&nbsp;<a style="cursor:pointer" onclick="send_request('index.php?act=Search&module=<?="$module";?>&tree=no','List')">全部搜索结果 (<?=$Sum_rows_sch;?>)</a>
<?}
else if ($SchAll==0)
    {
        for($i=0;$i<$rows_types;$i++)
        {
        @mysql_data_seek($result_types,$i);
        $types = @mysql_fetch_array($result_types);
        
        $query_sch = "select * from ".$prefix.$module." where ".$title." like '%".$_SESSION['SchCon']."%' and typeid='".$types[typeid]."'";
        $result_sch = mysql_query($query_sch);
        $rows_sch = @mysql_num_rows($result_sch);
        $Sum_rows_sch1=$Sum_rows_sch1+$rows_sch;?>
        <img src='images/sort.gif'>&nbsp;<a style="cursor:pointer" onclick="send_request('index.php?act=Search&module=<?=$module?>&a<?=$types[typeid]?>=s&tree=no','List')"><?="$types[name]";?> (<?=$rows_sch;?>)</a><br>
<?      }?>
<img src='images/sort.gif'>&nbsp;<a style="cursor:pointer" onclick="send_request('index.php?act=Search&module=<?="$module";?>&tree=no','List')">全部搜索结果 (<?=$Sum_rows_sch1;?>)</a>
<?    }
}
else if ($_GET[act]=="Search" and $module=="")
{

	$_SESSION['SchCon']=htmlspecialchars($_POST[SchCon]);
    $query_Sclass = "select * from ".$prefix."class where type='article' or type='download' order by orderid";
    $result_Sclass = mysql_query($query_Sclass);
    $rows_Sclass = @mysql_num_rows($result_Sclass);
    for($i=0;$i<$rows_Sclass;$i++)
    {
    @mysql_data_seek($result_Sclass,$i);
    $Sclass = @mysql_fetch_array($result_Sclass);
    if ($S_module=="") $S_module=$Sclass[module];
    
    $prefix_s=substr($Sclass[type],0,2);
    
    $query_Smodule = "select * from ".$prefix.$Sclass[module]." where ".$prefix_s."_title like '%".$_SESSION['SchCon']."%'";
    $result_Smodule = mysql_query($query_Smodule);
    $rows_Smodule = @mysql_num_rows($result_Smodule);?>
    <img src='images/sort.gif'>&nbsp;<a style="cursor:pointer" onclick="send_request('index.php?act=Search&module=<?="$Sclass[module]";?>&tree=no','List')"><?="$Sclass[name]";?> (<?=$rows_Smodule;?>)</a><br>
<?}
}
else {
    for($i=0;$i<$rows_types;$i++)
{
        @mysql_data_seek($result_types,$i);
        $types = @mysql_fetch_array($result_types);
		
	mysql_query("SET NAMES 'UTF8'");
	$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);
?>
<img src='images/sort.gif'>&nbsp;<a style="cursor:pointer" onclick="document.title='<?=$SiteInfo[se_sitename]?>-><?=$class[name]?>-><?=$types[name]?>',send_request('index.php?act=list&module=<?="$module";?>&typeid=<?="$types[typeid]";?>','List')"><?="$types[name]";?></a><br>
<?}
}?>
</font>
</p>
</fieldset>

<?if ($_GET[act]!="Search"){?>
<fieldset class='main'>
<legend><strong>本类热门</strong></legend>
<?
mysql_query("SET NAMES 'UTF8'");
if ($type_id!=0) $hot_type=" and typeid='".$type_id."'";

$query_hot = "select * from ".$prefix.$module." where 1=1".$hot_type." order by ".$clicks." desc";
$result_hot = mysql_query($query_hot);
$rows_hot = @mysql_num_rows($result_hot);

if ($hotsize<$rows_hot)$hotsize=$hotsize;
else $hotsize=$rows_hot;

for($i=0;$i<$hotsize;$i++)
{
        @mysql_data_seek($result_hot,$i);
        $HotTitle = @mysql_fetch_array($result_hot);
?>
<p><img src='images/view.gif'>&nbsp;<a style="cursor:pointer" onclick="document.title='<?=$HotTitle[$title]?>——<?=$SiteInfo[se_sitename]?>',send_request('index.php?act=view&module=<?="$module";?>&typeid=<?="$type_id";?>&id=<?="$HotTitle[id]";?>&page=<?="$page";?>&tree=no','List')" title='完整标题: <?="$HotTitle[$title]";?>

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

文章分类: <?="$HotTitle[typeid]";?>

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

总共点击: <?="$HotTitle[$clicks]";?>次'><?=substr($HotTitle[$title],0,30);?> </a></p>
<?}?>

</fieldset>


		</div>
		</div>
		
	</td>
<?}}
else
{
mysql_query("SET NAMES 'UTF8'");
$query_inf = "select * from ".$prefix."information where in_module='".$module."'";
$result_inf = mysql_query($query_inf);
$rows_inf = @mysql_num_rows($result_inf);

        @mysql_data_seek($result_inf,1);
        $info = @mysql_fetch_array($result_inf);
        
echo $info[in_left];
}?>

<?}?>
<td valign="top">
<?if ($_GET[act]=="view" and $_GET[tree]=="yes"){
?></div>
<?}
}}

⌨️ 快捷键说明

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