From 16d1ff9bb81afadef21f400d58e41fbca8dc5247 Mon Sep 17 00:00:00 2001 From: Rod Wright Date: Sat, 14 Feb 2026 11:26:01 -0500 Subject: [PATCH] Incorporated changes for release 1.1.1 --- CHANGELOG | 41 ++++-- INSTALL | 2 +- RPiSetup/server-setup.sh | 185 ++++++++++++++++++++++--- RPiSetup/terminal-setup.sh | 43 +++--- RPiSetup/usr/local/bin/cloneuser | 16 ++- RPiSetup/usr/local/bin/startdrs.sh | 14 +- boilerplate.php | 2 +- db.php.template | 2 +- distfiles/CHANGELOG | 44 ++++-- distfiles/INSTALL | 2 +- distfiles/about.php | 7 +- distfiles/common.php | 5 +- distfiles/config.php | 2 +- distfiles/create.php | 2 +- distfiles/dbadmin.php | 2 +- distfiles/gpl.php | 2 +- distfiles/groups.php | 5 +- distfiles/icons/calendar.gif | Bin 258 -> 0 bytes distfiles/icons/chain--arrow.png | Bin 584 -> 0 bytes distfiles/icons/chain--plus.png | Bin 586 -> 0 bytes distfiles/icons/control-180.png | Bin 458 -> 0 bytes distfiles/icons/control-double-180.png | Bin 551 -> 0 bytes distfiles/icons/control-double.png | Bin 564 -> 0 bytes distfiles/icons/control.png | Bin 470 -> 0 bytes distfiles/icons/exclamation-red.png | Bin 696 -> 0 bytes distfiles/icons/magnifier--arrow.png | Bin 811 -> 0 bytes distfiles/icons/minus-button.png | Bin 479 -> 0 bytes distfiles/icons/node-magnifier.png | Bin 811 -> 0 bytes distfiles/icons/node.png | Bin 548 -> 0 bytes distfiles/icons/notebook--pencil.png | Bin 757 -> 0 bytes distfiles/icons/plus-button.png | Bin 583 -> 0 bytes distfiles/icons/plus.png | Bin 521 -> 0 bytes distfiles/icons/question-white.png | Bin 761 -> 0 bytes distfiles/icons/sym-dash.png | Bin 562 -> 0 bytes distfiles/icons/sym-diag.png | Bin 592 -> 0 bytes distfiles/icons/sym-x.png | Bin 481 -> 0 bytes distfiles/login.php | 2 +- distfiles/profile.php | 2 +- distfiles/search.php | 83 ++++++++++- distfiles/settings.php | 2 +- distfiles/writeupdetail.php | 2 +- distfiles/writeups.php | 25 ++-- install.sh | 74 ++++++---- opendrs-initial.sql | 2 +- opendrs-update.sql | 46 +++--- 45 files changed, 459 insertions(+), 155 deletions(-) delete mode 100644 distfiles/icons/calendar.gif delete mode 100644 distfiles/icons/chain--arrow.png delete mode 100644 distfiles/icons/chain--plus.png delete mode 100644 distfiles/icons/control-180.png delete mode 100644 distfiles/icons/control-double-180.png delete mode 100644 distfiles/icons/control-double.png delete mode 100644 distfiles/icons/control.png delete mode 100644 distfiles/icons/exclamation-red.png delete mode 100644 distfiles/icons/magnifier--arrow.png delete mode 100644 distfiles/icons/minus-button.png delete mode 100644 distfiles/icons/node-magnifier.png delete mode 100644 distfiles/icons/node.png delete mode 100644 distfiles/icons/notebook--pencil.png delete mode 100644 distfiles/icons/plus-button.png delete mode 100644 distfiles/icons/plus.png delete mode 100644 distfiles/icons/question-white.png delete mode 100644 distfiles/icons/sym-dash.png delete mode 100644 distfiles/icons/sym-diag.png delete mode 100644 distfiles/icons/sym-x.png diff --git a/CHANGELOG b/CHANGELOG index 00d79cb..8efbde7 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -27,17 +27,38 @@ Changelog back button in terminal mode. - Added configurable help text for period effective selection. - Changed Sim period effective from selection to yes/no radio buttons. - - Writeup groups page shows collapsed list of groups. Click the expand icon - to expand each group. - - Fixed bug where entries made on stale create page had inaccurate date/time. - - For logged in users, added the ability to select writeups directly on the - View All Writeups page and assign/create a group. - - On the Create New Writeup page, removed the default selections for Device, - Subsystem, and Period dropdowns, forcing user to make a selection. + - Writeup groups page shows collapsed list of groups. Click the expand + icon to expand each group. + - Fixed bug where entries made on stale create page had inaccurate + date/time. + - For logged in users, added the ability to select writeups directly on + the View All Writeups page and assign/create a group. + - On the Create New Writeup page, removed the default selections for + Device, Subsystem, and Period dropdowns, forcing user to make a + selection. - Added a Today button to the View All Writeups page - - Changed the Period dropdowns on the Create, Search, and Group pages to show - the times instead of the period numbers. Period numbers are still shown - in the results tables with mouse hover showing times. + - Changed the Period dropdowns on the Create, Search, and Group pages to + show the times instead of the period numbers. Period numbers are + still shown in the results tables with mouse hover showing times. - Moved all installation/upgrade functions to the install.sh script. +1.1.1 - 2020-04-09 + - Fixed opendrs-update.sql to rename the trainers table. + - Fixed bug where the About page didn't show the version number. + - Fixed some grammar on the About page. + - Fixed hardcoded help text in groups.php to use constant from config. + - Added ID to searchable parameters in search.php. + - Added sort parameters to search results. + - Added a link for Admins to access the local Webmin to manage a terminal. + - For Raspberry Pi: + - In terminal setup, provided missing .profile and + .config/openbox/rc.xml files. + - In server setup, install mariadb-server since + mysql-server is obsolete. + - Changed startdrs.sh to re-enable ctrl keys for copy/paste, etc. Also + added chromium flags to prevent update popup. + - Added openbox keybindings to customer user's rc.xml to trap dangerous + chromium hotkey combinations and enable ctrl-alt-del reboot. + - Changed systemd ctrl-alt-del.target symlink to point to + reboot.target. diff --git a/INSTALL b/INSTALL index bff829e..98b798b 100644 --- a/INSTALL +++ b/INSTALL @@ -14,7 +14,7 @@ follow the prompts. 4. Log in Click on the Log In menu option on the main page. If this is a fresh installation The initial user is drsadmin and the initial password -is OpenDRS-1. It is highly recommended that you changethis password +is OpenDRS-1. It is highly recommended that you change this password to a strong one by going to the Manage Database page under the Admin Functions menu. If this an upgrade, your current usernames and passwords are unchanged. diff --git a/RPiSetup/server-setup.sh b/RPiSetup/server-setup.sh index 637e3af..5a08c9f 100644 --- a/RPiSetup/server-setup.sh +++ b/RPiSetup/server-setup.sh @@ -2,10 +2,15 @@ # server-setup.sh # OpenDRS Online Discrepancy Reporting System -# Copyright (C) 2018 Rod Wright +# Copyright (C) 2020 Rod Wright # SPDX-License-Identifier: GPL-2.0 +inst_name="OpenDRS" +docroot_path="/var/www" +apache_user="www-data" +apache_group="www-data" + echo "" echo "" echo "" @@ -30,6 +35,8 @@ sleep 10 apt update && apt dist-upgrade -y echo "...done." echo "" +echo "IMPORTANT!: Be sure to make note of usernames and passwords you provide below." +echo "You will need them later." echo "" echo "Installing required server packages. Select apache2 as the web server to configure" echo "automatically. Choose Yes when prompted to install phpmyadmin database and allow it to" @@ -37,7 +44,7 @@ echo "generate a random password(leave the field blank)." echo -n "Press enter to continue." read continueok sleep 10 -apt install -y apache2 php php-mcrypt mysql-server phpmyadmin +apt install -y apache2 php php-mcrypt mariadb-server phpmyadmin uuid-runtime cp etc/apache2/mods-available/alias.conf /etc/apache2/mods-available service apache2 restart echo "...done." @@ -51,34 +58,168 @@ mysql_secure_installation mysql mysql -e "update user set plugin='';flush privileges;" echo "" echo "" -echo "Installing OpenDRS." -DRS_VERSION="1.1.0" -install_path="/var/www/opendrs-$DRS_VERSION" -httpd_user_group="www-data:www-data" -new_link_name="/var/www/opendrs" + +# This is a fresh install +operation="installed" +# prompt for mysql information +bad_mysql_adm=1 +while [ $bad_mysql_adm -eq 1 ] +do + admintestdb="drsadm`date +%Y%m%d`" + echo "We need to know the username and password of a MySQL administrator" + echo "to be able to create the database and user for OpenDRS. Note that this" + echo "is not necessarily the same as the login and password for the computer." + echo -n "MySQL admin username: " + read mysql_adm_user + echo "" + echo -n "MySQL admin password: " + read -s mysql_adm_pass + export MYSQL_PWD="$mysql_adm_pass" + mysql -u"$mysql_adm_user" -e "create database $admintestdb;drop database $admintestdb" + if [ $? -eq 0 ] + then + bad_mysql_adm=0 + else + echo "ERROR: Either the username/password you supplied were incorrect or the user" + echo -n "is not a MySQL administrator. Try again? [Y/N]: " + read admtry + if [ "$admtry" != "Y" -o "$admtry" != "y" ] + then + exit + fi + fi +done +echo "" +echo "What would you like to call this installation of OpenDRS? If you accept" +echo "the default, it will be called $inst_name. If you will be running multiple" +echo "instances of OpenDRS on this server, you should choose a distinctive name." +echo -n "Installation name [$inst_name]: " +read inst_name +echo "" + +# Create initial database +db_create_fail=1 +while [ $db_create_fail -eq 1 ] +do + name_valid=0 + while [ $name_valid -eq 0 ] + do + echo "What would you like to call the database for this installation of OpenDRS?" + echo "If you accept the default or make it blank, it will be $inst_name." + echo "Spaces or special characters are not allowed in the name." + echo -n "database name [$inst_name]: " + read new_db_name + if [ "$new_db_name" = "" ] + then + new_db_name=$inst_name + fi + echo $new_db_name|egrep -q "\W" + if [ $? -eq 0 ] + then + echo "The name you entered seems to contain whitespace or special" + echo "characters. Try again or just accept the default." + else + name_valid=1 + fi + done + echo "" + export MYSQL_PWD="$mysql_adm_pass" + mysql -u"$mysql_adm_user" -e "create database $new_db_name" + if [ $? -eq 0 ] + then + db_create_fail=0 + else + echo "An error was encountered when trying to create the database." + echo "This probably means the database already exists." + echo -n "Try again with a different database name? [Y/N]: " + read dbcreatetry + if [ "$dbcreatetry" != "Y" -o "$dbcreatetry" != "y" ] + then + exit + fi + fi +done + +# Create user and give rights to database +drs_user="$new_db_name-user" +drs_pass=`uuidgen` +export MYSQL_PWD="$mysql_adm_pass" +mysql -u"$mysql_adm_user" -e "create user if not exists '$drs_user'@'localhost' identified by '$drs_pass'" +mysql -u"$mysql_adm_user" -e "grant all on $new_db_name.* to '$drs_user'@'localhost'" +mysql -u"$mysql_adm_user" -e "flush privileges" + +# Populate initial database +mysql -u"$mysql_adm_user" $new_db_name < ../opendrs-initial.sql + +# Set the installation name +export MYSQL_PWD="$drs_pass" +mysql -u"$drs_user" $new_db_name -e "update config set value=\"$inst_name\",defaultvalue=\"$inst_name\" where name=\"app_name\"" + +# Create install path echo "Creating installation directory . . ." +install_path=$docroot_path/$inst_name mkdir $install_path + +# Create db.php if it doesn't exist +if [ ! -f "$install_path/db.php" ] +then + cp ../db.php.template $install_path/db.php + sed -i "s/DBNAME/$new_db_name/g" $install_path/db.php + sed -i "s/DBUSER/$drs_user/g" $install_path/db.php + sed -i "s/DBPASS/$drs_pass/g" $install_path/db.php +fi + +# copy distribution to install location echo "Installing distribution . . ." cp -Rv ../distfiles/* $install_path +ln -s $install_path/writeups.php $install_path/index.php + +# set ownership +echo "In order to set the ownership correctly, we need to know the user and" +echo "group that the webserver expects its files to be owned by. This is" +echo "usually not the root account. Refer to the ownership of other files in" +echo "your webserver's document tree to see what this should be." +echo "Enter the user and group separated by a colon (username:groupname)." +echo "Enter the user:group of the OpenDRS installation" +echo -n "directory [$apache_user:$apache_group] :" +read httpd_user_group +echo "" echo "Setting file ownership . . ." chown -R $httpd_user_group $install_path -ln -s $install_path $new_link_name -cp etc/apache2/conf-available/opendrs.conf /etc/apache2/conf-available -cp etc/apache2/sites-available/000-default.conf /etc/apache2/sites-available -a2enconf opendrs -echo "DRS_SERVER=\"http://localhost\"" > /etc/drs.conf -service apache2 restart + echo "" -echo "Server configuration is now complete. " -echo "Once the reboot is complete you will need to do the final installation of OpenDRS through" -echo "the browser. You will need the password you set during the mysql installation above." + +# tell user to launch web browser to continue echo "" echo "" -echo "It is highly recommended that after rebooting, you press ctrl-alt-F2," -echo "log in as pi, then create new users for yourself and any other" -echo "administrators using the cloneuser command (cloneuser pi newlogin)." +echo "" +echo "OpenDRS has been installed." + +echo "# OpenDRS default Apache configuration" > /etc/apache2/conf-available/$inst_name.conf +echo "" >> /etc/apache2/conf-available/$inst_name.conf +echo "Alias /$inst_name $install_path" >> /etc/apache2/conf-available/$inst_name.conf +echo "" >> /etc/apache2/conf-available/$inst_name.conf +echo "" >> /etc/apache2/conf-available/$inst_name.conf +echo " Options FollowSymLinks" >> /etc/apache2/conf-available/$inst_name.conf +echo " DirectoryIndex index.php" >> /etc/apache2/conf-available/$inst_name.conf +echo "" >> /etc/apache2/conf-available/$inst_name.conf + +a2enconf $inst_name +service apache2 reload +echo "OpenDRS server setup is complete." +echo "" +echo "Once the reboot is complete you will need to do the final installation of $inst_name through" +echo "the browser. You will need the mysql username and password you set during the mysql installation above." echo "" echo "" -echo -n "Press enter to reboot now." -read rebootok -reboot +echo "Once the final install is done, you will need to log in to $inst_name to configure it." +echo "IMPORTANT: The default login credentials for the initial admin user are:" +echo "" +echo "login: drsadmin" +echo "password: OpenDRS-1" +echo "" +echo "REMEMBER THESE CREDENTIALS. Otherwise, you will not be able to log in and" +echo "configure your new installation." +echo "It is highly recommended that you change the initial password to something" +echo "secure after logging in for the first time." +echo "DRS_SERVER=\"http://localhost/$inst_name\"" > /etc/drs.conf diff --git a/RPiSetup/terminal-setup.sh b/RPiSetup/terminal-setup.sh index ac8a153..335524b 100644 --- a/RPiSetup/terminal-setup.sh +++ b/RPiSetup/terminal-setup.sh @@ -2,7 +2,7 @@ # terminal-setup.sh # OpenDRS Online Maintenance Tracking System -# Copyright (C) 2018 Rod Wright +# Copyright (C) 2020 Rod Wright # SPDX-License-Identifier: GPL-2.0 @@ -46,8 +46,6 @@ chmod +x usr/local/bin/* cp usr/local/bin/* /usr/local/bin cp etc/apt/sources.list.d/* /etc/apt/sources.list.d cp lib/systemd/system/getty@tty1.service /lib/systemd/system -rm /lib/systemd/system/ctrl-alt-del.target -ln -s /dev/null /lib/systemd/system/ctrl-alt-del.target echo "...done." echo "" echo "" @@ -80,7 +78,7 @@ read continueok echo "" echo "" echo "Creating customer user..." -cloneuser pi customer +cloneuser `who am i | awk '{print $1}'` customer mkdir -p /home/customer/.config/openbox cp home/customer/.profile /home/customer cp home/customer/.config/openbox/rc.xml /home/customer/.config/openbox @@ -89,32 +87,27 @@ echo "...done." echo "" echo "" echo "This terminal will need to communicate with an OpenDRS server. If" -echo "you intend to host the server directly on this terminal, accept the" -echo "default URL shown. Otherwise, enter the server URL." -echo -n "[http://localhost] :" +echo "you intend to host the server directly on this terminal, leave this" +echo -n "blank. Otherwise, enter the server URL :" read server_url if [[ $server_url == "" ]] then - server_url="http://localhost" -fi -echo "DRS_SERVER=\"$server_url\"" > /etc/drs.conf -echo "" -echo "" -echo "Terminal configuration is now complete. " -echo "" -echo "" -echo "If this Raspberry Pi will also be used as the OpenDRS server, you will need" -echo "to run the server-setup.sh script in this same directory." -echo "Would you like to do that now? enter Y if so, or press enter to leave this" -echo -n "as a terminal only and reboot :" -read serverchoice -if [[ $serverchoice == "Y" || $serverchoice == "y" ]] -then + conftype="Server/Terminal" + touch /etc/drs.conf ./server-setup.sh +else + conftype="Terminal" + echo "DRS_SERVER=\"$server_url\"" > /etc/drs.conf fi -echo "It is highly recommended that after rebooting, you press ctrl-alt-F2," -echo "log in as pi, then create new users for yourself and any other" -echo "administrators using the cloneuser command (cloneuser pi newlogin)." +echo "" +echo "" +echo "$conftype configuration is now complete. " +echo "" +echo "" +echo "It is highly recommended that after rebooting, you run ssh pi@$HOSTNAME" +echo "from another computer on the network, then create new users for" +echo "yourself and any other administrators using the cloneuser command" +echo "(cloneuser pi )." echo "" echo "" echo "Setup complete." diff --git a/RPiSetup/usr/local/bin/cloneuser b/RPiSetup/usr/local/bin/cloneuser index 1b129d9..1466f31 100644 --- a/RPiSetup/usr/local/bin/cloneuser +++ b/RPiSetup/usr/local/bin/cloneuser @@ -2,17 +2,27 @@ SRC=$1 DEST=$2 +if [ $# -ne 2 ]; then + echo "Usage: cloneuser source_user destination_user" + exit 1 +fi +if ! grep -q $SRC /etc/passwd ;then echo "Source user doesn't exist!"; exit 1; fi +if grep -q $DEST /etc/passwd ;then echo "Destination user already exists!"; exit 1; fi + SRC_GROUPS=`id -Gn ${SRC}` SRC_SHELL=$(awk -F : -v name=${SRC} '(name == $1) { print $7 }' /etc/passwd) +RAND_PW=`date +%s | sha256sum | base64 | head -c 32 ; echo` -echo "Creating user $DEST" -useradd --shell ${SRC_SHELL} --create-home ${DEST} +echo "Creating user $DEST with a random password" +useradd --shell ${SRC_SHELL} --password ${RAND_PW} --create-home ${DEST} for grp in ${SRC_GROUPS};do if [ "$grp" != "$SRC" ]; then echo "Adding user $DEST to group $grp." usermod -a -G $grp ${DEST} fi done -passwd ${DEST} +echo "Finished. Please set an actual password for $DEST if you want them to be able to log in." + + diff --git a/RPiSetup/usr/local/bin/startdrs.sh b/RPiSetup/usr/local/bin/startdrs.sh index 67459ce..a99817a 100644 --- a/RPiSetup/usr/local/bin/startdrs.sh +++ b/RPiSetup/usr/local/bin/startdrs.sh @@ -7,18 +7,16 @@ openbox-session & xset s off xset +dpms xset dpms 0 600 1800 - -#xset dpms force off - + while true do killall chromium-browser rm -rf ~/.{config,cache}/chromium/ - # start browser in your web site: here, just plain old localhost - # -test-type will ignore any warnings and + # start browser to DRS Server + # --test-type will ignore any warnings and # --ignore-certificate-errors will allow you to kiosk any https-page without displaying certificate errors - chromium-browser -test-type --ignore-certificate-errors --kiosk --no-first-run --incognito $DRS_SERVER & + chromium-browser --test-type --ignore-certificate-errors --kiosk --no-first-run --check-for-update-interval=1 --simulate-upgrade --incognito $DRS_SERVER & sleep 10 @@ -27,8 +25,8 @@ do pgrep chromium-browse if [ "$?" -eq "1" ] then - # here you could execute something that is supposed to happen after the browser was accidentally quit - chromium-browser -test-type --ignore-certificate-errors --kiosk --no-first-run --incognito $DRS_SERVER & + # relaunch browser if it terminates + chromium-browser --test-type --ignore-certificate-errors --kiosk --no-first-run --check-for-update-interval=1 --simulate-upgrade --incognito $DRS_SERVER & fi sleep 1 done diff --git a/boilerplate.php b/boilerplate.php index 7593a46..15b2083 100644 --- a/boilerplate.php +++ b/boilerplate.php @@ -2,7 +2,7 @@ /* boilerplate.php OpenDRS Online Discrepancy Reporting System - Copyright (C) 2018 Rod Wright + Copyright (C) 2020 Rod Wright SPDX-License-Identifier: GPL-2.0 */ diff --git a/db.php.template b/db.php.template index 0e72665..42c5875 100644 --- a/db.php.template +++ b/db.php.template @@ -3,7 +3,7 @@ /* db.php OpenDRS Online Discrepancy Reporting System - Copyright (C) 2018 Rod Wright + Copyright (C) 2020 Rod Wright SPDX-License-Identifier: GPL-2.0 */ diff --git a/distfiles/CHANGELOG b/distfiles/CHANGELOG index 00d79cb..fe12b96 100644 --- a/distfiles/CHANGELOG +++ b/distfiles/CHANGELOG @@ -1,5 +1,5 @@ OpenDRS - Online Discrepancy Reporting System - Copyright (C) 2018 Rod Wright + Copyright (C) 2020 Rod Wright This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -27,17 +27,37 @@ Changelog back button in terminal mode. - Added configurable help text for period effective selection. - Changed Sim period effective from selection to yes/no radio buttons. - - Writeup groups page shows collapsed list of groups. Click the expand icon - to expand each group. - - Fixed bug where entries made on stale create page had inaccurate date/time. - - For logged in users, added the ability to select writeups directly on the - View All Writeups page and assign/create a group. - - On the Create New Writeup page, removed the default selections for Device, - Subsystem, and Period dropdowns, forcing user to make a selection. + - Writeup groups page shows collapsed list of groups. Click the expand + icon to expand each group. + - Fixed bug where entries made on stale create page had inaccurate + date/time. + - For logged in users, added the ability to select writeups directly on + the View All Writeups page and assign/create a group. + - On the Create New Writeup page, removed the default selections for + Device, Subsystem, and Period dropdowns, forcing user to make a + selection. - Added a Today button to the View All Writeups page - - Changed the Period dropdowns on the Create, Search, and Group pages to show - the times instead of the period numbers. Period numbers are still shown - in the results tables with mouse hover showing times. + - Changed the Period dropdowns on the Create, Search, and Group pages to + show the times instead of the period numbers. Period numbers are + still shown in the results tables with mouse hover showing times. - Moved all installation/upgrade functions to the install.sh script. - +1.1.1 - 2020-04-09 + - Fixed opendrs-update.sql to rename the trainers table. + - Fixed bug where the About page didn't show the version number. + - Fixed some grammar on the About page. + - Fixed hardcoded help text in groups.php to use constant from config. + - Added ID to searchable parameters in search.php. + - Added sort parameters to search results. + - Added a link for Admins to access the local Webmin to manage a terminal. + - For Raspberry Pi: + - In terminal setup, provided missing .profile and + .config/openbox/rc.xml files. + - In server setup, install mariadb-server since + mysql-server is obsolete. + - Changed startdrs.sh to re-enable ctrl keys for copy/paste, etc. Also + added chromium flags to prevent update popup. + - Added openbox keybindings to customer user's rc.xml to trap dangerous + chromium hotkey combinations and enable ctrl-alt-del reboot. + - Changed systemd ctrl-alt-del.target symlink to point to + reboot.target. diff --git a/distfiles/INSTALL b/distfiles/INSTALL index bff829e..98b798b 100644 --- a/distfiles/INSTALL +++ b/distfiles/INSTALL @@ -14,7 +14,7 @@ follow the prompts. 4. Log in Click on the Log In menu option on the main page. If this is a fresh installation The initial user is drsadmin and the initial password -is OpenDRS-1. It is highly recommended that you changethis password +is OpenDRS-1. It is highly recommended that you change this password to a strong one by going to the Manage Database page under the Admin Functions menu. If this an upgrade, your current usernames and passwords are unchanged. diff --git a/distfiles/about.php b/distfiles/about.php index 67819df..6ec03c3 100644 --- a/distfiles/about.php +++ b/distfiles/about.php @@ -2,7 +2,7 @@ /* about.php OpenDRS Online Discrepancy Reporting System - Copyright (C) 2018 Rod Wright + Copyright (C) 2020 Rod Wright SPDX-License-Identifier: GPL-2.0 */ @@ -39,6 +39,7 @@ if ($print) { // assign variables from constants $appname=APP_NAME; +$drs_version=DRS_VERSION; if ($print=="Printer Friendly") { $sbcolor=P_SIDEBAR_COLOR; @@ -72,7 +73,7 @@ echo "
"; echo "

-OpenDRS $version Discrepancy Reporting System +OpenDRS $drs_version Discrepancy Reporting System


This program is licensed under the terms of the GNU General Public License. Click on the link or see the LICENSE file in the distribution to read it. OpenDRS is Copyright (C) 2018 by Rod Wright. @@ -119,7 +120,7 @@ server. Fugue
Icons
The icons used in OpenDRS are from the Fugue Icon set created by Yusuke Kamiyamane. The entire set is available at -p.yusukekamiyamane.com, and are licensed under a +p.yusukekamiyamane.com, and is licensed under the Creative Commons Attribution 3.0 License. diff --git a/distfiles/common.php b/distfiles/common.php index 9251c9c..0f0e0ca 100644 --- a/distfiles/common.php +++ b/distfiles/common.php @@ -2,7 +2,7 @@ /* common.php OpenDRS Online Discrepancy Reporting System - Copyright (C) 2018 Rod Wright + Copyright (C) 2020 Rod Wright SPDX-License-Identifier: GPL-2.0 */ @@ -357,7 +357,7 @@ function sidemenu($printable=true) { echo "
- + @@ -374,6 +374,7 @@ function sidemenu($printable=true) { +
View Open Writeups
View Open Writeups
View All Writeups
Writeup Groups
Search Writeups
Admin Functions
Global Settings
Manage Database
Manage Terminal

"; diff --git a/distfiles/config.php b/distfiles/config.php index c6458ad..04e0ac0 100644 --- a/distfiles/config.php +++ b/distfiles/config.php @@ -2,7 +2,7 @@ /* config.php OpenDRS Online Discrepancy Reporting System - Copyright (C) 2018 Rod Wright + Copyright (C) 2020 Rod Wright SPDX-License-Identifier: GPL-2.0 */ diff --git a/distfiles/create.php b/distfiles/create.php index 8bbe61a..2b59d24 100644 --- a/distfiles/create.php +++ b/distfiles/create.php @@ -2,7 +2,7 @@ /* create.php OpenDRS Online Discrepancy Reporting System - Copyright (C) 2018 Rod Wright + Copyright (C) 2020 Rod Wright SPDX-License-Identifier: GPL-2.0 */ diff --git a/distfiles/dbadmin.php b/distfiles/dbadmin.php index 0886c78..dfce2e4 100644 --- a/distfiles/dbadmin.php +++ b/distfiles/dbadmin.php @@ -2,7 +2,7 @@ /* dbadmin.php OpenDRS Online Discrepancy Reporting System - Copyright (C) 2018 Rod Wright + Copyright (C) 2020 Rod Wright SPDX-License-Identifier: GPL-2.0 */ diff --git a/distfiles/gpl.php b/distfiles/gpl.php index 6e855f3..d0612e7 100644 --- a/distfiles/gpl.php +++ b/distfiles/gpl.php @@ -2,7 +2,7 @@ /* gpl.php OpenMTS Online Maintenance Tracking System - Copyright (C) 2018 Rod Wright + Copyright (C) 2020 Rod Wright SPDX-License-Identifier: GPL-2.0 */ diff --git a/distfiles/groups.php b/distfiles/groups.php index bc728cf..fb4bd6b 100644 --- a/distfiles/groups.php +++ b/distfiles/groups.php @@ -2,7 +2,7 @@ /* groups.php OpenDRS Online Discrepancy Reporting System - Copyright (C) 2018 Rod Wright + Copyright (C) 2020 Rod Wright SPDX-License-Identifier: GPL-2.0 */ @@ -490,8 +490,7 @@ if ($action=="add") { "; // Period effective cell ************ echo " - Sim period effective?  
+ Sim period effective?  
"; if ($search) { $effstate=$nefstate=""; diff --git a/distfiles/icons/calendar.gif b/distfiles/icons/calendar.gif deleted file mode 100644 index 52f2863c90764cabb11ac926b3f7e02b9b9e5e49..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 258 zcmZ?wbh9u|6kyTUl#W73z|)4nX4`*rp5ZyQ#B-@379)%)KM@Be-M>hGtI|Gs_w|L4#D z|Nj|~fDVWavWtPW{Q*md3PbOU5QXTA``&Hf+-&MQNyN4Pv4TT$qr;4tz7x@TlA2nj z{VVh>rsSCQXN#@AXk#?9q4e^OX(ylcxawre$mLbEZVWhZ^wyuYi=i=Ui~?zCvD{J; zob`>l`Gve(T%4S?jg@f;{OB2!bOQWALGdFOQVvkR?QwQ_|pZzJQT&0DrAGFSru Doau8X diff --git a/distfiles/icons/chain--arrow.png b/distfiles/icons/chain--arrow.png deleted file mode 100644 index 4c8515cb9b345be376528051d4f05be5c92b75f4..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 584 zcmV-O0=NB%P)PbXFRCwBA{Qv(y10{fofkH6w2C(?~ z`7yAuu^BTmGU@>N97u9MfZ=lm#K0x@>({TdEI@{-h=_ihTa8ER^3y7~C{So897&77Q^#G9L2I$6Gc{mLsSC?o?kammMz9~*$q?Xt46 zWB|Gfh($rp2Wx)w<_*{&pqfIU+J@lZkP47qkO6=0-+%f%K0eiK(xl#^&!0bk+`4re z)&K)~_aiSaZxKi>NDoLaBT&FeR#rZwsHoCcLqkVWKtPE3>(?)TuU@_Iyr-viGe{${ z-0}x33{3Ctep=g+vGnodhie#t@V{^7r@~nPtMPm&Z{|^Jh%dA8ry=e^W)(U)5L5%nkiB!}i22Ody zGx=FI#y37OFns=lkP~BPVA!zm$XT2Q@S4Xk@S4Sd0&eF2fB%e;dB0000`6pHRCwBA{Qv(y10{fofkH6w2C(?~ z`7yAuu^BTmGU@>N97u9MfZ=lm#K0x@>({TdEI@{-h=_ihTa8ER^3y7~C{So897&77Q^#G9L2I$6Gc{mLsSC?o?kammMz9~*$q?Xt46 zWB|Gfh($rp2Wx)w<_*{&pqfIU+J@lZkP47qkO6=0-+%f%K0eiK(xl#^&!0bk+`4re z)&K)~_aiSaZxKi>NDoLaBT&FeR#rZwsHoCcLqkVWKtPE3>(?)TuU@_Iyr-viGe{#$ zZtCyZ%;!H|V37VJ{`+~|%{h-BKU~8Ilow)VW_ATSRU1o4--O13I!NwM4_{nLT(bC_ zC3BxM7k(@R2Iy`Upu~3|V?U5Sj5D%Jc>NgESTum1c=_?~M{x#@|F8c}=c{74{l}e= zU`i?AVPH^YIpY}QWQ;Dgf8D;b_ziGphv5GVGl3XvfKHgc@s(8<&w}L{8P2j0m0tfd zq%-^h=Gx!?&%FEl4(REB3=FJ{CJZc$3@k(^`j@{LfQFoX)^!V*0T|DMG&4xEGXMk_ Y0QLFc?%bB?od5s;07*qoM6N<$f?YKi0RR91 diff --git a/distfiles/icons/control-180.png b/distfiles/icons/control-180.png deleted file mode 100644 index 8b847a0b1f2be8b46d0db9fa687208e0eccfb590..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 458 zcmV;*0X6=KP)0$h?zc(wljAM@w;?}8XFDPthb z0K&u@0Mz{Z*RO(DA35U>AO0}>{`nJ(i8A0nRCAoait&vbUl_i9!)*WyR?R^Kd;@WSsOKPF6`x&JJ$00YCz z_a7KO|NO=9_19m9U*ErjF+l@>URVNj#e@|rPn;D}mt}a#BgpWAl?UtsY_7l+h)aNh zIAPzieP`Ka#2FrQ3Nrix2H-DZV&TaocZTz&baskK*>`=@MwFE?i#6JVof5vM7sQ@6r0H+MgS(LEp;s5{u07*qoM6N<$g14c_ ANdN!< diff --git a/distfiles/icons/control-double-180.png b/distfiles/icons/control-double-180.png deleted file mode 100644 index a39522fa590e952149b3bf03b8e1da48f8410c42..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 551 zcmV+?0@(eDP)(RCwBA{Qv(y10{fofkMCnV`w#< zWnkyzWMJdqU|?luXJBDvjR6YV0$rF6lK=7bD~9;NByofRDB%D9m_NUN7r?lGe*MBK zj@=7DMZbUjDv0xuHvawdCj$uo{Qey-9_4`$$1niste9Uve-BHWj1mT5ML&KNWXBsBU%dE%K~RtdY%@rlk&&^$-&x*x+qR1g;^O=e7oi8@ zukYUr@=~pg&zyV1@aDruhHt-E8Ge5I29hf9c2zSzaqbBN10xf|m!E%N;;3E#+CHIs z(%!QIvfK=J8CV%!FmZrw0*SBNbnz^ovJAsZ9zlj@tUO?Gm@Al&ys!l5iU~_*?mDZe zF3IqSogZuyFtEVl$JQS?`%glg;Sr}0SRCdGxB+k0mNNW$c6kZN#>3Oro@L;KxZvC8 z&v5Z)OV^+M!NG~*0!CO;1_l(EW)|0EVAk-DVG>mb$M^3;ohE-@-M}jT=jC;jgv1KO zoPS?l=LX{A%qFQK4D5VnK+VP=NuU@AUuQN>SIu7LI@f~1s7_glwdTO zxifP!J?AEVCc7-W@Xp7>J?}YZ=3LG9ebln*P~!^lifOrMKwVURaCMzmIC!W3%|Sue3>T#=q4^o=dDloF{>K9~zHxAT)r6 zFS9Y;T)aMv%JhaQGY6=DAFj&pmx@(`bd~PHWojQHmyofggYxh&2k|4~G2(30L&}p1 zTsZrx3aGSJdTA)D+W9DwcwF5l@+j8VUi~!w7hnL9uuA%W$>(GM0000n&vr zqzf4S|BoTb0GM;%zyHG!?&Qae+SdA ze*I_oz|IY3>nI5_tlf0}EHHW}5H}fj9x^|0O@4Tq2wjK`{UpWM^TxK644g+3#*I`EqG3!|&%; zfHEZ*1~4M$1y=0<1||)^Ga&Z=H#aBzyRmu6-&fb+^4RhXiVOZ++sMHrpmL4j$A?S* z&dmi`sR6`4p!huy|HSJ8pp!uc3PBD22Qm{0{{X7}gVz9Z06>5N01C<2jATQ61poj5 M07*qoM6N<$f-i*7RsaA1 diff --git a/distfiles/icons/exclamation-red.png b/distfiles/icons/exclamation-red.png deleted file mode 100644 index 517725822ba2859be6811af489efc672fe4117df..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 696 zcmV;p0!RIcP)uaKl`6H0#EMPSO}g$+@CEq-R{ewSv#FGPK-H!Tc2R3p2_kJF0cu`0*kJtV zjCsgq(?u;Ed+xn+&YijUnDKod{^#N8^`2pX!!LmWNFh!ze2F+%=KVx`#;wi}cP!HRj?vUiNxuPsBu{O~nOELXjlSf5~J5P%I&A zB-h4c)%3h7afr*1RT(5a!ohQN<71Ys0TMXehLPM^z5@17Z^8fgQ$x#zB eD000&0t^5S;vPyKd%pDm0000z>nv``JZ#1^Bf4aOsCUPHRW;{Z59Q|XG8jmGSBQ?YVxW`bbC!36@B z5f9Jvr3Y-)MM{k}TO*fB2?$`cEW9^l>hmg&o-D?G5|(8_0?XQIwixin;|ql`@eV~L zWjT*~Z)Zt3j!P6koh*}W7sSoyfWjRrRlLKZH$)+=`hOJ!MK0_IWRg0Oc=IU&>qpuk z!7vO+z~bEW2akj#NRE#P@nT$_=!c8lYCIfl{di3WWm5<#HgEO6P|j_AXNV z2FD8GznKY0uB|Nn?77o57YGCClcB(b zZoFMdJ9mB1@1AuHhr{7t&}Op%Q52&TrKHGfnwzg&v)j+M`+VL(6w{2zMc`hn@9CIu zkTQiIK(aHmv2kA#lldS`r&YJKw6)por*0x~pU&!-rz`6lAwgK8eyj+*4Yhfe?!Hf# zBPc1fTCF&9mC2NUq^YT`(QdEpcDr3YDBzUw>T9f-Y`j!q`MeH*pa1*R)Fc3&-W!{O z27>|U_4?NS{%4&I$C=*o@i!09G>+ntPRiU36lHaHsSL9vwok^oW0r3N!&98c)rChi znWpIqB(ScouKqydIfm}=*YR6$F)OF68+ZvIjEGCKw*n&_{kRAG^78UWw7PLCwh$A5 pgNjTrI0;1I9Xrx7fPH@pFaRcvUPbP`Xq^B6002ovPDHLkV1iKYeMbNQ diff --git a/distfiles/icons/minus-button.png b/distfiles/icons/minus-button.png deleted file mode 100644 index 6dc019a60b0ab525b0b136a5bb25a25bfe892f4d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 479 zcmV<50U-W~P)IFbV8T*9m3uQ&Y18-Y3~RQmnXF79@XnN7p+!RsH#}Ulx}_3^^L)x z_GTFJ=$41czs^~+S#>;5!1Fe_7N?Cy_0=#s-v#!fQb{boD(?pn-%9rV(N13P7 zX(0hw%8Hi>xUP%YY?fULf&eb)e1bFfIqGo&t3eWD0|9!35l8EGg(`WyoX^DsO=qe3GE{;F}=5RMUn;W>gd`i`hdtV)zhj zl)E^0-?x4J&hnE*9{6$2|9(BpGN?X8NGh>GbCFc|vcj^U3(*d&PNG6j}aMWZn8EiJ2V_{)oIT#FnL>UpI(fFUCEXxEk!nCxs>@vYHp*A0$ z2Y_F29vmDT+=hc*(1!sXuuak#IOnQ=w^YLO2VjHxOagZnvwE{&@ds zZ*RZb)7@n=+X{u;W@z!nmk-Oq4(NvXrj&dP!&n7Dpbd+o3|hPE#F=w_!)JY?X1!Vz zRUBYAG=A~2saCJC?_WNPHyog0Boc{OJ3Bic)7lb=1TmYq&V z9y)t^QyOTDsambZQD+PWs=7>M#eu-F!kf_3C>%uDbUK}!o10sqQRz)-7!s9ArAI@% zhx@v3&IhKyXEqa6QDD_lDVKXRGyQJ*{=KioV(}9LB@?1uP-c%wJn!l0VMI~9GBx$! zq0cvV8}t4QnH@L+(7&+;ySEs3f$%)vSW^Wqm#brBWaL&j{7u$qG}` z&YeAT?zuZN!eX(YeTGPT4mp?09g3oOhPfN)&gb*j*=+V#uh(@_BoZM>l1zD0JRZNy zWHQ&ljnnB=DwRsV+wIoyQ5P5vhcul|4ZP84RFfNx#xX?BnZyzKlcFfuO`GHKm|Crt zZI{R2;7p2nJRT(w2%MHmrMF_S_-V7*9%NZoCzDAMoP59ESFyps(=_c{fE^F)ra|-p zEeICTYbTLNZ~=CbuU4yso=tf&7CY$ganrKb>!rb9pyzJ4o0`q0fd>JS&5p)mu@G$Q zIjmDO8eMK!4>%(J(FOsl)k?iyZ)+_W3=%Hf5jI`09?(JljQC3qhlBs*R&|`h8dxZ mCJ;BkyeZ#uVc+NcFTen2dF_!K8+a)I0000Wb$GF diff --git a/distfiles/icons/notebook--pencil.png b/distfiles/icons/notebook--pencil.png deleted file mode 100644 index 9e025e7c94eb5882b044fcc115507725ba1a01bf..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 757 zcmVV8x*S5h8-6Rl??_lyV&r~Xf`=Jm{H#a{R z3Wa)U{cRy&>df;okzH_}6M|N&6%+IGzjg`qa)R$W1hqu) zP05uJ?2$00aTER>&^bFxThR4gf%-Z-3gng-1lD3Bt01vhETA6g#^@*xD@uicDXOT# zrA82B|3Sb6!3kOR)+@@$IxuL~%LMA(c5!rBPT(#Q02L$~$s{tGcHGn7-}5mLs45qb zqOlzU7bl4QO`vUt@qQtVp|P=^Zl7=93S%$L1v>8%fv?ss7HdS{bK68+x=foJZ?U?5 z4_D8&pzYM%iJzMG=rXWSu?0>*esB_j9MdYClPd%0IN6G4qhWZPENhzKS(tOVVA@I~ zz(pt}UyTi3myQ1z@YPaH>99nQi4BV8@$p&syLzFh&gdbJ2d^Ctm{z8ykfP&IGZ}L< zu0l>|;Rg^B9$8*MHvsIV>yP2h>o0q!n%Zpo%$lC9N nKT7WnRZXh0{EEu>9{~mc=B~q1eam^+00000NkvXXu0mjfR_9?L diff --git a/distfiles/icons/plus-button.png b/distfiles/icons/plus-button.png deleted file mode 100644 index 10d1f60031732739dc674c8785a5b8027ce17566..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 583 zcmV-N0=WH&P)h5s20ovZX^7fD;8b(_RL!{(6WEfiitsiAGQlv=rSefIf- zn+r|Px!_jOrz7Ms7vJ|bXSaJhdilaeYWCX;H|Cq-Pvi(rNZlr$$I5Yz!UhbpQhIFFK8Hy6z^g2-g| zFqTvX4`mmU$GP=ZrZ-OZvgDFVCUr~0!Y+X*8Z(d?b{k9V8LnWF)|bwBOaXpj4Xf%Eeyd%Ur>BN8&;L3S-SK|~7yy`x V;U%6sJ%|7R002ovPDHLkV1fo32DShI diff --git a/distfiles/icons/plus.png b/distfiles/icons/plus.png deleted file mode 100644 index 4ac1bafbcc6fc7a894a0e7c0a4d58730818477d9..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 521 zcmV+k0`~ohP)z{ZCNSP1$Af}nyR+9m-Ti&ToBV4+6k{;p` z-#5Fbj4}9+4e`g_TS0rVQ;aAyIMiRYV6an&AAiA|cmmL#xdS`}j5=9@fxErFguYvkV#=u%aQalROG7#VQWzx$Phm_MZMF~H~fq)W*mE?vYY>(1{m_}{NJt!C_ zL^KkSAP5A2*=d$#1~-wc!J0GuQV>NEwAKOuG=J5$$ajYN`rZ24hRd4y#MIOE>e8y4 z-*+4bH@DY026RFk$JT{_th*mwc%CQnlNd%zakW}aS^WUC&Mr?&`eqmATwT$4dU$M= zg33zh1Mnls_s7^~Hj|Mg>w%+|q3~xDbGJYqX(2Y25SEea?7A3KEJ$%9f&PJl8eND821JVDLIihG+y!Z@4+2UMgjAcB zHZe`4oxGcwOuXNXGgxuwg)@)uJLk;(4tJPFqXGZ3jCdKp6a|Z=1#Grf5Ji)hW!X7W zo+jx1%}Wq0tEw8VRx3$K+Jj=T0FlT3rh&EyA;7|ZXnfG(I5ltxI-JdRDy#Tb<0W4t zR=GkrK~h>eumeqO;;P|=iyq$F&O>vwI_-748Su2V!02(ovG`~sEU7AJCe%QdWv{A~ zLkodpe3z5OcQ||X!+}}v-spo9eKuGKbn@44#zTY?A>|~C%|f9#H#ux`bh!*vtSAc1 zo^Pi(GiZf;J`e9c@6aA{CQjNMs6j0?s8p)clcO$5sMqThGZS{08sWid-N!y;GCPn+ zBw%gr8;taeRHKies%)>f!%Xfq`gKXlL%Cdmk6()L@I@Mi2V8LZ!V!{u5ilCJ-9R?}1XOM0h;Sqd_)KHJX7aS`&%QvhT3DMua>; zGq}}fr|CVH+Xapj^+30>O^u#`$z)%C6O-`}0nZCM&dqOA{8%pFww6eMA1f}y(7{;1$Z0ha;VV_$h^s#A_ng~Rce`Cff9{I5nkPQQ{Xe!Qbc_3 zInQHlanR{vX}DY2Iz&Io5Q)jT?e&%5_t>qa z-P8&_t<->F7%fn@(=*lIJ#cNNwQa=Du-s9ax+<^l{dgbUj6Zmp-FW?#l+pyXzYTC4 r3xQc1?H>z&kP04N{83Q*OMn3Yq{|~z6546{+H$g#+;$Tn;E*;uh8Zt=nz2ts6Bwq5;Eq&n2J;QyTyXU#@35JZ=TLr+A^+*Js zzuO|li1(fl0wDwdq?AZ0QA#0%;QfswsgMM45!xQI6MM1N;+!MK*gq{soO4)f3$Oqb z!0+SNh(d5C+mH5vjm>Sm_d8U-JC@+-hrif-`-l>NF^2lLHMDVzXB8$+9$@iBqtNru z*{PIIJot_@rr(0rIeD(Be_3TzLRo>|UKb*JzysbZ^jZcT%s9=RS7(69Rzs z`)3n;Z1w|mItU@Kwl{~^f03a=vda*IrWgh;0UWxyj8qDMt+|V7!{OVnQ-1Ew1zH{W z@$?M;%Qf1X`Q@V=`{1n&!K zeQnTkilZ~9*mmI7HZYCloio^Tc@ZHc#7JnabSGWOKnP+8sMFKPsVZd!&GUlNAUs-| zCt8bpbqiU^3I#%Qg;H%E|LHU3YL)a=BD*ufKidlCgvEs}-v9sr07*qoM6N<$f`Co( AFaQ7m diff --git a/distfiles/icons/sym-diag.png b/distfiles/icons/sym-diag.png deleted file mode 100644 index 9e3368e3088d06f6fb1903dcda76234fc8de7665..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 592 zcmV-W0H9ij|}itb~*bg4se4 z#3CSQp==`rZA>I0A!3gBGywrn0MBcJ z0Iw@6hzKDBVvNKX0nl2bwI)dtrf&|l`Icz_FJJ?Vjtr1x8QyzDB+n*-_r3rtPzk`V z;p>P}oF3hZ36Z7cH9`m*G<$bs0}QA~oeG?D%*<8!_^r_TJ7vNpD-hy+Sy?u$sIxM_+2S5y==OcOlS9tr4 zDKh8CoMZ7fCAfE5xy$$b|?*~D2;lbhD^ZlOh`QGz{1`QxU@Q35$yudx;`0j(vW`j}+ zr4#^CN~DyeQYl6kSr_jDw%NSg(ak$T2()(6Ui^HSkAj8R%7jP`uirwFU#|9JHU7+{ z?i}qZ+4?AUW)wTK#Jf^=9#9q9Q}V4zVqsD)-b768=#`!BTM8tAWt!NQ#j;U!6Jk4nPRLpUz{e9Ft~LZv&8Llp7n>+t@hbzrXVj XF|5?O2DN#v00000NkvXXu0mjfo(9wm diff --git a/distfiles/login.php b/distfiles/login.php index 63edf4e..49aa609 100644 --- a/distfiles/login.php +++ b/distfiles/login.php @@ -2,7 +2,7 @@ /* login.php OpenDRS Online Discrepancy Reporting System - Copyright (C) 2018 Rod Wright + Copyright (C) 2020 Rod Wright SPDX-License-Identifier: GPL-2.0 */ diff --git a/distfiles/profile.php b/distfiles/profile.php index b160bef..bf99e6d 100644 --- a/distfiles/profile.php +++ b/distfiles/profile.php @@ -2,7 +2,7 @@ /* profile.php OpenDRS Online Discrepancy Reporting System - Copyright (C) 2018 Rod Wright + Copyright (C) 2020 Rod Wright SPDX-License-Identifier: GPL-2.0 */ diff --git a/distfiles/search.php b/distfiles/search.php index 2e6aebd..ab88b9d 100644 --- a/distfiles/search.php +++ b/distfiles/search.php @@ -2,7 +2,7 @@ /* search.php OpenDRS Online Discrepancy Reporting System - Copyright (C) 2018 Rod Wright + Copyright (C) 2020 Rod Wright SPDX-License-Identifier: GPL-2.0 */ @@ -42,9 +42,12 @@ $s_action_by=$incoming['s_action_by']; $s_action_reason=$incoming['s_action_reason']; $s_action_text=$incoming['s_action_text']; $s_subsystem=$incoming['s_subsystem']; +$s_id=$incoming['s_id']; $s_discrepancy_text=$incoming['s_discrepancy_text']; $s_status=$incoming['s_status']; $s_group=$incoming['s_group']; +$sort=$incoming['sort']; +$order=$incoming['order']; // assign variables from constants $appname=APP_NAME; @@ -79,6 +82,7 @@ if ($search) { $s_reported_by=trim($s_reported_by); $s_action_text=trim($s_action_text); $s_discrepancy_text=trim($s_discrepancy_text); + $s_id=trim($s_id); // build the query string $query_string=""; @@ -114,6 +118,16 @@ if ($search) { $query_string="{$query_string})"; $query_string="{$query_string} and "; } + // id + if ($s_id) { + $query_string="{$query_string}("; + $query_string="{$query_string}id={$s_id}"; + $query_string="{$query_string})"; + $query_string="{$query_string} and "; + $id_param="ID: {$s_id}"; + } else { + $id_param="ID: any"; + } // period if ($s_period) { $query_string="{$query_string}("; @@ -265,7 +279,7 @@ if ($search) { } $query_string=rtrim($query_string," and "); - $query_string="select * from writeups where {$query_string} order by report_date asc"; + $query_string="select * from writeups where {$query_string} order by $sort $order"; // group membership if ($s_group) { @@ -301,6 +315,16 @@ if (!$print) { "; + // ID cell ***************** + echo " + ID
+ + "; + // ********************************** + echo " + + + "; // Device cell ********************* echo " Device
@@ -340,7 +364,7 @@ if (!$print) { "; // ********************************** echo " - + "; echo " @@ -566,6 +590,44 @@ if (!$print) { } else { $summarystat="checked"; } + $idsort=$statussort=$datesort=$periodsort=$devicesort=$subsyssort=$repbysort=$discrepsort=$effsort=""; + switch ($sort) { + case "id": + $idsort="checked"; + break; + case "status": + $statussort="checked"; + break; + case "report_date": + $datesort="checked"; + break; + case "period": + $periodsort="checked"; + break; + case "device": + $devicesort="checked"; + break; + case "subsystem": + $subsyssort="checked"; + break; + case "reported_by": + $repbysort="checked"; + break; + case "discrepancy_text": + $discrepsort="checked"; + break; + case "period_effective": + $effsort="checked"; + break; + default: + $datesort="checked"; + } + $ascsort=$descsort=""; + if ($order=="desc") { + $descsort="checked"; + } else { + $ascsort="checked"; + } echo " @@ -573,6 +635,20 @@ if (!$print) {    

+ Sort Field:
+     +     +     +     +     +     +     +     +     +
Sort Order:
+     +     +

        @@ -602,6 +678,7 @@ if ($search) { $status_param    $device_param    $subsystem_param    + $id_param    diff --git a/distfiles/settings.php b/distfiles/settings.php index 8e9a7fa..6a53f83 100644 --- a/distfiles/settings.php +++ b/distfiles/settings.php @@ -2,7 +2,7 @@ /* settings.php OpenDRS Online Discrepancy Reporting System - Copyright (C) 2018 Rod Wright + Copyright (C) 2020 Rod Wright SPDX-License-Identifier: GPL-2.0 */ diff --git a/distfiles/writeupdetail.php b/distfiles/writeupdetail.php index b43f252..9c013c3 100644 --- a/distfiles/writeupdetail.php +++ b/distfiles/writeupdetail.php @@ -2,7 +2,7 @@ /* writeupdetail.php OpenDRS Online Discrepancy Reporting System - Copyright (C) 2018 Rod Wright + Copyright (C) 2020 Rod Wright SPDX-License-Identifier: GPL-2.0 */ diff --git a/distfiles/writeups.php b/distfiles/writeups.php index ab1842a..2a3037b 100644 --- a/distfiles/writeups.php +++ b/distfiles/writeups.php @@ -2,7 +2,7 @@ /* writeups.php OpenDRS Online Discrepancy Reporting System - Copyright (C) 2018 Rod Wright + Copyright (C) 2020 Rod Wright SPDX-License-Identifier: GPL-2.0 */ @@ -58,7 +58,6 @@ function opentable($start_date,$end_date,$print,$drs_db,$viewtype="summary") { "; if ($print) { echo " - Open writeups between   $start_date and $end_date "; } else { @@ -175,20 +174,27 @@ function viewtable($start_date,$end_date,$print,$drs_db,$viewtype="summary",$rol echo " - Writeups between   -    and    -        "; if(!$print) { echo " -                             -

+        + "; + } + echo " + Writeups between   +    and    +

+ "; + if(!$print) { + echo "     -

"; +        +

+ "; } $writeup=mysqli_query($drs_db,"select * from writeups where report_date between \"$start_date\" and \"$end_date\" order by report_date desc,period desc,report_time desc"); if (mysqli_num_rows($writeup)) { @@ -306,7 +312,7 @@ function viewtable($start_date,$end_date,$print,$drs_db,$viewtype="summary",$rol if ($role) { echo "

-     "; $tgrow=mysqli_query($drs_db,"select id,name from groups order by id asc"); @@ -315,6 +321,7 @@ function viewtable($start_date,$end_date,$print,$drs_db,$viewtype="summary",$rol } echo " +     "; } } else { diff --git a/install.sh b/install.sh index 6ae1752..5dcd23d 100644 --- a/install.sh +++ b/install.sh @@ -2,12 +2,12 @@ # install.sh # OpenDRS Online Discrepancy Reporting System -# Copyright (C) 2018 Rod Wright +# Copyright (C) 2020 Rod Wright # SPDX-License-Identifier: GPL-2.0 -DRS_VERSION="1.1.0" +DRS_VERSION="1.1.1" DOC_ROOT="/var/www" INSTALL_LOC="opendrs" APACHE_USER="www-data" @@ -42,15 +42,6 @@ echo "" echo -n "Enter name of OpenDRS installation directory [$INSTALL_LOC] :" read install_loc_in echo "" -echo "In order to set the ownership correctly, we need to know the user and" -echo "group that the webserver expects its files to be owned by. This is" -echo "usually not the root account. Refer to the ownership of other files in" -echo "your webserver's document tree to see what this should be." -echo "Enter the user and group separated by a colon (username:groupname)." -echo "Enter the user:group of the OpenDRS installation" -echo -n "directory [$APACHE_USER:$APACHE_GROUP] :" -read httpd_user_group -echo "" if [ "$doc_root_in" = "" ] then doc_root_in=$DOC_ROOT @@ -59,10 +50,6 @@ if [ "$install_loc_in" = "" ] then install_loc_in=$INSTALL_LOC fi -if [ "$httpd_user_group" = "" ] -then - httpd_user_group="$APACHE_USER:$APACHE_GROUP" -fi install_path="$doc_root_in/$install_loc_in" if [ -d "$install_path" ] then @@ -90,22 +77,36 @@ then curr_dbname=`grep dbname $install_path/db.php | head -1 | cut -d "\"" -f2` curr_username=`grep username $install_path/db.php | head -1 | cut -d "\"" -f2` curr_dbpass=`grep dbpass $install_path/db.php | head -1 | cut -d "\"" -f2` - mysqldump -u"$curr_username" -p"$curr_dbpass" $curr_dbname > $curr_dbname-`date +%Y-%m-%d_%H:%M:%S`-backup.sql + export MYSQL_PWD="$curr_dbpass" + mysqldump -u"$curr_username" $curr_dbname > $curr_dbname-`date +%Y-%m-%d_%H:%M:%S`-backup.sql # back up existing installation echo "Backing up current installation to the package directory." cp -R $install_path $install_loc_in-`date +%Y-%m-%d_%H:%M:%S`-backup # delete all existing installation files except db.php find $install_path/ -mindepth 1 -not -name 'db.php' -delete # apply database updates - mysql -u"$curr_username" -p"$curr_dbpass" $curr_dbname < opendrs-update.sql + mysql -u"$curr_username" $curr_dbname < opendrs-update.sql >/dev/null 2>&1 # apply updates to existing db.php ./opendrs-update.sh $install_path # copy distribution to install location echo "Installing distribution . . ." cp -R distfiles/* $install_path # set ownership + echo "In order to set the ownership correctly, we need to know the user and" + echo "group that the webserver expects its files to be owned by. This is" + echo "usually not the root account. Refer to the ownership of other files in" + echo "your webserver's document tree to see what this should be." + echo "Enter the user and group separated by a colon (username:groupname)." + echo "Enter the user:group of the OpenDRS installation" + echo -n "directory [$APACHE_USER:$APACHE_GROUP] :" + read httpd_user_group + if [ "$httpd_user_group" = "" ] + then + httpd_user_group="$APACHE_USER:$APACHE_GROUP" + fi + echo "" echo "Setting file ownership . . ." - chown -R $httpd_user_group $install_path + chown -R $httpd_user_group $install_path else echo "Cancelling installation" exit @@ -138,7 +139,8 @@ else echo "" echo -n "MySQL admin password: " read -s mysql_adm_pass - mysql -u"$mysql_adm_user" -p"$mysql_adm_pass" -e "create database $admintestdb;drop database $admintestdb" 2>/dev/null + export MYSQL_PWD="$mysql_adm_pass" + mysql -u"$mysql_adm_user" -e "create database $admintestdb;drop database $admintestdb" if [ $? -eq 0 ] then bad_mysql_adm=0 @@ -171,8 +173,13 @@ else echo "distinctive name." echo -n "database name [opendrs]: " read new_db_name + if [ "$new_db_name" = "" ] + then + new_db_name=opendrs + fi echo "" - mysql -u"$mysql_adm_user" -p"$mysql_adm_pass" -e "create database $new_db_name" 2>/dev/null + export MYSQL_PWD="$mysql_adm_pass" + mysql -u"$mysql_adm_user" -e "create database $new_db_name" if [ $? -eq 0 ] then db_create_fail=0 @@ -191,15 +198,17 @@ else # Create user and give rights to database drs_user="$new_db_name`date +%Y%m%d%H%M%S`" drs_pass=`uuidgen` - mysql -u"$mysql_adm_user" -p"$mysql_adm_pass" -e "create user if not exists '$drs_user'@'localhost' identified by '$drs_pass'" 2>/dev/null - mysql -u"$mysql_adm_user" -p"$mysql_adm_pass" -e "grant all on $new_db_name.* to '$drs_user'@'localhost'" - mysql -u"$mysql_adm_user" -p"$mysql_adm_pass" -e "flush privileges" + export MYSQL_PWD="$mysql_adm_pass" + mysql -u"$mysql_adm_user" -e "create user if not exists '$drs_user'@'localhost' identified by '$drs_pass'" + mysql -u"$mysql_adm_user" -e "grant all on $new_db_name.* to '$drs_user'@'localhost'" + mysql -u"$mysql_adm_user" -e "flush privileges" # Populate initial database - mysql -u"$mysql_adm_user" -p"$mysql_adm_pass" $new_db_name < opendrs-initial.sql 2>/dev/null + mysql -u"$mysql_adm_user" $new_db_name < opendrs-initial.sql # Set the installation name - mysql -u"$drs_user" -p"$drs_pass" $new_db_name -e "update config set value=\"$new_inst_name\",defaultvalue=\"$new_inst_name\" where name=\"app_name\"" + export MYSQL_PWD="$drs_pass" + mysql -u"$drs_user" $new_db_name -e "update config set value=\"$new_inst_name\",defaultvalue=\"$new_inst_name\" where name=\"app_name\"" # Create install path echo "Creating installation directory . . ." @@ -219,8 +228,21 @@ else cp -Rv distfiles/* $install_path # set ownership + echo "In order to set the ownership correctly, we need to know the user and" + echo "group that the webserver expects its files to be owned by. This is" + echo "usually not the root account. Refer to the ownership of other files in" + echo "your webserver's document tree to see what this should be." + echo "Enter the user and group separated by a colon (username:groupname)." + echo "Enter the user:group of the OpenDRS installation" + echo -n "directory [$APACHE_USER:$APACHE_GROUP] :" + read httpd_user_group + if [ "$httpd_user_group" = "" ] + then + httpd_user_group="$APACHE_USER:$APACHE_GROUP" + fi + echo "" echo "Setting file ownership . . ." - chown -R $httpd_user_group $install_path + chown -R $httpd_user_group $install_path fi echo "" diff --git a/opendrs-initial.sql b/opendrs-initial.sql index 497078a..9a6143b 100644 --- a/opendrs-initial.sql +++ b/opendrs-initial.sql @@ -63,7 +63,7 @@ CREATE TABLE `config` ( LOCK TABLES `config` WRITE; /*!40000 ALTER TABLE `config` DISABLE KEYS */; -INSERT INTO `config` VALUES (1,'drs_version','1.1.0','1.1.0'),(5,'app_name','OpenDRS - Discrepancy Reporting System','OpenDRS Discrepancy Reporting System'),(6,'banner','1','1'),(7,'background_color','0B3144','0B3144'),(8,'p_background_color','FFFFFF','FFFFFF'),(11,'menubg_color','000000','000000'),(12,'p_menubg_color','FFFFFF','FFFFFF'),(13,'text_color','FFFFFF','FFFFFF'),(14,'p_text_color','000000','000000'),(15,'link_color','79EFEA','79EFEA'),(16,'p_link_color','000000','000000'),(17,'vlink_color','79EFEA','79EFEA'),(18,'p_vlink_color','000000','000000'),(19,'heading_color','5AE2B3','5AE2B3'),(20,'p_heading_color','000000','000000'),(21,'footer_message','Please report bugs to Rod Wright (software@rodsplace.net)','Please report bugs to Rod Wright (software@rodsplace.net)'),(26,'unix_server_session_dir','/tmp/opendrs/opendrs/sessions','/tmp/opendrs/opendrs/sessions'),(27,'win_server_session_dir','c:\\Windows\\Temp\\opendrs\\opendrs\\sessions','c:\\Windows\\Temp\\opendrs\\opendrs\\sessions'),(28,'session_ttl_days','30','30'),(29,'period_eff_help_txt','If maintenance issues prevented the training objectives from being achieved and you will have to come back and redo the same training, answer Non-effective. Otherwise, answer Effective.','If maintenance issues prevented the training objectives from being achieved and you will have to come back and redo the same training, answer Non-effective. Otherwise, answer Effective.'); +INSERT INTO `config` VALUES (1,'drs_version','1.1.1','1.1.1'),(5,'app_name','OpenDRS - Discrepancy Reporting System','OpenDRS Discrepancy Reporting System'),(6,'banner','1','1'),(7,'background_color','0B3144','0B3144'),(8,'p_background_color','FFFFFF','FFFFFF'),(11,'menubg_color','000000','000000'),(12,'p_menubg_color','FFFFFF','FFFFFF'),(13,'text_color','FFFFFF','FFFFFF'),(14,'p_text_color','000000','000000'),(15,'link_color','79EFEA','79EFEA'),(16,'p_link_color','000000','000000'),(17,'vlink_color','79EFEA','79EFEA'),(18,'p_vlink_color','000000','000000'),(19,'heading_color','5AE2B3','5AE2B3'),(20,'p_heading_color','000000','000000'),(21,'footer_message','Please report bugs to Rod Wright (software@rodsplace.net)','Please report bugs to Rod Wright (software@rodsplace.net)'),(26,'unix_server_session_dir','/tmp/opendrs/opendrs/sessions','/tmp/opendrs/opendrs/sessions'),(27,'win_server_session_dir','c:\\Windows\\Temp\\opendrs\\opendrs\\sessions','c:\\Windows\\Temp\\opendrs\\opendrs\\sessions'),(28,'session_ttl_days','30','30'),(29,'period_eff_help_txt','If maintenance issues prevented the training objectives from being achieved and you will have to come back and redo the same training, answer Non-effective. Otherwise, answer Effective.','If maintenance issues prevented the training objectives from being achieved and you will have to come back and redo the same training, answer Non-effective. Otherwise, answer Effective.'); /*!40000 ALTER TABLE `config` ENABLE KEYS */; UNLOCK TABLES; diff --git a/opendrs-update.sql b/opendrs-update.sql index 6d42c01..9462352 100644 --- a/opendrs-update.sql +++ b/opendrs-update.sql @@ -1,22 +1,36 @@ -# opendrs-update.sql +-- opendrs-update.sql -# ---------- version 1.1.0 ------------- -# Update version number -update config set name="drs_version" where name="mts_version"; -update config set value="1.1.0",defaultvalue="1.1.0" where name="drs_version"; +-- ---------- version 1.1.0 ------------- +-- Update version number +UPDATE config SET name="drs_version" WHERE name="mts_version"; +UPDATE config SET value="1.1.0",defaultvalue="1.1.0" WHERE name="drs_version"; -# Add period_eff_help_txt to config table -insert into config(name,value,defaultvalue) -select * from -(select 'period_eff_help_txt', -'If maintenance issues prevented the training objectives from being achieved and you will have to come back and redo the same training, answer Non-effective. Otherwise, answer Effective.' as wval, -'If maintenance issues prevented the training objectives from being achieved and you will have to come back and redo the same training, answer Non-effective. Otherwise, answer Effective.' as dval +-- Add period_eff_help_txt to config table +INSERT INTO config(name,value,defaultvalue) +SELECT * FROM +(SELECT 'period_eff_help_txt', +'If maintenance issues prevented the training objectives from being achieved and you will have to come back and redo the same training, answer Non-effective. Otherwise, answer Effective.' AS wval, +'If maintenance issues prevented the training objectives from being achieved and you will have to come back and redo the same training, answer Non-effective. Otherwise, answer Effective.' AS dval ) -as tmp -where not exists +AS tmp +WHERE NOT EXISTS ( -select name from config where name = 'period_eff_help_txt' -) limit 1 +SELECT name FROM config WHERE name = 'period_eff_help_txt' +) LIMIT 1 ; -# --------------------------------------- +-- -------------------------------------- +-- ---------- version 1.1.1 ------------- +-- Update version number +UPDATE config SET value="1.1.1",defaultvalue="1.1.1" WHERE name="drs_version"; + +-- Rename the trainers table to devices +RENAME TABLE trainers TO devices; + +-- Update default app name +UPDATE config SET defaultvalue="OpenDRS Discrepancy Reporting System" WHERE name="app_name"; + +-- Update default session directories +UPDATE config SET defaultvalue="/tmp/opendrs/opendrs/sessions" WHERE name="unix_server_session_dir"; +UPDATE config SET defaultvalue="c:\Windows\Temp\opendrs\opendrs\sessions" WHERE name="win_server_session_dir"; +-- --------------------------------------