ShowFeedback.php 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118
  1. <?php
  2. define('EmpireCMSAdmin','1');
  3. require("../../class/connect.php");
  4. require("../../class/db_sql.php");
  5. require("../../class/functions.php");
  6. require("../../class/com_functions.php");
  7. $link=db_connect();
  8. $empire=new mysqlquery();
  9. $editor=1;
  10. //验证用户
  11. $lur=is_login();
  12. $logininid=$lur['userid'];
  13. $loginin=$lur['username'];
  14. $loginrnd=$lur['rnd'];
  15. $loginlevel=$lur['groupid'];
  16. $loginadminstyleid=$lur['adminstyleid'];
  17. //ehash
  18. $ecms_hashur=hReturnEcmsHashStrAll();
  19. //验证权限
  20. CheckLevel($logininid,$loginin,$classid,"feedback");
  21. $id=(int)$_GET['id'];
  22. $r=$empire->fetch1("select * from {$dbtbpre}enewsfeedback where id='$id' limit 1");
  23. if(!$r[id])
  24. {
  25. printerror('ErrorUrl','');
  26. }
  27. $bidr=ReturnAdminFeedbackClass($r['bid'],$logininid,$loginin);
  28. //是否已读
  29. if(empty($r['haveread']))
  30. {
  31. $empire->query("update {$dbtbpre}enewsfeedback set haveread=1 where id='$id' limit 1");
  32. }
  33. $br=$empire->fetch1("select bname,enter,filef from {$dbtbpre}enewsfeedbackclass where bid='$r[bid]'");
  34. $username="游客";
  35. if($r['userid'])
  36. {
  37. $username="<a href='../member/AddMember.php?enews=EditMember&userid=".$r['userid'].$ecms_hashur['ehref']."' target=_blank>".$r['username']."</a>";
  38. }
  39. $fpath=0;
  40. $getfpath=0;
  41. $record="<!--record-->";
  42. $field="<!--field--->";
  43. $er=explode($record,$br['enter']);
  44. $count=count($er);
  45. for($i=0;$i<$count-1;$i++)
  46. {
  47. $er1=explode($field,$er[$i]);
  48. //附件
  49. if(strstr($br['filef'],",".$er1[1].","))
  50. {
  51. if($r[$er1[1]])
  52. {
  53. if(!$getfpath)
  54. {
  55. $filename=GetFilename($r[$er1[1]]);
  56. $filer=$empire->fetch1("select fpath from {$dbtbpre}enewsfile_other where modtype=4 and path='$r[filepath]' and filename='$filename' limit 1");
  57. $fpath=$filer[fpath];
  58. $getfpath=1;
  59. }
  60. $fspath=ReturnFileSavePath(0,$fpath);
  61. $fileurl=$fspath['fileurl'].$r[$er1[1]];
  62. $val="<b>附件:</b><a href='".$fileurl."' target=_blank>".$r[$er1[1]]."</a>";
  63. }
  64. else
  65. {
  66. $val="";
  67. }
  68. }
  69. else
  70. {
  71. $val=stripSlashes($r[$er1[1]]);
  72. }
  73. $feedbackinfo.="<tr bgcolor='#FFFFFF'><td height=25>".$er1[0].":</td><td>".nl2br($val)."</td></tr>";
  74. }
  75. ?>
  76. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
  77. <html>
  78. <head>
  79. <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  80. <title>查看反馈信息</title>
  81. <link href="../adminstyle/<?=$loginadminstyleid?>/adminstyle.css" rel="stylesheet" type="text/css">
  82. </head>
  83. <body>
  84. <table width="100%" border="0" align="center" cellpadding="3" cellspacing="1" class=tableborder style="WORD-BREAK: break-all; WORD-WRAP: break-word">
  85. <tr class=header>
  86. <td height="25" colspan="2">所属分类:<?=$br[bname]?></td>
  87. </tr>
  88. <tr bgcolor="#FFFFFF">
  89. <td width="19%" height="25">提交者:</td>
  90. <td width="81%" height="25">
  91. <?=$username?>
  92. </td>
  93. </tr>
  94. <tr bgcolor="#FFFFFF">
  95. <td height="25">发布时间:</td>
  96. <td height="25">
  97. <?=$r[saytime]?>
  98. </td>
  99. </tr>
  100. <tr bgcolor="#FFFFFF">
  101. <td height="25">IP地址:</td>
  102. <td height="25">
  103. <?=$r[ip]?>:<?=$r[eipport]?>
  104. </td>
  105. </tr>
  106. <?=$feedbackinfo?>
  107. <tr bgcolor="#FFFFFF">
  108. <td height="25" colspan="2"><div align="center">[ <a href="javascript:window.close();">关
  109. 闭</a> ]</div></td>
  110. </tr>
  111. </table>
  112. </body>
  113. </html>
  114. <?php
  115. db_close();
  116. $empire=null;
  117. ?>