disable required on some values, make readback of configured values

This commit is contained in:
dg9vh 2016-07-15 10:20:19 +00:00
parent 050105500a
commit 0f51be1ce7

View file

@ -1,5 +1,5 @@
<?php <?php
include "config/config.php";
include "include/tools.php"; include "include/tools.php";
?> ?>
<!doctype html> <!doctype html>
@ -54,23 +54,23 @@ include "include/tools.php";
<h2>MMDVMHost-Configuration</h2> <h2>MMDVMHost-Configuration</h2>
<div class="input-group"> <div class="input-group">
<span class="input-group-addon" id="MMDVMLOGPATH" style="width: 300px">Path to MMDVMHost-logfile</span> <span class="input-group-addon" id="MMDVMLOGPATH" style="width: 300px">Path to MMDVMHost-logfile</span>
<input type="text" name="MMDVMLOGPATH" class="form-control" placeholder="/var/log/mmdvm/" aria-describedby="MMDVMLOGPATH" required data-fv-notempty-message="Value is required"> <input type="text" value="<?php echo constant("MMDVMLOGPATH") ?>" name="MMDVMLOGPATH" class="form-control" placeholder="/var/log/mmdvm/" aria-describedby="MMDVMLOGPATH" required data-fv-notempty-message="Value is required">
</div> </div>
<div class="input-group"> <div class="input-group">
<span class="input-group-addon" id="MMDVMLOGPREFIX" style="width: 300px">Logfile-prefix</span> <span class="input-group-addon" id="MMDVMLOGPREFIX" style="width: 300px">Logfile-prefix</span>
<input type="text" name="MMDVMLOGPREFIX" class="form-control" placeholder="MMDVM" aria-describedby="MMDVMLOGPREFIX" required data-fv-notempty-message="Value is required"> <input type="text" value="<?php echo constant("MMDVMLOGPREFIX") ?>" name="MMDVMLOGPREFIX" class="form-control" placeholder="MMDVM" aria-describedby="MMDVMLOGPREFIX" required data-fv-notempty-message="Value is required">
</div> </div>
<div class="input-group"> <div class="input-group">
<span class="input-group-addon" id="MMDVMINIPATH" style="width: 300px">Path to MMDVM.ini</span> <span class="input-group-addon" id="MMDVMINIPATH" style="width: 300px">Path to MMDVM.ini</span>
<input type="text" name="MMDVMINIPATH" class="form-control" placeholder="/etc/mmdvm/" aria-describedby="MMDVMINIPATH" required data-fv-notempty-message="Value is required"> <input type="text" value="<?php echo constant("MMDVMINIPATH") ?>" name="MMDVMINIPATH" class="form-control" placeholder="/etc/mmdvm/" aria-describedby="MMDVMINIPATH" required data-fv-notempty-message="Value is required">
</div> </div>
<div class="input-group"> <div class="input-group">
<span class="input-group-addon" id="MMDVMINIFILENAME" style="width: 300px">MMDVM.ini-filename</span> <span class="input-group-addon" id="MMDVMINIFILENAME" style="width: 300px">MMDVM.ini-filename</span>
<input type="text" name="MMDVMINIFILENAME" class="form-control" placeholder="MMDVM.ini" aria-describedby="MMDVMINIFILENAME" required data-fv-notempty-message="Value is required"> <input type="text" value="<?php echo constant("MMDVMINIFILENAME") ?>" name="MMDVMINIFILENAME" class="form-control" placeholder="MMDVM.ini" aria-describedby="MMDVMINIFILENAME" required data-fv-notempty-message="Value is required">
</div> </div>
<div class="input-group"> <div class="input-group">
<span class="input-group-addon" id="MMDVMHOSTPATH" style="width: 300px">Path to MMDVMHost-executable</span> <span class="input-group-addon" id="MMDVMHOSTPATH" style="width: 300px">Path to MMDVMHost-executable</span>
<input type="text" name="MMDVMHOSTPATH" class="form-control" placeholder="/usr/local/bin/" aria-describedby="MMDVMHOSTPATH" required data-fv-notempty-message="Value is required"> <input type="text" value="<?php echo constant("MMDVMHOSTPATH") ?>" name="MMDVMHOSTPATH" class="form-control" placeholder="/usr/local/bin/" aria-describedby="MMDVMHOSTPATH" required data-fv-notempty-message="Value is required">
</div> </div>
</div> </div>
<div class="container"> <div class="container">
@ -78,73 +78,69 @@ include "include/tools.php";
<div class="input-group"> <div class="input-group">
<span class="input-group-addon" id="ENABLEYSFGATEWAY" style="width: 300px">Enable YSFGateway</span> <span class="input-group-addon" id="ENABLEYSFGATEWAY" style="width: 300px">Enable YSFGateway</span>
<div class="panel-body"><input type="checkbox" name="ENABLEYSFGATEWAY"></div> <div class="panel-body"><input type="checkbox" name="ENABLEYSFGATEWAY" <?php if (constant("ENABLEYSFGATEWAY")) echo "checked" ?>></div>
</div> </div>
<div class="input-group"> <div class="input-group">
<span class="input-group-addon" id="YSFGATEWAYLOGPATH" style="width: 300px">Path to YSFGateway-logfile</span> <span class="input-group-addon" id="YSFGATEWAYLOGPATH" style="width: 300px">Path to YSFGateway-logfile</span>
<input type="text" name="YSFGATEWAYLOGPATH" class="form-control" placeholder="/var/log/YSFGateway/" aria-describedby="YSFGATEWAYLOGPATH" required data-fv-notempty-message="Value is required"> <input type="text" value="<?php echo constant("YSFGATEWAYLOGPATH") ?>" name="YSFGATEWAYLOGPATH" class="form-control" placeholder="/var/log/YSFGateway/" aria-describedby="YSFGATEWAYLOGPATH">
</div> </div>
<div class="input-group"> <div class="input-group">
<span class="input-group-addon" id="YSFGATEWAYLOGPREFIX" style="width: 300px">Logfile-prefix</span> <span class="input-group-addon" id="YSFGATEWAYLOGPREFIX" style="width: 300px">Logfile-prefix</span>
<input type="text" name="YSFGATEWAYLOGPREFIX" class="form-control" placeholder="YSFGateway" aria-describedby="YSFGATEWAYLOGPREFIX" required data-fv-notempty-message="Value is required"> <input type="text" value="<?php echo constant("YSFGATEWAYLOGPREFIX") ?>" name="YSFGATEWAYLOGPREFIX" class="form-control" placeholder="YSFGateway" aria-describedby="YSFGATEWAYLOGPREFIX">
</div> </div>
<div class="input-group"> <div class="input-group">
<span class="input-group-addon" id="YSFGATEWAYINIPATH" style="width: 300px">Path to YSFGateway.ini</span> <span class="input-group-addon" id="YSFGATEWAYINIPATH" style="width: 300px">Path to YSFGateway.ini</span>
<input type="text" name="YSFGATEWAYINIPATH" class="form-control" placeholder="/etc/YSFGateway/" aria-describedby="YSFGATEWAYINIPATH" required data-fv-notempty-message="Value is required"> <input type="text" value="<?php echo constant("YSFGATEWAYINIPATH") ?>" name="YSFGATEWAYINIPATH" class="form-control" placeholder="/etc/YSFGateway/" aria-describedby="YSFGATEWAYINIPATH">
</div> </div>
<div class="input-group"> <div class="input-group">
<span class="input-group-addon" id="YSFGATEWAYINIFILENAME" style="width: 300px">YSFGateway.ini-filename</span> <span class="input-group-addon" id="YSFGATEWAYINIFILENAME" style="width: 300px">YSFGateway.ini-filename</span>
<input type="text" name="YSFGATEWAYINIFILENAME" class="form-control" placeholder="YSFGateway.ini" aria-describedby="YSFGATEWAYINIFILENAME" required data-fv-notempty-message="Value is required"> <input type="text" value="<?php echo constant("YSFGATEWAYINIFILENAME") ?>" name="YSFGATEWAYINIFILENAME" class="form-control" placeholder="YSFGateway.ini" aria-describedby="YSFGATEWAYINIFILENAME">
</div> </div>
</div> </div>
<div class="container"> <div class="container">
<h2>ircddbgateway-Configuration</h2> <h2>ircddbgateway-Configuration</h2>
<div class="input-group"> <div class="input-group">
<span class="input-group-addon" id="LINKLOGPATH" style="width: 300px">Path to Links.log</span> <span class="input-group-addon" id="LINKLOGPATH" style="width: 300px">Path to Links.log</span>
<input type="text" name="LINKLOGPATH" class="form-control" placeholder="/var/log/" aria-describedby="LINKLOGPATH" required data-fv-notempty-message="Value is required"> <input type="text" value="<?php echo constant("LINKLOGPATH") ?>" name="LINKLOGPATH" class="form-control" placeholder="/var/log/" aria-describedby="LINKLOGPATH">
</div> </div>
<div class="input-group"> <div class="input-group">
<span class="input-group-addon" id="IRCDDBGATEWAY" style="width: 300px">Name of ircddbgateway-executeable</span> <span class="input-group-addon" id="IRCDDBGATEWAY" style="width: 300px">Name of ircddbgateway-executeable</span>
<input type="text" name="IRCDDBGATEWAY" class="form-control" placeholder="ircddbgatewayd" aria-describedby="IRCDDBGATEWAY" required data-fv-notempty-message="Value is required"> <input type="text" value="<?php echo constant("IRCDDBGATEWAY") ?>" name="IRCDDBGATEWAY" class="form-control" placeholder="ircddbgatewayd" aria-describedby="IRCDDBGATEWAY">
</div> </div>
</div> </div>
<div class="container"> <div class="container">
<h2>Global Configuration</h2> <h2>Global Configuration</h2>
<div class="input-group"> <div class="input-group">
<span class="input-group-addon" id="REFRESHAFTER" style="width: 300px">Refresh page after in seconds</span> <span class="input-group-addon" id="REFRESHAFTER" style="width: 300px">Refresh page after in seconds</span>
<input type="text" name="REFRESHAFTER" class="form-control" placeholder="60" aria-describedby="REFRESHAFTER" required data-fv-notempty-message="Value is required"> <input type="text" value="<?php echo constant("REFRESHAFTER") ?>" name="REFRESHAFTER" class="form-control" placeholder="60" aria-describedby="REFRESHAFTER" required data-fv-notempty-message="Value is required">
</div> </div>
<div class="input-group"> <div class="input-group">
<span class="input-group-addon" id="SHOWPROGRESSBARS" style="width: 300px">Show progressbars</span> <span class="input-group-addon" id="SHOWPROGRESSBARS" style="width: 300px">Show progressbars</span>
<div class="panel-body"><input type="checkbox" name="SHOWPROGRESSBARS"></div> <div class="panel-body"><input type="checkbox" name="SHOWPROGRESSBARS" <?php if (constant("SHOWPROGRESSBARS")) echo "checked" ?>></div>
</div> </div>
<div class="input-group"> <div class="input-group">
<span class="input-group-addon" id="TEMPERATUREALERT" style="width: 300px">Enable CPU-temperature-warning</span> <span class="input-group-addon" id="TEMPERATUREALERT" style="width: 300px">Enable CPU-temperature-warning</span>
<div class="panel-body"><input type="checkbox" name="TEMPERATUREALERT"></div> <div class="panel-body"><input type="checkbox" name="TEMPERATUREALERT" <?php if (constant("TEMPERATUREALERT")) echo "checked" ?>></div>
</div> </div>
<div class="input-group"> <div class="input-group">
<span class="input-group-addon" id="TEMPERATUREHIGHLEVEL" style="width: 300px">Warning temperature</span> <span class="input-group-addon" id="TEMPERATUREHIGHLEVEL" style="width: 300px">Warning temperature</span>
<input type="text" name="TEMPERATUREHIGHLEVEL" class="form-control" placeholder="60" aria-describedby="TEMPERATUREHIGHLEVEL" required data-fv-notempty-message="Value is required"> <input type="text" value="<?php echo constant("TEMPERATUREHIGHLEVEL") ?>" name="TEMPERATUREHIGHLEVEL" class="form-control" placeholder="60" aria-describedby="TEMPERATUREHIGHLEVEL" required data-fv-notempty-message="Value is required">
</div><!-- </div>
<div class="input-group">
<span class="input-group-addon" id="LHLINES" style="width: 300px">Last heard list lines:</span>
<input type="text" name="LHLINES" class="form-control" placeholder="20" aria-describedby="LHLINES" required data-fv-notempty-message="Value is required">
</div>-->
<div class="input-group"> <div class="input-group">
<span class="input-group-addon" id="ENABLEMANAGEMENT" style="width: 300px">Enable Management-Functions below</span> <span class="input-group-addon" id="ENABLEMANAGEMENT" style="width: 300px">Enable Management-Functions below</span>
<div class="panel-body"><input type="checkbox" name="ENABLEMANAGEMENT"></div> <div class="panel-body"><input type="checkbox" name="ENABLEMANAGEMENT" <?php if (constant("ENABLEMANAGEMENT")) echo "checked" ?>></div>
</div> </div>
<div class="input-group"> <div class="input-group">
<span class="input-group-addon" id="REBOOTMMDVM" style="width: 300px">Reboot MMDVMHost command:</span> <span class="input-group-addon" id="REBOOTMMDVM" style="width: 300px">Reboot MMDVMHost command:</span>
<input type="text" name="REBOOTMMDVM" class="form-control" placeholder="sudo systemctl restart mmdvmhost.service" aria-describedby="REBOOTMMDVM"> <input type="text" value="<?php echo constant("REBOOTMMDVM") ?>" name="REBOOTMMDVM" class="form-control" placeholder="sudo systemctl restart mmdvmhost.service" aria-describedby="REBOOTMMDVM">
</div> </div>
<div class="input-group"> <div class="input-group">
<span class="input-group-addon" id="REBOOTSYS" style="width: 300px">Reboot system command:</span> <span class="input-group-addon" id="REBOOTSYS" style="width: 300px">Reboot system command:</span>
<input type="text" name="REBOOTSYS" class="form-control" placeholder="sudo reboot" aria-describedby="REBOOTSYS"> <input type="text" value="<?php echo constant("REBOOTSYS") ?>" name="REBOOTSYS" class="form-control" placeholder="sudo reboot" aria-describedby="REBOOTSYS">
</div> </div>
<div class="input-group"> <div class="input-group">
<span class="input-group-addon" id="HALTSYS" style="width: 300px">Halt system command:</span> <span class="input-group-addon" id="HALTSYS" style="width: 300px">Halt system command:</span>
<input type="text" name="HALTSYS" class="form-control" placeholder="sudo halt" aria-describedby="HALTSYS"> <input type="text" value="<?php echo constant("HALTSYS") ?>" name="HALTSYS" class="form-control" placeholder="sudo halt" aria-describedby="HALTSYS">
</div> </div>
<div class="input-group"> <div class="input-group">
<span class="input-group-btn"> <span class="input-group-btn">