Initial
This commit is contained in:
45
web/templates/pages/add_access_key.php
Normal file
45
web/templates/pages/add_access_key.php
Normal file
@@ -0,0 +1,45 @@
|
||||
<!-- Begin toolbar -->
|
||||
<div class="toolbar">
|
||||
<div class="toolbar-inner">
|
||||
<div class="toolbar-buttons">
|
||||
<a class="button button-secondary button-back js-button-back" href="/list/access-key/">
|
||||
<i class="fas fa-arrow-left icon-blue"></i><?= _("Back") ?>
|
||||
</a>
|
||||
</div>
|
||||
<div class="toolbar-buttons">
|
||||
<button type="submit" class="button" form="main-form">
|
||||
<i class="fas fa-floppy-disk icon-purple"></i><?= _("Save") ?>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- End toolbar -->
|
||||
|
||||
<div class="container">
|
||||
<form id="main-form" name="v_add_access_key" method="post">
|
||||
<input type="hidden" name="token" value="<?= $_SESSION["token"] ?>">
|
||||
<input type="hidden" name="ok" value="Add">
|
||||
|
||||
<div class="form-container">
|
||||
<h1 class="u-mb20"><?= _("Add Access Key") ?></h1>
|
||||
<?php show_alert_message($_SESSION); ?>
|
||||
<p class="u-mb10"><?= _("Permissions") ?></p>
|
||||
<?php foreach ($apis as $api_name => $api_data) { ?>
|
||||
<div class="form-check">
|
||||
<input class="form-check-input" type="checkbox" value="<?= $api_name ?>" name="v_apis[]" id="v_apis_<?= $api_name ?>" tabindex="5">
|
||||
<label for="v_apis_<?= $api_name ?>">
|
||||
<?= _($api_name) ?>
|
||||
</label>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<div class="u-mt15">
|
||||
<label for="v_comment" class="form-label">
|
||||
<?= _("Comment") ?> <span class="optional">(<?= _("Optional") ?>)</span>
|
||||
</label>
|
||||
<input type="text" class="form-control" name="v_comment" id="v_comment" maxlength="255">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
|
||||
</div>
|
||||
377
web/templates/pages/add_cron.php
Normal file
377
web/templates/pages/add_cron.php
Normal file
@@ -0,0 +1,377 @@
|
||||
<!-- Begin toolbar -->
|
||||
<div class="toolbar">
|
||||
<div class="toolbar-inner">
|
||||
<div class="toolbar-buttons">
|
||||
<a class="button button-secondary button-back js-button-back" href="/list/cron/">
|
||||
<i class="fas fa-arrow-left icon-blue"></i><?= _("Back") ?>
|
||||
</a>
|
||||
</div>
|
||||
<div class="toolbar-buttons">
|
||||
<button type="submit" class="button" form="main-form">
|
||||
<i class="fas fa-floppy-disk icon-purple"></i><?= _("Save") ?>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- End toolbar -->
|
||||
|
||||
<div class="container">
|
||||
|
||||
<form id="main-form" name="v_add_cron" method="post">
|
||||
<input type="hidden" name="token" value="<?= $_SESSION["token"] ?>">
|
||||
<input type="hidden" name="ok" value="Add">
|
||||
|
||||
<div class="form-container form-container-wide">
|
||||
<h1 class="u-mb20"><?= _("Add Cron Job") ?></h1>
|
||||
<?php show_alert_message($_SESSION); ?>
|
||||
<div class="u-mb20">
|
||||
<label for="v_cmd" class="form-label"><?= _("Command") ?></label>
|
||||
<input type="text" class="form-control" name="v_cmd" id="v_cmd" value="<?= htmlentities(trim($v_cmd, "'")) ?>">
|
||||
</div>
|
||||
<div class="sidebar-left-grid">
|
||||
<div class="sidebar-left-grid-sidebar">
|
||||
<div class="u-mb10">
|
||||
<label for="v_min" class="form-label"><?= _("Minute") ?></label>
|
||||
<input type="text" class="form-control" name="v_min" id="v_min" value="<?= htmlentities(trim($v_min, "'")) ?>">
|
||||
</div>
|
||||
<div class="u-mb10">
|
||||
<label for="v_hour" class="form-label"><?= _("Hour") ?></label>
|
||||
<input type="text" class="form-control" name="v_hour" id="v_hour" value="<?= htmlentities(trim($v_hour, "'")) ?>">
|
||||
</div>
|
||||
<div class="u-mb10">
|
||||
<label for="v_day" class="form-label"><?= _("Day") ?></label>
|
||||
<input type="text" class="form-control" name="v_day" id="v_day" value="<?= htmlentities(trim($v_day, "'")) ?>">
|
||||
</div>
|
||||
<div class="u-mb10">
|
||||
<label for="v_month" class="form-label"><?= _("Month") ?></label>
|
||||
<input type="text" class="form-control" name="v_month" id="v_month" value="<?= htmlentities(trim($v_month, "'")) ?>">
|
||||
</div>
|
||||
<div class="u-mb10">
|
||||
<label for="v_wday" class="form-label"><?= _("Day of Week") ?></label>
|
||||
<input type="text" class="form-control" name="v_wday" id="v_wday" value="<?= htmlentities(trim($v_wday, "'")) ?>">
|
||||
</div>
|
||||
</div>
|
||||
<div class="sidebar-left-grid-content">
|
||||
<div class="tabs cron-tabs js-tabs">
|
||||
<div class="tabs-items" role="tablist">
|
||||
<button type="button" class="tabs-item" id="tab-one" role="tab" tabindex="0" aria-selected="true"><?= _("Minutes") ?></button>
|
||||
<button type="button" class="tabs-item" id="tab-two" role="tab" tabindex="-1"><?= _("Hourly") ?></button>
|
||||
<button type="button" class="tabs-item" id="tab-three" role="tab" tabindex="-1"><?= _("Daily") ?></button>
|
||||
<button type="button" class="tabs-item" id="tab-four" role="tab" tabindex="-1"><?= _("Weekly") ?></button>
|
||||
<button type="button" class="tabs-item" id="tab-five" role="tab" tabindex="-1"><?= _("Monthly") ?></button>
|
||||
</div>
|
||||
<div class="tabs-panel" role="tabpanel" aria-labelledby="tab-one" tabindex="0">
|
||||
<fieldset>
|
||||
<input type="hidden" name="h_hour" value="*" form="">
|
||||
<input type="hidden" name="h_day" value="*" form="">
|
||||
<input type="hidden" name="h_month" value="*" form="">
|
||||
<input type="hidden" name="h_wday" value="*" form="">
|
||||
<div class="u-mt10 u-mb20">
|
||||
<label for="h_min_1" class="form-label first"><?= _("Run Command") ?>:</label>
|
||||
<select class="form-select" name="h_min" id="h_min_1" form="">
|
||||
<option value="*" selected="selected"><?= _("Every minute") ?></option>
|
||||
<option value="*/2"><?= sprintf(_("Every %s minutes"), 2) ?></option>
|
||||
<option value="*/5"><?= sprintf(_("Every %s minutes"), 5) ?></option>
|
||||
<option value="*/10"><?= sprintf(_("Every %s minutes"), 10) ?></option>
|
||||
<option value="*/15"><?= sprintf(_("Every %s minutes"), 15) ?></option>
|
||||
<option value="*/30"><?= sprintf(_("Every %s minutes"), 30) ?></option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="u-pt10">
|
||||
<button type="button" class="button button-secondary js-generate-cron">
|
||||
<?= _("Generate") ?>
|
||||
</button>
|
||||
</div>
|
||||
</fieldset>
|
||||
</div>
|
||||
<div class="tabs-panel" role="tabpanel" aria-labelledby="tab-two" tabindex="0" hidden>
|
||||
<fieldset>
|
||||
<input type="hidden" name="h_day" value="*" form="">
|
||||
<input type="hidden" name="h_month" value="*" form="">
|
||||
<input type="hidden" name="h_wday" value="*" form="">
|
||||
<div class="u-mt10 u-mb10">
|
||||
<label for="h_hour_2" class="form-label first"><?= _("Run Command") ?>:</label>
|
||||
<select class="form-select" name="h_hour" id="h_hour_2" form="">
|
||||
<option value="*" selected="selected"><?= _("Every hour") ?></option>
|
||||
<option value="*/2"><?= sprintf(_("Every %s hours"), 2) ?></option>
|
||||
<option value="*/6"><?= sprintf(_("Every %s hours"), 6) ?></option>
|
||||
<option value="*/12"><?= sprintf(_("Every %s hours"), 12) ?></option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="u-mb20">
|
||||
<label for="h_min_2" class="form-label first"><?= _("Minute") ?>:</label>
|
||||
<select class="form-select" name="h_min" id="h_min_2" style="width:70px;" form="">
|
||||
<option value="0" selected="selected">00</option>
|
||||
<option value="15">15</option>
|
||||
<option value="30">30</option>
|
||||
<option value="45">45</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="u-pt10">
|
||||
<button type="button" class="button button-secondary js-generate-cron">
|
||||
<?= _("Generate") ?>
|
||||
</button>
|
||||
</div>
|
||||
</fieldset>
|
||||
</div>
|
||||
<div class="tabs-panel" role="tabpanel" aria-labelledby="tab-three" tabindex="0" hidden>
|
||||
<fieldset>
|
||||
<input type="hidden" name="h_month" value="*" form="">
|
||||
<input type="hidden" name="h_wday" value="*" form="">
|
||||
<div class="u-mt10 u-mb10">
|
||||
<label for="h_day_3" class="form-label first"><?= _("Run Command") ?>:</label>
|
||||
<select class="form-select" name="h_day" id="h_day_3" form="">
|
||||
<option value="*" selected="selected"><?= _("Every day") ?></option>
|
||||
<option value="1-31/2"><?= _("Every odd day") ?></option>
|
||||
<option value="*/2"><?= _("Every even day") ?></option>
|
||||
<option value="*/3"><?= sprintf(_("Every %s days"), 2) ?></option>
|
||||
<option value="*/5"><?= sprintf(_("Every %s days"), 5) ?></option>
|
||||
<option value="*/10"><?= sprintf(_("Every %s days"), 10) ?></option>
|
||||
<option value="*/15"><?= sprintf(_("Every %s days"), 15) ?></option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="u-mb20">
|
||||
<label for="h_hour_3" class="form-label first"><?= _("Hour") ?>:</label>
|
||||
<select class="form-select" name="h_hour" id="h_hour_3" style="width:70px;" form="">
|
||||
<option value="0">00</option>
|
||||
<option value="1">01</option>
|
||||
<option value="2">02</option>
|
||||
<option value="3">03</option>
|
||||
<option value="4">04</option>
|
||||
<option value="5">05</option>
|
||||
<option value="6">06</option>
|
||||
<option value="7">07</option>
|
||||
<option value="8">08</option>
|
||||
<option value="9">09</option>
|
||||
<option value="10">10</option>
|
||||
<option value="11">11</option>
|
||||
<option value="12" selected="selected">12</option>
|
||||
<option value="13">13</option>
|
||||
<option value="14">14</option>
|
||||
<option value="15">15</option>
|
||||
<option value="16">16</option>
|
||||
<option value="17">17</option>
|
||||
<option value="18">18</option>
|
||||
<option value="19">19</option>
|
||||
<option value="20">20</option>
|
||||
<option value="21">21</option>
|
||||
<option value="22">22</option>
|
||||
<option value="23">23</option>
|
||||
</select>
|
||||
<label for="h_min_3" class="form-label"><?= _("Minute") ?>:</label>
|
||||
<select class="form-select" name="h_min" id="h_min_3" style="width:70px;" form="">
|
||||
<option value="0" selected="selected">00</option>
|
||||
<option value="1">01</option>
|
||||
<option value="2">02</option>
|
||||
<option value="5">05</option>
|
||||
<option value="10">10</option>
|
||||
<option value="15">15</option>
|
||||
<option value="20">20</option>
|
||||
<option value="25">25</option>
|
||||
<option value="30">30</option>
|
||||
<option value="35">35</option>
|
||||
<option value="40">40</option>
|
||||
<option value="45">45</option>
|
||||
<option value="50">50</option>
|
||||
<option value="55">55</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="u-pt10">
|
||||
<button type="button" class="button button-secondary js-generate-cron">
|
||||
<?= _("Generate") ?>
|
||||
</button>
|
||||
</div>
|
||||
</fieldset>
|
||||
</div>
|
||||
<div class="tabs-panel" role="tabpanel" aria-labelledby="tab-four" tabindex="0" hidden>
|
||||
<fieldset>
|
||||
<input type="hidden" name="h_month" value="*" form="">
|
||||
<input type="hidden" name="h_day" value="*" form="">
|
||||
<div class="u-mt10 u-mb10">
|
||||
<label for="h_wday_4" class="form-label first"><?= _("Run Command") ?>:</label>
|
||||
<select class="form-select" name="h_wday" id="h_wday_4" form="">
|
||||
<option value="*" selected="selected"><?= _("Every day") ?></option>
|
||||
<option value="1,2,3,4,5"><?= _("Weekdays (5 days)") ?></option>
|
||||
<option value="0,6"><?= _("Weekend (2 days)") ?></option>
|
||||
<option value="1"><?= _("Monday") ?></option>
|
||||
<option value="2"><?= _("Tuesday") ?></option>
|
||||
<option value="3"><?= _("Wednesday") ?></option>
|
||||
<option value="4"><?= _("Thursday") ?></option>
|
||||
<option value="5"><?= _("Friday") ?></option>
|
||||
<option value="6"><?= _("Saturday") ?></option>
|
||||
<option value="0"><?= _("Sunday") ?></option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="u-mb20">
|
||||
<label for="h_hour_4" class="form-label first"><?= _("Hour") ?>:</label>
|
||||
<select class="form-select" name="h_hour" id="h_hour_4" style="width:70px;" form="">
|
||||
<option value="0">00</option>
|
||||
<option value="1">01</option>
|
||||
<option value="2">02</option>
|
||||
<option value="3">03</option>
|
||||
<option value="4">04</option>
|
||||
<option value="5">05</option>
|
||||
<option value="6">06</option>
|
||||
<option value="7">07</option>
|
||||
<option value="8">08</option>
|
||||
<option value="9">09</option>
|
||||
<option value="10">10</option>
|
||||
<option value="11">11</option>
|
||||
<option value="12" selected="selected">12</option>
|
||||
<option value="13">13</option>
|
||||
<option value="14">14</option>
|
||||
<option value="15">15</option>
|
||||
<option value="16">16</option>
|
||||
<option value="17">17</option>
|
||||
<option value="18">18</option>
|
||||
<option value="19">19</option>
|
||||
<option value="20">20</option>
|
||||
<option value="21">21</option>
|
||||
<option value="22">22</option>
|
||||
<option value="23">23</option>
|
||||
</select>
|
||||
<label for="h_min_4" class="form-label"><?= _("Minute") ?>:</label>
|
||||
<select class="form-select" name="h_min" id="h_min_4" style="width:70px;" form="">
|
||||
<option value="0" selected="selected">00</option>
|
||||
<option value="1">01</option>
|
||||
<option value="2">02</option>
|
||||
<option value="5">05</option>
|
||||
<option value="10">10</option>
|
||||
<option value="15">15</option>
|
||||
<option value="20">20</option>
|
||||
<option value="25">25</option>
|
||||
<option value="30">30</option>
|
||||
<option value="35">35</option>
|
||||
<option value="40">40</option>
|
||||
<option value="45">45</option>
|
||||
<option value="50">50</option>
|
||||
<option value="55">55</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="u-pt10">
|
||||
<button type="button" class="button button-secondary js-generate-cron">
|
||||
<?= _("Generate") ?>
|
||||
</button>
|
||||
</div>
|
||||
</fieldset>
|
||||
</div>
|
||||
<div class="tabs-panel" role="tabpanel" aria-labelledby="tab-five" tabindex="0" hidden>
|
||||
<fieldset>
|
||||
<input type="hidden" name="h_wday" value="*" form="">
|
||||
<div class="u-mt10 u-mb10">
|
||||
<label for="h_month_5" class="form-label first"><?= _("Run Command") ?>:</label>
|
||||
<select class="form-select" name="h_month" id="h_month_5" form="">
|
||||
<option value="*" selected="selected"><?= _("Every month") ?></option>
|
||||
<option value="1-11/2"><?= _("Every odd month") ?></option>
|
||||
<option value="*/2"><?= _("Every even month") ?></option>
|
||||
<option value="*/3"><?= sprintf(_("Every %s months"), 3) ?></option>
|
||||
<option value="*/6"><?= sprintf(_("Every %s months"), 6) ?></option>
|
||||
<option value="1"><?= _("Jan") ?></option>
|
||||
<option value="2"><?= _("Feb") ?></option>
|
||||
<option value="3"><?= _("Mar") ?></option>
|
||||
<option value="4"><?= _("Apr") ?></option>
|
||||
<option value="5"><?= _("May") ?></option>
|
||||
<option value="6"><?= _("Jun") ?></option>
|
||||
<option value="7"><?= _("Jul") ?></option>
|
||||
<option value="8"><?= _("Aug") ?></option>
|
||||
<option value="9"><?= _("Sep") ?></option>
|
||||
<option value="10"><?= _("Oct") ?></option>
|
||||
<option value="11"><?= _("Nov") ?></option>
|
||||
<option value="12"><?= _("Dec") ?></option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="u-mb20">
|
||||
<label for="h_day_5" class="form-label first"><?= _("Day") ?>:</label>
|
||||
<select class="form-select" name="h_day" id="h_day_5" style="width:70px;" form="">
|
||||
<option value="1" selected="selected">01</option>
|
||||
<option value="2">02</option>
|
||||
<option value="3">03</option>
|
||||
<option value="4">04</option>
|
||||
<option value="5">05</option>
|
||||
<option value="6">06</option>
|
||||
<option value="7">07</option>
|
||||
<option value="8">08</option>
|
||||
<option value="9">09</option>
|
||||
<option value="10">10</option>
|
||||
<option value="11">11</option>
|
||||
<option value="12">12</option>
|
||||
<option value="13">13</option>
|
||||
<option value="14">14</option>
|
||||
<option value="15">15</option>
|
||||
<option value="16">16</option>
|
||||
<option value="17">17</option>
|
||||
<option value="18">18</option>
|
||||
<option value="19">19</option>
|
||||
<option value="20">20</option>
|
||||
<option value="21">21</option>
|
||||
<option value="22">22</option>
|
||||
<option value="23">23</option>
|
||||
<option value="24">24</option>
|
||||
<option value="25">25</option>
|
||||
<option value="26">26</option>
|
||||
<option value="27">27</option>
|
||||
<option value="28">28</option>
|
||||
<option value="29">29</option>
|
||||
<option value="30">30</option>
|
||||
<option value="31">31</option>
|
||||
</select>
|
||||
<label for="h_hour_5" class="form-label"><?= _("Hour") ?>:</label>
|
||||
<select class="form-select" name="h_hour" id="h_hour_5" style="width:70px;" form="">
|
||||
<option value="0">00</option>
|
||||
<option value="1">01</option>
|
||||
<option value="2">02</option>
|
||||
<option value="3">03</option>
|
||||
<option value="4">04</option>
|
||||
<option value="5">05</option>
|
||||
<option value="6">06</option>
|
||||
<option value="7">07</option>
|
||||
<option value="8">08</option>
|
||||
<option value="9">09</option>
|
||||
<option value="10">10</option>
|
||||
<option value="11">11</option>
|
||||
<option value="12" selected="selected">12</option>
|
||||
<option value="13">13</option>
|
||||
<option value="14">14</option>
|
||||
<option value="15">15</option>
|
||||
<option value="16">16</option>
|
||||
<option value="17">17</option>
|
||||
<option value="18">18</option>
|
||||
<option value="19">19</option>
|
||||
<option value="20">20</option>
|
||||
<option value="21">21</option>
|
||||
<option value="22">22</option>
|
||||
<option value="23">23</option>
|
||||
</select>
|
||||
<label for="h_min_5" class="form-label"><?= _("Minute") ?>:</label>
|
||||
<select class="form-select" name="h_min" id="h_min_5" style="width:70px;" form="">
|
||||
<option value="0" selected="selected">00</option>
|
||||
<option value="1">01</option>
|
||||
<option value="2">02</option>
|
||||
<option value="5">05</option>
|
||||
<option value="10">10</option>
|
||||
<option value="15">15</option>
|
||||
<option value="20">20</option>
|
||||
<option value="25">25</option>
|
||||
<option value="30">30</option>
|
||||
<option value="35">35</option>
|
||||
<option value="40">40</option>
|
||||
<option value="45">45</option>
|
||||
<option value="50">50</option>
|
||||
<option value="55">55</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="u-pt10">
|
||||
<button type="button" class="button button-secondary js-generate-cron">
|
||||
<?= _("Generate") ?>
|
||||
</button>
|
||||
</div>
|
||||
</fieldset>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
|
||||
</div>
|
||||
169
web/templates/pages/add_db.php
Normal file
169
web/templates/pages/add_db.php
Normal file
@@ -0,0 +1,169 @@
|
||||
<!-- Begin toolbar -->
|
||||
<div class="toolbar">
|
||||
<div class="toolbar-inner">
|
||||
<div class="toolbar-buttons">
|
||||
<a class="button button-secondary button-back js-button-back" href="/list/db/">
|
||||
<i class="fas fa-arrow-left icon-blue"></i><?= _("Back") ?>
|
||||
</a>
|
||||
</div>
|
||||
<div class="toolbar-buttons">
|
||||
<?php if (($user_plain == "admin" && $accept === "true") || $user_plain !== "admin") { ?>
|
||||
<button type="submit" class="button" form="main-form">
|
||||
<i class="fas fa-floppy-disk icon-purple"></i><?= _("Save") ?>
|
||||
</button>
|
||||
<?php } ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- End toolbar -->
|
||||
|
||||
<div class="container">
|
||||
|
||||
<form
|
||||
x-data="{
|
||||
showAdvanced: <?= empty($v_adv) ? "false" : "true" ?>
|
||||
}"
|
||||
id="main-form"
|
||||
name="v_add_db"
|
||||
method="post"
|
||||
>
|
||||
<input type="hidden" name="token" value="<?= $_SESSION["token"] ?>">
|
||||
<input type="hidden" name="ok" value="Add">
|
||||
|
||||
<div class="form-container">
|
||||
<h1 class="u-mb20"><?= _("Add Database") ?></h1>
|
||||
<?php show_alert_message($_SESSION); ?>
|
||||
<?php if ($user_plain == "admin" && $accept !== "true") { ?>
|
||||
<div class="alert alert-danger" role="alert">
|
||||
<i class="fas fa-exclamation"></i>
|
||||
<p><?= htmlify_trans(sprintf(_("It is strongly advised to {create a standard user account} before adding %s to the server due to the increased privileges the admin account possesses and potential security risks."), _('a database')), '</a>', '<a href="/add/user/">'); ?></p>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<?php if ($user_plain == "admin" && empty($accept)) { ?>
|
||||
<div class="u-side-by-side u-mt20">
|
||||
<a href="/add/user/" class="button u-width-full u-mr10"><?= _("Add User") ?></a>
|
||||
<a href="/add/db/?accept=true" class="button button-danger u-width-full u-ml10"><?= _("Continue") ?></a>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<?php if (($user_plain == "admin" && $accept === "true") || $user_plain !== "admin") { ?>
|
||||
<p class="hint u-mb20">
|
||||
<?= sprintf(_("Prefix %s will be automatically added to database name and database user"), "<span class=\"u-text-bold\">" . $user_plain . "_</span>") ?>
|
||||
</p>
|
||||
<div class="u-mb10">
|
||||
<label for="v_database" class="form-label"><?= _("Database") ?></label>
|
||||
<input type="text" class="form-control js-db-hint-database-name" name="v_database" id="v_database" value="<?= htmlentities(trim($v_database, "'")) ?>">
|
||||
<small class="hint"></small>
|
||||
</div>
|
||||
<div class="u-mb10">
|
||||
<label for="v_type" class="form-label"><?= _("Type") ?></label>
|
||||
<select class="form-select" name="v_type" id="v_type">
|
||||
<?php
|
||||
foreach ($db_types as $key => $value) {
|
||||
echo "\n\t\t\t\t\t\t\t\t\t\t<option value=\"".htmlentities($value)."\"";
|
||||
if ((!empty($v_type)) && ( $value == $v_type )) echo ' selected';
|
||||
echo ">".htmlentities($value)."</option>";
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
</div>
|
||||
<div class="u-mb10">
|
||||
<label for="v_dbuser" class="form-label u-side-by-side">
|
||||
<?= _("Username") ?>
|
||||
<em><small>(<?= sprintf(_("Maximum %s characters length, including prefix"), 32) ?>)</small></em>
|
||||
</label>
|
||||
<input type="text" class="form-control js-db-hint-username" name="v_dbuser" id="v_dbuser" value="<?= htmlentities(trim($v_dbuser, "'")) ?>">
|
||||
<small class="hint"></small>
|
||||
</div>
|
||||
<div class="u-mb10">
|
||||
<label for="v_password" class="form-label">
|
||||
<?= _("Password") ?>
|
||||
<button type="button" title="<?= _("Generate") ?>" class="u-unstyled-button u-ml5 js-generate-password">
|
||||
<i class="fas fa-arrows-rotate icon-green"></i>
|
||||
</button>
|
||||
</label>
|
||||
<div class="u-pos-relative u-mb10">
|
||||
<input type="text" class="form-control js-password-input" name="v_password" id="v_password">
|
||||
<div class="password-meter">
|
||||
<meter max="4" class="password-meter-input js-password-meter"></meter>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<p class="u-mb10"><?= _("Your password must have at least") ?>:</p>
|
||||
<ul class="u-list-bulleted u-mb10">
|
||||
<li><?= _("8 characters long") ?></li>
|
||||
<li><?= _("1 uppercase & 1 lowercase character") ?></li>
|
||||
<li><?= _("1 number") ?></li>
|
||||
</ul>
|
||||
<div class="u-mb20">
|
||||
<label for="v_db_email" class="form-label">
|
||||
<?= _("Email login credentials to:") ?>
|
||||
</label>
|
||||
<input type="email" class="form-control" name="v_db_email" id="v_db_email" value="<?= htmlentities(trim($v_db_email, "'")) ?>">
|
||||
</div>
|
||||
<div class="u-mb20">
|
||||
<button x-on:click="showAdvanced = !showAdvanced" type="button" class="button button-secondary">
|
||||
<?= _("Advanced Options") ?>
|
||||
</button>
|
||||
</div>
|
||||
<div x-cloak x-show="showAdvanced">
|
||||
<div class="u-mb10">
|
||||
<label for="v_host" class="form-label"><?= _("Host") ?></label>
|
||||
<select class="form-select" name="v_host" id="v_host">
|
||||
<?php
|
||||
foreach ($db_hosts as $value) {
|
||||
echo "\n\t\t\t\t\t\t\t\t\t\t<option value=\"".htmlentities($value)."\"";
|
||||
if ((!empty($v_host)) && ( $value == $v_host )) echo ' selected';
|
||||
echo ">".htmlentities($value)."</option>";
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
</div>
|
||||
<div class="u-mb10">
|
||||
<label for="v_charset" class="form-label"><?= _("Charset") ?></label>
|
||||
<select class="form-select" name="v_charset" id="v_charset">
|
||||
<option value=big5 <?php if ((!empty($v_charset)) && ( $v_charset == 'big5')) echo 'selected'; ?>>big5</option>
|
||||
<option value=dec8 <?php if ((!empty($v_charset)) && ( $v_charset == 'dec8')) echo 'selected'; ?>>dec8</option>
|
||||
<option value=cp850 <?php if ((!empty($v_charset)) && ( $v_charset == 'cp850')) echo 'selected'; ?>>cp850</option>
|
||||
<option value=hp8 <?php if ((!empty($v_charset)) && ( $v_charset == 'hp8')) echo 'selected'; ?>>hp8</option>
|
||||
<option value=koi8r <?php if ((!empty($v_charset)) && ( $v_charset == 'koi8r')) echo 'selected'; ?>>koi8r</option>
|
||||
<option value=latin1 <?php if ((!empty($v_charset)) && ( $v_charset == 'latin1')) echo 'selected'; ?>>latin1</option>
|
||||
<option value=latin2 <?php if ((!empty($v_charset)) && ( $v_charset == 'latin2')) echo 'selected'; ?>>latin2</option>
|
||||
<option value=swe7 <?php if ((!empty($v_charset)) && ( $v_charset == 'swe7')) echo 'selected'; ?>>swe7</option>
|
||||
<option value=ascii <?php if ((!empty($v_charset)) && ( $v_charset == 'ascii')) echo 'selected'; ?>>ascii</option>
|
||||
<option value=ujis <?php if ((!empty($v_charset)) && ( $v_charset == 'ujis')) echo 'selected'; ?>>ujis</option>
|
||||
<option value=sjis <?php if ((!empty($v_charset)) && ( $v_charset == 'sjis')) echo 'selected'; ?>>sjis</option>
|
||||
<option value=hebrew <?php if ((!empty($v_charset)) && ( $v_charset == 'hebrew')) echo 'selected'; ?>>hebrew</option>
|
||||
<option value=tis620 <?php if ((!empty($v_charset)) && ( $v_charset == 'tis620')) echo 'selected'; ?>>tis620</option>
|
||||
<option value=euckr <?php if ((!empty($v_charset)) && ( $v_charset == 'euckr')) echo 'selected'; ?>>euckr</option>
|
||||
<option value=koi8u <?php if ((!empty($v_charset)) && ( $v_charset == 'koi8u')) echo 'selected'; ?>>koi8u</option>
|
||||
<option value=gb2312 <?php if ((!empty($v_charset)) && ( $v_charset == 'gb2312')) echo 'selected'; ?>>gb2312</option>
|
||||
<option value=greek <?php if ((!empty($v_charset)) && ( $v_charset == 'greek')) echo 'selected'; ?>>greek</option>
|
||||
<option value=cp1250 <?php if ((!empty($v_charset)) && ( $v_charset == 'cp1250')) echo 'selected'; ?>>cp1250</option>
|
||||
<option value=gbk <?php if ((!empty($v_charset)) && ( $v_charset == 'gbk')) echo 'selected'; ?>>gbk</option>
|
||||
<option value=latin5 <?php if ((!empty($v_charset)) && ( $v_charset == 'latin5')) echo 'selected'; ?>>latin5</option>
|
||||
<option value=armscii8 <?php if ((!empty($v_charset)) && ( $v_charset == 'armscii8')) echo 'selected'; ?>>armscii8</option>
|
||||
<option value=utf8 <?php if ((!empty($v_charset)) && ( $v_charset == 'utf8')) echo 'selected'; ?>>utf8</option>
|
||||
<option value=utf8mb4 <?php if ((!empty($v_charset)) && ( $v_charset == 'utf8mb4')) echo 'selected'; ?> <?php if (empty($v_charset)) echo 'selected'; ?>>utf8mb4</option>
|
||||
<option value=ucs2 <?php if ((!empty($v_charset)) && ( $v_charset == 'ucs2')) echo 'selected'; ?>>ucs2</option>
|
||||
<option value=cp866 <?php if ((!empty($v_charset)) && ( $v_charset == 'cp866')) echo 'selected'; ?>>cp866</option>
|
||||
<option value=keybcs2 <?php if ((!empty($v_charset)) && ( $v_charset == 'keybcs2')) echo 'selected'; ?>>keybcs2</option>
|
||||
<option value=macce <?php if ((!empty($v_charset)) && ( $v_charset == 'macce')) echo 'selected'; ?>>macce</option>
|
||||
<option value=macroman <?php if ((!empty($v_charset)) && ( $v_charset == 'macroman')) echo 'selected'; ?>>macroman</option>
|
||||
<option value=cp852 <?php if ((!empty($v_charset)) && ( $v_charset == 'cp852')) echo 'selected'; ?>>cp852</option>
|
||||
<option value=latin7 <?php if ((!empty($v_charset)) && ( $v_charset == 'latin7')) echo 'selected'; ?>>latin7</option>
|
||||
<option value=cp1251 <?php if ((!empty($v_charset)) && ( $v_charset == 'cp1251')) echo 'selected'; ?>>cp1251</option>
|
||||
<option value=cp1256 <?php if ((!empty($v_charset)) && ( $v_charset == 'cp1256')) echo 'selected'; ?>>cp1256</option>
|
||||
<option value=cp1257 <?php if ((!empty($v_charset)) && ( $v_charset == 'cp1257')) echo 'selected'; ?>>cp1257</option>
|
||||
<option value=binary <?php if ((!empty($v_charset)) && ( $v_charset == 'binary')) echo 'selected'; ?>>binary</option>
|
||||
<option value=geostd8 <?php if ((!empty($v_charset)) && ( $v_charset == 'geostd8')) echo 'selected'; ?>>geostd8</option>
|
||||
<option value=cp932 <?php if ((!empty($v_charset)) && ( $v_charset == 'cp932')) echo 'selected'; ?>>cp932</option>
|
||||
<option value=eucjpms <?php if ((!empty($v_charset)) && ( $v_charset == 'eucjpms')) echo 'selected'; ?>>eucjpms</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<?php } ?>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
|
||||
</div>
|
||||
165
web/templates/pages/add_dns.php
Normal file
165
web/templates/pages/add_dns.php
Normal file
@@ -0,0 +1,165 @@
|
||||
<!-- Begin toolbar -->
|
||||
<div class="toolbar">
|
||||
<div class="toolbar-inner">
|
||||
<div class="toolbar-buttons">
|
||||
<a class="button button-secondary button-back js-button-back" href="/list/dns/">
|
||||
<i class="fas fa-arrow-left icon-blue"></i><?= _("Back") ?>
|
||||
</a>
|
||||
</div>
|
||||
<div class="toolbar-buttons">
|
||||
<?php if (($user_plain == "admin" && $accept === "true") || $user_plain !== "admin") { ?>
|
||||
<button type="submit" class="button" form="main-form">
|
||||
<i class="fas fa-floppy-disk icon-purple"></i><?= _("Save") ?>
|
||||
</button>
|
||||
<?php } ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- End toolbar -->
|
||||
|
||||
<div class="container">
|
||||
|
||||
<form
|
||||
x-data="{
|
||||
showAdvanced: <?= empty($v_adv) ? "false" : "true" ?>
|
||||
}"
|
||||
id="main-form"
|
||||
name="v_add_dns"
|
||||
method="post"
|
||||
>
|
||||
<input type="hidden" name="token" value="<?= $_SESSION["token"] ?>">
|
||||
<input type="hidden" name="ok" value="Add">
|
||||
|
||||
<div class="form-container">
|
||||
<h1 class="u-mb20"><?= _("Add DNS Zone") ?></h1>
|
||||
<?php show_alert_message($_SESSION); ?>
|
||||
<?php if ($user_plain == "admin" && $accept !== "true") { ?>
|
||||
<div class="alert alert-danger" role="alert">
|
||||
<i class="fas fa-exclamation"></i>
|
||||
<p><?= htmlify_trans(sprintf(_("It is strongly advised to {create a standard user account} before adding %s to the server due to the increased privileges the admin account possesses and potential security risks."), _('a dns domain')), '</a>', '<a href="/add/user/">'); ?></p>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<?php if ($user_plain == "admin" && empty($accept)) { ?>
|
||||
<div class="u-side-by-side u-mt20">
|
||||
<a href="/add/user/" class="button u-width-full u-mr10"><?= _("Add User") ?></a>
|
||||
<a href="/add/dns/?accept=true" class="button button-danger u-width-full u-ml10"><?= _("Continue") ?></a>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<?php if (($user_plain == "admin" && $accept === "true") || $user_plain !== "admin") { ?>
|
||||
<div class="u-mb10">
|
||||
<label for="v_domain" class="form-label"><?= _("Domain") ?></label>
|
||||
<input type="text" class="form-control" name="v_domain" id="v_domain" value="<?= htmlentities(trim($v_domain, "'")) ?>" required>
|
||||
</div>
|
||||
<div class="u-mb10">
|
||||
<label for="v_ip" class="form-label"><?= _("IP Address") ?></label>
|
||||
<div class="u-pos-relative">
|
||||
<select class="form-select" tabindex="-1" onchange="this.nextElementSibling.value=this.value">
|
||||
<option value="">clear</option>
|
||||
<?php
|
||||
foreach ($v_ips as $ip => $value) {
|
||||
$display_ip = empty($value['NAT']) ? $ip : "{$value['NAT']}";
|
||||
echo "<option value='{$display_ip}'>" . htmlentities($display_ip) . "</option>\n";
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
<input type="text" class="form-control list-editor" name="v_ip" id="v_ip" value="<?= htmlentities(trim($v_ip, "'")) ?>">
|
||||
</div>
|
||||
</div>
|
||||
<?php if ($_SESSION["userContext"] === "admin" || ($_SESSION["userContext"] === "user" && $_SESSION["POLICY_USER_EDIT_DNS_TEMPLATES"] === "yes")) { ?>
|
||||
<div class="u-mb10">
|
||||
<label for="v_template" class="form-label">
|
||||
<?= _("Template") . "<span class='optional'>" . strtoupper($_SESSION["DNS_SYSTEM"]) . "</span>" ?>
|
||||
</label>
|
||||
<select class="form-select" name="v_template" id="v_template">
|
||||
<?php
|
||||
foreach ($templates as $key => $value) {
|
||||
echo "\t\t\t\t<option value=\"".htmlentities($value)."\"";
|
||||
$svalue = "'".$value."'";
|
||||
if ((!empty($v_template)) && ( $value == $v_template ) || ($svalue == $v_template)) {
|
||||
echo ' selected' ;
|
||||
}
|
||||
echo ">".htmlentities($value)."</option>\n";
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<div class="u-mb20 u-mt20">
|
||||
<button x-on:click="showAdvanced = !showAdvanced" type="button" class="button button-secondary">
|
||||
<?= _("Advanced Options") ?>
|
||||
</button>
|
||||
</div>
|
||||
<div x-cloak x-show="showAdvanced" id="advtable">
|
||||
<?php if ($_SESSION["DNS_CLUSTER_SYSTEM"] == "hestia-zone" && $_SESSION["SUPPORT_DNSSEC"] == "yes") { ?>
|
||||
<div class="form-check u-mb10">
|
||||
<input class="form-check-input" type="checkbox" name="v_dnssec" id="v_dnssec" value="yes" <?php if ($v_dnssec === 'yes'){ echo ' checked'; } ?>>
|
||||
<label for="v_dnssec">
|
||||
<?= _("Enable DNSSEC") ?>
|
||||
</label>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<div class="u-mb10">
|
||||
<label for="v_exp" class="form-label">
|
||||
<?= _("Expiration Date") ?> <span class="optional">(<?= _("YYYY-MM-DD") ?>)</span>
|
||||
</label>
|
||||
<input type="text" class="form-control" name="v_exp" id="v_exp" value="<?= htmlentities(trim($v_exp, "'")) ?>">
|
||||
</div>
|
||||
<div class="u-mb10">
|
||||
<label for="v_ttl" class="form-label"><?= _("TTL") ?></label>
|
||||
<input type="text" class="form-control" name="v_ttl" id="v_ttl" value="<?= htmlentities(trim($v_ttl, "'")) ?>">
|
||||
</div>
|
||||
<p class="form-label u-mb10"><?= _("Name Servers") ?></p>
|
||||
<div class="u-mb5">
|
||||
<input type="text" class="form-control" name="v_ns1" value="<?= htmlentities(trim($v_ns1, "'")) ?>">
|
||||
</div>
|
||||
<div class="u-mb5">
|
||||
<input type="text" class="form-control" name="v_ns2" value="<?= htmlentities(trim($v_ns2, "'")) ?>">
|
||||
</div>
|
||||
<?php
|
||||
if ($v_ns3) {
|
||||
echo '<div class="u-side-by-side u-mb5">
|
||||
<input type="text" class="form-control" name="v_ns3" value="' . htmlentities(trim($v_ns3, "'")) . '">
|
||||
<span class="form-link form-link-danger u-ml10 js-remove-ns">' . _('Delete') . '</span>
|
||||
</div>';
|
||||
}
|
||||
if ($v_ns4) {
|
||||
echo '<div class="u-side-by-side u-mb5">
|
||||
<input type="text" class="form-control" name="v_ns4" value="' . htmlentities(trim($v_ns4, "'")) . '">
|
||||
<span class="form-link form-link-danger u-ml10 js-remove-ns">' . _('Delete') . '</span>
|
||||
</div>';
|
||||
}
|
||||
if ($v_ns5) {
|
||||
echo '<div class="u-side-by-side u-mb5">
|
||||
<input type="text" class="form-control" name="v_ns5" value="' . htmlentities(trim($v_ns5, "'")) . '">
|
||||
<span class="form-link form-link-danger u-ml10 js-remove-ns">' . _('Delete') . '</span>
|
||||
</div>';
|
||||
}
|
||||
if ($v_ns6) {
|
||||
echo '<div class="u-side-by-side u-mb5">
|
||||
<input type="text" class="form-control" name="v_ns6" value="' . htmlentities(trim($v_ns6, "'")) . '">
|
||||
<span class="form-link form-link-danger u-ml10 js-remove-ns">' . _('Delete') . '</span>
|
||||
</div>';
|
||||
}
|
||||
if ($v_ns7) {
|
||||
echo '<div class="u-side-by-side u-mb5">
|
||||
<input type="text" class="form-control" name="v_ns7" value="' . htmlentities(trim($v_ns7, "'")) . '">
|
||||
<span class="form-link form-link-danger u-ml10 js-remove-ns">' . _('Delete') . '</span>
|
||||
</div>';
|
||||
}
|
||||
if ($v_ns8) {
|
||||
echo '<div class="u-side-by-side u-mb5">
|
||||
<input type="text" class="form-control" name="v_ns8" value="' . htmlentities(trim($v_ns8, "'")) . '">
|
||||
<span class="form-link form-link-danger u-ml10 js-remove-ns">' . _('Delete') . '</span>
|
||||
</div>';
|
||||
}
|
||||
?>
|
||||
<button type="button" class="form-link u-mt20 js-add-ns" <?php if ($v_ns8) echo 'style="display:none;"'; ?>>
|
||||
<?= _("Add Name Server") ?>
|
||||
</button>
|
||||
</div>
|
||||
<?php } ?>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
|
||||
</div>
|
||||
88
web/templates/pages/add_dns_rec.php
Normal file
88
web/templates/pages/add_dns_rec.php
Normal file
@@ -0,0 +1,88 @@
|
||||
<!-- Begin toolbar -->
|
||||
<div class="toolbar">
|
||||
<div class="toolbar-inner">
|
||||
<div class="toolbar-buttons">
|
||||
<a class="button button-secondary button-back js-button-back" href="/list/dns/?domain=<?= htmlentities(trim($v_domain, "'")) ?>&token=<?= $_SESSION["token"] ?>">
|
||||
<i class="fas fa-arrow-left icon-blue"></i><?= _("Back") ?>
|
||||
</a>
|
||||
</div>
|
||||
<div class="toolbar-buttons">
|
||||
<button type="submit" class="button" form="main-form">
|
||||
<i class="fas fa-floppy-disk icon-purple"></i><?= _("Save") ?>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- End toolbar -->
|
||||
|
||||
<div class="container">
|
||||
|
||||
<form id="main-form" name="v_add_dns_rec" method="post">
|
||||
<input type="hidden" name="token" value="<?= $_SESSION["token"] ?>">
|
||||
<input type="hidden" name="ok_rec" value="add">
|
||||
|
||||
<div class="form-container">
|
||||
<h1 class="u-mb20"><?= _("Add DNS Record") ?></h1>
|
||||
<?php show_alert_message($_SESSION); ?>
|
||||
<div class="u-mb10">
|
||||
<label for="v_domain" class="form-label"><?= _("Domain") ?></label>
|
||||
<input type="text" class="form-control js-dns-record-domain" name="v_domain" id="v_domain" value="<?= htmlentities(trim($v_domain, "'")) ?>" disabled>
|
||||
<input type="hidden" name="v_domain" value="<?= htmlentities(trim($v_domain, "'")) ?>">
|
||||
</div>
|
||||
<div class="u-mb10">
|
||||
<label for="v_rec" class="form-label"><?= _("Record") ?></label>
|
||||
<input type="text" class="form-control js-dns-record-input" name="v_rec" id="v_rec" value="<?= htmlentities(trim($v_rec, "'")) ?>">
|
||||
<small class="hint"></small>
|
||||
</div>
|
||||
<div class="u-mb10">
|
||||
<label for="v_type" class="form-label"><?= _("Type") ?></label>
|
||||
<select class="form-select" name="v_type" id="v_type">
|
||||
<option value="A" <?php if ($v_type == 'A') echo "selected"; ?>>A</option>
|
||||
<option value="AAAA" <?php if ($v_type == 'AAAA') echo "selected"; ?>>AAAA</option>
|
||||
<option value="CAA" <?php if ($v_type == 'CAA') echo "selected"; ?>>CAA</option>
|
||||
<option value="CNAME" <?php if ($v_type == 'CNAME') echo "selected"; ?>>CNAME</option>
|
||||
<option value="DNSKEY" <?php if ($v_type == 'DNSKEY') echo "selected"; ?>>DNSKEY</option>
|
||||
<option value="DS" <?php if ($v_type == 'DS') echo "selected"; ?>>DS</option>
|
||||
<option value="IPSECKEY" <?php if ($v_type == 'IPSECKEY') echo "selected"; ?>>IPSECKEY</option>
|
||||
<option value="KEY" <?php if ($v_type == 'KEY') echo "selected"; ?>>KEY</option>
|
||||
<option value="MX" <?php if ($v_type == 'MX') echo "selected"; ?>>MX</option>
|
||||
<option value="NS" <?php if ($v_type == 'NS') echo "selected"; ?>>NS</option>
|
||||
<option value="PTR" <?php if ($v_type == 'PTR') echo "selected"; ?>>PTR</option>
|
||||
<option value="SPF" <?php if ($v_type == 'SPF') echo "selected"; ?>>SPF</option>
|
||||
<option value="SRV" <?php if ($v_type == 'SRV') echo "selected"; ?>>SRV</option>
|
||||
<option value="TLSA" <?php if ($v_type == 'TLSA') echo "selected"; ?>>TLSA</option>
|
||||
<option value="TXT" <?php if ($v_type == 'TXT') echo "selected"; ?>>TXT</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="u-mb10">
|
||||
<label for="v_val" class="form-label"><?= _("IP or Value") ?></label>
|
||||
<div class="u-pos-relative">
|
||||
<select class="form-select" tabindex="-1" onchange="this.nextElementSibling.value=this.value">
|
||||
<option value=""> </option>
|
||||
<?php
|
||||
foreach ($v_ips as $ip => $value) {
|
||||
$display_ip = empty($value['NAT']) ? $ip : "{$value['NAT']}";
|
||||
echo "<option value='{$display_ip}'>" . htmlentities($display_ip) . "</option>\n";
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
<input type="text" class="form-control list-editor" name="v_val" id="v_val" value="<?= htmlentities(trim($v_val, "'")) ?>" required>
|
||||
</div>
|
||||
</div>
|
||||
<div class="u-mb10">
|
||||
<label for="v_priority" class="form-label">
|
||||
<?= _("Priority") ?> <span class="optional">(<?= _("Optional") ?>)</span>
|
||||
</label>
|
||||
<input type="text" class="form-control" name="v_priority" id="v_priority" value="<?= htmlentities(trim($v_priority, "'")) ?>">
|
||||
</div>
|
||||
<div class="u-mb10">
|
||||
<label for="v_ttl" class="form-label">
|
||||
<?= _("TTL") ?> <span class="optional">(<?= _("Optional") ?>)</span>
|
||||
</label>
|
||||
<input type="text" class="form-control" name="v_ttl" id="v_ttl" value="<?= htmlentities(trim($v_ttl, "'")) ?>">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
|
||||
</div>
|
||||
74
web/templates/pages/add_firewall.php
Normal file
74
web/templates/pages/add_firewall.php
Normal file
@@ -0,0 +1,74 @@
|
||||
<!-- Begin toolbar -->
|
||||
<div class="toolbar">
|
||||
<div class="toolbar-inner">
|
||||
<div class="toolbar-buttons">
|
||||
<a class="button button-secondary button-back js-button-back" href="/list/firewall/">
|
||||
<i class="fas fa-arrow-left icon-blue"></i><?= _("Back") ?>
|
||||
</a>
|
||||
</div>
|
||||
<div class="toolbar-buttons">
|
||||
<button type="submit" class="button" form="main-form">
|
||||
<i class="fas fa-floppy-disk icon-purple"></i><?= _("Save") ?>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- End toolbar -->
|
||||
|
||||
<div class="container">
|
||||
|
||||
<form id="main-form" name="v_add_ip" method="post">
|
||||
<input type="hidden" name="token" value="<?= $_SESSION["token"] ?>">
|
||||
<input type="hidden" name="ok" value="Add">
|
||||
|
||||
<div class="form-container">
|
||||
<h1 class="u-mb20"><?= _("Add Firewall Rule") ?></h1>
|
||||
<?php show_alert_message($_SESSION); ?>
|
||||
<div class="u-mb10">
|
||||
<label for="v_action" class="form-label"><?= _("Action") ?></label>
|
||||
<select class="form-select" name="v_action" id="v_action">
|
||||
<option value="DROP" <?php if ((!empty($v_action)) && ( $v_action == "'DROP'" )) echo 'selected'?>><?= _("DROP") ?></option>
|
||||
<option value="ACCEPT" <?php if ((!empty($v_action)) && ( $v_action == "'ACCEPT'" )) echo 'selected'?>><?= _("ACCEPT") ?></option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="u-mb10">
|
||||
<label for="v_protocol" class="form-label"><?= _("Protocol") ?></label>
|
||||
<select class="form-select" name="v_protocol" id="v_protocol">
|
||||
<option value="TCP" <?php if ((!empty($v_protocol)) && ( $v_protocol == "'TCP'" )) echo 'selected'?>>TCP</option>
|
||||
<option value="UDP" <?php if ((!empty($v_protocol)) && ( $v_protocol == "'UDP'" )) echo 'selected'?>>UDP</option>
|
||||
<option value="ICMP" <?php if ((!empty($v_protocol)) && ( $v_protocol == "'ICMP'" )) echo 'selected'?>>ICMP</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="u-mb10">
|
||||
<label for="v_port" class="form-label">
|
||||
<?= _("Port") ?> <span class="optional">(<?= _("Ranges and lists are acceptable") ?>)</span>
|
||||
</label>
|
||||
<input type="text" class="form-control" name="v_port" id="v_port" value="<?= htmlentities(trim($v_port, "'")) ?>" placeholder="<?= _("All ports: 0, Range: 80-82, List: 80,443,8080,8443") ?>">
|
||||
</div>
|
||||
<div class="u-mb10">
|
||||
<label for="v_ip" class="form-label">
|
||||
<?= _("IP Address / IPset IP List") ?> <span class="optional">(<?= _("Support CIDR format") ?>)</span>
|
||||
</label>
|
||||
<div class="u-pos-relative">
|
||||
<select
|
||||
class="form-select js-ip-list-select"
|
||||
tabindex="-1"
|
||||
onchange="this.nextElementSibling.value=this.value"
|
||||
data-ipset-lists="<?= htmlspecialchars($ipset_lists_json, ENT_QUOTES, "UTF-8") ?>"
|
||||
>
|
||||
<option value=""><?= _("Clear") ?></option>
|
||||
</select>
|
||||
<input type="text" class="form-control list-editor" name="v_ip" id="v_ip" value="<?= htmlentities(trim($v_ip, "'")) ?>">
|
||||
</div>
|
||||
</div>
|
||||
<div class="u-mb10">
|
||||
<label for="v_comment" class="form-label">
|
||||
<?= _("Comment") ?> <span class="optional">(<?= _("Optional") ?>)</span>
|
||||
</label>
|
||||
<input type="text" class="form-control" name="v_comment" id="v_comment" maxlength="255" value="<?= htmlentities(trim($v_comment, "'")) ?>">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
|
||||
</div>
|
||||
49
web/templates/pages/add_firewall_banlist.php
Normal file
49
web/templates/pages/add_firewall_banlist.php
Normal file
@@ -0,0 +1,49 @@
|
||||
<!-- Begin toolbar -->
|
||||
<div class="toolbar">
|
||||
<div class="toolbar-inner">
|
||||
<div class="toolbar-buttons">
|
||||
<a class="button button-secondary button-back js-button-back" href="/list/firewall/banlist/">
|
||||
<i class="fas fa-arrow-left icon-blue"></i><?= _("Back") ?>
|
||||
</a>
|
||||
</div>
|
||||
<div class="toolbar-buttons">
|
||||
<button type="submit" class="button" form="main-form">
|
||||
<i class="fas fa-floppy-disk icon-purple"></i><?= _("Save") ?>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- End toolbar -->
|
||||
|
||||
<div class="container">
|
||||
|
||||
<form id="main-form" name="v_add_ip" method="post">
|
||||
<input type="hidden" name="token" value="<?= $_SESSION["token"] ?>">
|
||||
<input type="hidden" name="ok" value="Add">
|
||||
|
||||
<div class="form-container">
|
||||
<h1 class="u-mb20"><?= _("Add IP Address to Banlist") ?></h1>
|
||||
<?php show_alert_message($_SESSION); ?>
|
||||
<div class="u-mb20">
|
||||
<label for="v_ip" class="form-label">
|
||||
<?= _("IP Address") ?> <span class="optional">(<?= _("Support CIDR format") ?>)</span>
|
||||
</label>
|
||||
<input type="text" class="form-control" name="v_ip" id="v_ip" value="<?= htmlentities(trim($v_ip, "'")) ?>" required>
|
||||
</div>
|
||||
<div class="u-mb10">
|
||||
<label for="v_chain" class="form-label"><?= _("Banlist") ?></label>
|
||||
<select class="form-select" name="v_chain" id="v_chain">
|
||||
<option value="SSH" <?php if ((!empty($v_chain)) && ( $v_chain == "'SSH'" )) echo 'selected'?>><?= _("SSH") ?></option>
|
||||
<option value="WEB" <?php if ((!empty($v_chain)) && ( $v_chain == "'WEB'" )) echo 'selected'?>><?= _("WEB") ?></option>
|
||||
<option value="FTP" <?php if ((!empty($v_chain)) && ( $v_chain == "'FTP'" )) echo 'selected'?>><?= _("FTP") ?></option>
|
||||
<option value="DNS" <?php if ((!empty($v_chain)) && ( $v_chain == "'DNS'" )) echo 'selected'?>><?= _("DNS") ?></option>
|
||||
<option value="MAIL" <?php if ((!empty($v_chain)) && ( $v_chain == "'MAIL'" )) echo 'selected'?>><?= _("MAIL") ?></option>
|
||||
<option value="DB" <?php if ((!empty($v_chain)) && ( $v_chain == "'DB'" )) echo 'selected'?>><?= _("DB") ?></option>
|
||||
<option value="HESTIA" <?php if ((!empty($v_chain)) && ( $v_chain == "'HESTIA'" )) echo 'selected'?>><?= _("HESTIA") ?></option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
|
||||
</div>
|
||||
109
web/templates/pages/add_firewall_ipset.php
Normal file
109
web/templates/pages/add_firewall_ipset.php
Normal file
@@ -0,0 +1,109 @@
|
||||
<!-- Begin toolbar -->
|
||||
<div class="toolbar">
|
||||
<div class="toolbar-inner">
|
||||
<div class="toolbar-buttons">
|
||||
<a class="button button-secondary button-back js-button-back" href="/list/firewall/ipset/">
|
||||
<i class="fas fa-arrow-left icon-blue"></i><?= _("Back") ?>
|
||||
</a>
|
||||
</div>
|
||||
<div class="toolbar-buttons">
|
||||
<button type="submit" class="button" form="main-form">
|
||||
<i class="fas fa-floppy-disk icon-purple"></i><?= _("Save") ?>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- End toolbar -->
|
||||
|
||||
<div class="container">
|
||||
|
||||
<form id="main-form" name="v_add_ipset" method="post">
|
||||
<input type="hidden" name="token" value="<?= $_SESSION["token"] ?>">
|
||||
<input type="hidden" name="ok" value="Add">
|
||||
|
||||
<?php
|
||||
$country = [
|
||||
"br" => "Brazil",
|
||||
"ca" => "Canada",
|
||||
"cn" => "China",
|
||||
"fr" => "French",
|
||||
"de" => "Germany",
|
||||
"in" => "India",
|
||||
"id" => "Indonesia",
|
||||
"nl" => "Netherlands",
|
||||
"ro" => "Romania",
|
||||
"ru" => "Russia",
|
||||
"es" => "Spain",
|
||||
"ch" => "Switzerland",
|
||||
"tr" => "Turkey",
|
||||
"ua" => "Ukraine",
|
||||
"gb" => "United Kingdom",
|
||||
"us" => "United States",
|
||||
];
|
||||
|
||||
function generate_iplist($country, $type) {
|
||||
$iplist = [];
|
||||
$lowercaseType = strtolower($type);
|
||||
foreach ($country as $iso => $name) {
|
||||
$iplist[] = [
|
||||
"name" => "[$type] " . _("Country") . " - $name",
|
||||
"source" => "https://raw.githubusercontent.com/ipverse/rir-ip/master/country/$iso/$lowercaseType-aggregated.txt",
|
||||
];
|
||||
}
|
||||
return $iplist;
|
||||
}
|
||||
|
||||
$country_iplists = generate_iplist($country, "IPv4");
|
||||
// Uncomment below for IPv6
|
||||
// $country_ipv6lists = generate_iplist($country, 'IPv6');
|
||||
|
||||
$blacklist_iplists = [
|
||||
["name" => "[IPv4] " . _("Block Malicious IPs"), "source" => "script:/usr/local/hestia/install/common/firewall/ipset/blacklist.sh"],
|
||||
// Uncomment below for IPv6
|
||||
// array('name' => "[IPv6] " . _("Block Malicious IPs"), 'source' => "script:/usr/local/hestia/install/common/firewall/ipset/blacklist.ipv6.sh"),
|
||||
];
|
||||
?>
|
||||
|
||||
<div class="form-container">
|
||||
<h1 class="u-mb20"><?= _("Add IPset IP List for Firewall") ?></h1>
|
||||
<?php show_alert_message($_SESSION); ?>
|
||||
<div class="u-mb10">
|
||||
<label for="v_ipname" class="form-label"><?= _("IP List Name") ?></label>
|
||||
<input type="text" class="form-control" name="v_ipname" id="v_ipname" maxlength="255" value="<?= htmlentities(trim($v_ipname, "'")) ?>">
|
||||
</div>
|
||||
<div class="u-mb10">
|
||||
<label for="v_datasource" class="form-label">
|
||||
<?= _("Data Source") ?> <span class="optional">(<?= _("url, script or file") ?>)</span>
|
||||
</label>
|
||||
<div class="u-pos-relative">
|
||||
<select
|
||||
class="form-select js-datasource-select"
|
||||
tabindex="-1"
|
||||
onchange="this.nextElementSibling.value=this.value"
|
||||
data-country-iplists="<?= htmlspecialchars(json_encode($country_iplists), ENT_QUOTES, "UTF-8") ?>"
|
||||
data-blacklist-iplists="<?= htmlspecialchars(json_encode($blacklist_iplists), ENT_QUOTES, "UTF-8") ?>"
|
||||
>
|
||||
<option value=""><?= _("Clear") ?></option>
|
||||
</select>
|
||||
<input type="text" class="form-control list-editor" name="v_datasource" id="v_datasource" maxlength="255" value="<?= htmlentities(trim($v_datasource, "'")) ?>">
|
||||
</div>
|
||||
</div>
|
||||
<div class="u-mb10">
|
||||
<label for="v_ipver" class="form-label"><?= _("IP Version") ?></label>
|
||||
<select class="form-select" name="v_ipver" id="v_ipver">
|
||||
<option value="v4" <?php if ((!empty($v_ipver)) && ( $v_ipver == "'v4'" )) echo 'selected'?>>IPv4</option>
|
||||
<option value="v6" <?php if ((!empty($v_ipver)) && ( $v_ipver == "'v6'" )) echo 'selected'?>>IPv6</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="u-mb10">
|
||||
<label for="v_autoupdate" class="form-label"><?= _("Auto Update") ?></label>
|
||||
<select class="form-select" name="v_autoupdate" id="v_autoupdate">
|
||||
<option value="yes" <?php if ((!empty($v_autoupdate)) && ( $v_autoupdate == "'yes'" )) echo 'selected'?>><?= _("Yes") ?></option>
|
||||
<option value="no" <?php if ((!empty($v_autoupdate)) && ( $v_autoupdate == "'no'" )) echo 'selected'?>><?= _("No") ?></option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
|
||||
</div>
|
||||
90
web/templates/pages/add_ip.php
Normal file
90
web/templates/pages/add_ip.php
Normal file
@@ -0,0 +1,90 @@
|
||||
<!-- Begin toolbar -->
|
||||
<div class="toolbar">
|
||||
<div class="toolbar-inner">
|
||||
<div class="toolbar-buttons">
|
||||
<a class="button button-secondary button-back js-button-back" href="/list/ip/">
|
||||
<i class="fas fa-arrow-left icon-blue"></i><?= _("Back") ?>
|
||||
</a>
|
||||
</div>
|
||||
<div class="toolbar-buttons">
|
||||
<button type="submit" class="button" form="main-form">
|
||||
<i class="fas fa-floppy-disk icon-purple"></i><?= _("Save") ?>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- End toolbar -->
|
||||
|
||||
<div class="container">
|
||||
|
||||
<form
|
||||
x-data="{
|
||||
showUserTable: <?= empty($v_dedicated) ? "true" : "false" ?>
|
||||
}"
|
||||
id="main-form"
|
||||
name="v_add_ip"
|
||||
method="post"
|
||||
>
|
||||
<input type="hidden" name="token" value="<?= $_SESSION["token"] ?>">
|
||||
<input type="hidden" name="ok" value="Add">
|
||||
|
||||
<div class="form-container">
|
||||
<h1 class="u-mb20"><?= _("Add IP Address") ?></h1>
|
||||
<?php show_alert_message($_SESSION); ?>
|
||||
<div class="u-mb10">
|
||||
<label for="v_ip" class="form-label"><?= _("IP Address") ?></label>
|
||||
<input type="text" class="form-control" name="v_ip" id="v_ip" value="<?= htmlentities(trim($v_ip, "'")) ?>">
|
||||
</div>
|
||||
<div class="u-mb10">
|
||||
<label for="v_netmask" class="form-label"><?= _("Netmask") ?></label>
|
||||
<input type="text" class="form-control" name="v_netmask" id="v_netmask" value="<?= htmlentities(trim($v_netmask, "'")) ?>">
|
||||
</div>
|
||||
<div class="u-mb10">
|
||||
<label for="v_interface" class="form-label"><?= _("Interface") ?></label>
|
||||
<select class="form-select" name="v_interface" id="v_interface">
|
||||
<?php
|
||||
foreach ($interfaces as $key => $value) {
|
||||
echo "\t\t\t\t<option value=\"".htmlentities($value)."\"";
|
||||
if ((!empty($v_interface)) && ( $value == $v_interface )) echo ' selected';
|
||||
echo ">".htmlentities($value)."</option>\n";
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-check u-mb10">
|
||||
<input x-model="showUserTable" class="form-check-input" type="checkbox" name="v_shared" id="v_shared">
|
||||
<label for="v_shared">
|
||||
<?= _("Shared") ?>
|
||||
</label>
|
||||
</div>
|
||||
<div x-cloak x-show="!showUserTable" id="usrtable">
|
||||
<div class="u-mb10">
|
||||
<label for="v_owner" class="form-label"><?= _("Assigned User") ?></label>
|
||||
<select class="form-select" name="v_owner" id="v_owner">
|
||||
<?php
|
||||
foreach ($users as $key => $value) {
|
||||
echo "\t\t\t\t<option value=\"".htmlentities($value)."\"";
|
||||
if ((!empty($v_owner)) && ( $value == $v_owner )) echo ' selected';
|
||||
echo ">".htmlentities($value)."</option>\n";
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="u-mb10">
|
||||
<label for="v_name" class="form-label">
|
||||
<?= _("Assigned Domain") ?> <span class="optional">(<?= _("Optional") ?>)</span>
|
||||
</label>
|
||||
<input type="text" class="form-control" name="v_name" id="v_name" value="<?= htmlentities(trim($v_name, "'")) ?>">
|
||||
</div>
|
||||
<div class="u-mb10">
|
||||
<label for="v_nat" class="form-label">
|
||||
<?= _("NAT IP Association") ?> <span class="optional">(<?= _("Optional") ?>)</span>
|
||||
</label>
|
||||
<input type="text" class="form-control" name="v_nat" id="v_nat" value="<?= htmlentities(trim($v_nat, "'")) ?>">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
|
||||
</div>
|
||||
41
web/templates/pages/add_key.php
Normal file
41
web/templates/pages/add_key.php
Normal file
@@ -0,0 +1,41 @@
|
||||
<!-- Begin toolbar -->
|
||||
<div class="toolbar">
|
||||
<div class="toolbar-inner">
|
||||
<div class="toolbar-buttons">
|
||||
<?php if ($_SESSION["userContext"] === "admin" && isset($_GET["user"]) && $_GET["user"] !== "admin") { ?>
|
||||
<a class="button button-secondary button-back js-button-back" href="/list/key/?user=<?= htmlentities($_GET["user"]) ?>">
|
||||
<i class="fas fa-arrow-left icon-blue"></i><?= _("Back") ?>
|
||||
</a>
|
||||
<?php } else { ?>
|
||||
<a class="button button-secondary button-back js-button-back" href="/list/key/">
|
||||
<i class="fas fa-arrow-left icon-blue"></i><?= _("Back") ?>
|
||||
</a>
|
||||
<?php } ?>
|
||||
</div>
|
||||
<div class="toolbar-buttons">
|
||||
<button type="submit" class="button" form="main-form">
|
||||
<i class="fas fa-floppy-disk icon-purple"></i><?= _("Save") ?>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- End toolbar -->
|
||||
|
||||
<div class="container">
|
||||
|
||||
<form id="main-form" name="v_add_key" method="post">
|
||||
<input type="hidden" name="token" value="<?= $_SESSION["token"] ?>">
|
||||
<input type="hidden" name="ok" value="Add">
|
||||
|
||||
<div class="form-container">
|
||||
<h1 class="u-mb20"><?= _("Add SSH Key") ?></h1>
|
||||
<?php show_alert_message($_SESSION); ?>
|
||||
<div>
|
||||
<label for="v_key" class="form-label"><?= _("SSH Key") ?></label>
|
||||
<textarea class="form-control u-min-height300" name="v_key" id="v_key" required><?= htmlentities(trim($v_key, "'")) ?></textarea>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
|
||||
</div>
|
||||
126
web/templates/pages/add_mail.php
Normal file
126
web/templates/pages/add_mail.php
Normal file
@@ -0,0 +1,126 @@
|
||||
<!-- Begin toolbar -->
|
||||
<div class="toolbar">
|
||||
<div class="toolbar-inner">
|
||||
<div class="toolbar-buttons">
|
||||
<a class="button button-secondary button-back js-button-back" href="/list/mail/">
|
||||
<i class="fas fa-arrow-left icon-blue"></i><?= _("Back") ?>
|
||||
</a>
|
||||
</div>
|
||||
<div class="toolbar-buttons">
|
||||
<?php if (($user_plain == "admin" && $accept === "true") || $user_plain !== "admin") { ?>
|
||||
<button type="submit" class="button" form="main-form">
|
||||
<i class="fas fa-floppy-disk icon-purple"></i><?= _("Save") ?>
|
||||
</button>
|
||||
<?php } ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- End toolbar -->
|
||||
|
||||
<div class="container">
|
||||
|
||||
<form
|
||||
x-data="{
|
||||
hasSmtpRelay: <?= $v_smtp_relay == "true" ? "true" : "false" ?>
|
||||
}"
|
||||
id="main-form"
|
||||
name="v_add_mail"
|
||||
method="post"
|
||||
>
|
||||
<input type="hidden" name="token" value="<?= $_SESSION["token"] ?>">
|
||||
<input type="hidden" name="ok" value="Add">
|
||||
|
||||
<div class="form-container">
|
||||
<h1 class="u-mb20"><?= _("Add Mail Domain") ?></h1>
|
||||
<?php show_alert_message($_SESSION); ?>
|
||||
<?php if ($user_plain == "admin" && $accept !== "true") { ?>
|
||||
<div class="alert alert-danger" role="alert">
|
||||
<i class="fas fa-exclamation"></i>
|
||||
<p><?= htmlify_trans(sprintf(_("It is strongly advised to {create a standard user account} before adding %s to the server due to the increased privileges the admin account possesses and potential security risks."), _('a mail domain')), '</a>', '<a href="/add/user/">'); ?></p>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<?php if ($user_plain == "admin" && empty($accept)) { ?>
|
||||
<div class="u-side-by-side u-mt20">
|
||||
<a href="/add/user/" class="button u-width-full u-mr10"><?= _("Add User") ?></a>
|
||||
<a href="/add/mail/?accept=true" class="button button-danger u-width-full u-ml10"><?= _("Continue") ?></a>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<?php if (($user_plain == "admin" && $accept === "true") || $user_plain !== "admin") { ?>
|
||||
<div class="u-mb20">
|
||||
<label for="v_domain" class="form-label"><?= _("Domain") ?></label>
|
||||
<input type="text" class="form-control" name="v_domain" id="v_domain" value="<?= htmlentities(trim($v_domain, "'")) ?>" required>
|
||||
</div>
|
||||
<?php if ($_SESSION["WEBMAIL_SYSTEM"]) { ?>
|
||||
<div class="u-mb20">
|
||||
<label for="v_webmail" class="form-label"><?= _("Webmail Client") ?></label>
|
||||
<select class="form-select" name="v_webmail" id="v_webmail" tabindex="6">
|
||||
<?php foreach ($webmail_clients as $client){
|
||||
echo "\t\t\t\t<option value=\"".htmlentities($client)."\"";
|
||||
if (( $v_webmail == $client )) {
|
||||
echo ' selected' ;
|
||||
}
|
||||
echo ">".htmlentities(ucfirst($client))."</option>\n";
|
||||
}
|
||||
?>
|
||||
<option value="" <?php if (empty($v_webmail) || $v_webmail == 'disabled' ){ echo "selected"; }?>><?= _("Disabled") ?></option>
|
||||
</select>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<?php if (!empty($_SESSION["ANTISPAM_SYSTEM"])) { ?>
|
||||
<div class="form-check u-mb10">
|
||||
<input class="form-check-input" type="checkbox" name="v_antispam" id="v_antispam" <?php if ((empty($v_antispam)) || ($v_antispam == 'yes')) echo 'checked'; ?>>
|
||||
<label for="v_antispam">
|
||||
<?= _("Spam Filter") ?>
|
||||
</label>
|
||||
</div>
|
||||
<div class="form-check u-mb10">
|
||||
<input class="form-check-input" type="checkbox" name="v_reject" id="v_reject" <?php if ((empty($v_reject)) || ($v_reject == 'yes')) echo 'checked'; ?>>
|
||||
<label for="v_reject">
|
||||
<?= _("Reject Spam") ?>
|
||||
</label>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<?php if (!empty($_SESSION['ANTIVIRUS_SYSTEM'])) { ?>
|
||||
<div class="form-check u-mb10">
|
||||
<input class="form-check-input" type="checkbox" name="v_antivirus" id="v_antivirus" <?php if ((empty($v_antivirus)) || ($v_antivirus == 'yes')) echo 'checked'; ?>>
|
||||
<label for="v_antivirus">
|
||||
<?= _("Anti-Virus") ?>
|
||||
</label>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<div class="form-check u-mb10">
|
||||
<input class="form-check-input" type="checkbox" name="v_dkim" id="v_dkim" <?php if (isset($v_dkim)&&$v_dkim == 'yes') echo 'checked'; ?>>
|
||||
<label for="v_dkim">
|
||||
<?= _("DKIM Support") ?>
|
||||
</label>
|
||||
</div>
|
||||
<div class="form-check u-mb10">
|
||||
<input x-model="hasSmtpRelay" class="form-check-input" type="checkbox" name="v_smtp_relay" id="v_smtp_relay">
|
||||
<label for="v_smtp_relay">
|
||||
<?= _("SMTP Relay") ?>
|
||||
</label>
|
||||
</div>
|
||||
<div x-cloak x-show="hasSmtpRelay" id="smtp_relay_table" class="u-pl30">
|
||||
<div class="u-mb10">
|
||||
<label for="v_smtp_relay_host" class="form-label"><?= _("Host") ?></label>
|
||||
<input type="text" class="form-control" name="v_smtp_relay_host" id="v_smtp_relay_host" value="<?= htmlentities(trim($v_smtp_relay_host, "'")) ?>">
|
||||
</div>
|
||||
<div class="u-mb10">
|
||||
<label for="v_smtp_relay_port" class="form-label"><?= _("Port") ?></label>
|
||||
<input type="text" class="form-control" name="v_smtp_relay_port" id="v_smtp_relay_port" value="<?= htmlentities(trim($v_smtp_relay_port, "'")) ?>">
|
||||
</div>
|
||||
<div class="u-mb10">
|
||||
<label for="v_smtp_relay_user" class="form-label"><?= _("Username") ?></label>
|
||||
<input type="text" class="form-control" name="v_smtp_relay_user" id="v_smtp_relay_user" value="<?= htmlentities(trim($v_smtp_relay_user, "'")) ?>">
|
||||
</div>
|
||||
<div class="u-mb10">
|
||||
<label for="v_smtp_relay_pass" class="form-label"><?= _("Password") ?></label>
|
||||
<input type="text" class="form-control" name="v_smtp_relay_pass" id="v_smtp_relay_pass">
|
||||
</div>
|
||||
</div>
|
||||
<?php } ?>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
|
||||
</div>
|
||||
205
web/templates/pages/add_mail_acc.php
Normal file
205
web/templates/pages/add_mail_acc.php
Normal file
@@ -0,0 +1,205 @@
|
||||
<!-- Begin toolbar -->
|
||||
<div class="toolbar">
|
||||
<div class="toolbar-inner">
|
||||
<div class="toolbar-buttons">
|
||||
<a class="button button-secondary button-back js-button-back" href="/list/mail/?domain=<?= htmlentities(trim($v_domain, "'")) ?>&token=<?= $_SESSION["token"] ?>">
|
||||
<i class="fas fa-arrow-left icon-blue"></i><?= _("Back") ?>
|
||||
</a>
|
||||
</div>
|
||||
<div class="toolbar-buttons">
|
||||
<button type="submit" class="button" form="main-form">
|
||||
<i class="fas fa-floppy-disk icon-purple"></i><?= _("Save") ?>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- End toolbar -->
|
||||
|
||||
<div class="container">
|
||||
|
||||
<form
|
||||
x-data="{
|
||||
showAdvanced: <?= empty($v_adv) ? "false" : "true" ?>
|
||||
}"
|
||||
id="main-form"
|
||||
name="v_add_mail_acc"
|
||||
method="post"
|
||||
>
|
||||
<input type="hidden" name="token" value="<?= $_SESSION["token"] ?>">
|
||||
<input type="hidden" name="ok_acc" value="add">
|
||||
|
||||
<div class="form-container form-container-wide">
|
||||
<h1 class="u-mb20"><?= _("Add Mail Account") ?></h1>
|
||||
<?php show_alert_message($_SESSION); ?>
|
||||
<div class="sidebar-right-grid">
|
||||
<div class="sidebar-right-grid-content">
|
||||
<div class="u-mb10">
|
||||
<label for="v_domain" class="form-label"><?= _("Domain") ?></label>
|
||||
<input type="text" class="form-control" name="v_domain" id="v_domain" value="<?= htmlentities(trim($v_domain, "'")) ?>" disabled>
|
||||
<input type="hidden" name="v_domain" value="<?= htmlentities(trim($v_domain, "'")) ?>">
|
||||
</div>
|
||||
<div class="u-mb10">
|
||||
<label for="v_account" class="form-label"><?= _("Account") ?></label>
|
||||
<input type="text" class="form-control js-account-input" name="v_account" id="v_account" value="<?= htmlentities(trim($v_account, "'")) ?>" required>
|
||||
</div>
|
||||
<div class="u-mb10">
|
||||
<label for="v_password" class="form-label">
|
||||
<?= _("Password") ?>
|
||||
<button type="button" title="<?= _("Generate") ?>" class="u-unstyled-button u-ml5 js-generate-password">
|
||||
<i class="fas fa-arrows-rotate icon-green"></i>
|
||||
</button>
|
||||
</label>
|
||||
<div class="u-pos-relative u-mb10">
|
||||
<input type="text" class="form-control js-password-input" name="v_password" id="v_password" required>
|
||||
<div class="password-meter">
|
||||
<meter max="4" class="password-meter-input js-password-meter"></meter>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<p class="u-mb10"><?= _("Your password must have at least") ?>:</p>
|
||||
<ul class="u-list-bulleted u-mb20">
|
||||
<li><?= _("8 characters long") ?></li>
|
||||
<li><?= _("1 uppercase & 1 lowercase character") ?></li>
|
||||
<li><?= _("1 number") ?></li>
|
||||
</ul>
|
||||
<button x-on:click="showAdvanced = !showAdvanced" type="button" class="button button-secondary u-mb20">
|
||||
<?= _("Advanced Options") ?>
|
||||
</button>
|
||||
<div x-cloak x-show="showAdvanced" id="advtable">
|
||||
<div class="u-mb10">
|
||||
<label for="v_quota" class="form-label">
|
||||
<?= _("Quota") ?> <span class="optional">(<?= _("in MB") ?>)</span>
|
||||
</label>
|
||||
<div class="u-pos-relative">
|
||||
<input type="text" class="form-control" name="v_quota" id="v_quota" value="<?= htmlentities(trim($v_quota, "'")) ?>">
|
||||
<button type="button" class="unlimited-toggle js-unlimited-toggle" title="<?= _("Unlimited") ?>">
|
||||
<i class="fas fa-infinity"></i>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="u-mb10">
|
||||
<label for="v_aliases" class="form-label">
|
||||
<?= _("Aliases") ?> <span class="optional">(<?= _("Use local-part without domain name") ?>)</span>
|
||||
</label>
|
||||
<textarea class="form-control" name="v_aliases" id="v_aliases"><?= htmlentities(trim($v_aliases, "'")) ?></textarea>
|
||||
</div>
|
||||
<div class="u-mb10">
|
||||
<label for="v_fwd" class="form-label">
|
||||
<?= _("Forward to") ?> <span class="optional">(<?= _("One or more email addresses") ?>)</span>
|
||||
</label>
|
||||
<textarea class="form-control js-forward-to-textarea" name="v_fwd" id="v_fwd" <?php if ($v_blackhole == 'yes') echo "disabled"; ?>><?= htmlentities(trim($v_fwd, "'")) ?></textarea>
|
||||
</div>
|
||||
<div class="form-check">
|
||||
<input class="form-check-input js-discard-all-mail" type="checkbox" name="v_blackhole" id="v_blackhole" <?php if ($v_blackhole == 'yes') echo 'checked' ?>>
|
||||
<label for="v_blackhole">
|
||||
<?= _("Discard all mail") ?>
|
||||
</label>
|
||||
</div>
|
||||
<div class="form-check <?php if ($v_blackhole == 'yes') { echo 'u-hidden'; } ?>">
|
||||
<input class="form-check-input js-do-not-store-checkbox" type="checkbox" name="v_fwd_only" id="v_fwd_for" <?php if ($v_fwd_only == 'yes') echo 'checked' ?>>
|
||||
<label for="v_fwd_for">
|
||||
<?= _("Do not store forwarded mail") ?>
|
||||
</label>
|
||||
</div>
|
||||
<div class="u-mt10 u-mb10">
|
||||
<label for="v_rate" class="form-label">
|
||||
<?= _("Rate Limit") ?> <span class="optional">(<?= _("email / hour") ?>)</span>
|
||||
</label>
|
||||
<input type="text" class="form-control" name="v_rate" id="v_rate" value="<?= htmlentities(trim($v_rate, "'")) ?>" <?php if ($_SESSION['userContext'] != "admin"){ echo "disabled"; }?>>
|
||||
</div>
|
||||
</div>
|
||||
<div class="u-mt15 u-mb20">
|
||||
<label for="v_send_email" class="form-label">
|
||||
<?= _("Email login credentials to:") ?>
|
||||
</label>
|
||||
<input type="email" class="form-control" name="v_send_email" id="v_send_email" value="<?= htmlentities(trim($v_send_email, "'")) ?>">
|
||||
</div>
|
||||
</div>
|
||||
<div class="sidebar-right-grid-sidebar">
|
||||
<div class="panel js-mail-info">
|
||||
<h2 class="u-text-H3 u-mb10"><?= _("Common Account Settings") ?></h2>
|
||||
<ul class="values-list u-mb20">
|
||||
<li class="values-list-item">
|
||||
<span class="values-list-label"><?= _("Username") ?></span>
|
||||
<span class="values-list-value u-overflow"><span class="js-account-output"></span>@<?= htmlentities(trim($v_domain, "'")) ?></span>
|
||||
</li>
|
||||
<li class="values-list-item">
|
||||
<span class="values-list-label"><?= _("Password") ?></span>
|
||||
<span class="values-list-value u-overflow"><span class="js-password-output"></span></span>
|
||||
</li>
|
||||
<?php if ($_SESSION["WEBMAIL_SYSTEM"]) { ?>
|
||||
<li class="values-list-item">
|
||||
<span class="values-list-label"><?= _("Webmail") ?></span>
|
||||
<span class="values-list-value"><a href="http://<?= htmlentities($v_webmail_alias) ?>" target="_blank">http://<?= htmlentities($v_webmail_alias) ?></a></span>
|
||||
</li>
|
||||
<?php } ?>
|
||||
<li class="values-list-item">
|
||||
<span class="values-list-label"><?= _("Hostname") ?></span>
|
||||
<span class="values-list-value">mail.<?= htmlentities($v_domain) ?></span>
|
||||
</li>
|
||||
</ul>
|
||||
<h2 class="u-text-H3 u-mb10"><?= _("IMAP Settings") ?></h2>
|
||||
<ul class="values-list u-mb20">
|
||||
<li class="values-list-item">
|
||||
<span class="values-list-label"><?= _("Authentication") ?></span>
|
||||
<span class="values-list-value"><?= _("Normal password") ?></span>
|
||||
</li>
|
||||
<li class="values-list-item">
|
||||
<span class="values-list-label">SSL/TLS</span>
|
||||
<span class="values-list-value"><?= _("Port") ?> 993</span>
|
||||
</li>
|
||||
<li class="values-list-item">
|
||||
<span class="values-list-label">STARTTLS</span>
|
||||
<span class="values-list-value"><?= _("Port") ?> 143</span>
|
||||
</li>
|
||||
<li class="values-list-item">
|
||||
<span class="values-list-label"><?= _("No encryption") ?></span>
|
||||
<span class="values-list-value"><?= _("Port") ?> 143</span>
|
||||
</li>
|
||||
</ul>
|
||||
<h2 class="u-text-H3 u-mb10"><?= _("POP3 Settings") ?></h2>
|
||||
<ul class="values-list u-mb20">
|
||||
<li class="values-list-item">
|
||||
<span class="values-list-label"><?= _("Authentication") ?></span>
|
||||
<span class="values-list-value"><?= _("Normal password") ?></span>
|
||||
</li>
|
||||
<li class="values-list-item">
|
||||
<span class="values-list-label">SSL/TLS</span>
|
||||
<span class="values-list-value"><?= _("Port") ?> 995</span>
|
||||
</li>
|
||||
<li class="values-list-item">
|
||||
<span class="values-list-label">STARTTLS</span>
|
||||
<span class="values-list-value"><?= _("Port") ?> 110</span>
|
||||
</li>
|
||||
<li class="values-list-item">
|
||||
<span class="values-list-label"><?= _("No encryption") ?></span>
|
||||
<span class="values-list-value"><?= _("Port") ?> 110</span>
|
||||
</li>
|
||||
</ul>
|
||||
<h2 class="u-text-H3 u-mb10"><?= _("SMTP Settings") ?></h2>
|
||||
<ul class="values-list">
|
||||
<li class="values-list-item">
|
||||
<span class="values-list-label"><?= _("Authentication") ?></span>
|
||||
<span class="values-list-value"><?= _("Normal password") ?></span>
|
||||
</li>
|
||||
<li class="values-list-item">
|
||||
<span class="values-list-label">SSL/TLS</span>
|
||||
<span class="values-list-value"><?= _("Port") ?> 465</span>
|
||||
</li>
|
||||
<li class="values-list-item">
|
||||
<span class="values-list-label">STARTTLS</span>
|
||||
<span class="values-list-value"><?= _("Port") ?> 587</span>
|
||||
</li>
|
||||
<li class="values-list-item">
|
||||
<span class="values-list-label"><?= _("No encryption") ?></span>
|
||||
<span class="values-list-value"><?= _("Port") ?> 25</span>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
|
||||
</div>
|
||||
334
web/templates/pages/add_package.php
Normal file
334
web/templates/pages/add_package.php
Normal file
@@ -0,0 +1,334 @@
|
||||
<!-- Begin toolbar -->
|
||||
<div class="toolbar">
|
||||
<div class="toolbar-inner">
|
||||
<div class="toolbar-buttons">
|
||||
<a class="button button-secondary button-back js-button-back" href="/list/package/">
|
||||
<i class="fas fa-arrow-left icon-blue"></i><?= _("Back") ?>
|
||||
</a>
|
||||
</div>
|
||||
<div class="toolbar-buttons">
|
||||
<button type="submit" class="button" form="main-form">
|
||||
<i class="fas fa-floppy-disk icon-purple"></i><?= _("Save") ?>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- End toolbar -->
|
||||
|
||||
<div class="container">
|
||||
|
||||
<form
|
||||
x-data="{
|
||||
showWebOptions: false,
|
||||
showDnsOptions: false,
|
||||
showMailOptions: false,
|
||||
showDatabaseOptions: false,
|
||||
showSystemOptions: false,
|
||||
}"
|
||||
id="main-form"
|
||||
name="v_add_package"
|
||||
method="post"
|
||||
>
|
||||
<input type="hidden" name="token" value="<?= $_SESSION["token"] ?>">
|
||||
<input type="hidden" name="ok" value="Add">
|
||||
|
||||
<div class="form-container">
|
||||
<h1 class="u-mb20"><?= _("Add Package") ?></h1>
|
||||
<?php show_alert_message($_SESSION); ?>
|
||||
<div class="u-mb10">
|
||||
<label for="v_package" class="form-label"><?= _("Package Name") ?></label>
|
||||
<input type="text" class="form-control" name="v_package" id="v_package" value="<?= htmlentities(trim($v_package, "'")) ?>" required>
|
||||
</div>
|
||||
<div class="u-mb10">
|
||||
<label for="v_disk_quota" class="form-label">
|
||||
<?= _("Quota") ?> <span class="optional">(<?= _("in MB") ?>)</span>
|
||||
</label>
|
||||
<div class="u-pos-relative">
|
||||
<input type="text" class="form-control" name="v_disk_quota" id="v_disk_quota" value="<?= htmlentities(trim($v_disk_quota, "'")) ?>">
|
||||
<button type="button" class="unlimited-toggle js-unlimited-toggle" title="<?= _("Unlimited") ?>">
|
||||
<i class="fas fa-infinity"></i>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="u-mb10">
|
||||
<label for="v_bandwidth" class="form-label">
|
||||
<?= _("Bandwidth") ?> <span class="optional">(<?= _("in MB") ?>)</span>
|
||||
</label>
|
||||
<div class="u-pos-relative">
|
||||
<input type="text" class="form-control" name="v_bandwidth" id="v_bandwidth" value="<?= htmlentities(trim($v_bandwidth, "'")) ?>">
|
||||
<button type="button" class="unlimited-toggle js-unlimited-toggle" title="<?= _("Unlimited") ?>">
|
||||
<i class="fas fa-infinity"></i>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="u-mb10">
|
||||
<label for="v_backups" class="form-label"><?= _("Backups") ?></label>
|
||||
<input type="text" class="form-control" name="v_backups" id="v_backups" value="<?= htmlentities(trim($v_backups, "'")) ?>">
|
||||
</div>
|
||||
<h2 x-on:click="showWebOptions = !showWebOptions" class="section-title">
|
||||
<?= _("WEB") ?>
|
||||
<i
|
||||
x-bind:class="showWebOptions ? 'fa-square-minus' : 'fa-square-plus'"
|
||||
class="fas icon-dim icon-maroon js-section-toggle-icon"
|
||||
></i>
|
||||
</h2>
|
||||
<div x-cloak x-show="showWebOptions" id="web-options">
|
||||
<div class="u-mt15 u-mb10">
|
||||
<label for="v_web_domains" class="form-label"><?= _("Web Domains") ?></label>
|
||||
<div class="u-pos-relative">
|
||||
<input type="text" class="form-control" name="v_web_domains" id="v_web_domains" value="<?= htmlentities(trim($v_web_domains, "'")) ?>">
|
||||
<button type="button" class="unlimited-toggle js-unlimited-toggle" title="<?= _("Unlimited") ?>">
|
||||
<i class="fas fa-infinity"></i>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="u-mb10">
|
||||
<label for="v_web_aliases" class="form-label">
|
||||
<?= _("Web Aliases") ?> <span class="optional">(<?= _("per domain") ?>)</span>
|
||||
</label>
|
||||
<div class="u-pos-relative">
|
||||
<input type="text" class="form-control" name="v_web_aliases" id="v_web_aliases" value="<?= htmlentities(trim($v_web_aliases, "'")) ?>">
|
||||
<button type="button" class="unlimited-toggle js-unlimited-toggle" title="<?= _("Unlimited") ?>">
|
||||
<i class="fas fa-infinity"></i>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="u-mb10">
|
||||
<label for="v_web_template" class="form-label">
|
||||
<?= _("Web Template") . " <span class='optional'> " . strtoupper($_SESSION["WEB_SYSTEM"]) . "</span>" ?>
|
||||
</label>
|
||||
<select class="form-select" name="v_web_template" id="v_web_template">
|
||||
<?php
|
||||
foreach ($web_templates as $key => $value) {
|
||||
echo "\t\t\t\t<option value=\"".htmlentities($value)."\"";
|
||||
if ((!empty($v_web_template)) && ( $value == trim($v_web_template, "'"))){
|
||||
echo ' selected' ;
|
||||
}
|
||||
echo ">".htmlentities($value)."</option>\n";
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
</div>
|
||||
<?php if (!empty($_SESSION['WEB_BACKEND'])) { echo ""; ?>
|
||||
<div class="u-mb10">
|
||||
<label for="v_backend_template" class="form-label">
|
||||
<?= _("Backend Template") . "<span class='optional'>" . strtoupper($_SESSION["WEB_BACKEND"]) . "</span>" ?>
|
||||
</label>
|
||||
<select class="form-select" name="v_backend_template" id="v_backend_template">
|
||||
<?php
|
||||
foreach ($backend_templates as $key => $value) {
|
||||
echo $v_backend_template;
|
||||
echo "\t\t\t\t<option value=\"".$value."\"";
|
||||
if ((!empty($v_backend_template)) && ( $value == trim($v_backend_template, "'"))){
|
||||
echo ' selected' ;
|
||||
}
|
||||
echo ">".htmlentities($value)."</option>\n";
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
</div>
|
||||
<?=""; }?>
|
||||
<?php if (!empty($_SESSION['PROXY_SYSTEM'])) { echo ""; ?>
|
||||
<div class="u-mb10">
|
||||
<label for="v_proxy_template" class="form-label">
|
||||
<?= _("Proxy Template") . "<span class='optional'>" . strtoupper($_SESSION["PROXY_SYSTEM"]) . "</span>" ?>
|
||||
</label>
|
||||
<select class="form-select" name="v_proxy_template" id="v_proxy_template">
|
||||
<?php
|
||||
foreach ($proxy_templates as $key => $value) {
|
||||
echo "\t\t\t\t<option value=\"".htmlentities($value)."\"";
|
||||
if ((!empty($v_proxy_template)) && ( $value == trim($v_proxy_template, "'"))){
|
||||
echo ' selected' ;
|
||||
}
|
||||
echo ">".htmlentities($value)."</option>\n";
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
</div>
|
||||
<?=""; }?>
|
||||
</div>
|
||||
<h2 x-on:click="showDnsOptions = !showDnsOptions" class="section-title">
|
||||
<?= _("DNS") ?>
|
||||
<i
|
||||
x-bind:class="showDnsOptions ? 'fa-square-minus' : 'fa-square-plus'"
|
||||
class="fas icon-dim icon-maroon js-section-toggle-icon"
|
||||
></i>
|
||||
</h2>
|
||||
<div x-cloak x-show="showDnsOptions" id="dns-options">
|
||||
<div class="u-mt15 u-mb10">
|
||||
<label for="v_dns_template" class="form-label">
|
||||
<?= _("DNS Template") . "<span class='optional'>" . strtoupper($_SESSION["DNS_SYSTEM"]) . "</span>" ?>
|
||||
</label>
|
||||
<select class="form-select" name="v_dns_template" id="v_dns_template">
|
||||
<?php
|
||||
foreach ($dns_templates as $key => $value) {
|
||||
echo "\t\t\t\t<option value=\"".htmlentities($value)."\"";
|
||||
if ((!empty($v_dns_template)) && ( $value == trim($v_dns_template, "'"))){
|
||||
echo ' selected' ;
|
||||
}
|
||||
echo ">".htmlentities($value)."</option>\n";
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
</div>
|
||||
<div class="u-mb10">
|
||||
<label for="v_dns_domains" class="form-label"><?= _("DNS Zones") ?></label>
|
||||
<div class="u-pos-relative">
|
||||
<input type="text" class="form-control" name="v_dns_domains" id="v_dns_domains" value="<?= htmlentities(trim($v_dns_domains, "'")) ?>">
|
||||
<button type="button" class="unlimited-toggle js-unlimited-toggle" title="<?= _("Unlimited") ?>">
|
||||
<i class="fas fa-infinity"></i>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="u-mb10">
|
||||
<label for="v_dns_records" class="form-label">
|
||||
<?= _("DNS Records") ?> <span class="optional">(<?= _("per domain") ?>)</span>
|
||||
</label>
|
||||
<div class="u-pos-relative">
|
||||
<input type="text" class="form-control" name="v_dns_records" id="v_dns_records" value="<?= htmlentities(trim($v_dns_records, "'")) ?>">
|
||||
<button type="button" class="unlimited-toggle js-unlimited-toggle" title="<?= _("Unlimited") ?>">
|
||||
<i class="fas fa-infinity"></i>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<?php if (isset($_SESSION["DNS_SYSTEM"]) && !empty($_SESSION["DNS_SYSTEM"])) { ?>
|
||||
<p class="form-label u-mb10"><?= _("Name Servers") ?></p>
|
||||
<div class="u-mb5">
|
||||
<input type="text" class="form-control" name="v_ns1" value="<?= htmlentities(trim($v_ns1, "'")) ?>">
|
||||
</div>
|
||||
<div class="u-mb5">
|
||||
<input type="text" class="form-control" name="v_ns2" value="<?= htmlentities(trim($v_ns2, "'")) ?>">
|
||||
</div>
|
||||
<?php
|
||||
if ($v_ns3) {
|
||||
echo '<div class="u-side-by-side u-mb5">
|
||||
<input type="text" class="form-control" name="v_ns3" value="'.htmlentities(trim($v_ns3, "'")).'">
|
||||
<span class="u-ml10 js-remove-ns"><i class="fas fa-trash icon-dim icon-red"></i></span>
|
||||
</div>';
|
||||
}
|
||||
if ($v_ns4) {
|
||||
echo '<div class="u-side-by-side u-mb5">
|
||||
<input type="text" class="form-control" name="v_ns4" value="'.htmlentities(trim($v_ns4, "'")).'">
|
||||
<span class="u-ml10 js-remove-ns"><i class="fas fa-trash icon-dim icon-red"></i></span>
|
||||
</div>';
|
||||
}
|
||||
if ($v_ns5) {
|
||||
echo '<div class="u-side-by-side u-mb5">
|
||||
<input type="text" class="form-control" name="v_ns5" value="'.htmlentities(trim($v_ns5, "'")).'">
|
||||
<span class="u-ml10 js-remove-ns"><i class="fas fa-trash icon-dim icon-red"></i></span>
|
||||
</div>';
|
||||
}
|
||||
if ($v_ns6) {
|
||||
echo '<div class="u-side-by-side u-mb5">
|
||||
<input type="text" class="form-control" name="v_ns6" value="'.htmlentities(trim($v_ns6, "'")).'">
|
||||
<span class="u-ml10 js-remove-ns"><i class="fas fa-trash icon-dim icon-red"></i></span>
|
||||
</div>';
|
||||
}
|
||||
if ($v_ns7) {
|
||||
echo '<div class="u-side-by-side u-mb5">
|
||||
<input type="text" class="form-control" name="v_ns7" value="'.htmlentities(trim($v_ns7, "'")).'">
|
||||
<span class="u-ml10 js-remove-ns"><i class="fas fa-trash icon-dim icon-red"></i></span>
|
||||
</div>';
|
||||
}
|
||||
if ($v_ns8) {
|
||||
echo '<div class="u-side-by-side u-mb5">
|
||||
<input type="text" class="form-control" name="v_ns8" value="'.htmlentities(trim($v_ns8, "'")).'">
|
||||
<span class="u-ml10 js-remove-ns"><i class="fas fa-trash icon-dim icon-red"></i></span>
|
||||
</div>';
|
||||
}
|
||||
?>
|
||||
<button type="button" class="form-link u-mt20 js-add-ns" <?php if ($v_ns8) echo 'style="display:none;"'; ?>>
|
||||
<?= _("Add Name Server") ?>
|
||||
</button>
|
||||
<?php } ?>
|
||||
</div>
|
||||
<h2 x-on:click="showMailOptions = !showMailOptions" class="section-title">
|
||||
<?= _("MAIL") ?>
|
||||
<i
|
||||
x-bind:class="showMailOptions ? 'fa-square-minus' : 'fa-square-plus'"
|
||||
class="fas icon-dim icon-maroon js-section-toggle-icon"
|
||||
></i>
|
||||
</h2>
|
||||
<div x-cloak x-show="showMailOptions" id="mail-options">
|
||||
<div class="u-mt15 u-mb10">
|
||||
<label for="v_mail_domains" class="form-label"><?= _("Mail Domains") ?></label>
|
||||
<div class="u-pos-relative">
|
||||
<input type="text" class="form-control" name="v_mail_domains" id="v_mail_domains" value="<?= htmlentities(trim($v_mail_domains, "'")) ?>">
|
||||
<button type="button" class="unlimited-toggle js-unlimited-toggle" title="<?= _("Unlimited") ?>">
|
||||
<i class="fas fa-infinity"></i>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="u-mb10">
|
||||
<label for="v_mail_accounts" class="form-label">
|
||||
<?= _("Mail Accounts") ?> <span class="optional">(<?= _("per domain") ?>)</span>
|
||||
</label>
|
||||
<div class="u-pos-relative">
|
||||
<input type="text" class="form-control" name="v_mail_accounts" id="v_mail_accounts" value="<?= htmlentities(trim($v_mail_accounts, "'")) ?>">
|
||||
<button type="button" class="unlimited-toggle js-unlimited-toggle" title="<?= _("Unlimited") ?>">
|
||||
<i class="fas fa-infinity"></i>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="u-mb10">
|
||||
<label for="v_ratelimit" class="form-label">
|
||||
<?= _("Rate Limit") ?> <span class="optional">(<?= _("per account / hour") ?>)</span>
|
||||
</label>
|
||||
<input type="text" class="form-control" name="v_ratelimit" id="v_ratelimit" value="<?= htmlentities(trim($v_ratelimit, "'")) ?>">
|
||||
</div>
|
||||
</div>
|
||||
<h2 x-on:click="showDatabaseOptions = !showDatabaseOptions" class="section-title">
|
||||
<?= _("DB") ?>
|
||||
<i
|
||||
x-bind:class="showDatabaseOptions ? 'fa-square-minus' : 'fa-square-plus'"
|
||||
class="fas icon-dim icon-maroon js-section-toggle-icon"
|
||||
></i>
|
||||
</h2>
|
||||
<div x-cloak x-show="showDatabaseOptions" id="database-options">
|
||||
<div class="u-mt15 u-mb10">
|
||||
<label for="v_databases" class="form-label"><?= _("Databases") ?></label>
|
||||
<div class="u-pos-relative">
|
||||
<input type="text" class="form-control" name="v_databases" id="v_databases" value="<?= htmlentities(trim($v_databases, "'")) ?>">
|
||||
<button type="button" class="unlimited-toggle js-unlimited-toggle" title="<?= _("Unlimited") ?>">
|
||||
<i class="fas fa-infinity"></i>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<h2 x-on:click="showSystemOptions = !showSystemOptions" class="section-title">
|
||||
<?= _("System") ?>
|
||||
<i
|
||||
x-bind:class="showSystemOptions ? 'fa-square-minus' : 'fa-square-plus'"
|
||||
class="fas icon-dim icon-maroon js-section-toggle-icon"
|
||||
></i>
|
||||
</h2>
|
||||
<div x-cloak x-show="showSystemOptions" id="system-options">
|
||||
<div class="u-mt15 u-mb10">
|
||||
<label for="v_cron_jobs" class="form-label"><?= _("Cron Jobs") ?></label>
|
||||
<div class="u-pos-relative">
|
||||
<input type="text" class="form-control" name="v_cron_jobs" id="v_cron_jobs" value="<?= htmlentities(trim($v_cron_jobs, "'")) ?>">
|
||||
<button type="button" class="unlimited-toggle js-unlimited-toggle" title="<?= _("Unlimited") ?>">
|
||||
<i class="fas fa-infinity"></i>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<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): ?>
|
||||
<option value="<?= htmlentities($value) ?>"
|
||||
<?php if (!empty($v_shell) && $value == trim($v_shell, "''")): ?>
|
||||
selected
|
||||
<?php endif; ?>
|
||||
>
|
||||
<?= htmlentities($value) ?>
|
||||
</option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
|
||||
</div>
|
||||
135
web/templates/pages/add_user.php
Normal file
135
web/templates/pages/add_user.php
Normal file
@@ -0,0 +1,135 @@
|
||||
<!-- Begin toolbar -->
|
||||
<div class="toolbar">
|
||||
<div class="toolbar-inner">
|
||||
<div class="toolbar-buttons">
|
||||
<a class="button button-secondary button-back js-button-back" href="/list/user/">
|
||||
<i class="fas fa-arrow-left icon-blue"></i><?= _("Back") ?>
|
||||
</a>
|
||||
</div>
|
||||
<div class="toolbar-buttons">
|
||||
<button type="submit" class="button" form="main-form">
|
||||
<i class="fas fa-floppy-disk icon-purple"></i><?= _("Save") ?>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- End toolbar -->
|
||||
|
||||
<div class="container">
|
||||
|
||||
<form
|
||||
x-data="{
|
||||
loginDisabled: <?= $v_login_disabled == "yes" ? "true" : "false" ?>
|
||||
}"
|
||||
id="main-form"
|
||||
name="v_add_user"
|
||||
method="post"
|
||||
>
|
||||
<input type="hidden" name="token" value="<?= $_SESSION["token"] ?>">
|
||||
<input type="hidden" name="ok" value="Add">
|
||||
|
||||
<div class="form-container">
|
||||
<h1 class="u-mb20"><?= _("Add User") ?></h1>
|
||||
<?php show_alert_message($_SESSION); ?>
|
||||
<div class="u-mb10">
|
||||
<label for="v_username" class="form-label"><?= _("Username") ?></label>
|
||||
<input type="text" class="form-control" name="v_username" id="v_username" value="<?= htmlentities(trim($v_username, "'")) ?>" tabindex="1" required>
|
||||
</div>
|
||||
<div class="u-mb10">
|
||||
<label for="v_name" class="form-label"><?= _("Contact Name") ?></label>
|
||||
<input type="text" class="form-control" name="v_name" id="v_name" value="<?= htmlentities(trim($v_name, "'")) ?>" tabindex="2" required>
|
||||
</div>
|
||||
<div class="u-mb10">
|
||||
<label for="v_email" class="form-label"><?= _("Email") ?></label>
|
||||
<input type="email" class="form-control js-sync-email-input" name="v_email" id="v_email" value="<?= htmlentities(trim($v_email, "'")) ?>" tabindex="3" required>
|
||||
</div>
|
||||
<div class="u-mb10">
|
||||
<label for="v_password" class="form-label">
|
||||
<?= _("Password") ?>
|
||||
<button type="button" title="<?= _("Generate") ?>" class="u-unstyled-button u-ml5 js-generate-password">
|
||||
<i class="fas fa-arrows-rotate icon-green"></i>
|
||||
</button>
|
||||
</label>
|
||||
<div class="u-pos-relative u-mb10">
|
||||
<input type="text" class="form-control js-password-input" name="v_password" id="v_password" value="<?= htmlentities(trim($v_password, "'")) ?>" tabindex="4" required>
|
||||
<div class="password-meter">
|
||||
<meter max="4" class="password-meter-input js-password-meter"></meter>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<p class="u-mb10"><?= _("Your password must have at least") ?>:</p>
|
||||
<ul class="u-list-bulleted u-mb10">
|
||||
<li><?= _("8 characters long") ?></li>
|
||||
<li><?= _("1 uppercase & 1 lowercase character") ?></li>
|
||||
<li><?= _("1 number") ?></li>
|
||||
</ul>
|
||||
<div class="form-check">
|
||||
<input x-model="loginDisabled" class="form-check-input" type="checkbox" name="v_login_disabled" id="v_login_disabled">
|
||||
<label for="v_login_disabled">
|
||||
<?= _("Do not allow user to log in to Control Panel") ?>
|
||||
</label>
|
||||
</div>
|
||||
<div x-cloak x-show="!loginDisabled" id="send-welcome">
|
||||
<div class="form-check u-mb10">
|
||||
<input class="form-check-input js-sync-email-checkbox" type="checkbox" name="v_email_notice" id="v_email_notify" tabindex="5">
|
||||
<label for="v_email_notify">
|
||||
<?= _("Send welcome email") ?>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="u-mb10">
|
||||
<label for="v_language" class="form-label"><?= _("Language") ?></label>
|
||||
<select class="form-select" name="v_language" id="v_language" tabindex="6" required>
|
||||
<?php
|
||||
foreach ($languages as $key => $value) {
|
||||
echo "\n\t\t\t\t\t\t\t\t\t<option value=\"".htmlentities($key)."\"";
|
||||
if (( $key == $_SESSION['LANGUAGE'] ) && (empty($v_language))){
|
||||
echo ' selected' ;
|
||||
}
|
||||
if (isset($v_language)){
|
||||
if ( htmlentities($key) == trim($v_language,"'") ){
|
||||
echo ' selected' ;
|
||||
}
|
||||
}
|
||||
echo ">".htmlentities($value)."</option>\n";
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
</div>
|
||||
<div class="u-mb10">
|
||||
<label for="v_role" class="form-label"><?= _("Role") ?></label>
|
||||
<select class="form-select" name="v_role" id="v_role" required>
|
||||
<option value="user"><?= _("User") ?></option>
|
||||
<option value="admin" <?= $v_role == "admin" ? "selected" : "" ?>><?= _("Administrator") ?></option>
|
||||
<option value="dns-cluster" <?= $v_role == "dns-cluster" ? "selected" : "" ?>><?= _("DNS Sync User") ?></option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="u-mb10">
|
||||
<label for="v_package" class="form-label"><?= _("Package") ?></label>
|
||||
<select class="form-select" name="v_package" id="v_package" tabindex="8" required>
|
||||
<?php
|
||||
foreach ($data as $key => $value) {
|
||||
echo "\n\t\t\t\t\t\t\t\t\t\t\t\t\t<option value=\"".htmlentities($key)."\"";
|
||||
if ((!empty($v_package)) && ( $key == $_POST['v_package'])){
|
||||
echo 'selected' ;
|
||||
} else {
|
||||
if ( $key == 'default'){
|
||||
echo 'selected' ;
|
||||
}
|
||||
}
|
||||
echo ">".htmlentities($key)."</option>\n";
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
</div>
|
||||
<div class="u-mb10">
|
||||
<label for="v_notify" class="form-label">
|
||||
<?= _("Email login credentials to:") ?>
|
||||
</label>
|
||||
<input type="email" class="form-control js-sync-email-output" name="v_notify" id="v_notify" value="<?= htmlentities(trim($v_notify, "'")) ?>" tabindex="8">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
|
||||
</div>
|
||||
83
web/templates/pages/add_web.php
Normal file
83
web/templates/pages/add_web.php
Normal file
@@ -0,0 +1,83 @@
|
||||
<!-- Begin toolbar -->
|
||||
<div class="toolbar">
|
||||
<div class="toolbar-inner">
|
||||
<div class="toolbar-buttons">
|
||||
<a class="button button-secondary button-back js-button-back" href="/list/web/">
|
||||
<i class="fas fa-arrow-left icon-blue"></i><?= _("Back") ?>
|
||||
</a>
|
||||
</div>
|
||||
<div class="toolbar-buttons">
|
||||
<?php if (($user_plain == "admin" && $accept === "true") || $user_plain !== "admin") { ?>
|
||||
<button type="submit" class="button" form="main-form">
|
||||
<i class="fas fa-floppy-disk icon-purple"></i><?= _("Save") ?>
|
||||
</button>
|
||||
<?php } ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- End toolbar -->
|
||||
|
||||
<div class="container">
|
||||
|
||||
<form id="main-form" name="v_add_web" method="post" class="js-enable-inputs-on-submit">
|
||||
<input type="hidden" name="token" value="<?= $_SESSION["token"] ?>">
|
||||
<input type="hidden" name="ok" value="Add">
|
||||
|
||||
<div class="form-container">
|
||||
<h1 class="u-mb20"><?= _("Add Web Domain") ?></h1>
|
||||
<?php show_alert_message($_SESSION); ?>
|
||||
<?php if ($user_plain == "admin" && $accept !== "true") { ?>
|
||||
<div class="alert alert-danger" role="alert">
|
||||
<i class="fas fa-exclamation"></i>
|
||||
<p><?= htmlify_trans(sprintf(_("It is strongly advised to {create a standard user account} before adding %s to the server due to the increased privileges the admin account possesses and potential security risks."), _('a web domain')), '</a>', '<a href="/add/user/">'); ?></p>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<?php if ($user_plain == "admin" && empty($accept)) { ?>
|
||||
<div class="u-side-by-side u-mt20">
|
||||
<a href="/add/user/" class="button u-width-full u-mr10"><?= _("Add User") ?></a>
|
||||
<a href="/add/web/?accept=true" class="button button-danger u-width-full u-ml10"><?= _("Continue") ?></a>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<?php if (($user_plain == "admin" && $accept === "true") || $user_plain !== "admin") { ?>
|
||||
<div class="u-mb10">
|
||||
<label for="v_domain" class="form-label"><?= _("Domain") ?></label>
|
||||
<input type="text" class="form-control" name="v_domain" id="v_domain" value="<?= htmlentities(trim($v_domain, "'")) ?>" required>
|
||||
</div>
|
||||
<div class="u-mb20">
|
||||
<label for="v_ip" class="form-label"><?= _("IP Address") ?></label>
|
||||
<select class="form-select" name="v_ip" id="v_ip">
|
||||
<?php
|
||||
foreach ($ips as $ip => $value) {
|
||||
$display_ip = htmlentities(empty($value['NAT']) ? $ip : "{$value['NAT']}");
|
||||
$ip_selected = (!empty($v_ip) && $ip == $_POST['v_ip']) ? 'selected' : '';
|
||||
echo "\t\t\t\t<option value=\"{$ip}\" {$ip_selected}>{$display_ip}</option>\n";
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
</div>
|
||||
<?php if (isset($_SESSION["DNS_SYSTEM"]) && !empty($_SESSION["DNS_SYSTEM"])) { ?>
|
||||
<?php if ($panel[$user_plain]["DNS_DOMAINS"] != "0") { ?>
|
||||
<div class="form-check u-mb10">
|
||||
<input class="form-check-input" type="checkbox" name="v_dns" id="v_dns" <?php if (empty($v_dns) && $panel[$user_plain]["DNS_DOMAINS"] != "0"); ?>>
|
||||
<label for="v_dns">
|
||||
<?= _("DNS Support") ?>
|
||||
</label>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<?php } ?>
|
||||
<?php if (isset($_SESSION["IMAP_SYSTEM"]) && !empty($_SESSION["IMAP_SYSTEM"])) { ?>
|
||||
<?php if ($panel[$user_plain]["MAIL_DOMAINS"] != "0") { ?>
|
||||
<div class="form-check">
|
||||
<input class="form-check-input" type="checkbox" name="v_mail" id="v_mail" <?php if (empty($v_mail) && $panel[$user_plain]["MAIL_DOMAINS"] != "0"); ?>>
|
||||
<label for="v_mail">
|
||||
<?= _("Mail Support") ?>
|
||||
</label>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<?php } ?>
|
||||
<?php } ?>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
|
||||
</div>
|
||||
63
web/templates/pages/debug_panel.php
Normal file
63
web/templates/pages/debug_panel.php
Normal file
@@ -0,0 +1,63 @@
|
||||
<?php
|
||||
if( !defined("HESTIA_DIR_BIN") ){
|
||||
die("Direct access disabled");
|
||||
}
|
||||
?>
|
||||
<div x-data="{ open: false }" class="debug-panel">
|
||||
<button
|
||||
type="button"
|
||||
class="debug-panel-toggle"
|
||||
x-on:click="open = !open"
|
||||
x-text="open ? '<?= _("Close debug panel") ?>' : '<?= _("Open debug panel") ?>'">
|
||||
<?= _("Open debug panel") ?>
|
||||
</button>
|
||||
<div x-cloak x-show="open" class="debug-panel-content">
|
||||
<?php
|
||||
echo "<h3 class=\"u-mb10\">Server Variables</h3>";
|
||||
foreach ($_SERVER as $key => $val) {
|
||||
if(is_string($val)){
|
||||
echo "<span class=\"u-text-bold\">" . $key . "= </span> " . $val . " ";
|
||||
}
|
||||
}
|
||||
?>
|
||||
<?php
|
||||
echo "<h3 class=\"u-mb10 u-mt10\">Session Variables</h3>";
|
||||
foreach ($_SESSION as $key => $val) {
|
||||
if(is_string($val)){
|
||||
echo "<span class=\"u-text-bold\">" . $key . "= </span> " . $val . " ";
|
||||
}else if(is_array($val)){
|
||||
array_walk_recursive($val, function (&$value) {
|
||||
$value = htmlentities($value);
|
||||
});
|
||||
echo "<span class=\"u-text-bold\">" . $key . "= </span> " .var_dump($val). " ";
|
||||
}
|
||||
}
|
||||
?>
|
||||
<?php
|
||||
echo "<h3 class=\"u-mb10 u-mt10\">POST Variables</h3>";
|
||||
foreach ($_POST as $key => $val) {
|
||||
if(is_string($val)){
|
||||
echo "<span class=\"u-text-bold\">" . $key . "= </span> " . $val . " ";
|
||||
}else if(is_array($val)){
|
||||
array_walk_recursive($val, function (&$value) {
|
||||
$value = htmlentities($value);
|
||||
});
|
||||
echo "<span class=\"u-text-bold\">" . $key . "= </span> " .var_dump($val). " ";
|
||||
}
|
||||
}
|
||||
?>
|
||||
<?php
|
||||
echo "<h3 class=\"u-mb10 u-mt10\">GET Variables</h3>";
|
||||
foreach ($_GET as $key => $val) {
|
||||
if(is_string($val)){
|
||||
echo "<span class=\"u-text-bold\">" . $key . "= </span> " . $val . " ";
|
||||
}else if(is_array($val)){
|
||||
array_walk_recursive($val, function (&$value) {
|
||||
$value = htmlentities($value);
|
||||
});
|
||||
echo "<span class=\"u-text-bold\">" . $key . "= </span> " .var_dump($val). " ";
|
||||
}
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
47
web/templates/pages/edit_backup_exclusions.php
Normal file
47
web/templates/pages/edit_backup_exclusions.php
Normal file
@@ -0,0 +1,47 @@
|
||||
<!-- Begin toolbar -->
|
||||
<div class="toolbar">
|
||||
<div class="toolbar-inner">
|
||||
<div class="toolbar-buttons">
|
||||
<a class="button button-secondary button-back js-button-back" href="/list/backup/exclusions/">
|
||||
<i class="fas fa-arrow-left icon-blue"></i><?= _("Back") ?>
|
||||
</a>
|
||||
</div>
|
||||
<div class="toolbar-buttons">
|
||||
<button type="submit" class="button" form="main-form">
|
||||
<i class="fas fa-floppy-disk icon-purple"></i><?= _("Save") ?>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- End toolbar -->
|
||||
|
||||
<div class="container">
|
||||
|
||||
<form id="main-form" name="v_edit_backup_exclusions" method="post">
|
||||
<input type="hidden" name="token" value="<?= $_SESSION["token"] ?>">
|
||||
<input type="hidden" name="save" value="save">
|
||||
|
||||
<div class="form-container">
|
||||
<h1 class="u-mb20"><?= _("Edit Backup Exclusions") ?></h1>
|
||||
<?php show_alert_message($_SESSION); ?>
|
||||
<div class="u-mb10">
|
||||
<label for="v_web" class="form-label"><?= _("Web Domains") ?></label>
|
||||
<textarea class="form-control" name="v_web" id="v_web" placeholder="<?= _("Type domain name, one per line. To exclude all domains use *. To exclude specific dirs use following format: domain.tld:public_html/cache:public_html/tmp") ?>"><?= htmlentities(trim($v_web, "'")) ?></textarea>
|
||||
</div>
|
||||
<div class="u-mb10">
|
||||
<label for="v_mail" class="form-label"><?= _("Mail Domains") ?></label>
|
||||
<textarea class="form-control" name="v_mail" id="v_mail" placeholder="<?= _("Type domain name, one per line. To exclude all domains use *. To exclude specific accounts use following format: domain.tld:info:support:postmaster") ?>"><?= htmlentities(trim($v_mail, "'")) ?></textarea>
|
||||
</div>
|
||||
<div class="u-mb10">
|
||||
<label for="v_db" class="form-label"><?= _("Databases") ?></label>
|
||||
<textarea class="form-control" name="v_db" id="v_db" placeholder="<?= _("Type full database name, one per line. To exclude all databases use *") ?>"><?= htmlentities(trim($v_db, "'")) ?></textarea>
|
||||
</div>
|
||||
<div class="u-mb10">
|
||||
<label for="v_userdir" class="form-label"><?= _("User Directory") ?></label>
|
||||
<textarea class="form-control" name="v_userdir" id="v_userdir" placeholder="<?= _("Type directory name, one per line. To exlude all dirs use *") ?>"><?= htmlentities(trim($v_userdir, "'")) ?></textarea>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
|
||||
</div>
|
||||
377
web/templates/pages/edit_cron.php
Normal file
377
web/templates/pages/edit_cron.php
Normal file
@@ -0,0 +1,377 @@
|
||||
<!-- Begin toolbar -->
|
||||
<div class="toolbar">
|
||||
<div class="toolbar-inner">
|
||||
<div class="toolbar-buttons">
|
||||
<a class="button button-secondary button-back js-button-back" href="/list/cron/">
|
||||
<i class="fas fa-arrow-left icon-blue"></i><?= _("Back") ?>
|
||||
</a>
|
||||
</div>
|
||||
<div class="toolbar-buttons">
|
||||
<button type="submit" class="button" form="main-form">
|
||||
<i class="fas fa-floppy-disk icon-purple"></i><?= _("Save") ?>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- End toolbar -->
|
||||
|
||||
<div class="container">
|
||||
|
||||
<form id="main-form" name="v_edit_cron" method="post" class="<?= $v_status ?>">
|
||||
<input type="hidden" name="token" value="<?= $_SESSION["token"] ?>">
|
||||
<input type="hidden" name="save" value="save">
|
||||
|
||||
<div class="form-container form-container-wide">
|
||||
<h1 class="u-mb20"><?= _("Edit Cron Job") ?></h1>
|
||||
<?php show_alert_message($_SESSION); ?>
|
||||
<div class="u-mb20">
|
||||
<label for="v_cmd" class="form-label"><?= _("Command") ?></label>
|
||||
<input type="text" class="form-control" name="v_cmd" id="v_cmd" value="<?= htmlentities(trim($v_cmd, "'")) ?>">
|
||||
</div>
|
||||
<div class="sidebar-left-grid">
|
||||
<div class="sidebar-left-grid-sidebar">
|
||||
<div class="u-mb10">
|
||||
<label for="v_min" class="form-label"><?= _("Minute") ?></label>
|
||||
<input type="text" class="form-control" name="v_min" id="v_min" value="<?= htmlentities(trim($v_min, "'")) ?>">
|
||||
</div>
|
||||
<div class="u-mb10">
|
||||
<label for="v_hour" class="form-label"><?= _("Hour") ?></label>
|
||||
<input type="text" class="form-control" name="v_hour" id="v_hour" value="<?= htmlentities(trim($v_hour, "'")) ?>">
|
||||
</div>
|
||||
<div class="u-mb10">
|
||||
<label for="v_day" class="form-label"><?= _("Day") ?></label>
|
||||
<input type="text" class="form-control" name="v_day" id="v_day" value="<?= htmlentities(trim($v_day, "'")) ?>">
|
||||
</div>
|
||||
<div class="u-mb10">
|
||||
<label for="v_month" class="form-label"><?= _("Month") ?></label>
|
||||
<input type="text" class="form-control" name="v_month" id="v_month" value="<?= htmlentities(trim($v_month, "'")) ?>">
|
||||
</div>
|
||||
<div class="u-mb10">
|
||||
<label for="v_wday" class="form-label"><?= _("Day of Week") ?></label>
|
||||
<input type="text" class="form-control" name="v_wday" id="v_wday" value="<?= htmlentities(trim($v_wday, "'")) ?>">
|
||||
</div>
|
||||
</div>
|
||||
<div class="sidebar-left-grid-content">
|
||||
<div class="tabs cron-tabs js-tabs">
|
||||
<div class="tabs-items" role="tablist">
|
||||
<button type="button" class="tabs-item" id="tab-one" role="tab" tabindex="0" aria-selected="true"><?= _("Minutes") ?></button>
|
||||
<button type="button" class="tabs-item" id="tab-two" role="tab" tabindex="-1"><?= _("Hourly") ?></button>
|
||||
<button type="button" class="tabs-item" id="tab-three" role="tab" tabindex="-1"><?= _("Daily") ?></button>
|
||||
<button type="button" class="tabs-item" id="tab-four" role="tab" tabindex="-1"><?= _("Weekly") ?></button>
|
||||
<button type="button" class="tabs-item" id="tab-five" role="tab" tabindex="-1"><?= _("Monthly") ?></button>
|
||||
</div>
|
||||
<div class="tabs-panel" role="tabpanel" aria-labelledby="tab-one" tabindex="0">
|
||||
<fieldset>
|
||||
<input type="hidden" name="h_hour" value="*" form="">
|
||||
<input type="hidden" name="h_day" value="*" form="">
|
||||
<input type="hidden" name="h_month" value="*" form="">
|
||||
<input type="hidden" name="h_wday" value="*" form="">
|
||||
<div class="u-mt10 u-mb20">
|
||||
<label for="h_min_1" class="form-label first"><?= _("Run Command") ?>:</label>
|
||||
<select class="form-select" name="h_min" id="h_min_1" form="">
|
||||
<option value="*" selected="selected"><?= _("Every minute") ?></option>
|
||||
<option value="*/2"><?= sprintf(_("Every %s minutes"), 2) ?></option>
|
||||
<option value="*/5"><?= sprintf(_("Every %s minutes"), 5) ?></option>
|
||||
<option value="*/10"><?= sprintf(_("Every %s minutes"), 10) ?></option>
|
||||
<option value="*/15"><?= sprintf(_("Every %s minutes"), 15) ?></option>
|
||||
<option value="*/30"><?= sprintf(_("Every %s minutes"), 30) ?></option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="u-pt10">
|
||||
<button type="button" class="button button-secondary js-generate-cron">
|
||||
<?= _("Generate") ?>
|
||||
</button>
|
||||
</div>
|
||||
</fieldset>
|
||||
</div>
|
||||
<div class="tabs-panel" role="tabpanel" aria-labelledby="tab-two" tabindex="0" hidden>
|
||||
<fieldset>
|
||||
<input type="hidden" name="h_day" value="*" form="">
|
||||
<input type="hidden" name="h_month" value="*" form="">
|
||||
<input type="hidden" name="h_wday" value="*" form="">
|
||||
<div class="u-mt10 u-mb10">
|
||||
<label for="h_hour_2" class="form-label first"><?= _("Run Command") ?>:</label>
|
||||
<select class="form-select" name="h_hour" id="h_hour_2" form="">
|
||||
<option value="*" selected="selected"><?= _("Every hour") ?></option>
|
||||
<option value="*/2"><?= sprintf(_("Every %s hours"), 2) ?></option>
|
||||
<option value="*/6"><?= sprintf(_("Every %s hours"), 6) ?></option>
|
||||
<option value="*/12"><?= sprintf(_("Every %s hours"), 12) ?></option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="u-mb20">
|
||||
<label for="h_min_2" class="form-label first"><?= _("Minute") ?>:</label>
|
||||
<select class="form-select" name="h_min" id="h_min_2" style="width:70px;" form="">
|
||||
<option value="0" selected="selected">00</option>
|
||||
<option value="15">15</option>
|
||||
<option value="30">30</option>
|
||||
<option value="45">45</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="u-pt10">
|
||||
<button type="button" class="button button-secondary js-generate-cron">
|
||||
<?= _("Generate") ?>
|
||||
</button>
|
||||
</div>
|
||||
</fieldset>
|
||||
</div>
|
||||
<div class="tabs-panel" role="tabpanel" aria-labelledby="tab-three" tabindex="0" hidden>
|
||||
<fieldset>
|
||||
<input type="hidden" name="h_month" value="*" form="">
|
||||
<input type="hidden" name="h_wday" value="*" form="">
|
||||
<div class="u-mt10 u-mb10">
|
||||
<label for="h_day_3" class="form-label first"><?= _("Run Command") ?>:</label>
|
||||
<select class="form-select" name="h_day" id="h_day_3" form="">
|
||||
<option value="*" selected="selected"><?= _("Every day") ?></option>
|
||||
<option value="1-31/2"><?= _("Every odd day") ?></option>
|
||||
<option value="*/2"><?= _("Every even day") ?></option>
|
||||
<option value="*/3"><?= sprintf(_("Every %s days"), 2) ?></option>
|
||||
<option value="*/5"><?= sprintf(_("Every %s days"), 5) ?></option>
|
||||
<option value="*/10"><?= sprintf(_("Every %s days"), 10) ?></option>
|
||||
<option value="*/15"><?= sprintf(_("Every %s days"), 15) ?></option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="u-mb20">
|
||||
<label for="h_hour_3" class="form-label first"><?= _("Hour") ?>:</label>
|
||||
<select class="form-select" name="h_hour" id="h_hour_3" style="width:70px;" form="">
|
||||
<option value="0">00</option>
|
||||
<option value="1">01</option>
|
||||
<option value="2">02</option>
|
||||
<option value="3">03</option>
|
||||
<option value="4">04</option>
|
||||
<option value="5">05</option>
|
||||
<option value="6">06</option>
|
||||
<option value="7">07</option>
|
||||
<option value="8">08</option>
|
||||
<option value="9">09</option>
|
||||
<option value="10">10</option>
|
||||
<option value="11">11</option>
|
||||
<option value="12" selected="selected">12</option>
|
||||
<option value="13">13</option>
|
||||
<option value="14">14</option>
|
||||
<option value="15">15</option>
|
||||
<option value="16">16</option>
|
||||
<option value="17">17</option>
|
||||
<option value="18">18</option>
|
||||
<option value="19">19</option>
|
||||
<option value="20">20</option>
|
||||
<option value="21">21</option>
|
||||
<option value="22">22</option>
|
||||
<option value="23">23</option>
|
||||
</select>
|
||||
<label for="h_min_3" class="form-label"><?= _("Minute") ?>:</label>
|
||||
<select class="form-select" name="h_min" id="h_min_3" style="width:70px;" form="">
|
||||
<option value="0" selected="selected">00</option>
|
||||
<option value="1">01</option>
|
||||
<option value="2">02</option>
|
||||
<option value="5">05</option>
|
||||
<option value="10">10</option>
|
||||
<option value="15">15</option>
|
||||
<option value="20">20</option>
|
||||
<option value="25">25</option>
|
||||
<option value="30">30</option>
|
||||
<option value="35">35</option>
|
||||
<option value="40">40</option>
|
||||
<option value="45">45</option>
|
||||
<option value="50">50</option>
|
||||
<option value="55">55</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="u-pt10">
|
||||
<button type="button" class="button button-secondary js-generate-cron">
|
||||
<?= _("Generate") ?>
|
||||
</button>
|
||||
</div>
|
||||
</fieldset>
|
||||
</div>
|
||||
<div class="tabs-panel" role="tabpanel" aria-labelledby="tab-four" tabindex="0" hidden>
|
||||
<fieldset>
|
||||
<input type="hidden" name="h_month" value="*" form="">
|
||||
<input type="hidden" name="h_day" value="*" form="">
|
||||
<div class="u-mt10 u-mb10">
|
||||
<label for="h_wday_4" class="form-label first"><?= _("Run Command") ?>:</label>
|
||||
<select class="form-select" name="h_wday" id="h_wday_4" form="">
|
||||
<option value="*" selected="selected"><?= _("Every day") ?></option>
|
||||
<option value="1,2,3,4,5"><?= _("Weekdays (5 days)") ?></option>
|
||||
<option value="0,6"><?= _("Weekend (2 days)") ?></option>
|
||||
<option value="1"><?= _("Monday") ?></option>
|
||||
<option value="2"><?= _("Tuesday") ?></option>
|
||||
<option value="3"><?= _("Wednesday") ?></option>
|
||||
<option value="4"><?= _("Thursday") ?></option>
|
||||
<option value="5"><?= _("Friday") ?></option>
|
||||
<option value="6"><?= _("Saturday") ?></option>
|
||||
<option value="0"><?= _("Sunday") ?></option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="u-mb20">
|
||||
<label for="h_hour_4" class="form-label first"><?= _("Hour") ?>:</label>
|
||||
<select class="form-select" name="h_hour" id="h_hour_4" style="width:70px;" form="">
|
||||
<option value="0">00</option>
|
||||
<option value="1">01</option>
|
||||
<option value="2">02</option>
|
||||
<option value="3">03</option>
|
||||
<option value="4">04</option>
|
||||
<option value="5">05</option>
|
||||
<option value="6">06</option>
|
||||
<option value="7">07</option>
|
||||
<option value="8">08</option>
|
||||
<option value="9">09</option>
|
||||
<option value="10">10</option>
|
||||
<option value="11">11</option>
|
||||
<option value="12" selected="selected">12</option>
|
||||
<option value="13">13</option>
|
||||
<option value="14">14</option>
|
||||
<option value="15">15</option>
|
||||
<option value="16">16</option>
|
||||
<option value="17">17</option>
|
||||
<option value="18">18</option>
|
||||
<option value="19">19</option>
|
||||
<option value="20">20</option>
|
||||
<option value="21">21</option>
|
||||
<option value="22">22</option>
|
||||
<option value="23">23</option>
|
||||
</select>
|
||||
<label for="h_min_4" class="form-label"><?= _("Minute") ?>:</label>
|
||||
<select class="form-select" name="h_min" id="h_min_4" style="width:70px;" form="">
|
||||
<option value="0" selected="selected">00</option>
|
||||
<option value="1">01</option>
|
||||
<option value="2">02</option>
|
||||
<option value="5">05</option>
|
||||
<option value="10">10</option>
|
||||
<option value="15">15</option>
|
||||
<option value="20">20</option>
|
||||
<option value="25">25</option>
|
||||
<option value="30">30</option>
|
||||
<option value="35">35</option>
|
||||
<option value="40">40</option>
|
||||
<option value="45">45</option>
|
||||
<option value="50">50</option>
|
||||
<option value="55">55</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="u-pt10">
|
||||
<button type="button" class="button button-secondary js-generate-cron">
|
||||
<?= _("Generate") ?>
|
||||
</button>
|
||||
</div>
|
||||
</fieldset>
|
||||
</div>
|
||||
<div class="tabs-panel" role="tabpanel" aria-labelledby="tab-five" tabindex="0" hidden>
|
||||
<fieldset>
|
||||
<input type="hidden" name="h_wday" value="*" form="">
|
||||
<div class="u-mt10 u-mb10">
|
||||
<label for="h_month_5" class="form-label first"><?= _("Run Command") ?>:</label>
|
||||
<select class="form-select" name="h_month" id="h_month_5" form="">
|
||||
<option value="*" selected="selected"><?= _("Every month") ?></option>
|
||||
<option value="1-11/2"><?= _("Every odd month") ?></option>
|
||||
<option value="*/2"><?= _("Every even month") ?></option>
|
||||
<option value="*/3"><?= sprintf(_("Every %s months"), 3) ?></option>
|
||||
<option value="*/6"><?= sprintf(_("Every %s months"), 6) ?></option>
|
||||
<option value="1"><?= _("Jan") ?></option>
|
||||
<option value="2"><?= _("Feb") ?></option>
|
||||
<option value="3"><?= _("Mar") ?></option>
|
||||
<option value="4"><?= _("Apr") ?></option>
|
||||
<option value="5"><?= _("May") ?></option>
|
||||
<option value="6"><?= _("Jun") ?></option>
|
||||
<option value="7"><?= _("Jul") ?></option>
|
||||
<option value="8"><?= _("Aug") ?></option>
|
||||
<option value="9"><?= _("Sep") ?></option>
|
||||
<option value="10"><?= _("Oct") ?></option>
|
||||
<option value="11"><?= _("Nov") ?></option>
|
||||
<option value="12"><?= _("Dec") ?></option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="u-mb20">
|
||||
<label for="h_day_5" class="form-label first"><?= _("Day") ?>:</label>
|
||||
<select class="form-select" name="h_day" id="h_day_5" style="width:70px;" form="">
|
||||
<option value="1" selected="selected">01</option>
|
||||
<option value="2">02</option>
|
||||
<option value="3">03</option>
|
||||
<option value="4">04</option>
|
||||
<option value="5">05</option>
|
||||
<option value="6">06</option>
|
||||
<option value="7">07</option>
|
||||
<option value="8">08</option>
|
||||
<option value="9">09</option>
|
||||
<option value="10">10</option>
|
||||
<option value="11">11</option>
|
||||
<option value="12">12</option>
|
||||
<option value="13">13</option>
|
||||
<option value="14">14</option>
|
||||
<option value="15">15</option>
|
||||
<option value="16">16</option>
|
||||
<option value="17">17</option>
|
||||
<option value="18">18</option>
|
||||
<option value="19">19</option>
|
||||
<option value="20">20</option>
|
||||
<option value="21">21</option>
|
||||
<option value="22">22</option>
|
||||
<option value="23">23</option>
|
||||
<option value="24">24</option>
|
||||
<option value="25">25</option>
|
||||
<option value="26">26</option>
|
||||
<option value="27">27</option>
|
||||
<option value="28">28</option>
|
||||
<option value="29">29</option>
|
||||
<option value="30">30</option>
|
||||
<option value="31">31</option>
|
||||
</select>
|
||||
<label for="h_hour_5" class="form-label"><?= _("Hour") ?>:</label>
|
||||
<select class="form-select" name="h_hour" id="h_hour_5" style="width:70px;" form="">
|
||||
<option value="0">00</option>
|
||||
<option value="1">01</option>
|
||||
<option value="2">02</option>
|
||||
<option value="3">03</option>
|
||||
<option value="4">04</option>
|
||||
<option value="5">05</option>
|
||||
<option value="6">06</option>
|
||||
<option value="7">07</option>
|
||||
<option value="8">08</option>
|
||||
<option value="9">09</option>
|
||||
<option value="10">10</option>
|
||||
<option value="11">11</option>
|
||||
<option value="12" selected="selected">12</option>
|
||||
<option value="13">13</option>
|
||||
<option value="14">14</option>
|
||||
<option value="15">15</option>
|
||||
<option value="16">16</option>
|
||||
<option value="17">17</option>
|
||||
<option value="18">18</option>
|
||||
<option value="19">19</option>
|
||||
<option value="20">20</option>
|
||||
<option value="21">21</option>
|
||||
<option value="22">22</option>
|
||||
<option value="23">23</option>
|
||||
</select>
|
||||
<label for="h_min_5" class="form-label"><?= _("Minute") ?>:</label>
|
||||
<select class="form-select" name="h_min" id="h_min_5" style="width:70px;" form="">
|
||||
<option value="0" selected="selected">00</option>
|
||||
<option value="1">01</option>
|
||||
<option value="2">02</option>
|
||||
<option value="5">05</option>
|
||||
<option value="10">10</option>
|
||||
<option value="15">15</option>
|
||||
<option value="20">20</option>
|
||||
<option value="25">25</option>
|
||||
<option value="30">30</option>
|
||||
<option value="35">35</option>
|
||||
<option value="40">40</option>
|
||||
<option value="45">45</option>
|
||||
<option value="50">50</option>
|
||||
<option value="55">55</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="u-pt10">
|
||||
<button type="button" class="button button-secondary js-generate-cron">
|
||||
<?= _("Generate") ?>
|
||||
</button>
|
||||
</div>
|
||||
</fieldset>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
|
||||
</div>
|
||||
76
web/templates/pages/edit_db.php
Normal file
76
web/templates/pages/edit_db.php
Normal file
@@ -0,0 +1,76 @@
|
||||
<!-- Begin toolbar -->
|
||||
<div class="toolbar">
|
||||
<div class="toolbar-inner">
|
||||
<div class="toolbar-buttons">
|
||||
<a class="button button-secondary button-back js-button-back" href="/list/db/">
|
||||
<i class="fas fa-arrow-left icon-blue"></i><?= _("Back") ?>
|
||||
</a>
|
||||
</div>
|
||||
<div class="toolbar-buttons">
|
||||
<button type="submit" class="button" form="main-form">
|
||||
<i class="fas fa-floppy-disk icon-purple"></i><?= _("Save") ?>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- End toolbar -->
|
||||
|
||||
<div class="container">
|
||||
|
||||
<form id="main-form" name="v_edit_db" method="post" class="<?= $v_status ?>">
|
||||
<input type="hidden" name="token" value="<?= $_SESSION["token"] ?>">
|
||||
<input type="hidden" name="save" value="save">
|
||||
|
||||
<div class="form-container">
|
||||
<h1 class="u-mb20"><?= _("Edit Database") ?></h1>
|
||||
<?php show_alert_message($_SESSION); ?>
|
||||
<div class="u-mb10">
|
||||
<label for="v_database" class="form-label"><?= _("Database") ?></label>
|
||||
<input type="text" class="form-control js-db-hint-database-name" name="v_database" id="v_database" value="<?= htmlentities(trim($v_database, "'")) ?>" disabled>
|
||||
<small class="hint"></small>
|
||||
</div>
|
||||
<div class="u-mb10">
|
||||
<label for="v_dbuser" class="form-label u-side-by-side">
|
||||
<?= _("Username") ?>
|
||||
<em><small>(<?= sprintf(_("Maximum %s characters length, including prefix"), 32) ?>)</small></em>
|
||||
</label>
|
||||
<input type="text" class="form-control js-db-hint-username" name="v_dbuser" id="v_dbuser" value="<?= htmlentities(trim($v_dbuser, "'")) ?>">
|
||||
<small class="hint"></small>
|
||||
</div>
|
||||
<div class="u-mb10">
|
||||
<label for="v_password" class="form-label">
|
||||
<?= _("Password") ?>
|
||||
<button type="button" title="<?= _("Generate") ?>" class="u-unstyled-button u-ml5 js-generate-password">
|
||||
<i class="fas fa-arrows-rotate icon-green"></i>
|
||||
</button>
|
||||
</label>
|
||||
<div class="u-pos-relative u-mb10">
|
||||
<input type="text" class="form-control js-password-input" name="v_password" id="v_password" value="<?= htmlentities(trim($v_password, "'")) ?>">
|
||||
<div class="password-meter">
|
||||
<meter max="4" class="password-meter-input js-password-meter"></meter>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<p class="u-mb10"><?= _("Your password must have at least") ?>:</p>
|
||||
<ul class="u-list-bulleted u-mb10">
|
||||
<li><?= _("8 characters long") ?></li>
|
||||
<li><?= _("1 uppercase & 1 lowercase character") ?></li>
|
||||
<li><?= _("1 number") ?></li>
|
||||
</ul>
|
||||
<div class="u-mb10">
|
||||
<label for="v_type" class="form-label"><?= _("Type") ?></label>
|
||||
<input type="text" class="form-control" name="v_type" id="v_type" value="<?= htmlentities(trim($v_type, "'")) ?>" disabled>
|
||||
</div>
|
||||
<div class="u-mb10">
|
||||
<label for="v_host" class="form-label"><?= _("Host") ?></label>
|
||||
<input type="text" class="form-control" name="v_host" id="v_host" value="<?= htmlentities(trim($v_host, "'")) ?>" disabled>
|
||||
</div>
|
||||
<div class="u-mb10">
|
||||
<label for="v_charset" class="form-label"><?= _("Charset") ?></label>
|
||||
<input type="text" class="form-control" name="v_charset" id="v_charset" value="<?= htmlentities(trim($v_charset, "'")) ?>" disabled>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
|
||||
</div>
|
||||
93
web/templates/pages/edit_dns.php
Normal file
93
web/templates/pages/edit_dns.php
Normal file
@@ -0,0 +1,93 @@
|
||||
<!-- Begin toolbar -->
|
||||
<div class="toolbar">
|
||||
<div class="toolbar-inner">
|
||||
<div class="toolbar-buttons">
|
||||
<a class="button button-secondary button-back js-button-back" href="/list/dns/">
|
||||
<i class="fas fa-arrow-left icon-blue"></i><?= _("Back") ?>
|
||||
</a>
|
||||
</div>
|
||||
<div class="toolbar-buttons">
|
||||
<button type="submit" class="button" form="main-form">
|
||||
<i class="fas fa-floppy-disk icon-purple"></i><?= _("Save") ?>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- End toolbar -->
|
||||
|
||||
<div class="container">
|
||||
|
||||
<form id="main-form" name="v_edit_dns" method="post" class="<?= $v_status ?>">
|
||||
<input type="hidden" name="token" value="<?= $_SESSION["token"] ?>">
|
||||
<input type="hidden" name="save" value="save">
|
||||
|
||||
<div class="form-container">
|
||||
<h1 class="u-mb20"><?= _("Edit DNS Domain") ?></h1>
|
||||
<?php show_alert_message($_SESSION); ?>
|
||||
<div class="u-mb10">
|
||||
<label for="v_domain" class="form-label"><?= _("Domain") ?></label>
|
||||
<input type="text" class="form-control" name="v_domain" id="v_domain" value="<?= htmlentities(trim($v_domain, "'")) ?>" disabled required>
|
||||
<input type="hidden" name="v_domain" value="<?= htmlentities(trim($v_domain, "'")) ?>">
|
||||
</div>
|
||||
<div class="u-mb10">
|
||||
<label for="v_ip" class="form-label"><?= _("IP Address") ?></label>
|
||||
<div class="u-pos-relative">
|
||||
<select class="form-select" tabindex="-1" onchange="this.nextElementSibling.value=this.value">
|
||||
<option value="">clear</option>
|
||||
<?php
|
||||
foreach ($v_ips as $ip => $value) {
|
||||
$display_ip = empty($value['NAT']) ? $ip : "{$value['NAT']}";
|
||||
$ip_selected = ((!empty($v_ip) && ($v_ip==$ip||$v_ip==$display_ip) ))? 'selected' : '';
|
||||
echo "<option value='{$display_ip}' {$ip_selected}>" . htmlentities($display_ip) . "</option>\n";
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
<input type="text" class="form-control list-editor" name="v_ip" id="v_ip" value="<?= htmlentities(trim($v_ip, "'")) ?>">
|
||||
</div>
|
||||
</div>
|
||||
<?php if ($_SESSION["userContext"] === "admin" || ($_SESSION["userContext"] === "user" && $_SESSION["POLICY_USER_EDIT_DNS_TEMPLATES"] === "yes")) { ?>
|
||||
<div class="u-mb10">
|
||||
<label for="v_template" class="form-label">
|
||||
<?= _("Template") . "<span class='optional'>" . strtoupper($_SESSION["DNS_SYSTEM"]) . "</span>" ?>
|
||||
</label>
|
||||
<select class="form-select" name="v_template" id="v_template">
|
||||
<?php
|
||||
foreach ($templates as $key => $value) {
|
||||
echo "\t\t\t\t<option value=\"".htmlentities($value)."\"";
|
||||
$svalue = "'".$value."'";
|
||||
if ((!empty($v_template)) && ( $value == $v_template ) || ($svalue == $v_template)){
|
||||
echo ' selected' ;
|
||||
}
|
||||
echo ">".htmlentities($value)."</option>\n";
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<?php if ($_SESSION["DNS_CLUSTER_SYSTEM"] == "hestia-zone" && $_SESSION["SUPPORT_DNSSEC"] == "yes") { ?>
|
||||
<div class="form-check u-mb10">
|
||||
<input class="form-check-input" type="checkbox" name="v_dnssec" id="v_dnssec" value="yes" <?php if ($v_dnssec === 'yes'){ echo ' checked'; } ?>>
|
||||
<label for="v_dnssec">
|
||||
<?= _("Enable DNSSEC") ?>
|
||||
</label>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<div class="u-mb10">
|
||||
<label for="v_exp" class="form-label">
|
||||
<?= _("Expiration Date") ?><span class="optional">(<?= _("YYYY-MM-DD") ?>)</span>
|
||||
</label>
|
||||
<input type="text" class="form-control" name="v_exp" id="v_exp" value="<?= htmlentities(trim($v_exp, "'")) ?>">
|
||||
</div>
|
||||
<div class="u-mb10">
|
||||
<label for="v_soa" class="form-label"><?= _("SOA") ?></label>
|
||||
<input type="text" class="form-control" name="v_soa" id="v_soa" value="<?= htmlentities(trim($v_soa, "'")) ?>">
|
||||
</div>
|
||||
<div class="u-mb10">
|
||||
<label for="v_ttl" class="form-label"><?= _("TTL") ?></label>
|
||||
<input type="text" class="form-control" name="v_ttl" id="v_ttl" value="<?= htmlentities(trim($v_ttl, "'")) ?>">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
|
||||
</div>
|
||||
89
web/templates/pages/edit_dns_rec.php
Normal file
89
web/templates/pages/edit_dns_rec.php
Normal file
@@ -0,0 +1,89 @@
|
||||
<!-- Begin toolbar -->
|
||||
<div class="toolbar">
|
||||
<div class="toolbar-inner">
|
||||
<div class="toolbar-buttons">
|
||||
<a class="button button-secondary button-back js-button-back" href="/list/dns/?domain=<?= htmlentities(trim($v_domain, "'")) ?>&token=<?= $_SESSION["token"] ?>">
|
||||
<i class="fas fa-arrow-left icon-blue"></i><?= _("Back") ?>
|
||||
</a>
|
||||
</div>
|
||||
<div class="toolbar-buttons">
|
||||
<button type="submit" class="button" form="main-form">
|
||||
<i class="fas fa-floppy-disk icon-purple"></i><?= _("Save") ?>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- End toolbar -->
|
||||
|
||||
<div class="container">
|
||||
|
||||
<form id="main-form" name="v_edit_dns_rec" method="post" class="<?= $v_status ?>">
|
||||
<input type="hidden" name="token" value="<?= $_SESSION["token"] ?>">
|
||||
<input type="hidden" name="save" value="save">
|
||||
|
||||
<div class="form-container">
|
||||
<h1 class="u-mb20"><?= _("Edit DNS Record") ?></h1>
|
||||
<?php show_alert_message($_SESSION); ?>
|
||||
<div class="u-mb10">
|
||||
<label for="v_domain" class="form-label"><?= _("Domain") ?></label>
|
||||
<input type="text" class="form-control js-dns-record-domain" name="v_domain" id="v_domain" value="<?= htmlentities(trim($v_domain, "'")) ?>" disabled>
|
||||
<input type="hidden" name="v_domain" value="<?= htmlentities(trim($v_domain, "'")) ?>">
|
||||
</div>
|
||||
<div class="u-mb10">
|
||||
<label for="v_rec" class="form-label"><?= _("Record") ?></label>
|
||||
<input type="text" class="form-control js-dns-record-input" name="v_rec" id="v_rec" value="<?= htmlentities(trim($v_rec, "'")) ?>">
|
||||
<input type="hidden" name="v_record_id" value="<?= htmlentities(trim($v_record_id, "'")) ?>">
|
||||
<small class="hint"></small>
|
||||
</div>
|
||||
<div class="u-mb10">
|
||||
<label for="v_type" class="form-label"><?= _("Type") ?></label>
|
||||
<select class="form-select" name="v_type" id="v_type">
|
||||
<option value="A" <?php if ($v_type == 'A') echo "selected"; ?>>A</option>
|
||||
<option value="AAAA" <?php if ($v_type == 'AAAA') echo "selected"; ?>>AAAA</option>
|
||||
<option value="CAA" <?php if ($v_type == 'CAA') echo "selected"; ?>>CAA</option>
|
||||
<option value="CNAME" <?php if ($v_type == 'CNAME') echo "selected"; ?>>CNAME</option>
|
||||
<option value="DNSKEY" <?php if ($v_type == 'DNSKEY') echo "selected"; ?>>DNSKEY</option>
|
||||
<option value="DS" <?php if ($v_type == 'DS') echo "selected"; ?>>DS</option>
|
||||
<option value="IPSECKEY" <?php if ($v_type == 'IPSECKEY') echo "selected"; ?>>IPSECKEY</option>
|
||||
<option value="KEY" <?php if ($v_type == 'KEY') echo "selected"; ?>>KEY</option>
|
||||
<option value="MX" <?php if ($v_type == 'MX') echo "selected"; ?>>MX</option>
|
||||
<option value="NS" <?php if ($v_type == 'NS') echo "selected"; ?>>NS</option>
|
||||
<option value="PTR" <?php if ($v_type == 'PTR') echo "selected"; ?>>PTR</option>
|
||||
<option value="SPF" <?php if ($v_type == 'SPF') echo "selected"; ?>>SPF</option>
|
||||
<option value="SRV" <?php if ($v_type == 'SRV') echo "selected"; ?>>SRV</option>
|
||||
<option value="TLSA" <?php if ($v_type == 'TLSA') echo "selected"; ?>>TLSA</option>
|
||||
<option value="TXT" <?php if ($v_type == 'TXT') echo "selected"; ?>>TXT</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="u-mb10">
|
||||
<label for="v_val" class="form-label"><?= _("IP or Value") ?></label>
|
||||
<div class="u-pos-relative">
|
||||
<select class="form-select" tabindex="-1" onchange="this.nextElementSibling.value=this.value">
|
||||
<option value=""> </option>
|
||||
<?php
|
||||
foreach ($v_ips as $ip => $value) {
|
||||
$display_ip = empty($value['NAT']) ? $ip : "{$value['NAT']}";
|
||||
echo "<option value='{$display_ip}'>" . htmlentities($display_ip) . "</option>\n";
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
<input type="text" class="form-control list-editor" name="v_val" id="v_val" value="<?= htmlentities(trim($v_val, "'")) ?>">
|
||||
</div>
|
||||
</div>
|
||||
<div class="u-mb10">
|
||||
<label for="v_priority" class="form-label">
|
||||
<?= _("Priority") ?> <span class="optional">(<?= _("Optional") ?>)</span>
|
||||
</label>
|
||||
<input type="text" class="form-control" name="v_priority" id="v_priority" value="<?= htmlentities(trim($v_priority, "'")) ?>">
|
||||
</div>
|
||||
<div class="u-mb10">
|
||||
<label for="v_ttl" class="form-label">
|
||||
<?= _("TTL") ?> <span class="optional">(<?= _("Optional") ?>)</span>
|
||||
</label>
|
||||
<input type="text" class="form-control" name="v_ttl" id="v_ttl" value="<?= htmlentities(trim($v_ttl, "'")) ?>">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
|
||||
</div>
|
||||
74
web/templates/pages/edit_firewall.php
Normal file
74
web/templates/pages/edit_firewall.php
Normal file
@@ -0,0 +1,74 @@
|
||||
<!-- Begin toolbar -->
|
||||
<div class="toolbar">
|
||||
<div class="toolbar-inner">
|
||||
<div class="toolbar-buttons">
|
||||
<a class="button button-secondary button-back js-button-back" href="/list/firewall/">
|
||||
<i class="fas fa-arrow-left icon-blue"></i><?= _("Back") ?>
|
||||
</a>
|
||||
</div>
|
||||
<div class="toolbar-buttons">
|
||||
<button type="submit" class="button" form="main-form">
|
||||
<i class="fas fa-floppy-disk icon-purple"></i><?= _("Save") ?>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- End toolbar -->
|
||||
|
||||
<div class="container">
|
||||
|
||||
<form id="main-form" name="v_edit_firewall" method="post" class="<?= $v_status ?>">
|
||||
<input type="hidden" name="token" value="<?= $_SESSION["token"] ?>">
|
||||
<input type="hidden" name="save" value="save">
|
||||
|
||||
<div class="form-container">
|
||||
<h1 class="u-mb20"><?= _("Edit Firewall Rule") ?></h1>
|
||||
<?php show_alert_message($_SESSION); ?>
|
||||
<div class="u-mb10">
|
||||
<label for="v_action" class="form-label"><?= _("Action") ?></label>
|
||||
<select class="form-select" name="v_action" id="v_action">
|
||||
<option value="DROP" <?php if ((!empty($v_action)) && ( $v_action == "DROP" )) echo 'selected'?>><?= _("DROP") ?></option>
|
||||
<option value="ACCEPT" <?php if ((!empty($v_action)) && ( $v_action == "ACCEPT" )) echo 'selected'?>><?= _("ACCEPT") ?></option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="u-mb10">
|
||||
<label for="v_protocol" class="form-label"><?= _("Protocol") ?></label>
|
||||
<select class="form-select" name="v_protocol" id="v_protocol">
|
||||
<option value="TCP" <?php if ((!empty($v_protocol)) && ( $v_protocol == "TCP" )) echo 'selected'?>>TCP</option>
|
||||
<option value="UDP" <?php if ((!empty($v_protocol)) && ( $v_protocol == "UDP" )) echo 'selected'?>>UDP</option>
|
||||
<option value="ICMP" <?php if ((!empty($v_protocol)) && ( $v_protocol == "ICMP" )) echo 'selected'?>>ICMP</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="u-mb10">
|
||||
<label for="v_port" class="form-label">
|
||||
<?= _("Port") ?> <span class="optional">(<?= _("Ranges and lists are acceptable") ?>)</span>
|
||||
</label>
|
||||
<input type="text" class="form-control" name="v_port" id="v_port" value="<?= htmlentities(trim($v_port, "'")) ?>" placeholder="<?= _("All ports: 0, Range: 80-82, List: 80,443,8080,8443") ?>">
|
||||
</div>
|
||||
<div class="u-mb10">
|
||||
<label for="v_ip" class="form-label">
|
||||
<?= _("IP Address / IPset IP List") ?> <span class="optional">(<?= _("Support CIDR format") ?>)</span>
|
||||
</label>
|
||||
<div class="u-pos-relative">
|
||||
<select
|
||||
class="form-select js-ip-list-select"
|
||||
tabindex="-1"
|
||||
onchange="this.nextElementSibling.value=this.value"
|
||||
data-ipset-lists="<?= htmlspecialchars($ipset_lists_json, ENT_QUOTES, "UTF-8") ?>"
|
||||
>
|
||||
<option value=""><?= _("Clear") ?></option>
|
||||
</select>
|
||||
<input type="text" class="form-control list-editor" name="v_ip" id="v_ip" value="<?= htmlentities(trim($v_ip, "'")) ?>">
|
||||
</div>
|
||||
</div>
|
||||
<div class="u-mb10">
|
||||
<label for="v_comment" class="form-label">
|
||||
<?= _("Comment") ?> <span class="optional">(<?= _("Optional") ?>)</span>
|
||||
</label>
|
||||
<input type="text" class="form-control" name="v_comment" id="v_comment" maxlength="255" value="<?= htmlentities(trim($v_comment, "'")) ?>">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
|
||||
</div>
|
||||
83
web/templates/pages/edit_ip.php
Normal file
83
web/templates/pages/edit_ip.php
Normal file
@@ -0,0 +1,83 @@
|
||||
<!-- Begin toolbar -->
|
||||
<div class="toolbar">
|
||||
<div class="toolbar-inner">
|
||||
<div class="toolbar-buttons">
|
||||
<a class="button button-secondary button-back js-button-back" href="/list/ip/">
|
||||
<i class="fas fa-arrow-left icon-blue"></i><?= _("Back") ?>
|
||||
</a>
|
||||
</div>
|
||||
<div class="toolbar-buttons">
|
||||
<button type="submit" class="button" form="main-form">
|
||||
<i class="fas fa-floppy-disk icon-purple"></i><?= _("Save") ?>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- End toolbar -->
|
||||
|
||||
<div class="container">
|
||||
|
||||
<form
|
||||
x-data="{
|
||||
showUserTable: <?= empty($v_dedicated) ? "true" : "false" ?>
|
||||
}"
|
||||
id="main-form"
|
||||
name="v_edit_ip"
|
||||
method="post"
|
||||
>
|
||||
<input type="hidden" name="token" value="<?= $_SESSION["token"] ?>">
|
||||
<input type="hidden" name="save" value="save">
|
||||
|
||||
<div class="form-container">
|
||||
<h1 class="u-mb20"><?= _("Edit IP Address") ?></h1>
|
||||
<?php show_alert_message($_SESSION); ?>
|
||||
<div class="u-mb10">
|
||||
<label for="v_ip" class="form-label"><?= _("IP Address") ?></label>
|
||||
<input type="text" class="form-control" name="v_ip" id="v_ip" value="<?= htmlentities(trim($v_ip, "'")) ?>" disabled>
|
||||
<input type="hidden" name="v_ip" value="<?= htmlentities(trim($v_ip, "'")) ?>">
|
||||
</div>
|
||||
<div class="u-mb10">
|
||||
<label for="v_netmask" class="form-label"><?= _("Netmask") ?></label>
|
||||
<input type="text" class="form-control" name="v_netmask" id="v_netmask" value="<?= htmlentities(trim($v_netmask, "'")) ?>" disabled>
|
||||
</div>
|
||||
<div class="u-mb10">
|
||||
<label for="v_interface" class="form-label"><?= _("Interface") ?></label>
|
||||
<input type="text" class="form-control" name="v_interface" id="v_interface" value="<?= htmlentities(trim($v_interface, "'")) ?>" disabled>
|
||||
</div>
|
||||
<div class="form-check u-mb10">
|
||||
<input x-model="showUserTable" class="form-check-input" type="checkbox" name="v_shared" id="v_shared">
|
||||
<label for="v_shared">
|
||||
<?= _("Shared") ?>
|
||||
</label>
|
||||
</div>
|
||||
<div x-cloak x-show="!showUserTable" id="usrtable">
|
||||
<div class="u-mb10">
|
||||
<label for="v_owner" class="form-label"><?= _("Assigned User") ?></label>
|
||||
<select class="form-select" name="v_owner" id="v_owner">
|
||||
<?php
|
||||
foreach ($users as $key => $value) {
|
||||
echo "\t\t\t\t<option value=\"".htmlentities($value)."\"";
|
||||
if ((!empty($v_owner)) && ( $value == $v_owner )) echo ' selected';
|
||||
echo ">".htmlentities($value)."</option>\n";
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="u-mb10">
|
||||
<label for="v_name" class="form-label">
|
||||
<?= _("Assigned Domain") ?> <span class="optional">(<?= _("Optional") ?>)</span>
|
||||
</label>
|
||||
<input type="text" class="form-control" name="v_name" id="v_name" value="<?= htmlentities(trim($v_name, "'")) ?>">
|
||||
</div>
|
||||
<div class="u-mb10">
|
||||
<label for="v_nat" class="form-label">
|
||||
<?= _("NAT IP Association") ?> <span class="optional">(<?= _("Optional") ?>)</span>
|
||||
</label>
|
||||
<input type="text" class="form-control" name="v_nat" id="v_nat" value="<?= htmlentities(trim($v_nat, "'")) ?>">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
|
||||
</div>
|
||||
200
web/templates/pages/edit_mail.php
Normal file
200
web/templates/pages/edit_mail.php
Normal file
@@ -0,0 +1,200 @@
|
||||
<!-- Begin toolbar -->
|
||||
<div class="toolbar">
|
||||
<div class="toolbar-inner">
|
||||
<div class="toolbar-buttons">
|
||||
<a class="button button-secondary button-back js-button-back" href="/list/mail/">
|
||||
<i class="fas fa-arrow-left icon-blue"></i><?= _("Back") ?>
|
||||
</a>
|
||||
</div>
|
||||
<div class="toolbar-buttons">
|
||||
<button type="submit" class="button" form="main-form">
|
||||
<i class="fas fa-floppy-disk icon-purple"></i><?= _("Save") ?>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- End toolbar -->
|
||||
|
||||
<div class="container">
|
||||
|
||||
<form
|
||||
x-data="{
|
||||
sslEnabled: <?= $v_ssl == "yes" ? "true" : "false" ?>,
|
||||
letsEncryptEnabled: <?= $v_letsencrypt == "yes" ? "true" : "false" ?>,
|
||||
hasSmtpRelay: <?= $v_smtp_relay == "true" ? "true" : "false" ?>
|
||||
}"
|
||||
id="main-form"
|
||||
name="v_edit_mail"
|
||||
method="post"
|
||||
class="<?= $v_status ?> js-enable-inputs-on-submit"
|
||||
>
|
||||
<input type="hidden" name="token" value="<?= $_SESSION["token"] ?>">
|
||||
<input type="hidden" name="save" value="save">
|
||||
|
||||
<div class="form-container">
|
||||
<h1 class="u-mb20"><?= _("Edit Mail Domain") ?></h1>
|
||||
<?php show_alert_message($_SESSION); ?>
|
||||
<div class="u-mb20">
|
||||
<label for="v_domain" class="form-label"><?= _("Domain") ?></label>
|
||||
<input type="text" class="form-control" name="v_domain" id="v_domain" value="<?= htmlentities(trim($v_domain, "'")) ?>" disabled required>
|
||||
<input type="hidden" name="v_domain" value="<?= htmlentities(trim($v_domain, "'")) ?>">
|
||||
</div>
|
||||
<?php if ($_SESSION["WEBMAIL_SYSTEM"]) { ?>
|
||||
<div class="u-mb10">
|
||||
<label for="v_webmail" class="form-label"><?= _("Webmail Client") ?></label>
|
||||
<select class="form-select" name="v_webmail" id="v_webmail" tabindex="6">
|
||||
<?php foreach ($webmail_clients as $client){
|
||||
echo "\t\t\t\t<option value=\"".htmlentities($client)."\"";
|
||||
if (( htmlentities(trim($v_webmail,"'")) == $client )) {
|
||||
echo ' selected' ;
|
||||
}
|
||||
echo ">".htmlentities(ucfirst($client))."</option>\n";
|
||||
}
|
||||
?>
|
||||
<option value="disabled" <?php if (htmlentities(trim($v_webmail,"'")) == 'disabled') { echo "selected"; }?>><?= _("Disabled") ?></option>
|
||||
</select>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<div class="u-mb10">
|
||||
<label for="v_catchall" class="form-label"><?= _("Catch-All Email") ?></label>
|
||||
<input type="email" class="form-control" name="v_catchall" id="v_catchall" value="<?= htmlentities(trim($v_catchall, "'")) ?>">
|
||||
</div>
|
||||
<div class="u-mb20">
|
||||
<label for="v_rate" class="form-label">
|
||||
<?= _("Rate Limit") ?> <span class="optional">(<?= _("email / hour / account") ?>)</span>
|
||||
</label>
|
||||
<input type="text" class="form-control" name="v_rate" id="v_rate" value="<?= htmlentities(trim($v_rate, "'")) ?>" <?php if ($_SESSION['userContext'] != "admin"){ echo "disabled"; }?>>
|
||||
</div>
|
||||
<?php if (!empty($_SESSION["ANTISPAM_SYSTEM"])) { ?>
|
||||
<div class="form-check u-mb10">
|
||||
<input class="form-check-input" type="checkbox" name="v_antispam" id="v_antispam" <?php if ($v_antispam == 'yes') echo 'checked'; ?>>
|
||||
<label for="v_antispam">
|
||||
<?= _("Spam Filter") ?>
|
||||
</label>
|
||||
</div>
|
||||
<div class="form-check u-mb10">
|
||||
<input class="form-check-input" type="checkbox" name="v_reject" id="v_reject" <?php if ($v_reject == 'yes') echo 'checked'; ?>>
|
||||
<label for="v_reject">
|
||||
<?= _("Reject Spam") ?>
|
||||
</label>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<?php if (!empty($_SESSION["ANTIVIRUS_SYSTEM"])) { ?>
|
||||
<div class="form-check u-mb10">
|
||||
<input class="form-check-input" type="checkbox" name="v_antivirus" id="v_antivirus" <?php if ($v_antivirus == 'yes') echo 'checked'; ?>>
|
||||
<label for="v_antivirus">
|
||||
<?= _("Anti-Virus") ?>
|
||||
</label>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<div class="form-check u-mb10">
|
||||
<input class="form-check-input" type="checkbox" name="v_dkim" id="v_dkim" <?php if ($v_dkim == 'yes') echo 'checked'; ?>>
|
||||
<label for="v_dkim">
|
||||
<?= _("DKIM Support") ?>
|
||||
</label>
|
||||
</div>
|
||||
<div class="form-check u-mb10">
|
||||
<input x-model="sslEnabled" class="form-check-input" type="checkbox" name="v_ssl" id="v_ssl">
|
||||
<label for="v_ssl">
|
||||
<?= _("Enable SSL for this domain") ?>
|
||||
</label>
|
||||
</div>
|
||||
<div x-cloak x-show="sslEnabled" class="u-pl30">
|
||||
<div class="form-check u-mb10">
|
||||
<input x-model="letsEncryptEnabled" class="form-check-input" type="checkbox" name="v_letsencrypt" id="v_letsencrypt">
|
||||
<label for="v_letsencrypt">
|
||||
<?= _("Use Let's Encrypt to obtain SSL certificate") ?>
|
||||
</label>
|
||||
</div>
|
||||
<div id="le-warning" class="u-mb20">
|
||||
<div class="alert alert-info" role="alert">
|
||||
<i class="fas fa-exclamation"></i>
|
||||
<div>
|
||||
<p><?php echo $v_webmail_alias; ?></p>
|
||||
<p><?= sprintf(_("To enable Let's Encrypt SSL, ensure that DNS records exist for mail.%s and %s!"), $v_domain, $v_webmail_alias) ?></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div x-cloak x-show="!letsEncryptEnabled">
|
||||
<div class="u-mb10">
|
||||
<label for="v_ssl_crt" class="form-label">
|
||||
<?= _("SSL Certificate") ?>
|
||||
<span x-cloak x-show="!letsEncryptEnabled" id="generate-csr" > / <a class="form-link" target="_blank" href="/generate/ssl/?domain=<?= htmlentities($v_domain) ?>"><?= _("Generate Self-Signed SSL Certificate") ?></a></span>
|
||||
</label>
|
||||
<textarea x-bind:disabled="letsEncryptEnabled" class="form-control u-min-height100 u-console" name="v_ssl_crt" id="v_ssl_crt"><?= htmlentities(trim($v_ssl_crt, "'")) ?></textarea>
|
||||
</div>
|
||||
<div class="u-mb10">
|
||||
<label for="v_ssl_key" class="form-label"><?= _("SSL Private Key") ?></label>
|
||||
<textarea x-bind:disabled="letsEncryptEnabled" class="form-control u-min-height100 u-console" name="v_ssl_key" id="v_ssl_key"><?= htmlentities(trim($v_ssl_key, "'")) ?></textarea>
|
||||
</div>
|
||||
<div class="u-mb20">
|
||||
<label for="v_ssl_ca" class="form-label">
|
||||
<?= _("SSL Certificate Authority / Intermediate") ?> <span class="optional">(<?= _("Optional") ?>)</span>
|
||||
</label>
|
||||
<textarea x-bind:disabled="letsEncryptEnabled" class="form-control u-min-height100 u-console" name="v_ssl_ca" id="v_ssl_ca"><?= htmlentities(trim($v_ssl_ca, "'")) ?></textarea>
|
||||
</div>
|
||||
</div>
|
||||
<?php if ($v_ssl != "no") { ?>
|
||||
<ul class="values-list">
|
||||
<li class="values-list-item">
|
||||
<span class="values-list-label"><?= _("Issued To") ?></span>
|
||||
<span class="values-list-value"><?= htmlentities($v_ssl_subject) ?></span>
|
||||
</li>
|
||||
<?php if ($v_ssl_aliases) { ?>
|
||||
<li class="values-list-item">
|
||||
<span class="values-list-label"><?= _("Alternate") ?></span>
|
||||
<span class="values-list-value"><?= htmlentities($v_ssl_aliases) ?></span>
|
||||
</li>
|
||||
<?php } ?>
|
||||
<li class="values-list-item">
|
||||
<span class="values-list-label"><?= _("Not Before") ?></span>
|
||||
<span class="values-list-value"><?= htmlentities($v_ssl_not_before) ?></span>
|
||||
</li>
|
||||
<li class="values-list-item">
|
||||
<span class="values-list-label"><?= _("Not After") ?></span>
|
||||
<span class="values-list-value"><?= htmlentities($v_ssl_not_after) ?></span>
|
||||
</li>
|
||||
<li class="values-list-item">
|
||||
<span class="values-list-label"><?= _("Signature") ?></span>
|
||||
<span class="values-list-value"><?= htmlentities($v_ssl_signature) ?></span>
|
||||
</li>
|
||||
<li class="values-list-item">
|
||||
<span class="values-list-label"><?= _("Key Size") ?></span>
|
||||
<span class="values-list-value"><?= htmlentities($v_ssl_pub_key) ?></span>
|
||||
</li>
|
||||
<li class="values-list-item">
|
||||
<span class="values-list-label"><?= _("Issued By") ?></span>
|
||||
<span class="values-list-value"><?= htmlentities($v_ssl_issuer) ?></span>
|
||||
</li>
|
||||
</ul>
|
||||
<?php } ?>
|
||||
</div>
|
||||
<div class="form-check u-mb10">
|
||||
<input x-model="hasSmtpRelay" class="form-check-input" type="checkbox" name="v_smtp_relay" id="v_smtp_relay">
|
||||
<label for="v_smtp_relay">
|
||||
<?= _("SMTP Relay") ?>
|
||||
</label>
|
||||
</div>
|
||||
<div x-cloak x-show="hasSmtpRelay" id="smtp_relay_table" class="u-pl30">
|
||||
<div class="u-mb10">
|
||||
<label for="v_smtp_relay_host" class="form-label"><?= _("Host") ?></label>
|
||||
<input type="text" class="form-control" name="v_smtp_relay_host" id="v_smtp_relay_host" value="<?= htmlentities(trim($v_smtp_relay_host, "'")) ?>">
|
||||
</div>
|
||||
<div class="u-mb10">
|
||||
<label for="v_smtp_relay_port" class="form-label"><?= _("Port") ?></label>
|
||||
<input type="text" class="form-control" name="v_smtp_relay_port" id="v_smtp_relay_port" value="<?= htmlentities(trim($v_smtp_relay_port, "'")) ?>">
|
||||
</div>
|
||||
<div class="u-mb10">
|
||||
<label for="v_smtp_relay_user" class="form-label"><?= _("Username") ?></label>
|
||||
<input type="text" class="form-control" name="v_smtp_relay_user" id="v_smtp_relay_user" value="<?= htmlentities(trim($v_smtp_relay_user, "'")) ?>">
|
||||
</div>
|
||||
<div class="u-mb10">
|
||||
<label for="v_smtp_relay_pass" class="form-label"><?= _("Password") ?></label>
|
||||
<input type="text" class="form-control" name="v_smtp_relay_pass" id="v_smtp_relay_pass">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
|
||||
</div>
|
||||
210
web/templates/pages/edit_mail_acc.php
Normal file
210
web/templates/pages/edit_mail_acc.php
Normal file
@@ -0,0 +1,210 @@
|
||||
<!-- Begin toolbar -->
|
||||
<div class="toolbar">
|
||||
<div class="toolbar-inner">
|
||||
<div class="toolbar-buttons">
|
||||
<a class="button button-secondary button-back js-button-back" href="/list/mail/?domain=<?= htmlentities(trim($v_domain, "'")) ?>&token=<?= $_SESSION["token"] ?>">
|
||||
<i class="fas fa-arrow-left icon-blue"></i><?= _("Back") ?>
|
||||
</a>
|
||||
</div>
|
||||
<div class="toolbar-buttons">
|
||||
<button type="submit" class="button" form="main-form">
|
||||
<i class="fas fa-floppy-disk icon-purple"></i><?= _("Save") ?>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- End toolbar -->
|
||||
|
||||
<div class="container">
|
||||
|
||||
<form
|
||||
x-data="{
|
||||
hasAutoReply: <?= $v_autoreply == "yes" ? "true" : "false" ?>
|
||||
}"
|
||||
id="main-form"
|
||||
name="v_edit_mail_acc"
|
||||
method="post"
|
||||
class="<?= $v_status ?>"
|
||||
>
|
||||
<input type="hidden" name="token" value="<?= $_SESSION["token"] ?>">
|
||||
<input type="hidden" name="save" value="save">
|
||||
|
||||
<div class="form-container form-container-wide">
|
||||
<h1 class="u-mb20"><?= _("Edit Mail Account") ?></h1>
|
||||
<?php show_alert_message($_SESSION); ?>
|
||||
<div class="sidebar-right-grid">
|
||||
<div class="sidebar-right-grid-content">
|
||||
<div class="u-mb10">
|
||||
<label for="v_email" class="form-label"><?= _("Account") ?></label>
|
||||
<input type="text" class="form-control" name="v_email" id="v_email" value="<?= htmlentities($_GET["account"]) . "@" . htmlentities($_GET["domain"]) ?>" disabled>
|
||||
<input type="hidden" name="v_domain" value="<?= htmlentities(trim($v_domain, "'")) ?>">
|
||||
<input type="hidden" name="v_account" value="<?= htmlentities(trim($v_account, "'")) ?>" class="js-account-input">
|
||||
</div>
|
||||
<div class="u-mb10">
|
||||
<label for="v_password" class="form-label">
|
||||
<?= _("Password") ?>
|
||||
<button type="button" title="<?= _("Generate") ?>" class="u-unstyled-button u-ml5 js-generate-password">
|
||||
<i class="fas fa-arrows-rotate icon-green"></i>
|
||||
</button>
|
||||
</label>
|
||||
<div class="u-pos-relative u-mb10">
|
||||
<input type="text" class="form-control js-password-input" name="v_password" id="v_password" value="<?= htmlentities(trim($v_password, "'")) ?>">
|
||||
<div class="password-meter">
|
||||
<meter max="4" class="password-meter-input js-password-meter"></meter>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<p class="u-mb10"><?= _("Your password must have at least") ?>:</p>
|
||||
<ul class="u-list-bulleted u-mb20">
|
||||
<li><?= _("8 characters long") ?></li>
|
||||
<li><?= _("1 uppercase & 1 lowercase character") ?></li>
|
||||
<li><?= _("1 number") ?></li>
|
||||
</ul>
|
||||
<div class="u-mb10">
|
||||
<label for="v_send_email" class="form-label">
|
||||
<?= _("Email login credentials to:") ?>
|
||||
</label>
|
||||
<input type="email" class="form-control" name="v_send_email" id="v_send_email" value="<?= htmlentities(trim($v_send_email, "'")) ?>">
|
||||
</div>
|
||||
<div class="u-mb10">
|
||||
<label for="v_quota" class="form-label">
|
||||
<?= _("Quota") ?> <span class="optional">(<?= _("in MB") ?>)</span>
|
||||
</label>
|
||||
<div class="u-pos-relative">
|
||||
<input type="text" class="form-control" name="v_quota" id="v_quota" value="<?php if (!empty($v_quota)) {echo htmlentities(trim($v_quota, "'"));} else { echo "0"; } ?>">
|
||||
<button type="button" class="unlimited-toggle js-unlimited-toggle" title="<?= _("Unlimited") ?>">
|
||||
<i class="fas fa-infinity"></i>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="u-mb10">
|
||||
<label for="v_aliases" class="form-label">
|
||||
<?= _("Aliases") ?> <span class="optional">(<?= _("Use local-part without domain name") ?>)</span>
|
||||
</label>
|
||||
<textarea class="form-control" name="v_aliases" id="v_aliases"><?= htmlentities(trim($v_aliases, "'")) ?></textarea>
|
||||
</div>
|
||||
<div class="form-check">
|
||||
<input class="form-check-input js-discard-all-mail" type="checkbox" name="v_blackhole" id="v_blackhole" <?php if ($v_blackhole == 'yes') echo 'checked' ?>>
|
||||
<label for="v_blackhole">
|
||||
<?= _("Discard all mail") ?>
|
||||
</label>
|
||||
</div>
|
||||
<div class="form-check <?php if ($v_blackhole == 'yes') { echo 'u-hidden'; } ?>">
|
||||
<input class="form-check-input" type="checkbox" name="v_fwd_only" id="v_fwd_for" <?php if ($v_fwd_only == 'yes') echo 'checked' ?>>
|
||||
<label for="v_fwd_for">
|
||||
<?= _("Do not store forwarded mail") ?>
|
||||
</label>
|
||||
</div>
|
||||
<div class="u-mb10">
|
||||
<label for="v_fwd" class="form-label">
|
||||
<?= _("Forward to") ?> <span class="optional">(<?= _("one or more email addresses") ?>)</span>
|
||||
</label>
|
||||
<textarea class="form-control" name="v_fwd" id="v_fwd" <?php if ($v_blackhole == 'yes') echo "disabled"; ?>><?= htmlentities(trim($v_fwd, "'")) ?></textarea>
|
||||
</div>
|
||||
<div class="form-check u-mb10">
|
||||
<input x-model="hasAutoReply" class="form-check-input" type="checkbox" name="v_autoreply" id="v_autoreply">
|
||||
<label for="v_autoreply">
|
||||
<?= _("Auto Reply") ?>
|
||||
</label>
|
||||
</div>
|
||||
<div x-cloak x-show="hasAutoReply" id="autoreplytable">
|
||||
<div class="u-mb10">
|
||||
<label for="v_autoreply_message" class="form-label"><?= _("Message") ?></label>
|
||||
<textarea class="form-control" name="v_autoreply_message" id="v_autoreply_message"><?= htmlentities(trim($v_autoreply_message, "'")) ?></textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div class="u-mb20">
|
||||
<label for="v_rate" class="form-label">
|
||||
<?= _("Rate Limit") ?> <span class="optional">(<?= _("email / hour") ?>)</span>
|
||||
</label>
|
||||
<input type="text" class="form-control" name="v_rate" id="v_rate" value="<?= htmlentities(trim($v_rate, "'")) ?>" <?php if ($_SESSION['userContext'] != "admin"){ echo "disabled"; }?>>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sidebar-right-grid-sidebar">
|
||||
<div class="panel js-mail-info">
|
||||
<h2 class="u-text-H3 u-mb10"><?= _("Common Account Settings") ?></h2>
|
||||
<ul class="values-list u-mb20">
|
||||
<li class="values-list-item">
|
||||
<span class="values-list-label"><?= _("Username") ?></span>
|
||||
<span class="values-list-value u-overflow"><span class="js-account-output"></span>@<?= htmlentities(trim($v_domain, "'")) ?></span>
|
||||
</li>
|
||||
<li class="values-list-item">
|
||||
<span class="values-list-label"><?= _("Password") ?></span>
|
||||
<span class="values-list-value u-overflow"><span class="js-password-output"></span></span>
|
||||
</li>
|
||||
<?php if ($_SESSION["WEBMAIL_SYSTEM"]) { ?>
|
||||
<li class="values-list-item">
|
||||
<span class="values-list-label"><?= _("Webmail") ?></span>
|
||||
<span class="values-list-value"><a href="http://<?= htmlentities($v_webmail_alias) ?>" target="_blank">http://<?= htmlentities($v_webmail_alias) ?></a></span>
|
||||
</li>
|
||||
<?php } ?>
|
||||
<li class="values-list-item">
|
||||
<span class="values-list-label"><?= _("Hostname") ?></span>
|
||||
<span class="values-list-value">mail.<?= htmlentities($v_domain) ?></span>
|
||||
</li>
|
||||
</ul>
|
||||
<h2 class="u-text-H3 u-mb10"><?= _("IMAP Settings") ?></h2>
|
||||
<ul class="values-list u-mb20">
|
||||
<li class="values-list-item">
|
||||
<span class="values-list-label"><?= _("Authentication") ?></span>
|
||||
<span class="values-list-value"><?= _("Normal password") ?></span>
|
||||
</li>
|
||||
<li class="values-list-item">
|
||||
<span class="values-list-label">SSL/TLS</span>
|
||||
<span class="values-list-value"><?= _("Port") ?> 993</span>
|
||||
</li>
|
||||
<li class="values-list-item">
|
||||
<span class="values-list-label">STARTTLS</span>
|
||||
<span class="values-list-value"><?= _("Port") ?> 143</span>
|
||||
</li>
|
||||
<li class="values-list-item">
|
||||
<span class="values-list-label"><?= _("No encryption") ?></span>
|
||||
<span class="values-list-value"><?= _("Port") ?> 143</span>
|
||||
</li>
|
||||
</ul>
|
||||
<h2 class="u-text-H3 u-mb10"><?= _("POP3 Settings") ?></h2>
|
||||
<ul class="values-list u-mb20">
|
||||
<li class="values-list-item">
|
||||
<span class="values-list-label"><?= _("Authentication") ?></span>
|
||||
<span class="values-list-value"><?= _("Normal password") ?></span>
|
||||
</li>
|
||||
<li class="values-list-item">
|
||||
<span class="values-list-label">SSL/TLS</span>
|
||||
<span class="values-list-value"><?= _("Port") ?> 995</span>
|
||||
</li>
|
||||
<li class="values-list-item">
|
||||
<span class="values-list-label">STARTTLS</span>
|
||||
<span class="values-list-value"><?= _("Port") ?> 110</span>
|
||||
</li>
|
||||
<li class="values-list-item">
|
||||
<span class="values-list-label"><?= _("No encryption") ?></span>
|
||||
<span class="values-list-value"><?= _("Port") ?> 110</span>
|
||||
</li>
|
||||
</ul>
|
||||
<h2 class="u-text-H3 u-mb10"><?= _("SMTP Settings") ?></h2>
|
||||
<ul class="values-list">
|
||||
<li class="values-list-item">
|
||||
<span class="values-list-label"><?= _("Authentication") ?></span>
|
||||
<span class="values-list-value"><?= _("Normal password") ?></span>
|
||||
</li>
|
||||
<li class="values-list-item">
|
||||
<span class="values-list-label">SSL/TLS</span>
|
||||
<span class="values-list-value"><?= _("Port") ?> 465</span>
|
||||
</li>
|
||||
<li class="values-list-item">
|
||||
<span class="values-list-label">STARTTLS</span>
|
||||
<span class="values-list-value"><?= _("Port") ?> 587</span>
|
||||
</li>
|
||||
<li class="values-list-item">
|
||||
<span class="values-list-label"><?= _("No encryption") ?></span>
|
||||
<span class="values-list-value"><?= _("Port") ?> 25</span>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
|
||||
</div>
|
||||
338
web/templates/pages/edit_package.php
Normal file
338
web/templates/pages/edit_package.php
Normal file
@@ -0,0 +1,338 @@
|
||||
<!-- Begin toolbar -->
|
||||
<div class="toolbar">
|
||||
<div class="toolbar-inner">
|
||||
<div class="toolbar-buttons">
|
||||
<a class="button button-secondary button-back js-button-back" href="/list/package/">
|
||||
<i class="fas fa-arrow-left icon-blue"></i><?= _("Back") ?>
|
||||
</a>
|
||||
</div>
|
||||
<div class="toolbar-buttons">
|
||||
<button type="submit" class="button" form="main-form">
|
||||
<i class="fas fa-floppy-disk icon-purple"></i><?= _("Save") ?>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- End toolbar -->
|
||||
|
||||
<div class="container">
|
||||
|
||||
<form
|
||||
x-data="{
|
||||
showWebOptions: false,
|
||||
showDnsOptions: false,
|
||||
showMailOptions: false,
|
||||
showDatabaseOptions: false,
|
||||
showSystemOptions: false,
|
||||
}"
|
||||
id="main-form"
|
||||
name="v_edit_package"
|
||||
method="post"
|
||||
class="<?= $v_status ?>"
|
||||
>
|
||||
<input type="hidden" name="token" value="<?= $_SESSION["token"] ?>">
|
||||
<input type="hidden" name="save" value="save">
|
||||
|
||||
<div class="form-container">
|
||||
<h1 class="u-mb20"><?= _("Edit Package") ?></h1>
|
||||
<?php show_alert_message($_SESSION); ?>
|
||||
<div class="u-mb10">
|
||||
<label for="v_package_new" class="form-label"><?= _("Package Name") ?></label>
|
||||
<input type="text" class="form-control" name="v_package_new" id="v_package_new" value="<?= htmlentities(trim($v_package_new, "'")) ?>" required>
|
||||
<input type="hidden" name="v_package" value="<?= htmlentities(trim($v_package, "'")) ?>">
|
||||
</div>
|
||||
<div class="u-mb10">
|
||||
<label for="v_disk_quota" class="form-label">
|
||||
<?= _("Quota") ?> <span class="optional">(<?= _("in MB") ?>)</span>
|
||||
</label>
|
||||
<div class="u-pos-relative">
|
||||
<input type="text" class="form-control" name="v_disk_quota" id="v_disk_quota" value="<?= htmlentities(trim($v_disk_quota, "'")) ?>">
|
||||
<button type="button" class="unlimited-toggle js-unlimited-toggle" title="<?= _("Unlimited") ?>">
|
||||
<i class="fas fa-infinity"></i>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="u-mb10">
|
||||
<label for="v_bandwidth" class="form-label">
|
||||
<?= _("Bandwidth") ?> <span class="optional">(<?= _("in MB") ?>)</span>
|
||||
</label>
|
||||
<div class="u-pos-relative">
|
||||
<input type="text" class="form-control" name="v_bandwidth" id="v_bandwidth" value="<?= htmlentities(trim($v_bandwidth, "'")) ?>">
|
||||
<button type="button" class="unlimited-toggle js-unlimited-toggle" title="<?= _("Unlimited") ?>">
|
||||
<i class="fas fa-infinity"></i>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="u-mb10">
|
||||
<label for="v_backups" class="form-label"><?= _("Backups") ?></label>
|
||||
<input type="text" class="form-control" name="v_backups" id="v_backups" value="<?= htmlentities(trim($v_backups, "'")) ?>">
|
||||
</div>
|
||||
<h2 x-on:click="showWebOptions = !showWebOptions" class="section-title">
|
||||
<?= _("WEB") ?>
|
||||
<i
|
||||
x-bind:class="showWebOptions ? 'fa-square-minus' : 'fa-square-plus'"
|
||||
class="fas icon-dim icon-maroon js-section-toggle-icon"
|
||||
></i>
|
||||
</h2>
|
||||
<div x-cloak x-show="showWebOptions" id="web-options">
|
||||
<div class="u-mt15 u-mb10">
|
||||
<label for="v_web_domains" class="form-label"><?= _("Web Domains") ?></label>
|
||||
<div class="u-pos-relative">
|
||||
<input type="text" class="form-control" name="v_web_domains" id="v_web_domains" value="<?= htmlentities(trim($v_web_domains, "'")) ?>">
|
||||
<button type="button" class="unlimited-toggle js-unlimited-toggle" title="<?= _("Unlimited") ?>">
|
||||
<i class="fas fa-infinity"></i>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="u-mb10">
|
||||
<label for="v_web_aliases" class="form-label">
|
||||
<?= _("Web Aliases") ?> <span class="optional">(<?= _("per domain") ?>)</span>
|
||||
</label>
|
||||
<div class="u-pos-relative">
|
||||
<input type="text" class="form-control" name="v_web_aliases" id="v_web_aliases" value="<?= htmlentities(trim($v_web_aliases, "'")) ?>">
|
||||
<button type="button" class="unlimited-toggle js-unlimited-toggle" title="<?= _("Unlimited") ?>">
|
||||
<i class="fas fa-infinity"></i>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="u-mb10">
|
||||
<label for="v_web_template" class="form-label">
|
||||
<?= _("Web Template") . " <span class='optional'> " . strtoupper($_SESSION["WEB_SYSTEM"]) . "</span>" ?>
|
||||
</label>
|
||||
<select class="form-select" name="v_web_template" id="v_web_template">
|
||||
<?php
|
||||
foreach ($web_templates as $key => $value) {
|
||||
echo "\t\t\t\t<option value=\"".htmlentities($value)."\"";
|
||||
if ((!empty($v_web_template)) && ( $value == trim($v_web_template, "'"))){
|
||||
echo ' selected' ;
|
||||
}
|
||||
echo ">".htmlentities($value)."</option>\n";
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
</div>
|
||||
<?php if (!empty($_SESSION['WEB_BACKEND'])) { echo ""; ?>
|
||||
<div class="u-mb10">
|
||||
<label for="v_backend_template" class="form-label">
|
||||
<?= _("Backend Template") . "<span class='optional'>" . strtoupper($_SESSION["WEB_BACKEND"]) . "</span>" ?>
|
||||
</label>
|
||||
<select class="form-select" name="v_backend_template" id="v_backend_template">
|
||||
<?php
|
||||
foreach ($backend_templates as $key => $value) {
|
||||
echo "\t\t\t\t<option value=\"".$value."\"";
|
||||
if ((!empty($v_backend_template)) && ( $value == trim($v_backend_template, "'"))){
|
||||
echo ' selected' ;
|
||||
}
|
||||
echo ">".htmlentities($value)."</option>\n";
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
</div>
|
||||
<?=""; }?>
|
||||
<?php if (!empty($_SESSION['PROXY_SYSTEM'])) { echo ""; ?>
|
||||
<div class="u-mb10">
|
||||
<label for="v_proxy_template" class="form-label">
|
||||
<?= _("Proxy Template") . "<span class='optional'>" . strtoupper($_SESSION["PROXY_SYSTEM"]) . "</span>" ?>
|
||||
</label>
|
||||
<select class="form-select" name="v_proxy_template" id="v_proxy_template">
|
||||
<?php
|
||||
foreach ($proxy_templates as $key => $value) {
|
||||
echo "\t\t\t\t<option value=\"".htmlentities($value)."\"";
|
||||
if ((!empty($v_proxy_template)) && ( $value == trim($v_proxy_template, "'"))){
|
||||
echo ' selected' ;
|
||||
}
|
||||
echo ">".htmlentities($value)."</option>\n";
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
</div>
|
||||
<?=""; }?>
|
||||
</div>
|
||||
<h2 x-on:click="showDnsOptions = !showDnsOptions" class="section-title">
|
||||
<?= _("DNS") ?>
|
||||
<i
|
||||
x-bind:class="showDnsOptions ? 'fa-square-minus' : 'fa-square-plus'"
|
||||
class="fas icon-dim icon-maroon js-section-toggle-icon"
|
||||
></i>
|
||||
</h2>
|
||||
<div x-cloak x-show="showDnsOptions" id="dns-options">
|
||||
<div class="u-mt15 u-mb10">
|
||||
<label for="v_dns_template" class="form-label">
|
||||
<?= _("DNS Template") . "<span class='optional'>" . strtoupper($_SESSION["DNS_SYSTEM"]) . "</span>" ?>
|
||||
</label>
|
||||
<select class="form-select" name="v_dns_template" id="v_dns_template">
|
||||
<?php
|
||||
foreach ($dns_templates as $key => $value) {
|
||||
echo "\t\t\t\t<option value=\"".htmlentities($value)."\"";
|
||||
if ((!empty($v_dns_template)) && ( $value == $v_dns_template)){
|
||||
echo ' selected' ;
|
||||
}
|
||||
if ((!empty($v_dns_template)) && ( $value == trim($v_dns_template, "'"))){
|
||||
echo ' selected' ;
|
||||
}
|
||||
echo ">".htmlentities($value)."</option>\n";
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
</div>
|
||||
<div class="u-mb10">
|
||||
<label for="v_dns_domains" class="form-label"><?= _("DNS Zones") ?></label>
|
||||
<div class="u-pos-relative">
|
||||
<input type="text" class="form-control" name="v_dns_domains" id="v_dns_domains" value="<?= htmlentities(trim($v_dns_domains, "'")) ?>">
|
||||
<button type="button" class="unlimited-toggle js-unlimited-toggle" title="<?= _("Unlimited") ?>">
|
||||
<i class="fas fa-infinity"></i>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="u-mb10">
|
||||
<label for="v_dns_records" class="form-label">
|
||||
<?= _("DNS Records") ?> <span class="optional">(<?= _("per domain") ?>)</span>
|
||||
</label>
|
||||
<div class="u-pos-relative">
|
||||
<input type="text" class="form-control" name="v_dns_records" id="v_dns_records" value="<?= htmlentities(trim($v_dns_records, "'")) ?>">
|
||||
<button type="button" class="unlimited-toggle js-unlimited-toggle" title="<?= _("Unlimited") ?>">
|
||||
<i class="fas fa-infinity"></i>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<?php if (isset($_SESSION["DNS_SYSTEM"]) && !empty($_SESSION["DNS_SYSTEM"])) { ?>
|
||||
<p class="form-label u-mb10"><?= _("Name Servers") ?></p>
|
||||
<div class="u-mb5">
|
||||
<input type="text" class="form-control" name="v_ns1" value="<?= htmlentities(trim($v_ns1, "'")) ?>">
|
||||
</div>
|
||||
<div class="u-mb5">
|
||||
<input type="text" class="form-control" name="v_ns2" value="<?= htmlentities(trim($v_ns2, "'")) ?>">
|
||||
</div>
|
||||
<?php
|
||||
if ($v_ns3) {
|
||||
echo '<div class="u-side-by-side u-mb5">
|
||||
<input type="text" class="form-control" name="v_ns3" value="'.htmlentities(trim($v_ns3, "'")).'">
|
||||
<span class="u-ml10 js-remove-ns"><i class="fas fa-trash icon-dim icon-red"></i></span>
|
||||
</div>';
|
||||
}
|
||||
if ($v_ns4) {
|
||||
echo '<div class="u-side-by-side u-mb5">
|
||||
<input type="text" class="form-control" name="v_ns4" value="'.htmlentities(trim($v_ns4, "'")).'">
|
||||
<span class="u-ml10 js-remove-ns"><i class="fas fa-trash icon-dim icon-red"></i></span>
|
||||
</div>';
|
||||
}
|
||||
if ($v_ns5) {
|
||||
echo '<div class="u-side-by-side u-mb5">
|
||||
<input type="text" class="form-control" name="v_ns5" value="'.htmlentities(trim($v_ns5, "'")).'">
|
||||
<span class="u-ml10 js-remove-ns"><i class="fas fa-trash icon-dim icon-red"></i></span>
|
||||
</div>';
|
||||
}
|
||||
if ($v_ns6) {
|
||||
echo '<div class="u-side-by-side u-mb5">
|
||||
<input type="text" class="form-control" name="v_ns6" value="'.htmlentities(trim($v_ns6, "'")).'">
|
||||
<span class="u-ml10 js-remove-ns"><i class="fas fa-trash icon-dim icon-red"></i></span>
|
||||
</div>';
|
||||
}
|
||||
if ($v_ns7) {
|
||||
echo '<div class="u-side-by-side u-mb5">
|
||||
<input type="text" class="form-control" name="v_ns7" value="'.htmlentities(trim($v_ns7, "'")).'">
|
||||
<span class="u-ml10 js-remove-ns"><i class="fas fa-trash icon-dim icon-red"></i></span>
|
||||
</div>';
|
||||
}
|
||||
if ($v_ns8) {
|
||||
echo '<div class="u-side-by-side u-mb5">
|
||||
<input type="text" class="form-control" name="v_ns8" value="'.htmlentities(trim($v_ns8, "'")).'">
|
||||
<span class="u-ml10 js-remove-ns"><i class="fas fa-trash icon-dim icon-red"></i></span>
|
||||
</div>';
|
||||
}
|
||||
?>
|
||||
<button type="button" class="form-link u-mt20 js-add-ns" <?php if ($v_ns8) echo 'style="display:none;"'; ?>>
|
||||
<?= _("Add Name Server") ?>
|
||||
</button>
|
||||
<?php } ?>
|
||||
</div>
|
||||
<h2 x-on:click="showMailOptions = !showMailOptions" class="section-title">
|
||||
<?= _("MAIL") ?>
|
||||
<i
|
||||
x-bind:class="showMailOptions ? 'fa-square-minus' : 'fa-square-plus'"
|
||||
class="fas icon-dim icon-maroon js-section-toggle-icon"
|
||||
></i>
|
||||
</h2>
|
||||
<div x-cloak x-show="showMailOptions" id="mail-options">
|
||||
<div class="u-mt15 u-mb10">
|
||||
<label for="v_mail_domains" class="form-label"><?= _("Mail Domains") ?></label>
|
||||
<div class="u-pos-relative">
|
||||
<input type="text" class="form-control" name="v_mail_domains" id="v_mail_domains" value="<?= htmlentities(trim($v_mail_domains, "'")) ?>">
|
||||
<button type="button" class="unlimited-toggle js-unlimited-toggle" title="<?= _("Unlimited") ?>">
|
||||
<i class="fas fa-infinity"></i>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="u-mb10">
|
||||
<label for="v_mail_accounts" class="form-label">
|
||||
<?= _("Mail Accounts") ?> <span class="optional">(<?= _("per domain") ?>)</span>
|
||||
</label>
|
||||
<div class="u-pos-relative">
|
||||
<input type="text" class="form-control" name="v_mail_accounts" id="v_mail_accounts" value="<?= htmlentities(trim($v_mail_accounts, "'")) ?>">
|
||||
<button type="button" class="unlimited-toggle js-unlimited-toggle" title="<?= _("Unlimited") ?>">
|
||||
<i class="fas fa-infinity"></i>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="u-mb10">
|
||||
<label for="v_ratelimit" class="form-label">
|
||||
<?= _("Rate Limit") ?> <span class="optional">(<?= _("per account / hour") ?>)</span>
|
||||
</label>
|
||||
<input type="text" class="form-control" name="v_ratelimit" id="v_ratelimit" value="<?= htmlentities(trim($v_ratelimit, "'")) ?>">
|
||||
</div>
|
||||
</div>
|
||||
<h2 x-on:click="showDatabaseOptions = !showDatabaseOptions" class="section-title">
|
||||
<?= _("DB") ?>
|
||||
<i
|
||||
x-bind:class="showDatabaseOptions ? 'fa-square-minus' : 'fa-square-plus'"
|
||||
class="fas icon-dim icon-maroon js-section-toggle-icon"
|
||||
></i>
|
||||
</h2>
|
||||
<div x-cloak x-show="showDatabaseOptions" id="database-options">
|
||||
<div class="u-mt15 u-mb10">
|
||||
<label for="v_databases" class="form-label"><?= _("Databases") ?></label>
|
||||
<div class="u-pos-relative">
|
||||
<input type="text" class="form-control" name="v_databases" id="v_databases" value="<?= htmlentities(trim($v_databases, "'")) ?>">
|
||||
<button type="button" class="unlimited-toggle js-unlimited-toggle" title="<?= _("Unlimited") ?>">
|
||||
<i class="fas fa-infinity"></i>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<h2 x-on:click="showSystemOptions = !showSystemOptions" class="section-title">
|
||||
<?= _("System") ?>
|
||||
<i
|
||||
x-bind:class="showSystemOptions ? 'fa-square-minus' : 'fa-square-plus'"
|
||||
class="fas icon-dim icon-maroon js-section-toggle-icon"
|
||||
></i>
|
||||
</h2>
|
||||
<div x-cloak x-show="showSystemOptions" id="system-options">
|
||||
<div class="u-mt15 u-mb10">
|
||||
<label for="v_cron_jobs" class="form-label"><?= _("Cron Jobs") ?></label>
|
||||
<div class="u-pos-relative">
|
||||
<input type="text" class="form-control" name="v_cron_jobs" id="v_cron_jobs" value="<?= htmlentities(trim($v_cron_jobs, "'")) ?>">
|
||||
<button type="button" class="unlimited-toggle js-unlimited-toggle" title="<?= _("Unlimited") ?>">
|
||||
<i class="fas fa-infinity"></i>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<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): ?>
|
||||
<option value="<?= htmlentities($value) ?>"
|
||||
<?php if (!empty($v_shell) && $value == trim($v_shell, "''")): ?>
|
||||
selected
|
||||
<?php endif; ?>
|
||||
>
|
||||
<?= htmlentities($value) ?>
|
||||
</option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
|
||||
</div>
|
||||
1425
web/templates/pages/edit_server.php
Normal file
1425
web/templates/pages/edit_server.php
Normal file
File diff suppressed because it is too large
Load Diff
45
web/templates/pages/edit_server_bind9.php
Normal file
45
web/templates/pages/edit_server_bind9.php
Normal file
@@ -0,0 +1,45 @@
|
||||
<!-- Begin toolbar -->
|
||||
<div class="toolbar">
|
||||
<div class="toolbar-inner">
|
||||
<div class="toolbar-buttons">
|
||||
<a class="button button-secondary button-back js-button-back" href="/list/server/">
|
||||
<i class="fas fa-arrow-left icon-blue"></i><?= _("Back") ?>
|
||||
</a>
|
||||
</div>
|
||||
<div class="toolbar-buttons">
|
||||
<button type="submit" class="button" form="main-form">
|
||||
<i class="fas fa-floppy-disk icon-purple"></i><?= _("Save") ?>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- End toolbar -->
|
||||
|
||||
<div class="container">
|
||||
|
||||
<form id="main-form" name="v_configure_server" method="post">
|
||||
<input type="hidden" name="token" value="<?= $_SESSION["token"] ?>">
|
||||
<input type="hidden" name="save" value="save">
|
||||
|
||||
<div class="form-container">
|
||||
<h1 class="u-mb20"><?= _("Configure Server") ?>: <?= $v_service_name ?></h1>
|
||||
<?php show_alert_message($_SESSION); ?>
|
||||
<div class="u-mb20">
|
||||
<label for="v_options" class="form-label"><?= $v_options_path ?></label>
|
||||
<textarea class="form-control u-min-height300 u-allow-resize u-console" name="v_options" id="v_options"><?= $v_options ?></textarea>
|
||||
</div>
|
||||
<div class="u-mb20">
|
||||
<label for="v_config" class="form-label"><?= $v_config_path ?></label>
|
||||
<textarea class="form-control u-min-height300 u-allow-resize u-console" name="v_config" id="v_config"><?= $v_config ?></textarea>
|
||||
</div>
|
||||
<div class="form-check">
|
||||
<input class="form-check-input" type="checkbox" name="v_restart" id="v_restart" checked>
|
||||
<label for="v_restart">
|
||||
<?= _("Restart") ?>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
|
||||
</div>
|
||||
75
web/templates/pages/edit_server_dovecot.php
Normal file
75
web/templates/pages/edit_server_dovecot.php
Normal file
@@ -0,0 +1,75 @@
|
||||
<!-- Begin toolbar -->
|
||||
<div class="toolbar">
|
||||
<div class="toolbar-inner">
|
||||
<div class="toolbar-buttons">
|
||||
<a class="button button-secondary button-back js-button-back" href="/list/server/">
|
||||
<i class="fas fa-arrow-left icon-blue"></i><?= _("Back") ?>
|
||||
</a>
|
||||
</div>
|
||||
<div class="toolbar-buttons">
|
||||
<button type="submit" class="button" form="main-form">
|
||||
<i class="fas fa-floppy-disk icon-purple"></i><?= _("Save") ?>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- End toolbar -->
|
||||
|
||||
<div class="container">
|
||||
|
||||
<form id="main-form" name="v_configure_server" method="post">
|
||||
<input type="hidden" name="token" value="<?= $_SESSION["token"] ?>">
|
||||
<input type="hidden" name="save" value="save">
|
||||
|
||||
<div class="form-container">
|
||||
<h1 class="u-mb20"><?= _("Configure Server") ?>: <?= $v_service_name ?></h1>
|
||||
<?php show_alert_message($_SESSION); ?>
|
||||
<div class="u-mb20">
|
||||
<label for="v_config" class="form-label"><?= $v_config_path ?></label>
|
||||
<textarea class="form-control u-min-height300 u-allow-resize u-console" name="v_config" id="v_config"><?= $v_config ?></textarea>
|
||||
</div>
|
||||
<?php if (!empty($v_config_path1)) { ?>
|
||||
<div class="u-mb20">
|
||||
<label for="v_config1" class="form-label"><?= $v_config_path1 ?></label>
|
||||
<textarea class="form-control u-min-height300 u-allow-resize u-console" name="v_config1" id="v_config1"><?= $v_config1 ?></textarea>
|
||||
</div>
|
||||
<div class="u-mb20">
|
||||
<label for="v_config2" class="form-label"><?= $v_config_path2 ?></label>
|
||||
<textarea class="form-control u-min-height300 u-allow-resize u-console" name="v_config2" id="v_config2"><?= $v_config2 ?></textarea>
|
||||
</div>
|
||||
<div class="u-mb20">
|
||||
<label for="v_config3" class="form-label"><?= $v_config_path3 ?></label>
|
||||
<textarea class="form-control u-min-height300 u-allow-resize u-console" name="v_config3" id="v_config3"><?= $v_config3 ?></textarea>
|
||||
</div>
|
||||
<div class="u-mb20">
|
||||
<label for="v_config4" class="form-label"><?= $v_config_path4 ?></label>
|
||||
<textarea class="form-control u-min-height300 u-allow-resize u-console" name="v_config4" id="v_config4"><?= $v_config4 ?></textarea>
|
||||
</div>
|
||||
<div class="u-mb20">
|
||||
<label for="v_config5" class="form-label"><?= $v_config_path5 ?></label>
|
||||
<textarea class="form-control u-min-height300 u-allow-resize u-console" name="v_config5" id="v_config5"><?= $v_config5 ?></textarea>
|
||||
</div>
|
||||
<div class="u-mb20">
|
||||
<label for="v_config6" class="form-label"><?= $v_config_path6 ?></label>
|
||||
<textarea class="form-control u-min-height300 u-allow-resize u-console" name="v_config6" id="v_config6"><?= $v_config6 ?></textarea>
|
||||
</div>
|
||||
<div class="u-mb20">
|
||||
<label for="v_config7" class="form-label"><?= $v_config_path7 ?></label>
|
||||
<textarea class="form-control u-min-height300 u-allow-resize u-console" name="v_config7" id="v_config7"><?= $v_config7 ?></textarea>
|
||||
</div>
|
||||
<div class="u-mb20">
|
||||
<label for="v_config8" class="form-label"><?= $v_config_path8 ?></label>
|
||||
<textarea class="form-control u-min-height300 u-allow-resize u-console" name="v_config8" id="v_config8"><?= $v_config8 ?></textarea>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<div class="form-check">
|
||||
<input class="form-check-input" type="checkbox" name="v_restart" id="v_restart" checked>
|
||||
<label for="v_restart">
|
||||
<?= _("Restart") ?>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
|
||||
</div>
|
||||
44
web/templates/pages/edit_server_httpd.php
Normal file
44
web/templates/pages/edit_server_httpd.php
Normal file
@@ -0,0 +1,44 @@
|
||||
<!-- Begin toolbar -->
|
||||
<div class="toolbar">
|
||||
<div class="toolbar-inner">
|
||||
<div class="toolbar-buttons">
|
||||
<a class="button button-secondary button-back js-button-back" href="/list/server/">
|
||||
<i class="fas fa-arrow-left icon-blue"></i><?= _("Back") ?>
|
||||
</a>
|
||||
<a href="/edit/server/php/" class="button button-secondary">
|
||||
<i class="fas fa-pencil icon-orange"></i><?= _("Configure") ?> PHP
|
||||
</a>
|
||||
</div>
|
||||
<div class="toolbar-buttons">
|
||||
<button type="submit" class="button" form="main-form">
|
||||
<i class="fas fa-floppy-disk icon-purple"></i><?= _("Save") ?>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- End toolbar -->
|
||||
|
||||
<div class="container">
|
||||
|
||||
<form id="main-form" name="v_configure_server" method="post">
|
||||
<input type="hidden" name="token" value="<?= $_SESSION["token"] ?>">
|
||||
<input type="hidden" name="save" value="save">
|
||||
|
||||
<div class="form-container">
|
||||
<h1 class="u-mb20"><?= _("Configure Server") ?>: <?= $v_service_name ?></h1>
|
||||
<?php show_alert_message($_SESSION); ?>
|
||||
<div class="u-mb20">
|
||||
<label for="v_config" class="form-label"><?= $v_config_path ?></label>
|
||||
<textarea class="form-control u-min-height300 u-allow-resize u-console" name="v_config" id="v_config"><?= $v_config ?></textarea>
|
||||
</div>
|
||||
<div class="form-check">
|
||||
<input class="form-check-input" type="checkbox" name="v_restart" id="v_restart" checked>
|
||||
<label for="v_restart">
|
||||
<?= _("Restart") ?>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
|
||||
</div>
|
||||
75
web/templates/pages/edit_server_mysql.php
Normal file
75
web/templates/pages/edit_server_mysql.php
Normal file
@@ -0,0 +1,75 @@
|
||||
<!-- Begin toolbar -->
|
||||
<div class="toolbar">
|
||||
<div class="toolbar-inner">
|
||||
<div class="toolbar-buttons">
|
||||
<a class="button button-secondary button-back js-button-back" href="/list/server/">
|
||||
<i class="fas fa-arrow-left icon-blue"></i><?= _("Back") ?>
|
||||
</a>
|
||||
</div>
|
||||
<div class="toolbar-buttons">
|
||||
<button type="submit" class="button" form="main-form">
|
||||
<i class="fas fa-floppy-disk icon-purple"></i><?= _("Save") ?>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- End toolbar -->
|
||||
|
||||
<div class="container">
|
||||
|
||||
<form id="main-form" name="v_configure_server" method="post">
|
||||
<input type="hidden" name="token" value="<?= $_SESSION["token"] ?>">
|
||||
<input type="hidden" name="save" value="save">
|
||||
|
||||
<div class="form-container">
|
||||
<h1 class="u-mb20"><?= _("Configure Server") ?>: <?= $v_service_name ?></h1>
|
||||
<?php show_alert_message($_SESSION); ?>
|
||||
<div class="js-basic-options">
|
||||
<div class="u-mb10">
|
||||
<label for="v_max_connections" class="form-label">max_connections</label>
|
||||
<input type="text" class="form-control" data-regexp="max_connections" data-prev-value="<?= htmlentities($v_max_connections) ?>" name="v_max_connections" id="v_max_connections" value="<?= htmlentities($v_max_connections) ?>">
|
||||
</div>
|
||||
<div class="u-mb10">
|
||||
<label for="v_max_user_connections" class="form-label">max_user_connections</label>
|
||||
<input type="text" class="form-control" data-regexp="max_user_connections" data-prev-value="<?= htmlentities($v_max_user_connections) ?>" name="v_max_user_connections" id="v_max_user_connections" value="<?= htmlentities($v_max_user_connections) ?>">
|
||||
</div>
|
||||
<div class="u-mb10">
|
||||
<label for="v_wait_timeout" class="form-label">wait_timeout</label>
|
||||
<input type="text" class="form-control" data-regexp="wait_timeout" data-prev-value="<?= htmlentities($v_wait_timeout) ?>" name="v_wait_timeout" id="v_wait_timeout" value="<?= htmlentities($v_wait_timeout) ?>">
|
||||
</div>
|
||||
<div class="u-mb10">
|
||||
<label for="v_interactive_timeout" class="form-label">interactive_timeout</label>
|
||||
<input type="text" class="form-control" data-regexp="interactive_timeout" data-prev-value="<?= htmlentities($v_interactive_timeout) ?>" name="v_interactive_timeout" id="v_interactive_timeout" value="<?= htmlentities($v_interactive_timeout) ?>">
|
||||
</div>
|
||||
<div class="u-mb20">
|
||||
<label for="v_display_errors" class="form-label">max_allowed_packet</label>
|
||||
<input type="text" class="form-control" data-regexp="max_allowed_packet" data-prev-value="<?= htmlentities($v_max_allowed_packet) ?>" name="v_display_errors" id="v_display_errors" value="<?= htmlentities($v_max_allowed_packet) ?>">
|
||||
</div>
|
||||
<div class="u-mb20">
|
||||
<button type="button" class="button button-secondary js-toggle-options">
|
||||
<?= _("Advanced Options") ?>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="js-advanced-options <?php if (empty($v_adv)) echo 'u-hidden'; ?>">
|
||||
<div class="u-mb20">
|
||||
<button type="button" class="button button-secondary js-toggle-options">
|
||||
<?= _("Basic Options") ?>
|
||||
</button>
|
||||
</div>
|
||||
<div class="u-mb20">
|
||||
<label for="v_config" class="form-label"><?= $v_config_path ?></label>
|
||||
<textarea class="form-control u-min-height600 u-allow-resize u-console js-advanced-textarea" name="v_config" id="v_config"><?= $v_config ?></textarea>
|
||||
</div>
|
||||
<div class="form-check">
|
||||
<input class="form-check-input" type="checkbox" name="v_restart" id="v_restart" checked>
|
||||
<label for="v_restart">
|
||||
<?= _("Restart") ?>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
|
||||
</div>
|
||||
98
web/templates/pages/edit_server_nginx.php
Normal file
98
web/templates/pages/edit_server_nginx.php
Normal file
@@ -0,0 +1,98 @@
|
||||
<!-- Begin toolbar -->
|
||||
<div class="toolbar">
|
||||
<div class="toolbar-inner">
|
||||
<div class="toolbar-buttons">
|
||||
<a class="button button-secondary button-back js-button-back" href="/list/server/">
|
||||
<i class="fas fa-arrow-left icon-blue"></i><?= _("Back") ?>
|
||||
</a>
|
||||
<a href="/edit/server/php/" class="button button-secondary">
|
||||
<i class="fas fa-pencil icon-orange"></i><?= _("Configure") ?> PHP
|
||||
</a>
|
||||
</div>
|
||||
<div class="toolbar-buttons">
|
||||
<button type="submit" class="button" form="main-form">
|
||||
<i class="fas fa-floppy-disk icon-purple"></i><?= _("Save") ?>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- End toolbar -->
|
||||
|
||||
<div class="container">
|
||||
|
||||
<form id="main-form" name="v_configure_server" method="post">
|
||||
<input type="hidden" name="token" value="<?= $_SESSION["token"] ?>">
|
||||
<input type="hidden" name="save" value="save">
|
||||
|
||||
<div class="form-container">
|
||||
<h1 class="u-mb20"><?= _("Configure Server") ?>: <?= $v_service_name ?></h1>
|
||||
<?php show_alert_message($_SESSION); ?>
|
||||
<div class="js-basic-options">
|
||||
<div class="u-mb10">
|
||||
<label for="v_worker_processes" class="form-label">worker_processes</label>
|
||||
<input type="text" class="form-control" data-regexp="worker_processes" data-prev-value="<?= htmlentities($v_worker_processes) ?>" name="v_worker_processes" id="v_worker_processes" value="<?= htmlentities($v_worker_processes) ?>">
|
||||
</div>
|
||||
<div class="u-mb10">
|
||||
<label for="v_worker_connections" class="form-label">worker_connections</label>
|
||||
<input type="text" class="form-control" data-regexp="worker_connections" data-prev-value="<?= htmlentities($v_worker_connections) ?>" name="v_worker_connections" id="v_worker_connections" value="<?= htmlentities($v_worker_connections) ?>">
|
||||
</div>
|
||||
<div class="u-mb10">
|
||||
<label for="v_client_max_body_size" class="form-label">client_max_body_size</label>
|
||||
<input type="text" class="form-control" data-regexp="client_max_body_size" data-prev-value="<?= htmlentities($v_client_max_body_size) ?>" name="v_client_max_body_size" id="v_client_max_body_size" value="<?= htmlentities($v_client_max_body_size) ?>">
|
||||
</div>
|
||||
<div class="u-mb10">
|
||||
<label for="v_send_timeout" class="form-label">send_timeout</label>
|
||||
<input type="text" class="form-control" data-regexp="send_timeout" data-prev-value="<?= htmlentities($v_send_timeout) ?>" name="v_send_timeout" id="v_send_timeout" value="<?= htmlentities($v_send_timeout) ?>">
|
||||
</div>
|
||||
<div class="u-mb10">
|
||||
<label for="v_proxy_connect_timeout" class="form-label">proxy_connect_timeout</label>
|
||||
<input type="text" class="form-control" data-regexp="proxy_connect_timeout" data-prev-value="<?= htmlentities($v_proxy_connect_timeout) ?>" name="v_proxy_connect_timeout" id="v_proxy_connect_timeout" value="<?= htmlentities($v_proxy_connect_timeout) ?>">
|
||||
</div>
|
||||
<div class="u-mb10">
|
||||
<label for="v_proxy_send_timeout" class="form-label">proxy_send_timeout</label>
|
||||
<input type="text" class="form-control" data-regexp="proxy_send_timeout" data-prev-value="<?= htmlentities($v_proxy_send_timeout) ?>" name="v_proxy_send_timeout" id="v_proxy_send_timeout" value="<?= htmlentities($v_proxy_send_timeout) ?>">
|
||||
</div>
|
||||
<div class="u-mb10">
|
||||
<label for="v_proxy_read_timeout" class="form-label">proxy_read_timeout</label>
|
||||
<input type="text" class="form-control" data-regexp="proxy_read_timeout" data-prev-value="<?= htmlentities($v_proxy_read_timeout) ?>" name="v_proxy_read_timeout" id="v_proxy_read_timeout" value="<?= htmlentities($v_proxy_read_timeout) ?>">
|
||||
</div>
|
||||
<div class="u-mb10">
|
||||
<label for="v_gzip" class="form-label">gzip</label>
|
||||
<input type="text" class="form-control" data-regexp="gzip" data-prev-value="<?= htmlentities($v_gzip) ?>" name="v_gzip" id="v_gzip" value="<?= htmlentities($v_gzip) ?>">
|
||||
</div>
|
||||
<div class="u-mb10">
|
||||
<label for="v_gzip_comp_level" class="form-label">gzip_comp_level</label>
|
||||
<input type="text" class="form-control" data-regexp="gzip_comp_level" data-prev-value="<?= htmlentities($v_gzip_comp_level) ?>" name="v_gzip_comp_level" id="v_gzip_comp_level" value="<?= htmlentities($v_gzip_comp_level) ?>">
|
||||
</div>
|
||||
<div class="u-mb20">
|
||||
<label for="v_charset" class="form-label">charset</label>
|
||||
<input type="text" class="form-control" data-regexp="charset" data-prev-value="<?= htmlentities($v_charset) ?>" name="v_charset" id="v_charset" value="<?= htmlentities($v_charset) ?>">
|
||||
</div>
|
||||
<div class="u-mb20">
|
||||
<button type="button" class="button button-secondary js-toggle-options">
|
||||
<?= _("Advanced Options") ?>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="js-advanced-options <?php if (empty($v_adv)) echo 'u-hidden'; ?>">
|
||||
<div class="u-mb20">
|
||||
<button type="button" class="button button-secondary js-toggle-options">
|
||||
<?= _("Basic Options") ?>
|
||||
</button>
|
||||
</div>
|
||||
<div class="u-mb20">
|
||||
<label for="v_config" class="form-label"><?= $v_config_path ?></label>
|
||||
<textarea class="form-control u-min-height600 u-allow-resize u-console js-advanced-textarea" name="v_config" id="v_config"><?= $v_config ?></textarea>
|
||||
</div>
|
||||
<div class="form-check">
|
||||
<input class="form-check-input" type="checkbox" name="v_restart" id="v_restart" checked>
|
||||
<label for="v_restart">
|
||||
<?= _("Restart") ?>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
|
||||
</div>
|
||||
45
web/templates/pages/edit_server_pgsql.php
Normal file
45
web/templates/pages/edit_server_pgsql.php
Normal file
@@ -0,0 +1,45 @@
|
||||
<!-- Begin toolbar -->
|
||||
<div class="toolbar">
|
||||
<div class="toolbar-inner">
|
||||
<div class="toolbar-buttons">
|
||||
<a class="button button-secondary button-back js-button-back" href="/list/server/">
|
||||
<i class="fas fa-arrow-left icon-blue"></i><?= _("Back") ?>
|
||||
</a>
|
||||
</div>
|
||||
<div class="toolbar-buttons">
|
||||
<button type="submit" class="button" form="main-form">
|
||||
<i class="fas fa-floppy-disk icon-purple"></i><?= _("Save") ?>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- End toolbar -->
|
||||
|
||||
<div class="container">
|
||||
|
||||
<form id="main-form" name="v_configure_server" method="post">
|
||||
<input type="hidden" name="token" value="<?= $_SESSION["token"] ?>">
|
||||
<input type="hidden" name="save" value="save">
|
||||
|
||||
<div class="form-container">
|
||||
<h1 class="u-mb20"><?= _("Configure Server") ?>: <?= $v_service_name ?></h1>
|
||||
<?php show_alert_message($_SESSION); ?>
|
||||
<div class="u-mb20">
|
||||
<label for="v_options" class="form-label"><?= $v_options_path ?></label>
|
||||
<textarea class="form-control u-min-height300 u-allow-resize u-console" name="v_options" id="v_options"><?= $v_options ?></textarea>
|
||||
</div>
|
||||
<div class="u-mb20">
|
||||
<label for="v_config" class="form-label"><?= $v_config_path ?></label>
|
||||
<textarea class="form-control u-min-height300 u-allow-resize u-console" name="v_config" id="v_config"><?= $v_config ?></textarea>
|
||||
</div>
|
||||
<div class="form-check">
|
||||
<input class="form-check-input" type="checkbox" name="v_restart" id="v_restart" checked>
|
||||
<label for="v_restart">
|
||||
<?= _("Restart") ?>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
|
||||
</div>
|
||||
83
web/templates/pages/edit_server_php.php
Normal file
83
web/templates/pages/edit_server_php.php
Normal file
@@ -0,0 +1,83 @@
|
||||
<!-- Begin toolbar -->
|
||||
<div class="toolbar">
|
||||
<div class="toolbar-inner">
|
||||
<div class="toolbar-buttons">
|
||||
<a class="button button-secondary button-back js-button-back" href="/list/server/">
|
||||
<i class="fas fa-arrow-left icon-blue"></i><?= _("Back") ?>
|
||||
</a>
|
||||
</div>
|
||||
<div class="toolbar-buttons">
|
||||
<button type="submit" class="button" form="main-form">
|
||||
<i class="fas fa-floppy-disk icon-purple"></i><?= _("Save") ?>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- End toolbar -->
|
||||
|
||||
<div class="container">
|
||||
|
||||
<form id="main-form" name="v_configure_server" method="post">
|
||||
<input type="hidden" name="token" value="<?= $_SESSION["token"] ?>">
|
||||
<input type="hidden" name="save" value="save">
|
||||
|
||||
<div class="form-container">
|
||||
<h1 class="u-mb20"><?= _("Configure Server") ?>: PHP</h1>
|
||||
<?php show_alert_message($_SESSION); ?>
|
||||
<div class="js-basic-options">
|
||||
<div class="u-mb10">
|
||||
<label for="v_max_execution_time" class="form-label">max_execution_time</label>
|
||||
<input type="text" class="form-control" data-regexp="max_execution_time" data-prev-value="<?= htmlentities($v_max_execution_time) ?>" name="v_max_execution_time" id="v_max_execution_time" value="<?= htmlentities($v_max_execution_time) ?>">
|
||||
</div>
|
||||
<div class="u-mb10">
|
||||
<label for="v_worker_connections" class="form-label">max_input_time</label>
|
||||
<input type="text" class="form-control" data-regexp="max_input_time" data-prev-value="<?= htmlentities($v_max_input_time) ?>" name="v_worker_connections" id="v_worker_connections" value="<?= htmlentities($v_max_input_time) ?>">
|
||||
</div>
|
||||
<div class="u-mb10">
|
||||
<label for="v_memory_limit" class="form-label">memory_limit</label>
|
||||
<input type="text" class="form-control" data-regexp="memory_limit" data-prev-value="<?= htmlentities($v_memory_limit) ?>" name="v_memory_limit" id="v_memory_limit" value="<?= htmlentities($v_memory_limit) ?>">
|
||||
</div>
|
||||
<div class="u-mb10">
|
||||
<label for="v_error_reporting" class="form-label">error_reporting</label>
|
||||
<input type="text" class="form-control" data-regexp="error_reporting" data-prev-value="<?= htmlentities($v_error_reporting) ?>" name="v_error_reporting" id="v_error_reporting" value="<?= htmlentities($v_error_reporting) ?>">
|
||||
</div>
|
||||
<div class="u-mb10">
|
||||
<label for="v_display_errors" class="form-label">display_errors</label>
|
||||
<input type="text" class="form-control" data-regexp="display_errors" data-prev-value="<?= htmlentities($v_display_errors) ?>" name="v_display_errors" id="v_display_errors" value="<?= htmlentities($v_display_errors) ?>">
|
||||
</div>
|
||||
<div class="u-mb10">
|
||||
<label for="v_post_max_size" class="form-label">post_max_size</label>
|
||||
<input type="text" class="form-control" data-regexp="post_max_size" data-prev-value="<?= htmlentities($v_post_max_size) ?>" name="v_post_max_size" id="v_post_max_size" value="<?= htmlentities($v_post_max_size) ?>">
|
||||
</div>
|
||||
<div class="u-mb20">
|
||||
<label for="v_upload_max_filesize" class="form-label">upload_max_filesize</label>
|
||||
<input type="text" class="form-control" data-regexp="upload_max_filesize" data-prev-value="<?= htmlentities($v_upload_max_filesize) ?>" name="v_upload_max_filesize" id="v_upload_max_filesize" value="<?= htmlentities($v_upload_max_filesize) ?>">
|
||||
</div>
|
||||
<div class="u-mb20">
|
||||
<button type="button" class="button button-secondary js-toggle-options">
|
||||
<?= _("Advanced Options") ?>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="js-advanced-options <?php if (empty($v_adv)) echo 'u-hidden'; ?>">
|
||||
<div class="u-mb20">
|
||||
<button type="button" class="button button-secondary js-toggle-options">
|
||||
<?= _("Basic Options") ?>
|
||||
</button>
|
||||
</div>
|
||||
<div class="u-mb20">
|
||||
<label for="v_config" class="form-label"><?= $v_config_path ?></label>
|
||||
<textarea class="form-control u-min-height600 u-allow-resize u-console js-advanced-textarea" name="v_config" id="v_config"><?= $v_config ?></textarea>
|
||||
</div>
|
||||
<div class="form-check">
|
||||
<input class="form-check-input" type="checkbox" name="v_restart" id="v_restart" checked>
|
||||
<label for="v_restart">
|
||||
<?= _("Restart") ?>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
|
||||
</div>
|
||||
41
web/templates/pages/edit_server_service.php
Normal file
41
web/templates/pages/edit_server_service.php
Normal file
@@ -0,0 +1,41 @@
|
||||
<!-- Begin toolbar -->
|
||||
<div class="toolbar">
|
||||
<div class="toolbar-inner">
|
||||
<div class="toolbar-buttons">
|
||||
<a class="button button-secondary button-back js-button-back" href="/list/server/">
|
||||
<i class="fas fa-arrow-left icon-blue"></i><?= _("Back") ?>
|
||||
</a>
|
||||
</div>
|
||||
<div class="toolbar-buttons">
|
||||
<button type="submit" class="button" form="main-form">
|
||||
<i class="fas fa-floppy-disk icon-purple"></i><?= _("Save") ?>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- End toolbar -->
|
||||
|
||||
<div class="container">
|
||||
|
||||
<form id="main-form" name="v_configure_server" method="post">
|
||||
<input type="hidden" name="token" value="<?= $_SESSION["token"] ?>">
|
||||
<input type="hidden" name="save" value="save">
|
||||
|
||||
<div class="form-container">
|
||||
<h1 class="u-mb20"><?= _("Configure Server") ?>: <?= $v_service_name ?></h1>
|
||||
<?php show_alert_message($_SESSION); ?>
|
||||
<div class="u-mb20">
|
||||
<label for="v_config" class="form-label"><?= $v_config_path ?></label>
|
||||
<textarea class="form-control u-min-height300 u-allow-resize u-console" name="v_config" id="v_config"><?= $v_config ?></textarea>
|
||||
</div>
|
||||
<div class="form-check">
|
||||
<input class="form-check-input" type="checkbox" name="v_restart" id="v_restart" checked>
|
||||
<label for="v_restart">
|
||||
<?= _("Restart") ?>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
|
||||
</div>
|
||||
304
web/templates/pages/edit_user.php
Normal file
304
web/templates/pages/edit_user.php
Normal file
@@ -0,0 +1,304 @@
|
||||
<!-- Begin toolbar -->
|
||||
<div class="toolbar">
|
||||
<div class="toolbar-inner">
|
||||
<div class="toolbar-buttons">
|
||||
<a class="button button-secondary button-back js-button-back" href="/list/user/">
|
||||
<i class="fas fa-arrow-left icon-blue"></i><?= _("Back") ?>
|
||||
</a>
|
||||
<?php
|
||||
if (($_SESSION['userContext'] === 'admin') && ($_SESSION['look'] === '' ) && ($_SESSION['user'] !== $v_username)) {
|
||||
$ssh_key_url = "/list/key/?user=".htmlentities($_GET['user'])."&token=".$_SESSION['token']."";
|
||||
$log_url = "/list/log/?user=".htmlentities($_GET['user'])."&token=".$_SESSION['token']."";
|
||||
$keys_url = "/list/access-key/?user=".htmlentities($_GET['user'])."&token=".$_SESSION['token']."";
|
||||
}else{
|
||||
$ssh_key_url = "/list/key/";
|
||||
$log_url = "/list/log/";
|
||||
$keys_url = "/list/access-key/";
|
||||
}
|
||||
?>
|
||||
<a href="<?= $ssh_key_url; ?>" class="button button-secondary js-button-create" title="<?= _("Manage SSH Keys") ?>">
|
||||
<i class="fas fa-key icon-orange"></i><?= _("Manage SSH Keys") ?>
|
||||
</a>
|
||||
<?php if ($_SESSION["userContext"] == "admin" || ($_SESSION["userContext"] !== "admin" && $_SESSION["POLICY_USER_VIEW_LOGS"] !== "no")) { ?>
|
||||
<a href="<?= $log_url ?>" class="button button-secondary js-button-create" title="<?= _("Logs") ?>">
|
||||
<i class="fas fa-clock-rotate-left icon-maroon"></i><?= _("Logs") ?>
|
||||
</a>
|
||||
<?php } ?>
|
||||
<?php
|
||||
$api_status = (!empty($_SESSION['API_SYSTEM']) && is_numeric($_SESSION['API_SYSTEM'])) ? $_SESSION['API_SYSTEM'] : 0;
|
||||
if (($user_plain == 'admin' && $api_status > 0) || ($user_plain != 'admin' && $api_status > 1)) { ?>
|
||||
<a href="<?= $keys_url; ?>" class="button button-secondary js-button-create" title="<?= _("Access Keys") ?>">
|
||||
<i class="fas fa-key icon-purple"></i><?= _("Access Keys") ?>
|
||||
</a>
|
||||
<?php } ?>
|
||||
</div>
|
||||
<div class="toolbar-buttons">
|
||||
<button type="submit" class="button" form="main-form">
|
||||
<i class="fas fa-floppy-disk icon-purple"></i><?= _("Save") ?>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- End toolbar -->
|
||||
|
||||
<div class="container">
|
||||
|
||||
<form
|
||||
x-data="{
|
||||
loginDisabled: <?= $v_login_disabled === "yes" ? "true" : "false" ?>,
|
||||
useIpAllowList: <?= $v_login_use_iplist === "yes" ? "true" : "false" ?>,
|
||||
showAdvanced: false,
|
||||
}"
|
||||
id="main-form"
|
||||
method="post"
|
||||
name="v_edit_user"
|
||||
class="<?= $v_status ?>"
|
||||
>
|
||||
<input type="hidden" name="token" value="<?= $_SESSION["token"] ?>">
|
||||
<input type="hidden" name="save" value="save">
|
||||
|
||||
<div class="form-container">
|
||||
<h1 class="u-mb20"><?= _("Edit User") ?></h1>
|
||||
<?php show_alert_message($_SESSION); ?>
|
||||
<div class="u-mb10">
|
||||
<label for="v_user" class="form-label"><?= _("Username") ?></label>
|
||||
<input type="text" class="form-control" name="v_user" id="v_user" value="<?= htmlentities(trim($v_username, "'")) ?>" disabled required>
|
||||
<input type="hidden" name="v_username" value="<?= htmlentities(trim($v_username, "'")) ?>">
|
||||
</div>
|
||||
<div class="u-mb10">
|
||||
<label for="v_name" class="form-label"><?= _("Contact Name") ?></label>
|
||||
<input type="text" class="form-control" name="v_name" id="v_name" value="<?= htmlentities(trim($v_name, "'")) ?>" <?php if (($_SESSION['userContext'] !=='admin' ) && ($_SESSION['POLICY_USER_EDIT_DETAILS'] !=='yes' )) { echo 'disabled' ; }?> required>
|
||||
<?php if (($_SESSION['userContext'] !== 'admin') && ($_SESSION['POLICY_USER_EDIT_DETAILS'] !== 'yes')) { ?>
|
||||
<input type="hidden" name="v_name" value="<?= htmlentities(trim($v_name, "'")) ?>">
|
||||
<?php } ?>
|
||||
</div>
|
||||
<div class="u-mb10">
|
||||
<label for="v_email" class="form-label"><?= _("Email") ?></label>
|
||||
<input type="email" class="form-control" name="v_email" id="v_email" value="<?= htmlentities(trim($v_email, "'")) ?>" <?php if (($_SESSION['userContext'] !=='admin' ) && ($_SESSION['POLICY_USER_EDIT_DETAILS'] !=='yes' )) { echo 'disabled' ; }?> required>
|
||||
<?php if (($_SESSION['userContext'] !== 'admin') && ($_SESSION['POLICY_USER_EDIT_DETAILS'] !== 'yes')) { ?>
|
||||
<input type="hidden" name="v_email" value="<?= htmlentities(trim($v_email, "'")) ?>">
|
||||
<?php } ?>
|
||||
</div>
|
||||
<div class="u-mb10">
|
||||
<label for="v_password" class="form-label">
|
||||
<?= _("Password") ?>
|
||||
<button type="button" title="<?= _("Generate") ?>" class="u-unstyled-button u-ml5 js-generate-password">
|
||||
<i class="fas fa-arrows-rotate icon-green"></i>
|
||||
</button>
|
||||
</label>
|
||||
<div class="u-pos-relative u-mb10">
|
||||
<input type="text" class="form-control js-password-input" name="v_password" id="v_password" value="<?= htmlentities(trim($v_password, "'")) ?>">
|
||||
<div class="password-meter">
|
||||
<meter max="4" class="password-meter-input js-password-meter"></meter>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="password-details" class="u-mb20">
|
||||
<p class="u-mb10"><?= _("Your password must have at least") ?>:</p>
|
||||
<ul class="u-list-bulleted u-mb10">
|
||||
<li><?= _("8 characters long") ?></li>
|
||||
<li><?= _("1 uppercase & 1 lowercase character") ?></li>
|
||||
<li><?= _("1 number") ?></li>
|
||||
</ul>
|
||||
<?php if ($_SESSION["userContext"] === "admin") { ?>
|
||||
<div class="form-check">
|
||||
<input x-model="loginDisabled" class="form-check-input" type="checkbox" name="v_login_disabled" id="v_login_disabled">
|
||||
<label for="v_login_disabled">
|
||||
<?= _("Do not allow user to log in to Control Panel") ?>
|
||||
</label>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<div x-cloak x-show="!loginDisabled" id="password-options">
|
||||
<div class="form-check">
|
||||
<input class="form-check-input" type="checkbox" name="v_twofa" id="v_twofa" <?php if (!empty($v_twofa)) echo 'checked' ?>>
|
||||
<label for="v_twofa">
|
||||
<?= _("Enable two-factor authentication") ?>
|
||||
</label>
|
||||
</div>
|
||||
<?php if (!empty($v_twofa)) { ?>
|
||||
<p class="u-mb10"><?= _("Account Recovery Code") . ": " . $v_twofa ?></p>
|
||||
<p class="u-mb10"><?= _("Please scan the code below in your 2FA application") ?>:</p>
|
||||
<div class="u-mb10">
|
||||
<img class="qr-code" src="<?= htmlentities($v_qrcode) ?>" alt="<?= _("2FA QR Code") ?>">
|
||||
</div>
|
||||
<?php } ?>
|
||||
</div>
|
||||
<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">
|
||||
<?= _("Use IP address allow list for login attempts") ?>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<div x-cloak x-show="useIpAllowList" id="ip-allowlist" class="u-mt10">
|
||||
<input type="text" class="form-control" name="v_login_allowed_ips" value="<?= htmlentities(trim($v_login_allowed_ips, "'")) ?>" placeholder="<?= _("For example") ?>: 127.0.0.1,192.168.1.100">
|
||||
</div>
|
||||
</div>
|
||||
<div class="u-mb10">
|
||||
<label for="v_language" class="form-label"><?= _("Language") ?></label>
|
||||
<select class="form-select" name="v_language" id="v_language" required>
|
||||
<?php
|
||||
foreach ($languages as $key => $value) {
|
||||
echo "\n\t\t\t\t\t\t\t\t\t<option value=\"".$key."\"";
|
||||
$skey = "'".$key."'";
|
||||
if (( $key == $v_language ) || ( $skey == $v_language)){
|
||||
echo 'selected' ;
|
||||
}
|
||||
if (( $key == detect_user_language() ) && (empty($v_language))){
|
||||
echo 'selected' ;
|
||||
}
|
||||
echo ">".htmlentities($value)."</option>\n";
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
</div>
|
||||
<?php if ($v_username != "admin" && $_SESSION["userContext"] === "admin" && $_SESSION["user"] != $v_username): ?>
|
||||
<div class="u-mb10">
|
||||
<label for="v_role" class="form-label"><?= _("Role") ?></label>
|
||||
<select class="form-select" name="v_role" id="v_role" required>
|
||||
<option value="user"><?= _("User") ?></option>
|
||||
<option value="admin" <?= $v_role == "admin" ? "selected" : "" ?>><?= _("Administrator") ?></option>
|
||||
<option value="dns-cluster" <?= $v_role == "dns-cluster" ? "selected" : "" ?>><?= _("DNS Sync User") ?></option>
|
||||
</select>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<?php if ($_SESSION["POLICY_USER_CHANGE_THEME"] !== "no") { ?>
|
||||
<div class="u-mb10">
|
||||
<label for="v_user_theme" class="form-label"><?= _("Theme") ?></label>
|
||||
<select class="form-select" name="v_user_theme" id="v_user_theme">
|
||||
<?php
|
||||
foreach ($themes as $key => $value) {
|
||||
echo "\t\t\t\t<option value=\"".$value."\"";
|
||||
if ((!empty($_SESSION['userTheme'])) && ( $value == $v_user_theme )) {
|
||||
echo ' selected' ;
|
||||
}
|
||||
if ((empty($v_user_theme) && (!empty($_SESSION['THEME']))) && ( $value == $_SESSION['THEME'] )) {
|
||||
echo ' selected' ;
|
||||
}
|
||||
echo ">".$value."</option>\n";
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<div class="u-mb10">
|
||||
<label for="v_sort_order" class="form-label"><?= _("Default List Sort Order") ?></label>
|
||||
<select class="form-select" name="v_sort_order" id="v_sort_order">
|
||||
<option value='date' <?php if ($v_sort_order === 'date') echo 'selected' ?>><?= _("Date") ?></option>
|
||||
<option value='name' <?php if ($v_sort_order === 'name') echo 'selected' ?>><?= _("Name") ?></option>
|
||||
</select>
|
||||
</div>
|
||||
<?php if ($_SESSION['userContext'] === 'admin') { ?>
|
||||
<div class="u-mb20">
|
||||
<label for="v_package" class="form-label"><?= _("Package") ?></label>
|
||||
<select class="form-select" name="v_package" id="v_package" required>
|
||||
<?php
|
||||
foreach ($packages as $key => $value) {
|
||||
echo "\n\t\t\t\t\t\t\t\t\t<option value=\"".htmlentities($key)."\"";
|
||||
$skey = "'".$key."'";
|
||||
if (( $key == $v_package ) || ( $skey == $v_package)){
|
||||
echo 'selected' ;
|
||||
}
|
||||
echo ">".htmlentities($key)."</option>\n";
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
</div>
|
||||
<div class="u-mb20">
|
||||
<button x-on:click="showAdvanced = !showAdvanced" type="button" class="button button-secondary">
|
||||
<?= _("Advanced Options") ?>
|
||||
</button>
|
||||
</div>
|
||||
<div x-cloak x-show="showAdvanced">
|
||||
<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)."\"";
|
||||
$svalue = "'".$value."'";
|
||||
if (( $value == $v_shell ) || ($svalue == $v_shell )){
|
||||
echo 'selected' ;
|
||||
}
|
||||
echo ">".htmlentities($value)."</option>\n";
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
</div>
|
||||
<div class="u-mb10">
|
||||
<label for="v_phpcli" class="form-label"><?= _("PHP CLI Version") ?></label>
|
||||
<select class="form-select" name="v_phpcli" id="v_phpcli">
|
||||
<?php
|
||||
foreach ($php_versions as $key => $value) {
|
||||
$php = explode('-',$value);
|
||||
echo "\t\t\t\t<option value=\"".$value."\"";
|
||||
$svalue = "'".$value."'";
|
||||
if ((!empty($v_phpcli)) && ( $value == $v_phpcli ) || ($svalue == $v_phpcli)){
|
||||
echo ' selected' ;
|
||||
}
|
||||
if ((empty($v_phpcli)) && ($value == DEFAULT_PHP_VERSION)){
|
||||
echo ' selected' ;
|
||||
}
|
||||
echo ">".htmlentities($value)."</option>\n";
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
</div>
|
||||
<?php if ((isset($_SESSION['DNS_SYSTEM'])) && (!empty($_SESSION['DNS_SYSTEM']))) { ?>
|
||||
<p class="form-label u-mb10"><?= _("Default Name Servers") ?></p>
|
||||
<div class="u-mb5">
|
||||
<input type="text" class="form-control" name="v_ns1" value="<?= htmlentities(trim($v_ns1, "'")) ?>">
|
||||
</div>
|
||||
<div class="u-mb5">
|
||||
<input type="text" class="form-control" name="v_ns2" value="<?= htmlentities(trim($v_ns2, "'")) ?>">
|
||||
</div>
|
||||
<?php
|
||||
if ($v_ns3) {
|
||||
echo '<div class="u-side-by-side u-mb5">
|
||||
<input type="text" class="form-control" name="v_ns3" value="'.htmlentities(trim($v_ns3, "'")).'">
|
||||
<span class="u-ml10 js-remove-ns"><i class="fas fa-trash icon-dim icon-red"></i></span>
|
||||
</div>';
|
||||
}
|
||||
if ($v_ns4) {
|
||||
echo '<div class="u-side-by-side u-mb5">
|
||||
<input type="text" class="form-control" name="v_ns4" value="'.htmlentities(trim($v_ns4, "'")).'">
|
||||
<span class="u-ml10 js-remove-ns"><i class="fas fa-trash icon-dim icon-red"></i></span>
|
||||
</div>';
|
||||
}
|
||||
if ($v_ns5) {
|
||||
echo '<div class="u-side-by-side u-mb5">
|
||||
<input type="text" class="form-control" name="v_ns5" value="'.htmlentities(trim($v_ns5, "'")).'">
|
||||
<span class="u-ml10 js-remove-ns"><i class="fas fa-trash icon-dim icon-red"></i></span>
|
||||
</div>';
|
||||
}
|
||||
if ($v_ns6) {
|
||||
echo '<div class="u-side-by-side u-mb5">
|
||||
<input type="text" class="form-control" name="v_ns6" value="'.htmlentities(trim($v_ns6, "'")).'">
|
||||
<span class="u-ml10 js-remove-ns"><i class="fas fa-trash icon-dim icon-red"></i></span>
|
||||
</div>';
|
||||
}
|
||||
if ($v_ns7) {
|
||||
echo '<div class="u-side-by-side u-mb5">
|
||||
<input type="text" class="form-control" name="v_ns7" value="'.htmlentities(trim($v_ns7, "'")).'">
|
||||
<span class="u-ml10 js-remove-ns"><i class="fas fa-trash icon-dim icon-red"></i></span>
|
||||
</div>';
|
||||
}
|
||||
if ($v_ns8) {
|
||||
echo '<div class="u-side-by-side u-mb5">
|
||||
<input type="text" class="form-control" name="v_ns8" value="'.htmlentities(trim($v_ns8, "'")).'">
|
||||
<span class="u-ml10 js-remove-ns"><i class="fas fa-trash icon-dim icon-red"></i></span>
|
||||
</div>';
|
||||
}
|
||||
?>
|
||||
<button type="button" class="form-link u-mt20 js-add-ns" <?php if ($v_ns8) echo 'style="display:none;"'; ?>>
|
||||
<?= _("Add Name Server") ?>
|
||||
</button>
|
||||
<?php } ?>
|
||||
</div>
|
||||
<?php } ?>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
|
||||
</div>
|
||||
489
web/templates/pages/edit_web.php
Normal file
489
web/templates/pages/edit_web.php
Normal file
@@ -0,0 +1,489 @@
|
||||
<!-- Begin toolbar -->
|
||||
<div class="toolbar">
|
||||
<div class="toolbar-inner">
|
||||
<div class="toolbar-buttons">
|
||||
<a class="button button-secondary button-back js-button-back" href="/list/web/">
|
||||
<i class="fas fa-arrow-left icon-blue"></i><?= _("Back") ?>
|
||||
</a>
|
||||
</div>
|
||||
<div class="toolbar-buttons">
|
||||
<a href="/delete/web/cache/?domain=<?= htmlentities($v_domain);?>&token=<?= $_SESSION['token'];?>" class="button button-secondary js-clear-cache-button <?php if (!($v_nginx_cache == 'yes' || (($v_proxy_template == 'caching' || is_int(strpos($v_proxy_template, 'caching-'))) && $_SESSION['PROXY_SYSTEM'] == 'nginx'))) { echo "u-hidden"; } ?>">
|
||||
<i class="fas fa-trash icon-red"></i><?= _("Purge NGINX Cache") ?>
|
||||
</a>
|
||||
<?php if ($_SESSION["PLUGIN_APP_INSTALLER"] !== "false") { ?>
|
||||
<a href="/add/webapp/?domain=<?= htmlentities($v_domain) ?>" class="button button-secondary">
|
||||
<i class="fas fa-magic icon-blue"></i><?= _("Quick Install App") ?>
|
||||
</a>
|
||||
<?php } ?>
|
||||
<button type="submit" class="button" form="main-form">
|
||||
<i class="fas fa-floppy-disk icon-purple"></i><?= _("Save") ?>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- End toolbar -->
|
||||
|
||||
<div class="container">
|
||||
|
||||
<form
|
||||
x-data="{
|
||||
statsAuthEnabled: <?= !empty($v_stats_user) ? "true" : "false" ?>,
|
||||
redirectEnabled: <?= !empty($v_redirect) ? "true" : "false" ?>,
|
||||
sslEnabled: <?= $v_ssl == "yes" ? "true" : "false" ?>,
|
||||
letsEncryptEnabled: <?= $v_letsencrypt == "yes" || $v_letsencrypt == "on" ? "true" : "false" ?>,
|
||||
showCertificates: <?= $v_letsencrypt == "yes" || $v_letsencrypt == "on" ? "false" : "true" ?>,
|
||||
showAdvanced: false,
|
||||
nginxCacheEnabled: <?= $v_nginx_cache == "yes" ? "true" : "false" ?>,
|
||||
proxySupportEnabled: <?= !empty($v_proxy) ? "true" : "false" ?>,
|
||||
customDocumentRootEnabled: <?= !empty($v_custom_doc_root) ? "true" : "false" ?>
|
||||
}"
|
||||
id="main-form"
|
||||
name="v_edit_web"
|
||||
method="post"
|
||||
class="<?= $v_status ?> js-enable-inputs-on-submit"
|
||||
>
|
||||
<input type="hidden" name="token" value="<?= $_SESSION["token"] ?>">
|
||||
<input type="hidden" name="save" value="save">
|
||||
|
||||
<div class="form-container">
|
||||
<h1 class="u-mb20"><?= _("Edit Web Domain") ?></h1>
|
||||
<?php show_alert_message($_SESSION); ?>
|
||||
<div class="u-mb10">
|
||||
<label for="v_domain" class="form-label"><?= _("Domain") ?></label>
|
||||
<input type="text" class="form-control" name="v_domain" id="v_domain" value="<?= htmlentities(trim($v_domain, "'")) ?>" disabled required>
|
||||
<input type="hidden" name="v_domain" value="<?= htmlentities(trim($v_domain, "'")) ?>">
|
||||
</div>
|
||||
<div class="u-mb10">
|
||||
<label for="v_aliases" class="form-label"><?= _("Aliases") ?></label>
|
||||
<textarea class="form-control" name="v_aliases" id="v_aliases"><?= htmlentities(trim($v_aliases, "'")) ?></textarea>
|
||||
</div>
|
||||
<?php if ($v_letsencrypt == "yes" || $v_letsencrypt == "on") { ?>
|
||||
<div class="u-mb10">
|
||||
<div class="alert alert-info" role="alert">
|
||||
<i class="fas fa-exclamation"></i>
|
||||
<p><?= _("If the aliases changes, Let's Encrypt will obtain a new SSL certificate.") ?></p>
|
||||
</div>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<div class="u-mb20">
|
||||
<label for="v_ip" class="form-label"><?= _("IP Address") ?></label>
|
||||
<select class="form-select" name="v_ip" id="v_ip">
|
||||
<?php
|
||||
foreach ($ips as $ip => $value) {
|
||||
$display_ip = htmlentities(empty($value['NAT']) ? $ip : "{$value['NAT']}");
|
||||
$ip_selected = ((!empty($v_ip) && $ip == $v_ip) || $v_ip == "'{$ip}'") ? 'selected' : '';
|
||||
echo "\n\t\t\t\t\t\t\t\t\t\t\t\t<option value=\"{$ip}\" {$ip_selected}>{$display_ip}</option>\n";
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
</div>
|
||||
<div class="u-mb10">
|
||||
<label for="v_stats" class="form-label"><?= _("Web Statistics") ?></label>
|
||||
<select class="form-select js-stats-select" name="v_stats" id="v_stats">
|
||||
<?php
|
||||
foreach ($stats as $key => $value) {
|
||||
$svalue = "'".$value."'";
|
||||
echo "\t\t\t\t<option value=\"".htmlentities($value)."\"";
|
||||
if (empty($v_stats)) $v_stats = 'none';
|
||||
if (( $value == $v_stats ) || ($svalue == $v_stats )){
|
||||
echo ' selected' ;
|
||||
}
|
||||
echo ">". htmlentities(_($value)) ."</option>\n";
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
</div>
|
||||
<div class="u-mb10 js-stats-auth" style="<?php if ($v_stats == "none") { ?>display:none<?php } ?>">
|
||||
<div class="form-check">
|
||||
<input x-model="statsAuthEnabled" class="form-check-input" type="checkbox" name="v_stats_auth" id="v_stats_auth">
|
||||
<label for="v_stats_auth">
|
||||
<?= _("Statistics Authorization") ?>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="u-pl30 js-stats-auth">
|
||||
<div x-cloak x-show="statsAuthEnabled" name="v-add-web-domain-stats-user">
|
||||
<div class="u-mb10">
|
||||
<label for="v_stats_user" class="form-label"><?= _("Username") ?></label>
|
||||
<input type="text" class="form-control" name="v_stats_user" id="v_stats_user" value="<?= htmlentities(trim($v_stats_user, "'")) ?>">
|
||||
</div>
|
||||
<div class="u-mb20">
|
||||
<label for="v_password" class="form-label">
|
||||
<?= _("Password") ?>
|
||||
<button type="button" title="<?= _("Generate") ?>" class="u-unstyled-button u-ml5 js-generate-password">
|
||||
<i class="fas fa-arrows-rotate icon-green"></i>
|
||||
</button>
|
||||
</label>
|
||||
<div class="u-pos-relative">
|
||||
<input type="text" class="form-control js-password-input" name="v_stats_password" id="v_password" value="<?= trim($v_stats_password, "'") ?>">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-check u-mb10">
|
||||
<input x-model="redirectEnabled" class="form-check-input" type="checkbox" name="v-redirect-checkbox" id="v-redirect-checkbox">
|
||||
<label for="v-redirect-checkbox">
|
||||
<?= _("Enable domain redirection") ?>
|
||||
</label>
|
||||
</div>
|
||||
<div x-cloak x-show="redirectEnabled" id="v_redirect" class="u-pl30 u-mb10">
|
||||
<div class="form-check">
|
||||
<input class="form-check-input js-redirect-custom-value" type="radio" name="v-redirect" id="v-redirect-radio-1" value="<?='www.'.htmlentities($v_domain);?>" <?php if ($v_redirect == "www.".$v_domain) echo 'checked'; ?>>
|
||||
<label for="v-redirect-radio-1">
|
||||
<?= sprintf(_("Redirect visitors to %s"), "www." . htmlentities($v_domain)) ?>
|
||||
</label>
|
||||
</div>
|
||||
<div class="form-check">
|
||||
<input class="form-check-input js-redirect-custom-value" type="radio" name="v-redirect" id="v-redirect-radio-2" value="<?= htmlentities($v_domain);?>" <?php if ( $v_redirect == $v_domain) echo 'checked'; ?>>
|
||||
<label for="v-redirect-radio-2">
|
||||
<?= sprintf(_("Redirect visitors to %s"), htmlentities($v_domain)) ?>
|
||||
</label>
|
||||
</div>
|
||||
<div class="form-check">
|
||||
<input class="form-check-input js-redirect-custom-value" type="radio" name="v-redirect" id="v-redirect-radio-3" value="custom" <?php if ( !empty($v_redirect_custom)) echo 'checked'; ?>>
|
||||
<label for="v-redirect-radio-3">
|
||||
<?= _("Redirect visitors to a custom domain or web address") ?>
|
||||
</label>
|
||||
</div>
|
||||
<div class="u-pl30 js-custom-redirect-fields <?php if (empty($v_redirect_custom)) { echo 'u-hidden'; } ?>">
|
||||
<div class="u-mt15 u-mb10">
|
||||
<label for="v-redirect-custom" class="form-label"><?= _("Target domain or URL") ?></label>
|
||||
<input type="text" class="form-control" name="v-redirect-custom" id="v-redirect-custom" value="<?= $v_redirect_custom ?>">
|
||||
</div>
|
||||
<div class="u-mb20">
|
||||
<label for="v-redirect-code" class="form-label"><?= _("Status code") ?>:</label>
|
||||
<select class="form-select" name="v-redirect-code" id="v-redirect-code">
|
||||
<?php foreach ($redirect_code_options as $status_code): ?>
|
||||
<option value="<?= $status_code ?>"
|
||||
<?= trim($v_redirect_code) === $status_code || (empty($v_redirect_code) && $status_code === trim($v_redirect_code)) ? ' selected="selected" ' : "" ?>>
|
||||
<?= $status_code ?>
|
||||
</option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-check u-mb10">
|
||||
<input x-model="sslEnabled" class="form-check-input" type="checkbox" name="v_ssl" id="v_ssl">
|
||||
<label for="v_ssl">
|
||||
<?= _("Enable SSL for this domain") ?>
|
||||
</label>
|
||||
</div>
|
||||
<div x-cloak x-show="sslEnabled" class="u-pl30">
|
||||
<div class="form-check u-mb10">
|
||||
<input x-model="letsEncryptEnabled" class="form-check-input js-toggle-lets-encrypt" type="checkbox" name="v_letsencrypt" id="v_letsencrypt">
|
||||
<label for="v_letsencrypt">
|
||||
<?= _("Use Let's Encrypt to obtain SSL certificate") ?>
|
||||
</label>
|
||||
</div>
|
||||
<div class="form-check u-mb10">
|
||||
<input class="form-check-input" type="checkbox" name="v_ssl_forcessl" id="v_ssl_forcessl" <?php if ($v_ssl_forcessl == 'yes') echo 'checked' ?>>
|
||||
<label for="v_ssl_forcessl">
|
||||
<?= _("Enable automatic HTTPS redirection") ?>
|
||||
</label>
|
||||
</div>
|
||||
<div class="form-check u-mb20">
|
||||
<input class="form-check-input" type="checkbox" name="v_ssl_hsts" id="ssl_hsts" <?php if ($v_ssl_hsts == 'yes') echo 'checked' ?>>
|
||||
<label for="ssl_hsts">
|
||||
<?= _("Enable HTTP Strict Transport Security (HSTS)") ?>
|
||||
<a href="https://en.wikipedia.org/wiki/HTTP_Strict_Transport_Security" target="_blank">
|
||||
<i class="fas fa-question-circle"></i>
|
||||
</a>
|
||||
</label>
|
||||
</div>
|
||||
<div x-cloak x-show="showCertificates" class="js-ssl-details">
|
||||
<div class="u-mb10">
|
||||
<label for="ssl_crt" class="form-label">
|
||||
<?= _("SSL Certificate") ?>
|
||||
<span id="generate-csr"> / <a class="form-link" target="_blank" href="/generate/ssl/?domain=<?= htmlentities($v_domain) ?>"><?= _("Generate Self-Signed SSL Certificate") ?></a></span>
|
||||
</label>
|
||||
<textarea class="form-control u-min-height100 u-console" name="v_ssl_crt" id="ssl_crt"><?= htmlentities(trim($v_ssl_crt, "'")) ?></textarea>
|
||||
</div>
|
||||
<div class="u-mb10">
|
||||
<label for="v_ssl_key" class="form-label"><?= _("SSL Private Key") ?></label>
|
||||
<textarea class="form-control u-min-height100 u-console" name="v_ssl_key" id="v_ssl_key"><?= htmlentities(trim($v_ssl_key, "'")) ?></textarea>
|
||||
</div>
|
||||
<div class="u-mb20">
|
||||
<label for="v_ssl_ca" class="form-label">
|
||||
<?= _("SSL Certificate Authority / Intermediate") ?> <span class="optional">(<?= _("Optional") ?>)</span>
|
||||
</label>
|
||||
<textarea class="form-control u-min-height100 u-console" name="v_ssl_ca" id="v_ssl_ca"><?= htmlentities(trim($v_ssl_ca, "'")) ?></textarea>
|
||||
</div>
|
||||
</div>
|
||||
<?php if ($v_ssl != "no") { ?>
|
||||
<ul class="values-list">
|
||||
<li class="values-list-item">
|
||||
<span class="values-list-label"><?= _("Issued To") ?></span>
|
||||
<span class="values-list-value"><?= $v_ssl_subject ?></span>
|
||||
</li>
|
||||
<?php if ($v_ssl_aliases) { ?>
|
||||
<li class="values-list-item">
|
||||
<span class="values-list-label"><?= _("Alternate") ?></span>
|
||||
<span class="values-list-value"><?= $v_ssl_aliases ?></span>
|
||||
</li>
|
||||
<?php } ?>
|
||||
<li class="values-list-item">
|
||||
<span class="values-list-label"><?= _("Not Before") ?></span>
|
||||
<span class="values-list-value"><?= $v_ssl_not_before ?></span>
|
||||
</li>
|
||||
<li class="values-list-item">
|
||||
<span class="values-list-label"><?= _("Not After") ?></span>
|
||||
<span class="values-list-value"><?= $v_ssl_not_after ?></span>
|
||||
</li>
|
||||
<li class="values-list-item">
|
||||
<span class="values-list-label"><?= _("Signature") ?></span>
|
||||
<span class="values-list-value"><?= $v_ssl_signature ?></span>
|
||||
</li>
|
||||
<li class="values-list-item">
|
||||
<span class="values-list-label"><?= _("Key Size") ?></span>
|
||||
<span class="values-list-value"><?= $v_ssl_pub_key ?></span>
|
||||
</li>
|
||||
<li class="values-list-item">
|
||||
<span class="values-list-label"><?= _("Issued By") ?></span>
|
||||
<span class="values-list-value"><?= $v_ssl_issuer ?></span>
|
||||
</li>
|
||||
<p x-cloak x-show="letsEncryptEnabled" id="letsinfo">
|
||||
<button
|
||||
type="button"
|
||||
class="form-link"
|
||||
x-on:click="showCertificates = !showCertificates"
|
||||
x-text="showCertificates ? '<?= _("Hide Certificate") ?>' : '<?= _("Show Certificate") ?>'">
|
||||
<?= _("Show Certificate") ?>
|
||||
</button>
|
||||
</p>
|
||||
</ul>
|
||||
<?php } ?>
|
||||
</div>
|
||||
<div class="u-mt15 u-mb20">
|
||||
<button x-on:click="showAdvanced = !showAdvanced" type="button" class="button button-secondary">
|
||||
<?= _("Advanced Options") ?>
|
||||
</button>
|
||||
</div>
|
||||
<div x-cloak x-show="showAdvanced">
|
||||
<?php if ($_SESSION["userContext"] === "admin" || ($_SESSION["userContext"] === "user" && $_SESSION["POLICY_USER_EDIT_WEB_TEMPLATES"] === "yes")) { ?>
|
||||
<div class="u-mb10">
|
||||
<label for="v_template" class="form-label">
|
||||
<?= _("Web Template") . "<span class='optional'>" . strtoupper($_SESSION["WEB_SYSTEM"]) . "</span>" ?>
|
||||
</label>
|
||||
<select class="form-select" name="v_template" id="v_template">
|
||||
<?php
|
||||
foreach ($templates as $key => $value) {
|
||||
echo "\t\t\t\t<option value=\"".htmlentities($value)."\"";
|
||||
$svalue = "'".$value."'";
|
||||
if ((!empty($v_template)) && ( $value == $v_template ) || ($svalue == $v_template)){
|
||||
echo ' selected' ;
|
||||
}
|
||||
echo ">".htmlentities($value)."</option>\n";
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
</div>
|
||||
<?php if ($_SESSION["WEB_SYSTEM"] == "nginx") { ?>
|
||||
<div class="form-check u-mb10">
|
||||
<input x-model="nginxCacheEnabled" class="form-check-input" type="checkbox" name="v_nginx_cache_check" id="v_nginx_cache_check">
|
||||
<label for="v_nginx_cache_check">
|
||||
<?= _("Enable FastCGI cache") ?>
|
||||
<a href="https://hestiacp.com/docs/server-administration/web-templates.html#nginx-fastcgi-cache" target="_blank" class="u-ml5">
|
||||
<i class="fas fa-circle-question"></i>
|
||||
</a>
|
||||
</label>
|
||||
</div>
|
||||
<div x-cloak x-show="nginxCacheEnabled" id="v_nginx_duration" class="u-pl30">
|
||||
<div class="u-mb10">
|
||||
<label for="v_nginx_cache_duration" class="form-label">
|
||||
<?= _("Cache Duration") ?> <span class="optional">(<?= _("For example") ?>: 30s, 10m or 1d)</span>
|
||||
</label>
|
||||
<input type="text" class="form-control" name="v_nginx_cache_duration" id="v_nginx_cache_duration" value="<?= htmlentities(trim($v_nginx_cache_duration, "'")) ?>">
|
||||
</div>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<?php if (!empty($_SESSION["WEB_BACKEND"])) { ?>
|
||||
<div class="u-mb10">
|
||||
<label for="v_backend_template" class="form-label">
|
||||
<?= _("Backend Template") . " <span class='optional'>" . strtoupper($_SESSION["WEB_BACKEND"]) . "</span>" ?>
|
||||
</label>
|
||||
<select class="form-select" name="v_backend_template" id="v_backend_template">
|
||||
<?php
|
||||
foreach ($backend_templates as $key => $value) {
|
||||
echo "\t\t\t\t<option value=\"".$value."\"";
|
||||
$svalue = "'".$value."'";
|
||||
if ((!empty($v_backend_template)) && ( $value == $v_backend_template ) || ($svalue == $v_backend_template)){
|
||||
echo ' selected' ;
|
||||
}
|
||||
if ((empty($v_backend_template)) && ($value == 'default')){
|
||||
echo ' selected' ;
|
||||
}
|
||||
echo ">".htmlentities($value)."</option>\n";
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<?php if (!empty($_SESSION["PROXY_SYSTEM"])) { ?>
|
||||
<div style="display: none;">
|
||||
<div class="form-check u-mb10">
|
||||
<input x-model="proxySupportEnabled" class="form-check-input" type="checkbox" name="v_proxy" id="v_proxy">
|
||||
<label for="v_proxy">
|
||||
<?= _("Proxy Support") . "<span class='optional'>" . strtoupper($_SESSION["PROXY_SYSTEM"]) . "</span>" ?>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<div x-cloak x-show="proxySupportEnabled" id="proxytable">
|
||||
<div class="u-mb10">
|
||||
<label for="v_proxy_template" class="form-label"><?= _("Proxy Template") ?></label>
|
||||
<select class="form-select js-proxy-template-select" name="v_proxy_template" id="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>
|
||||
</div>
|
||||
<div class="u-mb10">
|
||||
<label for="v_proxy_ext" class="form-label"><?= _("Proxy Extensions") ?></label>
|
||||
<textarea class="form-control" name="v_proxy_ext" id="v_proxy_ext"><?php if (!empty($v_proxy_ext)) { echo htmlentities(trim($v_proxy_ext, "'"));} else { echo 'jpg, jpeg, gif, png, ico, svg, css, zip, tgz, gz, rar, bz2, exe, pdf, doc, xls, ppt, txt, odt, ods, odp, odf, tar, bmp, rtf, js, mp3, avi, mpeg, flv, html, htm'; } ?></textarea>
|
||||
</div>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<?php } ?>
|
||||
<div class="form-check u-mb10">
|
||||
<input x-model="customDocumentRootEnabled" class="form-check-input" type="checkbox" name="v_custom_doc_root_check" id="v_custom_doc_root_check">
|
||||
<label for="v_custom_doc_root_check">
|
||||
<?= _("Custom document root") ?>
|
||||
</label>
|
||||
</div>
|
||||
<div x-cloak x-show="customDocumentRootEnabled" id="v_custom_doc_root" class="u-pl30">
|
||||
<div class="u-mb10">
|
||||
<label for="v-custom-doc-domain" class="form-label"><?= _("Point to") ?></label>
|
||||
<input type="hidden" class="js-custom-docroot-prepath" name="v-custom-doc-root_prepath" value="<?= $v_custom_doc_root_prepath ?>">
|
||||
<select class="form-select js-custom-docroot-domain" name="v-custom-doc-domain" id="v-custom-doc-domain">
|
||||
<?php foreach ($user_domains as $domain): ?>
|
||||
<option value="<?= htmlentities($domain) ?>"
|
||||
<?= $v_custom_doc_domain === $domain || (empty($v_custom_doc_domain) && $domain === $v_domain) ? ' selected="selected" ' : "" ?>>
|
||||
<?= htmlentities($domain) ?>
|
||||
</option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
</div>
|
||||
<div class="u-mb10">
|
||||
<label for="v-custom-doc-folder" class="form-label">
|
||||
<?php print _("Directory"); ?> <span class="optional">(<?= _("Optional") ?>)</span>
|
||||
</label>
|
||||
<input type="text" class="form-control js-custom-docroot-dir" name="v-custom-doc-folder" id="v-custom-doc-folder" value="<?= htmlentities(trim($v_custom_doc_folder, "'")) ?>">
|
||||
<small class="js-custom-docroot-hint"></small>
|
||||
</div>
|
||||
</div>
|
||||
<?php if (in_array($_SESSION["FTP_SYSTEM"], ["vsftpd", "proftpd"])) { ?>
|
||||
<div class="form-check u-mb10">
|
||||
<input class="form-check-input js-toggle-ftp-accounts" type="checkbox" name="v_ftp" id="v_ftp" <?php if (!empty($v_ftp_user)) echo 'checked' ?>>
|
||||
<label for="v_ftp">
|
||||
<?= _("Additional FTP account(s)") ?>
|
||||
</label>
|
||||
</div>
|
||||
<div class="js-active-ftp-accounts">
|
||||
<?php foreach ($v_ftp_users as $i => $ftp_user): ?>
|
||||
<?php
|
||||
$v_ftp_user = $ftp_user['v_ftp_user'];
|
||||
$v_ftp_password = $ftp_user['v_ftp_password'];
|
||||
$v_ftp_path = $ftp_user['v_ftp_path'];
|
||||
$v_ftp_email = $ftp_user['v_ftp_email'];
|
||||
$v_ftp_pre_path = $ftp_user['v_ftp_pre_path'];
|
||||
?>
|
||||
<div class="js-ftp-account js-ftp-account-nrm" name="v_add_domain_ftp" style="<?php if (empty($v_ftp_user)) { echo 'display: none;'; } ?>">
|
||||
<div class="u-mb10">
|
||||
<?= _("FTP") ?> #<span class="js-ftp-user-number"><?= $i + 1; ?></span>
|
||||
<button type="button" class="form-link form-link-danger u-ml5 js-delete-ftp-account"><?= _("Delete") ?></button>
|
||||
<input type="hidden" class="js-ftp-user-deleted" name="v_ftp_user[<?= $i ?>][delete]" value="0">
|
||||
<input type="hidden" class="js-ftp-user-is-new" name="v_ftp_user[<?= $i ?>][is_new]" value="<?= htmlentities($ftp_user['is_new']) ?>">
|
||||
</div>
|
||||
<div class="u-pl30 u-mb10">
|
||||
<label for="v_ftp_user[<?= $i ?>][v_ftp_user]" class="form-label">
|
||||
<?= _("Username") ?><br>
|
||||
<span style="color:#777;"><?= sprintf(_('Prefix %s will be added to username automatically'),$user_plain."_");?></span>
|
||||
</label>
|
||||
<input type="text" class="form-control js-ftp-user" <?= $ftp_user['is_new'] != 1 ? 'disabled="disabled"' : '' ?>
|
||||
name="v_ftp_user[<?= $i ?>][v_ftp_user]" id="v_ftp_user[<?= $i ?>][v_ftp_user]" value="<?= htmlentities(trim($v_ftp_user, "'")) ?>">
|
||||
<small class="hint js-ftp-user-hint"></small>
|
||||
</div>
|
||||
<div class="u-pl30 u-mb10">
|
||||
<label for="v_ftp_user[<?= $i ?>][v_ftp_password]" class="form-label">
|
||||
<?= _("Password") ?>
|
||||
<button type="button" title="<?= _("Generate") ?>" class="u-unstyled-button u-ml5 js-ftp-password-generate">
|
||||
<i class="fas fa-arrows-rotate icon-green"></i>
|
||||
</button>
|
||||
</label>
|
||||
<input type="text" class="form-control js-ftp-user-psw" name="v_ftp_user[<?= $i ?>][v_ftp_password]" id="v_ftp_user[<?= $i ?>][v_ftp_password]" value="<?= htmlentities(trim($v_ftp_password, "'")) ?>">
|
||||
</div>
|
||||
<div class="u-pl30 u-mb10">
|
||||
<label for="v_ftp_user[<?= $i ?>][v_ftp_path]" class="form-label"><?= _("Path") ?></label>
|
||||
<input type="hidden" name="v_ftp_pre_path" value="<?=!empty($v_ftp_pre_path) ? htmlentities(trim($v_ftp_pre_path, "'")) : '/'; ?>">
|
||||
<input type="hidden" name="v_ftp_user[<?= $i ?>][v_ftp_path_prev]" value="<?php if (!empty($v_ftp_path)) echo ($v_ftp_path[0] != '/' ? '/' : '').htmlentities(trim($v_ftp_path, "'")) ?>">
|
||||
<input type="text" class="form-control js-ftp-path" name="v_ftp_user[<?= $i ?>][v_ftp_path]" id="v_ftp_user[<?= $i ?>][v_ftp_path]" value="<?php if (!empty($v_ftp_path)) echo ($v_ftp_path[0] != '/' ? '/' : '').htmlentities(trim($v_ftp_path, "'")) ?>">
|
||||
<span class="hint-prefix"><?= htmlentities(trim($v_ftp_pre_path, "'")) ?></span><span class="hint js-ftp-path-hint"></span>
|
||||
</div>
|
||||
<?php if ($ftp_user['is_new'] == 1): ?>
|
||||
<div class="u-pl30 u-mb10">
|
||||
<label for="v_ftp_user[<?= $i ?>][v_ftp_email]" class="form-label"><?= _("Send FTP credentials to email") ?></label>
|
||||
<input type="email" class="form-control js-email-alert-on-psw" name="v_ftp_user[<?= $i ?>][v_ftp_email]" id="v_ftp_user[<?= $i ?>][v_ftp_email]" value="<?= htmlentities(trim($v_ftp_email, "'")) ?>">
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
|
||||
<button type="button" class="form-link u-mt20 js-add-ftp-account" style="<?php if (empty($v_ftp_user)) echo 'display: none;' ?>">
|
||||
<?= _("Add FTP account") ?>
|
||||
</button>
|
||||
<?php } ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="u-hidden js-ftp-account-template">
|
||||
<div class="js-ftp-account js-ftp-account-nrm" name="v_add_domain_ftp">
|
||||
<div class="u-mb10">
|
||||
<?= _("FTP") ?> #<span class="js-ftp-user-number"></span>
|
||||
<button type="button" class="form-link form-link-danger u-ml5 js-delete-ftp-account"><?= _("Delete") ?></button>
|
||||
<input type="hidden" class="js-ftp-user-deleted" name="v_ftp_user[%INDEX%][delete]" value="0">
|
||||
<input type="hidden" class="js-ftp-user-is-new" name="v_ftp_user[%INDEX%][is_new]" value="1">
|
||||
</div>
|
||||
<div class="u-pl30 u-mb10">
|
||||
<label for="v_ftp_user[%INDEX%][v_ftp_user]" class="form-label">
|
||||
<?= _("Username") ?><br>
|
||||
<span style="color:#777;"><?= sprintf(_("Prefix %s will be added to username automatically"), $user_plain . "_") ?></span>
|
||||
</label>
|
||||
<input type="text" class="form-control js-ftp-user" name="v_ftp_user[%INDEX%][v_ftp_user]" id="v_ftp_user[%INDEX%][v_ftp_user]" value="">
|
||||
<small class="hint js-ftp-user-hint"></small>
|
||||
</div>
|
||||
<div class="u-pl30 u-mb10">
|
||||
<label for="v_ftp_user[%INDEX%][v_ftp_password]" class="form-label">
|
||||
<?= _("Password") ?>
|
||||
<button type="button" title="<?= _("Generate") ?>" class="u-unstyled-button u-ml5 js-ftp-password-generate">
|
||||
<i class="fas fa-arrows-rotate icon-green"></i>
|
||||
</button>
|
||||
</label>
|
||||
<input type="text" class="form-control js-ftp-user-psw" name="v_ftp_user[%INDEX%][v_ftp_password]" id="v_ftp_user[%INDEX%][v_ftp_password]">
|
||||
</div>
|
||||
<div class="u-pl30 u-mb10">
|
||||
<label for="v_ftp_user[%INDEX%][v_ftp_path]" class="form-label"><?= _("Path") ?></label>
|
||||
<input type="hidden" name="v_ftp_pre_path" value="">
|
||||
<input type="text" class="form-control js-ftp-path" name="v_ftp_user[%INDEX%][v_ftp_path]" id="v_ftp_user[%INDEX%][v_ftp_path]" value="">
|
||||
<span class="hint-prefix"><?= htmlentities(trim($v_ftp_pre_path_new_user, "'")) ?></span><span class="hint js-ftp-path-hint"></span>
|
||||
</div>
|
||||
<div class="u-pl30 u-mb10">
|
||||
<label for="v_ftp_user[%INDEX%][v_ftp_email]" class="form-label"><?= _("Send FTP credentials to email") ?></label>
|
||||
<input type="email" class="form-control js-email-alert-on-psw" name="v_ftp_user[%INDEX%][v_ftp_email]" id="v_ftp_user[%INDEX%][v_ftp_email]" value="">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
148
web/templates/pages/edit_whitelabel.php
Normal file
148
web/templates/pages/edit_whitelabel.php
Normal file
@@ -0,0 +1,148 @@
|
||||
<!-- Begin toolbar -->
|
||||
<div class="toolbar">
|
||||
<div class="toolbar-inner">
|
||||
<div class="toolbar-buttons">
|
||||
<a href="/edit/server/" class="button button-secondary" id="btn-back">
|
||||
<i class="fas fa-arrow-left icon-blue"></i><?= _("Back") ?>
|
||||
</a>
|
||||
</div>
|
||||
<div class="toolbar-buttons">
|
||||
<button type="submit" class="button" form="main-form">
|
||||
<i class="fas fa-floppy-disk icon-purple"></i><?= _("Save") ?>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- End toolbar -->
|
||||
|
||||
<!-- Begin form -->
|
||||
<div class="container">
|
||||
<form
|
||||
x-data="{
|
||||
hide_docs: '<?= $v_hide_docs ?? "no" ?>',
|
||||
}"
|
||||
id="main-form"
|
||||
name="v_configure_server"
|
||||
method="post"
|
||||
>
|
||||
<input type="hidden" name="token" value="<?= $_SESSION["token"] ?>">
|
||||
<input type="hidden" name="save" value="save">
|
||||
|
||||
<div class="form-container">
|
||||
<h1 class="u-mb20">
|
||||
<?= _("White Label Options") ?>
|
||||
</h1>
|
||||
<?php show_alert_message($_SESSION); ?>
|
||||
|
||||
<!-- Basic options section -->
|
||||
<details class="collapse u-mb10">
|
||||
<summary class="collapse-header">
|
||||
<i class="fas fa-gear u-mr15"></i>
|
||||
<?= _("General") ?>
|
||||
</summary>
|
||||
<div class="collapse-content">
|
||||
<div class="u-mb10">
|
||||
<label for="v_app_name" class="form-label">
|
||||
<?= _("Application Name") ?>
|
||||
</label>
|
||||
<input
|
||||
type="text"
|
||||
class="form-control"
|
||||
name="v_app_name"
|
||||
id="v_app_name"
|
||||
value="<?= htmlentities(trim($v_app_name, "'")) ?>"
|
||||
>
|
||||
</div>
|
||||
<div class="u-mb10">
|
||||
<label for="v_title" class="form-label">
|
||||
<?= _("Title") ?><span class="optional">(<?= _("Supported variables") ?>: {{appname}}, {{hostname}}, {{ip}} and {{page}} )</span>
|
||||
</label>
|
||||
<input
|
||||
type="text"
|
||||
class="form-control"
|
||||
name="v_title"
|
||||
id="v_title"
|
||||
value="<?= htmlentities(trim($v_title, "'")) ?>"
|
||||
>
|
||||
</div>
|
||||
<div class="u-mb10">
|
||||
<label for="v_from_name" class="form-label">
|
||||
<?= _("Sender Name") ?><span class="optional">(<?= _("Default") ?>: <?= htmlentities(trim($v_app_name, "'")) ?>)</span>
|
||||
</label>
|
||||
<input
|
||||
type="text"
|
||||
class="form-control"
|
||||
name="v_from_name"
|
||||
id="v_from_name"
|
||||
value="<?= htmlentities(trim($v_from_name, "'")) ?>"
|
||||
>
|
||||
</div>
|
||||
|
||||
<div class="u-mb10">
|
||||
<label for="v_from_email" class="form-label">
|
||||
<?= _("Sender Email Address") ?><span class="optional">(<?= _("Default") ?>: <?= sprintf("noreply@%s", htmlentities(trim(get_hostname(), "'"))) ?>)</span>
|
||||
</label>
|
||||
<input
|
||||
type="text"
|
||||
class="form-control"
|
||||
name="v_from_email"
|
||||
id="v_from_email"
|
||||
value="<?= htmlentities(trim($v_from_email, "'")) ?>"
|
||||
>
|
||||
</div>
|
||||
<div class="u-mb10">
|
||||
<label for="v_subject_email" class="form-label">
|
||||
<?= _("Email Subject") ?><span class="optional">(<?= _("Supported variables") ?>: {{appname}}, {{hostname}}, {{subject}} )</span>
|
||||
</label>
|
||||
<input
|
||||
type="text"
|
||||
class="form-control"
|
||||
name="v_subject_email"
|
||||
id="v_subject_email"
|
||||
value="<?= htmlentities(trim($v_subject_email, "'")) ?>"
|
||||
>
|
||||
</div>
|
||||
<div class="u-mb10">
|
||||
<label for="v_hide_docs" class="form-label">
|
||||
<?= _("Hide link to Documentation") ?>
|
||||
</label>
|
||||
<select x-model="hide_docs" class="form-select" name="v_hide_docs" id="v_hide_docs">
|
||||
<option value="yes"><?= _("Yes") ?></option>
|
||||
<option value="no"><?= _("No") ?></option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</details>
|
||||
<!-- Basic options section -->
|
||||
<details class="collapse u-mb10">
|
||||
<summary class="collapse-header">
|
||||
<i class="fas fa-gear u-mr15"></i>
|
||||
<?= _("Custom Logo") ?>
|
||||
</summary>
|
||||
<div class="collapse-content">
|
||||
<div class="u-mb10">
|
||||
<label for="v_custom_logo" class="form-label">
|
||||
<?= _("Custom logo") ?>
|
||||
</label>
|
||||
</div>
|
||||
<div class="u-mb10">
|
||||
<p><?= sprintf(_("Upload the files to %s"), "/usr/local/hestia/web/images/custom/") ?></p>
|
||||
<ul>
|
||||
<li>logo.svg <small>(100px x 120px)</small></li>
|
||||
<li>logo.png <small>(100px x 120px)</small></li>
|
||||
<li>logo-header.png <small>(54x x 29px)</small></li>
|
||||
<li>favicon.png <small>(64px x 64px)</small></li>
|
||||
<li>favicon.ico<<small>(16px x 16px)</small></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="u-mb10">
|
||||
<input type="checkbox" id="v_update_logo" name="v_update_logo">
|
||||
<label for="v_update_logo" class="form-label">
|
||||
<?= _("Update logo") ?>
|
||||
</label>
|
||||
</div>
|
||||
</details>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<!-- End form -->
|
||||
66
web/templates/pages/generate_ssl.php
Normal file
66
web/templates/pages/generate_ssl.php
Normal file
@@ -0,0 +1,66 @@
|
||||
<div class="toolbar">
|
||||
<div class="toolbar-inner">
|
||||
<div class="toolbar-right">
|
||||
<?php show_alert_message($_SESSION); ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="container">
|
||||
|
||||
<form id="main-form" name="v_generate_csr" method="post">
|
||||
<input type="hidden" name="token" value="<?= $_SESSION["token"] ?>">
|
||||
<input type="hidden" name="generate" value="generate">
|
||||
|
||||
<div class="form-container">
|
||||
<h1 class="u-mb20"><?= _("Generate Self-Signed SSL Certificate") ?></h1>
|
||||
<div class="u-mb10">
|
||||
<label for="v_domain" class="form-label"><?= _("Domain") ?></label>
|
||||
<input type="text" class="form-control" name="v_domain" id="v_domain" value="<?= htmlentities(trim($v_domain, "'")) ?>">
|
||||
</div>
|
||||
<div class="u-mb10">
|
||||
<label for="v_aliases" class="form-label"><?= _("Aliases") ?></label>
|
||||
<textarea class="form-control" name="v_aliases" id="v_aliases"><?= htmlentities(trim($v_aliases, "'")) ?></textarea>
|
||||
</div>
|
||||
<div class="u-mb10">
|
||||
<label for="v_email" class="form-label">
|
||||
<?= _("Email") ?>
|
||||
<span class="optional">(<?php print _("Optional"); ?>)</span>
|
||||
</label>
|
||||
<input type="email" class="form-control" name="v_email" id="v_email" value="<?= htmlentities(trim($v_email, "'")) ?>">
|
||||
</div>
|
||||
<div class="u-mb10">
|
||||
<label for="v_country" class="form-label">
|
||||
<?= _("Country") ?>
|
||||
<span class="optional">(<?= _("ISO 3166-1 alpha-2 two-letter code") ?>)</span>
|
||||
</label>
|
||||
<input type="text" class="form-control" name="v_country" id="v_country" value="<?= htmlentities(trim($v_country, "'")) ?>">
|
||||
</div>
|
||||
<div class="u-mb10">
|
||||
<label for="v_state" class="form-label">
|
||||
<?= _("State / Province") ?>
|
||||
</label>
|
||||
<input type="text" class="form-control" name="v_state" id="v_state" value="<?= htmlentities(trim($v_state, "'")) ?>">
|
||||
</div>
|
||||
<div class="u-mb10">
|
||||
<label for="v_locality" class="form-label">
|
||||
<?= _("City / Locality") ?>
|
||||
</label>
|
||||
<input type="text" class="form-control" name="v_locality" id="v_locality" value="<?= htmlentities(trim($v_locality, "'")) ?>">
|
||||
</div>
|
||||
<div class="u-mb20">
|
||||
<label for="v_org" class="form-label">
|
||||
<?= _("Organization") ?>
|
||||
</label>
|
||||
<input type="text" class="form-control" name="v_org" id="v_org" value="<?= htmlentities(trim($v_org, "'")) ?>">
|
||||
</div>
|
||||
<div class="u-side-by-side">
|
||||
<button type="submit" class="button" name="generate">
|
||||
<?= _("Generate") ?>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
|
||||
</div>
|
||||
60
web/templates/pages/list_access_key.php
Normal file
60
web/templates/pages/list_access_key.php
Normal file
@@ -0,0 +1,60 @@
|
||||
<?php
|
||||
// Prevent resubmit form on page refresh
|
||||
if (!empty($_POST["ok"])) { ?>
|
||||
<script>
|
||||
if (window.history.replaceState) {
|
||||
window.history.replaceState(null, null, window.location.href);
|
||||
}
|
||||
</script>
|
||||
<?php } ?>
|
||||
|
||||
<!-- Begin toolbar -->
|
||||
<div class="toolbar">
|
||||
<div class="toolbar-inner">
|
||||
<div class="toolbar-buttons">
|
||||
<a class="button button-secondary button-back js-button-back" href="/list/access-key/">
|
||||
<i class="fas fa-arrow-left icon-blue"></i><?= _("Back") ?>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- End toolbar -->
|
||||
|
||||
<div class="container">
|
||||
<form id="main-form">
|
||||
|
||||
<div class="form-container">
|
||||
<h1 class="u-mb20"><?= _("Access Key") ?></h1>
|
||||
<?php show_alert_message($_SESSION); ?>
|
||||
<?php if (!empty($key_data["ACCESS_KEY_ID"])) { ?>
|
||||
<div class="u-mt15 u-mb10">
|
||||
<label for="access_key_id" class="form-label"><?= _("Access Key ID") ?></label>
|
||||
<input type="text" class="form-control" id="access_key_id" maxlength="255" readonly value="<?= htmlentities(trim($key_data["ACCESS_KEY_ID"], "'")) ?>">
|
||||
</div>
|
||||
<?php } ?>
|
||||
<?php if (!empty($_SESSION["ok_msg"])) { ?>
|
||||
<?php if (!empty($key_data["ACCESS_KEY_ID"]) && !empty($key_data["SECRET_ACCESS_KEY"])) { ?>
|
||||
<div class="u-mb20">
|
||||
<label for="secret_key" class="form-label">
|
||||
<?= _("Secret Key") ?><br>
|
||||
<span class="inline-alert inline-alert-warning u-mb20"><?= _("Warning! Last chance to save secret key!") ?></span>
|
||||
</label>
|
||||
<input type="text" class="form-control" id="secret_key" maxlength="255" readonly value="<?= htmlentities(trim($key_data["SECRET_ACCESS_KEY"], "'")) ?>">
|
||||
</div>
|
||||
<?php } ?>
|
||||
<?php } ?>
|
||||
<p class="u-mb10"><?= _("Permissions") ?></p>
|
||||
<ul class="u-list-bulleted u-mb10">
|
||||
<?php foreach ($key_data["PERMISSIONS"] as $api_name) { ?>
|
||||
<li><?= _($api_name) ?></li>
|
||||
<?php } ?>
|
||||
</ul>
|
||||
<div class="u-mb10">
|
||||
<label for="service" class="form-label"><?= _("Comment") ?></label>
|
||||
<input type="text" class="form-control" id="service" maxlength="255" readonly value="<?= htmlentities(trim($key_data["COMMENT"], "'")) ?>">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
|
||||
</div>
|
||||
135
web/templates/pages/list_access_keys.php
Normal file
135
web/templates/pages/list_access_keys.php
Normal file
@@ -0,0 +1,135 @@
|
||||
<!-- Begin toolbar -->
|
||||
<div class="toolbar">
|
||||
<div class="toolbar-inner">
|
||||
<div class="toolbar-buttons">
|
||||
<?php if ($_SESSION["userContext"] === "admin" && $_SESSION['look'] !== '' && $_GET["user"] !== "admin") { ?>
|
||||
<a href="/edit/user/?user=<?= htmlentities($_SESSION["look"]) ?>&token=<?= $_SESSION["token"] ?>" class="button button-secondary button-back js-button-back">
|
||||
<i class="fas fa-arrow-left icon-blue"></i><?= _("Back") ?>
|
||||
</a>
|
||||
<?php } else { ?>
|
||||
<a href="/edit/user/?user=<?= htmlentities($_SESSION["user"]) ?>&token=<?= $_SESSION["token"] ?>" class="button button-secondary button-back js-button-back">
|
||||
<i class="fas fa-arrow-left icon-blue"></i><?= _("Back") ?>
|
||||
</a>
|
||||
<?php } ?>
|
||||
<a href="/add/access-key/" class="button button-secondary js-button-create">
|
||||
<i class="fas fa-circle-plus icon-green"></i><?= _("Add Access Key") ?>
|
||||
</a>
|
||||
</div>
|
||||
<div class="toolbar-right">
|
||||
<div class="toolbar-sorting">
|
||||
<button class="toolbar-sorting-toggle js-toggle-sorting-menu" type="button" title="<?= _("Sort items") ?>">
|
||||
<?= _("Sort by") ?>:
|
||||
<span class="u-text-bold">
|
||||
<?= _("Date") ?> <i class="fas fa-arrow-down-a-z"></i>
|
||||
</span>
|
||||
</button>
|
||||
<ul class="toolbar-sorting-menu js-sorting-menu u-hidden">
|
||||
<li data-entity="sort-date" data-sort-as-int="1">
|
||||
<span class="name <?php if ($_SESSION['userSortOrder'] === 'date') { echo 'active'; } ?>"><?= _("Date") ?> <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 data-entity="sort-key">
|
||||
<span class="name"><?= _("Access Key") ?> <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 data-entity="sort-comment">
|
||||
<span class="name"><?= _("Comment") ?> <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-data x-bind="BulkEdit" action="/bulk/access-key/" method="post">
|
||||
<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>
|
||||
</select>
|
||||
<button type="submit" class="toolbar-input-submit" title="<?= _("Apply to selected") ?>">
|
||||
<i class="fas fa-arrow-right"></i>
|
||||
</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- End toolbar -->
|
||||
|
||||
<div class="container">
|
||||
|
||||
<h1 class="u-text-center u-hide-desktop u-mt20 u-pr30 u-mb20 u-pl30"><?= _("Access Keys") ?></h1>
|
||||
|
||||
<div class="units-table js-units-container">
|
||||
<div class="units-table-header">
|
||||
<div class="units-table-cell">
|
||||
<input type="checkbox" class="js-toggle-all-checkbox" title="<?= _("Select all") ?>">
|
||||
</div>
|
||||
<div class="units-table-cell"><?= _("Access Key") ?></div>
|
||||
<div class="units-table-cell"></div>
|
||||
<div class="units-table-cell u-text-center"><?= _("Comment") ?></div>
|
||||
<div class="units-table-cell u-text-center"><?= _("Date") ?></div>
|
||||
<div class="units-table-cell u-text-center"><?= _("Time") ?></div>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
foreach ($data as $key => $value) {
|
||||
++$i;
|
||||
$key_user = !empty($value['USER']) ? $value['USER'] : 'admin';
|
||||
$key_comment = !empty($value['COMMENT']) ? $value['COMMENT'] : '-';
|
||||
//$key_permissions = !empty($value['PERMISSIONS']) ? $value['PERMISSIONS'] : '-';
|
||||
//$key_permissions = implode(' ', $key_permissions);
|
||||
$key_date = !empty($value['DATE']) ? $value['DATE'] : '-';
|
||||
$key_time = !empty($value['TIME']) ? $value['TIME'] : '-';
|
||||
?>
|
||||
<div class="units-table-row js-unit"
|
||||
data-sort-key="<?= strtolower($key) ?>"
|
||||
data-sort-comment="<?= strtolower($key_comment) ?>"
|
||||
data-sort-date="<?= strtotime($data[$key]["DATE"] . " " . $data[$key]["TIME"]) ?>">
|
||||
<div class="units-table-cell">
|
||||
<div>
|
||||
<input id="check<?= $i ?>" class="js-unit-checkbox" type="checkbox" title="<?= _("Select") ?>" name="key[]" value="<?= $key ?>">
|
||||
<label for="check<?= $i ?>" class="u-hide-desktop"><?= _("Select") ?></label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="units-table-cell units-table-heading-cell u-text-bold">
|
||||
<span class="u-hide-desktop"><?= _("Access Key") ?>:</span>
|
||||
<a href="/list/access-key/?key=<?= htmlentities($key) ?>&token=<?= $_SESSION["token"] ?>" title="<?= _("Access Key") ?>: <?= $key ?>">
|
||||
<?= $key ?>
|
||||
</a>
|
||||
</div>
|
||||
<div class="units-table-cell">
|
||||
<ul class="units-table-row-actions">
|
||||
<li class="units-table-row-action shortcut-delete" data-key-action="js">
|
||||
<a
|
||||
class="units-table-row-action-link data-controls js-confirm-action"
|
||||
href="/delete/access-key/?key=<?= $key ?>&token=<?= $_SESSION["token"] ?>"
|
||||
title="<?= _("Delete") ?>"
|
||||
data-confirm-title="<?= _("Delete") ?>"
|
||||
data-confirm-message="<?= sprintf(_("Are you sure you want to delete access key %s?"), $key) ?>"
|
||||
>
|
||||
<i class="fas fa-trash icon-red"></i>
|
||||
<span class="u-hide-desktop"><?= _("Delete") ?></span>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="units-table-cell u-text-bold u-text-center-desktop">
|
||||
<span class="u-hide-desktop"><?= _("Comment") ?>:</span>
|
||||
<?= _($key_comment) ?>
|
||||
</div>
|
||||
<div class="units-table-cell u-text-bold u-text-center-desktop">
|
||||
<span class="u-hide-desktop"><?= _("Date") ?>:</span>
|
||||
<time datetime="<?= $key_date ?>"><?= $key_date ?></time>
|
||||
</div>
|
||||
<div class="units-table-cell u-text-bold u-text-center-desktop">
|
||||
<span class="u-hide-desktop"><?= _("Time") ?>:</span>
|
||||
<?= $key_time ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php } ?>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<footer class="app-footer">
|
||||
<div class="container app-footer-inner">
|
||||
<p>
|
||||
<?php printf(ngettext("%d access key", "%d access keys", $i), $i); ?>
|
||||
</p>
|
||||
</div>
|
||||
</footer>
|
||||
164
web/templates/pages/list_backup.php
Normal file
164
web/templates/pages/list_backup.php
Normal file
@@ -0,0 +1,164 @@
|
||||
<!-- Begin toolbar -->
|
||||
<div class="toolbar">
|
||||
<div class="toolbar-inner">
|
||||
<div class="toolbar-buttons">
|
||||
<?php if ($read_only !== "true") { ?>
|
||||
<a href="/schedule/backup/?token=<?= $_SESSION["token"] ?>" class="button button-secondary"><i class="fas fa-circle-plus icon-green"></i><?= _("Create Backup") ?></a>
|
||||
<a href="/list/backup/exclusions/" class="button button-secondary"><i class="fas fa-folder-minus icon-orange"></i><?= _("Backup Exclusions") ?></a>
|
||||
<?php } ?>
|
||||
</div>
|
||||
<div class="toolbar-right">
|
||||
<?php if ($read_only !== "true") { ?>
|
||||
<form x-data x-bind="BulkEdit" action="/bulk/backup/" method="post">
|
||||
<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>
|
||||
</select>
|
||||
<button type="submit" class="toolbar-input-submit" title="<?= _("Apply to selected") ?>">
|
||||
<i class="fas fa-arrow-right"></i>
|
||||
</button>
|
||||
</form>
|
||||
<?php } ?>
|
||||
<div class="toolbar-search">
|
||||
<form action="/search/" method="get">
|
||||
<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>
|
||||
</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- End toolbar -->
|
||||
|
||||
<div class="container">
|
||||
|
||||
<h1 class="u-text-center u-hide-desktop u-mt20 u-pr30 u-mb20 u-pl30"><?= _("Backups") ?></h1>
|
||||
|
||||
<div class="units-table js-units-container">
|
||||
<div class="units-table-header">
|
||||
<div class="units-table-cell">
|
||||
<input type="checkbox" class="js-toggle-all-checkbox" title="<?= _("Select all") ?>" <?= $display_mode ?>>
|
||||
</div>
|
||||
<div class="units-table-cell"><?= _("File Name") ?></div>
|
||||
<div class="units-table-cell"></div>
|
||||
<div class="units-table-cell u-text-center"><?= _("Date") ?></div>
|
||||
<div class="units-table-cell u-text-center"><?= _("Size") ?></div>
|
||||
<div class="units-table-cell u-text-center"><?= _("Type") ?></div>
|
||||
<div class="units-table-cell u-text-center"><?= _("Runtime") ?></div>
|
||||
</div>
|
||||
|
||||
<!-- Begin user backup list item loop -->
|
||||
<?php
|
||||
foreach ($data as $key => $value) {
|
||||
++$i;
|
||||
$web = _('No');
|
||||
$dns = _('No');
|
||||
$mail = _('No');
|
||||
$db = _('No');
|
||||
$cron = _('No');
|
||||
$udir = _('No');
|
||||
|
||||
if (!empty($data[$key]['WEB'])) $web = _('Yes');
|
||||
if (!empty($data[$key]['DNS'])) $dns = _('Yes');
|
||||
if (!empty($data[$key]['MAIL'])) $mail = _('Yes');
|
||||
if (!empty($data[$key]['DB'])) $db = _('Yes');
|
||||
if (!empty($data[$key]['CRON'])) $cron = _('Yes');
|
||||
if (!empty($data[$key]['UDIR'])) $udir = _('Yes');
|
||||
?>
|
||||
<div class="units-table-row js-unit">
|
||||
<div class="units-table-cell">
|
||||
<div>
|
||||
<input id="check<?= $i ?>" class="js-unit-checkbox" type="checkbox" title="<?= _("Select") ?>" name="backup[]" value="<?= $key ?>" <?= $display_mode ?>>
|
||||
<label for="check<?= $i ?>" class="u-hide-desktop"><?= _("Select") ?></label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="units-table-cell units-table-heading-cell u-text-bold">
|
||||
<span class="u-hide-desktop"><?= _("File Name") ?>:</span>
|
||||
<?php if ($read_only === "true") { ?>
|
||||
<?= $key ?>
|
||||
<?php } else { ?>
|
||||
<a href="/list/backup/?backup=<?= $key ?>&token=<?= $_SESSION["token"] ?>" title="<?= _("Restore") ?>">
|
||||
<?= $key ?>
|
||||
</a>
|
||||
<?php } ?>
|
||||
</div>
|
||||
<div class="units-table-cell">
|
||||
<?php if (!($_SESSION["userContext"] === "admin" && $_SESSION["look"] === "admin" && $read_only === "true")) { ?>
|
||||
<ul class="units-table-row-actions">
|
||||
<li class="units-table-row-action shortcut-d" data-key-action="href">
|
||||
<a
|
||||
class="units-table-row-action-link"
|
||||
href="/download/backup/?backup=<?= $key ?>&token=<?= $_SESSION["token"] ?>"
|
||||
title="<?= _("Download") ?>"
|
||||
>
|
||||
<i class="fas fa-file-arrow-down icon-lightblue"></i>
|
||||
<span class="u-hide-desktop"><?= _("Download") ?></span>
|
||||
</a>
|
||||
</li>
|
||||
<?php if ($read_only !== "true") { ?>
|
||||
<li class="units-table-row-action shortcut-enter" data-key-action="href">
|
||||
<a
|
||||
class="units-table-row-action-link data-controls"
|
||||
href="/list/backup/?backup=<?= $key ?>&token=<?= $_SESSION["token"] ?>"
|
||||
title="<?= _("Restore") ?>"
|
||||
>
|
||||
<i class="fas fa-arrow-rotate-left icon-green"></i>
|
||||
<span class="u-hide-desktop"><?= _("Restore") ?></span>
|
||||
</a>
|
||||
</li>
|
||||
<li class="units-table-row-action shortcut-delete" data-key-action="js">
|
||||
<a
|
||||
class="units-table-row-action-link data-controls js-confirm-action"
|
||||
href="/delete/backup/?backup=<?= $key ?>&token=<?= $_SESSION["token"] ?>"
|
||||
title="<?= _("Delete") ?>"
|
||||
data-confirm-title="<?= _("Delete") ?>"
|
||||
data-confirm-message="<?= sprintf(_("Are you sure you want to delete backup %s?"), $key) ?>"
|
||||
>
|
||||
<i class="fas fa-trash icon-red"></i>
|
||||
<span class="u-hide-desktop"><?= _("Delete") ?></span>
|
||||
</a>
|
||||
</li>
|
||||
<?php } ?>
|
||||
</ul>
|
||||
<?php } ?>
|
||||
</div>
|
||||
<div class="units-table-cell u-text-center-desktop">
|
||||
<span class="u-hide-desktop u-text-bold"><?= _("Date") ?>:</span>
|
||||
<span class="u-text-bold">
|
||||
<?= translate_date($data[$key]["DATE"]) ?>
|
||||
</span>
|
||||
</div>
|
||||
<div class="units-table-cell u-text-center-desktop">
|
||||
<span class="u-hide-desktop u-text-bold"><?= _("Size") ?>:</span>
|
||||
<span class="u-text-bold">
|
||||
<?= humanize_usage_size($data[$key]["SIZE"]) ?>
|
||||
</span>
|
||||
<span class="u-text-small">
|
||||
<?= humanize_usage_measure($data[$key]["SIZE"]) ?>
|
||||
</span>
|
||||
</div>
|
||||
<div class="units-table-cell u-text-center-desktop">
|
||||
<span class="u-hide-desktop u-text-bold"><?= _("Type") ?>:</span>
|
||||
<?= $data[$key]["TYPE"] ?>
|
||||
</div>
|
||||
<div class="units-table-cell u-text-center-desktop">
|
||||
<span class="u-hide-desktop u-text-bold"><?= _("Runtime") ?>:</span>
|
||||
<?= humanize_time($data[$key]["RUNTIME"]) ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php } ?>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<footer class="app-footer">
|
||||
<div class="container app-footer-inner">
|
||||
<p>
|
||||
<?php printf(ngettext("%d backup", "%d backups", $i), $i); ?>
|
||||
</p>
|
||||
</div>
|
||||
</footer>
|
||||
284
web/templates/pages/list_backup_detail.php
Normal file
284
web/templates/pages/list_backup_detail.php
Normal file
@@ -0,0 +1,284 @@
|
||||
<!-- Begin toolbar -->
|
||||
<div class="toolbar">
|
||||
<div class="toolbar-inner">
|
||||
<div class="toolbar-buttons">
|
||||
<a class="button button-secondary button-back js-button-back" href="/list/backup/"><i class="fas fa-arrow-left icon-blue"></i><?= _("Back") ?></a>
|
||||
<a href="/schedule/restore/?token=<?= $_SESSION["token"] ?>&backup=<?= htmlentities($_GET["backup"]) ?>" class="button button-secondary"><i class="fas fa-arrow-rotate-left icon-green"></i><?= _("Restore All") ?></a>
|
||||
</div>
|
||||
<div class="toolbar-right">
|
||||
<form x-data x-bind="BulkEdit" action="/bulk/restore/" method="post">
|
||||
<input type="hidden" name="token" value="<?= $_SESSION["token"] ?>">
|
||||
<input type="hidden" name="backup" value="<?= htmlentities($_GET["backup"]) ?>">
|
||||
<select class="form-select" name="action">
|
||||
<option value=""><?= _("Apply to selected") ?></option>
|
||||
<option value="restore"><?= _("Restore") ?></option>
|
||||
</select>
|
||||
<button type="submit" class="toolbar-input-submit" title="<?= _("Apply to selected") ?>">
|
||||
<i class="fas fa-arrow-right"></i>
|
||||
</button>
|
||||
</form>
|
||||
<div class="toolbar-search">
|
||||
<form action="/search/" method="get">
|
||||
<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>
|
||||
</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- End toolbar -->
|
||||
|
||||
<div class="container">
|
||||
|
||||
<h1 class="u-text-center u-hide-desktop u-mt20 u-pr30 u-mb20 u-pl30"><?= _("Backup Details") ?></h1>
|
||||
|
||||
<div class="units-table js-units-container">
|
||||
<div class="units-table-header">
|
||||
<div class="units-table-cell">
|
||||
<input type="checkbox" class="js-toggle-all-checkbox" title="<?= _("Select all") ?>" <?= $display_mode ?>>
|
||||
</div>
|
||||
<div class="units-table-cell"><?= _("Type") ?></div>
|
||||
<div class="units-table-cell"><?= _("Details") ?></div>
|
||||
<div class="units-table-cell"><?= _("Restore") ?></div>
|
||||
</div>
|
||||
|
||||
<!-- List web domains -->
|
||||
<?php
|
||||
$backup = htmlentities($_GET['backup']);
|
||||
$web = explode(',',$data[$backup]['WEB']);
|
||||
foreach ($web as $key) {
|
||||
if (!empty($key)) {
|
||||
++$i;
|
||||
?>
|
||||
<div class="units-table-row js-unit">
|
||||
<div class="units-table-cell">
|
||||
<div>
|
||||
<input id="check<?= $i ?>" class="js-unit-checkbox" type="checkbox" name="web[]" value="<?= $key ?>">
|
||||
<label for="check<?= $i ?>" class="u-hide-desktop"><?= _("Select") ?></label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="units-table-cell units-table-heading-cell">
|
||||
<span class="u-hide-desktop u-text-bold"><?= _("Type") ?>:</span>
|
||||
<?= _("Web Domain") ?>
|
||||
</div>
|
||||
<div class="units-table-cell u-text-bold">
|
||||
<span class="u-hide-desktop"><?= _("Details") ?>:</span>
|
||||
<?= $key ?>
|
||||
</div>
|
||||
<div class="units-table-cell">
|
||||
<ul class="units-table-row-actions">
|
||||
<li class="units-table-row-action shortcut-enter" data-key-action="href">
|
||||
<a
|
||||
class="units-table-row-action-link"
|
||||
href="/schedule/restore/?backup=<?= $backup ?>&type=web&object=<?= $key ?>&token=<?= $_SESSION["token"] ?>"
|
||||
title="<?= _("Restore") ?>"
|
||||
>
|
||||
<i class="fas fa-arrow-rotate-left icon-green"></i>
|
||||
<span class="u-hide-desktop"><?= _("Restore") ?></span>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<?php }} ?>
|
||||
|
||||
<!-- List mail domains -->
|
||||
<?php
|
||||
$mail = explode(',',$data[$backup]['MAIL']);
|
||||
foreach ($mail as $key) {
|
||||
if (!empty($key)) {
|
||||
?>
|
||||
<div class="units-table-row js-unit">
|
||||
<div class="units-table-cell">
|
||||
<div>
|
||||
<input id="check2<?= $i ?>" class="js-unit-checkbox" type="checkbox" name="mail[]" value="<?= $key ?>">
|
||||
<label for="check2<?= $i ?>" class="u-hide-desktop"><?= _("Select") ?></label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="units-table-cell units-table-heading-cell">
|
||||
<span class="u-hide-desktop u-text-bold"><?= _("Type") ?>:</span>
|
||||
<?= _("Mail Domain") ?>
|
||||
</div>
|
||||
<div class="units-table-cell u-text-bold">
|
||||
<span class="u-hide-desktop"><?= _("Details") ?>:</span>
|
||||
<?= $key ?>
|
||||
</div>
|
||||
<div class="units-table-cell">
|
||||
<ul class="units-table-row-actions">
|
||||
<li class="units-table-row-action shortcut-enter" data-key-action="href">
|
||||
<a
|
||||
class="units-table-row-action-link"
|
||||
href="/schedule/restore/?backup=<?= $backup ?>&type=mail&object=<?= $key ?>&token=<?= $_SESSION["token"] ?>"
|
||||
title="<?= _("Restore") ?>"
|
||||
>
|
||||
<i class="fas fa-arrow-rotate-left icon-green"></i>
|
||||
<span class="u-hide-desktop"><?= _("Restore") ?></span>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<?php }} ?>
|
||||
|
||||
<!-- List DNS zones -->
|
||||
<?php
|
||||
$dns = explode(',',$data[$backup]['DNS']);
|
||||
foreach ($dns as $key) {
|
||||
if (!empty($key)) {
|
||||
?>
|
||||
<div class="units-table-row js-unit">
|
||||
<div class="units-table-cell">
|
||||
<div>
|
||||
<input id="check3<?= $i ?>" class="js-unit-checkbox" type="checkbox" name="dns[]" value="<?= $key ?>">
|
||||
<label for="check3<?= $i ?>" class="u-hide-desktop"><?= _("Select") ?></label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="units-table-cell units-table-heading-cell">
|
||||
<span class="u-hide-desktop u-text-bold"><?= _("Type") ?>:</span>
|
||||
<?= _("DNS Zone") ?>
|
||||
</div>
|
||||
<div class="units-table-cell u-text-bold">
|
||||
<span class="u-hide-desktop"><?= _("Details") ?>:</span>
|
||||
<?= $key ?>
|
||||
</div>
|
||||
<div class="units-table-cell">
|
||||
<ul class="units-table-row-actions">
|
||||
<li class="units-table-row-action shortcut-enter" data-key-action="href">
|
||||
<a
|
||||
class="units-table-row-action-link"
|
||||
href="/schedule/restore/?backup=<?= $backup ?>&type=dns&object=<?= $key ?>&token=<?= $_SESSION["token"] ?>"
|
||||
title="<?= _("Restore") ?>"
|
||||
>
|
||||
<i class="fas fa-arrow-rotate-left icon-green"></i>
|
||||
<span class="u-hide-desktop"><?= _("Restore") ?></span>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<?php }} ?>
|
||||
|
||||
<!-- List Databases -->
|
||||
<?php
|
||||
$db = explode(',',$data[$backup]['DB']);
|
||||
foreach ($db as $key) {
|
||||
if (!empty($key)) {
|
||||
?>
|
||||
<div class="units-table-row js-unit">
|
||||
<div class="units-table-cell">
|
||||
<div>
|
||||
<input id="check4<?= $i ?>" class="js-unit-checkbox" type="checkbox" name="db[]" value="<?= $key ?>">
|
||||
<label for="check4<?= $i ?>" class="u-hide-desktop"><?= _("Select") ?></label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="units-table-cell units-table-heading-cell">
|
||||
<span class="u-hide-desktop u-text-bold"><?= _("Type") ?>:</span>
|
||||
<?= _("Database") ?>
|
||||
</div>
|
||||
<div class="units-table-cell u-text-bold">
|
||||
<span class="u-hide-desktop"><?= _("Details") ?>:</span>
|
||||
<?= $key ?>
|
||||
</div>
|
||||
<div class="units-table-cell">
|
||||
<ul class="units-table-row-actions">
|
||||
<li class="units-table-row-action shortcut-enter" data-key-action="href">
|
||||
<a
|
||||
class="units-table-row-action-link"
|
||||
href="/schedule/restore/?backup=<?= $backup ?>&type=db&object=<?= $key ?>&token=<?= $_SESSION["token"] ?>"
|
||||
title="<?= _("Restore") ?>"
|
||||
>
|
||||
<i class="fas fa-arrow-rotate-left icon-green"></i>
|
||||
<span class="u-hide-desktop"><?= _("Restore") ?></span>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<?php }} ?>
|
||||
|
||||
<!-- List Cron Jobs -->
|
||||
<?php if (!empty($data[$backup]["CRON"])) {
|
||||
if (!empty($key)) { ?>
|
||||
<div class="units-table-row js-unit">
|
||||
<div class="units-table-cell">
|
||||
<div>
|
||||
<input id="check5<?= $i ?>" class="js-unit-checkbox" type="checkbox" name="check" value="<?= $key ?>">
|
||||
<label for="check5<?= $i ?>" class="u-hide-desktop"><?= _("Select") ?></label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="units-table-cell units-table-heading-cell">
|
||||
<span class="u-hide-desktop u-text-bold"><?= _("Type") ?>:</span>
|
||||
<?= _("Cron Jobs") ?>
|
||||
</div>
|
||||
<div class="units-table-cell u-text-bold">
|
||||
<span class="u-hide-desktop"><?= _("Details") ?>:</span>
|
||||
<?= _("Jobs") ?>
|
||||
</div>
|
||||
<div class="units-table-cell">
|
||||
<ul class="units-table-row-actions">
|
||||
<li class="units-table-row-action shortcut-enter" data-key-action="href">
|
||||
<a
|
||||
class="units-table-row-action-link"
|
||||
href="/schedule/restore/?backup=<?= $backup ?>&type=cron&object=records&token=<?= $_SESSION["token"] ?>"
|
||||
title="<?= _("Restore") ?>"
|
||||
>
|
||||
<i class="fas fa-arrow-rotate-left icon-green"></i>
|
||||
<span class="u-hide-desktop"><?= _("Restore") ?></span>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<?php }} ?>
|
||||
|
||||
<!-- List user directories -->
|
||||
<?php
|
||||
$udir = explode(',',$data[$backup]['UDIR']);
|
||||
foreach ($udir as $key) {
|
||||
if (!empty($key)) {
|
||||
?>
|
||||
<div class="units-table-row js-unit">
|
||||
<div class="units-table-cell">
|
||||
<div>
|
||||
<input id="check6<?= $i ?>" class="js-unit-checkbox" type="checkbox" name="udir[]" value="<?= $key ?>">
|
||||
<label for="check6<?= $i ?>" class="u-hide-desktop"><?= _("Select") ?></label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="units-table-cell units-table-heading-cell">
|
||||
<span class="u-hide-desktop u-text-bold"><?= _("Type") ?>:</span>
|
||||
<?= _("User Directory") ?>
|
||||
</div>
|
||||
<div class="units-table-cell u-text-bold">
|
||||
<span class="u-hide-desktop"><?= _("Details") ?>:</span>
|
||||
<?= $key ?>
|
||||
</div>
|
||||
<div class="units-table-cell">
|
||||
<ul class="units-table-row-actions">
|
||||
<li class="units-table-row-action shortcut-enter" data-key-action="href">
|
||||
<a
|
||||
class="units-table-row-action-link"
|
||||
href="/schedule/restore/?backup=<?= $backup ?>&type=udir&object=<?= $key ?>&token=<?= $_SESSION["token"] ?>"
|
||||
title="<?= _("Restore") ?>"
|
||||
>
|
||||
<i class="fas fa-arrow-rotate-left icon-green"></i>
|
||||
<span class="u-hide-desktop"><?= _("Restore") ?></span>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<?php }} ?>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<footer class="app-footer">
|
||||
<div class="container app-footer-inner">
|
||||
<p>
|
||||
<?php printf(ngettext("%d item", "%d items", $i), $i); ?>
|
||||
</p>
|
||||
</div>
|
||||
</footer>
|
||||
62
web/templates/pages/list_backup_exclusions.php
Normal file
62
web/templates/pages/list_backup_exclusions.php
Normal file
@@ -0,0 +1,62 @@
|
||||
<!-- Begin toolbar -->
|
||||
<div class="toolbar">
|
||||
<div class="toolbar-inner">
|
||||
<div class="toolbar-buttons">
|
||||
<a class="button button-secondary button-back js-button-back" href="/list/backup/">
|
||||
<i class="fas fa-arrow-left icon-blue"></i><?= _("Back") ?>
|
||||
</a>
|
||||
<a href="/edit/backup/exclusions/" class="button button-secondary">
|
||||
<i class="fas fa-pencil icon-orange"></i><?= _("Edit Backup Exclusions") ?>
|
||||
</a>
|
||||
</div>
|
||||
<div class="toolbar-right">
|
||||
<div class="toolbar-search">
|
||||
<form action="/search/" method="get">
|
||||
<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>
|
||||
</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- End toolbar -->
|
||||
|
||||
<div class="container">
|
||||
|
||||
<h1 class="u-text-center u-hide-desktop u-mt20 u-pr30 u-mb20 u-pl30"><?= _("Backup Exclusions") ?></h1>
|
||||
|
||||
<div class="units-table js-units-container">
|
||||
<div class="units-table-header">
|
||||
<div class="units-table-cell"><?= _("Type") ?></div>
|
||||
<div class="units-table-cell"><?= _("Value") ?></div>
|
||||
</div>
|
||||
|
||||
<!-- Begin list of backup exclusions by type -->
|
||||
<?php foreach ($data as $key => $value) { ?>
|
||||
<div class="units-table-row js-unit">
|
||||
<div class="units-table-cell units-table-heading-cell u-text-bold">
|
||||
<span class="u-hide-desktop"><?= _("Type") ?>:</span>
|
||||
<?= $key ?>
|
||||
</div>
|
||||
<div class="units-table-cell">
|
||||
<span class="u-hide-desktop u-text-bold"><?= _("Value") ?>:</span>
|
||||
<?php
|
||||
if (empty($value)) {
|
||||
echo _("No exclusions");
|
||||
}
|
||||
foreach ($value as $ex_key => $ex_value) {
|
||||
echo "<span class='u-text-bold'>" . $ex_key . " </span>" . $ex_value . "<br>";
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
<?php } ?>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<footer class="app-footer">
|
||||
</footer>
|
||||
199
web/templates/pages/list_cron.php
Normal file
199
web/templates/pages/list_cron.php
Normal file
@@ -0,0 +1,199 @@
|
||||
<!-- Begin toolbar -->
|
||||
<div class="toolbar">
|
||||
<div class="toolbar-inner">
|
||||
<div class="toolbar-buttons">
|
||||
<?php if ($read_only !== "true") { ?>
|
||||
<a href="/add/cron/" class="button button-secondary js-button-create">
|
||||
<i class="fas fa-circle-plus icon-green"></i><?= _("Add Cron Job") ?>
|
||||
</a>
|
||||
<?php if ($panel[$user_plain]["CRON_REPORTS"] == "yes") { ?>
|
||||
<a class="button button-secondary" href="/delete/cron/reports/?token=<?= $_SESSION["token"] ?>">
|
||||
<i class="fas fa-toggle-off icon-green"></i><?= _("Disable Notifications") ?>
|
||||
</a>
|
||||
<?php } else { ?>
|
||||
<a class="button button-secondary" href="/add/cron/reports/?token=<?= $_SESSION["token"] ?>">
|
||||
<i class="fas fa-toggle-off"></i><?= _("Enable Notifications") ?>
|
||||
</a>
|
||||
<?php } ?>
|
||||
<?php } ?>
|
||||
</div>
|
||||
<div class="toolbar-right">
|
||||
<div class="toolbar-sorting">
|
||||
<button class="toolbar-sorting-toggle js-toggle-sorting-menu" type="button" title="<?= _("Sort items") ?>">
|
||||
<?= _("Sort by") ?>:
|
||||
<span class="u-text-bold">
|
||||
<?php if ($_SESSION['userSortOrder'] === 'name') { $label = _('Command'); } else { $label = _('Date'); } ?>
|
||||
<?= $label ?> <i class="fas fa-arrow-down-a-z"></i>
|
||||
</span>
|
||||
</button>
|
||||
<ul class="toolbar-sorting-menu js-sorting-menu u-hidden">
|
||||
<li data-entity="sort-name">
|
||||
<span class="name <?php if ($_SESSION['userSortOrder'] === 'name') { echo 'active'; } ?>"><?= _("Command") ?> <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 data-entity="sort-date" data-sort-as-int="1">
|
||||
<span class="name <?php if ($_SESSION['userSortOrder'] === 'date') { echo 'active'; } ?>"><?= _("Date") ?> <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") { ?>
|
||||
<form x-data x-bind="BulkEdit" action="/bulk/cron/" method="post">
|
||||
<input type="hidden" name="token" value="<?= $_SESSION["token"] ?>">
|
||||
<select class="form-select" name="action">
|
||||
<option value=""><?= _("Apply to selected") ?></option>
|
||||
<?php if ($panel[$user_plain]['CRON_REPORTS'] == 'yes') echo '<option value="delete-cron-reports">' . _('Disable Notifications') . '</option>'; ?>
|
||||
<?php if ($panel[$user_plain]['CRON_REPORTS'] == 'no') echo '<option value="add-cron-reports">' . _('Enable Notifications') . '</option>'; ?>
|
||||
<option value="suspend"><?= _("Suspend") ?></option>
|
||||
<option value="unsuspend"><?= _("Unsuspend") ?></option>
|
||||
<option value="delete"><?= _("Delete") ?></option>
|
||||
</select>
|
||||
<button type="submit" class="toolbar-input-submit" title="<?= _("Apply to selected") ?>">
|
||||
<i class="fas fa-arrow-right"></i>
|
||||
</button>
|
||||
</form>
|
||||
<?php } ?>
|
||||
</div>
|
||||
<div class="toolbar-search">
|
||||
<form action="/search/" method="get">
|
||||
<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>
|
||||
</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- End toolbar -->
|
||||
|
||||
<div class="container">
|
||||
|
||||
<h1 class="u-text-center u-hide-desktop u-mt20 u-pr30 u-mb20 u-pl30"><?= _("Cron Jobs") ?></h1>
|
||||
|
||||
<div class="units-table js-units-container">
|
||||
<div class="units-table-header">
|
||||
<div class="units-table-cell">
|
||||
<input type="checkbox" class="js-toggle-all-checkbox" title="<?= _("Select all") ?>" <?= $display_mode ?>>
|
||||
</div>
|
||||
<div class="units-table-cell"><?= _("Command") ?></div>
|
||||
<div class="units-table-cell"></div>
|
||||
<div class="units-table-cell u-text-center"><?= _("Minute") ?></div>
|
||||
<div class="units-table-cell u-text-center"><?= _("Hour") ?></div>
|
||||
<div class="units-table-cell u-text-center"><?= _("Day") ?></div>
|
||||
<div class="units-table-cell u-text-center"><?= _("Month") ?></div>
|
||||
<div class="units-table-cell u-text-center"><?= _("Day of Week") ?></div>
|
||||
</div>
|
||||
|
||||
<!-- Begin cron job list item loop -->
|
||||
<?php
|
||||
foreach ($data as $key => $value) {
|
||||
++$i;
|
||||
if ($data[$key]['SUSPENDED'] == 'yes') {
|
||||
$status = 'suspended';
|
||||
$spnd_action = 'unsuspend';
|
||||
$spnd_action_title = _('Unsuspend');
|
||||
$spnd_icon = 'fa-play';
|
||||
$spnd_icon_class = 'icon-green';
|
||||
$spnd_confirmation = _('Are you sure you want to unsuspend this cron job?') ;
|
||||
} else {
|
||||
$status = 'active';
|
||||
$spnd_action = 'suspend';
|
||||
$spnd_action_title = _('Suspend');
|
||||
$spnd_icon = 'fa-pause';
|
||||
$spnd_icon_class = 'icon-highlight';
|
||||
$spnd_confirmation = _('Are you sure you want to suspend this cron job?') ;
|
||||
}
|
||||
?>
|
||||
<div class="units-table-row <?php if ($status == 'suspended') echo 'disabled'; ?> js-unit"
|
||||
data-sort-date="<?= strtotime($data[$key]['DATE'].' '.$data[$key]['TIME']) ?>"
|
||||
data-sort-name="<?= htmlspecialchars($data[$key]['CMD'], ENT_NOQUOTES) ?>">
|
||||
<div class="units-table-cell">
|
||||
<div>
|
||||
<input id="check<?= $i ?>" class="js-unit-checkbox" type="checkbox" title="<?= _("Select") ?>" name="job[]" value="<?= $key ?>" <?= $display_mode ?>>
|
||||
<label for="check<?= $i ?>" class="u-hide-desktop"><?= _("Select") ?></label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="units-table-cell units-table-heading-cell u-text-bold">
|
||||
<span class="u-hide-desktop"><?= _("Command") ?>:</span>
|
||||
<?php if ($read_only === "true" || $data[$key]["SUSPENDED"] == "yes") { ?>
|
||||
<?= htmlspecialchars($data[$key]["CMD"], ENT_NOQUOTES) ?>
|
||||
<?php } else { ?>
|
||||
<a href="/edit/cron/?job=<?= $data[$key]["JOB"] ?>&token=<?= $_SESSION["token"] ?>" title="<?= _("Edit Cron Job") ?>: <?= htmlspecialchars($data[$key]["CMD"], ENT_NOQUOTES) ?>">
|
||||
<?= htmlspecialchars($data[$key]["CMD"], ENT_NOQUOTES) ?>
|
||||
</a>
|
||||
<?php } ?>
|
||||
</div>
|
||||
<div class="units-table-cell">
|
||||
<?php if (!$read_only) { ?>
|
||||
<ul class="units-table-row-actions">
|
||||
<?php if ($data[$key]["SUSPENDED"] == "no") { ?>
|
||||
<li class="units-table-row-action shortcut-enter" data-key-action="href">
|
||||
<a
|
||||
class="units-table-row-action-link"
|
||||
href="/edit/cron/?job=<?= $data[$key]["JOB"] ?>&token=<?= $_SESSION["token"] ?>"
|
||||
title="<?= _("Edit") ?>"
|
||||
>
|
||||
<i class="fas fa-pencil icon-orange"></i>
|
||||
<span class="u-hide-desktop"><?= _("Edit") ?></span>
|
||||
</a>
|
||||
</li>
|
||||
<?php } ?>
|
||||
<li class="units-table-row-action shortcut-s" data-key-action="js">
|
||||
<a
|
||||
class="units-table-row-action-link data-controls js-confirm-action"
|
||||
href="/<?= $spnd_action ?>/cron/?job=<?= $data[$key]["JOB"] ?>&token=<?= $_SESSION["token"] ?>"
|
||||
title="<?= $spnd_action_title ?>"
|
||||
data-confirm-title="<?= $spnd_action_title ?>"
|
||||
data-confirm-message="<?= sprintf($spnd_confirmation, $key) ?>"
|
||||
>
|
||||
<i class="fas <?= $spnd_icon ?> <?= $spnd_icon_class ?>"></i>
|
||||
<span class="u-hide-desktop"><?= $spnd_action_title ?></span>
|
||||
</a>
|
||||
</li>
|
||||
<li class="units-table-row-action shortcut-delete" data-key-action="js">
|
||||
<a
|
||||
class="units-table-row-action-link data-controls js-confirm-action"
|
||||
href="/delete/cron/?job=<?= $data[$key]["JOB"] ?>&token=<?= $_SESSION["token"] ?>"
|
||||
title="<?= _("Delete") ?>"
|
||||
data-confirm-title="<?= _("Delete") ?>"
|
||||
data-confirm-message="<?= sprintf(_("Are you sure you want to delete this cron job?"), $key) ?>"
|
||||
>
|
||||
<i class="fas fa-trash icon-red"></i>
|
||||
<span class="u-hide-desktop"><?= _("Delete") ?></span>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
<?php } ?>
|
||||
</div>
|
||||
<div class="units-table-cell u-text-center-desktop">
|
||||
<span class="u-hide-desktop u-text-bold"><?= _("Minute") ?>:</span>
|
||||
<?= $data[$key]["MIN"] ?>
|
||||
</div>
|
||||
<div class="units-table-cell u-text-center-desktop">
|
||||
<span class="u-hide-desktop u-text-bold"><?= _("Hour") ?>:</span>
|
||||
<?= $data[$key]["HOUR"] ?>
|
||||
</div>
|
||||
<div class="units-table-cell u-text-center-desktop">
|
||||
<span class="u-hide-desktop u-text-bold"><?= _("Day") ?>:</span>
|
||||
<?= $data[$key]["DAY"] ?>
|
||||
</div>
|
||||
<div class="units-table-cell u-text-center-desktop">
|
||||
<span class="u-hide-desktop u-text-bold"><?= _("Month") ?>:</span>
|
||||
<?= $data[$key]["MONTH"] ?>
|
||||
</div>
|
||||
<div class="units-table-cell u-text-center-desktop">
|
||||
<span class="u-hide-desktop u-text-bold"><?= _("Day of Week") ?>:</span>
|
||||
<?= $data[$key]["WDAY"] ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php } ?>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<footer class="app-footer">
|
||||
<div class="container app-footer-inner">
|
||||
<p>
|
||||
<?php printf(ngettext("%d cron job", "%d cron jobs", $i), $i); ?>
|
||||
</p>
|
||||
</div>
|
||||
</footer>
|
||||
270
web/templates/pages/list_db.php
Normal file
270
web/templates/pages/list_db.php
Normal file
@@ -0,0 +1,270 @@
|
||||
<?php
|
||||
[$http_host, $port] = explode(":", $_SERVER["HTTP_HOST"] . ":");
|
||||
$db_myadmin_link = "//" . $http_host . "/phpmyadmin/";
|
||||
$db_pgadmin_link = "//" . $http_host . "/phppgadmin/";
|
||||
|
||||
if (!empty($_SESSION["DB_PMA_ALIAS"])) {
|
||||
$db_myadmin_link = "//" . $http_host . "/" . $_SESSION["DB_PMA_ALIAS"] . "/";
|
||||
}
|
||||
if (!empty($_SESSION["DB_PGA_ALIAS"])) {
|
||||
$db_pgadmin_link = "//" . $http_host . "/" . $_SESSION["DB_PGA_ALIAS"] . "/";
|
||||
}
|
||||
?>
|
||||
|
||||
<!-- Begin toolbar -->
|
||||
<div class="toolbar">
|
||||
<div class="toolbar-inner">
|
||||
<div class="toolbar-buttons">
|
||||
<?php if ($read_only !== "true") { ?>
|
||||
<a href="/add/db/" class="button button-secondary js-button-create">
|
||||
<i class="fas fa-circle-plus icon-green"></i><?= _("Add Database") ?>
|
||||
</a>
|
||||
<?php if ($_SESSION["DB_SYSTEM"] === "mysql" || $_SESSION["DB_SYSTEM"] === "mysql,pgsql" || $_SESSION["DB_SYSTEM"] === "pgsql,mysql") { ?>
|
||||
<a class="button button-secondary <?= ipUsed() ? "button-suspended" : "" ?>" href="<?= $db_myadmin_link ?>" target="_blank">
|
||||
<i class="fas fa-database icon-orange"></i>phpMyAdmin
|
||||
</a>
|
||||
<?php } ?>
|
||||
<?php if ($_SESSION["DB_SYSTEM"] === "pgsql" || $_SESSION["DB_SYSTEM"] === "mysql,pgsql" || $_SESSION["DB_SYSTEM"] === "pgsql,mysql") { ?>
|
||||
<a class="button button-secondary <?= ipUsed() ? "button-suspended" : "" ?>" href="<?= $db_pgadmin_link ?>" target="_blank">
|
||||
<i class="fas fa-database icon-orange"></i>phpPgAdmin
|
||||
</a>
|
||||
<?php } ?>
|
||||
<?php if (ipUsed()) { ?>
|
||||
<a target="_blank" href="https://hestiacp.com/docs/server-administration/databases.html#why-i-can-t-use-http-ip-phpmyadmin">
|
||||
<i class="fas fa-circle-question"></i>
|
||||
</a>
|
||||
<?php } ?>
|
||||
<?php } ?>
|
||||
</div>
|
||||
<div class="toolbar-right">
|
||||
<div class="toolbar-sorting">
|
||||
<button class="toolbar-sorting-toggle js-toggle-sorting-menu" type="button" title="<?= _("Sort items") ?>">
|
||||
<?= _("Sort by") ?>:
|
||||
<span class="u-text-bold">
|
||||
<?php if ($_SESSION['userSortOrder'] === 'name') { $label = _('Name'); } else { $label = _('Date'); } ?>
|
||||
<?= $label ?> <i class="fas fa-arrow-down-a-z"></i>
|
||||
</span>
|
||||
</button>
|
||||
<ul class="toolbar-sorting-menu js-sorting-menu u-hidden">
|
||||
<li data-entity="sort-charset">
|
||||
<span class="name"><?= _("Charset") ?> <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 data-entity="sort-date" data-sort-as-int="1">
|
||||
<span class="name <?php if ($_SESSION['userSortOrder'] === 'date') { echo 'active'; } ?>"><?= _("Date") ?> <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 data-entity="sort-disk" data-sort-as-int="1">
|
||||
<span class="name"><?= _("Disk") ?> <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 data-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 data-entity="sort-server">
|
||||
<span class="name"><?= _("Host") ?> <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 data-entity="sort-user">
|
||||
<span class="name"><?= _("Username") ?> <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") { ?>
|
||||
<form x-data x-bind="BulkEdit" action="/bulk/db/" method="post">
|
||||
<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") { ?>
|
||||
<option value="rebuild"><?= _("Rebuild All") ?></option>
|
||||
<option value="suspend"><?= _("Suspend All") ?></option>
|
||||
<option value="unsuspend"><?= _("Unsuspend All") ?></option>
|
||||
<?php } ?>
|
||||
<option value="delete"><?= _("Delete") ?></option>
|
||||
</select>
|
||||
<button type="submit" class="toolbar-input-submit" title="<?= _("Apply to selected") ?>">
|
||||
<i class="fas fa-arrow-right"></i>
|
||||
</button>
|
||||
</form>
|
||||
<?php } ?>
|
||||
</div>
|
||||
<div class="toolbar-search">
|
||||
<form action="/search/" method="get">
|
||||
<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>
|
||||
</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- End toolbar -->
|
||||
|
||||
<div class="container">
|
||||
|
||||
<h1 class="u-text-center u-hide-desktop u-mt20 u-pr30 u-mb20 u-pl30"><?= _("Databases") ?></h1>
|
||||
|
||||
<div class="units-table js-units-container">
|
||||
<div class="units-table-header">
|
||||
<div class="units-table-cell">
|
||||
<input type="checkbox" class="js-toggle-all-checkbox" title="<?= _("Select all") ?>" <?= $display_mode ?>>
|
||||
</div>
|
||||
<div class="units-table-cell"><?= _("Name") ?></div>
|
||||
<div class="units-table-cell"></div>
|
||||
<div class="units-table-cell u-text-center"><?= _("Disk") ?></div>
|
||||
<div class="units-table-cell u-text-center"><?= _("Type") ?></div>
|
||||
<div class="units-table-cell u-text-center"><?= _("Username") ?></div>
|
||||
<div class="units-table-cell u-text-center"><?= _("Hostname") ?></div>
|
||||
<div class="units-table-cell u-text-center"><?= _("Charset") ?></div>
|
||||
</div>
|
||||
|
||||
<!-- Begin database list item loop -->
|
||||
<?php
|
||||
list($http_host, $port) = explode(':', $_SERVER["HTTP_HOST"].":");
|
||||
foreach ($data as $key => $value) {
|
||||
++$i;
|
||||
if ($data[$key]['SUSPENDED'] == 'yes') {
|
||||
$status = 'suspended';
|
||||
$spnd_action = 'unsuspend';
|
||||
$spnd_action_title = _('Unsuspend');
|
||||
$spnd_icon = 'fa-play';
|
||||
$spnd_icon_class = 'icon-green';
|
||||
$spnd_confirmation = _('Are you sure you want to unsuspend database %s?') ;
|
||||
} else {
|
||||
$status = 'active';
|
||||
$spnd_action = 'suspend';
|
||||
$spnd_action_title = _('Suspend');
|
||||
$spnd_icon = 'fa-pause';
|
||||
$spnd_icon_class = 'icon-highlight';
|
||||
$spnd_confirmation = _('Are you sure you want to suspend database %s?') ;
|
||||
}
|
||||
if ($data[$key]['HOST'] != 'localhost' ) $http_host = $data[$key]['HOST'];
|
||||
if ($data[$key]['TYPE'] == 'mysql') $db_admin = "phpMyAdmin";
|
||||
if ($data[$key]['TYPE'] == 'mysql') $db_admin_link = "https://".$http_host."/phpmyadmin/";
|
||||
if (($data[$key]['TYPE'] == 'mysql') && (!empty($_SESSION['DB_PMA_ALIAS']))) $db_admin_link = $_SESSION['DB_PMA_ALIAS'];
|
||||
if ($data[$key]['TYPE'] == 'pgsql') $db_admin = "phpPgAdmin";
|
||||
if ($data[$key]['TYPE'] == 'pgsql') $db_admin_link = "https://".$http_host."/phppgadmin/";
|
||||
if (($data[$key]['TYPE'] == 'pgsql') && (!empty($_SESSION['DB_PGA_ALIAS']))) $db_admin_link = $_SESSION['DB_PGA_ALIAS'];
|
||||
?>
|
||||
<div class="units-table-row <?php if ($data[$key]['SUSPENDED'] == 'yes') echo 'disabled'; ?> js-unit"
|
||||
data-sort-date="<?= strtotime($data[$key]['DATE'].' '.$data[$key]['TIME']) ?>"
|
||||
data-sort-name="<?= $key ?>"
|
||||
data-sort-disk="<?= $data[$key]["U_DISK"] ?>"
|
||||
data-sort-user="<?= $data[$key]["DBUSER"] ?>"
|
||||
data-sort-server="<?= $data[$key]["HOST"] ?>"
|
||||
data-sort-charset="<?= $data[$key]["CHARSET"] ?>">
|
||||
<div class="units-table-cell">
|
||||
<div>
|
||||
<input id="check<?= $i ?>" class="js-unit-checkbox" type="checkbox" title="<?= _("Select") ?>" name="database[]" value="<?= $key ?>" <?= $display_mode ?>>
|
||||
<label for="check<?= $i ?>" class="u-hide-desktop"><?= _("Select") ?></label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="units-table-cell units-table-heading-cell u-text-bold">
|
||||
<span class="u-hide-desktop"><?= _("Name") ?>:</span>
|
||||
<?php if ($read_only === "true" || $data[$key]["SUSPENDED"] == "yes") { ?>
|
||||
<?= $key ?>
|
||||
<?php } else { ?>
|
||||
<a href="/edit/db/?database=<?= $key ?>&token=<?= $_SESSION["token"] ?>" title="<?= _("Edit Database") ?>: <?= $key ?>">
|
||||
<?= $key ?>
|
||||
</a>
|
||||
<?php } ?>
|
||||
</div>
|
||||
<div class="units-table-cell">
|
||||
<?php if (!$read_only) { ?>
|
||||
<ul class="units-table-row-actions">
|
||||
<?php if ($data[$key]["SUSPENDED"] == "no") { ?>
|
||||
<li class="units-table-row-action shortcut-enter" data-key-action="href">
|
||||
<a
|
||||
class="units-table-row-action-link"
|
||||
href="/edit/db/?database=<?= $key ?>&token=<?= $_SESSION["token"] ?>"
|
||||
title="<?= _("Edit Database") ?>"
|
||||
>
|
||||
<i class="fas fa-pencil icon-orange"></i>
|
||||
<span class="u-hide-desktop"><?= _("Edit Database") ?></span>
|
||||
</a>
|
||||
</li>
|
||||
<?php } ?>
|
||||
<?php if ($data[$key]['TYPE'] == 'mysql' && isset($_SESSION['PHPMYADMIN_KEY']) && $_SESSION['PHPMYADMIN_KEY'] != '' && !ipUsed()) { $time = time(); ?>
|
||||
<li class="units-table-row-action shortcut-enter" data-key-action="href">
|
||||
<a
|
||||
class="units-table-row-action-link"
|
||||
href="<?= $db_myadmin_link?>hestia-sso.php?database=<?= $key ?>&user=<?= $user_plain?>&exp=<?= $time?>&hestia_token=<?=password_hash($key.$user_plain.$_SESSION['user_combined_ip'].$time.$_SESSION['PHPMYADMIN_KEY'], PASSWORD_DEFAULT) ?>"
|
||||
title="phpMyAdmin"
|
||||
>
|
||||
<i class="fas fa-right-to-bracket icon-orange"></i>
|
||||
<span class="u-hide-desktop">phpMyAdmin</span>
|
||||
</a>
|
||||
</li>
|
||||
<?php } ?>
|
||||
<li class="units-table-row-action shortcut-enter" data-key-action="href">
|
||||
<a
|
||||
class="units-table-row-action-link"
|
||||
href="/download/database/?database=<?= $key ?>&token=<?= $_SESSION["token"] ?>"
|
||||
title="<?= _("Download Database") ?>"
|
||||
>
|
||||
<i class="fas fa-download icon-orange"></i>
|
||||
<span class="u-hide-desktop"><?= _("Download Database") ?></span>
|
||||
</a>
|
||||
</li>
|
||||
<li class="units-table-row-action shortcut-s" data-key-action="js">
|
||||
<a
|
||||
class="units-table-row-action-link data-controls js-confirm-action"
|
||||
href="/<?= $spnd_action ?>/db/?database=<?= $key ?>&token=<?= $_SESSION["token"] ?>"
|
||||
title="<?= $spnd_action_title ?>"
|
||||
data-confirm-title="<?= $spnd_action_title ?>"
|
||||
data-confirm-message="<?= sprintf($spnd_confirmation, $key) ?>"
|
||||
>
|
||||
<i class="fas <?= $spnd_icon ?> <?= $spnd_icon_class ?>"></i>
|
||||
<span class="u-hide-desktop"><?= $spnd_action_title ?></span>
|
||||
</a>
|
||||
</li>
|
||||
<li class="units-table-row-action shortcut-delete" data-key-action="js">
|
||||
<a
|
||||
class="units-table-row-action-link data-controls js-confirm-action"
|
||||
href="/delete/db/?database=<?= $key ?>&token=<?= $_SESSION["token"] ?>"
|
||||
title="<?= _("Delete") ?>"
|
||||
data-confirm-title="<?= _("Delete") ?>"
|
||||
data-confirm-message="<?= sprintf(_("Are you sure you want to delete database %s?"), $key) ?>"
|
||||
>
|
||||
<i class="fas fa-trash icon-red"></i>
|
||||
<span class="u-hide-desktop"><?= _("Delete") ?></span>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
<?php } ?>
|
||||
</div>
|
||||
<div class="units-table-cell u-text-center-desktop">
|
||||
<span class="u-hide-desktop u-text-bold"><?= _("Disk") ?>:</span>
|
||||
<span class="u-text-bold">
|
||||
<?= humanize_usage_size($data[$key]["U_DISK"]) ?>
|
||||
</span>
|
||||
<span class="u-text-small">
|
||||
<?= humanize_usage_measure($data[$key]["U_DISK"]) ?>
|
||||
</span>
|
||||
</div>
|
||||
<div class="units-table-cell u-text-center-desktop">
|
||||
<span class="u-hide-desktop u-text-bold"><?= _("Type") ?>:</span>
|
||||
<?= $data[$key]["TYPE"] ?>
|
||||
</div>
|
||||
<div class="units-table-cell u-text-bold u-text-center-desktop">
|
||||
<span class="u-hide-desktop"><?= _("Username") ?>:</span>
|
||||
<?= $data[$key]["DBUSER"] ?>
|
||||
</div>
|
||||
<div class="units-table-cell u-text-bold u-text-center-desktop">
|
||||
<span class="u-hide-desktop"><?= _("Hostname") ?>:</span>
|
||||
<?= $data[$key]["HOST"] ?>
|
||||
</div>
|
||||
<div class="units-table-cell u-text-center-desktop">
|
||||
<span class="u-hide-desktop u-text-bold"><?= _("Charset") ?>:</span>
|
||||
<?= $data[$key]["CHARSET"] ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php } ?>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<footer class="app-footer">
|
||||
<div class="container app-footer-inner">
|
||||
<p>
|
||||
<?php printf(ngettext("%d database", "%d databases", $i), $i); ?>
|
||||
</p>
|
||||
</div>
|
||||
</footer>
|
||||
259
web/templates/pages/list_dns.php
Normal file
259
web/templates/pages/list_dns.php
Normal file
@@ -0,0 +1,259 @@
|
||||
<!-- Begin toolbar -->
|
||||
<div class="toolbar">
|
||||
<div class="toolbar-inner">
|
||||
<div class="toolbar-buttons">
|
||||
<?php if ($read_only !== "true") { ?>
|
||||
<a href="/add/dns/" class="button button-secondary js-button-create">
|
||||
<i class="fas fa-circle-plus icon-green"></i><?= _("Add DNS Domain") ?>
|
||||
</a>
|
||||
<?php } ?>
|
||||
</div>
|
||||
<div class="toolbar-right">
|
||||
<div class="toolbar-sorting">
|
||||
<button class="toolbar-sorting-toggle js-toggle-sorting-menu" type="button" title="<?= _("Sort items") ?>">
|
||||
<?= _("Sort by") ?>:
|
||||
<span class="u-text-bold">
|
||||
<?php if ($_SESSION['userSortOrder'] === 'name') { $label = _('Name'); } else { $label = _('Date'); } ?>
|
||||
<?= $label ?> <i class="fas fa-arrow-down-a-z"></i>
|
||||
</span>
|
||||
</button>
|
||||
<ul class="toolbar-sorting-menu js-sorting-menu u-hidden">
|
||||
<li data-entity="sort-date" data-sort-as-int="1">
|
||||
<span class="name <?php if ($_SESSION['userSortOrder'] === 'date') { echo 'active'; } ?>"><?= _("Date") ?> <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 data-entity="sort-expire" data-sort-as-int="1">
|
||||
<span class="name"><?= _("Expire") ?> <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 data-entity="sort-ip">
|
||||
<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>
|
||||
<li data-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 data-entity="sort-records">
|
||||
<span class="name"><?= _("Records") ?> <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") { ?>
|
||||
<form x-data x-bind="BulkEdit" action="/bulk/dns/" method="post">
|
||||
<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") { ?>
|
||||
<option value="rebuild"><?= _("Rebuild") ?></option>
|
||||
<?php } ?>
|
||||
<option value="suspend"><?= _("Suspend") ?></option>
|
||||
<option value="unsuspend"><?= _("Unsuspend") ?></option>
|
||||
<option value="delete"><?= _("Delete") ?></option>
|
||||
</select>
|
||||
<button type="submit" class="toolbar-input-submit" title="<?= _("Apply to selected") ?>">
|
||||
<i class="fas fa-arrow-right"></i>
|
||||
</button>
|
||||
</form>
|
||||
<?php } ?>
|
||||
</div>
|
||||
<div class="toolbar-search">
|
||||
<form action="/search/" method="get">
|
||||
<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>
|
||||
</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- End toolbar -->
|
||||
|
||||
<div class="container">
|
||||
|
||||
<h1 class="u-text-center u-hide-desktop u-mt20 u-pr30 u-mb20 u-pl30"><?= _("DNS Records") ?></h1>
|
||||
|
||||
<div class="units-table js-units-container">
|
||||
<div class="units-table-header">
|
||||
<div class="units-table-cell">
|
||||
<input type="checkbox" class="js-toggle-all-checkbox" title="<?= _("Select all") ?>" <?= $display_mode ?>>
|
||||
</div>
|
||||
<div class="units-table-cell"><?= _("Name") ?></div>
|
||||
<div class="units-table-cell"></div>
|
||||
<div class="units-table-cell u-text-center"><?= _("Records") ?></div>
|
||||
<div class="units-table-cell u-text-center"><?= _("Template") ?></div>
|
||||
<div class="units-table-cell u-text-center"><?= _("TTL") ?></div>
|
||||
<div class="units-table-cell u-text-center"><?= _("SOA") ?></div>
|
||||
<div class="units-table-cell u-text-center"><?= _("DNSSEC") ?></div>
|
||||
<div class="units-table-cell u-text-center"><?= _("Expiration Date") ?></div>
|
||||
</div>
|
||||
|
||||
<!-- Begin DNS zone list item loop -->
|
||||
<?php
|
||||
foreach ($data as $key => $value) {
|
||||
++$i;
|
||||
if ($data[$key]['SUSPENDED'] == 'yes') {
|
||||
$status = 'suspended';
|
||||
$spnd_action = 'unsuspend';
|
||||
$spnd_action_title = _('Unsuspend');
|
||||
$spnd_icon = 'fa-play';
|
||||
$spnd_icon_class = 'icon-green';
|
||||
$spnd_confirmation = _('Are you sure you want to unsuspend domain %s?');
|
||||
if ($data[$key]['DNSSEC'] !== 'yes') {
|
||||
$dnssec_icon = 'fa-circle-xmark';
|
||||
$dnssec_title = _('Disabled');
|
||||
} else {
|
||||
$dnssec_icon = 'fa-circle-check';
|
||||
$dnssec_title = _('Enabled');
|
||||
}
|
||||
} else {
|
||||
$status = 'active';
|
||||
$spnd_action = 'suspend';
|
||||
$spnd_action_title = _('Suspend');
|
||||
$spnd_icon = 'fa-pause';
|
||||
$spnd_icon_class = 'icon-highlight';
|
||||
$spnd_confirmation = _('Are you sure you want to suspend domain %s?');
|
||||
if ($data[$key]['DNSSEC'] !== 'yes') {
|
||||
$dnssec_icon = 'fa-circle-xmark icon-red';
|
||||
$dnssec_title = _('Disabled');
|
||||
} else {
|
||||
$dnssec_icon = 'fa-circle-check icon-green';
|
||||
$dnssec_title = _('Enabled');
|
||||
}
|
||||
}
|
||||
?>
|
||||
<div class="units-table-row <?php if ($status == 'suspended') echo 'disabled'; ?> js-unit"
|
||||
data-sort-ip="<?= str_replace('.', '', $data[$key]['IP']) ?>"
|
||||
data-sort-date="<?= strtotime($data[$key]['DATE'].' '.$data[$key]['TIME']) ?>"
|
||||
data-sort-name="<?= htmlentities($key);?>"
|
||||
data-sort-expire="<?= strtotime($data[$key]['EXP']) ?>"
|
||||
data-sort-records="<?=(int)$data[$key]['RECORDS'] ?>">
|
||||
<div class="units-table-cell">
|
||||
<div>
|
||||
<input id="check<?= $i ?>" class="js-unit-checkbox" type="checkbox" title="<?= _("Select") ?>" name="domain[]" value="<?= $key ?>" <?= $display_mode ?>>
|
||||
<label for="check<?= $i ?>" class="u-hide-desktop"><?= _("Select") ?></label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="units-table-cell units-table-heading-cell u-text-bold">
|
||||
<span class="u-hide-desktop"><?= _("Name") ?>:</span>
|
||||
<a href="/list/dns/?domain=<?= htmlentities($key) ?>&token=<?= $_SESSION["token"] ?>" title="<?= _("DNS Records") ?>: <?= htmlentities($key) ?>">
|
||||
<?= htmlentities($key) ?>
|
||||
</a>
|
||||
<?= empty($data[$key]["SRC"]) ? "" : '<br>⇢ <span class="u-text-small">' . htmlspecialchars($data[$key]["SRC"], ENT_QUOTES) . "</span>" ?>
|
||||
</div>
|
||||
<div class="units-table-cell">
|
||||
<?php if (!$read_only) { ?>
|
||||
<ul class="units-table-row-actions">
|
||||
<?php if ($data[$key]["SUSPENDED"] == "no") { ?>
|
||||
<li class="units-table-row-action shortcut-n" data-key-action="href">
|
||||
<a
|
||||
class="units-table-row-action-link"
|
||||
href="/add/dns/?domain=<?= htmlentities($key) ?>&token=<?= $_SESSION["token"] ?>"
|
||||
title="<?= _("Add DNS Record") ?>"
|
||||
>
|
||||
<i class="fas fa-circle-plus icon-green"></i>
|
||||
<span class="u-hide-desktop"><?= _("Add DNS Record") ?></span>
|
||||
</a>
|
||||
</li>
|
||||
<li class="units-table-row-action shortcut-enter" data-key-action="href">
|
||||
<a
|
||||
class="units-table-row-action-link"
|
||||
href="/edit/dns/?domain=<?= htmlentities($key) ?>&token=<?= $_SESSION["token"] ?>"
|
||||
title="<?= _("Edit DNS Domain") ?>"
|
||||
>
|
||||
<i class="fas fa-pencil icon-orange"></i>
|
||||
<span class="u-hide-desktop"><?= _("Edit DNS Domain") ?></span>
|
||||
</a>
|
||||
</li>
|
||||
<?php if ($data[$key]["DNSSEC"] == "yes") { ?>
|
||||
<li class="units-table-row-action shortcut-enter" data-key-action="href">
|
||||
<a
|
||||
class="units-table-row-action-link"
|
||||
href="/list/dns/?domain=<?= htmlentities($key) ?>&action=dnssec&token=<?= $_SESSION["token"] ?>"
|
||||
title="<?= _("View Public DNSSEC Key") ?>"
|
||||
>
|
||||
<i class="fas fa-key icon-orange"></i>
|
||||
<span class="u-hide-desktop"><?= _("View Public DNSSEC Key") ?></span>
|
||||
</a>
|
||||
</li>
|
||||
<?php } ?>
|
||||
<?php } ?>
|
||||
<li class="units-table-row-action shortcut-l" data-key-action="href">
|
||||
<a
|
||||
class="units-table-row-action-link"
|
||||
href="/list/dns/?domain=<?= htmlentities($key) ?>&token=<?= $_SESSION["token"] ?>"
|
||||
title="<?= _("DNS Records") ?>"
|
||||
>
|
||||
<i class="fas fa-list icon-lightblue"></i>
|
||||
<span class="u-hide-desktop"><?= _("DNS Records") ?></span>
|
||||
</a>
|
||||
</li>
|
||||
<li class="units-table-row-action shortcut-s" data-key-action="js">
|
||||
<a
|
||||
class="units-table-row-action-link data-controls js-confirm-action"
|
||||
href="/<?= $spnd_action ?>/dns/?domain=<?= htmlentities($key) ?>&token=<?= $_SESSION["token"] ?>"
|
||||
title="<?= $spnd_action_title ?>"
|
||||
data-confirm-title="<?= $spnd_action_title ?>"
|
||||
data-confirm-message="<?= sprintf($spnd_confirmation, $key) ?>"
|
||||
>
|
||||
<i class="fas <?= $spnd_icon ?> <?= $spnd_icon_class ?>"></i>
|
||||
<span class="u-hide-desktop"><?= $spnd_action_title ?></span>
|
||||
</a>
|
||||
</li>
|
||||
<li class="units-table-row-action shortcut-delete" data-key-action="js">
|
||||
<a
|
||||
class="units-table-row-action-link data-controls js-confirm-action"
|
||||
href="/delete/dns/?domain=<?= htmlentities($key) ?>&token=<?= $_SESSION["token"] ?>"
|
||||
title="<?= _("Delete") ?>"
|
||||
data-confirm-title="<?= _("Delete") ?>"
|
||||
data-confirm-message="<?= sprintf(_("Are you sure you want to delete domain %s?"), $key) ?>"
|
||||
>
|
||||
<i class="fas fa-trash icon-red"></i>
|
||||
<span class="u-hide-desktop"><?= _("Delete") ?></span>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
<?php } ?>
|
||||
</div>
|
||||
<div class="units-table-cell u-text-center-desktop">
|
||||
<span class="u-hide-desktop u-text-bold"><?= _("Records") ?>:</span>
|
||||
<?php if ($data[$key]['RECORDS']) {
|
||||
echo '<span>'.$data[$key]['RECORDS'].'</span>';
|
||||
} else {
|
||||
echo '<span>0</span>';
|
||||
} ?>
|
||||
</div>
|
||||
<div class="units-table-cell u-text-center-desktop">
|
||||
<span class="u-hide-desktop u-text-bold"><?= _("Template") ?>:</span>
|
||||
<span class="u-text-bold">
|
||||
<?= $data[$key]["TPL"] ?>
|
||||
</span>
|
||||
</div>
|
||||
<div class="units-table-cell u-text-center-desktop">
|
||||
<span class="u-hide-desktop u-text-bold"><?= _("TTL") ?>:</span>
|
||||
<?= $data[$key]["TTL"] ?>
|
||||
</div>
|
||||
<div class="units-table-cell u-text-center-desktop">
|
||||
<span class="u-hide-desktop u-text-bold"><?= _("SOA") ?>:</span>
|
||||
<?= $data[$key]["SOA"] ?>
|
||||
</div>
|
||||
<div class="units-table-cell u-text-center-desktop">
|
||||
<span class="u-hide-desktop u-text-bold"><?= _("DNSSEC") ?>:</span>
|
||||
<i class="fas <?= $dnssec_icon ?>" title="<?= $dnssec_title ?>"></i>
|
||||
</div>
|
||||
<div class="units-table-cell u-text-center-desktop">
|
||||
<span class="u-hide-desktop u-text-bold"><?= _("Expiration Date") ?>:</span>
|
||||
<time class="u-text-bold" datetime="<?= $data[$key]["EXP"] ?>">
|
||||
<?= $data[$key]["EXP"] ?>
|
||||
</time>
|
||||
</div>
|
||||
</div>
|
||||
<?php } ?>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<footer class="app-footer">
|
||||
<div class="container app-footer-inner">
|
||||
<p>
|
||||
<?php printf(ngettext("%d DNS zone", "%d DNS zones", $i), $i); ?>
|
||||
</p>
|
||||
</div>
|
||||
</footer>
|
||||
60
web/templates/pages/list_dns_public.php
Normal file
60
web/templates/pages/list_dns_public.php
Normal file
@@ -0,0 +1,60 @@
|
||||
<!-- Begin toolbar -->
|
||||
<div class="toolbar">
|
||||
<div class="toolbar-inner">
|
||||
<div class="toolbar-buttons">
|
||||
<?php if ($read_only !== "true") { ?>
|
||||
<a href="/add/dns/" class="button button-secondary js-button-create">
|
||||
<i class="fas fa-circle-plus icon-green"></i><?= _("Add DNS Domain") ?>
|
||||
</a>
|
||||
<?php } ?>
|
||||
</div>
|
||||
<div class="toolbar-right">
|
||||
<div class="toolbar-search">
|
||||
<form action="/search/" method="get">
|
||||
<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>
|
||||
</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- End toolbar -->
|
||||
|
||||
<div class="container">
|
||||
|
||||
<div class="form-container">
|
||||
<h1 class="u-mb20"><?= _("View Public DNSSEC Key") ?></h1>
|
||||
<div class="u-mb10">
|
||||
<label class="form-label"><?= _("DNSKEY Record") ?></label>
|
||||
<input type="text" class="form-control" value="<?php echo $data[$domain]["RECORD"]; ?>" readonly>
|
||||
</div>
|
||||
<div class="u-mb10">
|
||||
<label class="form-label"><?= _("DS Record") ?></label>
|
||||
<input type="text" class="form-control" value="<?php echo $data[$domain]["DS"]; ?>" readonly>
|
||||
</div>
|
||||
<div class="u-mb10">
|
||||
<label class="form-label"><?= _("Public Key") ?></label>
|
||||
<input type="text" class="form-control" value="<?php echo $data[$domain]["KEY"]; ?>" readonly>
|
||||
</div>
|
||||
<div class="u-mb10">
|
||||
<label class="form-label"><?= _("Key Type / Flag") ?></label>
|
||||
<input type="text" class="form-control" value="<?php echo $flag; ?>" readonly>
|
||||
</div>
|
||||
<div class="u-mb10">
|
||||
<label class="form-label"><?= _("Key Tag") ?></label>
|
||||
<input type="text" class="form-control" value="<?php echo $data[$domain]["KEYTAG"]; ?>" readonly>
|
||||
</div>
|
||||
<div class="u-mb10">
|
||||
<label class="form-label"><?= _("Flag") ?></label>
|
||||
<input type="text" class="form-control" value="<?php echo $data[$domain]["FLAG"]; ?>" readonly>
|
||||
</div>
|
||||
<div class="u-mb10">
|
||||
<label class="form-label"><?= _("Algorithm") ?></label>
|
||||
<input type="text" class="form-control" value="<?php echo $algorithm; ?>" readonly>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
184
web/templates/pages/list_dns_rec.php
Normal file
184
web/templates/pages/list_dns_rec.php
Normal file
@@ -0,0 +1,184 @@
|
||||
<!-- Begin toolbar -->
|
||||
<div class="toolbar">
|
||||
<div class="toolbar-inner">
|
||||
<div class="toolbar-buttons">
|
||||
<a class="button button-secondary button-back js-button-back" href="/list/dns/">
|
||||
<i class="fas fa-arrow-left icon-blue"></i><?= _("Back") ?>
|
||||
</a>
|
||||
<?php if ($read_only !== "true") { ?>
|
||||
<a href="/add/dns/?domain=<?= htmlentities($_GET["domain"]) ?>" class="button button-secondary js-button-create">
|
||||
<i class="fas fa-circle-plus icon-green"></i><?= _("Add Record") ?>
|
||||
</a>
|
||||
<a href="/edit/dns/?domain=<?= htmlentities($_GET["domain"]) ?>" class="button button-secondary js-button-create">
|
||||
<i class="fas fa-pencil icon-blue"></i><?= _("Edit DNS Domain") ?>
|
||||
</a>
|
||||
<?php } ?>
|
||||
</div>
|
||||
<div class="toolbar-right">
|
||||
<div class="toolbar-sorting">
|
||||
<button class="toolbar-sorting-toggle js-toggle-sorting-menu" type="button" title="<?= _("Sort items") ?>">
|
||||
<?= _("Sort by") ?>:
|
||||
<span class="u-text-bold">
|
||||
<?php if ($_SESSION['userSortOrder'] === 'name') { $label = _('Record'); } else { $label = _('Date'); } ?>
|
||||
<?= $label ?> <i class="fas fa-arrow-down-a-z"></i>
|
||||
</span>
|
||||
</button>
|
||||
<ul class="toolbar-sorting-menu js-sorting-menu u-hidden">
|
||||
<li data-entity="sort-date" data-sort-as-int="1">
|
||||
<span class="name <?php if ($_SESSION['userSortOrder'] === 'date') { echo 'active'; } ?>"><?= _("Date") ?> <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 data-entity="sort-value">
|
||||
<span class="name"><?= _("IP or Value") ?> <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 data-entity="sort-record">
|
||||
<span class="name"><?= _("Record") ?> <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 data-entity="sort-ttl" data-sort-as-int="1">
|
||||
<span class="name"><?= _("TTL") ?> <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 data-entity="sort-type">
|
||||
<span class="name"><?= _("Type") ?> <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") { ?>
|
||||
<form x-data x-bind="BulkEdit" action="/bulk/dns/" method="post">
|
||||
<input type="hidden" name="domain" value="<?= htmlentities($_GET["domain"]) ?>">
|
||||
<input type="hidden" name="token" value="<?= $_SESSION["token"] ?>">
|
||||
<select class="form-select" name="action">
|
||||
<option value=""><?= _("Apply to selected") ?></option>
|
||||
<option value="suspend"><?= _("Suspend") ?></option>
|
||||
<option value="unsuspend"><?= _("Unsuspend") ?></option>
|
||||
<option value="delete"><?= _("Delete") ?></option>
|
||||
</select>
|
||||
<button type="submit" class="toolbar-input-submit" title="<?= _("Apply to selected") ?>">
|
||||
<i class="fas fa-arrow-right"></i>
|
||||
</button>
|
||||
</form>
|
||||
<?php } ?>
|
||||
</div>
|
||||
<div class="toolbar-search">
|
||||
<form action="/search/" method="get">
|
||||
<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>
|
||||
</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- End toolbar -->
|
||||
|
||||
<div class="container">
|
||||
|
||||
<h1 class="u-text-center u-hide-desktop u-mt20 u-pr30 u-mb20 u-pl30"><?= _("DNS Records") ?></h1>
|
||||
|
||||
<div class="units-table js-units-container">
|
||||
<div class="units-table-header">
|
||||
<div class="units-table-cell">
|
||||
<input type="checkbox" class="js-toggle-all-checkbox" title="<?= _("Select all") ?>" <?= $display_mode ?>>
|
||||
</div>
|
||||
<div class="units-table-cell"><?= _("Record") ?></div>
|
||||
<div class="units-table-cell"></div>
|
||||
<div class="units-table-cell u-text-center"><?= _("Type") ?></div>
|
||||
<div class="units-table-cell u-text-center"><?= _("Priority") ?></div>
|
||||
<div class="units-table-cell u-text-center"><?= _("TTL") ?></div>
|
||||
<div class="units-table-cell"><?= _("IP or Value") ?></div>
|
||||
</div>
|
||||
|
||||
<!-- Begin DNS record list item loop -->
|
||||
<?php
|
||||
foreach ($data as $key => $value) {
|
||||
++$i;
|
||||
if ($data[$key]['SUSPENDED'] == 'yes') {
|
||||
$status = 'suspended';
|
||||
} else {
|
||||
$status = 'active';
|
||||
}
|
||||
?>
|
||||
<div class="units-table-row <?php if ($status == 'suspended') echo 'disabled'; ?> js-unit"
|
||||
data-sort-date="<?= strtotime($data[$key]['DATE'].' '.$data[$key]['TIME']) ?>"
|
||||
data-sort-record="<?= $data[$key]['RECORD'] ?>"
|
||||
data-sort-type="<?= $data[$key]['TYPE'] ?>"
|
||||
data-sort-ttl="<?= $data[$key]['TTL'] ?>"
|
||||
data-sort-value="<?= $data[$key]['VALUE'] ?>">
|
||||
<div class="units-table-cell">
|
||||
<div>
|
||||
<input id="check<?= $data[$key]["ID"] ?>" class="js-unit-checkbox" type="checkbox" title="<?= _("Select") ?>" name="record[]" value="<?= $data[$key]["ID"] ?>" <?= $display_mode ?>>
|
||||
<label for="check<?= $data[$key]["ID"] ?>" class="u-hide-desktop"><?= _("Select") ?></label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="units-table-cell units-table-heading-cell u-text-bold">
|
||||
<span class="u-hide-desktop"><?= _("Record") ?>:</span>
|
||||
<?php if (($read_only === 'true') || ($data[$key]['SUSPENDED'] == 'yes')) { ?>
|
||||
<?= substr($data[$key]['RECORD'], 0, 12); if (strlen($data[$key]['RECORD']) > 12 ) echo '...'; ?>
|
||||
<?php } else { ?>
|
||||
<a href="/edit/dns/?domain=<?= htmlspecialchars($_GET['domain']) ?>&record_id=<?= $data[$key]['ID'] ?>&token=<?= $_SESSION['token'] ?>" title="<?= _("Edit DNS Record") . ': '.htmlspecialchars($data[$key]['RECORD']) ?>">
|
||||
<? echo substr($data[$key]['RECORD'], 0, 12); if (strlen($data[$key]['RECORD']) > 12 ) echo '...'; ?>
|
||||
</a>
|
||||
<?php } ?>
|
||||
</div>
|
||||
<div class="units-table-cell">
|
||||
<?php if ($read_only !== "true") { ?>
|
||||
<ul class="units-table-row-actions">
|
||||
<?php if ($read_only !== "true") { ?>
|
||||
<?php if ($data[$key]["SUSPENDED"] == "no") { ?>
|
||||
<li class="units-table-row-action shortcut-enter" data-key-action="href">
|
||||
<a
|
||||
class="units-table-row-action-link"
|
||||
href="/edit/dns/?domain=<?= htmlspecialchars($_GET["domain"]) ?>&record_id=<?= $data[$key]["ID"] ?>&token=<?= $_SESSION["token"] ?>"
|
||||
title="<?= _("Edit DNS Record") ?>"
|
||||
>
|
||||
<i class="fas fa-pencil icon-orange"></i>
|
||||
<span class="u-hide-desktop"><?= _("Edit DNS Record") ?></span>
|
||||
</a>
|
||||
</li>
|
||||
<?php } ?>
|
||||
<li class="units-table-row-action shortcut-delete" data-key-action="js">
|
||||
<a
|
||||
class="units-table-row-action-link data-controls js-confirm-action"
|
||||
href="/delete/dns/?domain=<?= htmlspecialchars($_GET["domain"]) ?>&record_id=<?= $data[$key]["ID"] ?>&token=<?= $_SESSION["token"] ?>"
|
||||
title="<?= _("Delete") ?>"
|
||||
data-confirm-title="<?= _("Delete") ?>"
|
||||
data-confirm-message="<?= sprintf(_("Are you sure you want to delete record %s?"), $key) ?>"
|
||||
>
|
||||
<i class="fas fa-trash icon-red"></i>
|
||||
<span class="u-hide-desktop"><?= _("Delete") ?></span>
|
||||
</a>
|
||||
</li>
|
||||
<?php } ?>
|
||||
</ul>
|
||||
<?php } ?>
|
||||
</div>
|
||||
<div class="units-table-cell u-text-bold u-text-center-desktop">
|
||||
<span class="u-hide-desktop"><?= _("Type") ?>:</span>
|
||||
<?= $data[$key]["TYPE"] ?>
|
||||
</div>
|
||||
<div class="units-table-cell u-text-center-desktop">
|
||||
<span class="u-hide-desktop u-text-bold"><?= _("Priority") ?>:</span>
|
||||
<?= $data[$key]["PRIORITY"] ?>
|
||||
</div>
|
||||
<div class="units-table-cell u-text-center-desktop">
|
||||
<span class="u-hide-desktop u-text-bold"><?= _("TTL") ?>:</span>
|
||||
<?php if ($data[$key]['TTL'] == ''){ echo _('Default'); } else { echo $data[$key]['TTL'];} ?>
|
||||
</div>
|
||||
<div class="units-table-cell">
|
||||
<span class="u-hide-desktop u-text-bold"><?= _("IP or Value") ?>:</span>
|
||||
<span class="u-text-break">
|
||||
<?= htmlspecialchars($data[$key]["VALUE"], ENT_QUOTES, "UTF-8") ?>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<?php } ?>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<footer class="app-footer">
|
||||
<div class="container app-footer-inner">
|
||||
<p>
|
||||
<?php printf(ngettext("%d DNS record", "%d DNS records", $i), $i); ?>
|
||||
</p>
|
||||
</div>
|
||||
</footer>
|
||||
188
web/templates/pages/list_firewall.php
Normal file
188
web/templates/pages/list_firewall.php
Normal file
@@ -0,0 +1,188 @@
|
||||
<!-- Begin toolbar -->
|
||||
<div class="toolbar">
|
||||
<div class="toolbar-inner">
|
||||
<div class="toolbar-buttons">
|
||||
<a class="button button-secondary button-back js-button-back" href="/list/server/">
|
||||
<i class="fas fa-arrow-left icon-blue"></i><?= _("Back") ?>
|
||||
</a>
|
||||
<a href="/add/firewall/" class="button button-secondary js-button-create">
|
||||
<i class="fas fa-circle-plus icon-green"></i><?= _("Add Rule") ?>
|
||||
</a>
|
||||
<?php if (!empty($_SESSION["FIREWALL_EXTENSION"])): ?>
|
||||
<a class="button button-secondary" href="/list/firewall/banlist/">
|
||||
<i class="fas fa-eye icon-red"></i><?= _("Banned IP Addresses") ?>
|
||||
</a>
|
||||
<?php endif; ?>
|
||||
<a class="button button-secondary" href="/list/firewall/ipset/">
|
||||
<i class="fas fa-list icon-blue"></i><?= _("IPset IP Lists") ?>
|
||||
</a>
|
||||
</div>
|
||||
<div class="toolbar-right">
|
||||
<div class="toolbar-sorting">
|
||||
<button class="toolbar-sorting-toggle js-toggle-sorting-menu" type="button" title="<?= _("Sort items") ?>">
|
||||
<?= _("Sort by") ?>:
|
||||
<span class="u-text-bold">
|
||||
<?= _("Action") ?> <i class="fas fa-arrow-up-a-z"></i>
|
||||
</span>
|
||||
</button>
|
||||
<ul class="toolbar-sorting-menu js-sorting-menu u-hidden">
|
||||
<li data-entity="sort-action">
|
||||
<span class="name"><?= _("Action") ?> <i class="fas fa-arrow-down-a-z"></i></span><span class="up active"><i class="fas fa-arrow-up-a-z"></i></span>
|
||||
</li>
|
||||
<li data-entity="sort-protocol">
|
||||
<span class="name"><?= _("Protocol") ?> <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 data-entity="sort-port">
|
||||
<span class="name"><?= _("Port") ?> <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 data-entity="sort-ip" data-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>
|
||||
<li data-entity="sort-comment">
|
||||
<span class="name"><?= _("Comment") ?> <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-data x-bind="BulkEdit" action="/bulk/firewall/" method="post">
|
||||
<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>
|
||||
</select>
|
||||
<button type="submit" class="toolbar-input-submit" title="<?= _("Apply to selected") ?>">
|
||||
<i class="fas fa-arrow-right"></i>
|
||||
</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- End toolbar -->
|
||||
|
||||
<div class="container">
|
||||
|
||||
<h1 class="u-text-center u-hide-desktop u-mt20 u-pr30 u-mb20 u-pl30"><?= _("Firewall Rules") ?></h1>
|
||||
|
||||
<div class="units-table js-units-container">
|
||||
<div class="units-table-header">
|
||||
<div class="units-table-cell">
|
||||
<input type="checkbox" class="js-toggle-all-checkbox" title="<?= _("Select all") ?>">
|
||||
</div>
|
||||
<div class="units-table-cell"><?= _("Action") ?></div>
|
||||
<div class="units-table-cell"></div>
|
||||
<div class="units-table-cell"><?= _("Comment") ?></div>
|
||||
<div class="units-table-cell u-text-center"><?= _("Protocol") ?></div>
|
||||
<div class="units-table-cell u-text-center"><?= _("Port") ?></div>
|
||||
<div class="units-table-cell u-text-center"><?= _("IP Address") ?></div>
|
||||
</div>
|
||||
|
||||
<!-- Begin firewall chain/action list item loop -->
|
||||
<?php
|
||||
foreach ($data as $key => $value) {
|
||||
++$i;
|
||||
if ($data[$key]['SUSPENDED'] == 'yes') {
|
||||
$status = 'suspended';
|
||||
$spnd_action = 'unsuspend';
|
||||
$spnd_action_title = _('Unsuspend');
|
||||
$spnd_icon = 'fa-play';
|
||||
$spnd_icon_class = 'icon-green';
|
||||
$spnd_confirmation = _('Are you sure you want to unsuspend rule #%s?') ;
|
||||
} else {
|
||||
$status = 'active';
|
||||
$spnd_action = 'suspend';
|
||||
$spnd_action_title = _('Suspend');
|
||||
$spnd_icon = 'fa-pause';
|
||||
$spnd_icon_class = 'icon-highlight';
|
||||
$spnd_confirmation = _('Are you sure you want to suspend rule #%s?') ;
|
||||
}
|
||||
?>
|
||||
<div class="units-table-row <?php if ($status == 'suspended') echo 'disabled'; ?> js-unit"
|
||||
data-sort-action="<?= $data[$key]['ACTION'] ?>"
|
||||
data-sort-protocol="<?= $data[$key]['PROTOCOL'] ?>"
|
||||
data-sort-port="<?= $data[$key]['PORT'] ?>"
|
||||
data-sort-ip="<?= str_replace('.', '', $data[$key]['IP']) ?>"
|
||||
data-sort-comment="<?= $data[$key]['COMMENT'] ?>">
|
||||
<div class="units-table-cell">
|
||||
<div>
|
||||
<input id="check<?= $i ?>" class="js-unit-checkbox" type="checkbox" title="<?= _("Select") ?>" name="rule[]" value="<?= $key ?>">
|
||||
<label for="check<?= $i ?>" class="u-hide-desktop"><?= _("Select") ?></label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="units-table-cell units-table-heading-cell u-text-bold">
|
||||
<span class="u-hide-desktop"><?= _("Action") ?>:</span>
|
||||
<a href="/edit/firewall/?rule=<?= $key ?>&token=<?= $_SESSION["token"] ?>" title="<?= _("Edit Firewall Rule") ?>">
|
||||
<?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>
|
||||
</div>
|
||||
<div class="units-table-cell">
|
||||
<ul class="units-table-row-actions">
|
||||
<li class="units-table-row-action shortcut-enter" data-key-action="href">
|
||||
<a
|
||||
class="units-table-row-action-link"
|
||||
href="/edit/firewall/?rule=<?= $key ?>&token=<?= $_SESSION["token"] ?>"
|
||||
title="<?= _("Edit Firewall Rule") ?>"
|
||||
>
|
||||
<i class="fas fa-pencil icon-orange"></i>
|
||||
<span class="u-hide-desktop"><?= _("Edit Firewall Rule") ?></span>
|
||||
</a>
|
||||
</li>
|
||||
<li class="units-table-row-action shortcut-s" data-key-action="js">
|
||||
<a
|
||||
class="units-table-row-action-link data-controls js-confirm-action"
|
||||
href="/<?= $spnd_action ?>/firewall/?rule=<?= $key ?>&token=<?= $_SESSION["token"] ?>"
|
||||
title="<?= $spnd_action_title ?>"
|
||||
data-confirm-title="<?= $spnd_action_title ?>"
|
||||
data-confirm-message="<?= sprintf($spnd_confirmation, $key) ?>"
|
||||
>
|
||||
<i class="fas <?= $spnd_icon ?> <?= $spnd_icon_class ?>"></i>
|
||||
<span class="u-hide-desktop"><?= $spnd_action_title ?></span>
|
||||
</a>
|
||||
</li>
|
||||
<li class="units-table-row-action shortcut-delete" data-key-action="js">
|
||||
<a
|
||||
class="units-table-row-action-link data-controls js-confirm-action"
|
||||
href="/delete/firewall/?rule=<?= $key ?>&token=<?= $_SESSION["token"] ?>"
|
||||
title="<?= _("Delete") ?>"
|
||||
data-confirm-title="<?= _("Delete") ?>"
|
||||
data-confirm-message="<?= sprintf(_("Are you sure you want to delete rule %s"), $key) ?>"
|
||||
>
|
||||
<i class="fas fa-trash icon-red"></i>
|
||||
<span class="u-hide-desktop"><?= _("Delete") ?></span>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="units-table-cell u-text-bold">
|
||||
<span class="u-hide-desktop"><?= _("Comment") ?>:</span>
|
||||
<?php if (!empty($data[$key]['COMMENT'])) { echo $data[$key]['COMMENT']; } ?>
|
||||
</div>
|
||||
<div class="units-table-cell u-text-center-desktop">
|
||||
<span class="u-hide-desktop u-text-bold"><?= _("Protocol") ?>:</span>
|
||||
<?= _($data[$key]["PROTOCOL"]) ?>
|
||||
</div>
|
||||
<div class="units-table-cell u-text-bold u-text-center-desktop">
|
||||
<span class="u-hide-desktop"><?= _("Port") ?>:</span>
|
||||
<?= $data[$key]["PORT"] ?>
|
||||
</div>
|
||||
<div class="units-table-cell u-text-center-desktop">
|
||||
<span class="u-hide-desktop u-text-bold"><?= _("IP Address") ?>:</span>
|
||||
<?= $data[$key]["IP"] ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php } ?>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<footer class="app-footer">
|
||||
<div class="container app-footer-inner">
|
||||
<p>
|
||||
<?php printf(ngettext("%d firewall rule", "%d firewall rules", $i), $i); ?>
|
||||
</p>
|
||||
</div>
|
||||
</footer>
|
||||
107
web/templates/pages/list_firewall_banlist.php
Normal file
107
web/templates/pages/list_firewall_banlist.php
Normal file
@@ -0,0 +1,107 @@
|
||||
<!-- Begin toolbar -->
|
||||
<div class="toolbar">
|
||||
<div class="toolbar-inner">
|
||||
<div class="toolbar-buttons">
|
||||
<a class="button button-secondary button-back js-button-back" href="/list/firewall/">
|
||||
<i class="fas fa-arrow-left icon-blue"></i><?= _("Back") ?>
|
||||
</a>
|
||||
<a href="/add/firewall/banlist/" class="button button-secondary js-button-create">
|
||||
<i class="fas fa-circle-plus icon-green"></i><?= _("Ban IP Address") ?>
|
||||
</a>
|
||||
</div>
|
||||
<div class="toolbar-right">
|
||||
<form x-data x-bind="BulkEdit" action="/bulk/firewall/banlist/" method="post">
|
||||
<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>
|
||||
</select>
|
||||
<button type="submit" class="toolbar-input-submit" title="<?= _("Apply to selected") ?>">
|
||||
<i class="fas fa-arrow-right"></i>
|
||||
</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- End toolbar -->
|
||||
|
||||
<div class="container">
|
||||
|
||||
<h1 class="u-text-center u-hide-desktop u-mt20 u-pr30 u-mb20 u-pl30"><?= _("Banned IP Addresses") ?></h1>
|
||||
|
||||
<div class="units-table js-units-container">
|
||||
<div class="units-table-header">
|
||||
<div class="units-table-cell">
|
||||
<input type="checkbox" class="js-toggle-all-checkbox" title="<?= _("Select all") ?>">
|
||||
</div>
|
||||
<div class="units-table-cell"><?= _("IP Address") ?></div>
|
||||
<div class="units-table-cell"></div>
|
||||
<div class="units-table-cell u-text-center"><?= _("Date") ?></div>
|
||||
<div class="units-table-cell u-text-center"><?= _("Time") ?></div>
|
||||
<div class="units-table-cell u-text-center"><?= _("Comment") ?></div>
|
||||
</div>
|
||||
|
||||
<!-- Begin banned IP address list item loop -->
|
||||
<?php
|
||||
foreach ($data as $key => $value) {
|
||||
++$i;
|
||||
$ip = $key;
|
||||
?>
|
||||
<div class="units-table-row js-unit">
|
||||
<div class="units-table-cell">
|
||||
<div>
|
||||
<input id="check<?= $i ?>" class="js-unit-checkbox" type="checkbox" title="<?= _("Select") ?>" name="ipchain[]" value="<?= $ip . ":" . $value["CHAIN"] ?>">
|
||||
<label for="check<?= $i ?>" class="u-hide-desktop"><?= _("Select") ?></label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="units-table-cell units-table-heading-cell u-text-bold">
|
||||
<span class="u-hide-desktop"><?= _("IP Address") ?>:</span>
|
||||
<?= $ip ?>
|
||||
</div>
|
||||
<div class="units-table-cell">
|
||||
<ul class="units-table-row-actions">
|
||||
<li class="units-table-row-action shortcut-delete" data-key-action="js">
|
||||
<a
|
||||
class="units-table-row-action-link data-controls js-confirm-action"
|
||||
href="/delete/firewall/banlist/?ip=<?= $ip ?>&chain=<?= $value["CHAIN"] ?>&token=<?= $_SESSION["token"] ?>"
|
||||
title="<?= _("Delete") ?>"
|
||||
data-confirm-title="<?= _("Delete") ?>"
|
||||
data-confirm-message="<?= sprintf(_("Are you sure you want to delete IP address %s?"), $key) ?>"
|
||||
>
|
||||
<i class="fas fa-trash icon-red"></i>
|
||||
<span class="u-hide-desktop"><?= _("Delete") ?></span>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="units-table-cell u-text-center-desktop">
|
||||
<span class="u-hide-desktop u-text-bold"><?= _("Date") ?>:</span>
|
||||
<time datetime="<?= _($data[$key]["DATE"]) ?>"><?= _($data[$key]["DATE"]) ?></time>
|
||||
</div>
|
||||
<div class="units-table-cell u-text-center-desktop">
|
||||
<span class="u-hide-desktop u-text-bold"><?= _("Time") ?>:</span>
|
||||
<?= $data[$key]["TIME"] ?>
|
||||
</div>
|
||||
<div class="units-table-cell u-text-bold u-text-center-desktop">
|
||||
<span class="u-hide-desktop"><?= _("Comment") ?>:</span>
|
||||
<?= _($value["CHAIN"]) ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php } ?>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<footer class="app-footer">
|
||||
<div class="container app-footer-inner">
|
||||
<p>
|
||||
<?php
|
||||
if ( $i == 0) {
|
||||
echo _('There are currently no banned IP addresses.');
|
||||
} else {
|
||||
printf(ngettext('%d banned IP address', '%d banned IP addresses', $i),$i);
|
||||
}
|
||||
?>
|
||||
</p>
|
||||
</div>
|
||||
</footer>
|
||||
116
web/templates/pages/list_firewall_ipset.php
Normal file
116
web/templates/pages/list_firewall_ipset.php
Normal file
@@ -0,0 +1,116 @@
|
||||
<!-- Begin toolbar -->
|
||||
<div class="toolbar">
|
||||
<div class="toolbar-inner">
|
||||
<div class="toolbar-buttons">
|
||||
<a class="button button-secondary button-back js-button-back" href="/list/firewall/">
|
||||
<i class="fas fa-arrow-left icon-blue"></i><?= _("Back") ?>
|
||||
</a>
|
||||
<a href="/add/firewall/ipset/" class="button button-secondary js-button-create">
|
||||
<i class="fas fa-circle-plus icon-green"></i><?= _("Add IP list") ?>
|
||||
</a>
|
||||
</div>
|
||||
<div class="toolbar-right">
|
||||
<form x-data x-bind="BulkEdit" action="/bulk/firewall/ipset/" method="post">
|
||||
<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>
|
||||
</select>
|
||||
<button type="submit" class="toolbar-input-submit" title="<?= _("Apply to selected") ?>">
|
||||
<i class="fas fa-arrow-right"></i>
|
||||
</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- End toolbar -->
|
||||
|
||||
<div class="container">
|
||||
|
||||
<h1 class="u-text-center u-hide-desktop u-mt20 u-pr30 u-mb20 u-pl30"><?= _("IPset IP Lists") ?></h1>
|
||||
|
||||
<div class="units-table js-units-container">
|
||||
<div class="units-table-header">
|
||||
<div class="units-table-cell">
|
||||
<input type="checkbox" class="js-toggle-all-checkbox" title="<?= _("Select all") ?>">
|
||||
</div>
|
||||
<div class="units-table-cell"><?= _("IP List Name") ?></div>
|
||||
<div class="units-table-cell"></div>
|
||||
<div class="units-table-cell u-text-center"><?= _("Auto Update") ?></div>
|
||||
<div class="units-table-cell u-text-center"><?= _("IP Version") ?></div>
|
||||
<div class="units-table-cell u-text-center"><?= _("Date") ?></div>
|
||||
<div class="units-table-cell u-text-center"><?= _("Time") ?></div>
|
||||
</div>
|
||||
|
||||
<!-- Begin firewall IP address list item loop -->
|
||||
<?php
|
||||
foreach ($data as $key => $value) {
|
||||
++$i;
|
||||
$listname = $key;
|
||||
?>
|
||||
<div class="units-table-row js-unit">
|
||||
<div class="units-table-cell">
|
||||
<div>
|
||||
<input id="check<?= $i ?>" class="js-unit-checkbox" type="checkbox" title="<?= _("Select") ?>" name="setname[]" value="<?= $listname ?>">
|
||||
<label for="check<?= $i ?>" class="u-hide-desktop"><?= _("Select") ?></label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="units-table-cell units-table-heading-cell u-text-bold">
|
||||
<span class="u-hide-desktop"><?= _("IP List Name") ?>:</span>
|
||||
<?= $listname ?>
|
||||
</div>
|
||||
<div class="units-table-cell">
|
||||
<ul class="units-table-row-actions">
|
||||
<li class="units-table-row-action shortcut-delete" data-key-action="js">
|
||||
<a
|
||||
class="units-table-row-action-link data-controls js-confirm-action"
|
||||
href="/delete/firewall/ipset/?listname=<?= $listname ?>&token=<?= $_SESSION["token"] ?>"
|
||||
title="<?= _("Delete") ?>"
|
||||
data-confirm-title="<?= _("Delete") ?>"
|
||||
data-confirm-message="<?= sprintf(_("Are you sure you want to delete IP list %s?"), $key) ?>"
|
||||
>
|
||||
<i class="fas fa-trash icon-red"></i>
|
||||
<span class="u-hide-desktop"><?= _("Delete") ?></span>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="units-table-cell u-text-bold u-text-center-desktop">
|
||||
<span class="u-hide-desktop"><?= _("Auto Update") ?>:</span>
|
||||
<?php if ($data[$key]["AUTOUPDATE"] == "no") { ?>
|
||||
<i class="fas fa-circle-xmark icon-red" title="<?= _("Disabled") ?>"></i>
|
||||
<?php } else { ?>
|
||||
<i class="fas fa-circle-check icon-green" title="<?= _("Enabled") ?>"></i>
|
||||
<?php } ?>
|
||||
</div>
|
||||
<div class="units-table-cell u-text-center-desktop">
|
||||
<span class="u-hide-desktop u-text-bold"><?= _("IP Version") ?>:</span>
|
||||
<?= _($data[$key]["IP_VERSION"]) ?>
|
||||
</div>
|
||||
<div class="units-table-cell u-text-center-desktop">
|
||||
<span class="u-hide-desktop u-text-bold"><?= _("Date") ?>:</span>
|
||||
<time datetime="<?= _($data[$key]["DATE"]) ?>"><?= _($data[$key]["DATE"]) ?></time>
|
||||
</div>
|
||||
<div class="units-table-cell u-text-center-desktop">
|
||||
<span class="u-hide-desktop u-text-bold"><?= _("Time") ?>:</span>
|
||||
<?= $data[$key]["TIME"] ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php } ?>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<footer class="app-footer">
|
||||
<div class="container app-footer-inner">
|
||||
<p>
|
||||
<?php
|
||||
if ( $i == 0) {
|
||||
echo _('There are currently no IP lists defined.');
|
||||
} else {
|
||||
printf(ngettext('%d IP list', '%d IP lists', $i),$i);
|
||||
}
|
||||
?>
|
||||
</p>
|
||||
</div>
|
||||
</footer>
|
||||
157
web/templates/pages/list_ip.php
Normal file
157
web/templates/pages/list_ip.php
Normal file
@@ -0,0 +1,157 @@
|
||||
<!-- Begin toolbar -->
|
||||
<div class="toolbar">
|
||||
<div class="toolbar-inner">
|
||||
<div class="toolbar-buttons">
|
||||
<a class="button button-secondary button-back js-button-back" href="/edit/server/">
|
||||
<i class="fas fa-arrow-left icon-blue"></i><?= _("Back") ?>
|
||||
</a>
|
||||
<a href="/add/ip/" class="button button-secondary js-button-create">
|
||||
<i class="fas fa-circle-plus icon-green"></i><?= _("Add IP Address") ?>
|
||||
</a>
|
||||
</div>
|
||||
<div class="toolbar-right">
|
||||
<div class="toolbar-sorting">
|
||||
<button class="toolbar-sorting-toggle js-toggle-sorting-menu" type="button" title="<?= _("Sort items") ?>">
|
||||
<?= _("Sort by") ?>:
|
||||
<span class="u-text-bold">
|
||||
<?= _("Date") ?> <i class="fas fa-arrow-down-a-z"></i>
|
||||
</span>
|
||||
</button>
|
||||
<ul class="toolbar-sorting-menu js-sorting-menu u-hidden">
|
||||
<li data-entity="sort-date" data-sort-as-int="1">
|
||||
<span class="name <?php if ($_SESSION['userSortOrder'] === 'date') { echo 'active'; } ?>"><?= _("Date") ?> <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 data-entity="sort-ip">
|
||||
<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>
|
||||
<li data-entity="sort-netmask">
|
||||
<span class="name"><?= _("Netmask") ?> <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 data-entity="sort-interface">
|
||||
<span class="name"><?= _("Interface") ?> <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 data-entity="sort-domains" data-sort-as-int="1">
|
||||
<span class="name"><?= _("Domains") ?> <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 data-entity="sort-owner">
|
||||
<span class="name"><?= _("Owner") ?> <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-data x-bind="BulkEdit" action="/bulk/ip/" method="post">
|
||||
<input type="hidden" name="token" value="<?= $_SESSION["token"] ?>">
|
||||
<select class="form-select" name="action">
|
||||
<option value=""><?= _("Apply to selected") ?></option>
|
||||
<option value="reread IP"><?= _("Refresh IP Addresses") ?></option>
|
||||
<option value="delete"><?= _("Delete") ?></option>
|
||||
</select>
|
||||
<button type="submit" class="toolbar-input-submit" title="<?= _("Apply to selected") ?>">
|
||||
<i class="fas fa-arrow-right"></i>
|
||||
</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- End toolbar -->
|
||||
|
||||
<div class="container">
|
||||
|
||||
<h1 class="u-text-center u-hide-desktop u-mt20 u-pr30 u-mb20 u-pl30"><?= _("IP Addresses") ?></h1>
|
||||
|
||||
<div class="units-table js-units-container">
|
||||
<div class="units-table-header">
|
||||
<div class="units-table-cell">
|
||||
<input type="checkbox" class="js-toggle-all-checkbox" title="<?= _("Select all") ?>">
|
||||
</div>
|
||||
<div class="units-table-cell"><?= _("IP Address") ?></div>
|
||||
<div class="units-table-cell"></div>
|
||||
<div class="units-table-cell u-text-center"><?= _("Netmask") ?></div>
|
||||
<div class="units-table-cell u-text-center"><?= _("Interface") ?></div>
|
||||
<div class="units-table-cell u-text-center"><?= _("Status") ?></div>
|
||||
<div class="units-table-cell u-text-center"><?= _("Domains") ?></div>
|
||||
<div class="units-table-cell u-text-center"><?= _("Owner") ?></div>
|
||||
</div>
|
||||
|
||||
<!-- Begin IP address list item loop -->
|
||||
<?php
|
||||
foreach ($data as $key => $value) {
|
||||
++$i;
|
||||
?>
|
||||
<div class="units-table-row js-unit"
|
||||
data-sort-ip="<?= str_replace(".", "", $key) ?>"
|
||||
data-sort-date="<?= strtotime($data[$key]["DATE"] . " " . $data[$key]["TIME"]) ?>"
|
||||
data-sort-netmask="<?= str_replace(".", "", $data[$key]["NETMASK"]) ?>"
|
||||
data-sort-interface="<?= $data[$key]["INTERFACE"] ?>"
|
||||
data-sort-domains="<?= $data[$key]["U_WEB_DOMAINS"] ?>"
|
||||
data-sort-owner="<?= $data[$key]["OWNER"] ?>">
|
||||
<div class="units-table-cell">
|
||||
<div>
|
||||
<input id="check<?= $i ?>" class="js-unit-checkbox" type="checkbox" title="<?= _("Select") ?>" name="ip[]" value="<?= $key ?>">
|
||||
<label for="check<?= $i ?>" class="u-hide-desktop"><?= _("Select") ?></label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="units-table-cell units-table-heading-cell u-text-bold">
|
||||
<span class="u-hide-desktop"><?= _("IP Address") ?>:</span>
|
||||
<a href="/edit/ip/?ip=<?= $key ?>&token=<?= $_SESSION['token'] ?>" title="<?= _("Edit IP Address") ?>">
|
||||
<?= $key ?> <?php if (!empty($data[$key]['NAT'])) echo ' → ' . $data[$key]['NAT'] . ''; ?>
|
||||
</a>
|
||||
</div>
|
||||
<div class="units-table-cell">
|
||||
<ul class="units-table-row-actions">
|
||||
<li class="units-table-row-action shortcut-enter" data-key-action="href">
|
||||
<a
|
||||
class="units-table-row-action-link"
|
||||
href="/edit/ip/?ip=<?= $key ?>&token=<?= $_SESSION["token"] ?>"
|
||||
title="<?= _("Edit IP Address") ?>"
|
||||
>
|
||||
<i class="fas fa-pencil icon-orange"></i>
|
||||
<span class="u-hide-desktop"><?= _("Edit IP Address") ?></span>
|
||||
</a>
|
||||
</li>
|
||||
<li class="units-table-row-action shortcut-delete" data-key-action="js">
|
||||
<a
|
||||
class="units-table-row-action-link data-controls js-confirm-action"
|
||||
href="/delete/ip/?ip=<?= $key ?>&token=<?= $_SESSION["token"] ?>"
|
||||
title="<?= _("Delete") ?>"
|
||||
data-confirm-title="<?= _("Delete") ?>"
|
||||
data-confirm-message="<?= sprintf(_("Are you sure you want to delete IP address %s?"), $key) ?>"
|
||||
>
|
||||
<i class="fas fa-trash icon-red"></i>
|
||||
<span class="u-hide-desktop"><?= _("Delete") ?></span>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="units-table-cell u-text-center-desktop">
|
||||
<span class="u-hide-desktop u-text-bold"><?= _("Netmask") ?>:</span>
|
||||
<?= $data[$key]["NETMASK"] ?>
|
||||
</div>
|
||||
<div class="units-table-cell u-text-center-desktop">
|
||||
<span class="u-hide-desktop u-text-bold"><?= _("Interface") ?>:</span>
|
||||
<?= $data[$key]["INTERFACE"] ?>
|
||||
</div>
|
||||
<div class="units-table-cell u-text-bold u-text-center-desktop">
|
||||
<span class="u-hide-desktop"><?= _("Status") ?>:</span>
|
||||
<?= _($data[$key]["STATUS"]) ?>
|
||||
</div>
|
||||
<div class="units-table-cell u-text-bold u-text-center-desktop">
|
||||
<span class="u-hide-desktop"><?= _("Domains") ?>:</span>
|
||||
<?= $data[$key]["U_WEB_DOMAINS"] ?>
|
||||
</div>
|
||||
<div class="units-table-cell u-text-bold u-text-center-desktop">
|
||||
<span class="u-hide-desktop"><?= _("Owner") ?>:</span>
|
||||
<?= $data[$key]["OWNER"] ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php } ?>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<footer class="app-footer">
|
||||
<div class="container app-footer-inner">
|
||||
<p>
|
||||
<?php printf(ngettext("%d IP address", "%d IP addresses", $i), $i); ?>
|
||||
</p>
|
||||
</div>
|
||||
</footer>
|
||||
91
web/templates/pages/list_key.php
Normal file
91
web/templates/pages/list_key.php
Normal file
@@ -0,0 +1,91 @@
|
||||
<!-- Begin toolbar -->
|
||||
<div class="toolbar">
|
||||
<div class="toolbar-inner">
|
||||
<div class="toolbar-buttons">
|
||||
<?php if ($_SESSION["userContext"] === "admin" && $_SESSION['look'] !== '' && $_GET["user"] !== "admin") { ?>
|
||||
<a href="/edit/user/?user=<?= htmlentities($_SESSION["look"]) ?>&token=<?= $_SESSION["token"] ?>" class="button button-secondary button-back js-button-back">
|
||||
<i class="fas fa-arrow-left icon-blue"></i><?= _("Back") ?>
|
||||
</a>
|
||||
<?php } else { ?>
|
||||
<a href="/edit/user/?user=<?= htmlentities($_SESSION["user"]) ?>&token=<?= $_SESSION["token"] ?>" class="button button-secondary button-back js-button-back">
|
||||
<i class="fas fa-arrow-left icon-blue"></i><?= _("Back") ?>
|
||||
</a>
|
||||
<?php } ?>
|
||||
|
||||
<?php if ($_SESSION["userContext"] === "admin" && isset($_GET["user"]) && $_GET["user"] !== "admin") { ?>
|
||||
<a href="/add/key/?user=<?= htmlentities($_GET["user"]) ?>" class="button button-secondary js-button-create">
|
||||
<i class="fas fa-circle-plus icon-green"></i><?= _("Add SSH Key") ?>
|
||||
</a>
|
||||
<?php } else { ?>
|
||||
<a href="/add/key/" class="button button-secondary js-button-create">
|
||||
<i class="fas fa-circle-plus icon-green"></i><?= _("Add SSH Key") ?>
|
||||
</a>
|
||||
<?php } ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- End toolbar -->
|
||||
|
||||
<div class="container">
|
||||
|
||||
<h1 class="u-text-center u-hide-desktop u-mt20 u-pr30 u-mb20 u-pl30"><?= _("SSH Keys") ?></h1>
|
||||
|
||||
<div class="units-table js-units-container">
|
||||
<div class="units-table-header">
|
||||
<div class="units-table-cell"><?= _("SSH ID") ?></div>
|
||||
<div class="units-table-cell"></div>
|
||||
<div class="units-table-cell"><?= _("SSH Key") ?></div>
|
||||
</div>
|
||||
|
||||
<!-- Begin SSH key list item loop -->
|
||||
<?php
|
||||
$i = 0;
|
||||
foreach ($data as $key => $value) {
|
||||
++$i;
|
||||
?>
|
||||
<div class="units-table-row js-unit" style="<?php if ($data[$key]['ID'] === 'filemanager.ssh.key') { echo 'display: none;'; } ?>">
|
||||
<div class="units-table-cell units-table-heading-cell u-text-bold">
|
||||
<span class="u-hide-desktop"><?= _("SSH ID") ?>:</span>
|
||||
<span class="u-text-break">
|
||||
<?= htmlspecialchars($data[$key]["ID"]) ?>
|
||||
</span>
|
||||
</div>
|
||||
<div class="units-table-cell">
|
||||
<ul class="units-table-row-actions">
|
||||
<li class="units-table-row-action shortcut-delete" data-key-action="js">
|
||||
<a
|
||||
class="units-table-row-action-link data-controls js-confirm-action"
|
||||
<?php if ($_SESSION["userContext"] === "admin" && isset($_GET["user"]) && $_GET["user"] !== "admin") { ?>
|
||||
href="/delete/key/?user=<?= htmlentities($_GET["user"]) ?>&key=<?= $key ?>&token=<?= $_SESSION["token"] ?>"
|
||||
<?php } else { ?>
|
||||
href="/delete/key/?key=<?= $key ?>&token=<?= $_SESSION["token"] ?>"
|
||||
<?php } ?>
|
||||
title="<?= _("Delete") ?>"
|
||||
data-confirm-title="<?= _("Delete") ?>"
|
||||
data-confirm-message="<?= sprintf(_("Are you sure you want to delete SSH key %s?"), $key) ?>"
|
||||
>
|
||||
<i class="fas fa-trash icon-red"></i>
|
||||
<span class="u-hide-desktop"><?= _("Delete") ?></span>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="units-table-cell u-text-bold">
|
||||
<span class="u-hide-desktop"><?= _("SSH Key") ?>:</span>
|
||||
<span class="u-text-break">
|
||||
<?= htmlspecialchars($data[$key]["KEY"], ENT_QUOTES) ?>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<?php } ?>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<footer class="app-footer">
|
||||
<div class="container app-footer-inner">
|
||||
<p>
|
||||
<?php printf(ngettext("%d SSH key", "%d SSH keys", $i), $i); ?>
|
||||
</p>
|
||||
</div>
|
||||
</footer>
|
||||
137
web/templates/pages/list_log.php
Normal file
137
web/templates/pages/list_log.php
Normal file
@@ -0,0 +1,137 @@
|
||||
<!-- Begin toolbar -->
|
||||
<div class="toolbar">
|
||||
<div class="toolbar-inner">
|
||||
<div class="toolbar-buttons">
|
||||
<?php if ($_SESSION["userContext"] === "admin" && $_SESSION["look"] === "admin") { ?>
|
||||
<a href="/list/user/" class="button button-secondary button-back js-button-back">
|
||||
<i class="fas fa-arrow-left icon-blue"></i><?= _("Back") ?>
|
||||
</a>
|
||||
<?php } elseif ($_SESSION["userContext"] === "admin" && htmlentities($_GET["user"]) === "system") { ?>
|
||||
<a href="/list/server/" class="button button-secondary button-back js-button-back">
|
||||
<i class="fas fa-arrow-left icon-blue"></i><?= _("Back") ?>
|
||||
</a>
|
||||
<?php } else { ?>
|
||||
<?php if ($_SESSION["userContext"] === "admin" && $_SESSION['look'] !== '' && $_GET["user"] !== "admin") { ?>
|
||||
<a href="/edit/user/?user=<?= htmlentities($_SESSION["look"]) ?>&token=<?= $_SESSION["token"] ?>" class="button button-secondary button-back js-button-back">
|
||||
<i class="fas fa-arrow-left icon-blue"></i><?= _("Back") ?>
|
||||
</a>
|
||||
<?php } else { ?>
|
||||
<a href="/edit/user/?user=<?= htmlentities($_SESSION["user"]) ?>&token=<?= $_SESSION["token"] ?>" class="button button-secondary button-back js-button-back">
|
||||
<i class="fas fa-arrow-left icon-blue"></i><?= _("Back") ?>
|
||||
</a>
|
||||
<?php } ?>
|
||||
<?php } ?>
|
||||
<?php if ($_SESSION['DEMO_MODE'] != "yes"){
|
||||
if (($_SESSION['userContext'] === 'admin') && (htmlentities($_GET['user']) !== 'admin')) { ?>
|
||||
<?php if (($_SESSION['userContext'] === 'admin') && ($_GET['user'] != '') && (htmlentities($_GET['user']) !== 'admin')) { ?>
|
||||
<?php if (htmlentities($_GET['user']) !== 'system') { ?>
|
||||
<a href="/list/log/auth/?user=<?= htmlentities($_GET['user']); ?>&token=<?= $_SESSION['token'] ?>" class="button button-secondary button-back js-button-back" title="<?= _("Login History") ?>">
|
||||
<i class="fas fa-binoculars icon-green"></i><?= _("Login History") ?>
|
||||
</a>
|
||||
<?php } ?>
|
||||
<?php } else { ?>
|
||||
<a href="/list/log/auth/" class="button button-secondary button-back js-button-back" title="<?= _("Login History") ?>">
|
||||
<i class="fas fa-binoculars icon-green"></i><?= _("Login History") ?>
|
||||
</a>
|
||||
<?php } ?>
|
||||
<?php } ?>
|
||||
<?php if ($_SESSION["userContext"] === "user") { ?>
|
||||
<a href="/list/log/auth/" class="button button-secondary button-back js-button-back" title="<?= _("Login History") ?>">
|
||||
<i class="fas fa-binoculars icon-green"></i><?= _("Login History") ?>
|
||||
</a>
|
||||
<?php }
|
||||
} ?>
|
||||
</div>
|
||||
<div class="toolbar-buttons">
|
||||
<a href="javascript:location.reload();" class="button button-secondary"><i class="fas fa-arrow-rotate-right icon-green"></i><?= _("Refresh") ?></a>
|
||||
<?php if ($_SESSION["userContext"] === "admin" && $_SESSION["look"] === "admin" && $_SESSION["POLICY_SYSTEM_PROTECTED_ADMIN"] === "yes") { ?>
|
||||
<!-- Hide delete buttons-->
|
||||
<?php } else { ?>
|
||||
<?php if ($_SESSION["userContext"] === "admin" || ($_SESSION["userContext"] === "user" && $_SESSION["POLICY_USER_DELETE_LOGS"] !== "no")) { ?>
|
||||
<a
|
||||
class="button button-secondary button-danger data-controls js-confirm-action"
|
||||
<?php if ($_SESSION["userContext"] === "admin" && isset($_GET["user"])) { ?>
|
||||
href="/delete/log/?user=<?= htmlentities($_GET["user"]) ?>&token=<?= $_SESSION["token"] ?>"
|
||||
<?php } else { ?>
|
||||
href="/delete/log/?token=<?= $_SESSION["token"] ?>"
|
||||
<?php } ?>
|
||||
data-confirm-title="<?= _("Delete") ?>"
|
||||
data-confirm-message="<?= _("Are you sure you want to delete the logs?") ?>"
|
||||
>
|
||||
<i class="fas fa-circle-xmark icon-red"></i><?= _("Delete") ?>
|
||||
</a>
|
||||
<?php } ?>
|
||||
<?php } ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- End toolbar -->
|
||||
|
||||
<div class="container">
|
||||
|
||||
<h1 class="u-text-center u-hide-desktop u-mt20 u-pr30 u-mb20 u-pl30"><?= _("Logs") ?></h1>
|
||||
|
||||
<div class="units-table js-units-container">
|
||||
<div class="units-table-header">
|
||||
<div class="units-table-cell"></div>
|
||||
<div class="units-table-cell"><?= _("Date") ?></div>
|
||||
<div class="units-table-cell"><?= _("Time") ?></div>
|
||||
<div class="units-table-cell"><?= _("Category") ?></div>
|
||||
<div class="units-table-cell"><?= _("Message") ?></div>
|
||||
</div>
|
||||
|
||||
<!-- Begin log history entry loop -->
|
||||
<?php
|
||||
foreach ($data as $key => $value) {
|
||||
++$i;
|
||||
|
||||
if ($data[$key]['LEVEL'] === 'Info') {
|
||||
$level_icon = 'fa-info-circle icon-blue';
|
||||
$level_title = _('Information');
|
||||
}
|
||||
if ($data[$key]['LEVEL'] === 'Warning') {
|
||||
$level_icon = 'fa-triangle-exclamation icon-orange';
|
||||
$level_title = _('Warning');
|
||||
}
|
||||
if ($data[$key]['LEVEL'] === 'Error') {
|
||||
$level_icon = 'fa-circle-xmark icon-red';
|
||||
$level_title = _('Error');
|
||||
}
|
||||
?>
|
||||
<div class="units-table-row js-unit">
|
||||
<div class="units-table-cell u-text-center-desktop">
|
||||
<i class="fas <?= $level_icon ?>" title="<?= $level_title ?>"></i>
|
||||
</div>
|
||||
<div class="units-table-cell units-table-heading-cell u-text-bold">
|
||||
<span class="u-hide-desktop"><?= _("Date") ?>:</span>
|
||||
<time datetime="<?= htmlspecialchars($data[$key]["DATE"]) ?>">
|
||||
<?= translate_date($data[$key]["DATE"]) ?>
|
||||
</time>
|
||||
</div>
|
||||
<div class="units-table-cell u-text-bold">
|
||||
<span class="u-hide-desktop"><?= _("Time") ?>:</span>
|
||||
<time datetime="<?= htmlspecialchars($data[$key]["TIME"]) ?>">
|
||||
<?= htmlspecialchars($data[$key]["TIME"]) ?>
|
||||
</time>
|
||||
</div>
|
||||
<div class="units-table-cell u-text-bold">
|
||||
<span class="u-hide-desktop"><?= _("Category") ?>:</span>
|
||||
<?= htmlspecialchars($data[$key]["CATEGORY"]) ?>
|
||||
</div>
|
||||
<div class="units-table-cell">
|
||||
<span class="u-hide-desktop u-text-bold"><?= _("Message") ?>:</span>
|
||||
<?= htmlspecialchars($data[$key]["MESSAGE"], ENT_QUOTES) ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php } ?>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<footer class="app-footer">
|
||||
<div class="container app-footer-inner">
|
||||
<p>
|
||||
<?php printf(ngettext("%d log record", "%d log records", $i), $i); ?>
|
||||
</p>
|
||||
</div>
|
||||
</footer>
|
||||
109
web/templates/pages/list_log_auth.php
Normal file
109
web/templates/pages/list_log_auth.php
Normal file
@@ -0,0 +1,109 @@
|
||||
<!-- Begin toolbar -->
|
||||
<div class="toolbar">
|
||||
<div class="toolbar-inner">
|
||||
<div class="toolbar-buttons">
|
||||
<?php if ($_SESSION["userContext"] === "admin" && isset($_GET["user"]) && htmlentities($_GET["user"]) !== "admin") { ?>
|
||||
<a href="/list/log/?user=<?= htmlentities($_GET["user"]) ?>&token=<?= $_SESSION["token"] ?>" class="button button-secondary button-back js-button-back">
|
||||
<i class="fas fa-arrow-left icon-blue"></i><?= _("Back") ?>
|
||||
</a>
|
||||
<?php } else { ?>
|
||||
<a href="/list/log/" class="button button-secondary button-back js-button-back">
|
||||
<i class="fas fa-arrow-left icon-blue"></i><?= _("Back") ?>
|
||||
</a>
|
||||
<?php } ?>
|
||||
</div>
|
||||
<div class="toolbar-buttons">
|
||||
<a href="javascript:location.reload();" class="button button-secondary"><i class="fas fa-arrow-rotate-right icon-green"></i><?= _("Refresh") ?></a>
|
||||
<?php if ($_SESSION["userContext"] === "admin" && $_SESSION["look"] === "admin" && $_SESSION["POLICY_SYSTEM_PROTECTED_ADMIN"] === "yes") { ?>
|
||||
<!-- Hide delete buttons-->
|
||||
<?php } else { ?>
|
||||
<?php if ($_SESSION["userContext"] === "admin" || ($_SESSION["userContext"] === "user" && $_SESSION["POLICY_USER_DELETE_LOGS"] !== "no")) { ?>
|
||||
<a
|
||||
class="button button-secondary button-danger data-controls js-confirm-action"
|
||||
<?php if ($_SESSION["userContext"] === "admin" && isset($_GET["user"])) { ?>
|
||||
href="/delete/log/auth/?user=<?= htmlentities($_GET["user"]) ?>&token=<?= $_SESSION["token"] ?>"
|
||||
<?php } else { ?>
|
||||
href="/delete/log/auth/?token=<?= $_SESSION["token"] ?>"
|
||||
<?php } ?>
|
||||
data-confirm-title="<?= _("Delete") ?>"
|
||||
data-confirm-message="<?= _("Are you sure you want to delete the logs?") ?>"
|
||||
>
|
||||
<i class="fas fa-circle-xmark icon-red"></i><?= _("Delete") ?>
|
||||
</a>
|
||||
<?php } ?>
|
||||
<?php } ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- End toolbar -->
|
||||
|
||||
<div class="container">
|
||||
|
||||
<h1 class="u-text-center u-hide-desktop u-mt20 u-pr30 u-mb20 u-pl30"><?= _("Auth Log") ?></h1>
|
||||
|
||||
<div class="units-table js-units-container">
|
||||
<div class="units-table-header">
|
||||
<div class="units-table-cell"><?= _("Status") ?></div>
|
||||
<div class="units-table-cell"><?= _("Date") ?></div>
|
||||
<div class="units-table-cell"><?= _("Time") ?></div>
|
||||
<div class="units-table-cell"><?= _("IP Address") ?></div>
|
||||
<div class="units-table-cell"><?= _("Browser") ?></div>
|
||||
</div>
|
||||
|
||||
<!-- Begin log history entry loop -->
|
||||
<?php
|
||||
foreach ($data as $key => $value) {
|
||||
++$i;
|
||||
|
||||
if ($data[$key]['ACTION'] == 'login') {
|
||||
if ($data[$key]['ACTIVE'] === 'yes') {
|
||||
$action_icon = 'fa-right-to-bracket icon-maroon';
|
||||
} else {
|
||||
$action_icon = ' fa-right-to-bracket icon-dim';
|
||||
}
|
||||
}
|
||||
if ($data[$key]['STATUS'] == 'success') {
|
||||
$status_icon = 'fa-circle-check icon-green';
|
||||
$status_title = _('Success');
|
||||
} else {
|
||||
$status_icon = 'fa-circle-minus icon-red';
|
||||
$status_title = _('Failed');
|
||||
}
|
||||
?>
|
||||
<div class="units-table-row js-unit">
|
||||
<div class="units-table-cell u-text-center-desktop">
|
||||
<i class="fas <?= $status_icon ?> u-mr5" title="<?= $status_title ?>"></i>
|
||||
</div>
|
||||
<div class="units-table-cell units-table-heading-cell u-text-bold">
|
||||
<span class="u-hide-desktop"><?= _("Date") ?>:</span>
|
||||
<time class="u-text-no-wrap" datetime="<?= htmlspecialchars($data[$key]["DATE"]) ?>">
|
||||
<?= translate_date($data[$key]["DATE"]) ?>
|
||||
</time>
|
||||
</div>
|
||||
<div class="units-table-cell u-text-bold">
|
||||
<span class="u-hide-desktop"><?= _("Time") ?>:</span>
|
||||
<time datetime="<?= htmlspecialchars($data[$key]["TIME"]) ?>">
|
||||
<?= htmlspecialchars($data[$key]["TIME"]) ?>
|
||||
</time>
|
||||
</div>
|
||||
<div class="units-table-cell">
|
||||
<span class="u-hide-desktop u-text-bold"><?= _("IP Address") ?>:</span>
|
||||
<?= htmlspecialchars($data[$key]["IP"]) ?>
|
||||
</div>
|
||||
<div class="units-table-cell">
|
||||
<span class="u-hide-desktop u-text-bold"><?= _("Browser") ?>:</span>
|
||||
<?= htmlspecialchars($data[$key]["USER_AGENT"]) ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php } ?>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<footer class="app-footer">
|
||||
<div class="container app-footer-inner">
|
||||
<p>
|
||||
<?php printf(ngettext("%d log record", "%d log records", $i), $i); ?>
|
||||
</p>
|
||||
</div>
|
||||
</footer>
|
||||
343
web/templates/pages/list_mail.php
Normal file
343
web/templates/pages/list_mail.php
Normal file
@@ -0,0 +1,343 @@
|
||||
<!-- Begin toolbar -->
|
||||
<div class="toolbar">
|
||||
<div class="toolbar-inner">
|
||||
<div class="toolbar-buttons">
|
||||
<?php if ($read_only !== "true") { ?>
|
||||
<a href="/add/mail/" class="button button-secondary js-button-create">
|
||||
<i class="fas fa-circle-plus icon-green"></i><?= _("Add Mail Domain") ?>
|
||||
</a>
|
||||
<?php } ?>
|
||||
</div>
|
||||
<div class="toolbar-right">
|
||||
<div class="toolbar-sorting">
|
||||
<button class="toolbar-sorting-toggle js-toggle-sorting-menu" type="button" title="<?= _("Sort items") ?>">
|
||||
<?= _("Sort by") ?>:
|
||||
<span class="u-text-bold">
|
||||
<?php if ($_SESSION['userSortOrder'] === 'name') { $label = _('Name'); } else { $label = _('Date'); } ?>
|
||||
<?= $label ?> <i class="fas fa-arrow-down-a-z"></i>
|
||||
</span>
|
||||
</button>
|
||||
<ul class="toolbar-sorting-menu js-sorting-menu u-hidden">
|
||||
<li data-entity="sort-accounts" data-sort-as-int="1">
|
||||
<span class="name"><?= _("Accounts") ?> <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 data-entity="sort-date" data-sort-as-int="1">
|
||||
<span class="name <?php if ($_SESSION['userSortOrder'] === 'date') { echo 'active'; } ?>"><?= _("Date") ?> <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 data-entity="sort-disk" data-sort-as-int="1">
|
||||
<span class="name"><?= _("Disk") ?> <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 data-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>
|
||||
<?php if ($read_only !== "true") { ?>
|
||||
<form x-data x-bind="BulkEdit" action="/bulk/mail/" method="post">
|
||||
<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") { ?>
|
||||
<option value="rebuild"><?= _("Rebuild All") ?></option>
|
||||
<?php } ?>
|
||||
<option value="suspend"><?= _("Suspend") ?></option>
|
||||
<option value="unsuspend"><?= _("Unsuspend") ?></option>
|
||||
<option value="delete"><?= _("Delete") ?></option>
|
||||
</select>
|
||||
<button type="submit" class="toolbar-input-submit" title="<?= _("Apply to selected") ?>">
|
||||
<i class="fas fa-arrow-right"></i>
|
||||
</button>
|
||||
</form>
|
||||
<?php } ?>
|
||||
</div>
|
||||
<div class="toolbar-search">
|
||||
<form action="/search/" method="get">
|
||||
<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>
|
||||
</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- End toolbar -->
|
||||
|
||||
<div class="container">
|
||||
|
||||
<h1 class="u-text-center u-hide-desktop u-mt20 u-pr30 u-mb20 u-pl30"><?= _("Mail Domains") ?></h1>
|
||||
|
||||
<div class="units-table js-units-container">
|
||||
<div class="units-table-header">
|
||||
<div class="units-table-cell">
|
||||
<input type="checkbox" class="js-toggle-all-checkbox" title="<?= _("Select all") ?>" <?= $display_mode ?>>
|
||||
</div>
|
||||
<div class="units-table-cell"><?= _("Name") ?></div>
|
||||
<div class="units-table-cell"></div>
|
||||
<div class="units-table-cell u-text-center"><?= _("Accounts") ?></div>
|
||||
<div class="units-table-cell u-text-center"><?= _("Disk") ?></div>
|
||||
<div class="units-table-cell u-text-center"><?= _("Anti-Virus") ?></div>
|
||||
<div class="units-table-cell u-text-center"><?= _("Spam Filter") ?></div>
|
||||
<div class="units-table-cell u-text-center"><?= _("DKIM") ?></div>
|
||||
<div class="units-table-cell u-text-center"><?= _("SSL") ?></div>
|
||||
</div>
|
||||
|
||||
<!-- Begin mail domain list item loop -->
|
||||
<?php
|
||||
list($http_host, $port) = explode(':', $_SERVER["HTTP_HOST"].":");
|
||||
$webmail = "webmail";
|
||||
if (!empty($_SESSION['WEBMAIL_ALIAS'])) $webmail = $_SESSION['WEBMAIL_ALIAS'];
|
||||
foreach ($data as $key => $value) {
|
||||
++$i;
|
||||
if ($data[$key]['SUSPENDED'] == 'yes') {
|
||||
$status = 'suspended';
|
||||
$spnd_action = 'unsuspend';
|
||||
$spnd_action_title = _('Unsuspend');
|
||||
$spnd_icon = 'fa-play';
|
||||
$spnd_icon_class = 'icon-green';
|
||||
$spnd_confirmation = _('Are you sure you want to unsuspend domain %s?');
|
||||
if ($data[$key]['ANTIVIRUS'] == 'no') {
|
||||
$antivirus_icon = 'fa-circle-xmark';
|
||||
$antivirus_title = _('Disabled');
|
||||
} else {
|
||||
$antivirus_icon = 'fa-circle-check';
|
||||
$antivirus_title = _('Enabled');
|
||||
}
|
||||
if ($data[$key]['ANTISPAM'] == 'no') {
|
||||
$antispam_icon = 'fa-circle-xmark';
|
||||
$antispam_title = _('Disabled');
|
||||
} else {
|
||||
$antispam_icon = 'fa-circle-check';
|
||||
$antispam_title = _('Enabled');
|
||||
}
|
||||
if ($data[$key]['DKIM'] == 'no') {
|
||||
$dkim_icon = 'fa-circle-xmark';
|
||||
$dkim_title = _('Disabled');
|
||||
} else {
|
||||
$dkim_icon = 'fa-circle-check';
|
||||
$dkim_title = _('Enabled');
|
||||
}
|
||||
if ($data[$key]['SSL'] == 'no') {
|
||||
$ssl_icon = 'fa-circle-xmark';
|
||||
$ssl_title = _('Disabled');
|
||||
} else {
|
||||
$ssl_icon = 'fa-circle-check';
|
||||
$ssl_title = _('Enabled');
|
||||
}
|
||||
} else {
|
||||
$status = 'active';
|
||||
$spnd_action = 'suspend';
|
||||
$spnd_action_title = _('Suspend');
|
||||
$spnd_icon = 'fa-pause';
|
||||
$spnd_icon_class = 'icon-highlight';
|
||||
$spnd_confirmation = _('Are you sure you want to suspend domain %s?');
|
||||
if ($data[$key]['ANTIVIRUS'] == 'no') {
|
||||
$antivirus_icon = 'fa-circle-xmark icon-red';
|
||||
$antivirus_title = _('Disabled');
|
||||
} else {
|
||||
$antivirus_icon = 'fa-circle-check icon-green';
|
||||
$antivirus_title = _('Enabled');
|
||||
}
|
||||
if ($data[$key]['ANTISPAM'] == 'no') {
|
||||
$antispam_icon = 'fa-circle-xmark icon-red';
|
||||
$antispam_title = _('Disabled');
|
||||
} else {
|
||||
$antispam_icon = 'fa-circle-check icon-green';
|
||||
$antispam_title = _('Enabled');
|
||||
}
|
||||
if ($data[$key]['DKIM'] == 'no') {
|
||||
$dkim_icon = 'fa-circle-xmark icon-red';
|
||||
$dkim_title = _('Disabled');
|
||||
} else {
|
||||
$dkim_icon = 'fa-circle-check icon-green';
|
||||
$dkim_title = _('Enabled');
|
||||
}
|
||||
if ($data[$key]['SSL'] == 'no') {
|
||||
$ssl_icon = 'fa-circle-xmark icon-red';
|
||||
$ssl_title = _('Disabled');
|
||||
} else {
|
||||
$ssl_icon = 'fa-circle-check icon-green';
|
||||
$ssl_title = _('Enabled');
|
||||
}
|
||||
}
|
||||
if (empty($data[$key]['CATCHALL'])) {
|
||||
$data[$key]['CATCHALL'] = '/dev/null';
|
||||
}
|
||||
?>
|
||||
<div class="units-table-row <?php if ($status == 'suspended') echo 'disabled'; ?> js-unit"
|
||||
data-sort-date="<?= strtotime($data[$key]['DATE'].' '.$data[$key]['TIME']) ?>"
|
||||
data-sort-name="<?= $key ?>"
|
||||
data-sort-disk="<?= $data[$key]["U_DISK"] ?>"
|
||||
data-sort-accounts="<?= $data[$key]["ACCOUNTS"] ?>">
|
||||
<div class="units-table-cell">
|
||||
<div>
|
||||
<input id="check<?= $i ?>" class="js-unit-checkbox" type="checkbox" title="<?= _("Select") ?>" name="domain[]" value="<?= $key ?>" <?= $display_mode ?>>
|
||||
<label for="check<?= $i ?>" class="u-hide-desktop"><?= _("Select") ?></label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="units-table-cell units-table-heading-cell u-text-bold">
|
||||
<span class="u-hide-desktop"><?= _("Name") ?>:</span>
|
||||
<a href="?domain=<?= $key ?>&token=<?= $_SESSION["token"] ?>" title="<?= _("Mail Accounts") ?>: <?= $key ?>">
|
||||
<?= $key ?>
|
||||
</a>
|
||||
</div>
|
||||
<div class="units-table-cell">
|
||||
<ul class="units-table-row-actions">
|
||||
<?php if ($read_only === "true") { ?>
|
||||
<li class="units-table-row-action shortcut-l" data-key-action="href">
|
||||
<a
|
||||
class="units-table-row-action-link"
|
||||
href="?domain=<?= $key ?>&token=<?= $_SESSION["token"] ?>"
|
||||
title="<?= _("Mail Accounts") ?>"
|
||||
>
|
||||
<i class="fas fa-users icon-blue"></i>
|
||||
<span class="u-hide-desktop"><?= _("Mail Accounts") ?></span>
|
||||
</a>
|
||||
</li>
|
||||
<li class="units-table-row-action shortcut-l" data-key-action="href">
|
||||
<a
|
||||
class="units-table-row-action-link"
|
||||
href="?domain=<?= $key ?>&dns=1&token=<?= $_SESSION["token"] ?>"
|
||||
title="<?= _("DNS Records") ?>"
|
||||
>
|
||||
<i class="fas fa-book-atlas icon-blue"></i>
|
||||
<span class="u-hide-desktop"><?= _("DNS Records") ?></span>
|
||||
</a>
|
||||
</li>
|
||||
<?php if ($data[$key]["SUSPENDED"] == "no") { ?>
|
||||
<li class="units-table-row-action" data-key-action="href">
|
||||
<a
|
||||
class="units-table-row-action-link"
|
||||
href="http://<?= $webmail ?>.<?= $key ?>/"
|
||||
target="_blank"
|
||||
title="<?= _("Open Webmail") ?>"
|
||||
>
|
||||
<i class="fas fa-paper-plane icon-lightblue"></i>
|
||||
<span class="u-hide-desktop"><?= _("Open Webmail") ?></span>
|
||||
</a>
|
||||
</li>
|
||||
<?php } ?>
|
||||
<?php } else { ?>
|
||||
<?php if ($data[$key]["SUSPENDED"] == "no") { ?>
|
||||
<li class="units-table-row-action shortcut-n" data-key-action="href">
|
||||
<a
|
||||
class="units-table-row-action-link"
|
||||
href="/add/mail/?domain=<?= $key ?>&token=<?= $_SESSION["token"] ?>"
|
||||
title="<?= _("Add Mail Account") ?>"
|
||||
>
|
||||
<i class="fas fa-circle-plus icon-green"></i>
|
||||
<span class="u-hide-desktop"><?= _("Add Mail Account") ?></span>
|
||||
</a>
|
||||
</li>
|
||||
<?php if ($_SESSION["WEBMAIL_SYSTEM"]) { ?>
|
||||
<?php if (!empty($data[$key]["WEBMAIL"])) { ?>
|
||||
<li class="units-table-row-action" data-key-action="href">
|
||||
<a
|
||||
class="units-table-row-action-link"
|
||||
href="http://<?= $webmail ?>.<?= $key ?>/"
|
||||
target="_blank"
|
||||
title="<?= _("Open Webmail") ?>"
|
||||
>
|
||||
<i class="fas fa-paper-plane icon-lightblue"></i>
|
||||
<span class="u-hide-desktop"><?= _("Open Webmail") ?></span>
|
||||
</a>
|
||||
</li>
|
||||
<?php } ?>
|
||||
<?php } ?>
|
||||
<li class="units-table-row-action shortcut-enter" data-key-action="href">
|
||||
<a
|
||||
class="units-table-row-action-link"
|
||||
href="/edit/mail/?domain=<?= $key ?>&token=<?= $_SESSION["token"] ?>"
|
||||
title="<?= _("Edit Mail Domain") ?>"
|
||||
>
|
||||
<i class="fas fa-pencil icon-orange"></i>
|
||||
<span class="u-hide-desktop"><?= _("Edit Mail Domain") ?></span>
|
||||
</a>
|
||||
</li>
|
||||
<?php } ?>
|
||||
<li class="units-table-row-action shortcut-l" data-key-action="href">
|
||||
<a
|
||||
class="units-table-row-action-link"
|
||||
href="?domain=<?= $key ?>&dns=1&token=<?= $_SESSION["token"] ?>"
|
||||
title="<?= _("DNS Records") ?>"
|
||||
>
|
||||
<i class="fas fa-book-atlas icon-blue"></i>
|
||||
<span class="u-hide-desktop"><?= _("DNS Records") ?></span>
|
||||
</a>
|
||||
</li>
|
||||
<li class="units-table-row-action shortcut-s" data-key-action="js">
|
||||
<a
|
||||
class="units-table-row-action-link data-controls js-confirm-action"
|
||||
href="/<?= $spnd_action ?>/mail/?domain=<?= $key ?>&token=<?= $_SESSION["token"] ?>"
|
||||
title="<?= $spnd_action_title ?>"
|
||||
data-confirm-title="<?= $spnd_action_title ?>"
|
||||
data-confirm-message="<?= sprintf($spnd_confirmation, $key) ?>"
|
||||
>
|
||||
<i class="fas <?= $spnd_icon ?> <?= $spnd_icon_class ?>"></i>
|
||||
<span class="u-hide-desktop"><?= $spnd_action_title ?></span>
|
||||
</a>
|
||||
</li>
|
||||
<li class="units-table-row-action shortcut-delete" data-key-action="js">
|
||||
<a
|
||||
class="units-table-row-action-link data-controls js-confirm-action"
|
||||
href="/delete/mail/?domain=<?= $key ?>&token=<?= $_SESSION["token"] ?>"
|
||||
title="<?= _("Delete") ?>"
|
||||
data-confirm-title="<?= _("Delete") ?>"
|
||||
data-confirm-message="<?= sprintf(_("Are you sure you want to delete domain %s?"), $key) ?>"
|
||||
>
|
||||
<i class="fas fa-trash icon-red"></i>
|
||||
<span class="u-hide-desktop"><?= _("Delete") ?></span>
|
||||
</a>
|
||||
</li>
|
||||
<?php } ?>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="units-table-cell u-text-center-desktop">
|
||||
<span class="u-hide-desktop u-text-bold"><?= _("Accounts") ?>:</span>
|
||||
<?php
|
||||
if ($data[$key]['ACCOUNTS']) {
|
||||
$mail_accounts = htmlentities($data[$key]['ACCOUNTS']);
|
||||
} else {
|
||||
$mail_accounts = '0';
|
||||
}
|
||||
?>
|
||||
<?= $mail_accounts ?>
|
||||
</div>
|
||||
<div class="units-table-cell u-text-center-desktop">
|
||||
<span class="u-hide-desktop u-text-bold"><?= _("Disk") ?>:</span>
|
||||
<span class="u-text-bold">
|
||||
<?= humanize_usage_size($data[$key]["U_DISK"]) ?>
|
||||
</span>
|
||||
<span class="u-text-small">
|
||||
<?= humanize_usage_measure($data[$key]["U_DISK"]) ?>
|
||||
</span>
|
||||
</div>
|
||||
<div class="units-table-cell u-text-center-desktop">
|
||||
<span class="u-hide-desktop u-text-bold"><?= _("Anti-Virus") ?>:</span>
|
||||
<i class="fas <?= $antivirus_icon ?>" title="<?= $antivirus_title ?>"></i>
|
||||
</div>
|
||||
<div class="units-table-cell u-text-center-desktop">
|
||||
<span class="u-hide-desktop u-text-bold"><?= _("Spam Filter") ?>:</span>
|
||||
<i class="fas <?= $antispam_icon ?>" title="<?= $antispam_title ?>"></i>
|
||||
</div>
|
||||
<div class="units-table-cell u-text-center-desktop">
|
||||
<span class="u-hide-desktop u-text-bold"><?= _("DKIM") ?>:</span>
|
||||
<i class="fas <?= $dkim_icon ?>" title="<?= $dkim_title ?>"></i>
|
||||
</div>
|
||||
<div class="units-table-cell u-text-center-desktop">
|
||||
<span class="u-hide-desktop u-text-bold"><?= _("SSL") ?>:</span>
|
||||
<i class="fas <?= $ssl_icon ?>" title="<?= $ssl_title ?>"></i>
|
||||
</div>
|
||||
</div>
|
||||
<?php } ?>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<footer class="app-footer">
|
||||
<div class="container app-footer-inner">
|
||||
<p>
|
||||
<?php printf(ngettext("%d mail domain", "%d mail domains", $i), $i); ?>
|
||||
</p>
|
||||
</div>
|
||||
</footer>
|
||||
291
web/templates/pages/list_mail_acc.php
Normal file
291
web/templates/pages/list_mail_acc.php
Normal file
@@ -0,0 +1,291 @@
|
||||
<?php
|
||||
$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 button-back js-button-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 js-button-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 js-button-create">
|
||||
<i class="fas fa-pencil icon-blue"></i><?= _("Edit Mail Domain") ?>
|
||||
</a>
|
||||
<?php } ?>
|
||||
</div>
|
||||
<div class="toolbar-right">
|
||||
<div class="toolbar-sorting">
|
||||
<button class="toolbar-sorting-toggle js-toggle-sorting-menu" type="button" title="<?= _("Sort items") ?>">
|
||||
<?= _("Sort by") ?>:
|
||||
<span class="u-text-bold">
|
||||
<?php if ($_SESSION['userSortOrder'] === 'name') { $label = _('Name'); } else { $label = _('Date'); } ?>
|
||||
<?= $label ?> <i class="fas fa-arrow-down-a-z"></i>
|
||||
</span>
|
||||
</button>
|
||||
<ul class="toolbar-sorting-menu js-sorting-menu u-hidden">
|
||||
<li data-entity="sort-date" data-sort-as-int="1">
|
||||
<span class="name <?php if ($_SESSION['userSortOrder'] === 'date') { echo 'active'; } ?>"><?= _("Date") ?> <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 data-entity="sort-disk" data-sort-as-int="1">
|
||||
<span class="name"><?= _("Disk") ?> <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 data-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 data-entity="sort-quota" data-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") { ?>
|
||||
<form x-data 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">
|
||||
<select class="form-select" name="action">
|
||||
<option value=""><?= _("Apply to selected") ?></option>
|
||||
<option value="suspend"><?= _("Suspend") ?></option>
|
||||
<option value="unsuspend"><?= _("Unsuspend") ?></option>
|
||||
<option value="delete"><?= _("Delete") ?></option>
|
||||
</select>
|
||||
<button type="submit" class="toolbar-input-submit" title="<?= _("Apply to selected") ?>">
|
||||
<i class="fas fa-arrow-right"></i>
|
||||
</button>
|
||||
</form>
|
||||
<?php } ?>
|
||||
</div>
|
||||
<div class="toolbar-search">
|
||||
<form action="/search/" method="get">
|
||||
<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>
|
||||
</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- End toolbar -->
|
||||
|
||||
<div class="container">
|
||||
|
||||
<h1 class="u-text-center u-hide-desktop u-mt20 u-pr30 u-mb20 u-pl30"><?= _("Mail Accounts") ?></h1>
|
||||
|
||||
<div class="units-table js-units-container">
|
||||
<div class="units-table-header">
|
||||
<div class="units-table-cell">
|
||||
<input type="checkbox" class="js-toggle-all-checkbox" title="<?= _("Select all") ?>" <?= $display_mode ?>>
|
||||
</div>
|
||||
<div class="units-table-cell"><?= _("Name") ?></div>
|
||||
<div class="units-table-cell"></div>
|
||||
<div class="units-table-cell u-text-center"><?= _("Disk") ?></div>
|
||||
<div class="units-table-cell u-text-center"><?= _("Quota") ?></div>
|
||||
<div class="units-table-cell u-text-center"><?= _("Aliases") ?></div>
|
||||
<div class="units-table-cell u-text-center"><?= _("Forwarding") ?></div>
|
||||
<div class="units-table-cell u-text-center"><?= _("Auto Reply") ?></div>
|
||||
</div>
|
||||
|
||||
<!-- Begin mail account list item loop -->
|
||||
<?php
|
||||
foreach ($data as $key => $value) {
|
||||
++$i;
|
||||
if ($data[$key]['SUSPENDED'] == 'yes') {
|
||||
$status = 'suspended';
|
||||
$spnd_action = 'unsuspend';
|
||||
$spnd_action_title = _('Unsuspend');
|
||||
$spnd_icon = 'fa-play';
|
||||
$spnd_icon_class = 'icon-green';
|
||||
$spnd_confirmation = _('Are you sure you want to unsuspend %s?');
|
||||
if ($data[$key]['ALIAS'] == '') {
|
||||
$alias_icon = 'fa-circle-minus';
|
||||
$alias_title = _('No aliases');
|
||||
} else {
|
||||
$alias_icon = 'fa-circle-check';
|
||||
$alias_title = _('Aliases used');
|
||||
}
|
||||
if ($data[$key]['FWD'] == '') {
|
||||
$fwd_icon = 'fa-circle-minus';
|
||||
$fwd_title = _('Disabled');
|
||||
} else {
|
||||
$fwd_icon = 'fa-circle-check';
|
||||
$fwd_title = _('Enabled');
|
||||
}
|
||||
if ($data[$key]['AUTOREPLY'] == 'no') {
|
||||
$autoreply_icon = 'fa-circle-minus';
|
||||
$autoreply_title = _('Disabled');
|
||||
} else {
|
||||
$autoreply_icon = 'fa-circle-check';
|
||||
$autoreply_title = _('Enabled');
|
||||
}
|
||||
} else {
|
||||
$status = 'active';
|
||||
$spnd_action = 'suspend';
|
||||
$spnd_action_title = _('Suspend');
|
||||
$spnd_icon = 'fa-pause';
|
||||
$spnd_icon_class = 'icon-highlight';
|
||||
$spnd_confirmation = _('Are you sure you want to suspend %s?');
|
||||
if ($data[$key]['ALIAS'] == '') {
|
||||
$alias_icon = 'fa-circle-minus';
|
||||
$alias_title = _('No aliases');
|
||||
} else {
|
||||
$alias_icon = 'fa-circle-check icon-green';
|
||||
$alias_title = _('Aliases used');
|
||||
}
|
||||
if ($data[$key]['FWD'] == '') {
|
||||
$fwd_icon = 'fa-circle-minus';
|
||||
$fwd_title = _('Disabled');
|
||||
} else {
|
||||
$fwd_icon = 'fa-circle-check icon-green';
|
||||
$fwd_title = _('Enabled');
|
||||
}
|
||||
if ($data[$key]['AUTOREPLY'] == 'no') {
|
||||
$autoreply_icon = 'fa-circle-minus';
|
||||
$autoreply_title = _('Disabled');
|
||||
} else {
|
||||
$autoreply_icon = 'fa-circle-check icon-green';
|
||||
$autoreply_title = _('Enabled');
|
||||
}
|
||||
}
|
||||
?>
|
||||
<div class="units-table-row <?php if ($status == 'suspended') echo 'disabled'; ?> js-unit"
|
||||
data-sort-date="<?= strtotime($data[$key]['DATE'].' '.$data[$key]['TIME']) ?>"
|
||||
data-sort-name="<?= $key ?>"
|
||||
data-sort-disk="<?= $data[$key]["U_DISK"] ?>"
|
||||
data-sort-quota="<?= $data[$key]["QUOTA"] ?>">
|
||||
<div class="units-table-cell">
|
||||
<div>
|
||||
<input id="check<?= $i ?>" class="js-unit-checkbox" type="checkbox" title="<?= _("Select") ?>" name="account[]" value="<?= $key ?>" <?= $display_mode ?>>
|
||||
<label for="check<?= $i ?>" class="u-hide-desktop"><?= _("Select") ?></label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="units-table-cell units-table-heading-cell u-text-bold">
|
||||
<span class="u-hide-desktop"><?= _("Name") ?>:</span>
|
||||
<?php if ($read_only === "true" || $data[$key]["SUSPENDED"] == "yes") { ?>
|
||||
<?= $key . "@" . htmlentities($_GET["domain"]) ?>
|
||||
<?php } else { ?>
|
||||
<a href="/edit/mail/?domain=<?= htmlspecialchars($_GET['domain']) ?>&account=<?= $key ?>&token=<?= $_SESSION['token'] ?>" title="<?= _("Edit Mail Account") ?>: <?= $key ?>@<?= htmlspecialchars($_GET['domain']) ?>">
|
||||
<?= $key."@".htmlentities($_GET['domain']); ?>
|
||||
</a>
|
||||
<?php } ?>
|
||||
</div>
|
||||
<div class="units-table-cell">
|
||||
<ul class="units-table-row-actions">
|
||||
<?php if ($read_only === "true") { ?>
|
||||
<!-- Restrict the ability to edit, delete, or suspend domain items when impersonating 'admin' account -->
|
||||
<?php if ($data[$key]["SUSPENDED"] != "yes") { ?>
|
||||
<li class="units-table-row-action" data-key-action="href">
|
||||
<a
|
||||
class="units-table-row-action-link"
|
||||
href="http://<?= $v_webmail_alias ?>.<?= htmlspecialchars($_GET["domain"]) ?>/?_user=<?= $key ?>@<?= htmlspecialchars($_GET["domain"]) ?>"
|
||||
target="_blank"
|
||||
title="<?= _("Open Webmail") ?>"
|
||||
>
|
||||
<i class="fas fa-envelope-open-text icon-maroon"></i>
|
||||
<span class="u-hide-desktop"><?= _("Open Webmail") ?></span>
|
||||
</a>
|
||||
</li>
|
||||
<?php } ?>
|
||||
<?php } else { ?>
|
||||
<?php if ($data[$key]["SUSPENDED"] == "no") { ?>
|
||||
<?php if ($_SESSION["WEBMAIL_SYSTEM"]) { ?>
|
||||
<?php if (!empty($data[$key]["WEBMAIL"])) { ?>
|
||||
<li class="units-table-row-action" data-key-action="href">
|
||||
<a
|
||||
class="units-table-row-action-link"
|
||||
href="http://<?= $v_webmail_alias ?>.<?= htmlspecialchars($_GET["domain"]) ?>/?_user=<?= $key ?>@<?= htmlspecialchars($_GET["domain"]) ?>"
|
||||
target="_blank"
|
||||
title="<?= _("Open Webmail") ?>"
|
||||
>
|
||||
<i class="fas fa-envelope-open-text icon-maroon"></i>
|
||||
<span class="u-hide-desktop"><?= _("Open Webmail") ?></span>
|
||||
</a>
|
||||
</li>
|
||||
<?php } ?>
|
||||
<?php } ?>
|
||||
<li class="units-table-row-action shortcut-enter" data-key-action="href">
|
||||
<a
|
||||
class="units-table-row-action-link"
|
||||
href="/edit/mail/?domain=<?= htmlspecialchars($_GET["domain"]) ?>&account=<?= $key ?>&token=<?= $_SESSION["token"] ?>"
|
||||
title="<?= _("Edit Mail Account") ?>"
|
||||
>
|
||||
<i class="fas fa-pencil icon-orange"></i>
|
||||
<span class="u-hide-desktop"><?= _("Edit Mail Account") ?></span>
|
||||
</a>
|
||||
</li>
|
||||
<?php } ?>
|
||||
<li class="units-table-row-action shortcut-s" data-key-action="js">
|
||||
<a
|
||||
class="units-table-row-action-link data-controls js-confirm-action"
|
||||
href="/<?= $spnd_action ?>/mail/?domain=<?= htmlspecialchars($_GET["domain"]) ?>&account=<?= $key ?>&token=<?= $_SESSION["token"] ?>"
|
||||
title="<?= $spnd_action_title ?>"
|
||||
data-confirm-title="<?= $spnd_action_title ?>"
|
||||
data-confirm-message="<?= sprintf($spnd_confirmation, $key) ?>"
|
||||
>
|
||||
<i class="fas <?= $spnd_icon ?> <?= $spnd_icon_class ?>"></i>
|
||||
<span class="u-hide-desktop"><?= $spnd_action_title ?></span>
|
||||
</a>
|
||||
</li>
|
||||
<li class="units-table-row-action shortcut-delete" data-key-action="js">
|
||||
<a
|
||||
class="units-table-row-action-link data-controls js-confirm-action"
|
||||
href="/delete/mail/?domain=<?= htmlspecialchars($_GET["domain"]) ?>&account=<?= $key ?>&token=<?= $_SESSION["token"] ?>"
|
||||
title="<?= _("Delete") ?>"
|
||||
data-confirm-title="<?= _("Delete") ?>"
|
||||
data-confirm-message="<?= sprintf(_("Are you sure you want to delete %s?"), $key) ?>"
|
||||
>
|
||||
<i class="fas fa-trash icon-red"></i>
|
||||
<span class="u-hide-desktop"><?= _("Delete") ?></span>
|
||||
</a>
|
||||
</li>
|
||||
<?php } ?>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="units-table-cell u-text-center-desktop">
|
||||
<span class="u-hide-desktop u-text-bold"><?= _("Disk") ?>:</span>
|
||||
<span class="u-text-bold">
|
||||
<?= humanize_usage_size($data[$key]["U_DISK"]) ?>
|
||||
</span>
|
||||
<span class="u-text-small">
|
||||
<?= humanize_usage_measure($data[$key]["U_DISK"]) ?>
|
||||
</span>
|
||||
</div>
|
||||
<div class="units-table-cell u-text-center-desktop">
|
||||
<span class="u-hide-desktop u-text-bold"><?= _("Quota") ?>:</span>
|
||||
<span class="u-text-bold">
|
||||
<?= humanize_usage_size($data[$key]["QUOTA"]) ?>
|
||||
</span>
|
||||
<span class="u-text-small">
|
||||
<?= humanize_usage_measure($data[$key]["QUOTA"]) ?>
|
||||
</span>
|
||||
</div>
|
||||
<div class="units-table-cell u-text-center-desktop">
|
||||
<span class="u-hide-desktop u-text-bold"><?= _("Aliases") ?>:</span>
|
||||
<i class="fas <?= $alias_icon ?>" title="<?= $alias_title ?>"></i>
|
||||
</div>
|
||||
<div class="units-table-cell u-text-center-desktop">
|
||||
<span class="u-hide-desktop u-text-bold"><?= _("Forwarding") ?>:</span>
|
||||
<i class="fas <?= $fwd_icon ?>" title="<?= $fwd_title ?>"></i>
|
||||
</div>
|
||||
<div class="units-table-cell u-text-center-desktop">
|
||||
<span class="u-hide-desktop u-text-bold"><?= _("Auto Reply") ?>:</span>
|
||||
<i class="fas <?= $autoreply_icon ?>" title="<?= $autoreply_title ?>"></i>
|
||||
</div>
|
||||
</div>
|
||||
<?php } ?>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<footer class="app-footer">
|
||||
<div class="container app-footer-inner">
|
||||
<p>
|
||||
<?php printf(ngettext("%d mail account", "%d mail accounts", $i), $i); ?>
|
||||
</p>
|
||||
</div>
|
||||
</footer>
|
||||
168
web/templates/pages/list_mail_dns.php
Normal file
168
web/templates/pages/list_mail_dns.php
Normal file
@@ -0,0 +1,168 @@
|
||||
<?php
|
||||
$v_webmail_alias = "webmail";
|
||||
if (!empty($_SESSION["WEBMAIL_ALIAS"])) {
|
||||
$v_webmail_alias = $_SESSION["WEBMAIL_ALIAS"];
|
||||
}
|
||||
?>
|
||||
<div class="toolbar">
|
||||
<div class="toolbar-inner">
|
||||
<div class="toolbar-buttons">
|
||||
<a class="button button-secondary button-back js-button-back" href="/list/mail/">
|
||||
<i class="fas fa-arrow-left icon-blue"></i><?= _("Back") ?>
|
||||
</a>
|
||||
</div>
|
||||
<div class="toolbar-right"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="container">
|
||||
|
||||
<h1 class="u-text-center u-hide-desktop u-mt20 u-pr30 u-mb20 u-pl30"><?= _("DNS Records") ?></h1>
|
||||
|
||||
<div class="units-table js-units-container">
|
||||
<div class="units-table-header">
|
||||
<div class="units-table-cell"><?= _("Record") ?></div>
|
||||
<div class="units-table-cell u-text-center"><?= _("Type") ?></div>
|
||||
<div class="units-table-cell u-text-center"><?= _("Priority") ?></div>
|
||||
<div class="units-table-cell u-text-center"><?= _("TTL") ?></div>
|
||||
<div class="units-table-cell"><?= _("IP or Value") ?></div>
|
||||
</div>
|
||||
|
||||
<div class="units-table-row js-unit">
|
||||
<div class="units-table-cell">
|
||||
<label class="u-hide-desktop u-text-bold"><?= _("Record") ?>:</label>
|
||||
<input type="text" class="form-control" value="mail.<?= htmlspecialchars($_GET["domain"]) ?>">
|
||||
</div>
|
||||
<div class="units-table-cell u-text-bold u-text-center-desktop">
|
||||
<span class="u-hide-desktop"><?= _("Type") ?>:</span>
|
||||
A
|
||||
</div>
|
||||
<div class="units-table-cell u-text-bold u-text-center-desktop">
|
||||
<span class="u-hide-desktop"><?= _("Priority") ?>:</span>
|
||||
</div>
|
||||
<div class="units-table-cell u-text-bold u-text-center-desktop">
|
||||
<span class="u-hide-desktop"><?= _("TTL") ?>:</span>
|
||||
14400
|
||||
</div>
|
||||
<div class="units-table-cell u-text-center-desktop">
|
||||
<label class="u-hide-desktop u-text-bold"><?= _("IP or Value") ?>:</label>
|
||||
<input type="text" class="form-control" value="<?= empty($ips[array_key_first($ips)]["NAT"]) ? array_key_first($ips) : $ips[array_key_first($ips)]["NAT"] ?>">
|
||||
</div>
|
||||
</div>
|
||||
<?php if ($_SESSION["WEBMAIL_SYSTEM"]) { ?>
|
||||
<div class="units-table-row js-unit">
|
||||
<div class="units-table-cell">
|
||||
<label class="u-hide-desktop u-text-bold"><?= _("Record") ?>:</label>
|
||||
<input type="text" class="form-control" value="<?= $v_webmail_alias ?>.<?= htmlspecialchars($_GET["domain"]) ?>">
|
||||
</div>
|
||||
<div class="units-table-cell u-text-bold u-text-center-desktop">
|
||||
<span class="u-hide-desktop"><?= _("Type") ?>:</span>
|
||||
A
|
||||
</div>
|
||||
<div class="units-table-cell u-text-bold u-text-center-desktop">
|
||||
<span class="u-hide-desktop"><?= _("Priority") ?>:</span>
|
||||
</div>
|
||||
<div class="units-table-cell u-text-bold u-text-center-desktop">
|
||||
<span class="u-hide-desktop"><?= _("TTL") ?>:</span>
|
||||
14400
|
||||
</div>
|
||||
<div class="units-table-cell u-text-center-desktop">
|
||||
<label class="u-hide-desktop u-text-bold"><?= _("IP or Value") ?>:</label>
|
||||
<input type="text" class="form-control" value="<?= empty($ips[array_key_first($ips)]["NAT"]) ? array_key_first($ips) : $ips[array_key_first($ips)]["NAT"] ?>">
|
||||
</div>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<div class="units-table-row js-unit">
|
||||
<div class="units-table-cell">
|
||||
<label class="u-hide-desktop u-text-bold"><?= _("Record") ?>:</label>
|
||||
<input type="text" class="form-control" value="<?= htmlspecialchars($_GET["domain"]) ?>">
|
||||
</div>
|
||||
<div class="units-table-cell u-text-bold u-text-center-desktop">
|
||||
<span class="u-hide-desktop"><?= _("Type") ?>:</span>
|
||||
MX
|
||||
</div>
|
||||
<div class="units-table-cell u-text-bold u-text-center-desktop">
|
||||
<span class="u-hide-desktop"><?= _("Priority") ?>:</span>
|
||||
10
|
||||
</div>
|
||||
<div class="units-table-cell u-text-bold u-text-center-desktop">
|
||||
<span class="u-hide-desktop"><?= _("TTL") ?>:</span>
|
||||
14400
|
||||
</div>
|
||||
<div class="units-table-cell u-text-center-desktop">
|
||||
<label class="u-hide-desktop u-text-bold"><?= _("IP or Value") ?>:</label>
|
||||
<input type="text" class="form-control" value="mail.<?= htmlspecialchars($_GET["domain"]) ?>.">
|
||||
</div>
|
||||
</div>
|
||||
<div class="units-table-row js-unit">
|
||||
<div class="units-table-cell">
|
||||
<label class="u-hide-desktop u-text-bold"><?= _("Record") ?>:</label>
|
||||
<input type="text" class="form-control" value="<?= htmlspecialchars($_GET["domain"]) ?>">
|
||||
</div>
|
||||
<div class="units-table-cell u-text-bold u-text-center-desktop">
|
||||
<span class="u-hide-desktop"><?= _("Type") ?>:</span>
|
||||
TXT
|
||||
</div>
|
||||
<div class="units-table-cell u-text-bold u-text-center-desktop">
|
||||
<span class="u-hide-desktop"><?= _("Priority") ?>:</span>
|
||||
</div>
|
||||
<div class="units-table-cell u-text-bold u-text-center-desktop">
|
||||
<span class="u-hide-desktop"><?= _("TTL") ?>:</span>
|
||||
14400
|
||||
</div>
|
||||
<div class="units-table-cell u-text-center-desktop">
|
||||
<label class="u-hide-desktop u-text-bold"><?= _("IP or Value") ?>:</label>
|
||||
<?php $ip = empty($ips[array_key_first($ips)]["NAT"]) ? array_key_first($ips) : $ips[array_key_first($ips)]["NAT"]; ?>
|
||||
<input type="text" class="form-control" value="<?= htmlspecialchars("v=spf1 a mx ip4:" . $ip . " -all") ?>">
|
||||
</div>
|
||||
</div>
|
||||
<div class="units-table-row js-unit">
|
||||
<div class="units-table-cell">
|
||||
<label class="u-hide-desktop u-text-bold"><?= _("Record") ?>:</label>
|
||||
<input type="text" class="form-control" value="_dmarc">
|
||||
</div>
|
||||
<div class="units-table-cell u-text-bold u-text-center-desktop">
|
||||
<span class="u-hide-desktop"><?= _("Type") ?>:</span>
|
||||
TXT
|
||||
</div>
|
||||
<div class="units-table-cell u-text-bold u-text-center-desktop">
|
||||
<span class="u-hide-desktop"><?= _("Priority") ?>:</span>
|
||||
</div>
|
||||
<div class="units-table-cell u-text-bold u-text-center-desktop">
|
||||
<span class="u-hide-desktop"><?= _("TTL") ?>:</span>
|
||||
14400
|
||||
</div>
|
||||
<div class="units-table-cell u-text-center-desktop">
|
||||
<label class="u-hide-desktop u-text-bold"><?= _("IP or Value") ?>:</label>
|
||||
<input type="text" class="form-control" value="<?= htmlspecialchars("v=DMARC1; p=quarantine; pct=100") ?>">
|
||||
</div>
|
||||
</div>
|
||||
<?php foreach ($dkim as $key => $value) { ?>
|
||||
<div class="units-table-row js-unit">
|
||||
<div class="units-table-cell">
|
||||
<label class="u-hide-desktop u-text-bold"><?= _("Record") ?>:</label>
|
||||
<input type="text" class="form-control" value="<?= htmlspecialchars($key) ?>">
|
||||
</div>
|
||||
<div class="units-table-cell u-text-bold u-text-center-desktop">
|
||||
<span class="u-hide-desktop"><?= _("Type") ?>:</span>
|
||||
TXT
|
||||
</div>
|
||||
<div class="units-table-cell u-text-bold u-text-center-desktop">
|
||||
<span class="u-hide-desktop"><?= _("Priority") ?>:</span>
|
||||
</div>
|
||||
<div class="units-table-cell u-text-bold u-text-center-desktop">
|
||||
<span class="u-hide-desktop"><?= _("TTL") ?>:</span>
|
||||
3600
|
||||
</div>
|
||||
<div class="units-table-cell u-text-center-desktop">
|
||||
<label class="u-hide-desktop u-text-bold"><?= _("IP or Value") ?>:</label>
|
||||
<input type="text" class="form-control" value="<?= htmlspecialchars(str_replace(['"', "'"], "", $dkim[$key]["TXT"])) ?>">
|
||||
</div>
|
||||
</div>
|
||||
<?php } ?>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<footer class="app-footer">
|
||||
</footer>
|
||||
316
web/templates/pages/list_packages.php
Normal file
316
web/templates/pages/list_packages.php
Normal file
@@ -0,0 +1,316 @@
|
||||
<!-- Begin toolbar -->
|
||||
<div class="toolbar">
|
||||
<div class="toolbar-inner">
|
||||
<div class="toolbar-buttons">
|
||||
<a class="button button-secondary button-back js-button-back" href="/list/user/">
|
||||
<i class="fas fa-arrow-left icon-blue"></i><?= _("Back") ?>
|
||||
</a>
|
||||
<a href="/add/package/" class="button button-secondary js-button-create">
|
||||
<i class="fas fa-circle-plus icon-green"></i><?= _("Add Package") ?>
|
||||
</a>
|
||||
</div>
|
||||
<div class="toolbar-right">
|
||||
<div class="toolbar-sorting">
|
||||
<button class="toolbar-sorting-toggle js-toggle-sorting-menu" type="button" title="<?= _("Sort items") ?>">
|
||||
<?= _("Sort by") ?>:
|
||||
<span class="u-text-bold">
|
||||
<?php if ($_SESSION['userSortOrder'] === 'name') { $label = _('Name'); } else { $label = _('Date'); } ?>
|
||||
<?= $label ?> <i class="fas fa-arrow-down-a-z"></i>
|
||||
</span>
|
||||
</button>
|
||||
<ul class="toolbar-sorting-menu js-sorting-menu u-hidden">
|
||||
<li data-entity="sort-date" data-sort-as-int="1">
|
||||
<span class="name <?php if ($_SESSION['userSortOrder'] === 'date') { echo 'active'; } ?>"><?= _("Date") ?> <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 data-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-data x-bind="BulkEdit" action="/bulk/package/" method="post">
|
||||
<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>
|
||||
</select>
|
||||
<button type="submit" class="toolbar-input-submit" title="<?= _("Apply to selected") ?>">
|
||||
<i class="fas fa-arrow-right"></i>
|
||||
</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- End toolbar -->
|
||||
|
||||
<div class="container">
|
||||
|
||||
<h1 class="u-text-center u-hide-desktop u-mt20 u-pr30 u-mb20 u-pl30"><?= _("Packages") ?></h1>
|
||||
|
||||
<div class="units-table js-units-container">
|
||||
<div class="units-table-header">
|
||||
<div class="units-table-cell">
|
||||
<input type="checkbox" class="js-toggle-all-checkbox" title="<?= _("Select all") ?>">
|
||||
</div>
|
||||
<div class="units-table-cell"><?= _("Package") ?></div>
|
||||
<div class="units-table-cell"></div>
|
||||
<div class="units-table-cell u-text-center">
|
||||
<i class="fas fa-terminal" title="<?= _("Shell") ?>"></i>
|
||||
<span class="u-hidden-visually"><?= _("Shell") ?></span>
|
||||
</div>
|
||||
<div class="units-table-cell u-text-center">
|
||||
<i class="fas fa-hard-drive" title="<?= _("Quota") ?>"></i>
|
||||
<span class="u-hidden-visually"><?= _("Quota") ?></span>
|
||||
</div>
|
||||
<div class="units-table-cell u-text-center">
|
||||
<i class="fas fa-right-left" title="<?= _("Bandwidth") ?>"></i>
|
||||
<span class="u-hidden-visually"><?= _("Bandwidth") ?></span>
|
||||
</div>
|
||||
<div class="units-table-cell compact u-text-center">
|
||||
<i class="fas fa-earth-americas" title="<?= _("Web Domains") ?>"></i>
|
||||
<span class="u-hidden-visually"><?= _("Web Domains") ?></span>
|
||||
</div>
|
||||
<div class="units-table-cell compact u-text-center">
|
||||
<i class="fas fa-link" title="<?= _("Web Aliases") ?>"></i>
|
||||
<span class="u-hidden-visually"><?= _("Web Aliases") ?></span>
|
||||
</div>
|
||||
<div class="units-table-cell compact u-text-center">
|
||||
<i class="fas fa-book-atlas" title="<?= _("DNS Zones") ?>"></i>
|
||||
<span class="u-hidden-visually"><?= _("DNS Zones") ?></span>
|
||||
</div>
|
||||
<div class="units-table-cell compact u-text-center">
|
||||
<i class="fas fa-globe" title="<?= _("DNS Records") ?>"></i>
|
||||
<span class="u-hidden-visually"><?= _("DNS Records") ?></span>
|
||||
</div>
|
||||
<div class="units-table-cell compact u-text-center">
|
||||
<i class="fas fa-envelopes-bulk" title="<?= _("Mail Domains") ?>"></i>
|
||||
<span class="u-hidden-visually"><?= _("Mail Domains") ?></span>
|
||||
</div>
|
||||
<div class="units-table-cell compact u-text-center">
|
||||
<i class="fas fa-inbox" title="<?= _("Mail Accounts") ?>"></i>
|
||||
<span class="u-hidden-visually"><?= _("Mail Accounts") ?></span>
|
||||
</div>
|
||||
<div class="units-table-cell compact u-text-center">
|
||||
<i class="fas fa-database" title="<?= _("Databases") ?>"></i>
|
||||
<span class="u-hidden-visually"><?= _("Databases") ?></span>
|
||||
</div>
|
||||
<div class="units-table-cell compact u-text-center">
|
||||
<i class="fas fa-clock" title="<?= _("Cron Jobs") ?>"></i>
|
||||
<span class="u-hidden-visually"><?= _("Cron Jobs") ?></span>
|
||||
</div>
|
||||
<div class="units-table-cell compact u-text-center">
|
||||
<i class="fas fa-file-zipper" title="<?= _("Backups") ?>"></i>
|
||||
<span class="u-hidden-visually"><?= _("Backups") ?></span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Begin package list item loop -->
|
||||
<?php
|
||||
foreach ($data as $key => $value) {
|
||||
++$i;
|
||||
?>
|
||||
<div class="units-table-row js-unit"
|
||||
data-sort-date="<?= strtotime($data[$key]["DATE"] . " " . $data[$key]["TIME"]) ?>"
|
||||
data-sort-name="<?= $key ?>"
|
||||
data-sort-bandwidth="<?= $data[$key]["BANDWIDTH"] ?>"
|
||||
data-sort-disk="<?= $data[$key]["DISK_QUOTA"] ?>">
|
||||
<div class="units-table-cell">
|
||||
<div>
|
||||
<input id="check<?= $i ?>" class="js-unit-checkbox" type="checkbox" title="<?= _("Select") ?>" name="package[]" value="<?= $key ?>">
|
||||
<label for="check<?= $i ?>" class="u-hide-desktop"><?= _("Select") ?></label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="units-table-cell units-table-heading-cell u-text-bold">
|
||||
<span class="u-hide-desktop"><?= _("Package") ?>:</span>
|
||||
<?php if ($key == "system") { ?>
|
||||
<?= $key ?>
|
||||
<?php } else { ?>
|
||||
<a href="/edit/package/?package=<?= $key ?>&token=<?= $_SESSION["token"] ?>" title="<?= _("Edit Package") ?>: <?= $key ?>">
|
||||
<?= $key ?>
|
||||
</a>
|
||||
<?php } ?>
|
||||
</div>
|
||||
<div class="units-table-cell">
|
||||
<ul class="units-table-row-actions">
|
||||
<?php if ($key != "system") { ?>
|
||||
<li class="units-table-row-action shortcut-enter" data-key-action="href">
|
||||
<a
|
||||
class="units-table-row-action-link"
|
||||
href="/edit/package/?package=<?= $key ?>&token=<?= $_SESSION["token"] ?>"
|
||||
title="<?= _("Edit Package") ?>"
|
||||
>
|
||||
<i class="fas fa-pencil icon-orange"></i>
|
||||
<span class="u-hide-desktop"><?= _("Edit Package") ?></span>
|
||||
</a>
|
||||
</li>
|
||||
<?php } ?>
|
||||
<li class="units-table-row-action" data-key-action="href">
|
||||
<a
|
||||
class="units-table-row-action-link"
|
||||
href="/copy/package/?package=<?= $key ?>&token=<?= $_SESSION["token"] ?>"
|
||||
title="<?= _("Duplicate") ?>"
|
||||
>
|
||||
<i class="fas fa-clone icon-teal"></i>
|
||||
<span class="u-hide-desktop"><?= _("Duplicate") ?></span>
|
||||
</a>
|
||||
</li>
|
||||
<?php if ($key != "system") { ?>
|
||||
<li class="units-table-row-action shortcut-delete" data-key-action="js">
|
||||
<a
|
||||
class="units-table-row-action-link data-controls js-confirm-action"
|
||||
href="/delete/package/?package=<?= $key ?>&token=<?= $_SESSION["token"] ?>"
|
||||
title="<?= _("Delete") ?>"
|
||||
data-confirm-title="<?= _("Delete") ?>"
|
||||
data-confirm-message="<?= sprintf(_("Are you sure you want to delete package %s?"), $key) ?>"
|
||||
>
|
||||
<i class="fas fa-trash icon-red"></i>
|
||||
<span class="u-hide-desktop"><?= _("Delete") ?></span>
|
||||
</a>
|
||||
</li>
|
||||
<?php } ?>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="units-table-cell u-text-center-desktop">
|
||||
<span class="u-hide-desktop u-text-bold"><?= _("Shell") ?>:</span>
|
||||
<?php if ($data[$key]["SHELL"] == "nologin") { ?>
|
||||
<i class="fas fa-circle-minus icon-large" title="<?= _("SSH Access") ?>: <?= $data[$key]["SHELL"] ?>"> </i>
|
||||
<?php } else { ?>
|
||||
<i class="fas fa-circle-check icon-green icon-large"></i>
|
||||
<?php } ?>
|
||||
</div>
|
||||
<div class="units-table-cell u-text-center-desktop">
|
||||
<span class="u-hide-desktop u-text-bold"><?= _("Quota") ?>:</span>
|
||||
<span title="<?= _("Quota") ?>: <?= humanize_usage_size($data[$key]["DISK_QUOTA"]) ?> <?= humanize_usage_measure($data[$key]["DISK_QUOTA"]) ?>">
|
||||
<?php if (preg_match("/[a-z]/i", $data[$key]["DISK_QUOTA"])): ?>
|
||||
<span class="u-text-bold">
|
||||
∞
|
||||
</span>
|
||||
<?php else: ?>
|
||||
<span class="u-text-bold">
|
||||
<?= humanize_usage_size($data[$key]["DISK_QUOTA"]) ?>
|
||||
</span>
|
||||
<span class="u-text-small">
|
||||
<?= humanize_usage_measure($data[$key]["DISK_QUOTA"]) ?>
|
||||
</span>
|
||||
<?php endif; ?>
|
||||
</span>
|
||||
</div>
|
||||
<div class="units-table-cell u-text-center-desktop">
|
||||
<span class="u-hide-desktop u-text-bold"><?= _("Bandwidth") ?>:</span>
|
||||
<span title="<?= _("Bandwidth") ?>: <?= humanize_usage_size($data[$key]["BANDWIDTH"]) ?> <?= humanize_usage_measure($data[$key]["BANDWIDTH"]) ?>">
|
||||
<?php if ($data[$key]["BANDWIDTH"] == "unlimited") { ?>
|
||||
<span class="u-text-bold">
|
||||
∞
|
||||
</span>
|
||||
<?php } else { ?>
|
||||
<span class="u-text-bold">
|
||||
<?= humanize_usage_size($data[$key]["BANDWIDTH"]) ?>
|
||||
</span>
|
||||
<span class="u-text-small">
|
||||
<?= humanize_usage_measure($data[$key]["BANDWIDTH"]) ?>
|
||||
</span>
|
||||
<?php } ?>
|
||||
</span>
|
||||
</div>
|
||||
<div class="units-table-cell compact u-text-bold u-text-center-desktop">
|
||||
<span class="u-hide-desktop"><?= _("Web Domains") ?>:</span>
|
||||
<span class="units-table-badge" title="<?= _("Web Domains") ?>: <?= $data[$key]["WEB_DOMAINS"] ?>">
|
||||
<?php if ($data[$key]["WEB_DOMAINS"] == "unlimited") { ?>
|
||||
∞
|
||||
<?php } else { ?>
|
||||
<?= $data[$key]["WEB_DOMAINS"] ?>
|
||||
<?php } ?>
|
||||
</span>
|
||||
</div>
|
||||
<div class="units-table-cell compact u-text-bold u-text-center-desktop">
|
||||
<span class="u-hide-desktop"><?= _("Web Aliases") ?>:</span>
|
||||
<span class="units-table-badge" title="<?= _("Web Aliases") ?>: <?= $data[$key]["WEB_ALIASES"] ?>">
|
||||
<?php if ($data[$key]["WEB_ALIASES"] == "unlimited") { ?>
|
||||
∞
|
||||
<?php } else { ?>
|
||||
<?= $data[$key]["WEB_ALIASES"] ?>
|
||||
<?php } ?>
|
||||
</span>
|
||||
</div>
|
||||
<div class="units-table-cell compact u-text-bold u-text-center-desktop">
|
||||
<span class="u-hide-desktop"><?= _("DNS Zones") ?>:</span>
|
||||
<span class="units-table-badge" title="<?= _("DNS Zones") ?>: <?= $data[$key]["DNS_DOMAINS"] ?>">
|
||||
<?php if ($data[$key]["DNS_DOMAINS"] == "unlimited") { ?>
|
||||
∞
|
||||
<?php } else { ?>
|
||||
<?= $data[$key]["DNS_DOMAINS"] ?>
|
||||
<?php } ?>
|
||||
</span>
|
||||
</div>
|
||||
<div class="units-table-cell compact u-text-bold u-text-center-desktop">
|
||||
<span class="u-hide-desktop"><?= _("DNS Records") ?>:</span>
|
||||
<span class="units-table-badge" title="<?= _("DNS Records") ?>: <?= $data[$key]["DNS_RECORDS"] ?>">
|
||||
<?php if ($data[$key]["DNS_RECORDS"] == "unlimited") { ?>
|
||||
∞
|
||||
<?php } else { ?>
|
||||
<?= $data[$key]["DNS_RECORDS"] ?>
|
||||
<?php } ?>
|
||||
</span>
|
||||
</div>
|
||||
<div class="units-table-cell compact u-text-bold u-text-center-desktop">
|
||||
<span class="u-hide-desktop"><?= _("Mail Domains") ?>:</span>
|
||||
<span class="units-table-badge" title="<?= _("Mail Domains") ?>: <?= $data[$key]["MAIL_DOMAINS"] ?>">
|
||||
<?php if ($data[$key]["MAIL_DOMAINS"] == "unlimited") { ?>
|
||||
∞
|
||||
<?php } else { ?>
|
||||
<?= $data[$key]["MAIL_DOMAINS"] ?>
|
||||
<?php } ?>
|
||||
</span>
|
||||
</div>
|
||||
<div class="units-table-cell compact u-text-bold u-text-center-desktop">
|
||||
<span class="u-hide-desktop"><?= _("Mail Accounts") ?>:</span>
|
||||
<span class="units-table-badge" title="<?= _("Mail Accounts") ?>: <?= $data[$key]["MAIL_ACCOUNTS"] ?>">
|
||||
<?php if ($data[$key]["MAIL_ACCOUNTS"] == "unlimited") { ?>
|
||||
∞
|
||||
<?php } else { ?>
|
||||
<?= $data[$key]["MAIL_ACCOUNTS"] ?>
|
||||
<?php } ?>
|
||||
</span>
|
||||
</div>
|
||||
<div class="units-table-cell compact u-text-bold u-text-center-desktop">
|
||||
<span class="u-hide-desktop"><?= _("Databases") ?>:</span>
|
||||
<span class="units-table-badge" title="<?= _("Databases") ?>: <?= $data[$key]["DATABASES"] ?>">
|
||||
<?php if ($data[$key]["DATABASES"] == "unlimited") { ?>
|
||||
∞
|
||||
<?php } else { ?>
|
||||
<?= $data[$key]["DATABASES"] ?>
|
||||
<?php } ?>
|
||||
</span>
|
||||
</div>
|
||||
<div class="units-table-cell compact u-text-bold u-text-center-desktop">
|
||||
<span class="u-hide-desktop"><?= _("Cron Jobs") ?>:</span>
|
||||
<span class="units-table-badge" title="<?= _("Cron Jobs") ?>: <?= $data[$key]["CRON_JOBS"] ?>">
|
||||
<?php if ($data[$key]["CRON_JOBS"] == "unlimited") { ?>
|
||||
∞
|
||||
<?php } else { ?>
|
||||
<?= $data[$key]["CRON_JOBS"] ?>
|
||||
<?php } ?>
|
||||
</span>
|
||||
</div>
|
||||
<div class="units-table-cell compact u-text-bold u-text-center-desktop">
|
||||
<span class="u-hide-desktop"><?= _("Backups") ?>:</span>
|
||||
<span class="units-table-badge" title="<?= _("Backups") ?>: <?= $data[$key]["BACKUPS"] ?>">
|
||||
<?php if ($data[$key]["BACKUPS"] == "unlimited") { ?>
|
||||
∞
|
||||
<?php } else { ?>
|
||||
<?= $data[$key]["BACKUPS"] ?>
|
||||
<?php } ?>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<?php } ?>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<footer class="app-footer">
|
||||
<div class="container app-footer-inner">
|
||||
<p>
|
||||
<?php printf(ngettext("%d package", "%d packages", $i), $i); ?>
|
||||
</p>
|
||||
</div>
|
||||
</footer>
|
||||
41
web/templates/pages/list_rrd.php
Normal file
41
web/templates/pages/list_rrd.php
Normal file
@@ -0,0 +1,41 @@
|
||||
<!-- Begin toolbar -->
|
||||
<div class="toolbar">
|
||||
<div class="toolbar-inner">
|
||||
<div class="toolbar-buttons">
|
||||
<a class="button button-secondary button-back js-button-back" href="/list/server/">
|
||||
<i class="fas fa-arrow-left icon-blue"></i><?= _("Back") ?>
|
||||
</a>
|
||||
<a href="/list/server/?cpu" class="button button-secondary">
|
||||
<i class="fas fa-chart-pie icon-green"></i><?= _("Advanced Details") ?>
|
||||
</a>
|
||||
</div>
|
||||
<div class="toolbar-right">
|
||||
<a class="toolbar-link<?php if ((empty($period)) || ($period == 'daily')) echo " selected" ?>" href="?period=daily"><?= _("Daily") ?></a>
|
||||
<a class="toolbar-link<?php if ((!empty($period)) && ($period == 'weekly')) echo " selected" ?>" href="?period=weekly"><?= _("Weekly") ?></a>
|
||||
<a class="toolbar-link<?php if ((!empty($period)) && ($period == 'monthly')) echo " selected" ?>" href="?period=monthly"><?= _("Monthly") ?></a>
|
||||
<a class="toolbar-link<?php if ((!empty($period)) && ($period == 'yearly')) echo " selected" ?>" href="?period=yearly"><?= _("Yearly") ?></a>
|
||||
<a class="toolbar-link<?php if ((!empty($period)) && ($period == 'biennially')) echo " selected" ?>" href="?period=biennially"><?= _("Biennially") ?></a>
|
||||
<a class="toolbar-link<?php if ((!empty($period)) && ($period == 'triennially')) echo " selected" ?>" href="?period=triennially"><?= _("Triennially") ?></a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- End toolbar -->
|
||||
|
||||
<div class="container">
|
||||
<div class="form-container form-container-wide">
|
||||
<!-- Begin graph list item loop -->
|
||||
<?php foreach ($data as $key => $value) { ?>
|
||||
<div class="u-mb40">
|
||||
<h2 class="u-mb20"><?= htmlspecialchars($data[$key]["TITLE"]) ?></h2>
|
||||
<canvas
|
||||
class="u-max-height300 js-rrd-chart"
|
||||
data-service="<?= $data[$key]["TYPE"] !== "net" ? htmlspecialchars($data[$key]["RRD"]) : "net_" . htmlspecialchars($data[$key]["RRD"]) ?>"
|
||||
data-period="<?= htmlspecialchars($period) ?>"
|
||||
></canvas>
|
||||
</div>
|
||||
<?php } ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<footer class="app-footer">
|
||||
</footer>
|
||||
188
web/templates/pages/list_search.php
Normal file
188
web/templates/pages/list_search.php
Normal file
@@ -0,0 +1,188 @@
|
||||
<!-- Begin toolbar -->
|
||||
<div class="toolbar">
|
||||
<div class="toolbar-inner">
|
||||
<div class="toolbar-buttons">
|
||||
<a href="javascript:window.history.back();" class="button button-secondary button-back js-button-back">
|
||||
<i class="fas fa-arrow-left icon-blue"></i><?= _("Back") ?>
|
||||
</a>
|
||||
<a href="javascript:location.reload();" class="button button-secondary">
|
||||
<i class="fas fa-arrows-rotate icon-green"></i><?= _("Refresh") ?>
|
||||
</a>
|
||||
</div>
|
||||
<div class="toolbar-right">
|
||||
<div class="toolbar-sorting">
|
||||
<button class="toolbar-sorting-toggle js-toggle-sorting-menu" type="button" title="<?= _("Sort items") ?>">
|
||||
<?= _("Sort by") ?>:
|
||||
<span class="u-text-bold">
|
||||
<?= _("Date") ?> <i class="fas fa-arrow-down-a-z"></i>
|
||||
</span>
|
||||
</button>
|
||||
<ul class="toolbar-sorting-menu js-sorting-menu u-hidden">
|
||||
<li data-entity="sort-date" data-sort-as-int="1">
|
||||
<span class="name <?php if ($_SESSION['userSortOrder'] === 'date') { echo 'active'; } ?>"><?= _("Date") ?> <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 data-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>
|
||||
<div class="toolbar-search">
|
||||
<form action="/search/" method="get">
|
||||
<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>
|
||||
</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- End toolbar -->
|
||||
|
||||
<div class="container">
|
||||
|
||||
<h1 class="u-text-center u-hide-desktop u-mt20 u-pr30 u-mb20 u-pl30"><?= _("Search Results") ?></h1>
|
||||
|
||||
<div class="units-table js-units-container">
|
||||
<div class="units-table-header">
|
||||
<div class="units-table-cell"></div>
|
||||
<div class="units-table-cell u-text-center"><?= _("Status") ?></div>
|
||||
<div class="units-table-cell"><?= _("Search Results") ?></div>
|
||||
<div class="units-table-cell u-text-center"><?= _("Date") ?></div>
|
||||
<div class="units-table-cell u-text-center"><?= _("Owner") ?></div>
|
||||
<div class="units-table-cell u-text-center"><?= _("Type") ?></div>
|
||||
</div>
|
||||
|
||||
<!-- Begin search result item loop -->
|
||||
<?php
|
||||
foreach ($data as $key => $value) {
|
||||
++$i;
|
||||
|
||||
if ($value['SUSPENDED'] == 'yes') {
|
||||
$status = 'suspended';
|
||||
$spnd_action = 'unsuspend';
|
||||
} else {
|
||||
$status = 'active';
|
||||
$spnd_action = 'suspend';
|
||||
}
|
||||
|
||||
if ($value['TYPE'] == 'db') {
|
||||
$object = 'database';
|
||||
} else {
|
||||
$object = strtolower($value['TYPE'] . ' ' . $value['KEY']);
|
||||
}
|
||||
|
||||
$uniq_id = $value['TYPE'] . '-';
|
||||
if ($value['KEY'] == 'ACCOUNT'){
|
||||
$uniq_id .= 'acc-';
|
||||
}
|
||||
$uniq_id .= sha1($value['RESULT']);
|
||||
?>
|
||||
<div class="units-table-row <?php if ($status == 'suspended') echo 'disabled'; ?> js-unit"
|
||||
data-uniq-id="<?= $uniq_id?>"
|
||||
data-sort-date="<?= strtotime($value['DATE'].' '.$value['TIME']) ?>"
|
||||
data-sort-name="<?= $value['RESULT'] ?>"
|
||||
data-sort-type="<?= _($object) ?>"
|
||||
data-sort-owner="<?= $value["USER"] ?>"
|
||||
data-sort-status="<?= $status ?>"
|
||||
style="<?php if (($_SESSION['POLICY_SYSTEM_HIDE_ADMIN'] === 'yes') && ($value['USER']) === 'admin') { echo 'display: none;'; } ?>">
|
||||
<div class="units-table-cell u-text-center-desktop">
|
||||
<?php
|
||||
if ($object === 'web domain') {
|
||||
$icon = 'fa-earth-americas';
|
||||
}
|
||||
if ($object === 'mail domain') {
|
||||
$icon = 'fa-envelopes-bulk';
|
||||
}
|
||||
if ($object === 'dns domain') {
|
||||
$icon = 'fa-book-atlas';
|
||||
}
|
||||
if ($object === 'dns record') {
|
||||
$icon = 'fa-book-atlas';
|
||||
}
|
||||
if ($object === 'database') {
|
||||
$icon = 'fa-database';
|
||||
}
|
||||
if ($object === 'cron job') {
|
||||
$icon = 'fa-clock';
|
||||
}
|
||||
?>
|
||||
<i class="fa <?= $icon ?> icon-dim"></i>
|
||||
</div>
|
||||
<div class="units-table-cell u-text-center-desktop">
|
||||
<span class="u-hide-desktop u-text-bold"><?= _("Status") ?>:</span>
|
||||
<?php if ($status === "active") { ?>
|
||||
<i class="fas fa-circle-check icon-green"></i>
|
||||
<?php } ?>
|
||||
<?php if ($status === "suspended") { ?>
|
||||
<i class="fas fa-triangle-exclamation icon-orange"></i>
|
||||
<?php } ?>
|
||||
</div>
|
||||
<div class="units-table-cell units-table-heading-cell u-text-bold">
|
||||
<span class="u-hide-desktop"><?= _("Search Results") ?>:</span>
|
||||
<?php
|
||||
if ($value['KEY'] == 'RECORD') {
|
||||
$edit_lnk = '/edit/'.$value['TYPE'].'/?domain='.$value['PARENT'].'&record_id='.$value['LINK'].'&user='.$value['USER'];
|
||||
}
|
||||
if ($value['KEY'] == 'ACCOUNT') {
|
||||
$edit_lnk = '/edit/'.$value['TYPE'].'/?domain='.$value['PARENT'].'&account='.$value['LINK'].'&user='.$value['USER'];
|
||||
}
|
||||
if ($value['KEY'] == 'JOB') {
|
||||
$edit_lnk = '/edit/'.$value['TYPE'].'/?job='.$value['LINK'].'&user='.$value['USER'];
|
||||
}
|
||||
if ($value['KEY'] == 'DATABASE') {
|
||||
$edit_lnk = '/edit/'.$value['TYPE'].'/?database='.$value['RESULT'].'&user='.$value['USER'];
|
||||
}
|
||||
if (($value['KEY'] != 'RECORD') && ($value['KEY'] != 'ACCOUNT') && ($value['KEY'] != 'JOB') && ($value['KEY'] != 'DATABASE') ) {
|
||||
$edit_lnk = '/edit/'.$value['TYPE'].'/?'.strtolower($value['KEY']).'='.$value['RESULT'].'&user='.$value['USER'];
|
||||
}
|
||||
?>
|
||||
<?php
|
||||
if (($_SESSION['userContext'] === 'admin') && ($_SESSION['user'] !== 'admin') && ($value['USER'] === 'admin') && ($_SESSION['POLICY_SYSTEM_PROTECTED_ADMIN'] === 'yes')) {
|
||||
echo $value['RESULT'];
|
||||
} else {
|
||||
if ($value['USER'] == $_SESSION['user']) {
|
||||
$href = $edit_lnk.'&token='.$_SESSION['token'];
|
||||
} else {
|
||||
$href = '/login/?loginas='.$value['USER'].'&token='.$_SESSION['token'].'&edit_link='.urlencode($edit_lnk);
|
||||
}
|
||||
echo '<a href="' . $href . '">' . $value['RESULT'] . '</a>';
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
<div class="units-table-cell u-text-center-desktop">
|
||||
<span class="u-hide-desktop u-text-bold"><?= _("Date") ?>:</span>
|
||||
<time datetime="<?= htmlspecialchars($value["DATE"]) ?>">
|
||||
<?= translate_date($value["DATE"]) ?>
|
||||
</time>
|
||||
</div>
|
||||
<div class="units-table-cell u-text-bold u-text-center-desktop">
|
||||
<span class="u-hide-desktop"><?= _("Owner") ?>:</span>
|
||||
<a href="/search/?q=<?= htmlentities($_GET["q"]) ?>&u=<?= $value["USER"] ?>&token=<?= $_SESSION["token"] ?>">
|
||||
<?= $value["USER"] ?>
|
||||
</a>
|
||||
<?php if (!($_SESSION["POLICY_SYSTEM_HIDE_ADMIN"] === "yes" && $value["USER"] !== "admin") && $_SESSION["userContext"] === "admin") { ?>
|
||||
<a href="/login/?loginas=<?= $value["USER"] ?>&token=<?= $_SESSION["token"] ?>" title="<?= _("Log in as") ?> <?= $value["USER"] ?>" class="u-ml5">
|
||||
<i class="fas fa-right-to-bracket icon-green icon-dim"></i>
|
||||
<span class="u-hidden-visually"><?= _("Log in as") ?> <?= $value["USER"] ?></span>
|
||||
</a>
|
||||
<?php } ?>
|
||||
</div>
|
||||
<div class="units-table-cell u-text-center-desktop">
|
||||
<span class="u-hide-desktop u-text-bold"><?= _("Type") ?>:</span>
|
||||
<?= _($object) ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php } ?>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<footer class="app-footer">
|
||||
<div class="container app-footer-inner">
|
||||
<p>
|
||||
<?php printf(ngettext("%d object", "%d objects", $i), $i); ?>
|
||||
</p>
|
||||
</div>
|
||||
</footer>
|
||||
125
web/templates/pages/list_server_info.php
Normal file
125
web/templates/pages/list_server_info.php
Normal file
@@ -0,0 +1,125 @@
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<!-- Load necessary CSS and JavaScript from source -->
|
||||
<?php require "" . $_SERVER["HESTIA"] . "/web/templates/includes/title.php"; ?>
|
||||
<?php require "" . $_SERVER["HESTIA"] . "/web/templates/includes/css.php"; ?>
|
||||
<?php require "" . $_SERVER["HESTIA"] . "/web/templates/includes/js.php"; ?>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<header class="app-header">
|
||||
<div class="top-bar">
|
||||
<div class="container top-bar-inner">
|
||||
<div class="top-bar-left">
|
||||
<a href="/" class="top-bar-logo" title="<?= _("Hestia Control Panel") ?>">
|
||||
<img src="/images/logo-header.svg" alt="<?= _("Hestia Control Panel") ?>" width="54" height="29">
|
||||
</a>
|
||||
</div>
|
||||
<div class="top-bar-right">
|
||||
<nav x-data="{ open: false }" class="top-bar-menu">
|
||||
<button
|
||||
type="button"
|
||||
class="top-bar-menu-link u-hide-tablet"
|
||||
x-on:click="open = !open">
|
||||
<i class="fas fa-bars"></i>
|
||||
<span class="u-hidden" x-text="open ? '<?= _("Close menu") ?>' : '<?= _("Open menu") ?>'">
|
||||
<?= _("Open menu") ?>
|
||||
</span>
|
||||
</button>
|
||||
<div x-cloak x-show="open" x-on:click.outside="open = false" class="top-bar-menu-panel">
|
||||
<ul class="top-bar-menu-list">
|
||||
<li class="top-bar-menu-item">
|
||||
<a class="top-bar-menu-link" href="/list/rrd/" title="<?= _("Back") ?>">
|
||||
<i class="fas fa-circle-left"></i>
|
||||
<span class="top-bar-menu-link-label"><?= _("Back") ?></span>
|
||||
</a>
|
||||
</li>
|
||||
<li class="top-bar-menu-item">
|
||||
<a class="top-bar-menu-link <?php if (isset($_GET['cpu'])) echo 'active' ?>" href="/list/server/?cpu">
|
||||
<i class="fas fa-microchip"></i>
|
||||
<span class="top-bar-menu-link-label"><?= _("CPU") ?></span>
|
||||
</a>
|
||||
</li>
|
||||
<li class="top-bar-menu-item">
|
||||
<a class="top-bar-menu-link <?php if (isset($_GET['mem'])) echo 'active' ?>" href="/list/server/?mem">
|
||||
<i class="fas fa-memory"></i>
|
||||
<span class="top-bar-menu-link-label"><?= _("RAM") ?></span>
|
||||
</a>
|
||||
</li>
|
||||
<li class="top-bar-menu-item">
|
||||
<a class="top-bar-menu-link <?php if (isset($_GET['disk'])) echo 'active' ?>" href="/list/server/?disk">
|
||||
<i class="fas fa-hard-drive"></i>
|
||||
<span class="top-bar-menu-link-label"><?= _("Disk") ?></span>
|
||||
</a>
|
||||
</li>
|
||||
<li class="top-bar-menu-item">
|
||||
<a class="top-bar-menu-link <?php if (isset($_GET['net'])) echo 'active' ?>" href="/list/server/?net">
|
||||
<i class="fas fa-hard-drive"></i>
|
||||
<span class="top-bar-menu-link-label"><?= _("Network") ?></span>
|
||||
</a>
|
||||
</li>
|
||||
<?php if ((isset($_SESSION['WEB_SYSTEM'])) && (!empty($_SESSION['WEB_SYSTEM']))) { ?>
|
||||
<li class="top-bar-menu-item">
|
||||
<a class="top-bar-menu-link <?php if (isset($_GET['web'])) echo 'active' ?>" href="/list/server/?web">
|
||||
<i class="fas fa-earth-europe"></i>
|
||||
<span class="top-bar-menu-link-label"><?= _("Web") ?></span>
|
||||
</a>
|
||||
</li>
|
||||
<?php } ?>
|
||||
<?php if ((isset($_SESSION['DNS_SYSTEM'])) && (!empty($_SESSION['DNS_SYSTEM']))) { ?>
|
||||
<li class="top-bar-menu-item">
|
||||
<a class="top-bar-menu-link <?php if (isset($_GET['dns'])) echo 'active' ?>" href="/list/server/?dns">
|
||||
<i class="fas fa-book-atlas"></i>
|
||||
<span class="top-bar-menu-link-label"><?= _("DNS") ?></span>
|
||||
</a>
|
||||
</li>
|
||||
<?php } ?>
|
||||
<?php if ((isset($_SESSION['MAIL_SYSTEM'])) && (!empty($_SESSION['MAIL_SYSTEM']))) { ?>
|
||||
<li class="top-bar-menu-item">
|
||||
<a class="top-bar-menu-link <?php if (isset($_GET['mail'])) echo 'active' ?>" href="/list/server/?mail">
|
||||
<i class="fas fa-envelopes-bulk"></i>
|
||||
<span class="top-bar-menu-link-label"><?= _("Mail") ?></span>
|
||||
</a>
|
||||
</li>
|
||||
<?php } ?>
|
||||
<?php if ((isset($_SESSION['DB_SYSTEM'])) && (!empty($_SESSION['DB_SYSTEM']))) { ?>
|
||||
<li class="top-bar-menu-item">
|
||||
<a class="top-bar-menu-link <?php if (isset($_GET['db'])) echo 'active' ?>" href="/list/server/?db">
|
||||
<i class="fas fa-database"></i>
|
||||
<span class="top-bar-menu-link-label"><?= _("DB") ?></span>
|
||||
</a>
|
||||
</li>
|
||||
<?php } ?>
|
||||
<li class="top-bar-menu-item">
|
||||
<a class="top-bar-menu-link" href="javascript:location.reload();" title="<?= _("Refresh") ?>">
|
||||
<i class="fas fa-arrow-rotate-right"></i>
|
||||
<span class="u-hidden"><?= _("Refresh") ?></span>
|
||||
</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") ?>">
|
||||
<i class="fas fa-right-from-bracket"></i>
|
||||
<span class="u-hidden"><?= _("Log out") ?></span>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</nav>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</header>
|
||||
|
||||
<a
|
||||
href="#top"
|
||||
class="button button-secondary button-circle button-floating button-floating-top"
|
||||
title="<?= _("Top") ?>"
|
||||
>
|
||||
<i class="fas fa-arrow-up"></i>
|
||||
<span class="u-hidden"><?= _("Top") ?></span>
|
||||
</a>
|
||||
|
||||
<div class="container">
|
||||
<pre class="console-output u-mt20">
|
||||
47
web/templates/pages/list_server_preview.php
Normal file
47
web/templates/pages/list_server_preview.php
Normal file
@@ -0,0 +1,47 @@
|
||||
<!-- Begin toolbar -->
|
||||
<div class="toolbar">
|
||||
<div class="toolbar-inner">
|
||||
<div class="toolbar-buttons">
|
||||
<a href="/edit/server/" class="button button-secondary button-back js-button-back">
|
||||
<i class="fas fa-arrow-left icon-blue"></i><?= _("Back") ?>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- End toolbar -->
|
||||
|
||||
<div class="container">
|
||||
|
||||
<h1 class="u-text-center u-hide-desktop u-mt20 u-pr30 u-mb20 u-pl30"><?= _("Preview Features") ?></h1>
|
||||
|
||||
<div class="units-table js-units-container">
|
||||
<div class="units-table-header">
|
||||
<div class="units-table-cell"></div>
|
||||
<div class="units-table-cell"><?= _("Category") ?></div>
|
||||
<div class="units-table-cell"><?= _("Name") ?></div>
|
||||
<div class="units-table-cell"><?= _("Status") ?></div>
|
||||
</div>
|
||||
|
||||
<div class="units-table-row js-unit">
|
||||
<div class="units-table-cell u-text-center-desktop">
|
||||
<i class="fas fa-gear icon-blue"></i>
|
||||
</div>
|
||||
<div class="units-table-cell units-table-heading-cell u-text-bold">
|
||||
<span class="u-hide-desktop"><?= _("Category") ?>:</span>
|
||||
<?= _("System") ?>
|
||||
</div>
|
||||
<div class="units-table-cell u-text-bold">
|
||||
<span class="u-hide-desktop"><?= _("Name") ?>:</span>
|
||||
<?= _("Policy") ?>: <?= _("Allow suspended users to log in with read-only access") ?>
|
||||
</div>
|
||||
<div class="units-table-cell">
|
||||
<span class="u-hide-desktop u-text-bold"><?= _("Status") ?>:</span>
|
||||
<?= _("Partially implemented") ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<footer class="app-footer">
|
||||
</footer>
|
||||
214
web/templates/pages/list_services.php
Normal file
214
web/templates/pages/list_services.php
Normal file
@@ -0,0 +1,214 @@
|
||||
<!-- Begin toolbar -->
|
||||
<div class="toolbar">
|
||||
<div class="toolbar-inner">
|
||||
<div class="toolbar-buttons">
|
||||
<a href="/edit/server/" class="button button-secondary">
|
||||
<i class="fas fa-gear icon-maroon"></i><?= _("Configure") ?>
|
||||
</a>
|
||||
<a href="/list/rrd/" class="button button-secondary">
|
||||
<i class="fas fa-chart-area icon-blue"></i><?= _("Task Monitor") ?>
|
||||
</a>
|
||||
<a href="/list/updates/" class="button button-secondary">
|
||||
<i class="fas fa-arrows-rotate icon-green"></i><?= _("Updates") ?>
|
||||
</a>
|
||||
<?php if (!empty($_SESSION["FIREWALL_SYSTEM"]) && $_SESSION["FIREWALL_SYSTEM"] == "iptables") { ?>
|
||||
<a href="/list/firewall/" class="button button-secondary">
|
||||
<i class="fas fa-shield-halved icon-red"></i><?= _("Firewall") ?>
|
||||
</a>
|
||||
<?php } ?>
|
||||
<a href="/list/log/?user=system&token=<?= $_SESSION["token"] ?>" class="button button-secondary">
|
||||
<i class="fas fa-binoculars icon-orange"></i><?= _("Logs") ?>
|
||||
</a>
|
||||
<a
|
||||
class="button button-secondary button-danger data-controls js-confirm-action"
|
||||
href="/restart/system/?hostname=<?= $sys["sysinfo"]["HOSTNAME"] ?>&token=<?= $_SESSION["token"] ?>&system_reset_token=<?= time() ?>"
|
||||
data-confirm-title="<?= _("Restart") ?>"
|
||||
data-confirm-message="<?= sprintf(_("Are you sure you want to restart %s?"), "Server") ?>"
|
||||
>
|
||||
<i class="fas fa-arrow-rotate-left icon-red"></i><?= _("Restart") ?>
|
||||
</a>
|
||||
</div>
|
||||
<div class="toolbar-right">
|
||||
<form x-data x-bind="BulkEdit" action="/bulk/service/" method="post">
|
||||
<input type="hidden" name="token" value="<?= $_SESSION["token"] ?>">
|
||||
<select class="form-select" name="action">
|
||||
<option value=""><?= _("Apply to selected") ?></option>
|
||||
<option value="stop"><?= _("Stop") ?></option>
|
||||
<option value="start"><?= _("Start") ?></option>
|
||||
<option value="restart"><?= _("Restart") ?></option>
|
||||
</select>
|
||||
<button type="submit" class="toolbar-input-submit" title="<?= _("Apply to selected") ?>">
|
||||
<i class="fas fa-arrow-right"></i>
|
||||
</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- End toolbar -->
|
||||
|
||||
<div class="container">
|
||||
|
||||
<div class="server-summary">
|
||||
<div class="server-summary-icon">
|
||||
<i class="fas fa-server"></i>
|
||||
</div>
|
||||
<div class="server-summary-content">
|
||||
<h1 class="server-summary-title"><?= $sys["sysinfo"]["HOSTNAME"] ?></h1>
|
||||
<ul class="server-summary-list">
|
||||
<li class="server-summary-item">
|
||||
<span class="server-summary-list-label">Hestia Control Panel</span>
|
||||
<span class="server-summary-list-value">
|
||||
<?php if ($sys["sysinfo"]["RELEASE"] != "release") { ?>
|
||||
<i class="fas fa-flask icon-red" title="<?= $sys["sysinfo"]["RELEASE"] ?>"></i>
|
||||
<?php } ?>
|
||||
<?php if ($sys["sysinfo"]["RELEASE"] == "release") { ?>
|
||||
<i class="fas fa-cube" title="<?= _("Production Release") ?>"></i>
|
||||
<?php } ?>
|
||||
v<?= $sys["sysinfo"]["HESTIA"] ?>
|
||||
</span>
|
||||
</li>
|
||||
<li class="server-summary-item">
|
||||
<span class="server-summary-list-label"><?= _("Operating System") ?></span>
|
||||
<span class="server-summary-list-value">
|
||||
<?= $sys["sysinfo"]["OS"] ?> <?= $sys["sysinfo"]["VERSION"] ?> (<?= $sys["sysinfo"]["ARCH"] ?>)
|
||||
</span>
|
||||
</li>
|
||||
<li class="server-summary-item">
|
||||
<span class="server-summary-list-label"><?= _("Load Average") ?> (1m / 5m / 15m)</span>
|
||||
<span class="server-summary-list-value">
|
||||
<?= $sys["sysinfo"]["LOADAVERAGE"] ?>
|
||||
</span>
|
||||
</li>
|
||||
<li class="server-summary-item">
|
||||
<span class="server-summary-list-label"><?= _("Uptime") ?></span>
|
||||
<span class="server-summary-list-value">
|
||||
<?= humanize_time($sys["sysinfo"]["UPTIME"]) ?>
|
||||
</span>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<h1 class="u-text-center u-hide-desktop u-pr30 u-mb20 u-pl30"><?= _("Services") ?></h1>
|
||||
|
||||
<div class="units-table js-units-container">
|
||||
<div class="units-table-header">
|
||||
<div class="units-table-cell">
|
||||
<input type="checkbox" class="js-toggle-all-checkbox" title="<?= _("Select all") ?>">
|
||||
</div>
|
||||
<div class="units-table-cell"><?= _("Service") ?></div>
|
||||
<div class="units-table-cell"></div>
|
||||
<div class="units-table-cell"><?= _("Description") ?></div>
|
||||
<div class="units-table-cell u-text-center"><?= _("Uptime") ?></div>
|
||||
<div class="units-table-cell u-text-center"><?= _("CPU") ?></div>
|
||||
<div class="units-table-cell u-text-center"><?= _("Memory") ?></div>
|
||||
</div>
|
||||
|
||||
<!-- Begin services status list item loop -->
|
||||
<?php
|
||||
foreach ($data as $key => $value) {
|
||||
++$i;
|
||||
if ($data[$key]['STATE'] == 'running') {
|
||||
$status = 'active';
|
||||
$action = 'stop';
|
||||
$action_text = _('Stop');
|
||||
$spnd_icon = 'fa-stop';
|
||||
$spnd_icon_class = 'icon-red';
|
||||
$state_icon = 'fa-circle-check icon-green';
|
||||
} else {
|
||||
$status = 'suspended';
|
||||
$action = 'start';
|
||||
$action_text = _('Start');
|
||||
$spnd_icon = 'fa-play';
|
||||
$spnd_icon_class = 'icon-green';
|
||||
$state_icon = 'fa-circle-minus icon-red';
|
||||
}
|
||||
if (in_array($key, $phpfpm)){
|
||||
$edit_url="php";
|
||||
} else {
|
||||
$edit_url=$key;
|
||||
}
|
||||
|
||||
$cpu = $data[$key]['CPU'] / 10;
|
||||
$cpu = number_format($cpu, 1);
|
||||
if ($cpu == '0.0') $cpu = 0;
|
||||
?>
|
||||
<div class="units-table-row <?php if ($status == 'suspended') echo 'disabled'; ?> js-unit"
|
||||
data-sort-name="<?= strtolower($key) ?>"
|
||||
data-sort-memory="<?= $data[$key]["MEM"] ?>"
|
||||
data-sort-cpu="<?= $cpu ?>"
|
||||
data-sort-uptime="<?= $data[$key]["RTIME"] ?>">
|
||||
<div class="units-table-cell">
|
||||
<div>
|
||||
<input id="check<?= $i ?>" class="js-unit-checkbox" type="checkbox" title="<?= _("Select") ?>" name="service[]" value="<?= $key ?>">
|
||||
<label for="check<?= $i ?>" class="u-hide-desktop"><?= _("Select") ?></label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="units-table-cell units-table-heading-cell u-text-bold">
|
||||
<span class="u-hide-desktop"><?= _("Service") ?>:</span>
|
||||
<i class="fas <?= $state_icon ?> u-mr5"></i>
|
||||
<a href="/edit/server/<? echo $edit_url ?>/" title="<?= _("Edit") ?>: <?= $key ?>">
|
||||
<?= $key ?>
|
||||
</a>
|
||||
</div>
|
||||
<div class="units-table-cell">
|
||||
<ul class="units-table-row-actions">
|
||||
<li class="units-table-row-action shortcut-enter" data-key-action="href">
|
||||
<a
|
||||
class="units-table-row-action-link"
|
||||
href="/edit/server/<? echo $edit_url ?>/"
|
||||
title="<?= _("Edit") ?>"
|
||||
>
|
||||
<i class="fas fa-pencil icon-orange"></i>
|
||||
<span class="u-hide-desktop"><?= _("Edit") ?></span>
|
||||
</a>
|
||||
</li>
|
||||
<li class="units-table-row-action shortcut-s" data-key-action="js">
|
||||
<a
|
||||
class="units-table-row-action-link data-controls js-confirm-action"
|
||||
href="/restart/service/?srv=<?= $key ?>&token=<?= $_SESSION["token"] ?>"
|
||||
title="<?= _("Restart") ?>"
|
||||
data-confirm-title="<?= _("Restart") ?>"
|
||||
data-confirm-message="<?= sprintf(_("Are you sure you want to restart %s?"), $key) ?>"
|
||||
>
|
||||
<i class="fas fa-arrow-rotate-left icon-highlight"></i>
|
||||
<span class="u-hide-desktop"><?= _("Restart") ?></span>
|
||||
</a>
|
||||
</li>
|
||||
<li class="units-table-row-action shortcut-delete" data-key-action="js">
|
||||
<a
|
||||
class="units-table-row-action-link data-controls js-confirm-action"
|
||||
href="/<?= $action ?>/service/?srv=<?= $key ?>&token=<?= $_SESSION["token"] ?>"
|
||||
title="<?=$action_text ?>"
|
||||
data-confirm-message="<?php if ($action == 'stop'){ echo sprintf(_('Are you sure you want to stop service %s?'), $key); } else { echo sprintf(_('Are you sure you want to start service %s?'), $key); }?>"
|
||||
>
|
||||
<i class="fas <?= $spnd_icon ?> <?= $spnd_icon_class ?>"></i>
|
||||
<span class="u-hide-desktop"><?=$action_text ?></span>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="units-table-cell">
|
||||
<span class="u-hide-desktop u-text-bold"><?= _("Description") ?>:</span>
|
||||
<?= _($data[$key]["SYSTEM"]) ?>
|
||||
</div>
|
||||
<div class="units-table-cell u-text-bold u-text-center-desktop">
|
||||
<span class="u-hide-desktop"><?= _("Uptime") ?>:</span>
|
||||
<?= humanize_time($data[$key]["RTIME"]) ?>
|
||||
</div>
|
||||
<div class="units-table-cell u-text-bold u-text-center-desktop">
|
||||
<span class="u-hide-desktop"><?= _("CPU") ?>:</span>
|
||||
<?= $cpu ?>
|
||||
</div>
|
||||
<div class="units-table-cell u-text-bold u-text-center-desktop">
|
||||
<span class="u-hide-desktop"><?= _("Memory") ?>:</span>
|
||||
<?= $data[$key]["MEM"] ?> <?= _("MB") ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php } ?>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<footer class="app-footer">
|
||||
</footer>
|
||||
102
web/templates/pages/list_ssl.php
Normal file
102
web/templates/pages/list_ssl.php
Normal file
@@ -0,0 +1,102 @@
|
||||
<!-- Begin toolbar -->
|
||||
<div class="toolbar">
|
||||
<div class="toolbar-inner">
|
||||
<div class="toolbar-right">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- End toolbar -->
|
||||
|
||||
<!-- Begin form -->
|
||||
<div class="container">
|
||||
<form id="main-form" name="v_generate_csr" method="post">
|
||||
<input type="hidden" name="token" value="<?= $_SESSION["token"] ?>">
|
||||
|
||||
<div class="form-container">
|
||||
<h1 class="u-mb20"><?= _("Generate Self-Signed SSL Certificate") ?></h1>
|
||||
<?php show_alert_message($_SESSION); ?>
|
||||
<div
|
||||
x-data="{
|
||||
text: '<?= base64_encode($v_crt) ?>',
|
||||
blob() {
|
||||
return window.URL.createObjectURL(new Blob([atob(this.text)], { type: 'text/plain' }))
|
||||
}
|
||||
}"
|
||||
class="u-mb20"
|
||||
>
|
||||
<label for="v_crt" class="form-label u-side-by-side">
|
||||
<?= _("SSL Certificate") ?>
|
||||
<a
|
||||
x-bind:href="blob()"
|
||||
download="<?= htmlentities($v_domain) ?>.crt"
|
||||
title="<?= _("Download") ?>"
|
||||
>
|
||||
<i class="fas fa-download"></i>
|
||||
<span class="u-hidden"><?= _("Download") ?></span>
|
||||
</a>
|
||||
</label>
|
||||
<textarea
|
||||
x-model="atob(text)"
|
||||
class="form-control u-min-height100"
|
||||
name="v_crt"
|
||||
id="v_crt"
|
||||
></textarea>
|
||||
</div>
|
||||
<div
|
||||
x-data="{
|
||||
text: '<?= base64_encode($v_key) ?>',
|
||||
blob() {
|
||||
return window.URL.createObjectURL(new Blob([atob(this.text)], { type: 'text/plain' }))
|
||||
}
|
||||
}"
|
||||
class="u-mb20"
|
||||
>
|
||||
<label for="v_key" class="form-label u-side-by-side">
|
||||
<?= _("SSL Private Key") ?>
|
||||
<a
|
||||
x-bind:href="blob()"
|
||||
download="<?= htmlentities($v_domain) ?>.key"
|
||||
title="<?= _("Download") ?>"
|
||||
>
|
||||
<i class="fas fa-download"></i>
|
||||
<span class="u-hidden"><?= _("Download") ?></span>
|
||||
</a>
|
||||
</label>
|
||||
<textarea
|
||||
x-model="atob(text)"
|
||||
class="form-control u-min-height100"
|
||||
name="v_key"
|
||||
id="v_key"
|
||||
></textarea>
|
||||
</div>
|
||||
<div
|
||||
x-data="{
|
||||
text: '<?= base64_encode($v_csr) ?>',
|
||||
blob() {
|
||||
return window.URL.createObjectURL(new Blob([atob(this.text)], { type: 'text/plain' }))
|
||||
}
|
||||
}"
|
||||
class="u-mb20"
|
||||
>
|
||||
<label for="v_csr" class="form-label u-side-by-side">
|
||||
<?= _("SSL CSR") ?>
|
||||
<a
|
||||
x-bind:href="blob()"
|
||||
download="<?= htmlentities($v_domain) ?>.csr"
|
||||
title="<?= _("Download") ?>"
|
||||
>
|
||||
<i class="fas fa-download"></i>
|
||||
<span class="u-hidden"><?= _("Download") ?></span>
|
||||
</a>
|
||||
</label>
|
||||
<textarea
|
||||
x-model="atob(text)"
|
||||
class="form-control u-min-height100"
|
||||
name="v_csr"
|
||||
id="v_csr"
|
||||
></textarea>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<!-- End form -->
|
||||
238
web/templates/pages/list_stats.php
Normal file
238
web/templates/pages/list_stats.php
Normal file
@@ -0,0 +1,238 @@
|
||||
<!-- Begin toolbar -->
|
||||
<div class="toolbar">
|
||||
<div class="toolbar-inner">
|
||||
<div class="toolbar-buttons">
|
||||
<?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"])) { ?>
|
||||
<form x-data x-bind="BulkEdit" action="/list/stats/" method="get">
|
||||
<input type="hidden" name="token" value="<?= $_SESSION["token"] ?>">
|
||||
<select class="form-select" name="user">
|
||||
<option value=""><?= _("Show Per User") ?></option>
|
||||
<?php
|
||||
foreach ($users as $key => $value) {
|
||||
if (($_SESSION['POLICY_SYSTEM_HIDE_ADMIN'] === 'yes') && ($value === 'admin')) {
|
||||
// Hide admin user from statistics list
|
||||
} else {
|
||||
echo "\t\t\t\t<option value=\"".$value."\"";
|
||||
if ((!empty($v_user)) && ( $value == $_GET['user'])){
|
||||
echo ' selected';
|
||||
}
|
||||
echo ">".$value."</option>\n";
|
||||
}
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
<button type="submit" class="toolbar-input-submit" title="<?= _("Apply to selected") ?>">
|
||||
<i class="fas fa-arrow-right"></i>
|
||||
</button>
|
||||
</form>
|
||||
<?php } ?>
|
||||
<div class="toolbar-search">
|
||||
<form action="/search/" method="get">
|
||||
<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>
|
||||
</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- End toolbar -->
|
||||
|
||||
<div class="container">
|
||||
<!-- Begin statistics list item loop -->
|
||||
<div class="stats">
|
||||
<?php foreach ($data as $key => $value) {
|
||||
++$i; ?>
|
||||
<div class="stats-item">
|
||||
|
||||
<div class="stats-item-header">
|
||||
<i class="fas fa-chart-bar icon-dim stats-item-header-icon u-mr10"></i>
|
||||
<h2 class="stats-item-header-title">
|
||||
<?php $date = new DateTime($key);
|
||||
echo _($date -> format('M')) .' '.$date -> format('Y') ?>
|
||||
</h2>
|
||||
</div>
|
||||
|
||||
<div class="stats-item-content">
|
||||
|
||||
<div class="stats-item-summary">
|
||||
<h3 class="stats-item-summary-title">
|
||||
<span class="u-text-bold">
|
||||
<i class="fas fa-right-left icon-dim icon-large u-mr5" title="<?= _("Bandwidth") ?>"></i>
|
||||
<?= _("Bandwidth") ?>
|
||||
</span>
|
||||
<span class="u-mr10">
|
||||
<span class="u-text-bold"><?= humanize_usage_size($data[$key]["U_BANDWIDTH"]) ?></span>
|
||||
<?= humanize_usage_measure($data[$key]["U_BANDWIDTH"]) ?> / <span class="u-text-bold"><?= humanize_usage_size($data[$key]["BANDWIDTH"]) ?></span>
|
||||
<?= humanize_usage_measure($data[$key]["BANDWIDTH"]) ?>
|
||||
</span>
|
||||
</h3>
|
||||
<ul class="stats-item-summary-list u-mb10">
|
||||
<li class="stats-item-summary-list-item">
|
||||
<span>
|
||||
<?php if ($_SESSION["userContext"] === "admin" || ($_SESSION["userContext"] === "user" && $data[$key]["IP_OWNED"] != "0")) { ?>
|
||||
<?= _("IP Addresses") ?>:
|
||||
<?php } ?>
|
||||
</span>
|
||||
<span>
|
||||
<span class="u-text-bold"><?= $data[$key]["IP_OWNED"] ?></span>
|
||||
<?= _("IPs") ?>
|
||||
</span>
|
||||
</li>
|
||||
</ul>
|
||||
<h3 class="stats-item-summary-title">
|
||||
<span class="u-text-bold">
|
||||
<i class="fas fa-hard-drive icon-dim icon-large u-mr5" title="Disk"></i>
|
||||
<?= _("Disk") ?>
|
||||
</span>
|
||||
<span class="u-mr10">
|
||||
<span class="u-text-bold"><?= humanize_usage_size($data[$key]["U_DISK"]) ?></span>
|
||||
<?= humanize_usage_measure($data[$key]["U_DISK"]) ?> / <span class="u-text-bold"><?= humanize_usage_size($data[$key]["DISK_QUOTA"]) ?></span>
|
||||
<?= humanize_usage_measure($data[$key]["DISK_QUOTA"]) ?>
|
||||
</span>
|
||||
</span>
|
||||
</h3>
|
||||
<ul class="stats-item-summary-list">
|
||||
<li class="stats-item-summary-list-item">
|
||||
<span>
|
||||
<?= _("Web") ?>:
|
||||
</span>
|
||||
<span>
|
||||
<span class="u-text-bold"><?= humanize_usage_size($data[$key]["U_DISK_WEB"]) ?></span>
|
||||
<?= humanize_usage_measure($data[$key]["U_DISK_WEB"]) ?>
|
||||
</span>
|
||||
</li>
|
||||
<li class="stats-item-summary-list-item u-mb5">
|
||||
<span>
|
||||
<?= _("Databases") ?>:
|
||||
</span>
|
||||
<span>
|
||||
<span class="u-text-bold"><?= humanize_usage_size($data[$key]["U_DISK_DB"]) ?></span>
|
||||
<?= humanize_usage_measure($data[$key]["U_DISK_DB"]) ?>
|
||||
</span>
|
||||
</li>
|
||||
<li class="stats-item-summary-list-item">
|
||||
<span>
|
||||
<?= _("Mail") ?>:
|
||||
</span>
|
||||
<span>
|
||||
<span class="u-text-bold"><?= humanize_usage_size($data[$key]["U_DISK_MAIL"]) ?></span>
|
||||
<?= humanize_usage_measure($data[$key]["U_DISK_MAIL"]) ?>
|
||||
</span>
|
||||
</li>
|
||||
<li class="stats-item-summary-list-item">
|
||||
<span>
|
||||
<?= _("User Directory") ?>:
|
||||
</span>
|
||||
<span>
|
||||
<span class="u-text-bold"><?= humanize_usage_size($data[$key]["U_DISK_DIRS"]) ?></span>
|
||||
<?= humanize_usage_measure($data[$key]["U_DISK_DIRS"]) ?>
|
||||
</span>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<ul class="stats-item-list">
|
||||
<li class="stats-item-list-item">
|
||||
<span class="stats-item-list-item-label">
|
||||
<?= _("Web Domains") ?>:
|
||||
</span>
|
||||
<span class="stats-item-list-item-value">
|
||||
<?= $data[$key]["U_WEB_DOMAINS"] ?>
|
||||
</span>
|
||||
</li>
|
||||
<li class="stats-item-list-item">
|
||||
<span class="stats-item-list-item-label">
|
||||
<?= _("Mail Domains") ?>:
|
||||
</span>
|
||||
<span class="stats-item-list-item-value">
|
||||
<?= $data[$key]["U_MAIL_DOMAINS"] ?>
|
||||
</span>
|
||||
</li>
|
||||
<li class="stats-item-list-item">
|
||||
<span class="stats-item-list-item-label">
|
||||
<?= _("SSL Domains") ?>:
|
||||
</span>
|
||||
<span class="stats-item-list-item-value">
|
||||
<?= $data[$key]["U_WEB_SSL"] ?>
|
||||
</span>
|
||||
</li>
|
||||
<li class="stats-item-list-item">
|
||||
<span class="stats-item-list-item-label">
|
||||
<?= _("Mail Accounts") ?>:
|
||||
</span>
|
||||
<span class="stats-item-list-item-value">
|
||||
<?= $data[$key]["U_MAIL_ACCOUNTS"] ?>
|
||||
</span>
|
||||
</li>
|
||||
<li class="stats-item-list-item">
|
||||
<span class="stats-item-list-item-label">
|
||||
<?= _("Web Aliases") ?>:
|
||||
</span>
|
||||
<span class="stats-item-list-item-value">
|
||||
<?= $data[$key]["U_WEB_ALIASES"] ?>
|
||||
</span>
|
||||
</li>
|
||||
<li class="stats-item-list-item">
|
||||
<span class="stats-item-list-item-label">
|
||||
<?= _("Databases") ?>:
|
||||
</span>
|
||||
<span class="stats-item-list-item-value">
|
||||
<?= $data[$key]["U_DATABASES"] ?>
|
||||
</span>
|
||||
</li>
|
||||
<li class="stats-item-list-item">
|
||||
<span class="stats-item-list-item-label">
|
||||
<?= _("DNS Zones") ?>:
|
||||
</span>
|
||||
<span class="stats-item-list-item-value">
|
||||
<?= $data[$key]["U_DNS_DOMAINS"] ?>
|
||||
</span>
|
||||
</li>
|
||||
<li class="stats-item-list-item">
|
||||
<span class="stats-item-list-item-label">
|
||||
<?= _("Cron Jobs") ?>:
|
||||
</span>
|
||||
<span class="stats-item-list-item-value">
|
||||
<?= $data[$key]["U_CRON_JOBS"] ?>
|
||||
</span>
|
||||
</li>
|
||||
<li class="stats-item-list-item">
|
||||
<span class="stats-item-list-item-label">
|
||||
<?= _("DNS Records") ?>:
|
||||
</span>
|
||||
<span class="stats-item-list-item-value">
|
||||
<?= $data[$key]["U_DNS_RECORDS"] ?>
|
||||
</span>
|
||||
</li>
|
||||
<li class="stats-item-list-item">
|
||||
<span class="stats-item-list-item-label">
|
||||
<?= _("Backups") ?>:
|
||||
</span>
|
||||
<span class="stats-item-list-item-value">
|
||||
<?= $data[$key]["U_BACKUPS"] ?>
|
||||
</span>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<?php } ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<footer class="app-footer">
|
||||
<div class="container app-footer-inner">
|
||||
<p>
|
||||
<?php printf(ngettext("%d month", "%d months", $i), $i); ?>
|
||||
</p>
|
||||
</div>
|
||||
</footer>
|
||||
77
web/templates/pages/list_updates.php
Normal file
77
web/templates/pages/list_updates.php
Normal file
@@ -0,0 +1,77 @@
|
||||
<!-- Begin toolbar -->
|
||||
<div class="toolbar">
|
||||
<div class="toolbar-inner">
|
||||
<div class="toolbar-buttons">
|
||||
<a class="button button-secondary button-back js-button-back" href="/list/server/">
|
||||
<i class="fas fa-arrow-left icon-blue"></i><?= _("Back") ?>
|
||||
</a>
|
||||
<?php
|
||||
if ($autoupdate == 'Enabled') {
|
||||
$btn_url = '/delete/cron/autoupdate/?token='.$_SESSION['token'].'';
|
||||
$btn_icon = 'fa-toggle-on icon-green';
|
||||
$btn_label = _('Disable Automatic Updates');
|
||||
} else {
|
||||
$btn_url = '/add/cron/autoupdate/?token='.$_SESSION['token'].'';
|
||||
$btn_icon = 'fa-toggle-off icon-red';
|
||||
$btn_label = _('Enable Automatic Updates');
|
||||
}
|
||||
?>
|
||||
<a class="button button-secondary" href="<?= $btn_url ?>">
|
||||
<i class="fas <?= $btn_icon ?>"></i><?= $btn_label ?>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- End toolbar -->
|
||||
|
||||
<div class="container">
|
||||
|
||||
<h1 class="u-text-center u-hide-desktop u-mt20 u-pr30 u-mb20 u-pl30"><?= _("Updates") ?></h1>
|
||||
|
||||
<div class="units-table js-units-container">
|
||||
<div class="units-table-header">
|
||||
<div class="units-table-cell"><?= _("Package Names") ?></div>
|
||||
<div class="units-table-cell"><?= _("Description") ?></div>
|
||||
<div class="units-table-cell u-text-center"><?= _("Version") ?></div>
|
||||
<div class="units-table-cell u-text-center"><?= _("Status") ?></div>
|
||||
</div>
|
||||
|
||||
<!-- Begin update list item loop -->
|
||||
<?php
|
||||
foreach ($data as $key => $value) {
|
||||
++$i;
|
||||
|
||||
if ($data[$key]['UPDATED'] == 'yes') {
|
||||
$status = 'active';
|
||||
$upd_status = 'updated';
|
||||
} else {
|
||||
$status = 'suspended';
|
||||
$upd_status = 'outdated';
|
||||
}
|
||||
?>
|
||||
<div class="units-table-row <?php if ($status == 'suspended') echo 'disabled'; ?> js-unit">
|
||||
<div class="units-table-cell units-table-heading-cell u-text-bold">
|
||||
<span class="u-hide-desktop"><?= _("Package Names") ?>:</span>
|
||||
<?= $key ?>
|
||||
</div>
|
||||
<div class="units-table-cell">
|
||||
<span class="u-hide-desktop u-text-bold"><?= _("Description") ?>:</span>
|
||||
<?= _($data[$key]["DESCR"]) ?>
|
||||
</div>
|
||||
<div class="units-table-cell u-text-center-desktop">
|
||||
<span class="u-hide-desktop u-text-bold"><?= _("Version") ?>:</span>
|
||||
<?= $data[$key]["VERSION"] ?> (<?= $data[$key]["ARCH"] ?>)
|
||||
</div>
|
||||
<div class="units-table-cell u-text-center-desktop">
|
||||
<span class="u-hide-desktop u-text-bold"><?= _("Status") ?>:</span>
|
||||
<?php if ($data[$key]['UPDATED'] == 'no') { echo '<i class="fas fa-triangle-exclamation" style="color: orange;"></i>'; } ?>
|
||||
<?php if ($data[$key]['UPDATED'] == 'yes') { echo '<i class="fas fa-circle-check icon-green"></i>'; } ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php } ?>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<footer class="app-footer">
|
||||
</footer>
|
||||
315
web/templates/pages/list_user.php
Normal file
315
web/templates/pages/list_user.php
Normal file
@@ -0,0 +1,315 @@
|
||||
<!-- Begin toolbar -->
|
||||
<div class="toolbar">
|
||||
<div class="toolbar-inner">
|
||||
<div class="toolbar-buttons">
|
||||
<a href="/add/user/" class="button button-secondary js-button-create">
|
||||
<i class="fas fa-circle-plus icon-green"></i><?= _("Add User") ?>
|
||||
</a>
|
||||
<a href="/list/package/" class="button button-secondary">
|
||||
<i class="fas fa-box-open icon-orange"></i><?= _("Packages") ?>
|
||||
</a>
|
||||
</div>
|
||||
<div class="toolbar-right">
|
||||
<div class="toolbar-sorting">
|
||||
<button class="toolbar-sorting-toggle js-toggle-sorting-menu" type="button" title="<?= _("Sort items") ?>">
|
||||
<?= _("Sort by") ?>:
|
||||
<span class="u-text-bold">
|
||||
<?php if ($_SESSION['userSortOrder'] === 'name') { $label = _('Name'); } else { $label = _('Date'); } ?>
|
||||
<?= $label ?> <i class="fas fa-arrow-down-a-z"></i>
|
||||
</span>
|
||||
</button>
|
||||
<ul class="toolbar-sorting-menu js-sorting-menu u-hidden">
|
||||
<li data-entity="sort-bandwidth" data-sort-as-int="1">
|
||||
<span class="name"><?= _("Bandwidth") ?> <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 data-entity="sort-date" data-sort-as-int="1">
|
||||
<span class="name <?php if ($_SESSION['userSortOrder'] === 'date') { echo 'active'; } ?>"><?= _("Date") ?> <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 data-entity="sort-disk" data-sort-as-int="1">
|
||||
<span class="name"><?= _("Disk") ?> <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 data-entity="sort-package">
|
||||
<span class="name"><?= _("Package") ?> <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 data-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-data x-bind="BulkEdit" action="/bulk/user/" method="post">
|
||||
<input type="hidden" name="token" value="<?= $_SESSION["token"] ?>">
|
||||
<select class="form-select" name="action">
|
||||
<option value=""><?= _("Apply to selected") ?></option>
|
||||
<option value="rebuild"><?= _("Rebuild All") ?></option>
|
||||
<option value="rebuild user"><?= _("Rebuild User Profile") ?></option>
|
||||
<option value="rebuild web"><?= _("Rebuild Web Domains") ?></option>
|
||||
<option value="rebuild dns"><?= _("Rebuild DNS Zones") ?></option>
|
||||
<option value="rebuild mail"><?= _("Rebuild Mail Domains") ?></option>
|
||||
<option value="rebuild db"><?= _("Rebuild Databases") ?></option>
|
||||
<option value="rebuild cron"><?= _("Rebuild Cron Jobs") ?></option>
|
||||
<option value="update counters"><?= _("Update Usage Counters") ?></option>
|
||||
<option value="suspend"><?= _("Suspend") ?></option>
|
||||
<option value="unsuspend"><?= _("Unsuspend") ?></option>
|
||||
<option value="delete"><?= _("Delete") ?></option>
|
||||
</select>
|
||||
<button type="submit" class="toolbar-input-submit" title="<?= _("Apply to selected") ?>">
|
||||
<i class="fas fa-arrow-right"></i>
|
||||
</button>
|
||||
</form>
|
||||
</div>
|
||||
<div class="toolbar-search">
|
||||
<form action="/search/" method="get">
|
||||
<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>
|
||||
</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- End toolbar -->
|
||||
|
||||
<div class="container">
|
||||
|
||||
<h1 class="u-text-center u-hide-desktop u-mt20 u-pr30 u-mb20 u-pl30"><?= _("Users") ?></h1>
|
||||
|
||||
<div class="units-table js-units-container">
|
||||
<div class="units-table-header">
|
||||
<div class="units-table-cell">
|
||||
<input type="checkbox" class="js-toggle-all-checkbox" title="<?= _("Select all") ?>">
|
||||
</div>
|
||||
<div class="units-table-cell"><?= _("Name") ?></div>
|
||||
<div class="units-table-cell"></div>
|
||||
<div class="units-table-cell u-text-center"><?= _("Package") ?></div>
|
||||
<div class="units-table-cell u-text-center"><?= _("IPs") ?></div>
|
||||
<div class="units-table-cell u-text-center">
|
||||
<i class="fas fa-hard-drive" title="<?= _("Disk") ?>"></i>
|
||||
<span class="u-hidden-visually"><?= _("Disk") ?></span>
|
||||
</div>
|
||||
<div class="units-table-cell u-text-center">
|
||||
<i class="fas fa-right-left" title="<?= _("Bandwidth") ?>"></i>
|
||||
<span class="u-hidden-visually"><?= _("Bandwidth") ?></span>
|
||||
</div>
|
||||
<div class="units-table-cell compact u-text-center">
|
||||
<i class="fas fa-earth-americas" title="<?= _("Web Domains") ?>"></i>
|
||||
<span class="u-hidden-visually"><?= _("Web Domains") ?></span>
|
||||
</div>
|
||||
<div class="units-table-cell compact u-text-center">
|
||||
<i class="fas fa-book-atlas" title="<?= _("DNS Zones") ?>"></i>
|
||||
<span class="u-hidden-visually"><?= _("DNS Zones") ?></span>
|
||||
</div>
|
||||
<div class="units-table-cell compact u-text-center">
|
||||
<i class="fas fa-envelopes-bulk" title="<?= _("Mail Domains") ?>"></i>
|
||||
<span class="u-hidden-visually"><?= _("Mail Domains") ?></span>
|
||||
</div>
|
||||
<div class="units-table-cell compact u-text-center">
|
||||
<i class="fas fa-database" title="<?= _("Databases") ?>"></i>
|
||||
<span class="u-hidden-visually"><?= _("Databases") ?></span>
|
||||
</div>
|
||||
<div class="units-table-cell compact u-text-center">
|
||||
<i class="fas fa-file-zipper" title="<?= _("Backups") ?>"></i>
|
||||
<span class="u-hidden-visually"><?= _("Backups") ?></span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Begin user list item loop -->
|
||||
<?php
|
||||
foreach ($data as $key => $value) {
|
||||
++$i;
|
||||
if ($data[$key]['SUSPENDED'] == 'yes') {
|
||||
$status = 'suspended';
|
||||
$spnd_action = 'unsuspend';
|
||||
$spnd_action_title = _('Unsuspend');
|
||||
$spnd_icon = 'fa-play';
|
||||
$spnd_icon_class = 'icon-green';
|
||||
$spnd_confirmation = _('Are you sure you want to unsuspend user %s?');
|
||||
} else {
|
||||
$status = 'active';
|
||||
$spnd_action = 'suspend';
|
||||
$spnd_action_title = _('Suspend');
|
||||
$spnd_icon = 'fa-pause';
|
||||
$spnd_icon_class = 'icon-highlight';
|
||||
$spnd_confirmation = _('Are you sure you want to suspend user %s?');
|
||||
}
|
||||
?>
|
||||
<div class="units-table-row <?php if ($status == 'suspended') echo 'disabled'; ?> js-unit <?php if (($_SESSION['POLICY_SYSTEM_HIDE_ADMIN'] === 'yes') && ($_SESSION['user'] !== 'admin') && ($key === 'admin')) { echo 'u-hidden'; } ?>"
|
||||
data-sort-date="<?= strtotime($data[$key]['DATE'].' '.$data[$key]['TIME']) ?>"
|
||||
data-sort-name="<?= strtolower($key) ?>"
|
||||
data-sort-package="<?= strtolower($data[$key]['PACKAGE']) ?>"
|
||||
data-sort-bandwidth="<?= $data[$key]["U_BANDWIDTH"] ?>"
|
||||
data-sort-disk="<?= $data[$key]["U_DISK"] ?>">
|
||||
<div class="units-table-cell">
|
||||
<div>
|
||||
<input id="check<?= $i ?>" class="js-unit-checkbox" type="checkbox" title="<?= _("Select") ?>" name="user[]" value="<?= $key ?>">
|
||||
<label for="check<?= $i ?>" class="u-hide-desktop"><?= _("Select") ?></label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="units-table-cell units-table-heading-cell">
|
||||
<span class="u-hide-desktop u-text-bold"><?= _("Name") ?>:</span>
|
||||
<?php if ($key == $user_plain) { ?>
|
||||
<a href="/edit/user/?user=<?= $key ?>&token=<?= $_SESSION["token"] ?>" title="<?= _("Edit User") ?>">
|
||||
<span class="u-text-bold">
|
||||
<?= $key ?>
|
||||
</span>
|
||||
(<?= $data[$key]["NAME"] ?>)
|
||||
</a>
|
||||
<?php } else { ?>
|
||||
<a href="/login/?loginas=<?= $key ?>&token=<?= $_SESSION["token"] ?>" title="<?= _("Log in as") ?> <?= $key ?>">
|
||||
<span class="u-text-bold">
|
||||
<?= $key ?>
|
||||
</span>
|
||||
(<?= $data[$key]["NAME"] ?>)
|
||||
</a>
|
||||
<?php } ?>
|
||||
<p class="u-max-width200 u-text-truncate">
|
||||
<span class="u-hide-desktop u-text-bold"><?= _("Email") ?>:</span>
|
||||
<span title="<?= $data[$key]["CONTACT"] ?>"><?= $data[$key]["CONTACT"] ?></span>
|
||||
</p>
|
||||
</div>
|
||||
<div class="units-table-cell">
|
||||
<ul class="units-table-row-actions">
|
||||
<?php if ($key == $user_plain) { ?>
|
||||
<li class="units-table-row-action">
|
||||
<i class="fas fa-user-check" title="<?= $key ?> (<?= $data[$key]["NAME"] ?>)"></i>
|
||||
<span class="u-hide-desktop"><?= $key ?> (<?= $data[$key]["NAME"] ?>)</span>
|
||||
</li>
|
||||
<?php } else { ?>
|
||||
<li class="units-table-row-action">
|
||||
<a
|
||||
class="units-table-row-action-link"
|
||||
href="/login/?loginas=<?= $key ?>&token=<?= $_SESSION["token"] ?>"
|
||||
title="<?= _("Log in as") ?> <?= $key ?>"
|
||||
>
|
||||
<i class="fas fa-right-to-bracket icon-green"></i>
|
||||
<span class="u-hide-desktop"><?= _("Log in as") ?> <?= $key ?></span>
|
||||
</a>
|
||||
</li>
|
||||
<?php } ?>
|
||||
<?php if (!($_SESSION["userContext"] === "admin" && $key == "admin" && $_SESSION["user"] != "admin")) { ?>
|
||||
<li class="units-table-row-action shortcut-enter" data-key-action="href">
|
||||
<a
|
||||
class="units-table-row-action-link"
|
||||
href="/edit/user/?user=<?= $key ?>&token=<?= $_SESSION["token"] ?>"
|
||||
title="<?= _("Edit User") ?>"
|
||||
>
|
||||
<i class="fas fa-pencil icon-orange"></i>
|
||||
<span class="u-hide-desktop"><?= _("Edit User") ?></span>
|
||||
</a>
|
||||
</li>
|
||||
<?php } ?>
|
||||
<?php if (!($key == "admin" || $key == $user_plain)) { ?>
|
||||
<li class="units-table-row-action shortcut-s" data-key-action="js">
|
||||
<a
|
||||
class="units-table-row-action-link data-controls js-confirm-action"
|
||||
href="/<?= $spnd_action ?>/user/?user=<?= $key ?>&token=<?= $_SESSION["token"] ?>"
|
||||
title="<?= $spnd_action_title ?>"
|
||||
data-confirm-title="<?= $spnd_action_title ?>"
|
||||
data-confirm-message="<?= sprintf($spnd_confirmation, $key) ?>"
|
||||
>
|
||||
<i class="fas <?= $spnd_icon ?> <?= $spnd_icon_class ?>"></i>
|
||||
<span class="u-hide-desktop"><?= $spnd_action_title ?></span>
|
||||
</a>
|
||||
</li>
|
||||
<li class="units-table-row-action shortcut-delete" data-key-action="js">
|
||||
<a
|
||||
class="units-table-row-action-link data-controls js-confirm-action"
|
||||
href="/delete/user/?user=<?= $key ?>&token=<?= $_SESSION["token"] ?>"
|
||||
title="<?= _("Delete") ?>"
|
||||
data-confirm-title="<?= _("Delete") ?>"
|
||||
data-confirm-message="<?= sprintf(_("Are you sure you want to delete user %s?"), $key) ?>"
|
||||
>
|
||||
<i class="fas fa-trash icon-red"></i>
|
||||
<span class="u-hide-desktop"><?= _("Delete") ?></span>
|
||||
</a>
|
||||
</li>
|
||||
<?php } ?>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="units-table-cell u-text-bold u-text-center-desktop">
|
||||
<span class="u-hide-desktop"><?= _("Package") ?>:</span>
|
||||
<?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>
|
||||
<?php } ?>
|
||||
</div>
|
||||
<div class="units-table-cell u-text-center-desktop">
|
||||
<span class="u-hide-desktop u-text-bold"><?= _("IPs") ?>:</span>
|
||||
<?= $data[$key]["IP_OWNED"] ?>
|
||||
</div>
|
||||
<div class="units-table-cell u-text-center-desktop u-text-no-wrap">
|
||||
<span class="u-hide-desktop u-text-bold"><?= _("Disk") ?>:</span>
|
||||
<span class="u-text-bold">
|
||||
<?= humanize_usage_size($data[$key]["U_DISK"], 1) ?>
|
||||
</span>
|
||||
<span class="u-text-small">
|
||||
<?= humanize_usage_measure($data[$key]["U_DISK"]) ?>
|
||||
</span> /
|
||||
<span class="u-text-bold">
|
||||
<?= humanize_usage_size($data[$key]["DISK_QUOTA"], 1) ?>
|
||||
</span>
|
||||
<span class="u-text-small">
|
||||
<?= humanize_usage_measure($data[$key]["DISK_QUOTA"]) ?>
|
||||
</span>
|
||||
</div>
|
||||
<div class="units-table-cell u-text-center-desktop u-text-no-wrap">
|
||||
<span class="u-hide-desktop u-text-bold"><?= _("Bandwidth") ?>:</span>
|
||||
<span class="u-text-bold">
|
||||
<?= humanize_usage_size($data[$key]["U_BANDWIDTH"], 1) ?>
|
||||
</span>
|
||||
<span class="u-text-small">
|
||||
<?= humanize_usage_measure($data[$key]["U_BANDWIDTH"]) ?>
|
||||
</span> /
|
||||
<span class="u-text-bold">
|
||||
<?= humanize_usage_size($data[$key]["BANDWIDTH"], 1) ?>
|
||||
</span>
|
||||
<span class="u-text-small">
|
||||
<?= humanize_usage_measure($data[$key]["BANDWIDTH"]) ?>
|
||||
</span>
|
||||
</div>
|
||||
<div class="units-table-cell compact u-text-center-desktop">
|
||||
<span class="u-hide-desktop u-text-bold"><?= _("Web Domains") ?>:</span>
|
||||
<span class="units-table-badge">
|
||||
<?= $data[$key]["U_WEB_DOMAINS"] ?>
|
||||
</span>
|
||||
</div>
|
||||
<div class="units-table-cell compact u-text-center-desktop">
|
||||
<span class="u-hide-desktop u-text-bold"><?= _("DNS Zones") ?>:</span>
|
||||
<span class="units-table-badge">
|
||||
<?= $data[$key]["U_DNS_DOMAINS"] ?>
|
||||
</span>
|
||||
</div>
|
||||
<div class="units-table-cell compact u-text-center-desktop">
|
||||
<span class="u-hide-desktop u-text-bold"><?= _("Mail Domains") ?>:</span>
|
||||
<span class="units-table-badge">
|
||||
<?= $data[$key]["U_MAIL_DOMAINS"] ?>
|
||||
</span>
|
||||
</div>
|
||||
<div class="units-table-cell compact u-text-center-desktop">
|
||||
<span class="u-hide-desktop u-text-bold"><?= _("Databases") ?>:</span>
|
||||
<span class="units-table-badge">
|
||||
<?= $data[$key]["U_DATABASES"] ?>
|
||||
</span>
|
||||
</div>
|
||||
<div class="units-table-cell compact u-text-center-desktop">
|
||||
<span class="u-hide-desktop u-text-bold"><?= _("Backups") ?>:</span>
|
||||
<span class="units-table-badge">
|
||||
<?= $data[$key]["U_BACKUPS"] ?>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<?php } ?>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<footer class="app-footer">
|
||||
<div class="container app-footer-inner">
|
||||
<p>
|
||||
<?php printf(ngettext("%d user account", "%d user accounts", $i), $i); ?>
|
||||
</p>
|
||||
</div>
|
||||
</footer>
|
||||
352
web/templates/pages/list_web.php
Normal file
352
web/templates/pages/list_web.php
Normal file
@@ -0,0 +1,352 @@
|
||||
<!-- Begin toolbar -->
|
||||
<div class="toolbar">
|
||||
<div class="toolbar-inner">
|
||||
<div class="toolbar-buttons">
|
||||
<?php if ($read_only !== "true") { ?>
|
||||
<a href="/add/web/" class="button button-secondary js-button-create">
|
||||
<i class="fas fa-circle-plus icon-green"></i><?= _("Add Web Domain") ?>
|
||||
</a>
|
||||
<?php } ?>
|
||||
</div>
|
||||
<div class="toolbar-right">
|
||||
<div class="toolbar-sorting">
|
||||
<button class="toolbar-sorting-toggle js-toggle-sorting-menu" type="button" title="<?= _("Sort items") ?>">
|
||||
<?= _("Sort by") ?>:
|
||||
<span class="u-text-bold">
|
||||
<?php if ($_SESSION['userSortOrder'] === 'name') { $label = ('Name'); } else { $label = _('Date'); } ?>
|
||||
<?= $label?> <i class="fas fa-arrow-down-a-z"></i>
|
||||
</span>
|
||||
</button>
|
||||
<ul class="toolbar-sorting-menu js-sorting-menu u-hidden">
|
||||
<li data-entity="sort-bandwidth" data-sort-as-int="1">
|
||||
<span class="name"><?= _("Bandwidth") ?> <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 data-entity="sort-date" data-sort-as-int="1">
|
||||
<span class="name <?php if ($_SESSION['userSortOrder'] === 'date') { echo 'active'; } ?>"><?= _("Date") ?> <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 data-entity="sort-disk" data-sort-as-int="1">
|
||||
<span class="name"><?= _("Disk") ?> <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 data-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 data-entity="sort-ip" data-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") { ?>
|
||||
<form x-data x-bind="BulkEdit" action="/bulk/web/" method="post">
|
||||
<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") { ?>
|
||||
<option value="rebuild"><?= _("Rebuild") ?></option>
|
||||
<?php } ?>
|
||||
<option value="suspend"><?= _("Suspend") ?></option>
|
||||
<option value="unsuspend"><?= _("Unsuspend") ?></option>
|
||||
<option value="delete"><?= _("Delete") ?></option>
|
||||
</select>
|
||||
<button type="submit" class="toolbar-input-submit" title="<?= _("Apply to selected") ?>">
|
||||
<i class="fas fa-arrow-right"></i>
|
||||
</button>
|
||||
</form>
|
||||
<?php } ?>
|
||||
</div>
|
||||
<div class="toolbar-search">
|
||||
<form action="/search/" method="get">
|
||||
<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>
|
||||
</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- End toolbar -->
|
||||
|
||||
<div class="container">
|
||||
|
||||
<h1 class="u-text-center u-hide-desktop u-mt20 u-pr30 u-mb20 u-pl30"><?= _("Web Domains") ?></h1>
|
||||
|
||||
<div class="units-table js-units-container">
|
||||
<div class="units-table-header">
|
||||
<div class="units-table-cell">
|
||||
<input type="checkbox" class="js-toggle-all-checkbox" title="<?= _("Select all") ?>" <?= $display_mode ?>>
|
||||
</div>
|
||||
<div class="units-table-cell"><?= _("Name") ?></div>
|
||||
<div class="units-table-cell"></div>
|
||||
<div class="units-table-cell u-text-center"><?= _("IP Address") ?></div>
|
||||
<div class="units-table-cell u-text-center"><?= _("Disk") ?></div>
|
||||
<div class="units-table-cell u-text-center"><?= _("Bandwidth") ?></div>
|
||||
<div class="units-table-cell u-text-center"><?= _("SSL") ?></div>
|
||||
<div class="units-table-cell u-text-center"><?= _("Statistics") ?></div>
|
||||
</div>
|
||||
|
||||
<!-- Begin web domain list item loop -->
|
||||
<?php
|
||||
foreach ($data as $key => $value) {
|
||||
++$i;
|
||||
if ($data[$key]['SUSPENDED'] == 'yes') {
|
||||
$status = 'suspended';
|
||||
$spnd_action = 'unsuspend';
|
||||
$spnd_action_title = _('Unsuspend');
|
||||
$spnd_icon = 'fa-play';
|
||||
$spnd_icon_class = 'icon-green';
|
||||
$spnd_confirmation = _('Are you sure you want to unsuspend domain %s?');
|
||||
} else {
|
||||
$status = 'active';
|
||||
$spnd_action = 'suspend';
|
||||
$spnd_action_title = _('Suspend');
|
||||
$spnd_icon = 'fa-pause';
|
||||
$spnd_icon_class = 'icon-highlight';
|
||||
$spnd_confirmation = _('Are you sure you want to suspend domain %s?');
|
||||
}
|
||||
if (!empty($data[$key]['SSL_HOME'])) {
|
||||
if ($data[$key]['SSL_HOME'] == 'same') {
|
||||
$ssl_home = 'public_html';
|
||||
} else {
|
||||
$ssl_home = 'public_shtml';
|
||||
}
|
||||
} else {
|
||||
$ssl_home = '';
|
||||
}
|
||||
$web_stats='no';
|
||||
if (!empty($data[$key]['STATS'])) {
|
||||
$web_stats=$data[$key]['STATS'];
|
||||
}
|
||||
$ftp_user='no';
|
||||
if (!empty($data[$key]['FTP_USER'])) {
|
||||
$ftp_user=$data[$key]['FTP_USER'];
|
||||
}
|
||||
if (strlen($ftp_user) > 24 ) {
|
||||
$ftp_user = str_replace(':', ', ', $ftp_user);
|
||||
$ftp_user = substr($ftp_user, 0, 24);
|
||||
$ftp_user = trim($ftp_user, ":");
|
||||
$ftp_user = str_replace(':', ', ', $ftp_user);
|
||||
$ftp_user = $ftp_user.", ...";
|
||||
} else {
|
||||
$ftp_user = str_replace(':', ', ', $ftp_user);
|
||||
}
|
||||
|
||||
$backend_support='no';
|
||||
if (!empty($data[$key]['BACKEND'])) {
|
||||
$backend_support='yes';
|
||||
}
|
||||
|
||||
$proxy_support='no';
|
||||
if (!empty($data[$key]['PROXY'])) {
|
||||
$proxy_support='yes';
|
||||
}
|
||||
if (strlen($data[$key]['PROXY_EXT']) > 24 ) {
|
||||
$proxy_ext_title = str_replace(',', ', ', $data[$key]['PROXY_EXT']);
|
||||
$proxy_ext = substr($data[$key]['PROXY_EXT'], 0, 24);
|
||||
$proxy_ext = trim($proxy_ext, ",");
|
||||
$proxy_ext = str_replace(',', ', ', $proxy_ext);
|
||||
$proxy_ext = $proxy_ext.", ...";
|
||||
} else {
|
||||
$proxy_ext_title = '';
|
||||
$proxy_ext = str_replace(',', ', ', $data[$key]['PROXY_EXT']);
|
||||
}
|
||||
if ($data[$key]['SUSPENDED'] === 'yes') {
|
||||
if ($data[$key]['SSL'] == 'no') {
|
||||
$icon_ssl = 'fas fa-circle-xmark';
|
||||
$title_ssl = _('Disabled');
|
||||
}
|
||||
if ($data[$key]['SSL'] == 'yes') {
|
||||
$icon_ssl = 'fas fa-circle-check';
|
||||
$title_ssl = _('Enabled');
|
||||
}
|
||||
if ($web_stats == 'no') {
|
||||
$icon_webstats = 'fas fa-circle-xmark';
|
||||
$title_webstats = _('Disabled');
|
||||
} else {
|
||||
$icon_webstats = 'fas fa-circle-check';
|
||||
$title_webstats = _('Enabled');
|
||||
}
|
||||
} else {
|
||||
if ($data[$key]['SSL'] == 'no') {
|
||||
$icon_ssl = 'fas fa-circle-xmark icon-red';
|
||||
$title_ssl = _('Disabled');
|
||||
}
|
||||
if ($data[$key]['SSL'] == 'yes') {
|
||||
$icon_ssl = 'fas fa-circle-check icon-green';
|
||||
$title_ssl = _('Enabled');
|
||||
}
|
||||
if ($web_stats == 'no') {
|
||||
$icon_webstats = 'fas fa-circle-xmark icon-red';
|
||||
$title_webstats = _('Disabled');
|
||||
} else {
|
||||
$icon_webstats = 'fas fa-circle-check icon-green';
|
||||
$title_webstats = _('Enabled');
|
||||
}
|
||||
}
|
||||
?>
|
||||
<div class="units-table-row <?php if ($data[$key]['SUSPENDED'] == 'yes') echo 'disabled'; ?> js-unit"
|
||||
data-sort-ip="<?= str_replace('.', '', $data[$key]['IP']) ?>"
|
||||
data-sort-date="<?= strtotime($data[$key]['DATE'].' '.$data[$key]['TIME']) ?>"
|
||||
data-sort-name="<?= $key ?>"
|
||||
data-sort-bandwidth="<?= $data[$key]['U_BANDWIDTH'] ?>"
|
||||
data-sort-disk="<?= $data[$key]['U_DISK'] ?>">
|
||||
<div class="units-table-cell">
|
||||
<div>
|
||||
<input id="check<?= $i ?>" class="js-unit-checkbox" type="checkbox" title="<?= _("Select") ?>" name="domain[]" value="<?= $key ?>" <?= $display_mode ?>>
|
||||
<label for="check<?= $i ?>" class="u-hide-desktop"><?= _("Select") ?></label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="units-table-cell units-table-heading-cell u-text-bold">
|
||||
<span class="u-hide-desktop"><?= _("Name") ?>:</span>
|
||||
<?php if ($read_only === "true") { ?>
|
||||
<?= $key ?>
|
||||
<?php } else {
|
||||
$aliases = explode(',', $data[$key]['ALIAS']);
|
||||
$alias_new = array();
|
||||
foreach($aliases as $alias){
|
||||
if ($alias != 'www.'.$key) {
|
||||
$alias_new[] = trim($alias);
|
||||
}
|
||||
}
|
||||
?>
|
||||
<a href="/edit/web/?domain=<?= $key ?>&token=<?= $_SESSION['token'] ?>" title="<?= _("Edit Domain") ?>: <?= $key ?>">
|
||||
<?= $key ?>
|
||||
<?php
|
||||
if (!empty($alias_new) && !empty($data[$key]['ALIAS'])) {
|
||||
$aliases = implode(', ', $alias_new);
|
||||
echo "<p class='hint u-max-width300 u-text-truncate'>($aliases)</p>";
|
||||
}
|
||||
?>
|
||||
</a>
|
||||
<?php } ?>
|
||||
</div>
|
||||
<div class="units-table-cell">
|
||||
<ul class="units-table-row-actions">
|
||||
<?php if (!empty($data[$key]["STATS"])) { ?>
|
||||
<li class="units-table-row-action shortcut-w" data-key-action="href">
|
||||
<a
|
||||
class="units-table-row-action-link"
|
||||
href="http://<?= $key ?>/vstats/"
|
||||
target="_blank"
|
||||
rel="noopener"
|
||||
title="<?= _("Statistics") ?>"
|
||||
>
|
||||
<i class="fas fa-chart-bar icon-maroon"></i>
|
||||
<span class="u-hide-desktop"><?= _("Statistics") ?></span>
|
||||
</a>
|
||||
</li>
|
||||
<?php } ?>
|
||||
<li class="units-table-row-action" data-key-action="href">
|
||||
<a
|
||||
class="units-table-row-action-link"
|
||||
href="http://<?= $key ?>/"
|
||||
target="_blank"
|
||||
rel="noopener"
|
||||
title="<?= _("Visit") ?>"
|
||||
>
|
||||
<i class="fas fa-square-up-right icon-lightblue"></i>
|
||||
<span class="u-hide-desktop"><?= _("Visit") ?></span>
|
||||
</a>
|
||||
</li>
|
||||
<?php if ($read_only !== "true") { ?>
|
||||
<?php if ($data[$key]["SUSPENDED"] == "no") { ?>
|
||||
<li class="units-table-row-action shortcut-enter" data-key-action="href">
|
||||
<a
|
||||
class="units-table-row-action-link"
|
||||
href="/edit/web/?domain=<?= $key ?>&token=<?= $_SESSION["token"] ?>"
|
||||
title="<?= _("Edit Domain") ?>"
|
||||
>
|
||||
<i class="fas fa-pencil icon-orange"></i>
|
||||
<span class="u-hide-desktop"><?= _("Edit Domain") ?></span>
|
||||
</a>
|
||||
</li>
|
||||
<li class="units-table-row-action" data-key-action="href">
|
||||
<a
|
||||
class="units-table-row-action-link"
|
||||
href="/download/site/?site=<?=$key?>&token=<?= $_SESSION['token'] ?>"
|
||||
title="<?= _("Download Site") ?>"
|
||||
>
|
||||
<i class="fas fa-download icon-orange"></i>
|
||||
<span class="u-hide-desktop"><?= _("Download Site") ?></span>
|
||||
</a>
|
||||
</li>
|
||||
<?php } ?>
|
||||
<li class="units-table-row-action shortcut-l" data-key-action="href">
|
||||
<a
|
||||
class="units-table-row-action-link"
|
||||
href="/list/web-log/?domain=<?= $key ?>&type=access#"
|
||||
title="<?= _("Access Log") ?>"
|
||||
>
|
||||
<i class="fas fa-binoculars icon-purple"></i>
|
||||
<span class="u-hide-desktop"><?= _("Access Log") ?></span>
|
||||
</a>
|
||||
</li>
|
||||
<li class="units-table-row-action shortcut-s" data-key-action="js">
|
||||
<a
|
||||
class="units-table-row-action-link data-controls js-confirm-action"
|
||||
href="/<?= $spnd_action ?>/web/?domain=<?= $key ?>&token=<?= $_SESSION["token"] ?>"
|
||||
title="<?= $spnd_action_title ?>"
|
||||
data-confirm-title="<?= $spnd_action_title ?>"
|
||||
data-confirm-message="<?= sprintf($spnd_confirmation, $key) ?>"
|
||||
>
|
||||
<i class="fas <?= $spnd_icon ?> <?= $spnd_icon_class ?>"></i>
|
||||
<span class="u-hide-desktop"><?= $spnd_action_title ?></span>
|
||||
</a>
|
||||
</li>
|
||||
<li class="units-table-row-action shortcut-delete" data-key-action="js">
|
||||
<a
|
||||
class="units-table-row-action-link data-controls js-confirm-action"
|
||||
href="/delete/web/?domain=<?= $key ?>&token=<?= $_SESSION["token"] ?>"
|
||||
title="<?= _("Delete") ?>"
|
||||
data-confirm-title="<?= _("Delete") ?>"
|
||||
data-confirm-message="<?= sprintf(_("Are you sure you want to delete domain %s?"), $key) ?>"
|
||||
>
|
||||
<i class="fas fa-trash icon-red"></i>
|
||||
<span class="u-hide-desktop"><?= _("Delete") ?></span>
|
||||
</a>
|
||||
</li>
|
||||
<?php } ?>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="units-table-cell u-text-center-desktop">
|
||||
<span class="u-hide-desktop u-text-bold"><?= _("IP Address") ?>:</span>
|
||||
<?= empty($ips[$data[$key]["IP"]]["NAT"]) ? $data[$key]["IP"] : "{$ips[$data[$key]["IP"]]["NAT"]}" ?>
|
||||
</div>
|
||||
<div class="units-table-cell u-text-center-desktop">
|
||||
<span class="u-hide-desktop u-text-bold"><?= _("Disk") ?>:</span>
|
||||
<span class="u-text-bold">
|
||||
<?= humanize_usage_size($data[$key]["U_DISK"]) ?>
|
||||
</span>
|
||||
<span class="u-text-small">
|
||||
<?= humanize_usage_measure($data[$key]["U_DISK"]) ?>
|
||||
</span>
|
||||
</div>
|
||||
<div class="units-table-cell u-text-center-desktop">
|
||||
<span class="u-hide-desktop u-text-bold"><?= _("Bandwidth") ?>:</span>
|
||||
<span class="u-text-bold">
|
||||
<?= humanize_usage_size($data[$key]["U_BANDWIDTH"]) ?>
|
||||
</span>
|
||||
<span class="u-text-small">
|
||||
<?= humanize_usage_measure($data[$key]["U_BANDWIDTH"]) ?>
|
||||
</span>
|
||||
</div>
|
||||
<div class="units-table-cell u-text-center-desktop">
|
||||
<span class="u-hide-desktop u-text-bold"><?= _("SSL") ?>:</span>
|
||||
<i class="fas <?= $icon_ssl ?>" title="<?= $title_ssl ?>"></i>
|
||||
</div>
|
||||
<div class="units-table-cell u-text-center-desktop">
|
||||
<span class="u-hide-desktop u-text-bold"><?= _("Statistics") ?>:</span>
|
||||
<i class="fas <?= $icon_webstats ?>" title="<?= $title_webstats ?>"></i>
|
||||
</div>
|
||||
</div>
|
||||
<?php } ?>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<footer class="app-footer">
|
||||
<div class="container app-footer-inner">
|
||||
<p>
|
||||
<?php printf(ngettext("%d web domain", "%d web domains", $i), $i); ?>
|
||||
</p>
|
||||
</div>
|
||||
</footer>
|
||||
37
web/templates/pages/list_webapps.php
Normal file
37
web/templates/pages/list_webapps.php
Normal file
@@ -0,0 +1,37 @@
|
||||
<!-- Begin toolbar -->
|
||||
<div class="toolbar">
|
||||
<div class="toolbar-inner">
|
||||
<div class="toolbar-buttons">
|
||||
<a class="button button-secondary button-back js-button-back" href="/edit/web/?domain=<?= htmlentities($v_domain) ?>">
|
||||
<i class="fas fa-arrow-left icon-blue"></i><?= _("Back") ?>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- End toolbar -->
|
||||
|
||||
<div class="container">
|
||||
|
||||
<div class="form-container form-container-wide">
|
||||
<h1 class="u-mb20"><?= _("Quick Install App") ?></h1>
|
||||
<?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" ?>">
|
||||
<div class="card-thumb">
|
||||
<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) ?>">
|
||||
<?= _("Setup") ?>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
101
web/templates/pages/list_weblog.php
Normal file
101
web/templates/pages/list_weblog.php
Normal file
@@ -0,0 +1,101 @@
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<!-- Load necessary CSS and JavaScript from source -->
|
||||
<?php require "" . $_SERVER["HESTIA"] . "/web/templates/includes/title.php"; ?>
|
||||
<?php require "" . $_SERVER["HESTIA"] . "/web/templates/includes/css.php"; ?>
|
||||
<?php require "" . $_SERVER["HESTIA"] . "/web/templates/includes/js.php"; ?>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<header class="app-header">
|
||||
<div class="top-bar">
|
||||
<div class="container top-bar-inner">
|
||||
<div class="top-bar-left">
|
||||
<a href="/" class="top-bar-logo" title="<?= htmlentities($_SESSION['APP_NAME']);?>">
|
||||
<img src="<?php if ( !empty($_SESSION['LOGO_HEADER'])){ echo $_SESSION['LOGO_HEADER']; } else{ echo "/images/logo-header.svg"; } ?>" alt="<?= htmlentities($_SESSION['APP_NAME']);?>" width="54" height="29">
|
||||
</a>
|
||||
</div>
|
||||
<div class="top-bar-right">
|
||||
<nav x-data="{ open: false }" class="top-bar-menu">
|
||||
<button
|
||||
type="button"
|
||||
class="top-bar-menu-link u-hide-tablet"
|
||||
x-on:click="open = !open">
|
||||
<i class="fas fa-bars"></i>
|
||||
<span class="u-hidden" x-text="open ? '<?= _("Close menu") ?>' : '<?= _("Open menu") ?>'">
|
||||
<?= _("Open menu") ?>
|
||||
</span>
|
||||
</button>
|
||||
<div x-cloak x-show="open" x-on:click.outside="open = false" class="top-bar-menu-panel">
|
||||
<ul class="top-bar-menu-list">
|
||||
<li class="top-bar-menu-item">
|
||||
<a class="top-bar-menu-link" href="/list/web/" title="<?= _("Back") ?>">
|
||||
<i class="fas fa-circle-left"></i>
|
||||
<span class="top-bar-menu-link-label"><?= _("Back") ?></span>
|
||||
</a>
|
||||
</li>
|
||||
<li class="top-bar-menu-item">
|
||||
<a class="top-bar-menu-link <?php if ($_GET['type'] == 'access') echo 'active' ?>" href="/list/web-log/?domain=<?= htmlentities($_GET['domain']) ?>&type=access&token=<?= $_SESSION['token'] ?>" title="<?= _("Access Log") ?>">
|
||||
<i class="fas fa-eye"></i>
|
||||
<span class="top-bar-menu-link-label"><?= _("Access Log") ?></span>
|
||||
</a>
|
||||
</li>
|
||||
<li class="top-bar-menu-item">
|
||||
<a class="top-bar-menu-link <?php if ($_GET['type'] == 'access') echo 'active' ?>" href="/download/web-log/?domain=<?= htmlentities($_GET['domain']) ?>&type=access&&token=<?= $_SESSION['token'] ?>" title="<?= _("Download") ?>">
|
||||
<i class="fas fa-download"></i>
|
||||
<span class="u-hidden"><?= _("Download") ?></span>
|
||||
</a>
|
||||
</li>
|
||||
<li class="top-bar-menu-item">
|
||||
<a class="top-bar-menu-link <?php if ($_GET['type'] == 'error') echo 'active' ?>" href="/list/web-log/?domain=<?= htmlentities($_GET['domain']) ?>&type=error&token=<?= $_SESSION['token'] ?>" title="<?= _("Error Log") ?>">
|
||||
<i class="fas fa-circle-exclamation"></i>
|
||||
<span class="top-bar-menu-link-label"><?= _("Error Log") ?></span>
|
||||
</a>
|
||||
</li>
|
||||
<li class="top-bar-menu-item">
|
||||
<a class="top-bar-menu-link <?php if ($_GET['type'] == 'error') echo 'active' ?>" href="/download/web-log/?domain=<?= htmlentities($_GET['domain']) ?>&type=error&token=<?= $_SESSION['token'] ?>" title="<?= _("Download") ?>">
|
||||
<i class="fas fa-download"></i>
|
||||
<span class="u-hidden"><?= _("Download") ?></span>
|
||||
</a>
|
||||
</li>
|
||||
<li class="top-bar-menu-item">
|
||||
<a class="top-bar-menu-link" href="javascript:location.reload();" title="<?= _("Refresh") ?>">
|
||||
<i class="fas fa-arrow-rotate-right"></i>
|
||||
<span class="u-hidden"><?= _("Refresh") ?></span>
|
||||
</a>
|
||||
</li>
|
||||
<li class="top-bar-menu-item">
|
||||
<a class="top-bar-menu-link" href="/list/user/" title="<?= htmlentities($user) ?>">
|
||||
<i class="fas fa-circle-user"></i>
|
||||
<span class="u-hidden"><?= htmlentities($user) ?></span>
|
||||
</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") ?>">
|
||||
<i class="fas fa-right-from-bracket"></i>
|
||||
<span class="u-hidden"><?= _("Log out") ?></span>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</nav>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</header>
|
||||
|
||||
<a
|
||||
href="#top"
|
||||
class="button button-secondary button-circle button-floating button-floating-top"
|
||||
title="<?= _("Top") ?>"
|
||||
>
|
||||
<i class="fas fa-arrow-up"></i>
|
||||
<span class="u-hidden"><?= _("Top") ?></span>
|
||||
</a>
|
||||
|
||||
<p class="container u-text-center u-mt20 u-mb20">
|
||||
<?= sprintf(_("Last 70 lines of %s.%s.log"), htmlentities($_GET["domain"]), htmlentities($type)) ?>
|
||||
</p>
|
||||
<pre class="console-output u-pl30 u-pr30">
|
||||
25
web/templates/pages/login/login.php
Normal file
25
web/templates/pages/login/login.php
Normal file
@@ -0,0 +1,25 @@
|
||||
<div class="login">
|
||||
<a href="/" class="u-block u-mb40">
|
||||
<img src="/images/logo.svg" alt="<?= htmlentities($_SESSION["APP_NAME"]) ?>" width="100" height="120">
|
||||
</a>
|
||||
<form id="form_login" method="post" action="/login/">
|
||||
<input type="hidden" name="token" value="<?= $_SESSION["token"] ?>">
|
||||
<h1 class="login-title">
|
||||
<?= sprintf(_("Welcome to %s"), htmlentities($_SESSION["APP_NAME"])) ?>
|
||||
</h1>
|
||||
<?php if (!empty($error)) { ?>
|
||||
<p class="error"><?= $error ?></p>
|
||||
<?php } ?>
|
||||
<div class="u-mb20">
|
||||
<label for="username" class="form-label"><?= _("Username") ?></label>
|
||||
<input type="text" class="form-control" name="user" id="username" autocomplete="username" required autofocus>
|
||||
</div>
|
||||
<button type="submit" class="button">
|
||||
<i class="fas fa-right-to-bracket"></i><?= _("Next") ?>
|
||||
</button>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
||||
34
web/templates/pages/login/login_1.php
Normal file
34
web/templates/pages/login/login_1.php
Normal file
@@ -0,0 +1,34 @@
|
||||
<div class="login">
|
||||
<a href="/" class="u-block u-mb40">
|
||||
<img src="/images/logo.svg" alt="<?= htmlentities($_SESSION["APP_NAME"]) ?>" width="100" height="120">
|
||||
</a>
|
||||
<form id="form_login" method="post" action="/login/">
|
||||
<input type="hidden" name="token" value="<?= $_SESSION["token"] ?>">
|
||||
<h1 class="login-title">
|
||||
<?= _("Welcome") ?> <?= htmlspecialchars($_SESSION["login"]["username"]) ?>!
|
||||
</h1>
|
||||
<div class="u-mb20">
|
||||
<label for="password" class="form-label u-side-by-side">
|
||||
<?= _("Password") ?>
|
||||
<?php if ($_SESSION["POLICY_SYSTEM_PASSWORD_RESET"] !== "no") { ?>
|
||||
<a class="login-form-link" href="/reset/">
|
||||
<?= _("Forgot Password") ?>
|
||||
</a>
|
||||
<?php } ?>
|
||||
</label>
|
||||
<input type="password" class="form-control" name="password" id="password" autocomplete="current-password" required autofocus>
|
||||
</div>
|
||||
<div class="u-side-by-side">
|
||||
<button type="submit" class="button">
|
||||
<i class="fas fa-right-to-bracket"></i><?= _("Login") ?>
|
||||
</button>
|
||||
<a href="/login/?logout=true" class="button button-secondary">
|
||||
<?= _("Back") ?>
|
||||
</a>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
||||
35
web/templates/pages/login/login_2.php
Normal file
35
web/templates/pages/login/login_2.php
Normal file
@@ -0,0 +1,35 @@
|
||||
<div class="login">
|
||||
<a href="/" class="u-block u-mb40">
|
||||
<img src="/images/logo.svg" alt="<?= htmlentities($_SESSION["APP_NAME"]) ?>" width="100" height="120">
|
||||
</a>
|
||||
<form id="form_login" method="post" action="/login/">
|
||||
<input type="hidden" name="token" value="<?= $_SESSION["token"] ?>">
|
||||
<h1 class="login-title">
|
||||
<?= _("Two-factor Authentication") ?>
|
||||
</h1>
|
||||
<?php if (!empty($error)) { ?>
|
||||
<p class="error"><?= $error ?></p>
|
||||
<?php } ?>
|
||||
<div class="u-mb20">
|
||||
<label for="twofa" class="form-label u-side-by-side">
|
||||
<?= _("2FA Token") ?>
|
||||
<a class="login-form-link" href="/reset2fa/">
|
||||
<?= _("Forgot Token") ?>
|
||||
</a>
|
||||
</label>
|
||||
<input type="text" class="form-control" name="twofa" id="twofa" autocomplete="one-time-code" required autofocus>
|
||||
</div>
|
||||
<div class="u-side-by-side">
|
||||
<button type="submit" class="button">
|
||||
<i class="fas fa-right-to-bracket"></i><?= _("Login") ?>
|
||||
</button>
|
||||
<a href="/login/?logout" class="button button-secondary">
|
||||
<?= _("Back") ?>
|
||||
</a>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
||||
36
web/templates/pages/login/login_a.php
Normal file
36
web/templates/pages/login/login_a.php
Normal file
@@ -0,0 +1,36 @@
|
||||
<div class="login">
|
||||
<a href="/" class="u-block u-mb40">
|
||||
<img src="/images/logo.svg" alt="<?= htmlentities($_SESSION["APP_NAME"]) ?>" width="100" height="120">
|
||||
</a>
|
||||
<form id="form_login" method="post" action="/login/">
|
||||
<input type="hidden" name="token" value="<?= $_SESSION["token"] ?>">
|
||||
<h1 class="login-title">
|
||||
<?= sprintf(_("Welcome to %s"), htmlentities($_SESSION["APP_NAME"])) ?>
|
||||
</h1>
|
||||
<?php if (!empty($error)) { ?>
|
||||
<p class="error"><?= $error ?></p>
|
||||
<?php } ?>
|
||||
<div class="u-mb10">
|
||||
<label for="username" class="form-label"><?= _("Username") ?></label>
|
||||
<input type="text" class="form-control" name="user" id="username" autocomplete="username" required autofocus>
|
||||
</div>
|
||||
<div class="u-mb20">
|
||||
<label for="password" class="form-label u-side-by-side">
|
||||
<?= _("Password") ?>
|
||||
<?php if ($_SESSION["POLICY_SYSTEM_PASSWORD_RESET"] !== "no") { ?>
|
||||
<a class="login-form-link" href="/reset/">
|
||||
<?= _("Forgot Password") ?>
|
||||
</a>
|
||||
<?php } ?>
|
||||
</label>
|
||||
<input type="password" class="form-control" name="password" id="password" autocomplete="current-password" required>
|
||||
</div>
|
||||
<button type="submit" class="button">
|
||||
<i class="fas fa-right-to-bracket"></i><?= _("Next") ?>
|
||||
</button>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
||||
48
web/templates/pages/login/reset2fa.php
Normal file
48
web/templates/pages/login/reset2fa.php
Normal file
@@ -0,0 +1,48 @@
|
||||
<div class="login">
|
||||
<a href="/" class="u-block u-mb40">
|
||||
<img src="/images/logo.svg" alt="<?= htmlentities($_SESSION["APP_NAME"]) ?>" width="100" height="120">
|
||||
</a>
|
||||
<?php if ($success) { ?>
|
||||
<div>
|
||||
<h1 class="login-title">
|
||||
<?= _("Account Unlocked") ?>
|
||||
</h1>
|
||||
<div class="u-mt20">
|
||||
<p><?_("Two-factor authentication is now turned off for your account.<br><br>You may now proceed to log in.");?></p>
|
||||
<a href="/login/" class="button button-secondary">
|
||||
<?= _("Log in") ?>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<?php } else { ?>
|
||||
<form method="post" action="/reset2fa/">
|
||||
<input type="hidden" name="token" value="<?= $_SESSION["token"] ?>">
|
||||
<h1 class="login-title">
|
||||
<?= _("Unlock Account") ?>
|
||||
</h1>
|
||||
<?php if (!empty($error)) { ?>
|
||||
<p class="error"><?= $error ?></p>
|
||||
<?php } ?>
|
||||
<div class="u-mb10">
|
||||
<label for="user" class="form-label"><?= _("Username") ?></label>
|
||||
<input type="text" class="form-control" name="user" id="user" autocomplete="username" required autofocus>
|
||||
</div>
|
||||
<div class="u-mb20">
|
||||
<label for="twofa" class="form-label"><?= _("2FA Reset Code") ?></label>
|
||||
<input type="text" class="form-control" name="twofa" id="twofa" autocomplete="off" required>
|
||||
</div>
|
||||
<div class="u-side-by-side">
|
||||
<button type="submit" class="button">
|
||||
<?= _("Submit") ?>
|
||||
</button>
|
||||
<a href="/login/?logout" class="button button-secondary">
|
||||
<?= _("Back") ?>
|
||||
</a>
|
||||
</div>
|
||||
</form>
|
||||
<?php } ?>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
||||
34
web/templates/pages/login/reset_1.php
Normal file
34
web/templates/pages/login/reset_1.php
Normal file
@@ -0,0 +1,34 @@
|
||||
<div class="login">
|
||||
<a href="/" class="u-block u-mb40">
|
||||
<img src="/images/logo.svg" alt="<?= htmlentities($_SESSION["APP_NAME"]) ?>" width="100" height="120">
|
||||
</a>
|
||||
<form method="post" action="/reset/">
|
||||
<input type="hidden" name="token" value="<?= $_SESSION["token"] ?>">
|
||||
<h1 class="login-title">
|
||||
<?= _("Forgot Password") ?>
|
||||
</h1>
|
||||
<?php if (!empty($error)) { ?>
|
||||
<p class="error"><?= $error ?></p>
|
||||
<?php } ?>
|
||||
<div class="u-mb10">
|
||||
<label for="username" class="form-label"><?= _("Username") ?></label>
|
||||
<input type="text" class="form-control" name="user" id="username" autocomplete="username" required autofocus>
|
||||
</div>
|
||||
<div class="u-mb20">
|
||||
<label for="email" class="form-label"><?= _("Email") ?></label>
|
||||
<input type="email" class="form-control" name="email" id="email" autocomplete="email" required>
|
||||
</div>
|
||||
<div class="u-side-by-side">
|
||||
<button type="submit" class="button">
|
||||
<?= _("Submit") ?>
|
||||
</button>
|
||||
<a href="/login/?logout" class="button button-secondary">
|
||||
<?= _("Back") ?>
|
||||
</a>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
||||
35
web/templates/pages/login/reset_2.php
Normal file
35
web/templates/pages/login/reset_2.php
Normal file
@@ -0,0 +1,35 @@
|
||||
<div class="login">
|
||||
<a href="/" class="u-block u-mb40">
|
||||
<img src="/images/logo.svg" alt="<?= htmlentities($_SESSION["APP_NAME"]) ?>" width="100" height="120">
|
||||
</a>
|
||||
<form method="get" action="/reset/">
|
||||
<h1 class="login-title">
|
||||
<?= _("Forgot Password") ?>
|
||||
</h1>
|
||||
<?php if (!empty($error)) { ?>
|
||||
<p class="error"><?= $error ?></p>
|
||||
<?php } ?>
|
||||
<p class="inline-success u-mb10">
|
||||
<?= _("Password reset code has been sent to your email address") ?>
|
||||
</p>
|
||||
<div class="u-mb20">
|
||||
<input type="hidden" name="action" value="confirm">
|
||||
<input type="hidden" name="token" value="<?= htmlentities($_SESSION["token"]) ?>">
|
||||
<input type="hidden" name="user" value="<?= htmlentities($_GET["user"]) ?>">
|
||||
<label for="code" class="form-label"><?= _("Reset Code") ?></label>
|
||||
<input type="text" class="form-control" name="code" id="code" required autofocus>
|
||||
</div>
|
||||
<div class="u-side-by-side">
|
||||
<button type="submit" class="button">
|
||||
<?= _("Confirm") ?>
|
||||
</button>
|
||||
<a href="/reset/" class="button button-secondary">
|
||||
<?= _("Back") ?>
|
||||
</a>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
||||
37
web/templates/pages/login/reset_3.php
Normal file
37
web/templates/pages/login/reset_3.php
Normal file
@@ -0,0 +1,37 @@
|
||||
<div class="login">
|
||||
<a href="/" class="u-block u-mb40">
|
||||
<img src="/images/logo.svg" alt="<?= htmlentities($_SESSION["APP_NAME"]) ?>" width="100" height="120">
|
||||
</a>
|
||||
<form method="post">
|
||||
<h1 class="login-title">
|
||||
<?= _("Forgot Password") ?>
|
||||
</h1>
|
||||
<?php if (!empty($error)) { ?>
|
||||
<p class="error"><?= $error ?></p>
|
||||
<?php } ?>
|
||||
<div class="u-mb10">
|
||||
<input type="hidden" name="action" value="confirm">
|
||||
<input type="hidden" name="token" value="<?= htmlentities($_SESSION["token"]) ?>">
|
||||
<input type="hidden" name="user" value="<?= htmlentities($_GET["user"]) ?>">
|
||||
<input type="hidden" name="code" value="<?= htmlentities($_GET["code"]) ?>">
|
||||
<label for="password" class="form-label"><?= _("New Password") ?></label>
|
||||
<input type="password" class="form-control" name="password" id="password" autocomplete="new-password" required autofocus>
|
||||
</div>
|
||||
<div class="u-mb20">
|
||||
<label for="password_confirm" class="form-label"><?= _("Confirm Password") ?></label>
|
||||
<input type="password" class="form-control" name="password_confirm" id="password_confirm" autocomplete="new-password" required>
|
||||
</div>
|
||||
<div class="u-side-by-side">
|
||||
<button type="submit" class="button">
|
||||
<?= _("Reset") ?>
|
||||
</button>
|
||||
<a href="/login/" class="button button-secondary">
|
||||
<?= _("Back") ?>
|
||||
</a>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
||||
125
web/templates/pages/setup_webapp.php
Normal file
125
web/templates/pages/setup_webapp.php
Normal file
@@ -0,0 +1,125 @@
|
||||
<!-- Begin toolbar -->
|
||||
<div class="toolbar">
|
||||
<div class="toolbar-inner">
|
||||
<div class="toolbar-buttons">
|
||||
<a class="button button-secondary button-back js-button-back" href="/add/webapp/?domain=<?= htmlentities($v_domain) ?>">
|
||||
<i class="fas fa-arrow-left icon-blue"></i><?= _("Back") ?>
|
||||
</a>
|
||||
</div>
|
||||
<div class="toolbar-buttons">
|
||||
<button type="submit" class="button" form="main-form">
|
||||
<i class="fas fa-floppy-disk icon-purple"></i><?= _("Save") ?>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- End toolbar -->
|
||||
|
||||
<!-- Begin form -->
|
||||
<div class="container">
|
||||
|
||||
<?php if (!empty($WebappInstaller->getOptions())) { ?>
|
||||
<form id="main-form" method="POST" name="v_setup_webapp">
|
||||
<input type="hidden" name="token" value="<?= $_SESSION["token"] ?>">
|
||||
<input type="hidden" name="ok" value="true">
|
||||
|
||||
<div class="form-container">
|
||||
<h1 class="u-mb20"><?= sprintf(_("Install %s"), $WebappInstaller->info()["name"]) ?></h1>
|
||||
<?php show_alert_message($_SESSION); ?>
|
||||
<?php if (!$WebappInstaller->isDomainRootClean()) { ?>
|
||||
<div class="alert alert-info" role="alert">
|
||||
<i class="fas fa-info"></i>
|
||||
<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>
|
||||
</div>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<?php foreach ($WebappInstaller->getOptions() as $form_name => $form_control) {
|
||||
$field_name = $WebappInstaller->formNs() . "_" . $form_name;
|
||||
$field_type = $form_control;
|
||||
$field_value = "";
|
||||
$field_label =
|
||||
isset($form_control["label"])
|
||||
? htmlentities($form_control["label"])
|
||||
: ucwords(str_replace([".","_"], " ", $form_name));
|
||||
$field_placeholder = "";
|
||||
if (is_array($form_control)) {
|
||||
$field_type = !empty($form_control["type"]) ? $form_control["type"] : "text";
|
||||
$field_value = !empty($form_control["value"]) ? $form_control["value"] : "";
|
||||
$field_placeholder = !empty($form_control["placeholder"]) ? $form_control["placeholder"] : "";
|
||||
}
|
||||
$field_value = htmlentities($field_value);
|
||||
$field_label = htmlentities($field_label);
|
||||
$field_name = htmlentities($field_name);
|
||||
$field_placeholder = htmlentities($field_placeholder);
|
||||
?>
|
||||
<div class="u-mb10">
|
||||
<?php if ($field_type != "boolean"): ?>
|
||||
<label for="<?= $field_name ?>" class="form-label">
|
||||
<?= $field_label ?>
|
||||
<?php if ($field_type == "password"): ?>
|
||||
<button type="button" title="<?= _("Generate") ?>" class="u-unstyled-button u-ml5 js-generate-password">
|
||||
<i class="fas fa-arrows-rotate icon-green"></i>
|
||||
</button>
|
||||
<?php endif; ?>
|
||||
</label>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($field_type == "select" && count($form_control["options"])): ?>
|
||||
<select class="form-select" name="<?= $field_name ?>" id="<?= $field_name ?>">
|
||||
<?php foreach ($form_control["options"] as $key => $option):
|
||||
$key = !is_numeric($key) ? $key : $option;
|
||||
$selected = !empty($form_control["value"] && $key == $form_control["value"]) ? "selected" : ""; ?>
|
||||
<option value="<?= $key ?>" <?= $selected ?>>
|
||||
<?= htmlentities($option) ?>
|
||||
</option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
<?php elseif ($field_type == "boolean"):
|
||||
$checked = !empty($field_value) ? "checked" : ""; ?>
|
||||
<div class="form-check">
|
||||
<input
|
||||
class="form-check-input"
|
||||
type="checkbox"
|
||||
name="<?= $field_name ?>"
|
||||
id="<?= $field_name ?>"
|
||||
value="true"
|
||||
<?= $checked ?>
|
||||
>
|
||||
<label for="<?= $field_name ?>">
|
||||
<?= $field_label ?>
|
||||
</label>
|
||||
</div>
|
||||
<?php else: ?>
|
||||
<?php if ($field_type == "password"): ?>
|
||||
<div class="u-pos-relative">
|
||||
<input
|
||||
type="text"
|
||||
class="form-control js-password-input"
|
||||
name="<?= $field_name ?>"
|
||||
id="<?= $field_name ?>"
|
||||
placeholder="<?= $field_placeholder ?>"
|
||||
>
|
||||
<div class="password-meter">
|
||||
<meter max="4" class="password-meter-input js-password-meter"></meter>
|
||||
</div>
|
||||
</div>
|
||||
<?php else: ?>
|
||||
<input
|
||||
type="text"
|
||||
class="form-control"
|
||||
name="<?= $field_name ?>"
|
||||
id="<?= $field_name ?>"
|
||||
placeholder="<?= $field_placeholder ?>"
|
||||
>
|
||||
<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<?php } ?>
|
||||
</div>
|
||||
</form>
|
||||
<?php } ?>
|
||||
</div>
|
||||
<!-- End form -->
|
||||
Reference in New Issue
Block a user