?? index.php
字號:
<?php
@require("../class/connect.php");
if(!defined('InEmpireCMS'))
{
exit();
}
include("../class/db_sql.php");
include("../class/config.php");
include("../class/q_functions.php");
include("../class/class.php");
include LoadLang("pub/fun.php");
$link=db_connect();
$empire=new mysqlquery();
//用戶名
$lusername=getcvar('mlusername');
if($lusername)
{$lpassword=md5($lusername);}
$id=(int)$_GET['id'];
$classid=(int)$_GET['classid'];
if(empty($id)||empty($classid))
{printerror("ErrorUrl","history.go(-1)",1);}
if(empty($class_r[$classid][tbname]))
{
printerror("ErrorUrl","history.go(-1)",1);
}
$n_r=$empire->fetch1("select id,title,newspath,filename,classid,groupid,plnum,infopfen,infopfennum from {$dbtbpre}ecms_".$class_r[$classid][tbname]." where id='$id' and classid='$classid'");
if(empty($n_r[id]))
{printerror("ErrorUrl","history.go(-1)",1);}
$page=(int)$_GET['page'];
$start=(int)$_GET['start'];
$search="&classid=$classid&id=".$id;
$page_line=12;//每頁顯示鏈接數
$line=20;//每頁顯示記錄數
$offset=$start+$page*$line;//總偏移量
$query="select plid,saytext,saytime,sayip,username,zcnum,fdnum,userid from {$dbtbpre}enewspl where id='$id' and classid='$classid' and checked=0";
//需審核
if($class_r[$classid][checkpl])
{
$totalquery="select count(*) as total from {$dbtbpre}enewspl where id='$id' and classid='$classid' and checked=0";
$num=$empire->gettotal($totalquery);
}
else
{
$num=$n_r['plnum'];
}
$query.=" order by plid desc limit $offset,$line";
$sql=$empire->query($query);
$listpage=page1($num,$line,$page_line,$start,$page,$search);
//標題鏈接
$titleurl=sys_ReturnBqTitleLink($n_r);
$title=$n_r[title];
//評分
$infopfennum=$n_r['infopfennum'];
$pinfopfen=$infopfennum?round($n_r['infopfen']/$infopfennum):0;
$url=ReturnClassLink($n_r[classid])." > <a href=".$titleurl.">".$n_r[title]."</a> > ".$fun_r[pl];
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>評論:<?=$title?></title>
<meta name="keywords" content="<?=$title?>評論" />
<style type="text/css">
<!--
* { margin: 0; padding: 0; }
body,Table{ color: #222; font-size: 12px; }
a { color: #222; text-decoration: none; }
a:hover { color: #f00; text-decoration: underline; }
h1 { font-size:32px; font-weight: bold; }
h2 { color: #1e3a9e; font-size: 25px; font-weight: bold; }
.you { color: #1f3a87; font-size: 14px; }
.text { font-size: 14px; padding-left: 5px; padding-right: 5px; line-height: 20px}
.re a { color: #1f3a87; }
.name { color: #1f3a87; }
.name a { color: #1f3a87; text-decoration: underline;}
.retext { background-color: #f3f3f3; width: 100%; float: left; padding-top: 22px; padding-bottom: 22px; border-top: 1px solid #ccc; }
.retext textarea { width: 535px; height: 130px; float: left; margin-left: 60px; border-top-style: inset; border-top-width: 2px; border-left-style: inset; border-left-width: 2px; }
.hrLine{MARGIN: 0px 0px; BORDER-BOTTOM: #807d76 1px dotted;}
-->
</style>
<script src="/ecms2008/e/data/js/ajax.js"></script>
</head>
<body>
<table width="766" border="0" align="center" cellpadding="3" cellspacing="1">
<tr>
<td width="210"><a href="/ecms2008/"><img src="/ecms2008/skin/default/images/logo.gif" border="0" /></a></td>
<td><h1>網友評論</h1></td>
<td><div align="right"><a href="#tosaypl"><strong><font color="#FF0000">我也評兩句</font></strong></a></div></td>
</tr>
</table>
<table width="766" border="0" align="center" cellpadding="3" cellspacing="1" bgcolor="#222">
<tr>
<td height="2"></td>
</tr>
</table>
<table width="766" border="0" align="center" cellpadding="3" cellspacing="1">
<tr>
<td height="42">
<h2>評論:<a href="<?=$titleurl?>" target="_blank"><font color="#1e3a9e"><?=$title?></font></a></h2></td>
<td><div align="right"><a href="<?=$titleurl?>" target="_blank">查看原文</a></div></td>
</tr>
</table>
<hr align="center" width="766" size=1 class=hrline>
<table width="766" border="0" align="center" cellpadding="3" cellspacing="1" bgcolor="#384EA3">
<form action="../enews/index.php" method="post" name="infopfenform">
<input type="hidden" name="enews" value="AddInfoPfen" />
<input type="hidden" name="classid" value="<?=$classid?>" />
<input type="hidden" name="id" value="<?=$id?>" />
<tr>
<td width="48%" height="27" valign="middle"><font color="#FFFFFF"> 我要評分:
<input type="radio" name="fen" value="1">
1分
<input type="radio" name="fen" value="2">
2分
<input name="fen" type="radio" value="3" checked>
3分
<input type="radio" name="fen" value="4">
4分
<input type="radio" name="fen" value="5">
5分
<input type="submit" name="Submit" value="提交">
</font></td>
<td width="52%" valign="middle"><div align="center"><font color="#FFFFFF">平均得分為:
<strong><span id="pfendiv"><?=$pinfopfen?></span></strong> 分,共有 <strong><?=$infopfennum?></strong>
人參與評分.</font></div></td>
</tr>
</form>
</table>
<table width="766" border="0" align="center" cellpadding="3" cellspacing="1" bgcolor="#CCCCCC">
<tr>
<td height="30" bgcolor="#FFFFFF">
<table width="100%" border="0" cellspacing="1" cellpadding="3">
<tr>
<td width="17%"> 網友評論</td>
<td width="83%"><div align="right"><?=$listpage?> </div></td>
</tr>
</table></td>
</tr>
<tr>
<td bgcolor="#f8fcff">
<?
while($r=$empire->fetch($sql))
{
if(empty($r[username]))
{$r[username]=$fun_r['nomember'];}
if($r[userid])
{
$r[username]="<a href='$public_r[newsurl]e/space?userid=$r[userid]' target='_blank'>$r[username]</a>";
}
$r['saytext']=stripSlashes($r['saytext']);
//替換表情
$r['saytext']=RepPltextFace($r['saytext']);
//ip
$ipr=explode(".",$r[sayip]);
$r[sayip]="";
$ipnum=count($ipr);
for($i=0;$i<$ipnum;$i++)
{
if($i!=0)
{$d=".";}
if($i==$ipnum-1)
{
$ipr[$i]="*";
}
$r[sayip].=$d.$ipr[$i];
}
$includelink=" onclick=\"javascript:document.saypl.saytext.value+='[quote]".$r[plid]."[/quote]';document.saypl.repid.value='".$r[plid]."';document.saypl.saytext.focus();\"";
?>
<table width="96%" border="0" align="center" cellpadding="3" cellspacing="1" style="word-break:break-all; word-wrap:break-all;">
<tr>
<td height="30"><span class="name">本站網友 <?=$r[username]?></span> <font color="#666666">ip:<?=$r[sayip]?></font></td>
<td><div align="right"><font color="#666666"><?=$r[saytime]?> 發表</font></div></td>
</tr>
<tr valign="top">
<td height="50" colspan="2" class="text"><?=$r[saytext]?></td>
</tr>
<tr>
<td height="30"> </td>
<td><div align="right" class="re"><a href="#tosaypl"<?=$includelink?>>回復</a>
<a href="JavaScript:makeRequest('../enews?enews=DoForPl&plid=<?=$r[plid]?>&classid=<?=$classid?>&id=<?=$id?>&dopl=1&doajax=1&ajaxarea=zcpldiv<?=$r[plid]?>','EchoReturnedText','GET','');">支持</a>[<span id="zcpldiv<?=$r[plid]?>"><?=$r[zcnum]?></span>]
<a href="JavaScript:makeRequest('../enews?enews=DoForPl&plid=<?=$r[plid]?>&classid=<?=$classid?>&id=<?=$id?>&dopl=0&doajax=1&ajaxarea=fdpldiv<?=$r[plid]?>','EchoReturnedText','GET','');">反對</a>[<span id="fdpldiv<?=$r[plid]?>"><?=$r[fdnum]?></span>]
</div></td>
</tr>
</table>
<table width="100%" border="0" cellspacing="1" cellpadding="3">
<tr>
<td background="/ecms2008/skin/default/images/plhrbg.gif"></td>
</tr>
</table>
<?
}
db_close();
$empire=null;
?>
<div align="right"><br />
<?=$listpage?> <br />
<br />
<font color="#FF0000">網友評論僅供網友表達個人看法,并不表明本站同意其觀點或證實其描述 </font><br><br> </div></td>
</tr>
<script>
function CheckPl(obj)
{
if(obj.saytext.value=="")
{
alert("錯誤,評論不能為空");
obj.saytext.focus();
return false;
}
return true;
}
</script>
<form action="../enews/index.php" method="post" name="saypl" id="saypl" onsubmit="return CheckPl(document.saypl)">
<tr id="tosaypl">
<td bgcolor="#f8fcff"> <table width="100%" border="0" cellspacing="1" cellpadding="3">
<tr>
<td width="13%" height="28"> <span class="you">我也評兩句</span></td>
<td valign="middle">用戶名:
<input name="username" type="text" id="username" size="12" value="<?=$lusername?>" />
密碼:
<input name="password" type="password" id="password" size="12" value="<?=$lpassword?>" />
驗證碼:
<input name="key" type="text" id="key" size="6" />
<img src="/ecms2008/e/ShowKey?ecms" align="middle" /> <a href="/ecms2008/e/member/register/" target="_blank">還沒有注冊?</a></td>
</tr>
</table></td>
</tr>
<tr>
<td bgcolor="#f8fcff"> <table width="100%" border="0" cellspacing="1" cellpadding="3" class="retext">
<tr>
<td width="78%"><div align="center">
<textarea name="saytext" cols="58" rows="6" id="saytext"></textarea>
</div></td>
<td width="22%" rowspan="2"> <div align="center">
<input name="nomember" type="checkbox" id="nomember" value="1" checked="checked" />
匿名發表<br>
<br />
<input name="imageField" type="submit" id="imageField" value=" 提 交 " />
</div></td>
</tr>
<tr>
<td><div align="center">
<script src="/ecms2008/d/js/js/plface.js"></script>
</div></td>
</tr>
</table> </td>
</tr>
<input name="id" type="hidden" id="id" value="<?=$id?>" />
<input name="classid" type="hidden" id="classid" value="<?=$classid?>" />
<input name="enews" type="hidden" id="enews" value="AddPl" />
<input name="repid" type="hidden" id="repid" value="0" />
</form>
</table>
<!-- 頁腳 -->
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td align="center" class="search"><form action="/ecms2008/e/search/index.php" method="post" name="searchform" id="searchform">
<table border="0" cellspacing="6" cellpadding="0">
<tr>
<td><strong>站內搜索:</strong>
<input name="keyboard" type="text" size="32" id="keyboard" class="inputText" />
<input type="hidden" name="show" value="title" />
<input type="hidden" name="tempid" value="1" />
<select name="tbname">
<option value="news">新聞</option>
<option value="download">下載</option>
<option value="photo">圖庫</option>
<option value="flash">FLASH</option>
<option value="movie">電影</option>
<option value="shop">商品</option>
<option value="article">文章</option>
<option value="info">分類信息</option>
</select>
</td>
<td><input type="image" class="inputSub" src="/ecms2008/skin/default/images/search.gif" />
</td>
<td><a href="/ecms2008/search/" target="_blank">高級搜索</a></td>
</tr>
</table>
</form></td>
</tr>
<tr>
<td><table width="100%" border="0" cellpadding="0" cellspacing="4" class="copyright">
<tr>
<td align="center"><a href="/ecms2008/">網站首頁</a> | <a href="#">關于我們</a> | <a href="#">服務條款</a> | <a href="#">廣告服務</a> | <a href="#">聯系我們</a> | <a href="#">網站地圖</a> | <a href="#">免責聲明</a> | <a href="#">返回頂部</a></td>
</tr>
<tr>
<td align="center">Copyright © 2007-2008 EmpireSoft Inc, All rights reserved.</td>
</tr>
<tr>
<td align="center">Powered by <a href="http://www.phome.net" target="_blank">EmpireCMS <font color="#FF9900">5.0</font></a>,
Template designed by <a href="http://www.54sb.com" target="_blank">禾火木風</a>.</td>
</tr>
</table></td>
</tr>
</table>
</body>
</html>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -