index.php 9.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273
  1. <?php
  2. require("../../class/connect.php");
  3. if(!defined('InEmpireCMS'))
  4. {
  5. exit();
  6. }
  7. require("../../class/db_sql.php");
  8. require("../../class/q_functions.php");
  9. require "../".LoadLang("pub/fun.php");
  10. $link=db_connect();
  11. $empire=new mysqlquery();
  12. $editor=1;
  13. eCheckCloseMods('gb');//关闭模块
  14. //分类id
  15. $bid=(int)$_GET['bid'];
  16. $gbr=$empire->fetch1("select bid,bname,groupid from {$dbtbpre}enewsgbookclass where bid='$bid'");
  17. if(empty($gbr['bid']))
  18. {
  19. printerror("EmptyGbook","",1);
  20. }
  21. //权限
  22. if($gbr['groupid'])
  23. {
  24. include("../../member/class/user.php");
  25. $user=islogin();
  26. include("../../data/dbcache/MemberLevel.php");
  27. if($level_r[$gbr[groupid]][level]>$level_r[$user[groupid]][level])
  28. {
  29. echo"<script>alert('您的会员级别不足(".$level_r[$gbr[groupid]][groupname]."),没有权限提交信息!');history.go(-1);</script>";
  30. exit();
  31. }
  32. }
  33. esetcookie("gbookbid",$bid,0);
  34. $bname=$gbr['bname'];
  35. $search="&bid=$bid";
  36. $page=(int)$_GET['page'];
  37. $page=RepPIntvar($page);
  38. $start=0;
  39. $line=$public_r['gb_num'];//每页显示条数
  40. $page_line=10;//每页显示链接数
  41. $offset=$start+$page*$line;//总偏移量
  42. $totalnum=(int)$_GET['totalnum'];
  43. if(!$public_r['usetotalnum'])
  44. {
  45. $totalnum=0;
  46. }
  47. if($totalnum>0)
  48. {
  49. $num=$totalnum;
  50. }
  51. else
  52. {
  53. $totalquery="select count(*) as total from {$dbtbpre}enewsgbook where bid='$bid' and checked=0";
  54. $num=$empire->gettotal($totalquery);//取得总条数
  55. }
  56. if($public_r['usetotalnum'])
  57. {
  58. $search.="&totalnum=$num";
  59. }
  60. //checkpageno
  61. eCheckListPageNo($page,$line,$num);
  62. $query="select lyid,name,email,`mycall`,lytime,lytext,retext from {$dbtbpre}enewsgbook where bid='$bid' and checked=0";
  63. $query=$query." order by lyid desc limit $offset,$line";
  64. $sql=$empire->query($query);
  65. $listpage=page1($num,$line,$page_line,$start,$page,$search);
  66. $url="<a href='".ReturnSiteIndexUrl()."'>".$fun_r['index']."</a>&nbsp;>&nbsp;".$fun_r['saygbook'];
  67. ?>
  68. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  69. <html xmlns="http://www.w3.org/1999/xhtml">
  70. <head>
  71. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  72. <title>留言板 - Powered by EmpireCMS</title>
  73. <meta name="keywords" content="<?=$bname?>" />
  74. <meta name="description" content="<?=$bname?>" />
  75. <link href="/skin/default/css/style.css" rel="stylesheet" type="text/css" />
  76. <script type="text/javascript" src="/skin/default/js/tabs.js"></script>
  77. </head>
  78. <body class="listpage">
  79. <!-- 页头 -->
  80. <table width="100%" border="0" cellspacing="0" cellpadding="0" class="top">
  81. <tr>
  82. <td><table width="100%" border="0" cellspacing="0" cellpadding="0">
  83. <tr>
  84. <td width="63%">
  85. <!-- 登录 -->
  86. <script>
  87. document.write('<script src="/e/member/login/loginjs.php?t='+Math.random()+'"><'+'/script>');
  88. </script>
  89. </td>
  90. <td align="right">
  91. <a onclick="window.external.addFavorite(location.href,document.title)" href="#ecms">加入收藏</a> | <a onclick="this.style.behavior='url(#default#homepage)';this.setHomePage('/')" href="#ecms">设为首页</a> | <a href="/e/member/cp/">会员中心</a> | <a href="/e/DoInfo/">我要投稿</a> | <a href="/e/web/?type=rss2" target="_blank">RSS<img src="/skin/default/images/rss.gif" border="0" hspace="2" /></a>
  92. </td>
  93. </tr>
  94. </table></td>
  95. </tr>
  96. </table>
  97. <table width="100%" border="0" cellpadding="0" cellspacing="10">
  98. <tr valign="middle">
  99. <td width="240" align="center"><a href="/"><img src="/skin/default/images/logo.gif" width="200" height="65" border="0" /></a></td>
  100. <td align="center"><a href="http://www.phome.net/OpenSource/" target="_blank"><img src="/skin/default/images/opensource.gif" width="100%" height="70" border="0" /></a></td>
  101. </tr>
  102. </table>
  103. <!-- 导航tab选项卡 -->
  104. <table width="920" border="0" align="center" cellpadding="0" cellspacing="0" class="nav">
  105. <tr>
  106. <td class="nav_global"><ul>
  107. <li class="curr" id="tabnav_btn_0" onmouseover="tabit(this)"><a href="/">首页</a></li>
  108. <li id="tabnav_btn_1" onmouseover="tabit(this)"><a href="/news/">新闻中心</a></li>
  109. <li id="tabnav_btn_2" onmouseover="tabit(this)"><a href="/download/">下载中心</a></li>
  110. <li id="tabnav_btn_3" onmouseover="tabit(this)"><a href="/movie/">影视频道</a></li>
  111. <li id="tabnav_btn_4" onmouseover="tabit(this)"><a href="/shop/">网上商城</a></li>
  112. <li id="tabnav_btn_5" onmouseover="tabit(this)"><a href="/flash/">FLASH频道</a></li>
  113. <li id="tabnav_btn_6" onmouseover="tabit(this)"><a href="/photo/">图片频道</a></li>
  114. <li id="tabnav_btn_7" onmouseover="tabit(this)"><a href="/article/">文章中心</a></li>
  115. <li id="tabnav_btn_8" onmouseover="tabit(this)"><a href="/info/">分类信息</a></li>
  116. </ul></td>
  117. </tr>
  118. </table>
  119. <table width="100%" border="0" cellspacing="10" cellpadding="0">
  120. <tr valign="top">
  121. <td class="list_content"><table width="100%" border="0" cellspacing="0" cellpadding="0" class="position">
  122. <tr>
  123. <td>现在的位置:<a href=../../../>首页</a>&nbsp;>&nbsp;<?=$bname?>
  124. </td>
  125. </tr>
  126. </table><table width="100%" border="0" cellspacing="0" cellpadding="0" class="box">
  127. <tr>
  128. <td><table width="100%" border="0" cellpadding="3" cellspacing="2">
  129. <tr>
  130. <td align="center" bgcolor="#E1EFFB"><strong><?=$bname?></strong></td>
  131. </tr>
  132. <tr>
  133. <td align="left" valign="top"><table width="100%" border="0" cellpadding="4" cellspacing="0" bgcolor="#FFFFFF">
  134. <tr>
  135. <td height="100%" valign="top" bgcolor="#FFFFFF">
  136. <?
  137. while($r=$empire->fetch($sql))
  138. {
  139. $r['retext']=nl2br(stripSlashes($r[retext]));
  140. $r['lytext']=nl2br(stripSlashes($r[lytext]));
  141. ?>
  142. <table width="92%" border="0" align="center" cellpadding="4" cellspacing="1" bgcolor="#F4F9FD" class="tableborder">
  143. <tr class="header">
  144. <td width="55%" height="23">发布者: <?=stripSlashes($r[name])?> </td>
  145. <td width="45%">发布时间: <?=$r[lytime]?> </td>
  146. </tr>
  147. <tr bgcolor="#FFFFFF">
  148. <td height="23" colspan="2"><table border="0" width="100%" cellspacing="1" cellpadding="8" bgcolor='#cccccc'>
  149. <tr>
  150. <td width='100%' bgcolor='#FFFFFF' style='word-break:break-all'> <?=$r[lytext]?> </td>
  151. </tr>
  152. </table>
  153. <?
  154. if($r[retext])
  155. {
  156. ?>
  157. <table width="100%" border="0" align="center" cellpadding="3" cellspacing="1">
  158. <tr>
  159. <td><img src="../../data/images/regb.gif" width="18" height="18" /><strong><font color="#FF0000">回复:</font></strong> <?=$r[retext]?> </td>
  160. </tr>
  161. </table>
  162. <?
  163. }
  164. ?> </td>
  165. </tr>
  166. </table>
  167. <br />
  168. <?
  169. }
  170. ?>
  171. <table width="92%" border="0" align="center" cellpadding="4" cellspacing="1">
  172. <tr>
  173. <td>分页: <?=$listpage?></td>
  174. </tr>
  175. </table>
  176. <form action="../../enews/index.php" method="post" name="form1" id="form1">
  177. <table width="92%" border="0" align="center" cellpadding="4" cellspacing="1"class="tableborder">
  178. <tr class="header">
  179. <td colspan="2" bgcolor="#F4F9FD"><strong>请您留言:</strong></td>
  180. </tr>
  181. <tr bgcolor="#FFFFFF">
  182. <td width="20%">姓名:</td>
  183. <td width="722" height="23"><input name="name" type="text" id="name" />
  184. *</td>
  185. </tr>
  186. <tr bgcolor="#FFFFFF">
  187. <td>联系邮箱:</td>
  188. <td height="23"><input name="email" type="text" id="email" />
  189. *</td>
  190. </tr>
  191. <tr bgcolor="#FFFFFF">
  192. <td>联系电话:</td>
  193. <td height="23"><input name="mycall" type="text" id="mycall" /></td>
  194. </tr>
  195. <tr bgcolor="#FFFFFF">
  196. <td>留言内容(*):</td>
  197. <td height="23"><textarea name="lytext" cols="60" rows="12" id="lytext"></textarea></td>
  198. </tr>
  199. <tr bgcolor="#FFFFFF">
  200. <td height="23">&nbsp;</td>
  201. <td height="23"><input type="submit" name="Submit3" value="提交" />
  202. <input type="reset" name="Submit22" value="重置" />
  203. <input name="enews" type="hidden" id="enews" value="AddGbook" /></td>
  204. </tr>
  205. </table>
  206. </form></td>
  207. </tr>
  208. </table></td>
  209. </tr>
  210. </table></td>
  211. </tr>
  212. </table></td>
  213. </tr>
  214. </table>
  215. <!-- 页脚 -->
  216. <table width="100%" border="0" cellpadding="0" cellspacing="0">
  217. <tr>
  218. <td align="center" class="search">
  219. <form action="/e/search/index.php" method="post" name="searchform" id="searchform">
  220. <table border="0" cellspacing="6" cellpadding="0">
  221. <tr>
  222. <td><strong>站内搜索:</strong>
  223. <input name="keyboard" type="text" size="32" id="keyboard" class="inputText" />
  224. <input type="hidden" name="show" value="title" />
  225. <input type="hidden" name="tempid" value="1" />
  226. <select name="tbname">
  227. <option value="news">新闻</option>
  228. <option value="download">下载</option>
  229. <option value="photo">图库</option>
  230. <option value="flash">FLASH</option>
  231. <option value="movie">电影</option>
  232. <option value="shop">商品</option>
  233. <option value="article">文章</option>
  234. <option value="info">分类信息</option>
  235. </select>
  236. </td>
  237. <td><input type="image" class="inputSub" src="/skin/default/images/search.gif" />
  238. </td>
  239. <td><a href="/search/" target="_blank">高级搜索</a></td>
  240. </tr>
  241. </table>
  242. </form>
  243. </td>
  244. </tr>
  245. <tr>
  246. <td>
  247. <table width="100%" border="0" cellpadding="0" cellspacing="4" class="copyright">
  248. <tr>
  249. <td align="center"><a href="/">网站首页</a> | <a href="#">关于我们</a>
  250. | <a href="#">服务条款</a> | <a href="#">广告服务</a> | <a href="#">联系我们</a>
  251. | <a href="#">网站地图</a> | <a href="#">免责声明</a> | <a href="/e/wap/" target="_blank">WAP</a></td>
  252. </tr>
  253. <tr>
  254. <td align="center">Powered by <strong><a href="http://www.phome.net" target="_blank">EmpireCMS</a></strong>
  255. <strong><font color="#FF9900">7.5</font></strong>&nbsp; &copy; 2002-2018
  256. <a href="http://www.digod.com" target="_blank">EmpireSoft Inc.</a></td>
  257. </tr>
  258. </table>
  259. </td>
  260. </tr>
  261. </table>
  262. </body>
  263. </html>
  264. <?php
  265. db_close();
  266. $empire=null;
  267. ?>