Alec Rust 3 лет назад
Родитель
Сommit
fe985ed3a0

+ 5 - 1
.editorconfig

@@ -15,8 +15,12 @@ max_line_length = 100
 [*.md]
 trim_trailing_whitespace = false
 
-# YAML forbids using tabs.
+# YAML forbids using tabs
 # See https://yaml.org/faq.html
 [*.{yml,yaml}]
 indent_size = 2
 indent_style = space
+
+# Views have longer line length for now
+[web/templates/**/*.php]
+max_line_length = 200

+ 6 - 33
web/css/src/themes/dark.css

@@ -15,6 +15,12 @@
 
 	/* Alerts */
 	--alert-danger-color: #d13535;
+
+	/* Icons */
+	--icon-color-purple: #c364ff;
+	--icon-color-maroon: #ff3478;
+	--icon-color-green: #37cf39;
+	--icon-color-blue: #0092f4;
 }
 
 b,
@@ -753,38 +759,6 @@ form#vstobjects.suspended {
 /* Icon component
    ========================================================================== */
 
-.icon-purple {
-	color: #c364ff;
-
-	&:hover {
-		color: #c364ff;
-	}
-}
-
-.icon-maroon {
-	color: #ff3478;
-
-	&:hover {
-		color: #ff3478;
-	}
-}
-
-.icon-green {
-	color: #37cf39;
-
-	&:hover {
-		color: #37cf39;
-	}
-}
-
-.icon-blue {
-	color: #0092f4;
-
-	&:hover {
-		color: #0092f4;
-	}
-}
-
 .icon-highlight {
 	color: #dadada;
 
@@ -800,7 +774,6 @@ form#vstobjects.suspended {
 
 .l-unit--suspended .icon-dim {
 	color: #808080;
-	text-shadow: 0;
 }
 
 /* Modals

+ 28 - 27
web/css/src/themes/default.css

@@ -25,6 +25,16 @@
 	--alert-info-color: #618ecc;
 	--alert-danger-color: #ec6c6c;
 	--alert-success-color: #5ea64c;
+
+	/* Icons */
+	--icon-color-teal: #3cc;
+	--icon-color-purple: #8e2fca;
+	--icon-color-maroon: #c36;
+	--icon-color-red: #f33;
+	--icon-color-green: #53ba55;
+	--icon-color-orange: #ffc043;
+	--icon-color-blue: #326b9b;
+	--icon-color-lightblue: #6eb6f0;
 }
 
 .check-label {
@@ -1202,10 +1212,6 @@
 }
 
 .body-stats .l-unit__stat-col--left {
-	width: 130px;
-}
-
-.l-unit__stat-col.l-unit__stat-col--left.icon-pad-right {
 	width: 180px;
 }
 
@@ -1376,10 +1382,6 @@
 	display: inline-block;
 }
 
-.icon-pad-right {
-	margin-right: 6px;
-}
-
 .l-unit__stat-cols {
 	padding-right: 10px;
 }
@@ -2349,66 +2351,66 @@ form#vstobjects.suspended {
 }
 
 .icon-teal {
-	color: #3cc;
+	color: var(--icon-color-teal);
 
 	&:hover {
-		color: #3cc;
+		color: var(--icon-color-teal);
 	}
 }
 
 .icon-purple {
-	color: #8e2fca;
+	color: var(--icon-color-purple);
 
 	&:hover {
-		color: #8e2fca;
+		color: var(--icon-color-purple);
 	}
 }
 
 .icon-maroon {
-	color: #c36;
+	color: var(--icon-color-maroon);
 
 	&:hover {
-		color: #c36;
+		color: var(--icon-color-maroon);
 	}
 }
 
 .icon-red {
-	color: #f33;
+	color: var(--icon-color-red);
 
 	&:hover {
-		color: #f33;
+		color: var(--icon-color-red);
 	}
 }
 
 .icon-green {
-	color: #53ba55;
+	color: var(--icon-color-green);
 
 	&:hover {
-		color: #53ba55;
+		color: var(--icon-color-green);
 	}
 }
 
 .icon-orange {
-	color: #ffc043;
+	color: var(--icon-color-orange);
 
 	&:hover {
-		color: #ffc043;
+		color: var(--icon-color-orange);
 	}
 }
 
-.icon-lightblue {
-	color: #6eb6f0;
+.icon-blue {
+	color: var(--icon-color-blue);
 
 	&:hover {
-		color: #6eb6f0;
+		color: var(--icon-color-blue);
 	}
 }
 
-.icon-blue {
-	color: #326b9b;
+.icon-lightblue {
+	color: var(--icon-color-lightblue);
 
 	&:hover {
-		color: #326b9b;
+		color: var(--icon-color-lightblue);
 	}
 }
 
@@ -2427,7 +2429,6 @@ form#vstobjects.suspended {
 
 .l-unit--suspended .icon-dim {
 	color: #c0c0c0;
-	text-shadow: 0;
 }
 
 .cron-helper-container {

+ 4 - 0
web/css/src/utilities.css

@@ -69,6 +69,10 @@
 	margin-left: 10px !important;
 }
 
+.u-mr5 {
+	margin-right: 5px !important;
+}
+
 .u-mr10 {
 	margin-right: 10px !important;
 }

Разница между файлами не показана из-за своего большого размера
+ 0 - 0
web/css/themes/dark.min.css


Разница между файлами не показана из-за своего большого размера
+ 0 - 0
web/css/themes/default.min.css


+ 8 - 4
web/templates/includes/js.php

@@ -41,10 +41,14 @@
 	})
 </script>
 
-<?php foreach (new DirectoryIterator($_SERVER["HESTIA"] . "/web/js/custom_scripts") as $customScript) {
-	if ($customScript->getExtension() === "js") {
-		echo '<script defer src="/js/custom_scripts/' . rawurlencode($customScript->getBasename()) . '"></script>';
-	} elseif ($customScript->getExtension() === "php") {
+<?php
+$customScriptDirectory = new DirectoryIterator($_SERVER["HESTIA"] . "/web/js/custom_scripts");
+foreach ($customScriptDirectory as $customScript) {
+	$extension = $customScript->getExtension();
+	if ($extension === "js") {
+		$customScriptPath = "/js/custom_scripts/" . rawurlencode($customScript->getBasename());
+		echo '<script defer src="' . $customScriptPath . '"></script>';
+	} elseif ($extension === "php") {
 		require_once $customScript->getPathname();
 	}
 } ?>

+ 9 - 9
web/templates/pages/add_package.php

@@ -295,15 +295,15 @@
 				<div class="u-mb10">
 					<label for="v_shell" class="form-label"><?= _("SSH Access") ?></label>
 					<select class="form-select" name="v_shell" id="v_shell">
-						<?php
-							foreach ($shells as $key => $value) {
-								echo "\t\t\t\t<option value=\"".htmlentities($value)."\"";
-								if ((!empty($v_shell)) && ( $value == trim($v_shell,"''"))){
-									echo ' selected' ;
-								}
-								echo ">".htmlentities($value)."</option>\n";
-							}
-						?>
+						<?php foreach ($shells as $key => $value): ?>
+							<option value="<?= htmlentities($value) ?>"
+								<?php if ((!empty($v_shell)) && ($value == trim($v_shell,"''"))): ?>
+									selected
+								<?php endif; ?>
+							>
+								<?= htmlentities($value) ?>
+							</option>
+						<?php endforeach; ?>
 					</select>
 				</div>
 			</div>

+ 9 - 9
web/templates/pages/edit_package.php

@@ -299,15 +299,15 @@
 				<div class="u-mb10">
 					<label for="v_shell" class="form-label"><?= _("SSH Access") ?></label>
 					<select class="form-select" name="v_shell" id="v_shell">
-						<?php
-							foreach ($shells as $key => $value) {
-								echo "\t\t\t\t<option value=\"".htmlentities($value)."\"";
-								if ((!empty($v_shell)) && ( $value == trim($v_shell, "'"))){
-									echo ' selected' ;
-								}
-								echo ">".htmlentities($value)."</option>\n";
-							}
-						?>
+						<?php foreach ($shells as $key => $value): ?>
+							<option value="<?= htmlentities($value) ?>"
+								<?php if ((!empty($v_shell)) && ($value == trim($v_shell,"''"))): ?>
+									selected
+								<?php endif; ?>
+							>
+								<?= htmlentities($value) ?>
+							</option>
+						<?php endforeach; ?>
 					</select>
 				</div>
 			</div>

+ 1 - 1
web/templates/pages/list_backup_detail.php

@@ -67,7 +67,7 @@
 						<div class="actions-panel clearfix">
 							<div class="actions-panel__col actions-panel__list shortcut-enter" key-action="href">
 								<a href="/schedule/restore/?backup=<?=$backup?>&type=web&object=<?=$key?>&token=<?=$_SESSION['token']?>" title="<?= _("Restore") ?>">
-									<i class="fas fa-arrow-rotate-left icon-green icon-dim icon-pad-right"></i>
+									<i class="fas fa-arrow-rotate-left icon-green icon-dim u-mr5"></i>
 								</a>
 							</div>
 						</div>

+ 7 - 13
web/templates/pages/list_firewall.php

@@ -79,19 +79,13 @@
 					<div class="clearfix l-unit__stat-col--left wide-1">
 						<b>
 							<a href="/edit/firewall/?rule=<?=$key?>&token=<?=$_SESSION['token']?>" title="<?= _("Editing Firewall Rule") ?>">
-							<?php if ($data[$key]['SUSPENDED'] == 'no') { ?>
-								<?php if ($data[$key]['ACTION'] == 'DROP') { ?>
-									<i class="fas fa-circle-minus icon-red icon-pad-right"></i> <?=_($data[$key]['ACTION'])?>
-								<?php } else {?>
-									<i class="fas fa-circle-check icon-green icon-pad-right"></i> <?=_($data[$key]['ACTION'])?>
-								<?php } ?>
-							<?php } else {?>
-								<?php if ($data[$key]['ACTION'] == 'DROP') { ?>
-									<i class="fas fa-circle-minus icon-pad-right" style=""></i> <?=_($data[$key]['ACTION'])?>
-								<?php } else {?>
-									<i class="fas fa-circle-check icon-pad-right"></i> <?=_($data[$key]['ACTION'])?>
-								<?php } ?>
-							<?php } ?>
+								<?php
+									$suspended = $data[$key]["SUSPENDED"] == "no";
+									$action = $data[$key]["ACTION"];
+									$iconClass = $action == "DROP" ? "fa-circle-minus" : "fa-circle-check";
+									$colorClass = $action == "DROP" ? "icon-red" : "icon-green";
+								?>
+								<i class="fas <?= $iconClass ?> u-mr5 <?= $suspended ? $colorClass : "" ?>"></i> <?= _($action) ?>
 							</a>
 						</b>
 					</div>

+ 1 - 1
web/templates/pages/list_log_auth.php

@@ -70,7 +70,7 @@
 		<div class="l-unit header animate__animated animate__fadeIn">
 			<div class="l-unit__col l-unit__col--right">
 				<div class="clearfix l-unit__stat-col--left u-text-center">
-					<i class="fas <?=$status_icon;?> icon-pad-right" title="<?=$status_title;?>"></i>
+					<i class="fas <?=$status_icon;?> u-mr5" title="<?=$status_title;?>"></i>
 				</div>
 				<div class="clearfix l-unit__stat-col--left"><b><?=translate_date($data[$key]['DATE'])?></b></div>
 				<div class="clearfix l-unit__stat-col--left compact-2"><b><?=htmlspecialchars($data[$key]['TIME']);?></b></div>

+ 2 - 2
web/templates/pages/list_mail.php

@@ -2,7 +2,7 @@
 <div class="toolbar">
 	<div class="toolbar-inner">
 		<div class="toolbar-buttons">
-			<?php if ($read_only !== 'true') {?>
+			<?php if ($read_only !== "true") { ?>
 				<a href="/add/mail/" class="button button-secondary" id="btn-create"><i class="fas fa-circle-plus icon-green"></i><?= _("Add Mail Domain") ?></a>
 			<?php } ?>
 		</div>
@@ -57,7 +57,7 @@
 	<div class="header table-header">
 		<div class="l-unit__col l-unit__col--right">
 			<div class="clearfix l-unit__stat-col--left super-compact">
-				<input id="toggle-all" type="checkbox" name="toggle-all" value="toggle-all" title="<?= _("Select all") ?>" <?=$display_mode;?>>
+				<input id="toggle-all" type="checkbox" name="toggle-all" value="toggle-all" title="<?= _("Select all") ?>" <?= $display_mode ?>>
 			</div>
 			<div class="clearfix l-unit__stat-col--left wide-3"><b><?= _("Name") ?></b></div>
 			<div class="clearfix l-unit__stat-col--left u-text-right compact-5"><b>&nbsp;</b></div>

+ 11 - 9
web/templates/pages/list_mail_acc.php

@@ -1,15 +1,17 @@
 <?php
-	$v_webmail_alias = "webmail";
-	if (!empty($_SESSION['WEBMAIL_ALIAS'])) $v_webmail_alias = $_SESSION['WEBMAIL_ALIAS'];
+$v_webmail_alias = "webmail";
+if (!empty($_SESSION["WEBMAIL_ALIAS"])) {
+	$v_webmail_alias = $_SESSION["WEBMAIL_ALIAS"];
+}
 ?>
 <!-- Begin toolbar -->
 <div class="toolbar">
 	<div class="toolbar-inner">
 		<div class="toolbar-buttons">
 			<a class="button button-secondary" id="btn-back" href="/list/mail/"><i class="fas fa-arrow-left icon-blue"></i><?= _("Back") ?></a>
-			<?php if ($read_only !== 'true') { ?>
-				<a href="/add/mail/?domain=<?=htmlentities($_GET['domain'])?>" class="button button-secondary" id="btn-create"><i class="fas fa-circle-plus icon-green"></i><?= _("Add Mail Account") ?></a>
-				<a href="/edit/mail/?domain=<?=htmlentities($_GET['domain'])?>" class="button button-secondary" id="btn-create"><i class="fas fa-pencil icon-blue"></i><?= _("Editing Mail Domain") ?></a>
+			<?php if ($read_only !== "true") { ?>
+				<a href="/add/mail/?domain=<?= htmlentities($_GET["domain"]) ?>" class="button button-secondary" id="btn-create"><i class="fas fa-circle-plus icon-green"></i><?= _("Add Mail Account") ?></a>
+				<a href="/edit/mail/?domain=<?= htmlentities($_GET["domain"]) ?>" class="button button-secondary" id="btn-create"><i class="fas fa-pencil icon-blue"></i><?= _("Editing Mail Domain") ?></a>
 			<?php } ?>
 		</div>
 		<div class="toolbar-right">
@@ -27,10 +29,10 @@
 					<li entity="sort-name"><span class="name <?php if ($_SESSION['userSortOrder'] === 'name') { echo 'active'; } ?>"><?= _("Name") ?> <i class="fas fa-arrow-down-a-z"></i></span><span class="up"><i class="fas fa-arrow-up-a-z"></i></span></li>
 					<li entity="sort-quota" sort_as_int="1"><span class="name"><?= _("Quota") ?> <i class="fas fa-arrow-down-a-z"></i></span><span class="up"><i class="fas fa-arrow-up-a-z"></i></span></li>
 				</ul>
-				<?php if ($read_only !== 'true') { ?>
+				<?php if ($read_only !== "true") { ?>
 					<form x-bind="BulkEdit" action="/bulk/mail/" method="post">
-						<input type="hidden" name="token" value="<?=$_SESSION['token']?>">
-						<input type="hidden" value="<?=htmlspecialchars($_GET['domain']); ?>" name="domain">
+						<input type="hidden" name="token" value="<?= $_SESSION["token"] ?>">
+						<input type="hidden" value="<?= htmlspecialchars($_GET["domain"]) ?>" name="domain">
 						<select class="form-select" name="action">
 							<option value=""><?= _("apply to selected") ?></option>
 							<option value="suspend"><?= _("suspend") ?></option>
@@ -62,7 +64,7 @@
 		<div class="l-unit__col l-unit__col--right">
 			<div>
 				<div class="clearfix l-unit__stat-col--left super-compact">
-					<input id="toggle-all" type="checkbox" name="toggle-all" value="toggle-all" title="<?= _("Select all") ?>" <?=$display_mode;?>>
+					<input id="toggle-all" type="checkbox" name="toggle-all" value="toggle-all" title="<?= _("Select all") ?>" <?= $display_mode ?>>
 				</div>
 				<div class="clearfix l-unit__stat-col--left wide-3"><b><?= _("Name") ?></b></div>
 				<div class="clearfix l-unit__stat-col--left u-text-right compact-4"><b>&nbsp;</b></div>

+ 1 - 1
web/templates/pages/list_packages.php

@@ -19,7 +19,7 @@
 					<li entity="sort-name"><span class="name <?php if ($_SESSION['userSortOrder'] === 'name') { echo 'active'; } ?>"><?= _("Name") ?> <i class="fas fa-arrow-down-a-z"></i></span><span class="up"><i class="fas fa-arrow-up-a-z"></i></span></li>
 				</ul>
 				<form x-bind="BulkEdit" action="/bulk/package/" method="post">
-					<input type="hidden" name="token" value="<?=$_SESSION['token']?>">
+					<input type="hidden" name="token" value="<?= $_SESSION["token"] ?>">
 					<select class="form-select" name="action">
 						<option value=""><?= _("apply to selected") ?></option>
 						<option value="delete"><?= _("delete") ?></option>

+ 1 - 1
web/templates/pages/list_search.php

@@ -16,7 +16,7 @@
 				</ul>
 				<div class="toolbar-search">
 					<form action="/search/" method="get">
-						<input type="hidden" name="token" value="<?=$_SESSION['token']?>">
+						<input type="hidden" name="token" value="<?= $_SESSION["token"] ?>">
 						<input type="search" class="form-control js-search-input" name="q" value="<? echo isset($_GET['q']) ? htmlspecialchars($_GET['q']) : '' ?>" title="<?= _("Search") ?>">
 						<button type="submit" class="toolbar-input-submit" title="<?= _("Search") ?>">
 							<i class="fas fa-magnifying-glass"></i>

+ 1 - 1
web/templates/pages/list_services.php

@@ -139,7 +139,7 @@
 						<input id="check<?=$i ?>" class="ch-toggle" type="checkbox" title="<?= _("Select") ?>" name="service[]" value="<?=$key?>">
 					</div>
 					<div class="clearfix l-unit__stat-col--left wide-2">
-						<i class="fas <?=$state_icon;?> icon-pad-right"></i>
+						<i class="fas <?=$state_icon;?> u-mr5"></i>
 						<b><a href="/edit/server/<? echo $edit_url ?>/" title="<?= _("edit") ?>: <?=$key?>"><?=$key?></a></b>
 					</div>
 					<div class="clearfix l-unit__stat-col--left u-text-center compact-2">

+ 16 - 16
web/templates/pages/list_stats.php

@@ -2,14 +2,14 @@
 <div class="toolbar">
 	<div class="toolbar-inner">
 		<div class="toolbar-buttons">
-			<?php if (($_SESSION['userContext'] === 'admin') && (!isset($_SESSION['look']))) { ?>
+			<?php if ($_SESSION["userContext"] === "admin" && !isset($_SESSION["look"])) { ?>
 				<a class="button button-secondary" href='/list/stats/'><i class="fas fa-binoculars icon-lightblue"></i><?= _("Overall Statistics") ?></a>
 			<?php } ?>
 		</div>
 		<div class="toolbar-right">
-			<?php if (($_SESSION['userContext'] === 'admin') && (!isset($_SESSION['look']))) { ?>
+			<?php if ($_SESSION["userContext"] === "admin" && !isset($_SESSION["look"])) { ?>
 				<form x-bind="BulkEdit" action="/list/stats/" method="get">
-					<input type="hidden" name="token" value="<?=$_SESSION['token']?>">
+					<input type="hidden" name="token" value="<?= $_SESSION["token"] ?>">
 					<select class="form-select" name="user">
 						<option value=""><?= _("show per user") ?></option>
 						<?php
@@ -33,7 +33,7 @@
 			<?php } ?>
 			<div class="toolbar-search">
 				<form action="/search/" method="get">
-					<input type="hidden" name="token" value="<?=$_SESSION['token']?>">
+					<input type="hidden" name="token" value="<?= $_SESSION["token"] ?>">
 					<input type="search" class="form-control js-search-input" name="q" value="<? echo isset($_POST['q']) ? htmlspecialchars($_POST['q']) : '' ?>" title="<?= _("Search") ?>">
 					<button type="submit" class="toolbar-input-submit" title="<?= _("Search") ?>">
 						<i class="fas fa-magnifying-glass"></i>
@@ -75,7 +75,7 @@
 									<div class="l-unit__stat-cols clearfix">
 										<div class="l-unit__stat-cols clearfix graph">
 											<div class="l-unit__stat-col l-unit__stat-col--left">
-												<i class="fas fa-right-left icon-dim icon-large icon-pad-right" title="<?= _("Bandwidth") ?>"></i><b><?= _("Bandwidth") ?></b>
+												<i class="fas fa-right-left icon-dim icon-large u-mr5" title="<?= _("Bandwidth") ?>"></i><b><?= _("Bandwidth") ?></b>
 											</div>
 											<div class="l-unit__stat-col l-unit__stat-col--right u-text-right">
 												<b><?= humanize_usage_size($data[$key]["U_BANDWIDTH"]) ?></b> <?= humanize_usage_measure($data[$key]["U_BANDWIDTH"]) ?>
@@ -88,7 +88,7 @@
 								</td>
 								<td>
 									<div class="l-unit__stat-cols clearfix">
-										<div class="l-unit__stat-col l-unit__stat-col--left u-text-right icon-pad-right u-text-italic"><?= _("Web Domains") ?>:</div>
+										<div class="l-unit__stat-col l-unit__stat-col--left u-text-right u-text-italic u-mr5"><?= _("Web Domains") ?>:</div>
 										<div class="l-unit__stat-col l-unit__stat-col--right statistics-count">
 											<b><?= $data[$key]["U_WEB_DOMAINS"] ?></b>
 										</div>
@@ -96,7 +96,7 @@
 								</td>
 								<td>
 									<div class="l-unit__stat-cols clearfix last">
-										<div class="l-unit__stat-col l-unit__stat-col--left u-text-right icon-pad-right u-text-italic"><?= _("Mail Domains") ?>:</div>
+										<div class="l-unit__stat-col l-unit__stat-col--left u-text-right u-text-italic u-mr5"><?= _("Mail Domains") ?>:</div>
 										<div class="l-unit__stat-col l-unit__stat-col--right statistics-count">
 											<b><?= $data[$key]["U_MAIL_DOMAINS"] ?></b>
 										</div>
@@ -115,7 +115,7 @@
 								</td>
 								<td>
 									<div class="l-unit__stat-cols clearfix">
-										<div class="l-unit__stat-col l-unit__stat-col--left u-text-right icon-pad-right u-text-italic"><?= _("SSL Domains") ?>:</div>
+										<div class="l-unit__stat-col l-unit__stat-col--left u-text-right u-text-italic u-mr5"><?= _("SSL Domains") ?>:</div>
 										<div class="l-unit__stat-col l-unit__stat-col--right statistics-count">
 											<b><?= $data[$key]["U_WEB_SSL"] ?></b>
 										</div>
@@ -123,7 +123,7 @@
 								</td>
 								<td>
 									<div class="l-unit__stat-cols clearfix last">
-										<div class="l-unit__stat-col l-unit__stat-col--left u-text-right icon-pad-right u-text-italic"><?= _("Mail Accounts") ?>:</div>
+										<div class="l-unit__stat-col l-unit__stat-col--left u-text-right u-text-italic u-mr5"><?= _("Mail Accounts") ?>:</div>
 										<div class="l-unit__stat-col l-unit__stat-col--right statistics-count">
 											<b><?= $data[$key]["U_MAIL_ACCOUNTS"] ?></b>
 										</div>
@@ -133,7 +133,7 @@
 							<tr>
 								<td>
 									<div class="l-unit__stat-cols clearfix graph">
-										<div class="l-unit__stat-col l-unit__stat-col--left"><i class="fas fa-hard-drive icon-dim icon-large icon-pad-right" title="<?= _("Disk") ?>"></i><b><?= _("Disk") ?></b></div>
+										<div class="l-unit__stat-col l-unit__stat-col--left"><i class="fas fa-hard-drive icon-dim icon-large u-mr5" title="<?= _("Disk") ?>"></i><b><?= _("Disk") ?></b></div>
 										<div class="l-unit__stat-col l-unit__stat-col--right u-text-right">
 											<b><?= humanize_usage_size($data[$key]["U_DISK"]) ?></b> <?= humanize_usage_measure($data[$key]["U_DISK"]) ?>
 										</div>
@@ -144,7 +144,7 @@
 								</td>
 								<td>
 									<div class="l-unit__stat-cols clearfix">
-										<div class="l-unit__stat-col l-unit__stat-col--left u-text-right icon-pad-right u-text-italic"><?= _("Web Aliases") ?>:</div>
+										<div class="l-unit__stat-col l-unit__stat-col--left u-text-right u-text-italic u-mr5"><?= _("Web Aliases") ?>:</div>
 										<div class="l-unit__stat-col l-unit__stat-col--right statistics-count">
 											<b><?= $data[$key]["U_WEB_ALIASES"] ?></b>
 										</div>
@@ -152,7 +152,7 @@
 								</td>
 								<td>
 									<div class="l-unit__stat-cols clearfix last">
-										<div class="l-unit__stat-col l-unit__stat-col--left u-text-right icon-pad-right u-text-italic"><?= _("Databases") ?>:</div>
+										<div class="l-unit__stat-col l-unit__stat-col--left u-text-right u-text-italic u-mr5"><?= _("Databases") ?>:</div>
 										<div class="l-unit__stat-col l-unit__stat-col--right statistics-count">
 											<b><?= $data[$key]["U_DATABASES"] ?></b>
 										</div>
@@ -172,7 +172,7 @@
 								</td>
 								<td>
 									<div class="l-unit__stat-cols clearfix">
-										<div class="l-unit__stat-col l-unit__stat-col--left u-text-right icon-pad-right u-text-italic"><?= _("DNS domains") ?>:</div>
+										<div class="l-unit__stat-col l-unit__stat-col--left u-text-right u-text-italic u-mr5"><?= _("DNS domains") ?>:</div>
 										<div class="l-unit__stat-col l-unit__stat-col--right statistics-count">
 											<b><?= $data[$key]["U_DNS_DOMAINS"] ?></b>
 										</div>
@@ -180,7 +180,7 @@
 								</td>
 								<td>
 									<div class="l-unit__stat-cols clearfix last">
-										<div class="l-unit__stat-col l-unit__stat-col--left u-text-right icon-pad-right u-text-italic"><?= _("Cron Jobs") ?>:</div>
+										<div class="l-unit__stat-col l-unit__stat-col--left u-text-right u-text-italic u-mr5"><?= _("Cron Jobs") ?>:</div>
 										<div class="l-unit__stat-col l-unit__stat-col--right statistics-count">
 											<b><?= $data[$key]["U_CRON_JOBS"] ?></b>
 										</div>
@@ -200,7 +200,7 @@
 								</td>
 								<td>
 									<div class="l-unit__stat-cols clearfix">
-										<div class="l-unit__stat-col l-unit__stat-col--left u-text-right icon-pad-right u-text-italic"><?= _("DNS records") ?>:</div>
+										<div class="l-unit__stat-col l-unit__stat-col--left u-text-right u-text-italic u-mr5"><?= _("DNS records") ?>:</div>
 										<div class="l-unit__stat-col l-unit__stat-col--right statistics-count">
 											<b><?= $data[$key]["U_DNS_RECORDS"] ?></b>
 										</div>
@@ -208,7 +208,7 @@
 								</td>
 								<td>
 									<div class="l-unit__stat-cols clearfix last">
-										<div class="l-unit__stat-col l-unit__stat-col--left u-text-right icon-pad-right u-text-italic"><?= _("Backups") ?>:</div>
+										<div class="l-unit__stat-col l-unit__stat-col--left u-text-right u-text-italic u-mr5"><?= _("Backups") ?>:</div>
 										<div class="l-unit__stat-col l-unit__stat-col--right statistics-count">
 											<b><?= $data[$key]["U_BACKUPS"] ?></b>
 										</div>

+ 1 - 1
web/templates/pages/list_user.php

@@ -43,7 +43,7 @@
 			</div>
 			<div class="toolbar-search">
 				<form action="/search/" method="get">
-					<input type="hidden" name="token" value="<?=$_SESSION['token']?>">
+					<input type="hidden" name="token" value="<?= $_SESSION["token"] ?>">
 					<input type="search" class="form-control js-search-input" name="q" value="<? echo isset($_POST['q']) ? htmlspecialchars($_POST['q']) : '' ?>" title="<?= _("Search") ?>">
 					<button type="submit" class="toolbar-input-submit" title="<?= _("Search") ?>">
 						<i class="fas fa-magnifying-glass"></i>

+ 4 - 4
web/templates/pages/list_web.php

@@ -24,12 +24,12 @@
 					<li entity="sort-name"><span class="name <?php if ($_SESSION['userSortOrder'] === 'name') { echo 'active'; } ?>"><?= _("Name") ?> <i class="fas fa-arrow-down-a-z"></i></span><span class="up"><i class="fas fa-arrow-up-a-z"></i></span></li>
 					<li entity="sort-ip" sort_as_int="1"><span class="name"><?= _("IP address") ?> <i class="fas fa-arrow-down-a-z"></i></span><span class="up"><i class="fas fa-arrow-up-a-z"></i></span></li>
 				</ul>
-				<?php if ($read_only !== 'true') {?>
+				<?php if ($read_only !== "true") { ?>
 					<form x-bind="BulkEdit" action="/bulk/web/" method="post">
-						<input type="hidden" name="token" value="<?=$_SESSION['token']?>">
+						<input type="hidden" name="token" value="<?= $_SESSION["token"] ?>">
 						<select class="form-select" name="action">
 							<option value=""><?= _("apply to selected") ?></option>
-							<?php if ($_SESSION['userContext'] === 'admin') {?>
+							<?php if ($_SESSION["userContext"] === "admin") { ?>
 								<option value="rebuild"><?= _("rebuild") ?></option>
 							<?php } ?>
 							<option value="suspend"><?= _("suspend") ?></option>
@@ -62,7 +62,7 @@
 	<div class="header table-header">
 		<div class="l-unit__col l-unit__col--right">
 			<div class="clearfix l-unit__stat-col--left super-compact">
-				<input id="toggle-all" type="checkbox" name="toggle-all" value="toggle-all" title="<?= _("Select all") ?>" <?=$display_mode;?>>
+				<input id="toggle-all" type="checkbox" name="toggle-all" value="toggle-all" title="<?= _("Select all") ?>" <?= $display_mode ?>>
 			</div>
 			<div class="clearfix l-unit__stat-col--left wide-4"><b><?= _("Name") ?></b></div>
 			<div class="clearfix l-unit__stat-col--left compact-4 u-text-right"><b>&nbsp;</b></div>

+ 6 - 6
web/templates/pages/list_webapps.php

@@ -19,15 +19,15 @@
 		<?php show_alert_message($_SESSION); ?>
 		<div class="cards">
 			<!-- List available web apps -->
-			<?php foreach($v_web_apps as $webapp):?>
-				<div class="card <?=($webapp['enabled'] ? '' : 'disabled') ?>">
+			<?php foreach ($v_web_apps as $webapp): ?>
+				<div class="card <?= $webapp["enabled"] ? "" : "disabled" ?>">
 					<div class="card-thumb">
-						<img src="/src/app/WebApp/Installers/<?=$webapp['name'];?>/<?=$webapp['thumbnail'];?>" alt="<?=$webapp['name'];?>">
+						<img src="/src/app/WebApp/Installers/<?= $webapp["name"] ?>/<?= $webapp["thumbnail"] ?>" alt="<?= $webapp["name"] ?>">
 					</div>
 					<div class="card-content">
-						<p class="card-title"><?=$webapp['name'];?></p>
-						<p class="u-mb10"><?= _("version") ?>: <?=$webapp['version'];?></p>
-						<a class="button" href="/add/webapp/?app=<?=$webapp['name'];?>&domain=<?=htmlentities($v_domain)?>">
+						<p class="card-title"><?= $webapp["name"] ?></p>
+						<p class="u-mb10"><?= _("version") ?>: <?= $webapp["version"] ?></p>
+						<a class="button" href="/add/webapp/?app=<?= $webapp["name"] ?>&domain=<?= htmlentities($v_domain) ?>">
 							<?= _("Setup") ?>
 						</a>
 					</div>

+ 1 - 1
web/templates/pages/list_weblog.php

@@ -67,7 +67,7 @@
 								</a>
 							</li>
 							<li class="top-bar-menu-item">
-								<a class="top-bar-menu-link top-bar-menu-link-logout" href="/logout/?token=<?=$_SESSION['token']?>" title="<?= _("Log out") ?>">
+								<a class="top-bar-menu-link top-bar-menu-link-logout" href="/logout/?token=<?= $_SESSION["token"] ?>" title="<?= _("Log out") ?>">
 									<i class="fas fa-right-from-bracket"></i>
 									<span class="u-hidden"><?= _("Log out") ?></span>
 								</a>

+ 14 - 14
web/templates/pages/setup_webapp.php

@@ -2,7 +2,7 @@
 <div class="toolbar">
 	<div class="toolbar-inner">
 		<div class="toolbar-buttons">
-			<a class="button button-secondary" id="btn-back" href="/add/webapp/?domain=<?=htmlentities($v_domain);?>">
+			<a class="button button-secondary" id="btn-back" href="/add/webapp/?domain=<?= htmlentities($v_domain) ?>">
 				<i class="fas fa-arrow-left icon-blue"></i><?= _("Back") ?>
 			</a>
 		</div>
@@ -39,12 +39,12 @@
 						<div>
 							<p class="u-mb10"><?= _("Data loss warning!") ?></p>
 							<p class="u-mb10"><?= _("Your web folder already has files uploaded to it. The installer will overwrite your files and / or the installation might fail.") ?></p>
-							<p><?php echo sprintf(_('Please make sure ~/web/%s/public_html is empty!'),$v_domain);?></p>
+							<p><?php echo sprintf(_("Please make sure ~/web/%s/public_html is empty!"), $v_domain); ?></p>
 						</div>
 					</div>
 				<?php endif; ?>
 				<div class="u-mt20">
-					<?php foreach ($WebappInstaller->getOptions() as $form_name => $form_control):?>
+					<?php foreach ($WebappInstaller->getOptions() as $form_name => $form_control): ?>
 						<?php
 							$f_name = $WebappInstaller->formNs() . '_' . $form_name;
 							$f_type = $form_control;
@@ -67,10 +67,10 @@
 							$f_placeholder = htmlentities($f_placeholder);
 						?>
 						<div class="u-mb10">
-							<?php if($f_type != 'boolean'): ?>
-								<label for="<?=$f_name?>" class="form-label">
-									<?=$f_label?>
-									<?php if ($f_type === 'password'):?> / <a href="javascript:applyRandomStringToTarget('<?=$f_name?>');" class="form-link"><?= _("generate") ?></a> <?php endif?>
+							<?php if ($f_type != "boolean"): ?>
+								<label for="<?= $f_name ?>" class="form-label">
+									<?= $f_label ?>
+									<?php if ($f_type === "password"): ?> / <a href="javascript:applyRandomStringToTarget('<?= $f_name ?>');" class="form-link"><?= _("generate") ?></a> <?php endif; ?>
 								</label>
 							<?php endif; ?>
 							<?php if (in_array($f_type, ['select']) && count($form_control['options']) ):?>
@@ -84,19 +84,19 @@
 										<option value="<?=$key?>" <?=$selected?>><?=htmlentities($option)?></option>
 									<?php }; ?>
 								</select>
-							<?php elseif (in_array($f_type, ['boolean'])):?>
+							<?php elseif (in_array($f_type, ["boolean"])): ?>
 								<div class="form-check">
-									<?php $checked = (!empty($f_value))?'checked':''?>
-									<input class="form-check-input" type="checkbox" name="<?=$f_name?>" id="<?=$f_name?>" <?=$checked?> value="true">
-									<label for="<?=$f_name?>"><?=$f_label?></label>
+									<?php $checked = !empty($f_value) ? "checked" : ""; ?>
+									<input class="form-check-input" type="checkbox" name="<?= $f_name ?>" id="<?= $f_name ?>" <?= $checked ?> value="true">
+									<label for="<?= $f_name ?>"><?= $f_label ?></label>
 								</div>
-							<?php else:?>
-								<input type="text" class="form-control" name="<?=$f_name?>" id="<?=$f_name?>" placeholder="<?=$f_placeholder?>" value="<?=$f_value?>">
+							<?php else: ?>
+								<input type="text" class="form-control" name="<?= $f_name ?>" id="<?= $f_name ?>" placeholder="<?= $f_placeholder ?>" value="<?= $f_value ?>">
 							<?php endif; ?>
 						</div>
 					<?php endforeach; ?>
 				</div>
 			</div>
 		</form>
-	<?php endif ?>
+	<?php endif; ?>
 </div>

Некоторые файлы не были показаны из-за большого количества измененных файлов