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