"; //var_dump($_REQUEST); //echo "

incoming array
"; //var_dump($incoming); // ******** begin database manipulation ******** $nameunique_err=$namesuppld_err=$ttlsuppld_err=$dirsuppld_err=false; if ($update_display) { // remove html tags from footer_message and sanitize $display_footer=strip_tags($display_footer); $clean_display_footer=mysqli_real_escape_string($drs_db,$display_footer); // 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 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_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 ""; } if ($update_colors) { if ($newbgc) mysqli_query($drs_db,"update config set value=\"$newbgc\" where name=\"background_color\""); if ($newmbgc) mysqli_query($drs_db,"update config set value=\"$newmbgc\" where name=\"menubg_color\""); if ($newtc) mysqli_query($drs_db,"update config set value=\"$newtc\" where name=\"text_color\""); if ($newlc) mysqli_query($drs_db,"update config set value=\"$newlc\" where name=\"link_color\""); if ($newvlc) mysqli_query($drs_db,"update config set value=\"$newvlc\" where name=\"vlink_color\""); if ($newhc) mysqli_query($drs_db,"update config set value=\"$newhc\" where name=\"heading_color\""); echo ""; } if ($reset_colors) { mysqli_query($drs_db,"update config set value=defaultvalue where name like \"%_color\""); echo ""; } if ($add_banner) { // do error checking // remove html tags from banner name $bnrname=strip_tags($bnrname); // test for name supplied if (strlen(trim($bnrname))) { $namesuppld=true; $namesuppld_err=false; } else { $namesuppld=false; $namesuppld_err=true; } // test for name unique if (mysqli_num_rows(mysqli_query($drs_db,"select bannerid from banners where bannername=\"$bnrname\""))) { $nameunique=false; $nameunique_err=true; } else { $nameunique=true; $nameunique_err=false; } if ($namesuppld && $nameunique) { // sanitize banner name $clean_bnrname=mysqli_real_escape_string($drs_db,$bnrname); // modify the table mysqli_query($drs_db,"insert into banners(bannername,bannercolor,textcolor) values(\"$clean_bnrname\",\"$bnrcolor\",\"$bnrtxtcolor\")"); } } if ($edit_banner) { if ($delete_banner) { mysqli_query($drs_db,"delete from banners where bannerid=\"$bnrid\""); unset($edit_banner); } if ($update_banner) { // do error checking // remove html tags from banner name $bnrname=strip_tags($bnrname); // test for name supplied if (strlen(trim($bnrname))) { $namesuppld=true; $namesuppld_err=false; } else { $namesuppld=false; $namesuppld_err=true; } // test for name unique if (mysqli_num_rows(mysqli_query($drs_db,"select bannerid from banners where bannername=\"$bnrname\" and bannerid!=\"$bnrid\""))) { if (mysqli_num_rows(mysqli_query($drs_db,"select bannerid from banners where bannername=\"$bnrname\""))) { $nameunique=false; $nameunique_err=true; } else { $nameunique=true; $nameunique_err=false; } } else { $nameunique=true; } if ($namesuppld && $nameunique) { // sanitize banner name $clean_bnrname=mysqli_real_escape_string($drs_db,$bnrname); // modify the table mysqli_query($drs_db,"update banners set bannername=\"$bnrname\",bannercolor=\"$bnrcolor\",textcolor=\"$bnrtxtcolor\" where bannerid=\"$bnrid\""); } } } if ($update_misc) { if ($logoutall) { if ($ostype == 'WIN') { $sessfileloc=mysqli_fetch_row(mysqli_query($drs_db,"select value from config where name=\"win_server_session_dir\""))[0]; } else { $sessfileloc=mysqli_fetch_row(mysqli_query($drs_db,"select value from config where name=\"unix_server_session_dir\""))[0]; } foreach (glob($sessfileloc."/*") as $sessfile) { unlink($sessfile); } } // test for sessttl supplied if (strlen(trim($sessttl))) { $ttlsuppld=true; } else { $ttlsuppld=false; $ttlsuppld_err=true; } if ($ttlsuppld) { mysqli_query($drs_db,"update config set value=\"$sessttl\" where name=\"session_ttl_days\""); } } // ******** end database manipulation ******** pagetable("begin"); if (!$print) { pageblock("left","begin"); sidemenu(); pageblock("left","end"); } pageblock("right","begin"); banner($print); echo "
"; 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]; $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 " Display Configuration Parameters



"; echo " Application Name (will appear at the top of every page):



"; echo " Banner (will appear at the top and bottom of pages):  


Footer Message (will appear at the bottom of pages):



Device Terminology :   


When Discovered Terminology :   


Short When Discovered Terminology (shown where space is limited, like table headers) :



When Discovered data to show in dropdowns:    Name      Description


Functional Terminology :   


Short Functional Terminology (shown where space is limited, like table headers) :



Functional Yes Terminology :   


Functional No Terminology :   


Short Functional Yes Terminology (shown where space is limited, like table headers) :



Short Functional No Terminology (shown where space is limited, like table headers) :



Functional Help Text :




    


"; echo "
"; $curbgc=mysqli_fetch_row(mysqli_query($drs_db,"select value from config where name=\"background_color\""))[0]; $curmbgc=mysqli_fetch_row(mysqli_query($drs_db,"select value from config where name=\"menubg_color\""))[0]; $curtc=mysqli_fetch_row(mysqli_query($drs_db,"select value from config where name=\"text_color\""))[0]; $curlc=mysqli_fetch_row(mysqli_query($drs_db,"select value from config where name=\"link_color\""))[0]; $curvlc=mysqli_fetch_row(mysqli_query($drs_db,"select value from config where name=\"vlink_color\""))[0]; $curhc=mysqli_fetch_row(mysqli_query($drs_db,"select value from config where name=\"heading_color\""))[0]; echo " Color Configuration Parameters

Select the color you'd like to change then use the color picker to select a new color

Page background color# ____
Menu background color# ____
Normal text color# ____
Link color# ____
Visited link color# ____
Heading color# ____


   

 

\"\"

R H
G S
B V

#
 
"; echo "
"; if ($nameunique_err) format_message(1,"Banner name already exists. Please try another."); if ($namesuppld_err) format_message(1,"Banner name cannot be blank."); if ($edit_banner) { // set form options for editing $sectiontitle="Modify Banner

"; $formtag="
"; $buttontags="          
"; // pull current values from database $currentvalues=mysqli_fetch_assoc(mysqli_query($drs_db,"select * from banners where bannerid=$bnrid")); $bnrname=$currentvalues["bannername"]; $bnrcolor=$currentvalues["bannercolor"]; $bnrtextcolor=$currentvalues["textcolor"]; $bnrcoloropts=""; foreach($basic_colors as $cname => $chex) { if ($chex==$bnrcolor) { $bnrcoloropts=$bnrcoloropts . ""; } else { $bnrcoloropts=$bnrcoloropts . ""; } } $bnrtextcoloropts=""; foreach($basic_colors as $cname => $chex) { if ($chex==$bnrtextcolor) { $bnrtextcoloropts=$bnrtextcoloropts . ""; } else { $bnrtextcoloropts=$bnrtextcoloropts . ""; } } } else { // set form options for add $sectiontitle="Add New Banner

"; $formtag=""; $bnrname=""; $buttontags=" "; // set default values $bnrcolor="#000000"; $bnrtextcolor="#FFFFFF"; $bnrcoloropts=""; foreach($basic_colors as $cname => $chex) { if ($chex==$bnrcolor) { $bnrcoloropts=$bnrcoloropts . ""; } else { $bnrcoloropts=$bnrcoloropts . ""; } } $bnrtextcoloropts=""; foreach($basic_colors as $cname => $chex) { if ($chex==$bnrtextcolor) { $bnrtextcoloropts=$bnrtextcoloropts . ""; } else { $bnrtextcoloropts=$bnrtextcoloropts . ""; } } } echo " $sectiontitle $formtag
Banner Name (text displayed in the banner):  

Banner Color (background color of the banner):  

Banner Text Color (text color of the banner, different than banner color):  

$buttontags


"; // show the table of entities $existingdata=mysqli_query($drs_db,"select * from banners where bannerid!=1 order by bannerid asc"); echo " Existing Banners   Click on the Banner ID to edit.

"; while ($tablerow=mysqli_fetch_assoc($existingdata)) { printf(" ", $tablerow["bannerid"],$tablerow["bannerid"], $tablerow["bannercolor"],$tablerow["textcolor"],$tablerow["bannername"]); } echo "
Banner IDBanner
%s %s
"; echo "
"; if ($ttlsuppld_err) format_message(1,"Session expiration time cannot be blank."); $curttl=mysqli_fetch_row(mysqli_query($drs_db,"select value from config where name=\"session_ttl_days\""))[0]; echo " Miscellaneous Configuration Parameters



Session expiration time (users will have to log in again after this long) :   days

Force logout of all users  



    
"; echo "
"; banner($print); pageblock("right","end"); pagetable("end"); framework("end","","",$print); ?>