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

📄 content.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]=="view" and $_GET[tree]=="yes"){
?><div id="List">
<?}
if ($_GET[act]=="view"){
mysql_query("SET NAMES 'UTF-8'");

$query_view = "select * from ".$prefix.$module." where id='".$_GET[id]."'";
$result_view = mysql_query($query_view);
$rows_view = @mysql_num_rows($result_view);

@mysql_data_seek($result_view,1);
$data_view = @mysql_fetch_array($result_view);

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

        @mysql_data_seek($result_type,1);
        $type_name = @mysql_fetch_array($result_type);
        
$ud_clicks=$data_view[$clicks]+1;
$SQL_click = "update `".$prefix.$module."` set `".$prefix_f."_clicks`='".$ud_clicks."' where id='".$data_view[id]."'";
$result_click = mysql_query($SQL_click);

if ($_GET[SaveAs]==1)
{
?>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title><?=$data_view[$title]?>——<?=$SiteInfo[se_sitename]?></title>
<link rel="Bookmark" href="favicon.ico">
<link href="images/css/css.css" type=text/css rel=stylesheet>
<link rel="stylesheet" href="images/css/lightbox.css" type="text/css" media="screen" />
<script language="javascript" src="images/js/ajax.js"></script>
<script>
function AutoResize(obj)
{
	if(obj.width>'400')obj.width='400';
}
</script>
</head>
<div style="position: absolute; left: 0; top: 0; right: 0; bottom: 0; width:100% ; height=100px ; z-index: 1 ; visibility:hidden;" id="ShowPic">
<div style="position: absolute; z-index: ; left: 0; top: 0; right: 0; bottom: 0; width: 100%; height: 100%; background-color: #000000; MozOpacity:1;  FILTER: alpha(opacity=80); moz-opacity: 0.5;" id='SShowPic'></div>
<div style="position: absolute; z-index: ; left: 0; top: 0; right: 0; bottom: 0; width: 100%; height: 100%;" id="PicShowed">
</div></div></div>
<?}?>
<table width='100%' border='0' align='center' cellpadding='0' cellspacing='1' bgcolor='#8CAEBD' id="table2" valign="top">
 <tr>
  <td bgcolor='#FFFFFF' valign='top'>
<table border='0' cellspacing='2' cellpadding='2' width='100%'>
<tr align='center' background='images/line.gif'>
<td nowrap background='images/line.gif'>文章类别</td>
<td nowrap background='images/line.gif'>提交者</td>
<td width='100%' height='30' background='images/line.gif' class='view2'>文章标题</td>
<td nowrap background='images/line.gif'>发布日期</td>
<td nowrap background='images/line.gif'>点击数</td>
</tr>

<tr align='center' background='images/line.gif'>
<td nowrap background='images/line.gif'><?="$type_name[name]";?></td>
<td nowrap background='images/line.gif'><?="$data_view[$user]";?></td>
<td width='100%' height='30' background='images/line.gif' class='view2'><?="$data_view[$title]";?></td>
<td nowrap background='images/line.gif'><?="$data_view[$time00]";?></td>
<td nowrap background='images/line.gif'><?="$ud_clicks";?></td>
</tr>

<table border='0' cellpadding='0' cellspacing='1' width=100%>
<tr><td colspan="5">
<table border='0' cellpadding='0' cellspacing='0' bgcolor='#8CAEBD' id="table2" valign="top" width=100%>
<tr>
<td background='images/line.gif' width=10%> &nbsp; &nbsp; 本页URL:</td><td background='images/line.gif'>
<div id="ShowURL"></div>
<a href="index.php?act=viewer&module=<?="$module";?>&id=<?="$_GET[id]";?>">
         index.php?act=viewer&module=<?="$module";?>&id=<?="$_GET[id]";?>
</a></td>
<td width=10% align=center>
<a href='index.php?act=view&module=<?="$module";?>&id=<?="$_GET[id]";?>&SaveAs=1' target=_blank>
<font color=white>保存至磁盘</font></a>
</td>
</tr>
</table>
</td></tr>

<?
$query_f = "select * from ".$prefix."fields where module='".$module."'";
$result_f = mysql_query($query_f);
$rows_f = @mysql_num_rows($result_f);

for($i=0;$i<$rows_f;$i++)
{
        @mysql_data_seek($result_f,$i);
        $data_f = @mysql_fetch_array($result_f);
        $j=$i+1;
        $ShowFields=$prefix_f."_fields".$j;?>
<tr>
<td bgcolor="#DEE7EC" colspan='3'> &nbsp; &nbsp; ::<?=$data_f[name];?>::</td></tr></td>
</tr>
<tr>
<td width='2%'></td>
<td><?=$data_view[$ShowFields]?></td>
<td width='2%'></td>
</tr>
<?}?>

<tr><td bgcolor="#DEE7EC" colspan='3'> &nbsp; &nbsp; ::<?=$class[conname]?>::</td></tr>
<tr>
<td width='2%'></td>
<td align='left' width='100%'>
<div class=<?=$class[constyle]?>>
<?
//----------------------------------Begin of Show UBB----------------------------------
$UBB_img=explode("[img]",$data_view[$content0],2);
if ($UBB_img[1]!="")
{
    while ($UBB_img[1]!="" and $pos==NULL)
    {
		$UBB_img2=explode("[/img]",$UBB_img[1],2);
		$url=$UBB_img2[0];
		$UBB_img_f.=$UBB_img[0]."<table border='1' width='100%' bordercolorlight='#000000' bordercolordark='#FFFFFF' cellspacing='0' height='5'><tr><td bgcolor='#DEE7EF' bordercolordark='#DEE7EF'><p align='center'><a href='".$url."' target=_blank>相关图片</a></td></td></tr><tr><td align='center' colspan=2><table border='0' width='400px' id='table2' cellspacing='0'><tr><td><p align='center'><img src=\"".$url."\" onload=AutoResize(this) style=cursor:pointer onclick=_gel('ShowPic').style.display='',send_request('index.php?act=ShowPic&PicURL=".$url."&hh=document.body.scrolltop','PicShowed'),_gel('PicShowed').style.top=document.documentElement.scrollTop,_gel('PicShowed').style.height=document.documentElement.offsetHeight,_gel('ShowPic').style.height=document.documentElement.scrollHeight></td></tr></table></td></tr></table>";
		$UBB_img=explode("[img]",$UBB_img2[1],2);
		$UBB_img3=explode("[/img]",$UBB_img[1],2);
		$pos=stripos($UBB_img3[0],"[img]");
    };
	$UBB_img_f=$UBB_img_f.$UBB_img2[1];
}
else $UBB_img_f=$data_view[$content0];
$UBB_url=explode("[url=",$UBB_img_f,2);
if ($UBB_url[1]!="")
{
    while ($UBB_url[1]!="" and $pos==NULL)
    {
        $UBB_url2=explode("[/url]",$UBB_url[1],2);
        $UBB_con=$UBB_url2[0];
        $a=stripos($UBB_con,"]");
        $url=substr($UBB_con,0,$a);
        $UBB_conF=explode("]",$UBB_con,2);
        $UBB_url_f.=$UBB_url[0]."<a href='".$url."' target=_blank><font color='#436976'>".$UBB_conF[1]."</font></a>";
        $UBB_url=explode("[url=",$UBB_url2[1],2);
        $UBB_url3=explode("[/url]",$UBB_url[1],2);
        $pos=stripos($UBB_url3[0],"[url=");
    };
	$UBB_url_f=$UBB_url_f.$UBB_url2[1];
}
else $UBB_url_f=$UBB_img_f;
$UBB_link=explode("[url]",$UBB_url_f,2);
if ($UBB_link[1]!="")
{
    while ($UBB_link[1]!="" and $pos==NULL)
    {
        $UBB_link2=explode("[/url]",$UBB_link[1],2);
        $UBB_con=$UBB_link2[0];
		if (strcasecmp(substr($UBB_con,0,7),"http://")) $UBB_conl="http://".$UBB_con;
		else $UBB_conl=$UBB_con;
        $UBB_link_f.=$UBB_link[0]."<a href='".$UBB_conl."' target=_blank><font color='#436976'>".$UBB_con."</font></a>";
        $UBB_link=explode("[url]",$UBB_link2[1],2);
        $UBB_link3=explode("[/url]",$UBB_link[1],2);
        $pos=stripos($UBB_link3[0],"[url]");
    };
	$UBB_link_f=$UBB_link_f.$UBB_link2[1];
}
else $UBB_link_f=$UBB_url_f;
$UBB_color=explode("[color=",$UBB_link_f,2);
if ($UBB_color[1]!="")
{
    while ($UBB_color[1]!="" and $pos==NULL)
    {
        $UBB_color2=explode("[/color]",$UBB_color[1],2);
        $UBB_con=$UBB_color2[0];
        $a=stripos($UBB_con,"]");
        $url=substr($UBB_con,0,$a);
        $UBB_conF=explode("]",$UBB_con,2);
        $UBB_color_f.=$UBB_color[0]."<font color='".$url."'>".$UBB_conF[1]."</font>";
        $UBB_color=explode("[color=",$UBB_color2[1],2);
        $UBB_color3=explode("[/color]",$UBB_color[1],2);
        $pos=stripos($UBB_color3[0],"[color=");
    };
	$UBB_color_f=$UBB_color_f.$UBB_color2[1];
}
else $UBB_color_f=$UBB_link_f;

echo $UBB_color_f;
//----------------------------------End of Show UBB----------------------------------
?>
</div></td>

<td width='2%'></td>
</tr>
<?//----------------------------------Begin of Download Address----------------------------------
if ($class[type]=="download"){
?>
<tr>
<td bgcolor="#DEE7EC" colspan='3'> &nbsp; &nbsp; ::下载说明::</td></tr></td>
</tr>
<tr>
<td width='2%'></td>
<td><?=$class[caption]?></td>
<td width='2%'></td>
</tr>
<?
    $query_add = "select * from ".$prefix."fields where module='DownloadAddress'";
    $result_add = mysql_query($query_add);
    $rows_add = @mysql_num_rows($result_add);
    for ($i=0;$i<1;$i++) $iFHeight=$iFHeight+15;?>

<tr><td colspan="3" width="100%">
<table border='0' cellpadding='0' cellspacing='0' valign="top" width=100%>
<tr><td bgcolor="#DEE7EC" colspan='4'>
 &nbsp; &nbsp; ::下载地址::
</td></tr>
<?
for ($i=0;$i<$rows_add;$i++){
    @mysql_data_seek($result_add,$i);
    $data_add = @mysql_fetch_array($result_add);
    
    if (substr($data_view[$address],0,7)=="http://") $DownloadURL=$data_view[$address];
    else $DownloadURL=$data_add[address]."/".$module."/".$data_view[typeid]."/".$data_view[$address]
?>
<tr>
<td width=15%></td>
<td align="left"><img src="images/filebox.gif"><a href="<?=$DownloadURL?>" target=_blank><?=$data_add[name]?></a></td>
<?if ($settings[TestSpeed]=="on"){?>
<td align="left">
<iframe src="index.php?act=ShowSpeed&id=<?=$data_add[id]?>" height="<?=$iFHeight?>" width="150" border="0" frameborder="0" scrolling="no"></iframe>
</td>
<?}?>
<td width=40%></td>
</tr>
<?}?>

<tr bgcolor="#DEE7EC"><td>
 &nbsp; &nbsp; ::文件MD5 hash::
</td><td colspan='3'><?=$data_view[do_md5]?></td></tr>
<tr bgcolor="#DEE7EC"><td>
 &nbsp; &nbsp; ::常用软件下载::
</td><td colspan='3'><a href="http://try2.org/downloads/soft.php?id=md5" target=_blank>md5查看器</a> &nbsp; &nbsp; <a href="http://try2.org/downloads/soft.php?id=Thunder" target=_blank>迅雷</a> &nbsp; &nbsp; <a href="http://try2.org/downloads/soft.php?id=winrar" target=_blank>winrar</a></td></tr>
</table>
</td></tr>
<?}
//----------------------------------End of Download Address----------------------------------?>
</table>
<?if ($_GET[SaveAs]==1)	;
else{?>
<tr>
<?
if ($_GET[index]=="y") $BackURL="href='index.php'";
else $BackURL="onclick=send_request('index.php?act=list&module=".$module."&typeid=".$type_id."&page=".$page."&tree=no','List')";
?>
<td align='center' nowrap background='images/line.gif' width='100%'><p><a style="cursor:pointer" <?=$BackURL?>>返回上一页</a></p></td>
</tr>
<?}?>
</table>
</td>
</tr>
</table>
<?}
//-----------------------------------------------End of Content-----------------------------------------------
}}

⌨️ 快捷键说明

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