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 20KB

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