ManageMembers.template.php 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330
  1. <?php
  2. /**
  3. * Simple Machines Forum (SMF)
  4. *
  5. * @package SMF
  6. * @author Simple Machines
  7. * @copyright 2011 Simple Machines
  8. * @license http://www.simplemachines.org/about/smf/license.php BSD
  9. *
  10. * @version 2.1 Alpha 1
  11. */
  12. function template_search_members()
  13. {
  14. global $context, $settings, $options, $scripturl, $txt;
  15. echo '
  16. <div id="admincenter">
  17. <form action="', $scripturl, '?action=admin;area=viewmembers" method="post" accept-charset="', $context['character_set'], '">
  18. <div class="cat_bar">
  19. <h3 class="catbg">
  20. <span class="floatleft">', $txt['search_for'], '</span>
  21. <span class="smalltext floatright">', $txt['wild_cards_allowed'], '</span>
  22. </h3>
  23. </div>
  24. <input type="hidden" name="sa" value="query" />
  25. <div class="windowbg">
  26. <span class="topslice"><span></span></span>
  27. <div class="content">
  28. <div class="flow_hidden">
  29. <div class="msearch_details floatleft">
  30. <dl class="settings right">
  31. <dt class="righttext">
  32. <strong><label for="mem_id">', $txt['member_id'], ':</label></strong>
  33. <select name="types[mem_id]">
  34. <option value="--">&lt;</option>
  35. <option value="-">&lt;=</option>
  36. <option value="=" selected="selected">=</option>
  37. <option value="+">&gt;=</option>
  38. <option value="++">&gt;</option>
  39. </select>
  40. </dt>
  41. <dd>
  42. <input type="text" name="mem_id" id="mem_id" value="" size="6" class="input_text" />
  43. </dd>
  44. <dt class="righttext">
  45. <strong><label for="age">', $txt['age'], ':</label></strong>
  46. <select name="types[age]">
  47. <option value="--">&lt;</option>
  48. <option value="-">&lt;=</option>
  49. <option value="=" selected="selected">=</option>
  50. <option value="+">&gt;=</option>
  51. <option value="++">&gt;</option>
  52. </select>
  53. </dt>
  54. <dd>
  55. <input type="text" name="age" id="age" value="" size="6" class="input_text" />
  56. </dd>
  57. <dt class="righttext">
  58. <strong><label for="posts">', $txt['member_postcount'], ':</label></strong>
  59. <select name="types[posts]">
  60. <option value="--">&lt;</option>
  61. <option value="-">&lt;=</option>
  62. <option value="=" selected="selected">=</option>
  63. <option value="+">&gt;=</option>
  64. <option value="++">&gt;</option>
  65. </select>
  66. </dt>
  67. <dd>
  68. <input type="text" name="posts" id="posts" value="" size="6" class="input_text" />
  69. </dd>
  70. <dt class="righttext">
  71. <strong><label for="reg_date">', $txt['date_registered'], ':</label></strong>
  72. <select name="types[reg_date]">
  73. <option value="--">&lt;</option>
  74. <option value="-">&lt;=</option>
  75. <option value="=" selected="selected">=</option>
  76. <option value="+">&gt;=</option>
  77. <option value="++">&gt;</option>
  78. </select>
  79. </dt>
  80. <dd>
  81. <input type="text" name="reg_date" id="reg_date" value="" size="10" class="input_text" /><span class="smalltext">', $txt['date_format'], '</span>
  82. </dd>
  83. <dt class="righttext">
  84. <strong><label for="last_online">', $txt['viewmembers_online'], ':</label></strong>
  85. <select name="types[last_online]">
  86. <option value="--">&lt;</option>
  87. <option value="-">&lt;=</option>
  88. <option value="=" selected="selected">=</option>
  89. <option value="+">&gt;=</option>
  90. <option value="++">&gt;</option>
  91. </select>
  92. </dt>
  93. <dd>
  94. <input type="text" name="last_online" id="last_online" value="" size="10" class="input_text" /><span class="smalltext">', $txt['date_format'], '</span>
  95. </dd>
  96. </dl>
  97. </div>
  98. <div class="msearch_details floatright">
  99. <dl class="settings right">
  100. <dt class="righttext">
  101. <strong><label for="membername">', $txt['username'], ':</label></strong>
  102. </dt>
  103. <dd>
  104. <input type="text" name="membername" id="membername" value="" class="input_text" />
  105. </dd>
  106. <dt class="righttext">
  107. <strong><label for="email">', $txt['email_address'], ':</label></strong>
  108. </dt>
  109. <dd>
  110. <input type="text" name="email" id="email" value="" class="input_text" />
  111. </dd>
  112. <dt class="righttext">
  113. <strong><label for="website">', $txt['website'], ':</label></strong>
  114. </dt>
  115. <dd>
  116. <input type="text" name="website" id="website" value="" class="input_text" />
  117. </dd>
  118. <dt class="righttext">
  119. <strong><label for="location">', $txt['location'], ':</label></strong>
  120. </dt>
  121. <dd>
  122. <input type="text" name="location" id="location" value="" class="input_text" />
  123. </dd>
  124. <dt class="righttext">
  125. <strong><label for="ip">', $txt['ip_address'], ':</label></strong>
  126. </dt>
  127. <dd>
  128. <input type="text" name="ip" id="ip" value="" class="input_text" />
  129. </dd>
  130. <dt class="righttext">
  131. <strong><label for="messenger">', $txt['messenger_address'], ':</label></strong>
  132. </dt>
  133. <dd>
  134. <input type="text" name="messenger" id="messenger" value="" class="input_text" />
  135. </dd>
  136. </dl>
  137. </div>
  138. </div>
  139. <div class="flow_hidden">
  140. <div class="msearch_details floatleft">
  141. <fieldset>
  142. <legend>', $txt['gender'], '</legend>
  143. <label for="gender-0"><input type="checkbox" name="gender[]" value="0" id="gender-0" checked="checked" class="input_check" /> ', $txt['undefined_gender'], '</label>&nbsp;&nbsp;
  144. <label for="gender-1"><input type="checkbox" name="gender[]" value="1" id="gender-1" checked="checked" class="input_check" /> ', $txt['male'], '</label>&nbsp;&nbsp;
  145. <label for="gender-2"><input type="checkbox" name="gender[]" value="2" id="gender-2" checked="checked" class="input_check" /> ', $txt['female'], '</label>
  146. </fieldset>
  147. </div>
  148. <div class="msearch_details floatright">
  149. <fieldset>
  150. <legend>', $txt['activation_status'], '</legend>
  151. <label for="activated-0"><input type="checkbox" name="activated[]" value="1" id="activated-0" checked="checked" class="input_check" /> ', $txt['activated'], '</label>&nbsp;&nbsp;
  152. <label for="activated-1"><input type="checkbox" name="activated[]" value="0" id="activated-1" checked="checked" class="input_check" /> ', $txt['not_activated'], '</label>
  153. </fieldset>
  154. </div>
  155. </div>
  156. </div>
  157. <span class="botslice clear_right"><span></span></span>
  158. </div>
  159. <br class="clear" />
  160. <div class="title_bar">
  161. <h3 class="titlebg">', $txt['member_part_of_these_membergroups'], '</h3>
  162. </div>
  163. <div class="flow_hidden">
  164. <table width="49%" class="table_grid floatleft">
  165. <thead>
  166. <tr class="catbg">
  167. <th scope="col" class="first_th">', $txt['membergroups'], '</th>
  168. <th scope="col">', $txt['primary'], '</th>
  169. <th scope="col" class="last_th">', $txt['additional'], '</th>
  170. </tr>
  171. </thead>
  172. <tbody>';
  173. foreach ($context['membergroups'] as $membergroup)
  174. echo '
  175. <tr class="windowbg2">
  176. <td>', $membergroup['name'], '</td>
  177. <td align="center">
  178. <input type="checkbox" name="membergroups[1][]" value="', $membergroup['id'], '" checked="checked" class="input_check" />
  179. </td>
  180. <td align="center">
  181. ', $membergroup['can_be_additional'] ? '<input type="checkbox" name="membergroups[2][]" value="' . $membergroup['id'] . '" checked="checked" class="input_check" />' : '', '
  182. </td>
  183. </tr>';
  184. echo '
  185. <tr class="windowbg2">
  186. <td>
  187. <em>', $txt['check_all'], '</em>
  188. </td>
  189. <td align="center">
  190. <input type="checkbox" onclick="invertAll(this, this.form, \'membergroups[1]\');" checked="checked" class="input_check" />
  191. </td>
  192. <td align="center">
  193. <input type="checkbox" onclick="invertAll(this, this.form, \'membergroups[2]\');" checked="checked" class="input_check" />
  194. </td>
  195. </tr>
  196. </tbody>
  197. </table>
  198. <table width="49%" class="table_grid floatright">
  199. <thead>
  200. <tr class="catbg">
  201. <th scope="col" class="first_th">
  202. ', $txt['membergroups_postgroups'], '
  203. </th>
  204. <th class="last_th">&nbsp;</th>
  205. </tr>
  206. </thead>
  207. <tbody>';
  208. foreach ($context['postgroups'] as $postgroup)
  209. echo '
  210. <tr class="windowbg2">
  211. <td>
  212. ', $postgroup['name'], '
  213. </td>
  214. <td width="40" align="center">
  215. <input type="checkbox" name="postgroups[]" value="', $postgroup['id'], '" checked="checked" class="input_check" />
  216. </td>
  217. </tr>';
  218. echo '
  219. <tr class="windowbg2">
  220. <td>
  221. <em>', $txt['check_all'], '</em>
  222. </td>
  223. <td align="center">
  224. <input type="checkbox" onclick="invertAll(this, this.form, \'postgroups[]\');" checked="checked" class="input_check" />
  225. </td>
  226. </tr>
  227. </tbody>
  228. </table>
  229. </div><br />
  230. <input type="submit" value="', $txt['search'], '" class="button_submit" />
  231. </form>
  232. </div>
  233. <br class="clear" />';
  234. }
  235. function template_admin_browse()
  236. {
  237. global $context, $settings, $options, $scripturl, $txt, $modSettings;
  238. echo '
  239. <div id="admincenter">';
  240. template_show_list('approve_list');
  241. // If we have lots of outstanding members try and make the admin's life easier.
  242. if ($context['approve_list']['total_num_items'] > 20)
  243. {
  244. echo '
  245. <br />
  246. <form action="', $scripturl, '?action=admin;area=viewmembers" method="post" accept-charset="', $context['character_set'], '" name="postFormOutstanding" id="postFormOutstanding" onsubmit="return onOutstandingSubmit();">
  247. <div class="cat_bar">
  248. <h3 class="catbg">', $txt['admin_browse_outstanding'], '</h3>
  249. </div>
  250. <script type="text/javascript"><!-- // --><![CDATA[
  251. function onOutstandingSubmit()
  252. {
  253. if (document.forms.postFormOutstanding.todo.value == "")
  254. return;
  255. var message = "";
  256. if (document.forms.postFormOutstanding.todo.value.indexOf("delete") != -1)
  257. message = "', $txt['admin_browse_w_delete'], '";
  258. else if (document.forms.postFormOutstanding.todo.value.indexOf("reject") != -1)
  259. message = "', $txt['admin_browse_w_reject'], '";
  260. else if (document.forms.postFormOutstanding.todo.value == "remind")
  261. message = "', $txt['admin_browse_w_remind'], '";
  262. else
  263. message = "', $context['browse_type'] == 'approve' ? $txt['admin_browse_w_approve'] : $txt['admin_browse_w_activate'], '";
  264. if (confirm(message + " ', $txt['admin_browse_outstanding_warn'], '"))
  265. return true;
  266. else
  267. return false;
  268. }
  269. // ]]></script>
  270. <div class="windowbg">
  271. <span class="topslice"><span></span></span>
  272. <div class="content">
  273. <dl class="settings">
  274. <dt>
  275. ', $txt['admin_browse_outstanding_days_1'], ':
  276. </dt>
  277. <dd>
  278. <input type="text" name="time_passed" value="14" maxlength="4" size="3" class="input_text" /> ', $txt['admin_browse_outstanding_days_2'], '.
  279. </dd>
  280. <dt>
  281. ', $txt['admin_browse_outstanding_perform'], ':
  282. </dt>
  283. <dd>
  284. <select name="todo">
  285. ', $context['browse_type'] == 'activate' ? '
  286. <option value="ok">' . $txt['admin_browse_w_activate'] . '</option>' : '', '
  287. <option value="okemail">', $context['browse_type'] == 'approve' ? $txt['admin_browse_w_approve'] : $txt['admin_browse_w_activate'], ' ', $txt['admin_browse_w_email'], '</option>', $context['browse_type'] == 'activate' ? '' : '
  288. <option value="require_activation">' . $txt['admin_browse_w_approve_require_activate'] . '</option>', '
  289. <option value="reject">', $txt['admin_browse_w_reject'], '</option>
  290. <option value="rejectemail">', $txt['admin_browse_w_reject'], ' ', $txt['admin_browse_w_email'], '</option>
  291. <option value="delete">', $txt['admin_browse_w_delete'], '</option>
  292. <option value="deleteemail">', $txt['admin_browse_w_delete'], ' ', $txt['admin_browse_w_email'], '</option>', $context['browse_type'] == 'activate' ? '
  293. <option value="remind">' . $txt['admin_browse_w_remind'] . '</option>' : '', '
  294. </select>
  295. </dd>
  296. </dl>
  297. <input type="submit" value="', $txt['admin_browse_outstanding_go'], '" class="button_submit" />
  298. <input type="hidden" name="type" value="', $context['browse_type'], '" />
  299. <input type="hidden" name="sort" value="', $context['approve_list']['sort']['id'], '" />
  300. <input type="hidden" name="start" value="', $context['approve_list']['start'], '" />
  301. <input type="hidden" name="orig_filter" value="', $context['current_filter'], '" />
  302. <input type="hidden" name="sa" value="approve" />', !empty($context['approve_list']['sort']['desc']) ? '
  303. <input type="hidden" name="desc" value="1" />' : '', '
  304. </div>
  305. <span class="botslice"><span></span></span>
  306. </div>
  307. <input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '" />
  308. </form>';
  309. }
  310. echo '
  311. </div>
  312. <br class="clear" />';
  313. }
  314. ?>