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.

edit.php 43KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409
  1. <?php
  2. #declare(strict_types = 1);
  3. require_once SERVER_ROOT.'/classes/twofa.class.php';
  4. $UserID = $_REQUEST['userid'];
  5. if (!is_number($UserID)) {
  6. error(404);
  7. }
  8. $DB->query("
  9. SELECT
  10. m.Username,
  11. m.TwoFactor,
  12. m.PublicKey,
  13. m.Email,
  14. m.IRCKey,
  15. m.Paranoia,
  16. i.Info,
  17. i.Avatar,
  18. i.StyleID,
  19. i.StyleURL,
  20. i.SiteOptions,
  21. i.UnseededAlerts,
  22. p.Level AS Class,
  23. i.InfoTitle
  24. FROM users_main AS m
  25. JOIN users_info AS i ON i.UserID = m.ID
  26. LEFT JOIN permissions AS p ON p.ID = m.PermissionID
  27. WHERE m.ID = ?", $UserID);
  28. list($Username, $TwoFactor, $PublicKey, $Email, $IRCKey, $Paranoia, $Info, $Avatar, $StyleID, $StyleURL, $SiteOptions, $UnseededAlerts, $Class, $InfoTitle) = $DB->next_record(MYSQLI_NUM, [5, 10]);
  29. $TwoFA = new TwoFactorAuth();
  30. $Email = apcu_exists('DBKEY') ? Crypto::decrypt($Email) : '[Encrypted]';
  31. if ((int) $UserID !== $LoggedUser['ID'] && !check_perms('users_edit_profiles', $Class)) {
  32. error(403);
  33. }
  34. $Paranoia = json_decode($Paranoia, true);
  35. if (!is_array($Paranoia)) {
  36. $Paranoia = [];
  37. }
  38. function paranoia_level($Setting)
  39. {
  40. global $Paranoia;
  41. // 0: very paranoid; 1: stats allowed, list disallowed; 2: not paranoid
  42. return (in_array($Setting . '+', $Paranoia)) ? 0 : (in_array($Setting, $Paranoia) ? 1 : 2);
  43. }
  44. function display_paranoia($FieldName)
  45. {
  46. $Level = paranoia_level($FieldName);
  47. echo "<label><input type='checkbox' name='p_{$FieldName}_c'" . checked($Level >= 1) . " onchange='AlterParanoia()' /> Show count</label>&nbsp;";
  48. echo "<label><input type='checkbox' name='p_{$FieldName}_l'" . checked($Level >= 2) . " onchange='AlterParanoia()' /> Show list</label>&nbsp;";
  49. }
  50. function checked($Checked)
  51. {
  52. return ($Checked ? ' checked="checked"' : '');
  53. }
  54. if ($SiteOptions) {
  55. $SiteOptions = json_decode($SiteOptions, true) ?? [];
  56. } else {
  57. $SiteOptions = [];
  58. }
  59. /**
  60. * Show header
  61. */
  62. View::show_header(
  63. "$Username $ENV->CRUMB Settings",
  64. 'user,password_validate,validate,cssgallery,preview_paranoia,bbcode,user_settings,donor_titles,vendor/easymde.min',
  65. 'vendor/easymde.min'
  66. );
  67. $DonorRank = Donations::get_rank($UserID);
  68. $DonorIsVisible = Donations::is_visible($UserID);
  69. if ($DonorIsVisible === null) {
  70. $DonorIsVisible = true;
  71. }
  72. extract(Donations::get_enabled_rewards($UserID));
  73. $Rewards = Donations::get_rewards($UserID);
  74. $ProfileRewards = Donations::get_profile_rewards($UserID);
  75. ?>
  76. <div>
  77. <div class="header">
  78. <h2>
  79. <?=Users::format_username($UserID, false, false, false)?>
  80. <?=$ENV->CRUMB?> Settings
  81. </h2>
  82. </div>
  83. <!-- Side menu / settings filter -->
  84. <form class="edit_form" name="user" id="userform" method="post" autocomplete="off">
  85. <div class="sidebar">
  86. <div class="box" id="settings_sections">
  87. <div class="head">
  88. <strong>Sections</strong>
  89. </div>
  90. <ul class="nobullet">
  91. <li data-gazelle-section-id="all_settings">
  92. <h2>
  93. <a href="#">All Settings</a>
  94. </h2>
  95. </li>
  96. <li data-gazelle-section-id="site_appearance">
  97. <h2>
  98. <a href="#">Site Appearance</a>
  99. </h2>
  100. </li>
  101. <li data-gazelle-section-id="torrent_settings">
  102. <h2>
  103. <a href="#">Torrents</a>
  104. </h2>
  105. </li>
  106. <li data-gazelle-section-id="community_settings">
  107. <h2>
  108. <a href="#">Community</a>
  109. </h2>
  110. </li>
  111. <li data-gazelle-section-id="notification_settings">
  112. <h2>
  113. <a href="#">Notifications</a>
  114. </h2>
  115. </li>
  116. <li data-gazelle-section-id="profile_settings">
  117. <h2>
  118. <a href="#">Profile</a>
  119. </h2>
  120. </li>
  121. <li data-gazelle-section-id="paranoia_settings">
  122. <h2>
  123. <a href="#">Paranoia</a>
  124. </h2>
  125. </li>
  126. <li data-gazelle-section-id="security_settings">
  127. <h2>
  128. <a href="#">Security</a>
  129. </h2>
  130. </li>
  131. <li data-gazelle-section-id="live_search">
  132. <input type="text" id="settings_search" placeholder="Filter settings" />
  133. </li>
  134. <li>
  135. <input type="submit" id="submit" value="Save profile" />
  136. </li>
  137. </ul>
  138. </div>
  139. </div>
  140. <div class="main_column">
  141. <div>
  142. <input type="hidden" name="action" value="take_edit" />
  143. <input type="hidden" name="userid" value="<?=$UserID?>" />
  144. <input type="hidden" name="auth"
  145. value="<?=$LoggedUser['AuthKey']?>" />
  146. </div>
  147. <!-- Site Appearance -->
  148. <table cellpadding="6" cellspacing="1" border="0" width="100%" class="layout border user_options"
  149. id="site_appearance">
  150. <tr class="colhead_dark">
  151. <td colspan="2">
  152. <strong>Site Appearance</strong>
  153. </td>
  154. </tr>
  155. <!-- Stylesheet -->
  156. <tr id="site_style_tr">
  157. <td class="label">
  158. <strong>Stylesheet</strong>
  159. </td>
  160. <td>
  161. <select name="stylesheet" id="stylesheet">
  162. <?php foreach ($Stylesheets as $Style) { ?>
  163. <option value="<?=($Style['ID'])?>"
  164. <?=(int) $Style['ID'] === $StyleID ? ' selected="selected"' : ''?>><?=($Style['ProperName'])?>
  165. </option>
  166. <?php } ?>
  167. </select>
  168. &ensp;
  169. <a data-toggle-target="#css_gallery" class="brackets">Show gallery</a>
  170. <div id="css_gallery" class="hidden">
  171. <?php foreach ($Stylesheets as $Style) { ?>
  172. <div class="preview_wrapper">
  173. <div class="preview_image"
  174. name="<?=($Style['Name'])?>">
  175. <img
  176. src="<?=STATIC_SERVER.'styles/preview/thumb_'.$Style['Name'].'.png'?>"
  177. alt="<?=$Style['Name']?>" />
  178. <p class="preview_name">
  179. <label><input type="radio" name="stylesheet_gallery"
  180. value="<?=($Style['ID'])?>" />
  181. <?=($Style['ProperName'])?></label>
  182. </p>
  183. </div>
  184. </div>
  185. <?php } ?>
  186. </div>
  187. </td>
  188. </tr>
  189. <!-- Stylesheet additions -->
  190. <tr id="style_additions_tr"
  191. class="<?=($Stylesheets[$LoggedUser['StyleID']]['Additions'][0] ?? false)?'':'hidden'?>">
  192. <td class="label">
  193. <strong>Stylesheet additions</strong>
  194. </td>
  195. <td>
  196. <?php
  197. foreach ($Stylesheets as $Style) {
  198. $StyleAdditions = explode(';', $Style['Additions']);
  199. # Main ul
  200. echo '<ul class="nobullet style_addition'; # open quote
  201. echo ($Style['ID'] === $Stylesheets[$LoggedUser['StyleID']]['ID'])
  202. ? '"'
  203. : ' hidden"';
  204. echo ' id="style_addition_' . $Style['Name'] . '">';
  205. $Checked = (in_array('default_font', $SiteOptions['StyleAdditions'] ?? [])
  206. ? 'checked'
  207. : '');
  208. echo <<<HTML
  209. <li>
  210. <input type="radio" name="style_additions[]" value="default_font"
  211. id="default_font" $Checked />
  212. <label for="default_font">default_font</label>
  213. </li>
  214. HTML;
  215. # For each style addition
  216. foreach ($StyleAdditions as $i => $Addition) {
  217. # Radio options, e.g., fonts
  218. if (preg_match('/radio/', $Addition)) {
  219. $Addition = explode('=', $Addition)[1];
  220. $Checked = (in_array($Addition, $SiteOptions['StyleAdditions'] ?? [])
  221. ? 'checked'
  222. : '');
  223. echo <<<HTML
  224. <li>
  225. <input type="radio" name="style_additions[]" value="$Addition"
  226. id="addition_$Addition" $Checked />
  227. <label for="addition_$Addition">$Addition</label>
  228. </li>
  229. HTML;
  230. }
  231. # Checkbox options, e.g., pink and haze
  232. if (preg_match('/checkbox/', $Addition)) {
  233. $Addition = explode('=', $Addition)[1];
  234. $Checked = (in_array($Addition, $SiteOptions['StyleAdditions'] ?? [])
  235. ? 'checked'
  236. : '');
  237. echo <<<HTML
  238. <li>
  239. <input type="checkbox" name="style_additions[]" value="$Addition"
  240. id="addition_$Addition" $Checked />
  241. <label for="addition_$Addition">$Addition</label>
  242. </li>
  243. HTML;
  244. }
  245. }
  246. echo '</ul>';
  247. } ?>
  248. </td>
  249. </tr>
  250. <!-- External stylesheet URL -->
  251. <tr id="site_extstyle_tr">
  252. <td class="label">
  253. <strong>External stylesheet URL</strong>
  254. </td>
  255. <td>
  256. <input type="text" size="40" name="styleurl" id="styleurl"
  257. value="<?=display_str($StyleURL)?>" />
  258. </td>
  259. </tr>
  260. <!-- Profile stats -->
  261. <?php if (check_perms('users_mod')) { ?>
  262. <tr id="site_autostats_tr">
  263. <td class="label tooltip" title="Staff Only">
  264. <strong>Profile stats</strong>
  265. </td>
  266. <td>
  267. <label>
  268. <input type="checkbox" name="autoload_comm_stats" <?Format::selected(
  269. 'AutoloadCommStats' ,
  270. 1,
  271. 'checked',
  272. $SiteOptions
  273. ); ?>
  274. />
  275. Automatically fetch the snatch and peer stats on profile pages
  276. </label>
  277. </td>
  278. </tr>
  279. <?php } ?>
  280. </table>
  281. <!-- Torrents -->
  282. <table cellpadding="6" cellspacing="1" border="0" width="100%" class="layout border user_options"
  283. id="torrent_settings">
  284. <tr class="colhead_dark">
  285. <td colspan="2">
  286. <strong>Torrents</strong>
  287. </td>
  288. </tr>
  289. <!-- Default search type -->
  290. <?php if (check_perms('site_advanced_search')) { ?>
  291. <tr id="tor_searchtype_tr">
  292. <td class="label">
  293. <strong>Default search type</strong>
  294. </td>
  295. <td>
  296. <ul class="options_list nobullet">
  297. <li>
  298. <input type="radio" name="searchtype" id="search_type_simple" value="0" <?=(int)$SiteOptions['SearchType']===0?' checked="checked"':''?>
  299. />
  300. <label for="search_type_simple">Simple</label>
  301. </li>
  302. <li>
  303. <input type="radio" name="searchtype" id="search_type_advanced" value="1" <?=(int)$SiteOptions['SearchType']===1?' checked="checked"':''?>
  304. />
  305. <label for="search_type_advanced">Advanced</label>
  306. </li>
  307. </ul>
  308. </td>
  309. </tr>
  310. <?php } ?>
  311. <!-- Torrent grouping -->
  312. <tr id="tor_group_tr">
  313. <td class="label">
  314. <strong>Torrent grouping</strong>
  315. </td>
  316. <td>
  317. <div class="option_group">
  318. <input type="checkbox" name="disablegrouping" id="disablegrouping" <?=$SiteOptions['DisableGrouping2'] === 0 ? ' checked="checked"' : ''?>
  319. />
  320. <label for="disablegrouping">Enable torrent grouping</label>
  321. </div>
  322. </td>
  323. </tr>
  324. <!-- Torrent group display -->
  325. <tr id="tor_gdisp_search_tr">
  326. <td class="label">
  327. <strong>Torrent group display</strong>
  328. </td>
  329. <td>
  330. <div class="option_group">
  331. <ul class="options_list nobullet">
  332. <li>
  333. <input type="radio" name="torrentgrouping" id="torrent_grouping_open" value="0" <?=$SiteOptions['TorrentGrouping'] === 0 ? ' checked="checked"' : ''?>
  334. />
  335. <label for="torrent_grouping_open">Open</label>
  336. </li>
  337. <li>
  338. <input type="radio" name="torrentgrouping" id="torrent_grouping_closed" value="1" <?=$SiteOptions['TorrentGrouping'] === 1 ? ' checked="checked"' : ''?>
  339. />
  340. <label for="torrent_grouping_closed">Closed</label>
  341. </li>
  342. </ul>
  343. </div>
  344. </td>
  345. </tr>
  346. <!-- Snatched torrents indicator -->
  347. <tr id="tor_snatched_tr">
  348. <td class="label">
  349. <strong>Snatched torrents indicator</strong>
  350. </td>
  351. <td>
  352. <input type="checkbox" name="showsnatched" id="showsnatched" <?=!empty($SiteOptions['ShowSnatched']) ? ' checked="checked"' : ''?>
  353. />
  354. <label for="showsnatched">Enable snatched torrents indicator</label>
  355. </td>
  356. </tr>
  357. <!-- Cover art (torrents) -->
  358. <tr id="tor_cover_tor_tr">
  359. <td class="label">
  360. <strong>Cover art (torrents)</strong>
  361. </td>
  362. <td>
  363. <ul class="options_list nobullet">
  364. <li>
  365. <input type="hidden" name="coverart" value="" />
  366. <input type="checkbox" name="coverart" id="coverart" <?=!isset($SiteOptions['CoverArt']) || $SiteOptions['CoverArt'] ? ' checked="checked"' : ''?>
  367. />
  368. <label for="coverart">Enable cover artwork</label>
  369. </li>
  370. <li>
  371. <input type="checkbox" name="show_extra_covers" id="show_extra_covers" <?=$SiteOptions['ShowExtraCovers'] ? ' checked="checked"' : ''?>
  372. />
  373. <label for="show_extra_covers">Enable additional cover artwork</label>
  374. </li>
  375. </ul>
  376. </td>
  377. </tr>
  378. <!-- Cover art (collections) -->
  379. <tr id="tor_cover_coll_tr">
  380. <td class="label">
  381. <strong>Cover art (collections)</strong>
  382. </td>
  383. <td>
  384. <select name="collagecovers" id="collagecovers">
  385. <option value="10" <?=$SiteOptions['CollageCovers'] === 10 ? ' selected="selected"' : ''?>>10
  386. </option>
  387. <option value="25" <?=($SiteOptions['CollageCovers'] === 25 || !isset($SiteOptions['CollageCovers'])) ? ' selected="selected"' : ''?>>25
  388. (default)</option>
  389. <option value="50" <?=$SiteOptions['CollageCovers'] === 50 ? ' selected="selected"' : ''?>>50
  390. </option>
  391. <option value="100" <?=$SiteOptions['CollageCovers'] === 100 ? ' selected="selected"' : ''?>>100
  392. </option>
  393. <option value="1000000" <?=$SiteOptions['CollageCovers'] === 1000000 ? ' selected="selected"' : ''?>>All
  394. </option>
  395. <option value="0" <?=($SiteOptions['CollageCovers'] === 0 || (!isset($SiteOptions['CollageCovers']) && $SiteOptions['HideCollage'])) ? ' selected="selected"' : ''?>>None
  396. </option>
  397. </select>
  398. covers per page
  399. </td>
  400. </tr>
  401. <!-- Torrent search filters -->
  402. <tr id="tor_showfilt_tr">
  403. <td class="label">
  404. <strong>Torrent search filters</strong>
  405. </td>
  406. <td>
  407. <ul class="options_list nobullet">
  408. <li>
  409. <input type="checkbox" name="showtfilter" id="showtfilter" <?=(!isset($SiteOptions['ShowTorFilter']) || $SiteOptions['ShowTorFilter'] ? ' checked="checked"' : '')?>
  410. />
  411. <label for="showtfilter">Display filter controls</label>
  412. </li>
  413. <li>
  414. <input type="checkbox" name="showtags" id="showtags" <?php Format::selected('ShowTags', 1, 'checked', $SiteOptions); ?>
  415. />
  416. <label for="showtags">Display official tag filters</label>
  417. </li>
  418. </ul>
  419. </td>
  420. </tr>
  421. <!-- Autocompletion -->
  422. <tr id="tor_autocomp_tr">
  423. <td class="label">
  424. <strong>Autocompletion</strong>
  425. </td>
  426. <td>
  427. <select name="autocomplete">
  428. <option value="0" <?=empty($SiteOptions['AutoComplete']) ? ' selected="selected"' : ''?>>Everywhere
  429. </option>
  430. <option value="2" <?=$SiteOptions['AutoComplete'] === 2 ? ' selected="selected"' : ''?>>Searches
  431. only</option>
  432. <option value="1" <?=$SiteOptions['AutoComplete'] === 1 ? ' selected="selected"' : ''?>>Disable
  433. </option>
  434. </select>
  435. </td>
  436. </tr>
  437. </table>
  438. <!-- Community -->
  439. <table cellpadding="6" cellspacing="1" border="0" width="100%" class="layout border user_options"
  440. id="community_settings">
  441. <tr class="colhead_dark">
  442. <td colspan="2">
  443. <strong>Community</strong>
  444. </td>
  445. </tr>
  446. <!-- Posts per page (forums) -->
  447. <tr id="comm_ppp_tr">
  448. <td class="label">
  449. <strong>Posts per page (forums)</strong>
  450. </td>
  451. <td>
  452. <select name="postsperpage" id="postsperpage">
  453. <option value="25" <?=$SiteOptions['PostsPerPage'] === 25 ? ' selected="selected"' : ''?>>25
  454. (default)</option>
  455. <option value="50" <?=$SiteOptions['PostsPerPage'] === 50 ? ' selected="selected"' : ''?>>50
  456. </option>
  457. <option value="100" <?=$SiteOptions['PostsPerPage'] === 100 ? ' selected="selected"' : ''?>>100
  458. </option>
  459. </select>
  460. posts per page
  461. </td>
  462. </tr>
  463. <!-- Inbox sorting -->
  464. <tr id="comm_inbsort_tr">
  465. <td class="label">
  466. <strong>Inbox sorting</strong>
  467. </td>
  468. <td>
  469. <input type="checkbox" name="list_unread_pms_first" id="list_unread_pms_first" <?=!empty($SiteOptions['ListUnreadPMsFirst']) ? ' checked="checked"' : ''?>
  470. />
  471. <label for="list_unread_pms_first">List unread private messages first</label>
  472. </td>
  473. </tr>
  474. <!-- Emoticons -->
  475. <tr id="comm_emot_tr">
  476. <td class="label">
  477. <strong>Emoticons</strong>
  478. </td>
  479. <td>
  480. <input type="checkbox" name="disablesmileys" id="disablesmileys" <?=!empty($SiteOptions['DisableSmileys']) ? ' checked="checked"' : ''?>
  481. />
  482. <label for="disablesmileys">Disable emoticons</label>
  483. </td>
  484. </tr>
  485. <!-- Avatar display (posts) -->
  486. <tr id="comm_avatars_tr">
  487. <td class="label">
  488. <strong>Avatar display (posts)</strong>
  489. </td>
  490. <td>
  491. <select name="disableavatars" id="disableavatars">
  492. <option value="1" <?=(int)$SiteOptions['DisableAvatars'] === 1 ? ' selected="selected"' : ''?>>Disable
  493. avatars</option>
  494. <option value="0" <?=(int)$SiteOptions['DisableAvatars'] === 0 ? ' selected="selected"' : ''?>>Show
  495. avatars</option>
  496. </select>
  497. </td>
  498. </tr>
  499. <!-- Auto-save reply text -->
  500. <tr id="comm_autosave_tr">
  501. <td class="label">
  502. <strong>Auto-save reply text</strong>
  503. </td>
  504. <td>
  505. <input type="checkbox" name="disableautosave" id="disableautosave" <?=!empty($SiteOptions['DisableAutoSave']) ? ' checked="checked"' : ''?>
  506. />
  507. <label for="disableautosave">Disable text auto-saving</label>
  508. </td>
  509. </tr>
  510. <!-- Displayed badges -->
  511. <tr id="comm_badge_tr">
  512. <td class="label">
  513. <strong>Displayed badges</strong>
  514. </td>
  515. <td>
  516. <?php
  517. $Badges = Badges::get_badges($UserID);
  518. if (empty($Badges)) {
  519. ?><span>You have no badges :(</span><?php
  520. } else {
  521. $Count = 0;
  522. foreach ($Badges as $BadgeID => $Displayed) { ?>
  523. <input type="checkbox" name="badges[]" class="badge_checkbox"
  524. value="<?=$BadgeID?>" <?=($Displayed)?"checked ":""?>/>
  525. <?=Badges::display_badge($BadgeID, true)?>
  526. <?php
  527. $Count++;
  528. echo ($Count % 8) ? '' : '<br>';
  529. }
  530. } ?>
  531. </td>
  532. </tr>
  533. </table>
  534. <!-- Notifications -->
  535. <table cellpadding="6" cellspacing="1" border="0" width="100%" class="layout border user_options"
  536. id="notification_settings">
  537. <tr class="colhead_dark">
  538. <td colspan="2">
  539. <strong>Notifications</strong>
  540. </td>
  541. </tr>
  542. <!-- Automatic thread subscriptions -->
  543. <tr id="notif_autosubscribe_tr">
  544. <td class="label">
  545. <strong>Automatic thread subscriptions</strong>
  546. </td>
  547. <td>
  548. <input type="checkbox" name="autosubscribe" id="autosubscribe" <?=!empty($SiteOptions['AutoSubscribe']) ? ' checked="checked"' : ''?>
  549. />
  550. <label for="autosubscribe">Enable automatic thread subscriptions</label>
  551. </td>
  552. </tr>
  553. <!-- Unseeded torrent alerts -->
  554. <tr id="notif_unseeded_tr">
  555. <td class="label">
  556. <strong>Unseeded torrent alerts</strong>
  557. </td>
  558. <td>
  559. <input type="checkbox" name="unseededalerts" id="unseededalerts" <?=checked($UnseededAlerts)?> />
  560. <label for="unseededalerts">Enable unseeded torrent alerts</label>
  561. </td>
  562. </tr>
  563. <?php NotificationsManagerView::render_settings(NotificationsManager::get_settings($UserID)); ?>
  564. </table>
  565. <!-- Profile -->
  566. <table cellpadding="6" cellspacing="1" border="0" width="100%" class="layout border user_options"
  567. id="profile_settings">
  568. <tr class="colhead_dark">
  569. <td colspan="2">
  570. <strong>Profile</strong>
  571. </td>
  572. </tr>
  573. <!-- Avatar URL -->
  574. <tr id="pers_avatar_tr">
  575. <td class="label tooltip" title="512 KiB max size / 600 px max height">
  576. <strong>Avatar URL</strong>
  577. </td>
  578. <td>
  579. <input type="text" size="50" name="avatar" id="avatar"
  580. value="<?=display_str($Avatar)?>" />
  581. </td>
  582. </tr>
  583. <!-- Second avatar URL -->
  584. <?php if ($HasSecondAvatar) { ?>
  585. <tr id="pers_avatar2_tr">
  586. <td class="label">
  587. <strong>Second avatar URL</strong>
  588. </td>
  589. <td>
  590. <input type="text" size="50" name="second_avatar" id="second_avatar"
  591. value="<?=$Rewards['SecondAvatar']?>" />
  592. </td>
  593. </tr>
  594. <?php }
  595. # Avatar mouseover text
  596. if ($HasAvatarMouseOverText) { ?>
  597. <tr id="pers_avatarhover_tr">
  598. <td class="label">
  599. <strong>Avatar mouseover text</strong>
  600. </td>
  601. <td>
  602. <input type="text" size="50" name="avatar_mouse_over_text" id="avatar_mouse_over_text"
  603. value="<?=$Rewards['AvatarMouseOverText']?>" />
  604. </td>
  605. </tr>
  606. <?php }
  607. # Donor icon mouseover text
  608. if ($HasDonorIconMouseOverText) { ?>
  609. <tr id="pers_donorhover_tr">
  610. <td class="label">
  611. <strong>Donor icon mouseover text</strong>
  612. </td>
  613. <td>
  614. <input type="text" size="50" name="donor_icon_mouse_over_text" id="donor_icon_mouse_over_text"
  615. value="<?=$Rewards['IconMouseOverText']?>" />
  616. </td>
  617. </tr>
  618. <?php }
  619. # Donor icon link
  620. if ($HasDonorIconLink) { ?>
  621. <tr id="pers_donorlink_tr">
  622. <td class="label">
  623. <strong>Donor icon link</strong>
  624. </td>
  625. <td>
  626. <input type="text" size="50" name="donor_icon_link" id="donor_icon_link"
  627. value="<?=$Rewards['CustomIconLink']?>" />
  628. </td>
  629. </tr>
  630. <?php }
  631. # Custom donor icon URL
  632. if ($HasCustomDonorIcon) { ?>
  633. <tr id="pers_donoricon_tr">
  634. <td class="label">
  635. <strong>Custom donor icon URL</strong>
  636. </td>
  637. <td>
  638. <input type="text" size="50" name="donor_icon_custom_url" id="donor_icon_custom_url"
  639. value="<?=$Rewards['CustomIcon']?>" />
  640. </td>
  641. </tr>
  642. <?php } ?>
  643. <!-- Profile title 1 -->
  644. <tr id="pers_proftitle_tr">
  645. <td class="label">
  646. <strong>Profile title 1</strong>
  647. </td>
  648. <td>
  649. <input type="text" size="50" name="profile_title" id="profile_title"
  650. value="<?=display_str($InfoTitle)?>" />
  651. </td>
  652. </tr>
  653. <!-- Profile info 1 -->
  654. <tr id="pers_profinfo_tr">
  655. <td class="label">
  656. <strong>Profile info 1</strong>
  657. </td>
  658. <td>
  659. <?php
  660. $textarea = new TEXTAREA_PREVIEW(
  661. $Name = 'info',
  662. $ID = 'info',
  663. $Value = display_str($Info) ?? '',
  664. ); ?>
  665. </td>
  666. </tr>
  667. <!-- Excuse this numbering confusion, we start numbering our profile info/titles at 1 in the donor_rewards table -->
  668. <?php if ($HasProfileInfo1) { ?>
  669. <tr id="pers_proftitle2_tr">
  670. <td class="label">
  671. <strong>Profile title 2</strong>
  672. </td>
  673. <td>
  674. <input type="text" size="50" name="profile_title_1" id="profile_title_1"
  675. value="<?=display_str($ProfileRewards['ProfileInfoTitle1'])?>" />
  676. </td>
  677. </tr>
  678. <!-- 2 -->
  679. <tr id="pers_profinfo2_tr">
  680. <td class="label">
  681. <strong>Profile info 2</strong>
  682. </td>
  683. <td>
  684. <?php
  685. $textarea = new TEXTAREA_PREVIEW(
  686. $Name = 'profile_info_1',
  687. $ID = 'profile_info_1',
  688. $Value = display_str($ProfileRewards['ProfileInfo1']) ?? '',
  689. ); ?>
  690. </td>
  691. </tr>
  692. <?php }
  693. # 3
  694. if ($HasProfileInfo2) { ?>
  695. <tr id="pers_proftitle3_tr">
  696. <td class="label">
  697. <strong>Profile title 3</strong>
  698. </td>
  699. <td>
  700. <input type="text" size="50" name="profile_title_2" id="profile_title_2"
  701. value="<?=display_str($ProfileRewards['ProfileInfoTitle2'])?>" />
  702. </td>
  703. </tr>
  704. <!-- 3 -->
  705. <tr id="pers_profinfo3_tr">
  706. <td class="label">
  707. <strong>Profile info 3</strong>
  708. </td>
  709. <td>
  710. <?php
  711. $textarea = new TEXTAREA_PREVIEW(
  712. $Name = 'profile_info_2',
  713. $ID = 'profile_info_2',
  714. $Value = display_str($ProfileRewards['ProfileInfo2']) ?? '',
  715. ); ?>
  716. </td>
  717. </tr>
  718. <?php }
  719. # 4
  720. if ($HasProfileInfo3) { ?>
  721. <tr id="pers_proftitle4_tr">
  722. <td class="label">
  723. <strong>Profile title 4</strong>
  724. </td>
  725. <td>
  726. <input type="text" size="50" name="profile_title_3" id="profile_title_3"
  727. value="<?=display_str($ProfileRewards['ProfileInfoTitle3'])?>" />
  728. </td>
  729. </tr>
  730. <!-- 4 -->
  731. <tr id="pers_profinfo4_tr">
  732. <td class="label">
  733. <strong>Profile info 4</strong>
  734. </td>
  735. <td>
  736. <?php
  737. $textarea = new TEXTAREA_PREVIEW(
  738. $Name = 'profile_info_3',
  739. $ID = 'profile_info_3',
  740. $Value = display_str($ProfileRewards['ProfileInfo3']) ?? '',
  741. ); ?>
  742. </td>
  743. </tr>
  744. <?php }
  745. # 5
  746. if ($HasProfileInfo4) { ?>
  747. <tr id="pers_proftitle5_tr">
  748. <td class="label">
  749. <strong>Profile title 5</strong>
  750. </td>
  751. <td>
  752. <input type="text" size="50" name="profile_title_4" id="profile_title_4"
  753. value="<?=display_str($ProfileRewards['ProfileInfoTitle4'])?>" />
  754. </td>
  755. </tr>
  756. <!-- 5 -->
  757. <tr id="pers_profinfo5_tr">
  758. <td class="label">
  759. <strong>Profile info 5</strong>
  760. </td>
  761. <td>
  762. <?php
  763. $textarea = new TEXTAREA_PREVIEW(
  764. $Name = 'profile_info_4',
  765. $ID = 'profile_info_4',
  766. $Value = display_str($ProfileRewards['ProfileInfo4']) ?? '',
  767. ); ?>
  768. </td>
  769. </tr>
  770. <?php } ?>
  771. </table>
  772. <!-- Paranoia -->
  773. <table cellpadding="6" cellspacing="1" border="0" width="100%" class="layout border user_options"
  774. id="paranoia_settings">
  775. <tr class="colhead_dark">
  776. <td colspan="2">
  777. <strong>Paranoia</strong>
  778. </td>
  779. </tr>
  780. <tr>
  781. <td class="label">&nbsp;</td>
  782. <td>
  783. <p>
  784. <strong>Select the profile elements you wish to display to other users.</strong>
  785. </p>
  786. <p>
  787. For example, if you select "Show count" for "Requests (filled)," the number of requests you have filled
  788. will be visible.
  789. If you select "Show bounty," the amount of request bounty you have received will be visible.
  790. If you select "Show list," the full list of requests you have filled will be visible.
  791. </p>
  792. <p>
  793. <span class="warning">
  794. Note: Paranoia has nothing to do with your security on this site.
  795. These settings only determine if others can view your site activity.
  796. Some information will remain available in the site log.
  797. </span>
  798. </p>
  799. </td>
  800. </tr>
  801. <!-- Recent activity -->
  802. <tr id="para_lastseen_tr">
  803. <td class="label">
  804. <strong>Recent activity</strong>
  805. </td>
  806. <td>
  807. <label>
  808. <input type="checkbox" name="p_lastseen" <?=checked(!in_array('lastseen', $Paranoia))?>
  809. />
  810. Last seen
  811. </label>
  812. </td>
  813. </tr>
  814. <!-- Presets -->
  815. <tr id="para_presets_tr">
  816. <td class="label">
  817. <strong>Presets</strong>
  818. </td>
  819. <td>
  820. <input type="button" onclick="ParanoiaResetOff();" value="Everything" />
  821. <input type="button" onclick="ParanoiaResetStats();" value="Stats Only" />
  822. <input type="button" onclick="ParanoiaResetOn();" value="Nothing" />
  823. </td>
  824. </tr>
  825. <!-- Donations -->
  826. <tr id="para_donations_tr">
  827. <td class="label">
  828. <strong>Donations</strong>
  829. </td>
  830. <td>
  831. <input type="checkbox" id="p_donor_stats" name="p_donor_stats" onchange="AlterParanoia();" <?=$DonorIsVisible ? ' checked="checked"' : ''?>
  832. />
  833. <label for="p_donor_stats">Show donor stats</label>
  834. <input type="checkbox" id="p_donor_heart" name="p_donor_heart" onchange="AlterParanoia();" <?=checked(!in_array('hide_donor_heart', $Paranoia))?>
  835. />
  836. <label for="p_donor_heart">Show donor heart</label>
  837. </td>
  838. </tr>
  839. <!-- Statistics -->
  840. <tr id="para_stats_tr">
  841. <td class="label">
  842. <strong>Statistics</strong>
  843. </td>
  844. <td>
  845. <?php
  846. $UploadChecked = checked(!in_array('uploaded', $Paranoia));
  847. $DownloadChecked = checked(!in_array('downloaded', $Paranoia));
  848. $RatioChecked = checked(!in_array('ratio', $Paranoia));
  849. ?>
  850. <label><input type="checkbox" name="p_uploaded" onchange="AlterParanoia();" <?=$UploadChecked?> /> Uploaded</label>&ensp;
  851. <label><input type="checkbox" name="p_downloaded" onchange="AlterParanoia();" <?=$DownloadChecked?> /> Downloaded</label>&ensp;
  852. <label><input type="checkbox" name="p_ratio" onchange="AlterParanoia();" <?=$RatioChecked?> /> Ratio</label>
  853. </td>
  854. </tr>
  855. <!-- Required Ratio -->
  856. <tr id="para_reqratio_tr">
  857. <td class="label">
  858. <strong>Required Ratio</strong>
  859. </td>
  860. <td>
  861. <label>
  862. <input type="checkbox" name="p_requiredratio" <?=checked(!in_array('requiredratio', $Paranoia))?>
  863. /> Required Ratio
  864. </label>
  865. </td>
  866. </tr>
  867. <!-- Comments (torrents) -->
  868. <tr id="para_comments_tr">
  869. <td class="label">
  870. <strong>Comments (torrents)</strong>
  871. </td>
  872. <td>
  873. <?php display_paranoia('torrentcomments'); ?>
  874. </td>
  875. </tr>
  876. <!-- Collections (started) -->
  877. <tr id="para_collstart_tr">
  878. <td class="label">
  879. <strong>Collections (started)</strong>
  880. </td>
  881. <td>
  882. <?php display_paranoia('collages'); ?>
  883. </td>
  884. </tr>
  885. <!-- Collections (contributed to) -->
  886. <tr id="para_collcontr_tr">
  887. <td class="label">
  888. <strong>Collections (contributed to)</strong>
  889. </td>
  890. <td>
  891. <?php display_paranoia('collagecontribs'); ?>
  892. </td>
  893. </tr>
  894. <!-- Requests (filled) -->
  895. <tr id="para_reqfill_tr">
  896. <td class="label">
  897. <strong>Requests (filled)</strong>
  898. </td>
  899. <td>
  900. <?php
  901. $RequestsFilledCountChecked = checked(!in_array('requestsfilled_count', $Paranoia));
  902. $RequestsFilledBountyChecked = checked(!in_array('requestsfilled_bounty', $Paranoia));
  903. $RequestsFilledListChecked = checked(!in_array('requestsfilled_list', $Paranoia));
  904. ?>
  905. <label><input type="checkbox" name="p_requestsfilled_count" onchange="AlterParanoia();" <?=$RequestsFilledCountChecked?> /> Show
  906. count</label>&nbsp;
  907. <label><input type="checkbox" name="p_requestsfilled_bounty" onchange="AlterParanoia();" <?=$RequestsFilledBountyChecked?> /> Show
  908. bounty</label>&nbsp;
  909. <label><input type="checkbox" name="p_requestsfilled_list" onchange="AlterParanoia();" <?=$RequestsFilledListChecked?> /> Show list</label>
  910. </td>
  911. </tr>
  912. <!-- Requests (voted for) -->
  913. <tr id="para_reqvote_tr">
  914. <td class="label">
  915. <strong>Requests (voted for)</strong>
  916. </td>
  917. <td>
  918. <?php
  919. $RequestsVotedCountChecked = checked(!in_array('requestsvoted_count', $Paranoia));
  920. $RequestsVotedBountyChecked = checked(!in_array('requestsvoted_bounty', $Paranoia));
  921. $RequestsVotedListChecked = checked(!in_array('requestsvoted_list', $Paranoia));
  922. ?>
  923. <label><input type="checkbox" name="p_requestsvoted_count" onchange="AlterParanoia();" <?=$RequestsVotedCountChecked?> /> Show
  924. count</label>&nbsp;
  925. <label><input type="checkbox" name="p_requestsvoted_bounty" onchange="AlterParanoia();" <?=$RequestsVotedBountyChecked?> /> Show
  926. bounty</label>&nbsp;
  927. <label><input type="checkbox" name="p_requestsvoted_list" onchange="AlterParanoia();" <?=$RequestsVotedListChecked?> /> Show list</label>
  928. </td>
  929. </tr>
  930. <!-- Uploaded torrents -->
  931. <tr id="para_upltor_tr">
  932. <td class="label">
  933. <strong>Uploaded torrents</strong>
  934. </td>
  935. <td>
  936. <?php display_paranoia('uploads'); ?>
  937. </td>
  938. </tr>
  939. <!-- Uploaded torrents (unique groups) -->
  940. <tr id="para_uplunique_tr">
  941. <td class="label">
  942. <strong>Uploaded torrents (unique groups)</strong>
  943. </td>
  944. <td>
  945. <?php display_paranoia('uniquegroups'); ?>
  946. </td>
  947. </tr>
  948. <!-- Torrents (seeding) -->
  949. <tr id="para_torseed_tr">
  950. <td class="label">
  951. <strong>Torrents (seeding)</strong>
  952. </td>
  953. <td>
  954. <?php display_paranoia('seeding'); ?>
  955. </td>
  956. </tr>
  957. <!-- Torrents (leeching) -->
  958. <tr id="para_torleech_tr">
  959. <td class="label">
  960. <strong>Torrents (leeching)</strong>
  961. </td>
  962. <td>
  963. <?php display_paranoia('leeching'); ?>
  964. </td>
  965. </tr>
  966. <!-- Torrents (snatched) -->
  967. <tr id="para_torsnatch_tr">
  968. <td class="label">
  969. <strong>Torrents (snatched)</strong>
  970. </td>
  971. <td>
  972. <?php display_paranoia('snatched'); ?>
  973. </td>
  974. </tr>
  975. <!-- Torrents (upload subscriptions) -->
  976. <tr id="para_torsubscr_tr">
  977. <td class="label tooltip" title="Can others subscribe to your uploads?">
  978. <strong>Torrents (upload subscriptions)</strong>
  979. </td>
  980. <td>
  981. <label>
  982. <input type="checkbox" name="p_notifications" <?=checked(!in_array('notifications', $Paranoia))?>
  983. /> Allow torrent upload subscriptions
  984. </label>
  985. </td>
  986. </tr>
  987. <?php
  988. $DB->query("
  989. SELECT COUNT(UserID)
  990. FROM users_info
  991. WHERE Inviter = ?", $UserID);
  992. list($Invited) = $DB->next_record();
  993. ?>
  994. <!-- Invitees -->
  995. <tr id="para_invited_tr">
  996. <td class="label">
  997. <strong>Invitees</strong>
  998. </td>
  999. <td>
  1000. <label>
  1001. <input type="checkbox" name="p_invitedcount" <?=checked(!in_array('invitedcount', $Paranoia))?>
  1002. /> Show count
  1003. </label>
  1004. </td>
  1005. </tr>
  1006. <?php
  1007. $DB->query("
  1008. SELECT COUNT(ArtistID)
  1009. FROM torrents_artists
  1010. WHERE UserID = ?", $UserID);
  1011. list($ArtistsAdded) = $DB->next_record();
  1012. ?>
  1013. <!-- Artists added -->
  1014. <tr id="para_artistsadded_tr">
  1015. <td class="label">
  1016. <strong>Artists added</strong>
  1017. </td>
  1018. <td>
  1019. <label>
  1020. <input type="checkbox" name="p_artistsadded" <?=checked(!in_array('artistsadded', $Paranoia))?>
  1021. /> Show count
  1022. </label>
  1023. </td>
  1024. </tr>
  1025. <!-- Preview paranoia -->
  1026. <tr id="para_preview_tr">
  1027. <td></td>
  1028. <td><a href="#" id="preview_paranoia" class="brackets">Preview paranoia</a></td>
  1029. </tr>
  1030. </table>
  1031. <!-- Security -->
  1032. <table cellpadding="6" cellspacing="1" border="0" width="100%" class="layout border user_options"
  1033. id="security_settings">
  1034. <tr class="colhead_dark">
  1035. <td colspan="2">
  1036. <strong>Security</strong>
  1037. </td>
  1038. </tr>
  1039. <!-- 2FA, U2F, and PGP -->
  1040. <tr id="acc_2fa_tr">
  1041. <td class="label">
  1042. <strong>2FA, U2F, and PGP</strong>
  1043. </td>
  1044. <td>
  1045. <a href="user.php?action=2fa">Click here to view additional account security options</a>
  1046. </td>
  1047. </tr>
  1048. <!-- Current password -->
  1049. <tr id="acc_currentpassword_tr">
  1050. <td class="label">
  1051. <strong>Current password</strong>
  1052. </td>
  1053. <td>
  1054. <div>
  1055. <input type="password" size="40" name="cur_pass" id="cur_pass" maxlength="307200" value="" />
  1056. </div>
  1057. <strong class="important_text">
  1058. When changing any of the settings below, you must enter your current password here
  1059. </strong>
  1060. </td>
  1061. </tr>
  1062. <tr id="acc_resetpk_tr">
  1063. <td class="label">
  1064. <strong>Reset passkey</strong>
  1065. </td>
  1066. <td>
  1067. <div>
  1068. <label>
  1069. <input type="checkbox" name="resetpasskey" id="resetpasskey" />
  1070. Reset your passkey?
  1071. </label>
  1072. </div>
  1073. <p class="setting_description">
  1074. Any active torrents must be downloaded again to continue leeching/seeding
  1075. </p>
  1076. </td>
  1077. </tr>
  1078. <!-- IRC key -->
  1079. <tr id="acc_irckey_tr">
  1080. <td class="label">
  1081. <strong>IRC key</strong>
  1082. </td>
  1083. <td>
  1084. <div>
  1085. <input type="text" size="50" name="irckey" id="irckey"
  1086. value="<?=display_str($IRCKey)?>" />
  1087. </div>
  1088. <p class="setting_description">
  1089. This key will be used when authenticating with <?=BOT_NICK?> on the
  1090. <a href="wiki.php?action=article&name=IRC">IRC network</a>.
  1091. <ul>
  1092. <li>This value is stored in plaintext and should not be your password</li>
  1093. <li>IRC keys must be between 6 and 32 characters</li>
  1094. </ul>
  1095. </td>
  1096. </tr>
  1097. <!-- API keys -->
  1098. <tr id="acc_api_keys_tr">
  1099. <td class="label">
  1100. <strong>API Keys</strong>
  1101. </td>
  1102. <td>
  1103. <p>
  1104. API keys can be generated to access our
  1105. <a href="https://docs.biotorrents.de" target="_blank">JSON API</a>.
  1106. Please rememeber to revoke tokens you no longer use.
  1107. </p>
  1108. <p>
  1109. <strong class="important_text">
  1110. Treat your tokens like passwords and keep them secret.
  1111. </strong>
  1112. </p>
  1113. <table class="api_keys">
  1114. <tr class="colhead">
  1115. <th>Name</th>
  1116. <th>Created</th>
  1117. <th>Revoke</th>
  1118. </tr>
  1119. <?php
  1120. $DB->query("
  1121. SELECT
  1122. `ID`,
  1123. `Name`,
  1124. `Token`,
  1125. `Created`
  1126. FROM
  1127. `api_user_tokens`
  1128. WHERE
  1129. `UserID` = '$UserID'
  1130. AND `Revoked` = '0'
  1131. ORDER BY
  1132. `Created`
  1133. DESC
  1134. ");
  1135. foreach ($DB->to_array(false, MYSQLI_ASSOC, false) as $row) { ?>
  1136. <tr>
  1137. <td>
  1138. <?= $row['Name'] ?>
  1139. </td>
  1140. <td>
  1141. <?= time_diff($row['Created']) ?>
  1142. </td>
  1143. <td style='text-align: center'>
  1144. <a
  1145. href='user.php?action=token&amp;do=revoke&amp;user_id=<?=$LoggedUser['ID'] ?>&amp;token_id=<?= $row['ID'] ?>'>Revoke</a>
  1146. </tr>
  1147. <?php
  1148. } /* foreach */ ?>
  1149. </table>
  1150. <p>
  1151. <a
  1152. href='user.php?action=token&amp;user_id=<?= $LoggedUser['ID'] ?>'>Click
  1153. here to create a new token</a>
  1154. </p>
  1155. </td>
  1156. </tr>
  1157. <!-- Email address -->
  1158. <tr id="acc_email_tr">
  1159. <td class="label">
  1160. <strong>Email address</strong>
  1161. </td>
  1162. <td>
  1163. <div>
  1164. <input type="email" size="50" name="email" id="email"
  1165. value="<?=display_str($Email)?>" />
  1166. </div>
  1167. </td>
  1168. </tr>
  1169. <!-- Password -->
  1170. <tr id="acc_password_tr">
  1171. <td class="label">
  1172. <strong>Password</strong>
  1173. </td>
  1174. <td>
  1175. <div>
  1176. <label>
  1177. <input type="password" minlength="15" size="40" name="new_pass_1" id="new_pass_1" maxlength="307200"
  1178. value="" placeholder="New password" />
  1179. <strong id="pass_strength"></strong>
  1180. </label>
  1181. </div>
  1182. <div>
  1183. <label>
  1184. <input type="password" minlength="15" size="40" name="new_pass_2" id="new_pass_2" maxlength="307200"
  1185. value="" placeholder="Confirm new password" />
  1186. <strong id="pass_match"></strong>
  1187. </label>
  1188. </div>
  1189. <div>
  1190. <textarea id="password_display" name="password_display" rows="2" cols="50" onclick="this.select();"
  1191. readonly></textarea>
  1192. <button type="button" id="password_create" onclick="pwgen('password_display');">Generate</button>
  1193. </div>
  1194. <p class="setting_description">
  1195. <?= $ENV->PASSWORD_ADVICE ?>
  1196. </p>
  1197. </td>
  1198. </tr>
  1199. </table>
  1200. </div>
  1201. </form>
  1202. </div>
  1203. <?php View::show_footer();