Incorporate changes for 1.2.0
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
/*
|
||||
config.php
|
||||
OpenDRS Online Discrepancy Reporting System
|
||||
Copyright (C) 2020 Rod Wright
|
||||
Copyright (C) 2021 Rod Wright
|
||||
|
||||
SPDX-License-Identifier: GPL-2.0
|
||||
*/
|
||||
@@ -45,7 +45,17 @@ $update_display=$incoming['update_display'];
|
||||
$display_appname=$incoming['display_appname'];
|
||||
$display_banner=$incoming['display_banner'];
|
||||
$display_footer=$incoming['display_footer'];
|
||||
$display_pereffhlp=$incoming['display_pereffhlp'];
|
||||
$display_funchelp=$incoming['display_funchelp'];
|
||||
$display_device_term=$incoming['display_device_term'];
|
||||
$display_discovered_term=$incoming['display_discovered_term'];
|
||||
$display_discovered_term_short=$incoming['display_discovered_term_short'];
|
||||
$display_disc_drop_data=$incoming['display_disc_drop_data'];
|
||||
$display_functional_term=$incoming['display_functional_term'];
|
||||
$display_functional_term_short=$incoming['display_functional_term_short'];
|
||||
$display_functional_yes=$incoming['display_functional_yes'];
|
||||
$display_functional_no=$incoming['display_functional_no'];
|
||||
$display_functional_yes_short=$incoming['display_functional_yes_short'];
|
||||
$display_functional_no_short=$incoming['display_functional_no_short'];
|
||||
|
||||
$update_colors=$incoming['update_colors'];
|
||||
$reset_colors=$incoming['reset_colors'];
|
||||
@@ -81,7 +91,9 @@ if ($print=="Printer Friendly") {
|
||||
|
||||
framework("begin","$appname","Configuration",$print);
|
||||
|
||||
//echo "_REQUEST array <br>";
|
||||
//var_dump($_REQUEST);
|
||||
//echo "<br><hr> incoming array <br>";
|
||||
//var_dump($incoming);
|
||||
|
||||
// ******** begin database manipulation ********
|
||||
@@ -92,14 +104,52 @@ if ($update_display) {
|
||||
// remove html tags from app name and sanitize
|
||||
$display_appname=strip_tags($display_appname);
|
||||
$clean_display_appname=mysqli_real_escape_string($drs_db,$display_appname);
|
||||
// remove html tags from period effective help text and sanitize
|
||||
$display_pereffhlp=strip_tags($display_pereffhlp);
|
||||
$clean_display_pereffhlp=mysqli_real_escape_string($drs_db,$display_pereffhlp);
|
||||
// remove html tags from functional help text and sanitize
|
||||
$display_funchelp=strip_tags($display_funchelp);
|
||||
$clean_display_funchelp=mysqli_real_escape_string($drs_db,$display_funchelp);
|
||||
// remove html tags from device term and sanitize
|
||||
$display_device_term=strip_tags($display_device_term);
|
||||
$clean_display_device_term=mysqli_real_escape_string($drs_db,$display_device_term);
|
||||
// remove html tags from discovered term and sanitize
|
||||
$display_discovered_term=strip_tags($display_discovered_term);
|
||||
$clean_display_discovered_term=mysqli_real_escape_string($drs_db,$display_discovered_term);
|
||||
// remove html tags from short discovered term and sanitize
|
||||
$display_discovered_term_short=strip_tags($display_discovered_term_short);
|
||||
$clean_display_discovered_term_short=mysqli_real_escape_string($drs_db,$display_discovered_term_short);
|
||||
// remove html tags from functional term and sanitize
|
||||
$display_functional_term=strip_tags($display_functional_term);
|
||||
$clean_display_functional_term=mysqli_real_escape_string($drs_db,$display_functional_term);
|
||||
// remove html tags from short functional term and sanitize
|
||||
$display_functional_term_short=strip_tags($display_functional_term_short);
|
||||
$clean_display_functional_term_short=mysqli_real_escape_string($drs_db,$display_functional_term_short);
|
||||
// remove html tags from functional yes and sanitize
|
||||
$display_functional_yes=strip_tags($display_functional_yes);
|
||||
$clean_display_functional_yes=mysqli_real_escape_string($drs_db,$display_functional_yes);
|
||||
// remove html tags from functional no and sanitize
|
||||
$display_functional_no=strip_tags($display_functional_no);
|
||||
$clean_display_functional_no=mysqli_real_escape_string($drs_db,$display_functional_no);
|
||||
// remove html tags from short functional yes and sanitize
|
||||
$display_functional_yes_short=strip_tags($display_functional_yes_short);
|
||||
$clean_display_functional_yes_short=mysqli_real_escape_string($drs_db,$display_functional_yes_short);
|
||||
// remove html tags from short functional no and sanitize
|
||||
$display_functional_no_short=strip_tags($display_functional_no_short);
|
||||
$clean_display_functional_no_short=mysqli_real_escape_string($drs_db,$display_functional_no_short);
|
||||
|
||||
mysqli_query($drs_db,"update config set value=\"$clean_display_appname\" where name=\"app_name\"");
|
||||
mysqli_query($drs_db,"update config set value=\"$display_banner\" where name=\"banner\"");
|
||||
mysqli_query($drs_db,"update config set value=\"$clean_display_footer\" where name=\"footer_message\"");
|
||||
mysqli_query($drs_db,"update config set value=\"$clean_display_pereffhlp\" where name=\"period_eff_help_txt\"");
|
||||
mysqli_query($drs_db,"update config set value=\"$clean_display_funchelp\" where name=\"functional_help_txt\"");
|
||||
mysqli_query($drs_db,"update config set value=\"$clean_display_device_term\" where name=\"device_term\"");
|
||||
mysqli_query($drs_db,"update config set value=\"$clean_display_discovered_term\" where name=\"discovered_term\"");
|
||||
mysqli_query($drs_db,"update config set value=\"$clean_display_discovered_term_short\" where name=\"discovered_term_short\"");
|
||||
mysqli_query($drs_db,"update config set value=\"$display_disc_drop_data\" where name=\"disc_drop_data\"");
|
||||
mysqli_query($drs_db,"update config set value=\"$clean_display_functional_term\" where name=\"functional_term\"");
|
||||
mysqli_query($drs_db,"update config set value=\"$clean_display_functional_term_short\" where name=\"functional_term_short\"");
|
||||
mysqli_query($drs_db,"update config set value=\"$clean_display_functional_yes\" where name=\"functional_yes\"");
|
||||
mysqli_query($drs_db,"update config set value=\"$clean_display_functional_no\" where name=\"functional_no\"");
|
||||
mysqli_query($drs_db,"update config set value=\"$clean_display_functional_yes_short\" where name=\"functional_yes_short\"");
|
||||
mysqli_query($drs_db,"update config set value=\"$clean_display_functional_no_short\" where name=\"functional_no_short\"");
|
||||
|
||||
echo "<meta http-equiv='refresh' content='0'>";
|
||||
}
|
||||
|
||||
@@ -239,7 +289,18 @@ echo "
|
||||
$curapn=mysqli_fetch_row(mysqli_query($drs_db,"select value from config where name=\"app_name\""))[0];
|
||||
$curbnr=mysqli_fetch_row(mysqli_query($drs_db,"select value from config where name=\"banner\""))[0];
|
||||
$curftr=mysqli_fetch_row(mysqli_query($drs_db,"select value from config where name=\"footer_message\""))[0];
|
||||
$curpereffhlp=mysqli_fetch_row(mysqli_query($drs_db,"select value from config where name=\"period_eff_help_txt\""))[0];
|
||||
$curfunchelp=mysqli_fetch_row(mysqli_query($drs_db,"select value from config where name=\"functional_help_txt\""))[0];
|
||||
$curdscterm=mysqli_fetch_row(mysqli_query($drs_db,"select value from config where name=\"discovered_term\""))[0];
|
||||
$curdscterms=mysqli_fetch_row(mysqli_query($drs_db,"select value from config where name=\"discovered_term_short\""))[0];
|
||||
$curdiscdropdata=mysqli_fetch_row(mysqli_query($drs_db,"select value from config where name=\"disc_drop_data\""))[0];
|
||||
$curfuncterm=mysqli_fetch_row(mysqli_query($drs_db,"select value from config where name=\"functional_term\""))[0];
|
||||
$curfuncterms=mysqli_fetch_row(mysqli_query($drs_db,"select value from config where name=\"functional_term_short\""))[0];
|
||||
$curfuncyes=mysqli_fetch_row(mysqli_query($drs_db,"select value from config where name=\"functional_yes\""))[0];
|
||||
$curfuncno=mysqli_fetch_row(mysqli_query($drs_db,"select value from config where name=\"functional_no\""))[0];
|
||||
$curfuncyess=mysqli_fetch_row(mysqli_query($drs_db,"select value from config where name=\"functional_yes_short\""))[0];
|
||||
$curfuncnos=mysqli_fetch_row(mysqli_query($drs_db,"select value from config where name=\"functional_no_short\""))[0];
|
||||
$curdevterm=mysqli_fetch_row(mysqli_query($drs_db,"select value from config where name=\"device_term\""))[0];
|
||||
|
||||
echo "
|
||||
<font size=\"+1\"><b>Display Configuration Parameters</b></font><br><br><br><br>
|
||||
";
|
||||
@@ -259,12 +320,37 @@ while ($bannerrow=mysqli_fetch_assoc($bannerqry)) {
|
||||
printf("<option value=\"%s\">%s</option>",$bannerrow["bannerid"],$bannerrow["bannername"]);
|
||||
}
|
||||
}
|
||||
|
||||
$dropnamestate=$dropdescstate="";
|
||||
if($curdiscdropdata=="Name") $dropnamestate="checked";
|
||||
if($curdiscdropdata=="Desc") $dropdescstate="checked";
|
||||
|
||||
echo "
|
||||
</select><br><br><br>
|
||||
Footer Message (will appear at the bottom of pages):<br>
|
||||
<input type=\"text\" name=\"display_footer\" size=\"80\" value=\"$curftr\"><br><br><br>
|
||||
Period Effective Help Text :<br>
|
||||
<textarea rows=\"4\" cols=\"80\" name=\"display_pereffhlp\" wrap=\"soft\">$curpereffhlp</textarea><br><br><br><br>
|
||||
Device Terminology :
|
||||
<input type=\"text\" name=\"display_device_term\" size=\"10\" value=\"$curdevterm\"><br><br><br>
|
||||
When Discovered Terminology :
|
||||
<input type=\"text\" name=\"display_discovered_term\" size=\"20\" value=\"$curdscterm\"><br><br><br>
|
||||
Short When Discovered Terminology (shown where space is limited, like table headers) :<br>
|
||||
<input type=\"text\" name=\"display_discovered_term_short\" size=\"9\" value=\"$curdscterms\"><br><br><br>
|
||||
When Discovered data to show in dropdowns: <input type=\"radio\" name=\"display_disc_drop_data\" value=\"Name\" $dropnamestate> Name
|
||||
<input type=\"radio\" name=\"display_disc_drop_data\" value=\"Desc\" $dropdescstate> Description<br><br><br>
|
||||
Functional Terminology :
|
||||
<input type=\"text\" name=\"display_functional_term\" size=\"20\" value=\"$curfuncterm\"><br><br><br>
|
||||
Short Functional Terminology (shown where space is limited, like table headers) :<br>
|
||||
<input type=\"text\" name=\"display_functional_term_short\" size=\"4\" value=\"$curfuncterms\"><br><br><br>
|
||||
Functional Yes Terminology :
|
||||
<input type=\"text\" name=\"display_functional_yes\" size=\"20\" value=\"$curfuncyes\"><br><br><br>
|
||||
Functional No Terminology :
|
||||
<input type=\"text\" name=\"display_functional_no\" size=\"20\" value=\"$curfuncno\"><br><br><br>
|
||||
Short Functional Yes Terminology (shown where space is limited, like table headers) :<br>
|
||||
<input type=\"text\" name=\"display_functional_yes_short\" size=\"4\" value=\"$curfuncyess\"><br><br><br>
|
||||
Short Functional No Terminology (shown where space is limited, like table headers) :<br>
|
||||
<input type=\"text\" name=\"display_functional_no_short\" size=\"4\" value=\"$curfuncnos\"><br><br><br>
|
||||
Functional Help Text :<br>
|
||||
<textarea rows=\"4\" cols=\"80\" name=\"display_funchelp\" wrap=\"soft\">$curfunchelp</textarea><br><br><br><br>
|
||||
<input type=\"submit\" name=\"update_display\" value=\"Update Options\">
|
||||
<input type=\"submit\" name=\"reset\" value=\"Reset\"><br><br><br>
|
||||
</form>
|
||||
|
||||
Reference in New Issue
Block a user