Making an easy way to enable/disable info-sections without needing to change index.php

This commit is contained in:
CT2JAY 2017-02-28 19:29:44 +00:00
parent 0f21b3cacc
commit 7d8fdc296b
2 changed files with 55 additions and 19 deletions

View file

@ -68,11 +68,11 @@ include "version.php";
$logourl = DMRPLUSLOGO;
}
}
if ($logourl == "") {
$logourl = LOGO;
}
if ($logourl !== "") {
?>
<div id="Logo" style="position:absolute;top:-43px;right:10px;"><img src="<?php echo $logourl ?>" width="250px" style="width:250px; border-radius:10px;box-shadow:2px 2px 2px #808080; padding:1px;background:#FFFFFF;border:1px solid #808080;" border="0" hspace="10" vspace="10" align="absmiddle"></div>
@ -99,18 +99,30 @@ checkSetup();
// Here you can feel free to disable info-sections by commenting out with // before include
include "include/txinfo.php";
showLapTime("txinfo");
include "include/sysinfo_ajax.php";
showLapTime("sysinfo");
include "include/disk.php";
showLapTime("disk");
include "include/repeaterinfo.php";
showLapTime("repeaterinfo");
include "include/modes.php";
showLapTime("modes");
include "include/lh_ajax.php";
showLapTime("lh_ajax");
include "include/localtx_ajax.php";
showLapTime("localtx_ajax");
if (defined("SHOWCPU")) {
include "include/sysinfo_ajax.php";
showLapTime("sysinfo");
}
if (defined("SHOWDISK")) {
include "include/disk.php";
showLapTime("disk");
}
if (defined("SHOWRPTINFO")) {
include "include/repeaterinfo.php";
showLapTime("repeaterinfo");
}
if (defined("SHOWMODES")) {
include "include/modes.php";
showLapTime("modes");
}
if (defined("SHOWLH")) {
include "include/lh_ajax.php";
showLapTime("lh_ajax");
}
if (defined("SHOWLOCALTX")) {
include "include/localtx_ajax.php";
showLapTime("localtx_ajax");
}
if (defined("ENABLEYSFGATEWAY")) {
include "include/ysfgatewayinfo.php";
showLapTime("ysfgatewayinfo");

View file

@ -74,6 +74,10 @@ include "include/tools.php";
<span class="input-group-addon" id="ENABLEXTDLOOKUP" style="width: 300px">Enable extended lookup (show names)</span>
<div class="panel-body"><input type="checkbox" name="ENABLEXTDLOOKUP" <?php if (defined("ENABLEXTDLOOKUP")) echo "checked" ?>></div>
</div>
<div class="input-group">
<span class="input-group-addon" id="TALKERALIAS" style="width: 300px">Show Talker Alias</span>
<div class="panel-body"><input type="checkbox" name="TALKERALIAS" <?php if (defined("TALKERALIAS")) echo "checked" ?>></div>
</div>
<div class="input-group">
<span class="input-group-addon" id="DMRIDDATPATH" style="width: 300px">Path to DMR-ID-Database-File (including filename)</span>
<input type="text" value="<?php echo constant("DMRIDDATPATH") ?>" name="DMRIDDATPATH" class="form-control" placeholder="/var/mmdvm/DMRIDs.dat" aria-describedby="DMRIDDATPATH">
@ -197,6 +201,30 @@ get_tz_options(constant("TIMEZONE"), "Timezone", '');
<span class="input-group-addon" id="REFRESHAFTER" style="width: 300px">Refresh page after in seconds</span>
<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 class="input-group">
<span class="input-group-addon" id="SHOWCPU" style="width: 300px">Show System Info</span>
<div class="panel-body"><input type="checkbox" name="SHOWCPU" <?php if (defined("SHOWCPU")) echo "checked" ?>></div>
</div>
<div class="input-group">
<span class="input-group-addon" id="SHOWDISK" style="width: 300px">Show Disk Use</span>
<div class="panel-body"><input type="checkbox" name="SHOWDISK" <?php if (defined("SHOWDISK")) echo "checked" ?>></div>
</div>
<div class="input-group">
<span class="input-group-addon" id="SHOWRPTINFO" style="width: 300px">Show Repeater Info</span>
<div class="panel-body"><input type="checkbox" name="SHOWRPTINFO" <?php if (defined("SHOWRPTINFO")) echo "checked" ?>></div>
</div>
<div class="input-group">
<span class="input-group-addon" id="SHOWMODES" style="width: 300px">Show Enabled Modes</span>
<div class="panel-body"><input type="checkbox" name="SHOWMODES" <?php if (defined("SHOWMODES")) echo "checked" ?>></div>
</div>
<div class="input-group">
<span class="input-group-addon" id="SHOWLH" style="width: 300px">Show Last Heard List of today's</span>
<div class="panel-body"><input type="checkbox" name="SHOWLH" <?php if (defined("SHOWLH")) echo "checked" ?>></div>
</div>
<div class="input-group">
<span class="input-group-addon" id="SHOWLOCALTX" style="width: 300px">Show Today's local transmissions</span>
<div class="panel-body"><input type="checkbox" name="SHOWLOCALTX" <?php if (defined("SHOWLOCALTX")) echo "checked" ?>></div>
</div>
<div class="input-group">
<span class="input-group-addon" id="SHOWPROGRESSBARS" style="width: 300px">Show progressbars</span>
<div class="panel-body"><input type="checkbox" name="SHOWPROGRESSBARS" <?php if (defined("SHOWPROGRESSBARS")) echo "checked" ?>></div>
@ -221,7 +249,7 @@ get_tz_options(constant("TIMEZONE"), "Timezone", '');
<span class="input-group-addon" id="SWITCHNETWORKPW" style="width: 300px">Password for switching networks:</span>
<input type="text" value="<?php echo constant("SWITCHNETWORKPW") ?>" name="SWITCHNETWORKPW" class="form-control" placeholder="password" aria-describedby="SWITCHNETWORKPW">
</div>
<div class="input-group">
<span class="input-group-addon" id="ENABLEMANAGEMENT" style="width: 300px">Enable Management-Functions below</span>
<div class="panel-body"><input type="checkbox" name="ENABLEMANAGEMENT" <?php if (constant("ENABLEMANAGEMENT")) echo "checked" ?>></div>
@ -295,10 +323,6 @@ get_tz_options(constant("TIMEZONE"), "Timezone", '');
</select>
</div>
</div>
<div class="input-group">
<span class="input-group-addon" id="TALKERALIAS" style="width: 300px">Show Talker Alias</span>
<div class="panel-body"><input type="checkbox" name="TALKERALIAS" <?php if (defined("TALKERALIAS")) echo "checked" ?>></div>
</div>
<div class="input-group">
<span class="input-group-btn">
<button class="btn btn-default" type="submit" form="config">Save configuration</button>