This commit is contained in:
dpeca 2021-10-28 23:01:35 +03:00 committed by GitHub
commit a18f4a4cd0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 26 additions and 2 deletions

View file

@ -235,8 +235,8 @@ if (!empty($_POST['save'])) {
$restart_proxy = 'yes'; $restart_proxy = 'yes';
} }
// Change proxy template / Update extension list (admin only) // Change proxy template / Update extension list
if ((!empty($_SESSION['PROXY_SYSTEM'])) && (!empty($v_proxy)) && (!empty($_POST['v_proxy'])) && (empty($_SESSION['error_msg'])) && ($_SESSION['user'] == 'admin')) { if ((!empty($_SESSION['PROXY_SYSTEM'])) && (!empty($v_proxy)) && (!empty($_POST['v_proxy'])) && (empty($_SESSION['error_msg'])) ) {
$ext = preg_replace("/\n/", " ", $_POST['v_proxy_ext']); $ext = preg_replace("/\n/", " ", $_POST['v_proxy_ext']);
$ext = preg_replace("/,/", " ", $ext); $ext = preg_replace("/,/", " ", $ext);
$ext = preg_replace('/\s+/', ' ',$ext); $ext = preg_replace('/\s+/', ' ',$ext);

View file

@ -94,6 +94,30 @@
<tr> <tr>
<td class="step-left"> <td class="step-left">
<table style="display:<?php if (empty($v_proxy)) { echo 'none';} else {echo 'block';}?> ;" id="proxytable"> <table style="display:<?php if (empty($v_proxy)) { echo 'none';} else {echo 'block';}?> ;" id="proxytable">
<tr>
<td class="vst-text input-label">
<?php print __('Proxy Template');?>
</td>
</tr>
<tr>
<td>
<select class="vst-list" name="v_proxy_template">
<?php
foreach ($proxy_templates as $key => $value) {
echo "\t\t\t\t<option value=\"".htmlentities($value)."\"";
$svalue = "'".$value."'";
if ((!empty($v_proxy_template)) && ( $value == $v_proxy_template ) || ($svalue == $v_proxy_template)){
echo ' selected' ;
}
if ((empty($v_proxy_template)) && ($value == 'default')){
echo ' selected' ;
}
echo ">".htmlentities($value)."</option>\n";
}
?>
</select>
</td>
</tr>
<tr> <tr>
<td class="vst-text input-label"> <td class="vst-text input-label">
<?php print __('Proxy Extensions');?> <?php print __('Proxy Extensions');?>