edit_server.php 42 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390
  1. <!-- Begin toolbar -->
  2. <div class="toolbar">
  3. <div class="toolbar-inner">
  4. <div class="toolbar-buttons">
  5. <a href="/list/server/" class="button button-secondary" id="btn-back">
  6. <i class="fas fa-arrow-left icon-blue"></i>
  7. <?= _("Back") ?>
  8. </a>
  9. <a href="/list/ip/" class="button button-secondary">
  10. <i class="fas fa-ethernet icon-blue"></i>
  11. <?= _("IP") ?>
  12. </a>
  13. <?php if (isset($_SESSION["FIREWALL_SYSTEM"]) && !empty($_SESSION["FIREWALL_SYSTEM"])) { ?>
  14. <a href="/list/firewall/" class="button button-secondary">
  15. <i class="fas fa-shield-halved icon-red"></i>
  16. <?= _("Firewall") ?>
  17. </a>
  18. <?php } ?>
  19. </div>
  20. <div class="toolbar-buttons">
  21. <button type="submit" class="button" form="vstobjects">
  22. <i class="fas fa-floppy-disk icon-purple"></i>
  23. <?= _("Save") ?>
  24. </button>
  25. </div>
  26. </div>
  27. </div>
  28. <!-- End toolbar -->
  29. <!-- Begin form -->
  30. <div class="container animate__animated animate__fadeIn">
  31. <form
  32. x-data="{
  33. timezone: '<?= $v_timezone ?? "" ?>',
  34. theme: '<?= $_SESSION["THEME"] ?>',
  35. language: '<?= $_SESSION["LANGUAGE"] ?>',
  36. hasSmtpRelay: <?= $v_smtp_relay == "true" ? "true" : "false" ?>,
  37. remoteBackupEnabled: <?= !empty($v_backup_remote_adv) ? "true" : "false" ?>,
  38. backupType: '<?= !empty($v_backup_type) ? trim($v_backup_type, "'") : "" ?>',
  39. webmailAlias: '<?= $_SESSION["WEBMAIL_ALIAS"] ?? "" ?>',
  40. apiSystem: '<?= $_SESSION["API_SYSTEM"] ?>',
  41. legacyApi: '<?= $_SESSION["API"] ?>',
  42. showSystemOptions: false,
  43. showProtectionOptions: false,
  44. showPolicyOptions: false,
  45. }"
  46. id="vstobjects"
  47. name="v_configure_server"
  48. method="post"
  49. >
  50. <input type="hidden" name="token" value="<?= $_SESSION["token"] ?>">
  51. <input type="hidden" name="save" value="save">
  52. <div class="form-container">
  53. <h1 class="form-title">
  54. <?= _("Configuring Server") ?>
  55. </h1>
  56. <?php show_alert_message($_SESSION); ?>
  57. <!-- Basic options section -->
  58. <details class="collapse u-mb10">
  59. <summary class="collapse-header">
  60. <i class="fas fa-gear u-mr15"></i>
  61. <?= _("Basic options") ?>
  62. </summary>
  63. <div class="collapse-content">
  64. <div class="u-mb10">
  65. <label for="v_hostname" class="form-label">
  66. <?= _("Hostname") ?>
  67. </label>
  68. <input
  69. type="text"
  70. class="form-control"
  71. name="v_hostname"
  72. id="v_hostname"
  73. value="<?= htmlentities(trim($v_hostname, "'")) ?>"
  74. >
  75. </div>
  76. <div class="u-mb10">
  77. <label for="v_timezone" class="form-label">
  78. <?= _("Time Zone") ?>
  79. </label>
  80. <select x-model="timezone" class="form-select" name="v_timezone" id="v_timezone">
  81. <?php foreach ($v_timezones as $key => $value) { ?>
  82. <option value="<?= $value ?>">
  83. <?= $value ?>
  84. </option>
  85. <?php } ?>
  86. </select>
  87. </div>
  88. <div class="u-mb10">
  89. <label for="v_theme" class="form-label">
  90. <?= _("Theme") ?>
  91. </label>
  92. <select x-model="theme" class="form-select" name="v_theme" id="v_theme">
  93. <?php foreach ($theme as $key => $value) { ?>
  94. <option value="<?= $value ?>">
  95. <?= $value ?>
  96. </option>
  97. <?php } ?>
  98. </select>
  99. </div>
  100. <div class="form-check u-mb20">
  101. <input
  102. class="form-check-input"
  103. type="checkbox"
  104. name="v_policy_user_change_theme"
  105. id="v_policy_user_change_theme"
  106. <?= $_SESSION["POLICY_USER_CHANGE_THEME"] == "no" ? "checked" : "" ?>
  107. >
  108. <label for="v_policy_user_change_theme">
  109. <?= _("Set as selected theme for all users") ?>
  110. </label>
  111. </div>
  112. <div class="u-mb10">
  113. <label for="v_language" class="form-label"><?= _("Default Language") ?></label>
  114. <select x-model="language" class="form-select" name="v_language" id="v_language">
  115. <?php foreach ($languages as $key => $value) { ?>
  116. <option value="<?= $key ?>">
  117. <?= $value ?>
  118. </option>
  119. <?php } ?>
  120. </select>
  121. </div>
  122. <div class="form-check">
  123. <input
  124. class="form-check-input"
  125. type="checkbox"
  126. name="v_language_update"
  127. id="v_language_update"
  128. >
  129. <label for="v_language_update">
  130. <?= _("Set as default language for all users") ?>
  131. </label>
  132. </div>
  133. </div>
  134. </details>
  135. <!-- Updates section -->
  136. <details class="collapse u-mb10">
  137. <summary class="collapse-header">
  138. <i class="fas fa-code-branch u-mr15"></i>
  139. <?= _("Updates") ?>
  140. </summary>
  141. <div class="collapse-content">
  142. <p class="u-mb10">
  143. <?= _("Version") ?>:
  144. <span class="optional">
  145. <?= $_SESSION["VERSION"] ?>
  146. </span>
  147. </p>
  148. <?php if ($_SESSION["RELEASE_BRANCH"] !== "release") { ?>
  149. <p class="u-mb10">
  150. <?= _("Release") ?>:
  151. <span class="optional">
  152. <?= $_SESSION["RELEASE_BRANCH"] ?>
  153. </span>
  154. </p>
  155. <?php } ?>
  156. <p class="u-mb5">
  157. <?= _("Options") ?>
  158. </p>
  159. <div class="form-check">
  160. <input
  161. class="form-check-input"
  162. type="checkbox"
  163. name="v_debug_mode"
  164. id="v_debug_mode"
  165. <?= $_SESSION["DEBUG_MODE"] == "true" ? "checked" : "" ?>
  166. >
  167. <label for="v_debug_mode">
  168. <?= _("Enable debug mode") ?>
  169. </label>
  170. </div>
  171. <div class="form-check">
  172. <input
  173. class="form-check-input"
  174. type="checkbox"
  175. name="v_experimental_features"
  176. id="v_experimental_features"
  177. <?= $_SESSION["POLICY_SYSTEM_ENABLE_BACON"] == "true" ? "checked" : "" ?>
  178. >
  179. <label for="v_experimental_features">
  180. <?= _("Enable preview features") ?>
  181. </label>
  182. <span class="hint">
  183. <a href="/list/server/preview/">
  184. (<?= _("View") ?>)
  185. </a>
  186. </span>
  187. </div>
  188. <div class="form-check">
  189. <input
  190. class="form-check-input"
  191. type="checkbox"
  192. name="v_upgrade_send_notification_email"
  193. id="v_upgrade_send_notification_email"
  194. <?= $_SESSION["UPGRADE_SEND_EMAIL"] == "true" ? "checked" : "" ?>
  195. >
  196. <label for="v_upgrade_send_notification_email">
  197. <?= _("SYSTEM_UPGRADE_SEND_NOTIFICATION_EMAIL") ?>
  198. </label>
  199. </div>
  200. <div class="form-check">
  201. <input
  202. class="form-check-input"
  203. type="checkbox"
  204. name="v_upgrade_send_email_log"
  205. id="v_upgrade_send_email_log"
  206. <?= $_SESSION["UPGRADE_SEND_EMAIL_LOG"] == "true" ? "checked" : "" ?>
  207. >
  208. <label for="v_upgrade_send_email_log">
  209. <?= _("SYSTEM_UPGRADE_SEND_EMAIL_LOG") ?>
  210. </label>
  211. </div>
  212. </div>
  213. </details>
  214. <!-- Web Server section -->
  215. <details class="collapse u-mb10">
  216. <summary class="collapse-header">
  217. <i class="fas fa-earth-americas u-mr15"></i>
  218. <?= _("Web Server") ?>
  219. </summary>
  220. <div class="collapse-content">
  221. <?php if (!empty($_SESSION["PROXY_SYSTEM"])) { ?>
  222. <p>
  223. <?= _("Proxy Server") ?>:
  224. <span class="u-ml5">
  225. <?= $_SESSION["PROXY_SYSTEM"] ?>
  226. </span>
  227. <a href="/edit/server/<?= $_SESSION["PROXY_SYSTEM"] ?>/" class="u-ml5">
  228. <i class="fas fa-pencil icon-orange"></i>
  229. </a>
  230. </p>
  231. <?php } ?>
  232. <?php if (!empty($_SESSION["WEB_SYSTEM"])) { ?>
  233. <p>
  234. <?= _("Web Server") ?>:
  235. <span class="u-ml5">
  236. <?= $_SESSION["WEB_SYSTEM"] ?>
  237. </span>
  238. <a href="/edit/server/<?= $_SESSION["WEB_SYSTEM"] ?>/" class="u-ml5">
  239. <i class="fas fa-pencil icon-orange"></i>
  240. </a>
  241. </p>
  242. <?php } ?>
  243. <?php if (!empty($_SESSION["WEB_BACKEND"])) { ?>
  244. <p>
  245. <?= _("Backend Server") ?>:
  246. <span class="u-ml5">
  247. <?= $_SESSION["WEB_BACKEND"] ?>
  248. </span>
  249. <a href="/edit/server/<? echo $_SESSION["WEB_BACKEND"] ?>/" class="u-ml5">
  250. <i class="fas fa-pencil icon-orange"></i>
  251. </a>
  252. </p>
  253. <?php } ?>
  254. <?php if (!empty($_SESSION["WEB_BACKEND_POOL"])) { ?>
  255. <p>
  256. <?= _("Backend Pool Mode") ?>:
  257. <span class="u-ml5">
  258. <?= $_SESSION["WEB_BACKEND_POOL"] ?>
  259. </span>
  260. </p>
  261. <?php } ?>
  262. <?php if (count($v_php_versions)) { ?>
  263. <div class="u-mt15">
  264. <p class="u-mb10">
  265. <?= _("Enabled multi PHP versions") ?>
  266. </p>
  267. <div class="alert alert-info u-mb10" role="alert">
  268. <i class="fas fa-info"></i>
  269. <p><?= _("Please wait while php is installed or removed") ?></p>
  270. </div>
  271. </div>
  272. <?php foreach ($v_php_versions as $php_version) { ?>
  273. <div class="form-check">
  274. <input
  275. class="form-check-input"
  276. type="checkbox"
  277. id="<?= $php_version->name ?>"
  278. name="v_php_versions[<?= $php_version->tpl ?>]"
  279. <?= $php_version->installed ? "checked" : "" ?>
  280. <?= $php_version->protected ? "disabled" : "" ?>
  281. >
  282. <label for="<?= $php_version->name ?>">
  283. <?= $php_version->name ?>
  284. </label>
  285. </div>
  286. <?php foreach ($php_version->usedby as $wd_user => $wd_domains) { ?>
  287. <?php foreach ($wd_domains as $wd_domain) { ?>
  288. <p class="u-side-by-side" style="padding: 0 10px">
  289. <span>
  290. <i class="fas fa-user"></i>
  291. <?= $wd_user ?>
  292. </span>
  293. <span class="optional"><?= $wd_domain ?></span>
  294. </p>
  295. <?php } ?>
  296. <?php } ?>
  297. <?php } ?>
  298. <?php } ?>
  299. <?php if (!empty($_SESSION["WEB_BACKEND"])) { ?>
  300. <div class="u-mt10">
  301. <label for="v_php_default_version" class="form-label">
  302. <?= _("System PHP version") ?>
  303. </label>
  304. <select class="form-select" name="v_php_default_version" id="v_php_default_version">
  305. <?php foreach ($v_php_versions as $php_version) { ?>
  306. <?php if ($php_version->installed) { ?>
  307. <option
  308. value="<?= $php_version->version ?>"
  309. <?= $php_version->name == DEFAULT_PHP_VERSION ? "selected" : "" ?>
  310. >
  311. <?= $php_version->name ?>
  312. </option>
  313. <?php } ?>
  314. <?php } ?>
  315. </select>
  316. </div>
  317. <?php } ?>
  318. </div>
  319. </details>
  320. <!-- DNS Server section -->
  321. <?php if (!empty($_SESSION["DNS_SYSTEM"])) { ?>
  322. <details class="collapse u-mb10">
  323. <summary class="collapse-header">
  324. <i class="fas fa-book-atlas u-mr15"></i>
  325. <?= _("DNS Server") ?>
  326. </summary>
  327. <div class="collapse-content">
  328. <p>
  329. <?= _("DNS Server") ?>:
  330. <span class="u-ml5">
  331. <?= $_SESSION["DNS_SYSTEM"] ?>
  332. </span>
  333. <a href="/edit/server/<? echo $_SESSION["DNS_SYSTEM"] ?>/" class="u-ml5">
  334. <i class="fas fa-pencil icon-orange"></i>
  335. </a>
  336. </p>
  337. <p>
  338. <?= _("DNS Cluster") ?>:
  339. <span class="u-ml5">
  340. <?= $v_dns_cluster == "yes" ? _("Yes") : _("No") ?>
  341. </span>
  342. </p>
  343. <?php if ($v_dns_cluster == "yes") {
  344. $i = 0;
  345. foreach ($dns_cluster as $key => $value) {
  346. $i++;
  347. ?>
  348. <div>
  349. <label for="v_dns_remote_host" class="form-label">
  350. <?= _("Host") . " #" . $i ?>
  351. </label>
  352. <input
  353. type="text"
  354. class="form-control"
  355. name="v_dns_remote_host"
  356. id="v_dns_remote_host"
  357. value="<?= $key ?>"
  358. disabled
  359. >
  360. </div>
  361. <?php } } ?>
  362. </div>
  363. </details>
  364. <?php } ?>
  365. <!-- Mail Server section -->
  366. <?php if (!empty($_SESSION["MAIL_SYSTEM"])) { ?>
  367. <details class="collapse u-mb10">
  368. <summary class="collapse-header">
  369. <i class="fas fa-envelopes-bulk u-mr15"></i>
  370. <?= _("Mail Server") ?>
  371. </summary>
  372. <div class="collapse-content">
  373. <p>
  374. <?= _("Mail Server") ?>:
  375. <span class="u-ml5">
  376. <?= $_SESSION["MAIL_SYSTEM"] ?>
  377. </span>
  378. <a href="/edit/server/<? echo $_SESSION["MAIL_SYSTEM"] ?>/" class="u-ml5">
  379. <i class="fas fa-pencil icon-orange"></i>
  380. </a>
  381. </p>
  382. <?php if (!empty($_SESSION["ANTIVIRUS_SYSTEM"])) { ?>
  383. <p>
  384. <?= _("Antivirus") ?>:
  385. <span class="u-ml5">
  386. <?= $_SESSION["ANTIVIRUS_SYSTEM"] ?>
  387. </span>
  388. <a href="/edit/server/<? echo $_SESSION["ANTIVIRUS_SYSTEM"] ?>/" class="u-ml5">
  389. <i class="fas fa-pencil icon-orange"></i>
  390. </a>
  391. </p>
  392. <?php } ?>
  393. <?php if (!empty($_SESSION["ANTISPAM_SYSTEM"])) { ?>
  394. <p>
  395. <?= _("AntiSpam") ?>:
  396. <span class="u-ml5">
  397. <?= $_SESSION["ANTISPAM_SYSTEM"] ?>
  398. </span>
  399. <a href="/edit/server/<?= $_SESSION["ANTISPAM_SYSTEM"] ?>/" class="u-ml5">
  400. <i class="fas fa-pencil icon-orange"></i>
  401. </a>
  402. </p>
  403. <?php } ?>
  404. <?php if ($_SESSION["WEBMAIL_SYSTEM"]) { ?>
  405. <div class="u-mt15 u-mb10">
  406. <label for="v_webmail_alias" class="form-label">
  407. <?= _("Webmail URL") ?>
  408. <span x-cloak x-text="`${webmailAlias}.example.com`" class="hint"></span>
  409. </label>
  410. <input
  411. x-model="webmailAlias"
  412. type="text"
  413. class="form-control"
  414. name="v_webmail_alias"
  415. id="v_webmail_alias"
  416. >
  417. </div>
  418. <?php } ?>
  419. <div class="form-check u-mt20">
  420. <input
  421. x-model="hasSmtpRelay"
  422. class="form-check-input"
  423. type="checkbox"
  424. name="v_smtp_relay"
  425. id="v_smtp_relay"
  426. >
  427. <label for="v_smtp_relay">
  428. <?= _("Global SMTP Relay") ?>
  429. </label>
  430. </div>
  431. <div
  432. x-cloak
  433. x-show="hasSmtpRelay"
  434. class="u-pl30 u-mt20"
  435. >
  436. <div class="u-mb10">
  437. <label for="v_smtp_relay_host" class="form-label">
  438. <?= _("Host") ?>
  439. </label>
  440. <input
  441. type="text"
  442. class="form-control"
  443. name="v_smtp_relay_host"
  444. id="v_smtp_relay_host"
  445. value="<?= htmlentities(trim($v_smtp_relay_host, "'")) ?>"
  446. >
  447. </div>
  448. <div class="u-mb10">
  449. <label for="v_smtp_relay_port" class="form-label">
  450. <?= _("Port") ?>
  451. </label>
  452. <input
  453. type="text"
  454. class="form-control"
  455. name="v_smtp_relay_port"
  456. id="v_smtp_relay_port"
  457. value="<?= htmlentities(trim($v_smtp_relay_port, "'")) ?>"
  458. >
  459. </div>
  460. <div class="u-mb10">
  461. <label for="v_smtp_relay_user" class="form-label">
  462. <?= _("Username") ?>
  463. </label>
  464. <input
  465. type="text"
  466. class="form-control"
  467. name="v_smtp_relay_user"
  468. id="v_smtp_relay_user"
  469. value="<?= htmlentities(trim($v_smtp_relay_user, "'")) ?>"
  470. >
  471. </div>
  472. <div class="u-mb10">
  473. <label for="v_smtp_relay_pass" class="form-label">
  474. <?= _("Password") ?>
  475. </label>
  476. <div class="u-pos-relative">
  477. <input
  478. type="text"
  479. class="form-control js-password-input"
  480. name="v_smtp_relay_pass"
  481. id="v_smtp_relay_pass"
  482. >
  483. </div>
  484. </div>
  485. </div>
  486. </div>
  487. </details>
  488. <?php } ?>
  489. <!-- Databases section -->
  490. <?php if (!empty($_SESSION["DB_SYSTEM"])) { ?>
  491. <details class="collapse u-mb10">
  492. <summary class="collapse-header">
  493. <i class="fas fa-database u-mr15"></i>
  494. <?= _("Databases") ?>
  495. </summary>
  496. <div class="collapse-content">
  497. <div class="u-mb10">
  498. <p>
  499. <?= _("MySQL Support") ?>:
  500. <span class="u-ml5">
  501. <?= $v_mysql == "yes" ? _("Yes") : _("No") ?>
  502. </span>
  503. <a href="/edit/server/mysql/" class="u-ml5">
  504. <i class="fas fa-pencil icon-orange"></i>
  505. </a>
  506. </p>
  507. </div>
  508. <!-- MySQL / MariaDB Options-->
  509. <?php if ($v_mysql == "yes") { ?>
  510. <div class="u-mb20">
  511. <label for="v_mysql_url" class="form-label">
  512. <?= _("phpMyAdmin URL") ?>
  513. </label>
  514. <input
  515. type="text"
  516. class="form-control"
  517. name="v_mysql_url"
  518. id="v_mysql_url"
  519. value="<?= $_SESSION["DB_PMA_ALIAS"] ?>"
  520. >
  521. </div>
  522. <div class="u-mb10">
  523. <label for="v_phpmyadmin_key" class="form-label">
  524. <?= _("phpMyAdmin Single Sign On") ?>
  525. <span class="hint">
  526. <a
  527. href="https://hestiacp.com/docs/server-administration/databases.html"
  528. target="_blank"
  529. >
  530. (<?= _("More info") ?>)
  531. </a>
  532. </span>
  533. </label>
  534. <select
  535. class="form-select"
  536. name="v_phpmyadmin_key"
  537. id="v_phpmyadmin_key"
  538. <?php $_SESSION["API"] != "yes" ? "disabled" : ""; ?>
  539. >
  540. <option value="no">
  541. <?= _("Disabled") ?>
  542. </option>
  543. <option value="yes" <?= $_SESSION["PHPMYADMIN_KEY"] != "" ? "selected" : "" ?>>
  544. <?= _("Enabled") ?>
  545. </option>
  546. </select>
  547. </div>
  548. <?php
  549. $i = 0;
  550. foreach ($v_mysql_hosts as $value) {
  551. $i++;
  552. ?>
  553. <div class="u-pl30">
  554. <div class="u-mb10">
  555. <label for="v_mysql_host" class="form-label">
  556. <?= _("Host") . " #" . $i ?>
  557. </label>
  558. <input
  559. type="text"
  560. class="form-control"
  561. name="v_mysql_host"
  562. id="v_mysql_host"
  563. value="<?= $value["HOST"] ?>"
  564. disabled
  565. >
  566. </div>
  567. <div class="u-mb10">
  568. <label for="v_mysql_password" class="form-label">
  569. <?= _("Password") ?>
  570. </label>
  571. <div class="u-pos-relative">
  572. <input
  573. type="text"
  574. class="form-control js-password-input"
  575. name="v_mysql_password"
  576. id="v_mysql_password"
  577. >
  578. </div>
  579. </div>
  580. <div class="u-mb10">
  581. <label for="v_mysql_max" class="form-label">
  582. <?= _("Maximum Number Of Databases") ?>
  583. </label>
  584. <input
  585. type="text"
  586. class="form-control"
  587. name="v_mysql_max"
  588. id="v_mysql_max"
  589. value="<?= $value["MAX_DB"] ?>"
  590. disabled
  591. >
  592. </div>
  593. <div class="u-mb10">
  594. <label for="v_mysql_current" class="form-label">
  595. <?= _("Current Number Of Databases") ?>
  596. </label>
  597. <input
  598. type="text"
  599. class="form-control"
  600. name="v_mysql_current"
  601. id="v_mysql_current"
  602. value="<?= $value["U_DB_BASES"] ?>"
  603. disabled
  604. >
  605. </div>
  606. </div>
  607. <?php } } ?>
  608. <!-- PostgreSQL Options-->
  609. <?php if ($v_pgsql == "yes") { ?>
  610. <div class="u-mb10">
  611. <p>
  612. <?= _("PostgreSQL Support") ?>:
  613. <span class="u-ml5">
  614. <?= $v_pgsql == "yes" ? _("Yes") : _("No") ?>
  615. </span>
  616. <a href="/edit/server/postgresql/" class="u-ml5">
  617. <i class="fas fa-pencil icon-orange"></i>
  618. </a>
  619. </p>
  620. </div>
  621. <div class="u-mb20">
  622. <label for="v_pgsql_url" class="form-label">
  623. <?= _("phpPgAdmin URL") ?>
  624. </label>
  625. <input type="text" class="form-control" name="v_pgsql_url" id="v_pgsql_url" value="<?= $_SESSION["DB_PGA_ALIAS"] ?>">
  626. </div>
  627. <?php } ?>
  628. <?php if ($v_pgsql == "yes") {
  629. $i = 0;
  630. foreach ($v_pgsql_hosts as $value) {
  631. $i++;
  632. ?>
  633. <div class="u-pl30">
  634. <div class="u-mb10">
  635. <label for="v_pgsql_host" class="form-label"><?= _("Host") . " #" . $i ?></label>
  636. <input type="text" class="form-control" name="v_pgsql_host" id="v_pgsql_host" value="<?= $value["HOST"] ?>" disabled>
  637. </div>
  638. <div class="u-mb10">
  639. <label for="v_psql_max" class="form-label">
  640. <?= _("Maximum Number Of Databases") ?>
  641. </label>
  642. <input type="text" class="form-control" name="v_psql_max" id="v_psql_max" value="<?= $value["MAX_DB"] ?>" disabled>
  643. </div>
  644. <div class="u-mb10">
  645. <label for="v_pgsql_max" class="form-label">
  646. <?= _("Current Number Of Databases") ?>
  647. </label>
  648. <input type="text" class="form-control" name="v_pgsql_max" id="v_pgsql_max" value="<?= $value["U_DB_BASES"] ?>" disabled>
  649. </div>
  650. </div>
  651. <?php }} ?>
  652. </div>
  653. </details>
  654. <?php } ?>
  655. <!-- Backups section -->
  656. <details class="collapse u-mb10">
  657. <summary class="collapse-header">
  658. <i class="fas fa-arrow-rotate-left u-mr15"></i>
  659. <?= _("Backups") ?>
  660. </summary>
  661. <div class="collapse-content">
  662. <div class="u-mb10">
  663. <label for="v_backup" class="form-label">
  664. <?= _("Local backup") ?>
  665. </label>
  666. <select class="form-select" name="v_backup" id="v_backup">
  667. <option value="no">
  668. <?= _("No") ?>
  669. </option>
  670. <option value="yes" <?= $v_backup == "yes" ? "selected" : "" ?>>
  671. <?= _("Yes") ?>
  672. </option>
  673. </select>
  674. </div>
  675. <div class="u-mb10">
  676. <label for="v_backup_mode" class="form-label">
  677. <?= _("Compression") ?>
  678. <a
  679. href="https://hestiacp.com/docs/server-administration/backup-restore.html#what-is-the-difference-between-zstd-and-gzip"
  680. target="_blank"
  681. class="u-ml5"
  682. >
  683. <i class="fas fa-circle-question"></i>
  684. </a>
  685. </label>
  686. <select class="form-select" name="v_backup_mode" id="v_backup_mode">
  687. <option value="gzip">
  688. gzip
  689. </option>
  690. <option value="zstd" <?= $v_backup_mode == "zstd" ? "selected" : "" ?>>
  691. zstd
  692. </option>
  693. </select>
  694. </div>
  695. <div class="u-mb10">
  696. <label for="v_backup_gzip" class="form-label">
  697. <?= _("Compression level") ?>
  698. <a
  699. href="https://hestiacp.com/docs/server-administration/backup-restore.html#what-is-the-optimal-compression-ratio"
  700. target="_blank"
  701. class="u-ml5"
  702. >
  703. <i class="fas fa-circle-question"></i>
  704. </a>
  705. </label>
  706. <select class="form-select" name="v_backup_gzip" id="v_backup_gzip">
  707. <?php for ($level = 1; $level < 20; $level++) { ?>
  708. <option
  709. value="<?= $level ?>"
  710. <?= $v_backup_gzip == $level ? "selected" : "" ?>
  711. >
  712. <?= $level ?>
  713. <?= $level > 9 ? "(" . _("zstd only") . ")" : "" ?>
  714. </option>
  715. <?php } ?>
  716. </select>
  717. </div>
  718. <div class="u-mb20">
  719. <label for="v_backup_dir" class="form-label">
  720. <?= _("Directory") ?>
  721. <a
  722. href=""
  723. target="_blank"
  724. class="u-ml5"
  725. >
  726. <i class="fas fa-circle-question"></i>
  727. </a>
  728. </label>
  729. <input
  730. type="text"
  731. class="form-control"
  732. name="v_backup_dir"
  733. id="v_backup_dir"
  734. value="<?= trim($v_backup_dir, "'") ?>"
  735. disabled
  736. >
  737. </div>
  738. <div class="form-check">
  739. <input
  740. x-model="remoteBackupEnabled"
  741. class="form-check-input"
  742. type="checkbox"
  743. name="v_backup_remote_adv"
  744. id="v_backup_remote_adv"
  745. >
  746. <label for="v_backup_remote_adv">
  747. <?= _("Remote backup") ?>
  748. </label>
  749. </div>
  750. <div x-cloak x-show="remoteBackupEnabled" class="u-pl30 u-mt20">
  751. <div class="u-mb10">
  752. <label for="backup_type" class="form-label">
  753. <?= _("Protocol") ?>
  754. <a
  755. href="https://hestiacp.com/docs/server-administration/backup-restore.html#what-kind-of-protocols-are-currently-supported"
  756. target="_blank"
  757. class="u-ml5"
  758. >
  759. <i class="fas fa-circle-question"></i>
  760. </a>
  761. </label>
  762. <select
  763. x-model="backupType"
  764. class="form-select"
  765. name="v_backup_type"
  766. id="backup_type"
  767. >
  768. <option value="ftp">
  769. <?= _("ftp") ?>
  770. </option>
  771. <option value="sftp">
  772. <?= _("sftp") ?>
  773. </option>
  774. <option value="b2">
  775. <?= _("Backblaze") ?>
  776. </option>
  777. <option value="rclone">
  778. <?= _("Rclone") ?>
  779. </option>
  780. </select>
  781. </div>
  782. <div x-cloak x-show="backupType == 'ftp' || backupType == 'sftp' || backupType == ''">
  783. <div class="u-mb10">
  784. <label for="v_backup_host" class="form-label">
  785. <?= _("Host") ?>
  786. </label>
  787. <input
  788. type="text"
  789. class="form-control"
  790. name="v_backup_host"
  791. id="v_backup_host"
  792. value="<?= trim($v_backup_host, "'") ?>"
  793. >
  794. </div>
  795. <div class="u-mb20">
  796. <label for="v_backup_port" class="form-label">
  797. <?= _("Port") ?>
  798. </label>
  799. <input
  800. type="text"
  801. class="form-control"
  802. name="v_backup_port"
  803. id="v_backup_port"
  804. value="<?= trim($v_backup_port, "'") ?>"
  805. >
  806. </div>
  807. <div class="u-mb10">
  808. <label for="v_backup_username" class="form-label">
  809. <?= _("Username") ?>
  810. </label>
  811. <input
  812. type="text"
  813. class="form-control"
  814. name="v_backup_username"
  815. id="v_backup_username"
  816. value="<?= trim($v_backup_username, "'") ?>"
  817. >
  818. </div>
  819. <div class="u-mb20">
  820. <label for="v_backup_password" class="form-label">
  821. <?= _("Password") ?>
  822. </label>
  823. <div class="u-pos-relative">
  824. <input
  825. type="text"
  826. class="form-control js-password-input"
  827. name="v_backup_password"
  828. id="v_backup_password"
  829. value="<?= trim($v_backup_password, "'") ?>"
  830. >
  831. </div>
  832. </div>
  833. <div class="u-mb10">
  834. <label for="v_backup_bpath" class="form-label">
  835. <?= _("Directory") ?>
  836. </label>
  837. <input
  838. type="text"
  839. class="form-control"
  840. name="v_backup_bpath"
  841. id="v_backup_bpath"
  842. value="<?= trim($v_backup_bpath, "'") ?>"
  843. >
  844. </div>
  845. </div>
  846. <div x-cloak x-show="backupType == 'b2'">
  847. <div class="u-mb10">
  848. <label for="v_backup_bucket" class="form-label">
  849. <?= _("Bucket") ?>
  850. </label>
  851. <input
  852. type="text"
  853. class="form-control"
  854. name="v_backup_bucket"
  855. id="v_backup_bucket"
  856. value="<?= trim($v_backup_bucket, "'") ?>"
  857. >
  858. </div>
  859. <div class="u-mb10">
  860. <label for="v_backup_application_id" class="form-label">
  861. <?= _("Key ID") ?>
  862. </label>
  863. <input
  864. type="text"
  865. class="form-control"
  866. name="v_backup_application_id"
  867. id="v_backup_application_id"
  868. value="<?= trim($v_backup_application_id, "'") ?>"
  869. >
  870. </div>
  871. <div class="u-mb10">
  872. <label for="v_backup_application_key" class="form-label">
  873. <?= _("Application Key") ?>
  874. </label>
  875. <input
  876. type="text"
  877. class="form-control"
  878. name="v_backup_application_key"
  879. id="v_backup_application_key"
  880. value="<?= trim($v_backup_application_key, "'") ?>"
  881. >
  882. </div>
  883. </div>
  884. <div x-cloak x-show="backupType == 'rclone'">
  885. <div class="u-mb10">
  886. <label for="v_rclone_host" class="form-label">
  887. <?= _("Host") ?>
  888. </label>
  889. <input
  890. type="text"
  891. class="form-control"
  892. name="v_rclone_host"
  893. id="v_rclone_host"
  894. value="<?= trim($v_rclone_host, "'") ?>"
  895. >
  896. </div>
  897. <div class="u-mb10">
  898. <label for="v_rclone_path" class="form-label">
  899. <?= _("Directory") ?>
  900. </label>
  901. <input
  902. type="text"
  903. class="form-control"
  904. name="v_rclone_path"
  905. id="v_rclone_path"
  906. value="<?= trim($v_rclone_path, "'") ?>"
  907. >
  908. </div>
  909. </div>
  910. </div>
  911. </div>
  912. </details>
  913. <!-- SSL tab -->
  914. <details class="collapse u-mb10">
  915. <summary class="collapse-header">
  916. <i class="fas fa-lock u-mr15"></i>
  917. <?= _("SSL") ?>
  918. </summary>
  919. <div class="collapse-content">
  920. <div class="u-mb20">
  921. <label for="v_ssl_crt" class="form-label">
  922. <?= _("SSL Certificate") ?>
  923. <span id="generate-csr">
  924. /
  925. <a
  926. class="form-link"
  927. href="/generate/ssl/?domain=<?= htmlentities(trim($v_hostname, '"')) ?>"
  928. target="_blank"
  929. >
  930. <?= _("Generate CSR") ?>
  931. </a>
  932. </span>
  933. </label>
  934. <textarea
  935. class="form-control u-min-height100 u-console"
  936. name="v_ssl_crt"
  937. id="v_ssl_crt"
  938. ><?= htmlentities(trim($v_ssl_crt, "'")) ?></textarea>
  939. </div>
  940. <div class="u-mb20">
  941. <label for="v_ssl_key" class="form-label">
  942. <?= _("SSL Key") ?>
  943. </label>
  944. <textarea
  945. class="form-control u-min-height100 u-console"
  946. name="v_ssl_key"
  947. id="v_ssl_key"
  948. ><?= htmlentities(trim($v_ssl_key, "'")) ?></textarea>
  949. </div>
  950. <ul class="values-list">
  951. <li class="values-list-item">
  952. <span class="values-list-label"><?= _("SUBJECT") ?></span>
  953. <span class="values-list-value"><?= $v_ssl_subject ?></span>
  954. </li>
  955. <?php if ($v_ssl_aliases) { ?>
  956. <li class="values-list-item">
  957. <span class="values-list-label"><?= _("Aliases") ?></span>
  958. <span class="values-list-value"><?= $v_ssl_aliases ?></span>
  959. </li>
  960. <?php } ?>
  961. <li class="values-list-item">
  962. <span class="values-list-label"><?= _("NOT_BEFORE") ?></span>
  963. <span class="values-list-value"><?= $v_ssl_not_before ?></span>
  964. </li>
  965. <li class="values-list-item">
  966. <span class="values-list-label"><?= _("NOT_AFTER") ?></span>
  967. <span class="values-list-value"><?= $v_ssl_not_after ?></span>
  968. </li>
  969. <li class="values-list-item">
  970. <span class="values-list-label"><?= _("SIGNATURE") ?></span>
  971. <span class="values-list-value"><?= $v_ssl_signature ?></span>
  972. </li>
  973. <li class="values-list-item">
  974. <span class="values-list-label"><?= _("PUB_KEY") ?></span>
  975. <span class="values-list-value"><?= $v_ssl_pub_key ?></span>
  976. </li>
  977. <li class="values-list-item">
  978. <span class="values-list-label"><?= _("ISSUER") ?></span>
  979. <span class="values-list-value"><?= $v_ssl_issuer ?></span>
  980. </li>
  981. </ul>
  982. </div>
  983. </details>
  984. <!-- Security tab -->
  985. <details class="collapse u-mb10">
  986. <summary class="collapse-header">
  987. <i class="fas fa-key u-mr15"></i>
  988. <?= _("Security") ?>
  989. </summary>
  990. <div class="collapse-content">
  991. <h2 x-on:click="showSystemOptions = !showSystemOptions" class="section-title">
  992. <?= _("System") ?>
  993. <i
  994. x-bind:class="showSystemOptions ? 'fa-square-minus' : 'fa-square-plus'"
  995. class="fas icon-dim icon-maroon js-section-toggle-icon"
  996. ></i>
  997. </h2>
  998. <div x-cloak x-show="showSystemOptions">
  999. <h3 class="u-mt20 u-mb10">
  1000. <?= _("API") ?>
  1001. </h3>
  1002. <div class="u-mb10">
  1003. <label for="v_api_system" class="form-label">
  1004. <?= _("Enable API access") ?>
  1005. </label>
  1006. <select x-model="apiSystem" class="form-select" name="v_api_system" id="v_api_system">
  1007. <option value="0">
  1008. <?= _("Disabled") ?>
  1009. </option>
  1010. <option value="1">
  1011. <?= _("Enabled for admin") ?>
  1012. </option>
  1013. <option value="2">
  1014. <?= _("Enabled for all users") ?>
  1015. </option>
  1016. </select>
  1017. </div>
  1018. <div class="u-mb10">
  1019. <label for="v_api" class="form-label">
  1020. <?= _("Enable legacy API access") ?>
  1021. </label>
  1022. <select x-model="legacyApi" class="form-select" name="v_api" id="v_api">
  1023. <option value="yes">
  1024. <?= _("Yes") ?>
  1025. </option>
  1026. <option value="no">
  1027. <?= _("No") ?>
  1028. </option>
  1029. </select>
  1030. </div>
  1031. <div x-cloak x-show="legacyApi === 'yes' || apiSystem > 0">
  1032. <div class="u-mb10">
  1033. <label for="v_api_allowed_ip" class="form-label u-side-by-side">
  1034. <?= _("Allowed IP addresses for API") ?>
  1035. <span class="optional">1 IP address per line</span>
  1036. </label>
  1037. <textarea class="form-control" name="v_api_allowed_ip" id="v_api_allowed_ip"><?php
  1038. foreach (explode(",", $_SESSION["API_ALLOWED_IP"]) as $ip) {
  1039. echo trim($ip)."\n";
  1040. }
  1041. ?></textarea>
  1042. </div>
  1043. </div>
  1044. <h3 class="u-mt20 u-mb10">
  1045. <?= _("Login") ?>
  1046. </h3>
  1047. <div class="u-mb10">
  1048. <label for="v_login_style" class="form-label">
  1049. <?= _("Login screen style") ?>
  1050. </label>
  1051. <select class="form-select" name="v_login_style" id="v_login_style">
  1052. <option value="default">
  1053. <?= _("Default") ?>
  1054. </option>
  1055. <option value="old" <?= $_SESSION["LOGIN_STYLE"] == "old" ? "selected" : "" ?>>
  1056. <?= _("Old Style") ?>
  1057. </option>
  1058. </select>
  1059. </div>
  1060. <div class="u-mb10">
  1061. <label for="v_policy_system_password_reset" class="form-label">
  1062. <?= _("Allow users to reset their passwords") ?>
  1063. </label>
  1064. <select
  1065. class="form-select"
  1066. name="v_policy_system_password_reset"
  1067. id="v_policy_system_password_reset"
  1068. >
  1069. <option value="yes">
  1070. <?= _("Yes") ?>
  1071. </option>
  1072. <option
  1073. value="no"
  1074. <?= $_SESSION["POLICY_SYSTEM_PASSWORD_RESET"] == "no" ? "selected" : "" ?>
  1075. >
  1076. <?= _("No") ?>
  1077. </option>
  1078. </select>
  1079. </div>
  1080. <div class="u-mb20">
  1081. <label for="v_inactive_session_timeout" class="form-label">
  1082. <?= _("Inactive session timeout") ?> (<?= _("Minutes") ?>)
  1083. </label>
  1084. <input
  1085. type="text"
  1086. class="form-control"
  1087. name="v_inactive_session_timeout"
  1088. id="v_inactive_session_timeout"
  1089. value="<?= trim($_SESSION["INACTIVE_SESSION_TIMEOUT"], "'") ?>"
  1090. >
  1091. </div>
  1092. <div class="u-mb10">
  1093. <label for="v_policy_csrf_strictness" class="form-label">
  1094. <?= _("Prevent CSRF") ?>
  1095. </label>
  1096. <select
  1097. class="form-select"
  1098. name="v_policy_csrf_strictness"
  1099. id="v_policy_csrf_strictness"
  1100. >
  1101. <option value="0">
  1102. <?= _("Disabled") ?>
  1103. </option>
  1104. <option value="1" <?= $_SESSION["POLICY_CSRF_STRICTNESS"] == "1" ? "selected" : "" ?>>
  1105. <?= _("Enabled") ?>
  1106. </option>
  1107. <option value="2" <?= $_SESSION["POLICY_CSRF_STRICTNESS"] == "2" ? "selected" : "" ?>>
  1108. <?= _("Strict") ?>
  1109. </option>
  1110. </select>
  1111. </div>
  1112. </div>
  1113. <?php if ($_SESSION["userContext"] === "admin" && $_SESSION["user"] === "admin") { ?>
  1114. <h2 x-on:click="showProtectionOptions = !showProtectionOptions" class="section-title">
  1115. <?= _("System Protection") ?>
  1116. <i
  1117. x-bind:class="showProtectionOptions ? 'fa-square-minus' : 'fa-square-plus'"
  1118. class="fas icon-dim icon-maroon js-section-toggle-icon"
  1119. ></i>
  1120. </h2>
  1121. <div x-cloak x-show="showProtectionOptions">
  1122. <h3 class="u-mt20 u-mb10">
  1123. <?= _("System Administrator account") ?>
  1124. </h3>
  1125. <div class="u-mb10">
  1126. <label for="v_policy_system_protected_admin" class="form-label">
  1127. <?= _("Restrict access to read-only for other administrators") ?>
  1128. </label>
  1129. <select
  1130. class="form-select"
  1131. name="v_policy_system_protected_admin"
  1132. id="v_policy_system_protected_admin"
  1133. >
  1134. <option value="yes">
  1135. <?= _("Yes") ?>
  1136. </option>
  1137. <option value="no" <?= $_SESSION["POLICY_SYSTEM_PROTECTED_ADMIN"] !== "yes" ? "selected" : "" ?>>
  1138. <?= _("No") ?>
  1139. </option>
  1140. </select>
  1141. </div>
  1142. <div class="u-mb10">
  1143. <label for="v_policy_system_hide_admin" class="form-label">
  1144. <?= _("Hide account from other administrators") ?>
  1145. </label>
  1146. <select
  1147. class="form-select"
  1148. name="v_policy_system_hide_admin"
  1149. id="v_policy_system_hide_admin"
  1150. >
  1151. <option value="yes">
  1152. <?= _("Yes") ?>
  1153. </option>
  1154. <option value="no" <?= $_SESSION["POLICY_SYSTEM_HIDE_ADMIN"] !== "yes" ? "selected" : "" ?>>
  1155. <?= _("No") ?>
  1156. </option>
  1157. </select>
  1158. </div>
  1159. <div class="u-mb10">
  1160. <label for="v_policy_system_hide_services" class="form-label">
  1161. <?= _("Do not allow other administrators to access Server Settings") ?>
  1162. </label>
  1163. <select
  1164. class="form-select"
  1165. name="v_policy_system_hide_services"
  1166. id="v_policy_system_hide_services"
  1167. >
  1168. <option value="yes">
  1169. <?= _("Yes") ?>
  1170. </option>
  1171. <option value="no" <?= $_SESSION["POLICY_SYSTEM_HIDE_SERVICES"] !== "yes" ? "selected" : "" ?>>
  1172. <?= _("No") ?>
  1173. </option>
  1174. </select>
  1175. </div>
  1176. </div>
  1177. <?php } ?>
  1178. <h2 x-on:click="showPolicyOptions = !showPolicyOptions" class="section-title">
  1179. <?= _("Policies") ?>
  1180. <i
  1181. x-bind:class="showPolicyOptions ? 'fa-square-minus' : 'fa-square-plus'"
  1182. class="fas icon-dim icon-maroon js-section-toggle-icon"
  1183. ></i>
  1184. </h2>
  1185. <div x-cloak x-show="showPolicyOptions">
  1186. <h3 class="u-mt20 u-mb10">
  1187. <?= _("Users") ?>
  1188. </h3>
  1189. <?php if ($_SESSION["POLICY_SYSTEM_ENABLE_BACON"] === "true") { ?>
  1190. <div class="u-mb10">
  1191. <label for="v_policy_user_view_suspended" class="form-label">
  1192. <?= _("Allow suspended users to log in with read-only access") ?>
  1193. <span class="hint">(<?= _("Preview") ?>)</span>
  1194. </label>
  1195. <select
  1196. class="form-select"
  1197. name="v_policy_user_view_suspended"
  1198. id="v_policy_user_view_suspended"
  1199. >
  1200. <option value="yes">
  1201. <?= _("Yes") ?>
  1202. </option>
  1203. <option value="no" <?= $_SESSION["POLICY_USER_VIEW_SUSPENDED"] == "no" ? "selected" : "" ?>>
  1204. <?= _("No") ?>
  1205. </option>
  1206. </select>
  1207. </div>
  1208. <?php } ?>
  1209. <div class="u-mb10">
  1210. <label for="v_policy_user_edit_details" class="form-label">
  1211. <?= _("Allow users to edit their account details") ?>
  1212. </label>
  1213. <select
  1214. class="form-select"
  1215. name="v_policy_user_edit_details"
  1216. id="v_policy_user_edit_details"
  1217. >
  1218. <option value="yes">
  1219. <?= _("Yes") ?>
  1220. </option>
  1221. <option value="no" <?= $_SESSION["POLICY_USER_EDIT_DETAILS"] == "no" ? "selected" : "" ?>>
  1222. <?= _("No") ?>
  1223. </option>
  1224. </select>
  1225. </div>
  1226. <div class="u-mb10">
  1227. <label for="v_policy_user_edit_web_templates" class="form-label">
  1228. <?= _("Allow users to change templates when editing web domains") ?>
  1229. </label>
  1230. <select class="form-select" name="v_policy_user_edit_web_templates" id="v_policy_user_edit_web_templates">
  1231. <option value="yes">
  1232. <?= _("Yes") ?>
  1233. </option>
  1234. <option value="no" <?= $_SESSION["POLICY_USER_EDIT_WEB_TEMPLATES"] == "no" ? "selected" : "" ?>>
  1235. <?= _("No") ?>
  1236. </option>
  1237. </select>
  1238. </div>
  1239. <div class="u-mb10">
  1240. <label for="v_policy_user_edit_dns_templates" class="form-label">
  1241. <?= _("Allow users to change templates when editing DNS zones") ?>
  1242. </label>
  1243. <select
  1244. class="form-select"
  1245. name="v_policy_user_edit_dns_templates"
  1246. id="v_policy_user_edit_dns_templates"
  1247. >
  1248. <option value="yes">
  1249. <?= _("Yes") ?>
  1250. </option>
  1251. <option value="no" <?= $_SESSION["POLICY_USER_EDIT_DNS_TEMPLATES"] == "no" ? "selected" : "" ?>>
  1252. <?= _("No") ?>
  1253. </option>
  1254. </select>
  1255. </div>
  1256. <div class="u-mb10">
  1257. <label for="v_policy_user_view_logs" class="form-label">
  1258. <?= _("Allow users to view action and login history logs") ?>
  1259. </label>
  1260. <select
  1261. class="form-select"
  1262. name="v_policy_user_view_logs"
  1263. id="v_policy_user_view_logs"
  1264. >
  1265. <option value="yes">
  1266. <?= _("Yes") ?>
  1267. </option>
  1268. <option value="no" <?= $_SESSION["POLICY_USER_VIEW_LOGS"] == "no" ? "selected" : "" ?>>
  1269. <?= _("No") ?>
  1270. </option>
  1271. </select>
  1272. </div>
  1273. <div class="u-mb10">
  1274. <label for="v_policy_user_delete_logs" class="form-label">
  1275. <?= _("Allow users to delete log history") ?>
  1276. </label>
  1277. <select
  1278. class="form-select"
  1279. name="v_policy_user_delete_logs"
  1280. id="v_policy_user_delete_logs"
  1281. >
  1282. <option value="yes">
  1283. <?= _("Yes") ?>
  1284. </option>
  1285. <option value="no" <?= $_SESSION["POLICY_USER_DELETE_LOGS"] == "no" ? "selected" : "" ?>>
  1286. <?= _("No") ?>
  1287. </option>
  1288. </select>
  1289. </div>
  1290. <h3 class="u-mt20 u-mb10">
  1291. <?= _("Domains") ?>
  1292. </h3>
  1293. <div class="u-mb10">
  1294. <label for="v_enforce_subdomain_ownership" class="form-label">
  1295. <?= _("Enforce subdomain ownership") ?>
  1296. </label>
  1297. <select
  1298. class="form-select"
  1299. name="v_enforce_subdomain_ownership"
  1300. id="v_enforce_subdomain_ownership"
  1301. >
  1302. <option value="yes">
  1303. <?= _("Yes") ?>
  1304. </option>
  1305. <option value="no" <?= $_SESSION["ENFORCE_SUBDOMAIN_OWNERSHIP"] == "no" ? "selected" : "" ?>>
  1306. <?= _("No") ?>
  1307. </option>
  1308. </select>
  1309. </div>
  1310. </div>
  1311. </div>
  1312. </details>
  1313. <!-- Plugins tab -->
  1314. <details class="collapse u-mb10">
  1315. <summary class="collapse-header">
  1316. <i class="fas fa-puzzle-piece u-mr15"></i>
  1317. <?= _("Hestia Control Panel Plugins") ?>
  1318. </summary>
  1319. <div class="collapse-content">
  1320. <div class="u-mb10">
  1321. <label for="v_plugin_app_installer" class="form-label">
  1322. <?= _("Quick App Installer") ?>
  1323. </label>
  1324. <select class="form-select" name="v_plugin_app_installer" id="v_plugin_app_installer">
  1325. <option value="false">
  1326. <?= _("No") ?>
  1327. </option>
  1328. <option value="true" <?= $_SESSION["PLUGIN_APP_INSTALLER"] == "true" ? "selected" : "" ?>>
  1329. <?= _("Yes") ?>
  1330. </option>
  1331. </select>
  1332. </div>
  1333. <div class="u-mb10">
  1334. <label for="v_filemanager" class="form-label">
  1335. <?= _("Filemanager") ?>
  1336. </label>
  1337. <select class="form-select" name="v_filemanager" id="v_filemanager">
  1338. <option value="false">
  1339. <?= _("No") ?>
  1340. </option>
  1341. <option value="true" <?= $_SESSION["FILE_MANAGER"] == "true" ? "selected" : "" ?>>
  1342. <?= _("Yes") ?>
  1343. </option>
  1344. </select>
  1345. </div>
  1346. <div class="u-mb10">
  1347. <label for="v_quota" class="form-label">
  1348. <?= _("FileSystem Disk Quota") ?>
  1349. </label>
  1350. <select class="form-select" name="v_quota" id="v_quota">
  1351. <option value="no">
  1352. <?= _("No") ?>
  1353. </option>
  1354. <option value="yes" <?= $_SESSION["DISK_QUOTA"] == "yes" ? "selected" : "" ?>>
  1355. <?= _("Yes") ?>
  1356. </option>
  1357. </select>
  1358. </div>
  1359. <div class="u-mb10">
  1360. <label for="v_firewall" class="form-label">
  1361. <?= _("Firewall") ?>
  1362. </label>
  1363. <select class="form-select" name="v_firewall" id="v_firewall">
  1364. <option value="no">
  1365. <?= _("No") ?>
  1366. </option>
  1367. <option value="yes" <?= $_SESSION["FIREWALL_SYSTEM"] == "iptables" ? "selected" : "" ?>>
  1368. <?= _("Yes") ?>
  1369. </option>
  1370. </select>
  1371. </div>
  1372. </div>
  1373. </details>
  1374. </div>
  1375. </form>
  1376. </div>
  1377. <!-- End form -->