darkroom.htm 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. <!--{template common/header}-->
  2. <div id="pt" class="bm cl">
  3. <div class="z">
  4. <a href="./" class="nvhm" title="{lang homepage}">$_G[setting][bbname]</a> <em>&rsaquo;</em>
  5. <a href="forum.php?mod=misc&action=showdarkroom">{lang darkroom}</a>
  6. </div>
  7. </div>
  8. <div style="margin:10px 0;">
  9. <table id="darkroomtable" summary="{lang darkroom}" cellspacing="0" cellpadding="0" class="bm dt">
  10. <tr>
  11. <th class="xw1" style="width:105px;">{lang username}</th>
  12. <th class="xw1" style="width:135px;">{lang crime_action}</th>
  13. <th class="xw1" style="width:155px;">{lang expire_dateline}</th>
  14. <th class="xw1" style="width:155px;">{lang crime_dateline}</th>
  15. <th class="xw1">{lang crime_reason}</th>
  16. </tr>
  17. <!--{if $crimelist}-->
  18. <!--{eval $i = 0;}-->
  19. <!--{loop $crimelist $crime}-->
  20. <!--{eval $i++;}-->
  21. <tr id="darkroomuid_$crime[uid]" {if $i % 2 == 0} class="alt"{/if}>
  22. <td><a href="home.php?mod=space&uid=$crime[uid]" targe="_blank">$crime[username]</a></td>
  23. <td>$crime[action]</td>
  24. <td>$crime[groupexpiry]</td>
  25. <td>$crime[dateline]</td>
  26. <td>$crime[reason]</td>
  27. </tr>
  28. <!--{/loop}-->
  29. </table>
  30. <!--{if $dataexist == 1}-->
  31. <div class="bm bw0 pgs cl">
  32. <span class="pgb y"><div class="pg"><a href="javascript:;" class="nxt" id="darkroommore" cid="$cid">{lang more}</a></div></span>
  33. </div>
  34. <!--{/if}-->
  35. <!--{else}-->
  36. <tr>
  37. <td colspan="6" align="center">{lang darkroom_no_users}</td>
  38. </tr>
  39. </table>
  40. <!--{/if}-->
  41. </div>
  42. <script type="text/javascript">
  43. (function() {
  44. if($('darkroommore')) {
  45. $('darkroommore').onclick = function() {
  46. var obj = this;
  47. var cid = parseInt(obj.getAttribute('cid').valueOf());
  48. var url = 'forum.php?mod=misc&action=showdarkroom&cid=' + cid + '&t=' + parseInt((+new Date()/1000)/(Math.random()*1000));
  49. var table = $('darkroomtable');
  50. var tablerows = table.rows.length;
  51. var x = new Ajax('JSON');
  52. x.getJSON(url, function(s) {
  53. if(s && s.message) {
  54. if(s.message.dataexist == 1) {
  55. obj.setAttribute('cid', s.message.cid);
  56. } else {
  57. obj.style.display = 'none';
  58. }
  59. var list = s.data;
  60. for(i in list) {
  61. if($('darkroomuid_' + list[i].uid)) {
  62. continue;
  63. }
  64. var newtr = table.insertRow(tablerows);
  65. if(tablerows % 2 == 0) {
  66. newtr.className = 'alt';
  67. }
  68. newtr.insertCell(0).innerHTML = '<a href="home.php?mod=space&uid=' + list[i].uid + '" target="_blank">' + list[i].username + '</a>';
  69. newtr.insertCell(1).innerHTML = list[i].action;
  70. newtr.insertCell(2).innerHTML = list[i].groupexpiry;
  71. newtr.insertCell(3).innerHTML = list[i].dateline;
  72. newtr.insertCell(4).innerHTML = list[i].reason;
  73. tablerows++;
  74. }
  75. }
  76. });
  77. };
  78. }
  79. })();
  80. </script>
  81. <!--{template common/footer}-->