gbook.temp.php 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142
  1. <?php
  2. if(!defined('InEmpireCMS'))
  3. {
  4. exit();
  5. }
  6. //位置
  7. $url="$spacename &gt; 留言";
  8. include("header.temp.php");
  9. $viewuid=(int)getcvar('mluserid');
  10. $adminmenu='';
  11. if($viewuid==$userid)
  12. {
  13. $adminmenu="<a href='../member/mspace/gbook.php' target='_blank'>管理留言</a>";
  14. }
  15. ?>
  16. <?=$spacegg?>
  17. <table width="100%" border="0" cellpadding="3" cellspacing="1" bgcolor="#96C8F1">
  18. <tr>
  19. <td height="24" background="template/default/images/bg_title_sider.gif">
  20. <table width="100%" border="0" cellspacing="0" cellpadding="0">
  21. <tr>
  22. <td>留言板</td>
  23. <td align="right"><?=$adminmenu?></td>
  24. </tr>
  25. </table>
  26. </td>
  27. </tr>
  28. <tr>
  29. <td bgcolor="#FFFFFF">
  30. <?php
  31. while($r=$empire->fetch($sql))
  32. {
  33. $r['uname']=stripSlashes($r['uname']);
  34. if($r['uid'])
  35. {
  36. $r['uname']="<b><a href='../space/?userid=$r[uid]' target='_blank'>$r[uname]</a></b>";
  37. }
  38. //管理菜单
  39. $adminlink='';
  40. $ip='';
  41. if($adminmenu)
  42. {
  43. $ip=' IP: '.$r[ip];
  44. $adminlink="[<a href='#ecms' onclick=\"window.open('../member/mspace/ReGbook.php?gid=$r[gid]','','width=600,height=380,scrollbars=yes');\">回复</a>]&nbsp;&nbsp;[<a href='../member/mspace/?enews=DelMemberGbook&gid=$r[gid]' onclick=\"return confirm('确认要删除?');\">删除</a>]";
  45. }
  46. $gbuname=$r[uname]." 留言于".$r[addtime].$ip;
  47. //私密
  48. if($r['isprivate'])
  49. {
  50. if($adminmenu||($r[uid]&&$viewuid==$r[uid]))
  51. {
  52. $r['gbtext']="<font color='blue'>[悄悄话] ".$r['gbtext']."</font>";
  53. }
  54. else
  55. {
  56. $r['gbtext']='[悄悄话隐藏]';
  57. }
  58. }
  59. ?>
  60. <table width="100%" border="0" align="center" cellpadding="3" cellspacing="1" class="tableborder">
  61. <tr>
  62. <td height="23"><table width="100%" border="0" cellspacing="0" cellpadding="0">
  63. <tr>
  64. <td width="76%"><?=$gbuname?></td>
  65. <td width="24%"><div align="right"><?=$adminlink?></div></td>
  66. </tr>
  67. </table></td>
  68. </tr>
  69. <tr bgcolor="#FFFFFF">
  70. <td height="25" style='word-break:break-all'>
  71. <?=nl2br(stripSlashes($r['gbtext']))?>
  72. <?
  73. if($r['retext'])
  74. {
  75. ?>
  76. <table border=0 width='100%' cellspacing=1 cellpadding=10 bgcolor='#cccccc'>
  77. <tr>
  78. <td width='100%' bgcolor='#FFFFFF' style='word-break:break-all'>
  79. <?=nl2br(stripSlashes($r['retext']))?>
  80. </td>
  81. </tr>
  82. </table>
  83. <?
  84. }
  85. ?>
  86. </td>
  87. </tr>
  88. </table>
  89. <br>
  90. <?php
  91. }
  92. ?>
  93. <table width="100%" border="0" cellspacing="0" cellpadding="0">
  94. <tr>
  95. <td height="25">&nbsp;<?=$returnpage?></td>
  96. </tr>
  97. </table>
  98. </td>
  99. </tr>
  100. </table>
  101. <br>
  102. <table width="100%" border="0" cellpadding="3" cellspacing="1" bgcolor="#96C8F1">
  103. <tr>
  104. <td background="template/default/images/bg_title_sider.gif"><b>添加留言</b></td>
  105. </tr>
  106. <tr>
  107. <td bgcolor="#FFFFFF">
  108. <table width="100%" border="0" cellspacing="1" cellpadding="3">
  109. <form name="addgbook" method="post" action="../member/mspace/index.php">
  110. <input type="hidden" name="userid" value="<?=$userid?>">
  111. <input type="hidden" name="enews" value="AddMemberGbook">
  112. <tr>
  113. <td width="16%">昵称:</td>
  114. <td width="84%"><input name="uname" type="text" id="uname" value="<?=RepPostStr(getcvar('mlusername'),1)?>">
  115. 私密
  116. <input name="isprivate" type="checkbox" id="isprivate" value="1"></td>
  117. </tr>
  118. <tr>
  119. <td valign="top">内容:</td>
  120. <td><textarea name="gbtext" cols="60" rows="5" id="gbtext"></textarea></td>
  121. </tr>
  122. <tr>
  123. <td>验证码:</td>
  124. <td>
  125. <table width="100%" border="0" cellspacing="0" cellpadding="0">
  126. <tr>
  127. <td width="52"><input name="key" type="text" id="key" size="6" /></td>
  128. <td id="spacegbshowkey"><a href="#EmpireCMS" onclick="edoshowkey('spacegbshowkey','spacegb','<?=$public_r['newsurl']?>');" title="点击显示验证码">点击显示验证码</a></td>
  129. </tr>
  130. </table></td>
  131. </tr>
  132. <tr>
  133. <td>&nbsp;</td>
  134. <td><input type="submit" name="Submit" value="发表留言"></td>
  135. </tr>
  136. </form>
  137. </table></td>
  138. </tr>
  139. </table>
  140. <?php
  141. include("footer.temp.php");
  142. ?>