comparison forum/Themes/default/Modlog.template.php @ 76:e3e11437ecea website

Add forum code
author Chris Cannam
date Sun, 07 Jul 2013 11:25:48 +0200
parents
children
comparison
equal deleted inserted replaced
75:72f59aa7e503 76:e3e11437ecea
1 <?php
2 // Version: 1.1; Modlog
3
4 function template_main()
5 {
6 global $context, $settings, $options, $scripturl, $txt, $modSettings;
7
8 echo '
9 <form action="', $scripturl, '?action=modlog" method="post" accept-charset="', $context['character_set'], '">
10 <input type="hidden" name="order" value="', $context['order'], '" />
11 <input type="hidden" name="dir" value="', $context['dir'], '" />
12 <input type="hidden" name="start" value="', $context['start'], '" />
13 <div class="tborder">
14 <table border="0" cellspacing="1" cellpadding="4" width="100%">
15 <tr class="titlebg">
16 <td>
17 <div style="float: left;"><a href="', $scripturl, '?action=helpadmin;help=modlog" onclick="return reqWin(this.href);" class="help"><img src="' . $settings['images_url'] . '/helptopics.gif" alt="' . $txt[119] . '" align="top" /></a> ', $txt['modlog_moderation_log'], '</div>
18 <div align="right">', empty($context['search_params']) ? $txt['modlog_total_entries'] : $txt['modlog_search_result'], ': ', $context['entry_count'], '</div>
19 </td>
20 </tr>
21 <tr class="windowbg">
22 <td class="smalltext" style="padding: 2ex;">', $txt['modlog_moderation_log_desc'], '</td>
23 </tr>';
24
25 // Only display page numbers if not a result of a search.
26 if (!empty($context['page_index']))
27 echo '
28 <tr class="catbg">
29 <td>', $txt[139], ': ', $context['page_index'], '</td>
30 </tr>';
31 echo '
32 </table>
33 <table border="0" cellspacing="1" cellpadding="4" width="100%">
34 <tr class="titlebg">
35 <td width="10" align="center"><input type="checkbox" name="all" class="check" onclick="invertAll(this, this.form);" /></td>';
36
37 foreach ($context['columns'] as $column)
38 {
39 if (!empty($column['not_sortable']))
40 echo '
41 <td>', $column['label'], '</td>';
42 else
43 {
44 echo '
45 <td><a href="' . $column['href'] . '">';
46 if ($column['selected'])
47 echo '<b>', $column['label'], '</b> <img src="', $settings['images_url'], '/sort_', $context['sort_direction'], '.gif" alt="" />';
48 else
49 echo $column['label'];
50 echo '</a></td>';
51 }
52 }
53
54 echo '
55 </tr>';
56
57 foreach ($context['entries'] as $entry)
58 {
59 echo '
60 <tr class="windowbg2">
61 <td rowspan="2" class="windowbg" align="center"><input type="checkbox" class="check" name="delete[]" value="', $entry['id'], '"', $entry['editable'] ? '' : ' disabled="disabled"', ' /></td>
62 <td>', $entry['action'], '</td>
63 <td>', $entry['time'], '</td>
64 <td>', $entry['moderator']['link'], '</td>
65 <td>', $entry['position'], '</td>
66 <td>', $entry['ip'], '</td>
67 </tr>
68 <tr>
69 <td colspan="5" class="windowbg">';
70
71 foreach ($entry['extra'] as $key => $value)
72 echo '
73 <i>', $key, '</i>: ', $value;
74 echo '
75 </td>
76 </tr>';
77 }
78
79 if (empty($context['entries']))
80 echo '
81 <tr>
82 <td class="windowbg2" align="center" colspan="7">
83 <b>', $txt['modlog_no_entries_found'], '</b>
84 </td>
85 </tr>';
86
87 echo '
88 </table>
89 <table border="0" cellspacing="1" cellpadding="4" width="100%">
90 <tr class="titlebg">
91 <td align="right" valign="bottom">
92 <div style="float: left;">
93 ', $txt['modlog_search'], ' (', $txt['modlog_by'], ': ', $context['search']['label'], '):
94 <input type="text" name="search" size="18" value="', $context['search']['string'], '" /> <input type="submit" value="', $txt['modlog_go'], '" />
95 </div>
96
97 <input type="submit" name="remove" value="', $txt['modlog_remove'], '" />
98 <input type="submit" name="removeall" value="', $txt['modlog_removeall'], '" />
99 </td>
100 </tr>';
101
102 if (!empty($context['page_index']))
103 echo '
104 <tr class="catbg">
105 <td>', $txt[139], ': ', $context['page_index'], '</td>
106 </tr>';
107
108 echo '
109 </table>
110 </div>
111 <input type="hidden" name="sc" value="', $context['session_id'], '" />
112 </form>';
113 }
114
115 ?>