BioTorrents.de’s version of Gazelle
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

advanced-user-search.twig 21KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471
  1. {% from 'macro/form.twig' import checked, selected %}
  2. <div class="thin">
  3. <form class="search_form" name="users" action="user.php" method="get">
  4. <input type="hidden" name="action" value="search" />
  5. <table class="layout"><tr>
  6. <td style="vertical-align:top;"><table class="layout">
  7. <tr>
  8. <td class="label nobr">Username:</td>
  9. <td>
  10. <input type="text" name="username" size="20" value="{{ username }}" />
  11. </td>
  12. </tr>
  13. <tr>
  14. <td class="label nobr">Email address:</td>
  15. <td>
  16. <input type="text" name="email" size="20" value="{{ email }}" />
  17. </td>
  18. </tr>
  19. <tr>
  20. <td class="label tooltip nobr" title="To fuzzy search (default) for a block of addresses
  21. (e.g. 55.66.77.*), enter &quot;55.66.77.&quot; withou'] ?? '')?>t the quotes">Site IP:</td>
  22. <td>
  23. <input type="text" name="ip" size="20" value="{{ ip }}" />
  24. </td>
  25. </tr>
  26. <tr>
  27. <td class="label nobr">Tracker IP:<br />
  28. <div style="padding-left: 20px; text-align: left;">
  29. <input type="radio" name="tracker-src" id="tracker-src-live" value="live"{{ checked(tracker_live_source) }} />
  30. <label class="tooltip" for="tracker-src" title="Search for client ip addresses currently connecting to the tracker" for="tracker-src-live">Live</label><br />
  31. <input type="radio" name="tracker-src" id="tracker-src-hist" value="hist"{{ checked(not tracker_live_source) }} />
  32. <label class="tooltip" for="tracker-src" title="Search for ip addresses that have been seen by the tracker (but may be not connected at this time)" for="tracker-src-hist">Historical</label>
  33. </div>
  34. </td>
  35. <td>
  36. <input type="text" name="tracker_ip" size="20" value="{{ tracker_ip }}" />
  37. </td>
  38. </tr>
  39. <tr>
  40. <td class="label nobr">Staff notes:</td>
  41. <td>
  42. <input type="text" name="comment" size="20" value="{{ comment }}" />
  43. </td>
  44. </tr>
  45. <tr>
  46. <td class="label nobr">Passkey:</td>
  47. <td>
  48. <input type="text" name="passkey" size="20" value="{{ passkey }}" />
  49. </td>
  50. </tr>
  51. <tr>
  52. <td class="label tooltip nobr" title="Supports partial URL matching, e.g. entering
  53. &quot;&#124;https://ptpimg.me&quot; will search for avatars hosted on https://phpimg.me">Avatar URL:</td>
  54. <td>
  55. <input type="text" name="avatar" size="20" value="{{ avatar }}" />
  56. </td>
  57. </tr>
  58. <tr>
  59. <td class="label nobr">Last.fm username:</td>
  60. <td>
  61. <input type="text" name="lastfm" size="20" value="{{ lastfm }}" />
  62. </td>
  63. </tr>
  64. <tr>
  65. <td class="nobr" colspan="2">
  66. <h4>Extra</h4>
  67. <ul class="options_list nobullet">
  68. <li title="Only display users that have a disabled account linked by IP address">
  69. <input type="checkbox" name="disabled_ip" id="disabled_ip"{{ checked(check_disabled_ip) }} />
  70. <label for="disabled_ip">Disabled accounts linked by IP</label>
  71. </li>
  72. <li>
  73. <input type="checkbox" name="ip_history" id="ip_history"{{ checked(check_ip_history) }} />
  74. <label title="Disabled accounts linked by IP must also be checked" for="ip_history">IP history</label>
  75. </li>
  76. <li>
  77. <input type="checkbox" name="email_history" id="email_history"{{ checked(check_email_history) }} />
  78. <label title="Also search the email addresses the member used in the past" for="email_history">Email history</label>
  79. </li>
  80. </ul>
  81. </tr>
  82. </table></td>
  83. {# new column #}
  84. <td style="vertical-align:top;"><table class="layout">
  85. <tr>
  86. <td class="label nobr">Joined:</td>
  87. <td style="white-space: nowrap;">
  88. <select name="joined">
  89. <option value="on"{{ selected(joined_op == 'on') }}>On</option>
  90. <option value="before"{{ selected(joined_op == 'before') }}>Before</option>
  91. <option value="after"{{ selected(joined_op == 'after') }}>After</option>
  92. <option value="between"{{ selected(joined_op == 'between') }}>Between</option>
  93. </select>
  94. <input type="text" name="join1" size="10" value="{{ joined_min }}" placeholder="YYYY-MM-DD" />
  95. <input type="text" name="join2" size="10" value="{{ joined_max }}" placeholder="YYYY-MM-DD" />
  96. </td>
  97. </tr>
  98. <tr>
  99. <td class="label nobr">Last active:</td>
  100. <td style="white-space: nowrap;">
  101. <select name="lastactive">
  102. <option value="on"{{ selected(last_active_op == 'on') }}>On</option>
  103. <option value="before"{{ selected(last_active_op == 'before') }}>Before</option>
  104. <option value="after"{{ selected(last_active_op == 'after') }}>After</option>
  105. <option value="between"{{ selected(last_active_op == 'between') }}>Between</option>
  106. </select>
  107. <input type="text" name="lastactive1" size="10" value="{{ last_active_min }}" placeholder="YYYY-MM-DD" />
  108. <input type="text" name="lastactive2" size="10" value="{{ last_active_max }}" placeholder="YYYY-MM-DD" />
  109. </td>
  110. </tr>
  111. <tr>
  112. <td class="label nobr" title="The number of releases downloaded (may be greater than snatched">Downloads:</td>
  113. <td width="30%">
  114. <select name="downloads">
  115. <option value="off"{{ selected(downloads_op == 'off') }}>Off</option>
  116. <option value="equal"{{ selected(downloads_op == 'equal') }}>Equal</option>
  117. <option value="above"{{ selected(downloads_op == 'above') }}>Above</option>
  118. <option value="below"{{ selected(downloads_op == 'below') }}>Below</option>
  119. <option value="between"{{ selected(downloads_op == 'between') }}>Between</option>
  120. </select>
  121. <input type="text" name="downloads1" size="6" value="{{ downloads_min }}" />
  122. <input type="text" name="downloads2" size="6" value="{{ downloads_max }}" />
  123. </td>
  124. </tr>
  125. <tr>
  126. <td class="label nobr">Snatched:</td>
  127. <td width="30%">
  128. <select name="snatched">
  129. <option value="off"{{ selected(snatched_op == 'off') }}>Off</option>
  130. <option value="equal"{{ selected(snatched_op == 'equal') }}>Equal</option>
  131. <option value="above"{{ selected(snatched_op == 'above') }}>Above</option>
  132. <option value="below"{{ selected(snatched_op == 'below') }}>Below</option>
  133. <option value="between"{{ selected(snatched_op == 'between') }}>Between</option>
  134. </select>
  135. <input type="text" name="snatched1" size="6" value="{{ snatched_min }}" />
  136. <input type="text" name="snatched2" size="6" value="{{ snatched_max }}" />
  137. </td>
  138. </tr>
  139. <tr>
  140. <td class="label nobr">Seeding:</td>
  141. <td width="30%">
  142. <select name="seeding">
  143. <option value="off"{{ selected(seeding_op == 'off') }}>Off</option>
  144. <option value="equal"{{ selected(seeding_op == 'equal') }}>Equal</option>
  145. <option value="above"{{ selected(seeding_op == 'above') }}>Above</option>
  146. <option value="below"{{ selected(seeding_op == 'below') }}>Below</option>
  147. <option value="between"{{ selected(seeding_op == 'between') }}>Between</option>
  148. </select>
  149. <input type="text" name="seeding1" size="6" value="{{ seeding_min }}" />
  150. <input type="text" name="seeding2" size="6" value="{{ seeding_max }}" />
  151. </td>
  152. </tr>
  153. <tr>
  154. <td class="label tooltip nobr" title="Units are GiB">Data Uploaded:</td>
  155. <td width="30%">
  156. <select name="uploaded">
  157. <option value="equal"{{ selected(downloaded_op == 'equal') }}>Equal</option>
  158. <option value="above"{{ selected(downloaded_op == 'above') }}>Above</option>
  159. <option value="below"{{ selected(downloaded_op == 'below') }}>Below</option>
  160. <option value="between"{{ selected(downloaded_op == 'between') }}>Between</option>
  161. <option value="buffer"{{ selected(downloaded_op == 'buffer') }}>buffer</option>
  162. </select>
  163. <input type="text" name="uploaded1" size="6" value="{{ uploaded_min }}" />
  164. <input type="text" name="uploaded2" size="6" value="{{ uploaded_max }}" />
  165. </td>
  166. </tr>
  167. <tr>
  168. <td class="label tooltip nobr" title="Units are GiB">Data Downloaded:</td>
  169. <td width="30%">
  170. <select name="downloaded">
  171. <option value="equal"{{ selected(downloaded_op == 'equal') }}>Equal</option>
  172. <option value="above"{{ selected(downloaded_op == 'above') }}>Above</option>
  173. <option value="below"{{ selected(downloaded_op == 'below') }}>Below</option>
  174. <option value="between"{{ selected(downloaded_op == 'between') }}>Between</option>
  175. </select>
  176. <input type="text" name="downloaded1" size="6" value="{{ downloaded_min }}" />
  177. <input type="text" name="downloaded2" size="6" value="{{ downloaded_max }}" />
  178. </td>
  179. </tr>
  180. <tr>
  181. <td class="label tooltip nobr" title="Units are GiB">Request Bounty:</td>
  182. <td width="30%">
  183. <select name="bounty">
  184. <option value="equal"{{ selected(bounty_op == 'equal') }}>Equal</option>
  185. <option value="above"{{ selected(bounty_op == 'above') }}>Above</option>
  186. <option value="below"{{ selected(bounty_op == 'below') }}>Below</option>
  187. <option value="between"{{ selected(bounty_op == 'between') }}>Between</option>
  188. </select>
  189. <input type="text" name="bounty1" size="6" value="{{ bounty_min }}" />
  190. <input type="text" name="bounty2" size="6" value="{{ bounty_max }}" />
  191. </td>
  192. </tr>
  193. <tr>
  194. <td class="label nobr">Ratio:</td>
  195. <td width="30%">
  196. <select name="ratio">
  197. <option value="equal"{{ selected(ratio_op == 'equal') }}>Equal</option>
  198. <option value="above"{{ selected(ratio_op == 'above') }}>Above</option>
  199. <option value="below"{{ selected(ratio_op == 'below') }}>Below</option>
  200. <option value="between"{{ selected(ratio_op == 'between') }}>Between</option>
  201. </select>
  202. <input type="text" name="ratio1" size="6" value="{{ ratio_min }}" />
  203. <input type="text" name="ratio2" size="6" value="{{ ratio_max }}" />
  204. </td>
  205. </tr>
  206. <tr>
  207. <td class="label nobr"># of invites:</td>
  208. <td>
  209. <select name="invites">
  210. <option value="equal"{{ selected(invites_op == 'equal') }}>Equal</option>
  211. <option value="above"{{ selected(invites_op == 'above') }}>Above</option>
  212. <option value="below"{{ selected(invites_op == 'below') }}>Below</option>
  213. <option value="between"{{ selected(invites_op == 'between') }}>Between</option>
  214. </select>
  215. <input type="text" name="invites1" size="6" value="{{ invites_min }}" />
  216. <input type="text" name="invites2" size="6" value="{{ invites_max }}" />
  217. </td>
  218. </tr>
  219. <tr>
  220. <td width="30%" class="label nobr"># invited:</td>
  221. <td>
  222. <select name="invited">
  223. <option value="off"{{ selected(invited_op == 'off') }}>Off</option>
  224. <option value="equal"{{ selected(invited_op == 'equal') }}>Equal</option>
  225. <option value="above"{{ selected(invited_op == 'above') }}>Above</option>
  226. <option value="below"{{ selected(invited_op == 'below') }}>Below</option>
  227. <option value="between"{{ selected(invited_op == 'between') }}>Between</option>
  228. </select>
  229. <input type="text" name="invited1" size="6" value="{{ invited_min }}" />
  230. <input type="text" name="invited2" size="6" value="{{ invited_max }}" />
  231. </td>
  232. </tr>
  233. <tr>
  234. <td class="label nobr"># of emails:</td>
  235. <td>
  236. <select name="emails_opt">
  237. <option value="equal"{{ selected(email_op == 'any') }}>Equal</option>
  238. <option value="above"{{ selected(email_op == 'locked') }}>Above</option>
  239. <option value="below"{{ selected(email_op == 'unlocked') }}>Below</option>
  240. </select>
  241. <input type="text" name="email_cnt" size="6" value="{{ email_value }}" />
  242. </td>
  243. </tr>
  244. </table></td>
  245. {# new column #}
  246. <td style="vertical-align:top;"><table class="layout">
  247. <tr>
  248. <td class="label nobr">Primary class:</td>
  249. <td>
  250. <select name="class[]" size="3" multiple="multiple">
  251. {% for c in primary_class %}
  252. <option value="{{ c.ID }}"{{ selected(c.ID in primary_current) }}>{{ c.Name|shorten(12) }} ({{ c.Level }})</option>
  253. {% endfor %}
  254. </select>
  255. </td>
  256. </tr>
  257. <tr>
  258. <td class="label nobr">Secondary class:</td>
  259. <td>
  260. <select name="secclass">
  261. <option value=""{{ selected(sec_current == '') }}>Don't Care</option>
  262. {% for c in secondary_class %}
  263. <option value="{{ c.ID }}"{{ selected(sec_current == c.ID) }}>{{ c.Name|shorten(20) }}</option>
  264. {% endfor %}
  265. </select>
  266. </td>
  267. </tr>
  268. <tr>
  269. <td class="label nobr">Enabled:</td>
  270. <td>
  271. <select name="enabled">
  272. <option value=""{{ selected(enabled == '') }}>Don't Care</option>
  273. <option value="0"{{ selected(enabled == '0') }}>Unconfirmed</option>
  274. <option value="1"{{ selected(enabled == '1') }}>Enabled</option>
  275. <option value="2"{{ selected(enabled == '2') }}>Disabled</option>
  276. </select>
  277. </td>
  278. </tr>
  279. <tr>
  280. <td class="label nobr">Donor:</td>
  281. <td>
  282. <select name="donor">
  283. <option value=""{{ selected(donor == '') }}>Don't Care</option>
  284. <option value="yes"{{ selected(donor == 'yes') }}>Yes</option>
  285. <option value="no"{{ selected(donor == 'no') }}>No</option>
  286. </select>
  287. </td>
  288. </tr>
  289. <tr>
  290. <td class="label nobr">Warned:</td>
  291. <td>
  292. <select name="warned">
  293. <option value=""{{ selected(warned == '') }}>Don't Care</option>
  294. <option value="isnotnull"{{ selected(warned == 'isnotnull') }}>Yes</option>
  295. <option value="isnull"{{ selected(warned == 'isnull') }}>No</option>
  296. </select>
  297. </td>
  298. </tr>
  299. <tr>
  300. <td class="label nobr">Locked Account:</td>
  301. <td>
  302. <select name="lockedaccount">
  303. <option value="any"{{ selected(locked_account == 'any') }}>Don't Care</option>
  304. <option value="locked"{{ selected(locked_account == 'locked') }}>Locked</option>
  305. <option value="unlocked"{{ selected(locked_account == 'unlocked') }}>Unlocked</option>
  306. </select>
  307. </td>
  308. </tr>
  309. <tr>
  310. <td class="label nobr">Disabled invites:</td>
  311. <td>
  312. <select name="disabled_invites">
  313. <option value=""{{ selected(disabled_invites == '') }}>Don't Care</option>
  314. <option value="yes"{{ selected(disabled_invites == 'yes') }}>Yes</option>
  315. <option value="no"{{ selected(disabled_invites == 'no') }}>No</option>
  316. </select>
  317. </td>
  318. </tr>
  319. <tr>
  320. <td class="label nobr">Disabled uploads:</td>
  321. <td>
  322. <select name="disabled_uploads">
  323. <option value=""{{ selected(disabled_uploads == '') }}>Don't Care</option>
  324. <option value="yes"{{ selected(disabled_uploads == 'yes') }}>Yes</option>
  325. <option value="no"{{ selected(disabled_uploads == 'no') }}>No</option>
  326. </select>
  327. </td>
  328. </tr>
  329. <tr>
  330. <td class="label nobr">Stylesheet:</td>
  331. <td>
  332. <select name="stylesheet" id="stylesheet">
  333. <option value="">Don't Care</option>
  334. {% for s in stylesheet %}
  335. <option value="{{ s.ID }} "{{ selected(style_current == s.ID) }}>{{ s.ProperName }}</option>
  336. {% endfor %}
  337. </select>
  338. </td>
  339. </tr>
  340. <tr>
  341. <td class="label tooltip nobr" title="Two-letter codes as defined in ISO 3166-1 alpha-2">Country code:</td>
  342. <td width="30%">
  343. <select name="cc_op">
  344. <option value="equal"{{ selected(ccode_op == 'equal') }}>Equals</option>
  345. <option value="not_equal"{{ selected(ccode_op == 'not_equal') }}>Not equal</option>
  346. </select>
  347. <input type="text" name="cc" size="2" value="{{ ccode }}" />
  348. </td>
  349. </tr>
  350. <tr>
  351. <td class="label nobr">Search type:</td>
  352. <td>
  353. <ul class="options_list nobullet">
  354. <li>
  355. <input type="radio" name="matchtype" id="strict_match_type" value="strict"{{ checked(match_mode == 'strict') }} />
  356. <label class="tooltip" title="A &quot;strict&quot; search uses no wildcards in search fields,
  357. and it is analogous to &#96;grep -E &quot;&circ;SEARCHTERM&#36;&quot;&#96;" for="strict_match_type">Strict</label>
  358. </li>
  359. <li>
  360. <input type="radio" name="matchtype" id="fuzzy_match_type" value="fuzzy"{{ checked(match_mode == 'fuzzy') }} />
  361. <label class="tooltip" title="A &quot;fuzzy&quot; search automatically prepends and appends wildcards to
  362. search strings, except for IP address searches, unless the search string begins or ends with a
  363. &quot;&#124;&quot; (pipe). It is analogous to a vanilla grep search (except for the pipe stuff)." for="fuzzy_match_type">Fuzzy</label>
  364. </li>
  365. <li>
  366. <input type="radio" name="matchtype" id="regexp_match_type" value="regexp"{{ checked(match_mode == 'regexp') }} />
  367. <label class="tooltip" title="A &quot;regexp&quot; search uses MySQL's regular expression syntax." for="regexp_match_type">Regexp</label>
  368. </li>
  369. </ul>
  370. </td>
  371. </tr>
  372. </table></td>
  373. </tr>
  374. </table>
  375. {# end last column #}
  376. Results ordered <select name="order">
  377. {% for field in field_by %}
  378. <option value="{{ field }}"{{ selected(field == field_current)}}>{{ field }}</option>
  379. {% endfor %}
  380. </select>
  381. <select name="way">
  382. {% for dir in order_by %}
  383. <option value="{{ dir }}"{{ selected(dir == order_current) }}>{{ dir }}</option>
  384. {% endfor %}
  385. </select>
  386. <input type="submit" value=" Search " />
  387. </form>
  388. </div>
  389. {{ paginator.linkbox|raw }}
  390. <div class="box pad center">
  391. <h2>{{ total|number_format }} result{{ total|plural }}</h2>
  392. <table width="100%">
  393. <tr class="colhead">
  394. <td>Username</td>
  395. <td>Email</td>
  396. <td>Joined</td>
  397. <td>Last seen</td>
  398. <td>Upload</td>
  399. <td>Download</td>
  400. <td>Ratio</td>
  401. <td>Bounty</td>
  402. <td>Downloads</td>
  403. <td>Snatched</td>
  404. <td>Seeding</td>
  405. <td>Invites</td>
  406. {% if show_invited %}
  407. <td>Invited</td>
  408. {% endif %}
  409. </tr>
  410. {% for u in page %}
  411. <tr class="row{{ cycle(['a', 'b'], loop.index0) }}">
  412. <td>{{ u.user_id|user_full }}</td>
  413. <td>{{ u.email }}</td>
  414. <td>{{ u.join_date|time_diff }}</td>
  415. <td>{{ u.last_access|time_diff }}</td>
  416. <td>{{ u.uploaded|octet_size }}</td>
  417. <td>{{ u.downloaded|octet_size }}</td>
  418. <td>{{ ratio(u.uploaded, u.downloaded) }}</td>
  419. <td>{{ u.bounty|octet_size }}</td>
  420. <td>{{ u.downloads|number_format }}</td>
  421. <td>{% if u.snatches is numeric %}{{ u.snatches|number_format }}{% else %}{{ u.snatches }}{% endif %}</td>
  422. <td>{% if u.seeding is numeric %}{{ u.seeding|number_format }}{% else %}{{ u.seeding }}{% endif %}</td>
  423. <td>{{ u.invites|number_format }}{% if u.disable_invites %}<span title="Invites are disabled">&nbsp;&nbsp;&#x1F6AB;</span>{% endif %}</td>
  424. {% if show_invited %}
  425. <td>{{ u.invited|number_format }}</td>
  426. {% endif %}
  427. </tr>
  428. {% endfor %}
  429. </table>
  430. </div>
  431. {{ paginator.linkbox|raw }}