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