Sfoglia il codice sorgente

Merge remote-tracking branch 'upstream/main' into ipv6

asmcc 3 anni fa
parent
commit
9ef529fe90

+ 4 - 10
web/templates/pages/edit_server.php

@@ -945,9 +945,7 @@
 							class="form-control u-min-height100 u-console"
 							name="v_ssl_crt"
 							id="v_ssl_crt"
-						>
-							<?= htmlentities(trim($v_ssl_crt, "'")) ?>
-						</textarea>
+						><?= htmlentities(trim($v_ssl_crt, "'")) ?></textarea>
 					</div>
 					<div class="u-mb20">
 						<label for="v_ssl_key" class="form-label">
@@ -957,9 +955,7 @@
 							class="form-control u-min-height100 u-console"
 							name="v_ssl_key"
 							id="v_ssl_key"
-						>
-							<?= htmlentities(trim($v_ssl_key, "'")) ?>
-						</textarea>
+						><?= htmlentities(trim($v_ssl_key, "'")) ?></textarea>
 					</div>
 					<ul class="values-list">
 						<li class="values-list-item">
@@ -1049,13 +1045,11 @@
 									<?= _("Allowed IP addresses for API") ?>
 									<span class="optional">1 IP address per line</span>
 								</label>
-								<textarea class="form-control" name="v_api_allowed_ip" id="v_api_allowed_ip">
-									<?php
+								<textarea class="form-control" name="v_api_allowed_ip" id="v_api_allowed_ip"><?php
 										foreach (explode(",", $_SESSION["API_ALLOWED_IP"]) as $ip) {
 											echo trim($ip)."\n";
 										}
-									?>
-								</textarea>
+									?></textarea>
 							</div>
 						</div>
 						<h3 class="u-mt20 u-mb10">

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

@@ -121,7 +121,7 @@
 						</label>
 					</div>
 				<?php } ?>
-				<div x-cloak x-show="loginDisabled" id="password-options">
+				<div x-cloak x-show="!loginDisabled" id="password-options">
 					<div class="form-check u-mt15">
 						<input class="form-check-input" type="checkbox" name="v_twofa" id="v_twofa" <?php if(!empty($v_twofa)) echo 'checked' ?>>
 						<label for="v_twofa">
@@ -134,7 +134,7 @@
 						<div><img class="qr-code" src="<?= htmlentities($v_qrcode) ?>" alt=""></div>
 					<?php } ?>
 				</div>
-				<div x-cloak x-show="loginDisabled" id="password-options-ip">
+				<div x-cloak x-show="!loginDisabled" id="password-options-ip">
 					<div class="form-check">
 						<input x-model="useIpAllowList" class="form-check-input" type="checkbox" name="v_login_use_iplist" id="v_login_use_iplist">
 						<label for="v_login_use_iplist">

+ 5 - 2
web/templates/pages/list_firewall_ipset.php

@@ -37,7 +37,8 @@
 	</div>
 
 	<!-- Begin firewall IP address list item loop -->
-	<?php foreach ($data as $key => $value) {
+	<?php
+	foreach ($data as $key => $value) {
  	$listname = $key; ?>
 		<div class="l-unit animate__animated animate__fadeIn">
 			<div class="l-unit__col l-unit__col--right">
@@ -75,7 +76,9 @@
 				<div class="clearfix l-unit__stat-col--left u-text-center compact-4"><?= $data[$key]["TIME"] ?></div>
 			</div>
 		</div>
-	<?php } ?>
+	<?php
+	$i++;
+} ?>
 </div>
 
 <footer class="app-footer">

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

@@ -157,7 +157,7 @@
 				<!-- END QUICK ACTION TOOLBAR AREA -->
 				<div class="clearfix l-unit__stat-col--left u-text-center">
 					<b>
-						<?php if ($data[$key]["PACKAGE"] === "default") { ?>
+						<?php if ($data[$key]["PACKAGE"] === "system") { ?>
 							<?= $data[$key]["PACKAGE"] ?>
 						<?php } else { ?>
 							<a href="/edit/package/?package=<?= $data[$key]["PACKAGE"] ?>&token=<?= $_SESSION["token"] ?>" title="<?= _("Edit Package") ?>"><?= $data[$key]["PACKAGE"] ?></a>