Various reformats. Changed boolean variables from 1/0 to TRUE/FALSE in multiple files.
This commit is contained in:
3
BUGS
3
BUGS
@@ -1,4 +1,5 @@
|
|||||||
BUGS
|
BUGS
|
||||||
|
|
||||||
1. Adding a reference to a note using the magnifying glass icon is possible even if not logged in. This results in a blank tech and shift.
|
1. Adding a reference to a note using the magnifying glass icon is possible even if not logged in. This results in a blank tech and shift.
|
||||||
SOMEWHAT FIXED. If not logged in and the partview argument is not 1, redirects to login page. (This is not the optimal solution. There needs to be a specific view only state.)
|
SOMEWHAT FIXED. If not logged in and the partview argument is not 1, redirects to login page. (This is not the optimal solution. There
|
||||||
|
needs to be a specific view only state.)
|
||||||
|
|||||||
8
TODO.txt
8
TODO.txt
@@ -1,15 +1,15 @@
|
|||||||
TODO.txt
|
TODO.txt
|
||||||
|
|
||||||
1. Create a weblink hot button on the add logbook entry page to insert a weblink. DONE
|
1. Create a weblink hot button on the add logbook entry page to insert a weblink. DONE
|
||||||
2. Allow admins to create global templates.
|
2. Allow admins to create global templates. DONE
|
||||||
3. Create a way to restore the global page colors. (db change reqd)
|
3. Create a way to restore the global page colors. (db change reqd)
|
||||||
4. Pick a logbook subject to associate with a scheduled task to populate for the logbook entry. (db change reqd)
|
4. Pick a logbook subject to associate with a scheduled task to populate for the logbook entry. (db change reqd)
|
||||||
5. Add info messages to scheduled task page edits.
|
5. Add info messages to scheduled task page edits.
|
||||||
6. Allow scheduled tasks to be completed as a group instead of having to complete each member.
|
6. Allow scheduled tasks to be completed as a group instead of having to complete each member.
|
||||||
7. Implement popup calendars for date entry fields. DONE
|
7. Implement popup calendars for date entry fields. DONE
|
||||||
8. Improve template management interface. It can be confusing. It needs its own page.
|
8. Improve template management interface. It can be confusing. It needs its own page. DONE
|
||||||
9. Remove refs from templates. (db change reqd)
|
9. Remove refs from templates. (db change reqd) DONE
|
||||||
10. Replace dynamic flag_ table creation with a flagassignment table. (db change reqd)
|
10. Replace dynamic flag_ table creation with a flagassignment table. (db change reqd) DONE
|
||||||
11. allow partids to be autogenerated if user doesn't supply one (db change reqd)
|
11. allow partids to be autogenerated if user doesn't supply one (db change reqd)
|
||||||
12. If there are no flags, don't offer to set them on reference chain
|
12. If there are no flags, don't offer to set them on reference chain
|
||||||
13. make some flags immutable so they won't be synced on reference chain.
|
13. make some flags immutable so they won't be synced on reference chain.
|
||||||
|
|||||||
@@ -4,24 +4,36 @@
|
|||||||
-- ------------------------------------------------------
|
-- ------------------------------------------------------
|
||||||
-- Server version 10.6.18-MariaDB-0ubuntu0.22.04.1
|
-- Server version 10.6.18-MariaDB-0ubuntu0.22.04.1
|
||||||
|
|
||||||
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
|
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */
|
||||||
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
|
;
|
||||||
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
|
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */
|
||||||
/*!40101 SET NAMES utf8mb4 */;
|
;
|
||||||
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
|
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */
|
||||||
/*!40103 SET TIME_ZONE='+00:00' */;
|
;
|
||||||
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
|
/*!40101 SET NAMES utf8mb4 */
|
||||||
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
|
;
|
||||||
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
|
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */
|
||||||
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
|
;
|
||||||
|
/*!40103 SET TIME_ZONE='+00:00' */
|
||||||
|
;
|
||||||
|
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */
|
||||||
|
;
|
||||||
|
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */
|
||||||
|
;
|
||||||
|
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */
|
||||||
|
;
|
||||||
|
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */
|
||||||
|
;
|
||||||
|
|
||||||
--
|
--
|
||||||
-- Table structure for table `banners`
|
-- Table structure for table `banners`
|
||||||
--
|
--
|
||||||
|
|
||||||
DROP TABLE IF EXISTS `banners`;
|
DROP TABLE IF EXISTS `banners`;
|
||||||
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
/*!40101 SET @saved_cs_client = @@character_set_client */
|
||||||
/*!40101 SET character_set_client = utf8 */;
|
;
|
||||||
|
/*!40101 SET character_set_client = utf8 */
|
||||||
|
;
|
||||||
CREATE TABLE `banners` (
|
CREATE TABLE `banners` (
|
||||||
`bannerid` int(11) NOT NULL AUTO_INCREMENT,
|
`bannerid` int(11) NOT NULL AUTO_INCREMENT,
|
||||||
`bannername` tinytext DEFAULT NULL,
|
`bannername` tinytext DEFAULT NULL,
|
||||||
@@ -29,21 +41,50 @@ CREATE TABLE `banners` (
|
|||||||
`textcolor` tinytext DEFAULT NULL,
|
`textcolor` tinytext DEFAULT NULL,
|
||||||
PRIMARY KEY (`bannerid`)
|
PRIMARY KEY (`bannerid`)
|
||||||
) ENGINE = InnoDB AUTO_INCREMENT = 6 DEFAULT CHARSET = utf8mb4 COLLATE = utf8mb4_general_ci;
|
) ENGINE = InnoDB AUTO_INCREMENT = 6 DEFAULT CHARSET = utf8mb4 COLLATE = utf8mb4_general_ci;
|
||||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
/*!40101 SET character_set_client = @saved_cs_client */
|
||||||
|
;
|
||||||
|
|
||||||
--
|
--
|
||||||
-- Dumping data for table `banners`
|
-- Dumping data for table `banners`
|
||||||
--
|
--
|
||||||
|
|
||||||
LOCK TABLES `banners` WRITE;
|
LOCK TABLES `banners` WRITE;
|
||||||
/*!40000 ALTER TABLE `banners` DISABLE KEYS */;
|
/*!40000 ALTER TABLE `banners` DISABLE KEYS */
|
||||||
INSERT INTO `banners` VALUES
|
;
|
||||||
(1,'no banner','#000000','#000000'),
|
INSERT INTO
|
||||||
(2,'UNCLASSIFIED','#009900','#FFFFFF'),
|
`banners`
|
||||||
(3,'CONFIDENTIAL','#000099','#FFFFFF'),
|
VALUES (
|
||||||
(4,'SECRET','#990000','#FFFFFF'),
|
1,
|
||||||
(5,'TOP SECRET','#FF6600','#FFFFFF');
|
'no banner',
|
||||||
/*!40000 ALTER TABLE `banners` ENABLE KEYS */;
|
'#000000',
|
||||||
|
'#000000'
|
||||||
|
),
|
||||||
|
(
|
||||||
|
2,
|
||||||
|
'UNCLASSIFIED',
|
||||||
|
'#009900',
|
||||||
|
'#FFFFFF'
|
||||||
|
),
|
||||||
|
(
|
||||||
|
3,
|
||||||
|
'CONFIDENTIAL',
|
||||||
|
'#000099',
|
||||||
|
'#FFFFFF'
|
||||||
|
),
|
||||||
|
(
|
||||||
|
4,
|
||||||
|
'SECRET',
|
||||||
|
'#990000',
|
||||||
|
'#FFFFFF'
|
||||||
|
),
|
||||||
|
(
|
||||||
|
5,
|
||||||
|
'TOP SECRET',
|
||||||
|
'#FF6600',
|
||||||
|
'#FFFFFF'
|
||||||
|
);
|
||||||
|
/*!40000 ALTER TABLE `banners` ENABLE KEYS */
|
||||||
|
;
|
||||||
UNLOCK TABLES;
|
UNLOCK TABLES;
|
||||||
|
|
||||||
--
|
--
|
||||||
@@ -51,8 +92,10 @@ UNLOCK TABLES;
|
|||||||
--
|
--
|
||||||
|
|
||||||
DROP TABLE IF EXISTS `configs`;
|
DROP TABLE IF EXISTS `configs`;
|
||||||
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
/*!40101 SET @saved_cs_client = @@character_set_client */
|
||||||
/*!40101 SET character_set_client = utf8 */;
|
;
|
||||||
|
/*!40101 SET character_set_client = utf8 */
|
||||||
|
;
|
||||||
CREATE TABLE `configs` (
|
CREATE TABLE `configs` (
|
||||||
`confid` int(11) NOT NULL AUTO_INCREMENT,
|
`confid` int(11) NOT NULL AUTO_INCREMENT,
|
||||||
`confname` text DEFAULT NULL,
|
`confname` text DEFAULT NULL,
|
||||||
@@ -60,46 +103,98 @@ CREATE TABLE `configs` (
|
|||||||
PRIMARY KEY (`confid`),
|
PRIMARY KEY (`confid`),
|
||||||
UNIQUE (`confname`)
|
UNIQUE (`confname`)
|
||||||
) ENGINE = InnoDB AUTO_INCREMENT = 33 DEFAULT CHARSET = utf8mb4 COLLATE = utf8mb4_general_ci;
|
) ENGINE = InnoDB AUTO_INCREMENT = 33 DEFAULT CHARSET = utf8mb4 COLLATE = utf8mb4_general_ci;
|
||||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
/*!40101 SET character_set_client = @saved_cs_client */
|
||||||
|
;
|
||||||
|
|
||||||
--
|
--
|
||||||
-- Dumping data for table `configs`
|
-- Dumping data for table `configs`
|
||||||
--
|
--
|
||||||
|
|
||||||
LOCK TABLES `configs` WRITE;
|
LOCK TABLES `configs` WRITE;
|
||||||
/*!40000 ALTER TABLE `configs` DISABLE KEYS */;
|
/*!40000 ALTER TABLE `configs` DISABLE KEYS */
|
||||||
INSERT INTO `configs` VALUES
|
;
|
||||||
(1,'ol_version','5.2.4'),
|
INSERT INTO
|
||||||
|
`configs`
|
||||||
|
VALUES (1, 'ol_version', '5.2.4'),
|
||||||
(2, 'log_name', 'OpenLog'),
|
(2, 'log_name', 'OpenLog'),
|
||||||
(3, 'banner', '1'),
|
(3, 'banner', '1'),
|
||||||
(4,'background_color','#003333'),
|
(
|
||||||
(5,'p_background_color','#FFFFFF'),
|
4,
|
||||||
|
'background_color',
|
||||||
|
'#003333'
|
||||||
|
),
|
||||||
|
(
|
||||||
|
5,
|
||||||
|
'p_background_color',
|
||||||
|
'#FFFFFF'
|
||||||
|
),
|
||||||
(6, 'sidebar_color', '#336666'),
|
(6, 'sidebar_color', '#336666'),
|
||||||
(7,'p_sidebar_color','#FFFFFF'),
|
(
|
||||||
|
7,
|
||||||
|
'p_sidebar_color',
|
||||||
|
'#FFFFFF'
|
||||||
|
),
|
||||||
(8, 'menubg_color', '#000000'),
|
(8, 'menubg_color', '#000000'),
|
||||||
(9,'p_menubg_color','#FFFFFF'),
|
(
|
||||||
|
9,
|
||||||
|
'p_menubg_color',
|
||||||
|
'#FFFFFF'
|
||||||
|
),
|
||||||
(10, 'text_color', '#FFFFFF'),
|
(10, 'text_color', '#FFFFFF'),
|
||||||
(11, 'p_text_color', '#000000'),
|
(11, 'p_text_color', '#000000'),
|
||||||
(12, 'link_color', '#00FF00'),
|
(12, 'link_color', '#00FF00'),
|
||||||
(13, 'p_link_color', '#000000'),
|
(13, 'p_link_color', '#000000'),
|
||||||
(14, 'vlink_color', '#00FF00'),
|
(14, 'vlink_color', '#00FF00'),
|
||||||
(15,'p_vlink_color','#000000'),
|
(
|
||||||
(16,'heading_color','#00FFFF'),
|
15,
|
||||||
(17,'p_heading_color','#000000'),
|
'p_vlink_color',
|
||||||
(18,'footer_message','Please report bugs to software@thermionic.net.'),
|
'#000000'
|
||||||
|
),
|
||||||
|
(
|
||||||
|
16,
|
||||||
|
'heading_color',
|
||||||
|
'#00FFFF'
|
||||||
|
),
|
||||||
|
(
|
||||||
|
17,
|
||||||
|
'p_heading_color',
|
||||||
|
'#000000'
|
||||||
|
),
|
||||||
|
(
|
||||||
|
18,
|
||||||
|
'footer_message',
|
||||||
|
'Please report bugs to software@thermionic.net.'
|
||||||
|
),
|
||||||
(19, 'show_ts', '1'),
|
(19, 'show_ts', '1'),
|
||||||
(20, 'url_chunk_size', '70'),
|
(20, 'url_chunk_size', '70'),
|
||||||
(21, 'tech_alpha', '1'),
|
(21, 'tech_alpha', '1'),
|
||||||
(22, 'subj_alpha', '1'),
|
(22, 'subj_alpha', '1'),
|
||||||
(23,'unix_server_session_dir','/tmp/openlog/openlog/sessions'),
|
(
|
||||||
(24,'win_server_session_dir','c:\\Windows\\Temp\\openlog\\\\openlog\\sessions'),
|
23,
|
||||||
|
'unix_server_session_dir',
|
||||||
|
'/tmp/openlog/openlog/sessions'
|
||||||
|
),
|
||||||
|
(
|
||||||
|
24,
|
||||||
|
'win_server_session_dir',
|
||||||
|
'c:\\Windows\\Temp\\openlog\\\\openlog\\sessions'
|
||||||
|
),
|
||||||
(25, 'session_ttl_days', '30'),
|
(25, 'session_ttl_days', '30'),
|
||||||
(26, 'log_style', '1'),
|
(26, 'log_style', '1'),
|
||||||
(27,'uid_text','Part ID Number'),
|
(
|
||||||
|
27,
|
||||||
|
'uid_text',
|
||||||
|
'Part ID Number'
|
||||||
|
),
|
||||||
(28, 'parts_functions', '1'),
|
(28, 'parts_functions', '1'),
|
||||||
(29,'schedmaint_functions','1'),
|
(
|
||||||
|
29,
|
||||||
|
'schedmaint_functions',
|
||||||
|
'1'
|
||||||
|
),
|
||||||
(30, 'log_errors', '0');
|
(30, 'log_errors', '0');
|
||||||
/*!40000 ALTER TABLE `configs` ENABLE KEYS */;
|
/*!40000 ALTER TABLE `configs` ENABLE KEYS */
|
||||||
|
;
|
||||||
UNLOCK TABLES;
|
UNLOCK TABLES;
|
||||||
|
|
||||||
--
|
--
|
||||||
@@ -107,8 +202,10 @@ UNLOCK TABLES;
|
|||||||
--
|
--
|
||||||
|
|
||||||
DROP TABLE IF EXISTS `customs`;
|
DROP TABLE IF EXISTS `customs`;
|
||||||
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
/*!40101 SET @saved_cs_client = @@character_set_client */
|
||||||
/*!40101 SET character_set_client = utf8 */;
|
;
|
||||||
|
/*!40101 SET character_set_client = utf8 */
|
||||||
|
;
|
||||||
CREATE TABLE `customs` (
|
CREATE TABLE `customs` (
|
||||||
`customid` int(11) NOT NULL AUTO_INCREMENT,
|
`customid` int(11) NOT NULL AUTO_INCREMENT,
|
||||||
`customtech` int(11) DEFAULT NULL,
|
`customtech` int(11) DEFAULT NULL,
|
||||||
@@ -116,15 +213,18 @@ CREATE TABLE `customs` (
|
|||||||
`customconfvalue` text DEFAULT NULL,
|
`customconfvalue` text DEFAULT NULL,
|
||||||
PRIMARY KEY (`customid`)
|
PRIMARY KEY (`customid`)
|
||||||
) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4 COLLATE = utf8mb4_general_ci;
|
) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4 COLLATE = utf8mb4_general_ci;
|
||||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
/*!40101 SET character_set_client = @saved_cs_client */
|
||||||
|
;
|
||||||
|
|
||||||
--
|
--
|
||||||
-- Dumping data for table `customs`
|
-- Dumping data for table `customs`
|
||||||
--
|
--
|
||||||
|
|
||||||
LOCK TABLES `customs` WRITE;
|
LOCK TABLES `customs` WRITE;
|
||||||
/*!40000 ALTER TABLE `customs` DISABLE KEYS */;
|
/*!40000 ALTER TABLE `customs` DISABLE KEYS */
|
||||||
/*!40000 ALTER TABLE `customs` ENABLE KEYS */;
|
;
|
||||||
|
/*!40000 ALTER TABLE `customs` ENABLE KEYS */
|
||||||
|
;
|
||||||
UNLOCK TABLES;
|
UNLOCK TABLES;
|
||||||
|
|
||||||
--
|
--
|
||||||
@@ -132,23 +232,28 @@ UNLOCK TABLES;
|
|||||||
--
|
--
|
||||||
|
|
||||||
DROP TABLE IF EXISTS `devicegroups`;
|
DROP TABLE IF EXISTS `devicegroups`;
|
||||||
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
/*!40101 SET @saved_cs_client = @@character_set_client */
|
||||||
/*!40101 SET character_set_client = utf8 */;
|
;
|
||||||
|
/*!40101 SET character_set_client = utf8 */
|
||||||
|
;
|
||||||
CREATE TABLE `devicegroups` (
|
CREATE TABLE `devicegroups` (
|
||||||
`groupid` int(11) NOT NULL AUTO_INCREMENT,
|
`groupid` int(11) NOT NULL AUTO_INCREMENT,
|
||||||
`groupdevice` int(11) DEFAULT NULL,
|
`groupdevice` int(11) DEFAULT NULL,
|
||||||
`memberdevice` int(11) DEFAULT NULL,
|
`memberdevice` int(11) DEFAULT NULL,
|
||||||
PRIMARY KEY (`groupid`)
|
PRIMARY KEY (`groupid`)
|
||||||
) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4 COLLATE = utf8mb4_general_ci;
|
) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4 COLLATE = utf8mb4_general_ci;
|
||||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
/*!40101 SET character_set_client = @saved_cs_client */
|
||||||
|
;
|
||||||
|
|
||||||
--
|
--
|
||||||
-- Dumping data for table `devicegroups`
|
-- Dumping data for table `devicegroups`
|
||||||
--
|
--
|
||||||
|
|
||||||
LOCK TABLES `devicegroups` WRITE;
|
LOCK TABLES `devicegroups` WRITE;
|
||||||
/*!40000 ALTER TABLE `devicegroups` DISABLE KEYS */;
|
/*!40000 ALTER TABLE `devicegroups` DISABLE KEYS */
|
||||||
/*!40000 ALTER TABLE `devicegroups` ENABLE KEYS */;
|
;
|
||||||
|
/*!40000 ALTER TABLE `devicegroups` ENABLE KEYS */
|
||||||
|
;
|
||||||
UNLOCK TABLES;
|
UNLOCK TABLES;
|
||||||
|
|
||||||
--
|
--
|
||||||
@@ -156,8 +261,10 @@ UNLOCK TABLES;
|
|||||||
--
|
--
|
||||||
|
|
||||||
DROP TABLE IF EXISTS `devices`;
|
DROP TABLE IF EXISTS `devices`;
|
||||||
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
/*!40101 SET @saved_cs_client = @@character_set_client */
|
||||||
/*!40101 SET character_set_client = utf8 */;
|
;
|
||||||
|
/*!40101 SET character_set_client = utf8 */
|
||||||
|
;
|
||||||
CREATE TABLE `devices` (
|
CREATE TABLE `devices` (
|
||||||
`deviceid` int(11) NOT NULL AUTO_INCREMENT,
|
`deviceid` int(11) NOT NULL AUTO_INCREMENT,
|
||||||
`devicename` tinytext DEFAULT NULL,
|
`devicename` tinytext DEFAULT NULL,
|
||||||
@@ -166,15 +273,18 @@ CREATE TABLE `devices` (
|
|||||||
`active_flag` int(11) DEFAULT NULL,
|
`active_flag` int(11) DEFAULT NULL,
|
||||||
PRIMARY KEY (`deviceid`)
|
PRIMARY KEY (`deviceid`)
|
||||||
) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4 COLLATE = utf8mb4_general_ci;
|
) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4 COLLATE = utf8mb4_general_ci;
|
||||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
/*!40101 SET character_set_client = @saved_cs_client */
|
||||||
|
;
|
||||||
|
|
||||||
--
|
--
|
||||||
-- Dumping data for table `devices`
|
-- Dumping data for table `devices`
|
||||||
--
|
--
|
||||||
|
|
||||||
LOCK TABLES `devices` WRITE;
|
LOCK TABLES `devices` WRITE;
|
||||||
/*!40000 ALTER TABLE `devices` DISABLE KEYS */;
|
/*!40000 ALTER TABLE `devices` DISABLE KEYS */
|
||||||
/*!40000 ALTER TABLE `devices` ENABLE KEYS */;
|
;
|
||||||
|
/*!40000 ALTER TABLE `devices` ENABLE KEYS */
|
||||||
|
;
|
||||||
UNLOCK TABLES;
|
UNLOCK TABLES;
|
||||||
|
|
||||||
--
|
--
|
||||||
@@ -182,8 +292,10 @@ UNLOCK TABLES;
|
|||||||
--
|
--
|
||||||
|
|
||||||
DROP TABLE IF EXISTS `events`;
|
DROP TABLE IF EXISTS `events`;
|
||||||
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
/*!40101 SET @saved_cs_client = @@character_set_client */
|
||||||
/*!40101 SET character_set_client = utf8 */;
|
;
|
||||||
|
/*!40101 SET character_set_client = utf8 */
|
||||||
|
;
|
||||||
CREATE TABLE `events` (
|
CREATE TABLE `events` (
|
||||||
`eventid` int(11) NOT NULL AUTO_INCREMENT,
|
`eventid` int(11) NOT NULL AUTO_INCREMENT,
|
||||||
`task` int(11) DEFAULT NULL,
|
`task` int(11) DEFAULT NULL,
|
||||||
@@ -195,15 +307,18 @@ CREATE TABLE `events` (
|
|||||||
`active_flag` int(11) DEFAULT NULL,
|
`active_flag` int(11) DEFAULT NULL,
|
||||||
PRIMARY KEY (`eventid`)
|
PRIMARY KEY (`eventid`)
|
||||||
) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4 COLLATE = utf8mb4_general_ci;
|
) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4 COLLATE = utf8mb4_general_ci;
|
||||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
/*!40101 SET character_set_client = @saved_cs_client */
|
||||||
|
;
|
||||||
|
|
||||||
--
|
--
|
||||||
-- Dumping data for table `events`
|
-- Dumping data for table `events`
|
||||||
--
|
--
|
||||||
|
|
||||||
LOCK TABLES `events` WRITE;
|
LOCK TABLES `events` WRITE;
|
||||||
/*!40000 ALTER TABLE `events` DISABLE KEYS */;
|
/*!40000 ALTER TABLE `events` DISABLE KEYS */
|
||||||
/*!40000 ALTER TABLE `events` ENABLE KEYS */;
|
;
|
||||||
|
/*!40000 ALTER TABLE `events` ENABLE KEYS */
|
||||||
|
;
|
||||||
UNLOCK TABLES;
|
UNLOCK TABLES;
|
||||||
|
|
||||||
--
|
--
|
||||||
@@ -211,8 +326,10 @@ UNLOCK TABLES;
|
|||||||
--
|
--
|
||||||
|
|
||||||
DROP TABLE IF EXISTS `flags`;
|
DROP TABLE IF EXISTS `flags`;
|
||||||
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
/*!40101 SET @saved_cs_client = @@character_set_client */
|
||||||
/*!40101 SET character_set_client = utf8 */;
|
;
|
||||||
|
/*!40101 SET character_set_client = utf8 */
|
||||||
|
;
|
||||||
CREATE TABLE `flags` (
|
CREATE TABLE `flags` (
|
||||||
`flagid` int(11) NOT NULL AUTO_INCREMENT,
|
`flagid` int(11) NOT NULL AUTO_INCREMENT,
|
||||||
`flagname` tinytext DEFAULT NULL,
|
`flagname` tinytext DEFAULT NULL,
|
||||||
@@ -221,15 +338,18 @@ CREATE TABLE `flags` (
|
|||||||
`status` int(11) NOT NULL,
|
`status` int(11) NOT NULL,
|
||||||
PRIMARY KEY (`flagid`)
|
PRIMARY KEY (`flagid`)
|
||||||
) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4 COLLATE = utf8mb4_general_ci;
|
) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4 COLLATE = utf8mb4_general_ci;
|
||||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
/*!40101 SET character_set_client = @saved_cs_client */
|
||||||
|
;
|
||||||
|
|
||||||
--
|
--
|
||||||
-- Dumping data for table `flags`
|
-- Dumping data for table `flags`
|
||||||
--
|
--
|
||||||
|
|
||||||
LOCK TABLES `flags` WRITE;
|
LOCK TABLES `flags` WRITE;
|
||||||
/*!40000 ALTER TABLE `flags` DISABLE KEYS */;
|
/*!40000 ALTER TABLE `flags` DISABLE KEYS */
|
||||||
/*!40000 ALTER TABLE `flags` ENABLE KEYS */;
|
;
|
||||||
|
/*!40000 ALTER TABLE `flags` ENABLE KEYS */
|
||||||
|
;
|
||||||
UNLOCK TABLES;
|
UNLOCK TABLES;
|
||||||
|
|
||||||
--
|
--
|
||||||
@@ -237,8 +357,10 @@ UNLOCK TABLES;
|
|||||||
--
|
--
|
||||||
|
|
||||||
DROP TABLE IF EXISTS `flagmap`;
|
DROP TABLE IF EXISTS `flagmap`;
|
||||||
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
/*!40101 SET @saved_cs_client = @@character_set_client */
|
||||||
/*!40101 SET character_set_client = utf8 */;
|
;
|
||||||
|
/*!40101 SET character_set_client = utf8 */
|
||||||
|
;
|
||||||
CREATE TABLE `flagmap` (
|
CREATE TABLE `flagmap` (
|
||||||
`id` int(11) NOT NULL AUTO_INCREMENT,
|
`id` int(11) NOT NULL AUTO_INCREMENT,
|
||||||
`flagid` int(11) NOT NULL,
|
`flagid` int(11) NOT NULL,
|
||||||
@@ -247,15 +369,18 @@ CREATE TABLE `flagmap` (
|
|||||||
`notetemplateid` int(11) DEFAULT NULL,
|
`notetemplateid` int(11) DEFAULT NULL,
|
||||||
PRIMARY KEY (`id`)
|
PRIMARY KEY (`id`)
|
||||||
) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4 COLLATE = utf8mb4_general_ci;
|
) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4 COLLATE = utf8mb4_general_ci;
|
||||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
/*!40101 SET character_set_client = @saved_cs_client */
|
||||||
|
;
|
||||||
|
|
||||||
--
|
--
|
||||||
-- Dumping data for table `flagmap`
|
-- Dumping data for table `flagmap`
|
||||||
--
|
--
|
||||||
|
|
||||||
LOCK TABLES `flagmap` WRITE;
|
LOCK TABLES `flagmap` WRITE;
|
||||||
/*!40000 ALTER TABLE `flagmap` DISABLE KEYS */;
|
/*!40000 ALTER TABLE `flagmap` DISABLE KEYS */
|
||||||
/*!40000 ALTER TABLE `flagmap` ENABLE KEYS */;
|
;
|
||||||
|
/*!40000 ALTER TABLE `flagmap` ENABLE KEYS */
|
||||||
|
;
|
||||||
UNLOCK TABLES;
|
UNLOCK TABLES;
|
||||||
|
|
||||||
--
|
--
|
||||||
@@ -263,8 +388,10 @@ UNLOCK TABLES;
|
|||||||
--
|
--
|
||||||
|
|
||||||
DROP TABLE IF EXISTS `links`;
|
DROP TABLE IF EXISTS `links`;
|
||||||
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
/*!40101 SET @saved_cs_client = @@character_set_client */
|
||||||
/*!40101 SET character_set_client = utf8 */;
|
;
|
||||||
|
/*!40101 SET character_set_client = utf8 */
|
||||||
|
;
|
||||||
CREATE TABLE `links` (
|
CREATE TABLE `links` (
|
||||||
`linkid` int(11) NOT NULL AUTO_INCREMENT,
|
`linkid` int(11) NOT NULL AUTO_INCREMENT,
|
||||||
`linkpriority` int(11) NOT NULL,
|
`linkpriority` int(11) NOT NULL,
|
||||||
@@ -273,15 +400,18 @@ CREATE TABLE `links` (
|
|||||||
`status` int(11) NOT NULL,
|
`status` int(11) NOT NULL,
|
||||||
PRIMARY KEY (`linkid`)
|
PRIMARY KEY (`linkid`)
|
||||||
) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4 COLLATE = utf8mb4_general_ci;
|
) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4 COLLATE = utf8mb4_general_ci;
|
||||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
/*!40101 SET character_set_client = @saved_cs_client */
|
||||||
|
;
|
||||||
|
|
||||||
--
|
--
|
||||||
-- Dumping data for table `links`
|
-- Dumping data for table `links`
|
||||||
--
|
--
|
||||||
|
|
||||||
LOCK TABLES `links` WRITE;
|
LOCK TABLES `links` WRITE;
|
||||||
/*!40000 ALTER TABLE `links` DISABLE KEYS */;
|
/*!40000 ALTER TABLE `links` DISABLE KEYS */
|
||||||
/*!40000 ALTER TABLE `links` ENABLE KEYS */;
|
;
|
||||||
|
/*!40000 ALTER TABLE `links` ENABLE KEYS */
|
||||||
|
;
|
||||||
UNLOCK TABLES;
|
UNLOCK TABLES;
|
||||||
|
|
||||||
--
|
--
|
||||||
@@ -289,8 +419,10 @@ UNLOCK TABLES;
|
|||||||
--
|
--
|
||||||
|
|
||||||
DROP TABLE IF EXISTS `lognotes`;
|
DROP TABLE IF EXISTS `lognotes`;
|
||||||
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
/*!40101 SET @saved_cs_client = @@character_set_client */
|
||||||
/*!40101 SET character_set_client = utf8 */;
|
;
|
||||||
|
/*!40101 SET character_set_client = utf8 */
|
||||||
|
;
|
||||||
CREATE TABLE `lognotes` (
|
CREATE TABLE `lognotes` (
|
||||||
`lognoteid` int(11) NOT NULL AUTO_INCREMENT,
|
`lognoteid` int(11) NOT NULL AUTO_INCREMENT,
|
||||||
`date` date DEFAULT NULL,
|
`date` date DEFAULT NULL,
|
||||||
@@ -301,15 +433,18 @@ CREATE TABLE `lognotes` (
|
|||||||
`lognote` text DEFAULT NULL,
|
`lognote` text DEFAULT NULL,
|
||||||
PRIMARY KEY (`lognoteid`)
|
PRIMARY KEY (`lognoteid`)
|
||||||
) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4 COLLATE = utf8mb4_general_ci;
|
) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4 COLLATE = utf8mb4_general_ci;
|
||||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
/*!40101 SET character_set_client = @saved_cs_client */
|
||||||
|
;
|
||||||
|
|
||||||
--
|
--
|
||||||
-- Dumping data for table `lognotes`
|
-- Dumping data for table `lognotes`
|
||||||
--
|
--
|
||||||
|
|
||||||
LOCK TABLES `lognotes` WRITE;
|
LOCK TABLES `lognotes` WRITE;
|
||||||
/*!40000 ALTER TABLE `lognotes` DISABLE KEYS */;
|
/*!40000 ALTER TABLE `lognotes` DISABLE KEYS */
|
||||||
/*!40000 ALTER TABLE `lognotes` ENABLE KEYS */;
|
;
|
||||||
|
/*!40000 ALTER TABLE `lognotes` ENABLE KEYS */
|
||||||
|
;
|
||||||
UNLOCK TABLES;
|
UNLOCK TABLES;
|
||||||
|
|
||||||
--
|
--
|
||||||
@@ -317,8 +452,10 @@ UNLOCK TABLES;
|
|||||||
--
|
--
|
||||||
|
|
||||||
DROP TABLE IF EXISTS `reflinks`;
|
DROP TABLE IF EXISTS `reflinks`;
|
||||||
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
/*!40101 SET @saved_cs_client = @@character_set_client */
|
||||||
/*!40101 SET character_set_client = utf8 */;
|
;
|
||||||
|
/*!40101 SET character_set_client = utf8 */
|
||||||
|
;
|
||||||
CREATE TABLE `reflinks` (
|
CREATE TABLE `reflinks` (
|
||||||
`id` int(11) NOT NULL AUTO_INCREMENT,
|
`id` int(11) NOT NULL AUTO_INCREMENT,
|
||||||
`noteid` int(11) DEFAULT NULL,
|
`noteid` int(11) DEFAULT NULL,
|
||||||
@@ -326,15 +463,18 @@ CREATE TABLE `reflinks` (
|
|||||||
`target` int(11) NOT NULL,
|
`target` int(11) NOT NULL,
|
||||||
PRIMARY KEY (`id`)
|
PRIMARY KEY (`id`)
|
||||||
) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4 COLLATE = utf8mb4_general_ci;
|
) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4 COLLATE = utf8mb4_general_ci;
|
||||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
/*!40101 SET character_set_client = @saved_cs_client */
|
||||||
|
;
|
||||||
|
|
||||||
--
|
--
|
||||||
-- Dumping data for table `reflinks`
|
-- Dumping data for table `reflinks`
|
||||||
--
|
--
|
||||||
|
|
||||||
LOCK TABLES `reflinks` WRITE;
|
LOCK TABLES `reflinks` WRITE;
|
||||||
/*!40000 ALTER TABLE `reflinks` DISABLE KEYS */;
|
/*!40000 ALTER TABLE `reflinks` DISABLE KEYS */
|
||||||
/*!40000 ALTER TABLE `reflinks` ENABLE KEYS */;
|
;
|
||||||
|
/*!40000 ALTER TABLE `reflinks` ENABLE KEYS */
|
||||||
|
;
|
||||||
UNLOCK TABLES;
|
UNLOCK TABLES;
|
||||||
|
|
||||||
--
|
--
|
||||||
@@ -342,30 +482,36 @@ UNLOCK TABLES;
|
|||||||
--
|
--
|
||||||
|
|
||||||
DROP TABLE IF EXISTS `logpartactions`;
|
DROP TABLE IF EXISTS `logpartactions`;
|
||||||
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
/*!40101 SET @saved_cs_client = @@character_set_client */
|
||||||
/*!40101 SET character_set_client = utf8 */;
|
;
|
||||||
|
/*!40101 SET character_set_client = utf8 */
|
||||||
|
;
|
||||||
CREATE TABLE `logpartactions` (
|
CREATE TABLE `logpartactions` (
|
||||||
`lpactionid` int(11) NOT NULL AUTO_INCREMENT,
|
`lpactionid` int(11) NOT NULL AUTO_INCREMENT,
|
||||||
`lpactionname` tinytext DEFAULT NULL,
|
`lpactionname` tinytext DEFAULT NULL,
|
||||||
`status` int(11) DEFAULT NULL,
|
`status` int(11) DEFAULT NULL,
|
||||||
PRIMARY KEY (`lpactionid`)
|
PRIMARY KEY (`lpactionid`)
|
||||||
) ENGINE = InnoDB AUTO_INCREMENT = 7 DEFAULT CHARSET = utf8mb4 COLLATE = utf8mb4_general_ci;
|
) ENGINE = InnoDB AUTO_INCREMENT = 7 DEFAULT CHARSET = utf8mb4 COLLATE = utf8mb4_general_ci;
|
||||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
/*!40101 SET character_set_client = @saved_cs_client */
|
||||||
|
;
|
||||||
|
|
||||||
--
|
--
|
||||||
-- Dumping data for table `logpartactions`
|
-- Dumping data for table `logpartactions`
|
||||||
--
|
--
|
||||||
|
|
||||||
LOCK TABLES `logpartactions` WRITE;
|
LOCK TABLES `logpartactions` WRITE;
|
||||||
/*!40000 ALTER TABLE `logpartactions` DISABLE KEYS */;
|
/*!40000 ALTER TABLE `logpartactions` DISABLE KEYS */
|
||||||
INSERT INTO `logpartactions` VALUES
|
;
|
||||||
(1,'removed',1),
|
INSERT INTO
|
||||||
|
`logpartactions`
|
||||||
|
VALUES (1, 'removed', 1),
|
||||||
(2, 'installed', 1),
|
(2, 'installed', 1),
|
||||||
(3, 'repaired', 1),
|
(3, 'repaired', 1),
|
||||||
(4, 'replaced', 1),
|
(4, 'replaced', 1),
|
||||||
(5, 'incoming', 1),
|
(5, 'incoming', 1),
|
||||||
(6, 'outgoing', 1);
|
(6, 'outgoing', 1);
|
||||||
/*!40000 ALTER TABLE `logpartactions` ENABLE KEYS */;
|
/*!40000 ALTER TABLE `logpartactions` ENABLE KEYS */
|
||||||
|
;
|
||||||
UNLOCK TABLES;
|
UNLOCK TABLES;
|
||||||
|
|
||||||
--
|
--
|
||||||
@@ -373,8 +519,10 @@ UNLOCK TABLES;
|
|||||||
--
|
--
|
||||||
|
|
||||||
DROP TABLE IF EXISTS `logparts`;
|
DROP TABLE IF EXISTS `logparts`;
|
||||||
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
/*!40101 SET @saved_cs_client = @@character_set_client */
|
||||||
/*!40101 SET character_set_client = utf8 */;
|
;
|
||||||
|
/*!40101 SET character_set_client = utf8 */
|
||||||
|
;
|
||||||
CREATE TABLE `logparts` (
|
CREATE TABLE `logparts` (
|
||||||
`logpartid` int(11) NOT NULL AUTO_INCREMENT,
|
`logpartid` int(11) NOT NULL AUTO_INCREMENT,
|
||||||
`lognoteid` int(11) DEFAULT NULL,
|
`lognoteid` int(11) DEFAULT NULL,
|
||||||
@@ -382,15 +530,18 @@ CREATE TABLE `logparts` (
|
|||||||
`action` int(11) DEFAULT NULL,
|
`action` int(11) DEFAULT NULL,
|
||||||
PRIMARY KEY (`logpartid`)
|
PRIMARY KEY (`logpartid`)
|
||||||
) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4 COLLATE = utf8mb4_general_ci;
|
) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4 COLLATE = utf8mb4_general_ci;
|
||||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
/*!40101 SET character_set_client = @saved_cs_client */
|
||||||
|
;
|
||||||
|
|
||||||
--
|
--
|
||||||
-- Dumping data for table `logparts`
|
-- Dumping data for table `logparts`
|
||||||
--
|
--
|
||||||
|
|
||||||
LOCK TABLES `logparts` WRITE;
|
LOCK TABLES `logparts` WRITE;
|
||||||
/*!40000 ALTER TABLE `logparts` DISABLE KEYS */;
|
/*!40000 ALTER TABLE `logparts` DISABLE KEYS */
|
||||||
/*!40000 ALTER TABLE `logparts` ENABLE KEYS */;
|
;
|
||||||
|
/*!40000 ALTER TABLE `logparts` ENABLE KEYS */
|
||||||
|
;
|
||||||
UNLOCK TABLES;
|
UNLOCK TABLES;
|
||||||
|
|
||||||
--
|
--
|
||||||
@@ -398,8 +549,10 @@ UNLOCK TABLES;
|
|||||||
--
|
--
|
||||||
|
|
||||||
DROP TABLE IF EXISTS `maintactions`;
|
DROP TABLE IF EXISTS `maintactions`;
|
||||||
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
/*!40101 SET @saved_cs_client = @@character_set_client */
|
||||||
/*!40101 SET character_set_client = utf8 */;
|
;
|
||||||
|
/*!40101 SET character_set_client = utf8 */
|
||||||
|
;
|
||||||
CREATE TABLE `maintactions` (
|
CREATE TABLE `maintactions` (
|
||||||
`maintactionid` int(11) NOT NULL AUTO_INCREMENT,
|
`maintactionid` int(11) NOT NULL AUTO_INCREMENT,
|
||||||
`actiondate` date DEFAULT NULL,
|
`actiondate` date DEFAULT NULL,
|
||||||
@@ -409,15 +562,18 @@ CREATE TABLE `maintactions` (
|
|||||||
`action` text DEFAULT NULL,
|
`action` text DEFAULT NULL,
|
||||||
PRIMARY KEY (`maintactionid`)
|
PRIMARY KEY (`maintactionid`)
|
||||||
) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4 COLLATE = utf8mb4_general_ci;
|
) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4 COLLATE = utf8mb4_general_ci;
|
||||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
/*!40101 SET character_set_client = @saved_cs_client */
|
||||||
|
;
|
||||||
|
|
||||||
--
|
--
|
||||||
-- Dumping data for table `maintactions`
|
-- Dumping data for table `maintactions`
|
||||||
--
|
--
|
||||||
|
|
||||||
LOCK TABLES `maintactions` WRITE;
|
LOCK TABLES `maintactions` WRITE;
|
||||||
/*!40000 ALTER TABLE `maintactions` DISABLE KEYS */;
|
/*!40000 ALTER TABLE `maintactions` DISABLE KEYS */
|
||||||
/*!40000 ALTER TABLE `maintactions` ENABLE KEYS */;
|
;
|
||||||
|
/*!40000 ALTER TABLE `maintactions` ENABLE KEYS */
|
||||||
|
;
|
||||||
UNLOCK TABLES;
|
UNLOCK TABLES;
|
||||||
|
|
||||||
--
|
--
|
||||||
@@ -425,8 +581,10 @@ UNLOCK TABLES;
|
|||||||
--
|
--
|
||||||
|
|
||||||
DROP TABLE IF EXISTS `maintforms`;
|
DROP TABLE IF EXISTS `maintforms`;
|
||||||
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
/*!40101 SET @saved_cs_client = @@character_set_client */
|
||||||
/*!40101 SET character_set_client = utf8 */;
|
;
|
||||||
|
/*!40101 SET character_set_client = utf8 */
|
||||||
|
;
|
||||||
CREATE TABLE `maintforms` (
|
CREATE TABLE `maintforms` (
|
||||||
`maintformid` int(11) NOT NULL AUTO_INCREMENT,
|
`maintformid` int(11) NOT NULL AUTO_INCREMENT,
|
||||||
`mfdate` date DEFAULT NULL,
|
`mfdate` date DEFAULT NULL,
|
||||||
@@ -441,15 +599,18 @@ CREATE TABLE `maintforms` (
|
|||||||
`pending` int(11) DEFAULT NULL,
|
`pending` int(11) DEFAULT NULL,
|
||||||
PRIMARY KEY (`maintformid`)
|
PRIMARY KEY (`maintformid`)
|
||||||
) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4 COLLATE = utf8mb4_general_ci;
|
) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4 COLLATE = utf8mb4_general_ci;
|
||||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
/*!40101 SET character_set_client = @saved_cs_client */
|
||||||
|
;
|
||||||
|
|
||||||
--
|
--
|
||||||
-- Dumping data for table `maintforms`
|
-- Dumping data for table `maintforms`
|
||||||
--
|
--
|
||||||
|
|
||||||
LOCK TABLES `maintforms` WRITE;
|
LOCK TABLES `maintforms` WRITE;
|
||||||
/*!40000 ALTER TABLE `maintforms` DISABLE KEYS */;
|
/*!40000 ALTER TABLE `maintforms` DISABLE KEYS */
|
||||||
/*!40000 ALTER TABLE `maintforms` ENABLE KEYS */;
|
;
|
||||||
|
/*!40000 ALTER TABLE `maintforms` ENABLE KEYS */
|
||||||
|
;
|
||||||
UNLOCK TABLES;
|
UNLOCK TABLES;
|
||||||
|
|
||||||
--
|
--
|
||||||
@@ -457,8 +618,10 @@ UNLOCK TABLES;
|
|||||||
--
|
--
|
||||||
|
|
||||||
DROP TABLE IF EXISTS `notetemplates`;
|
DROP TABLE IF EXISTS `notetemplates`;
|
||||||
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
/*!40101 SET @saved_cs_client = @@character_set_client */
|
||||||
/*!40101 SET character_set_client = utf8 */;
|
;
|
||||||
|
/*!40101 SET character_set_client = utf8 */
|
||||||
|
;
|
||||||
CREATE TABLE `notetemplates` (
|
CREATE TABLE `notetemplates` (
|
||||||
`templateid` int(11) NOT NULL AUTO_INCREMENT,
|
`templateid` int(11) NOT NULL AUTO_INCREMENT,
|
||||||
`templatename` tinytext DEFAULT NULL,
|
`templatename` tinytext DEFAULT NULL,
|
||||||
@@ -469,15 +632,18 @@ CREATE TABLE `notetemplates` (
|
|||||||
`refs` tinytext DEFAULT NULL,
|
`refs` tinytext DEFAULT NULL,
|
||||||
PRIMARY KEY (`templateid`)
|
PRIMARY KEY (`templateid`)
|
||||||
) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4 COLLATE = utf8mb4_general_ci;
|
) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4 COLLATE = utf8mb4_general_ci;
|
||||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
/*!40101 SET character_set_client = @saved_cs_client */
|
||||||
|
;
|
||||||
|
|
||||||
--
|
--
|
||||||
-- Dumping data for table `notetemplates`
|
-- Dumping data for table `notetemplates`
|
||||||
--
|
--
|
||||||
|
|
||||||
LOCK TABLES `notetemplates` WRITE;
|
LOCK TABLES `notetemplates` WRITE;
|
||||||
/*!40000 ALTER TABLE `notetemplates` DISABLE KEYS */;
|
/*!40000 ALTER TABLE `notetemplates` DISABLE KEYS */
|
||||||
/*!40000 ALTER TABLE `notetemplates` ENABLE KEYS */;
|
;
|
||||||
|
/*!40000 ALTER TABLE `notetemplates` ENABLE KEYS */
|
||||||
|
;
|
||||||
UNLOCK TABLES;
|
UNLOCK TABLES;
|
||||||
|
|
||||||
--
|
--
|
||||||
@@ -485,8 +651,10 @@ UNLOCK TABLES;
|
|||||||
--
|
--
|
||||||
|
|
||||||
DROP TABLE IF EXISTS `parts`;
|
DROP TABLE IF EXISTS `parts`;
|
||||||
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
/*!40101 SET @saved_cs_client = @@character_set_client */
|
||||||
/*!40101 SET character_set_client = utf8 */;
|
;
|
||||||
|
/*!40101 SET character_set_client = utf8 */
|
||||||
|
;
|
||||||
CREATE TABLE `parts` (
|
CREATE TABLE `parts` (
|
||||||
`partid` int(11) NOT NULL AUTO_INCREMENT,
|
`partid` int(11) NOT NULL AUTO_INCREMENT,
|
||||||
`uid` tinytext DEFAULT NULL,
|
`uid` tinytext DEFAULT NULL,
|
||||||
@@ -495,15 +663,18 @@ CREATE TABLE `parts` (
|
|||||||
`partname` tinytext DEFAULT NULL,
|
`partname` tinytext DEFAULT NULL,
|
||||||
PRIMARY KEY (`partid`)
|
PRIMARY KEY (`partid`)
|
||||||
) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4 COLLATE = utf8mb4_general_ci;
|
) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4 COLLATE = utf8mb4_general_ci;
|
||||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
/*!40101 SET character_set_client = @saved_cs_client */
|
||||||
|
;
|
||||||
|
|
||||||
--
|
--
|
||||||
-- Dumping data for table `parts`
|
-- Dumping data for table `parts`
|
||||||
--
|
--
|
||||||
|
|
||||||
LOCK TABLES `parts` WRITE;
|
LOCK TABLES `parts` WRITE;
|
||||||
/*!40000 ALTER TABLE `parts` DISABLE KEYS */;
|
/*!40000 ALTER TABLE `parts` DISABLE KEYS */
|
||||||
/*!40000 ALTER TABLE `parts` ENABLE KEYS */;
|
;
|
||||||
|
/*!40000 ALTER TABLE `parts` ENABLE KEYS */
|
||||||
|
;
|
||||||
UNLOCK TABLES;
|
UNLOCK TABLES;
|
||||||
|
|
||||||
--
|
--
|
||||||
@@ -511,25 +682,29 @@ UNLOCK TABLES;
|
|||||||
--
|
--
|
||||||
|
|
||||||
DROP TABLE IF EXISTS `shifts`;
|
DROP TABLE IF EXISTS `shifts`;
|
||||||
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
/*!40101 SET @saved_cs_client = @@character_set_client */
|
||||||
/*!40101 SET character_set_client = utf8 */;
|
;
|
||||||
|
/*!40101 SET character_set_client = utf8 */
|
||||||
|
;
|
||||||
CREATE TABLE `shifts` (
|
CREATE TABLE `shifts` (
|
||||||
`shiftid` int(11) NOT NULL AUTO_INCREMENT,
|
`shiftid` int(11) NOT NULL AUTO_INCREMENT,
|
||||||
`shiftname` tinytext DEFAULT NULL,
|
`shiftname` tinytext DEFAULT NULL,
|
||||||
`status` int(11) NOT NULL,
|
`status` int(11) NOT NULL,
|
||||||
PRIMARY KEY (`shiftid`)
|
PRIMARY KEY (`shiftid`)
|
||||||
) ENGINE = InnoDB AUTO_INCREMENT = 2 DEFAULT CHARSET = utf8mb4 COLLATE = utf8mb4_general_ci;
|
) ENGINE = InnoDB AUTO_INCREMENT = 2 DEFAULT CHARSET = utf8mb4 COLLATE = utf8mb4_general_ci;
|
||||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
/*!40101 SET character_set_client = @saved_cs_client */
|
||||||
|
;
|
||||||
|
|
||||||
--
|
--
|
||||||
-- Dumping data for table `shifts`
|
-- Dumping data for table `shifts`
|
||||||
--
|
--
|
||||||
|
|
||||||
LOCK TABLES `shifts` WRITE;
|
LOCK TABLES `shifts` WRITE;
|
||||||
/*!40000 ALTER TABLE `shifts` DISABLE KEYS */;
|
/*!40000 ALTER TABLE `shifts` DISABLE KEYS */
|
||||||
INSERT INTO `shifts` VALUES
|
;
|
||||||
(1,'First Shift',1);
|
INSERT INTO `shifts` VALUES (1, 'First Shift', 1);
|
||||||
/*!40000 ALTER TABLE `shifts` ENABLE KEYS */;
|
/*!40000 ALTER TABLE `shifts` ENABLE KEYS */
|
||||||
|
;
|
||||||
UNLOCK TABLES;
|
UNLOCK TABLES;
|
||||||
|
|
||||||
--
|
--
|
||||||
@@ -537,26 +712,32 @@ UNLOCK TABLES;
|
|||||||
--
|
--
|
||||||
|
|
||||||
DROP TABLE IF EXISTS `styles`;
|
DROP TABLE IF EXISTS `styles`;
|
||||||
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
/*!40101 SET @saved_cs_client = @@character_set_client */
|
||||||
/*!40101 SET character_set_client = utf8 */;
|
;
|
||||||
|
/*!40101 SET character_set_client = utf8 */
|
||||||
|
;
|
||||||
CREATE TABLE `styles` (
|
CREATE TABLE `styles` (
|
||||||
`styleid` int(11) NOT NULL AUTO_INCREMENT,
|
`styleid` int(11) NOT NULL AUTO_INCREMENT,
|
||||||
`styletype` tinytext DEFAULT NULL,
|
`styletype` tinytext DEFAULT NULL,
|
||||||
`stylename` tinytext DEFAULT NULL,
|
`stylename` tinytext DEFAULT NULL,
|
||||||
PRIMARY KEY (`styleid`)
|
PRIMARY KEY (`styleid`)
|
||||||
) ENGINE = InnoDB AUTO_INCREMENT = 3 DEFAULT CHARSET = utf8mb4 COLLATE = utf8mb4_general_ci;
|
) ENGINE = InnoDB AUTO_INCREMENT = 3 DEFAULT CHARSET = utf8mb4 COLLATE = utf8mb4_general_ci;
|
||||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
/*!40101 SET character_set_client = @saved_cs_client */
|
||||||
|
;
|
||||||
|
|
||||||
--
|
--
|
||||||
-- Dumping data for table `styles`
|
-- Dumping data for table `styles`
|
||||||
--
|
--
|
||||||
|
|
||||||
LOCK TABLES `styles` WRITE;
|
LOCK TABLES `styles` WRITE;
|
||||||
/*!40000 ALTER TABLE `styles` DISABLE KEYS */;
|
/*!40000 ALTER TABLE `styles` DISABLE KEYS */
|
||||||
INSERT INTO `styles` VALUES
|
;
|
||||||
(1,'logdisplay','classic'),
|
INSERT INTO
|
||||||
|
`styles`
|
||||||
|
VALUES (1, 'logdisplay', 'classic'),
|
||||||
(2, 'logdisplay', 'clean');
|
(2, 'logdisplay', 'clean');
|
||||||
/*!40000 ALTER TABLE `styles` ENABLE KEYS */;
|
/*!40000 ALTER TABLE `styles` ENABLE KEYS */
|
||||||
|
;
|
||||||
UNLOCK TABLES;
|
UNLOCK TABLES;
|
||||||
|
|
||||||
--
|
--
|
||||||
@@ -564,25 +745,29 @@ UNLOCK TABLES;
|
|||||||
--
|
--
|
||||||
|
|
||||||
DROP TABLE IF EXISTS `subjects`;
|
DROP TABLE IF EXISTS `subjects`;
|
||||||
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
/*!40101 SET @saved_cs_client = @@character_set_client */
|
||||||
/*!40101 SET character_set_client = utf8 */;
|
;
|
||||||
|
/*!40101 SET character_set_client = utf8 */
|
||||||
|
;
|
||||||
CREATE TABLE `subjects` (
|
CREATE TABLE `subjects` (
|
||||||
`subjectid` int(11) NOT NULL AUTO_INCREMENT,
|
`subjectid` int(11) NOT NULL AUTO_INCREMENT,
|
||||||
`subjectname` tinytext DEFAULT NULL,
|
`subjectname` tinytext DEFAULT NULL,
|
||||||
`status` int(11) NOT NULL,
|
`status` int(11) NOT NULL,
|
||||||
PRIMARY KEY (`subjectid`)
|
PRIMARY KEY (`subjectid`)
|
||||||
) ENGINE = InnoDB AUTO_INCREMENT = 2 DEFAULT CHARSET = utf8mb4 COLLATE = utf8mb4_general_ci;
|
) ENGINE = InnoDB AUTO_INCREMENT = 2 DEFAULT CHARSET = utf8mb4 COLLATE = utf8mb4_general_ci;
|
||||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
/*!40101 SET character_set_client = @saved_cs_client */
|
||||||
|
;
|
||||||
|
|
||||||
--
|
--
|
||||||
-- Dumping data for table `subjects`
|
-- Dumping data for table `subjects`
|
||||||
--
|
--
|
||||||
|
|
||||||
LOCK TABLES `subjects` WRITE;
|
LOCK TABLES `subjects` WRITE;
|
||||||
/*!40000 ALTER TABLE `subjects` DISABLE KEYS */;
|
/*!40000 ALTER TABLE `subjects` DISABLE KEYS */
|
||||||
INSERT INTO `subjects` VALUES
|
;
|
||||||
(1,'Miscellaneous',1);
|
INSERT INTO `subjects` VALUES (1, 'Miscellaneous', 1);
|
||||||
/*!40000 ALTER TABLE `subjects` ENABLE KEYS */;
|
/*!40000 ALTER TABLE `subjects` ENABLE KEYS */
|
||||||
|
;
|
||||||
UNLOCK TABLES;
|
UNLOCK TABLES;
|
||||||
|
|
||||||
--
|
--
|
||||||
@@ -590,8 +775,10 @@ UNLOCK TABLES;
|
|||||||
--
|
--
|
||||||
|
|
||||||
DROP TABLE IF EXISTS `tasks`;
|
DROP TABLE IF EXISTS `tasks`;
|
||||||
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
/*!40101 SET @saved_cs_client = @@character_set_client */
|
||||||
/*!40101 SET character_set_client = utf8 */;
|
;
|
||||||
|
/*!40101 SET character_set_client = utf8 */
|
||||||
|
;
|
||||||
CREATE TABLE `tasks` (
|
CREATE TABLE `tasks` (
|
||||||
`taskid` int(11) NOT NULL AUTO_INCREMENT,
|
`taskid` int(11) NOT NULL AUTO_INCREMENT,
|
||||||
`taskname` tinytext DEFAULT NULL,
|
`taskname` tinytext DEFAULT NULL,
|
||||||
@@ -605,15 +792,18 @@ CREATE TABLE `tasks` (
|
|||||||
`active_flag` int(11) DEFAULT NULL,
|
`active_flag` int(11) DEFAULT NULL,
|
||||||
PRIMARY KEY (`taskid`)
|
PRIMARY KEY (`taskid`)
|
||||||
) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4 COLLATE = utf8mb4_general_ci;
|
) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4 COLLATE = utf8mb4_general_ci;
|
||||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
/*!40101 SET character_set_client = @saved_cs_client */
|
||||||
|
;
|
||||||
|
|
||||||
--
|
--
|
||||||
-- Dumping data for table `tasks`
|
-- Dumping data for table `tasks`
|
||||||
--
|
--
|
||||||
|
|
||||||
LOCK TABLES `tasks` WRITE;
|
LOCK TABLES `tasks` WRITE;
|
||||||
/*!40000 ALTER TABLE `tasks` DISABLE KEYS */;
|
/*!40000 ALTER TABLE `tasks` DISABLE KEYS */
|
||||||
/*!40000 ALTER TABLE `tasks` ENABLE KEYS */;
|
;
|
||||||
|
/*!40000 ALTER TABLE `tasks` ENABLE KEYS */
|
||||||
|
;
|
||||||
UNLOCK TABLES;
|
UNLOCK TABLES;
|
||||||
|
|
||||||
--
|
--
|
||||||
@@ -621,8 +811,10 @@ UNLOCK TABLES;
|
|||||||
--
|
--
|
||||||
|
|
||||||
DROP TABLE IF EXISTS `techs`;
|
DROP TABLE IF EXISTS `techs`;
|
||||||
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
/*!40101 SET @saved_cs_client = @@character_set_client */
|
||||||
/*!40101 SET character_set_client = utf8 */;
|
;
|
||||||
|
/*!40101 SET character_set_client = utf8 */
|
||||||
|
;
|
||||||
CREATE TABLE `techs` (
|
CREATE TABLE `techs` (
|
||||||
`techid` int(11) NOT NULL AUTO_INCREMENT,
|
`techid` int(11) NOT NULL AUTO_INCREMENT,
|
||||||
`techname` tinytext DEFAULT NULL,
|
`techname` tinytext DEFAULT NULL,
|
||||||
@@ -632,26 +824,45 @@ CREATE TABLE `techs` (
|
|||||||
`status` int(11) NOT NULL,
|
`status` int(11) NOT NULL,
|
||||||
PRIMARY KEY (`techid`)
|
PRIMARY KEY (`techid`)
|
||||||
) ENGINE = InnoDB AUTO_INCREMENT = 3 DEFAULT CHARSET = utf8mb4 COLLATE = utf8mb4_general_ci;
|
) ENGINE = InnoDB AUTO_INCREMENT = 3 DEFAULT CHARSET = utf8mb4 COLLATE = utf8mb4_general_ci;
|
||||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
/*!40101 SET character_set_client = @saved_cs_client */
|
||||||
|
;
|
||||||
|
|
||||||
--
|
--
|
||||||
-- Dumping data for table `techs`
|
-- Dumping data for table `techs`
|
||||||
--
|
--
|
||||||
|
|
||||||
LOCK TABLES `techs` WRITE;
|
LOCK TABLES `techs` WRITE;
|
||||||
/*!40000 ALTER TABLE `techs` DISABLE KEYS */;
|
/*!40000 ALTER TABLE `techs` DISABLE KEYS */
|
||||||
INSERT INTO `techs` VALUES
|
;
|
||||||
(1,'OpenLogAdmin',1,1,'$2y$10$6eCxUFNzoAkycMJpZ.zvaOfoByYhqi0YicQbut3XGc/TRxyxiUwcm',1);
|
INSERT INTO
|
||||||
/*!40000 ALTER TABLE `techs` ENABLE KEYS */;
|
`techs`
|
||||||
|
VALUES (
|
||||||
|
1,
|
||||||
|
'OpenLogAdmin',
|
||||||
|
1,
|
||||||
|
1,
|
||||||
|
'$2y$10$6eCxUFNzoAkycMJpZ.zvaOfoByYhqi0YicQbut3XGc/TRxyxiUwcm',
|
||||||
|
1
|
||||||
|
);
|
||||||
|
/*!40000 ALTER TABLE `techs` ENABLE KEYS */
|
||||||
|
;
|
||||||
UNLOCK TABLES;
|
UNLOCK TABLES;
|
||||||
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
|
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */
|
||||||
|
;
|
||||||
|
|
||||||
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
|
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */
|
||||||
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
|
;
|
||||||
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
|
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */
|
||||||
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
|
;
|
||||||
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
|
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */
|
||||||
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
|
;
|
||||||
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
|
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */
|
||||||
|
;
|
||||||
|
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */
|
||||||
|
;
|
||||||
|
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */
|
||||||
|
;
|
||||||
|
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */
|
||||||
|
;
|
||||||
|
|
||||||
-- Dump completed on 2024-07-09 14:36:00
|
-- Dump completed on 2024-07-09 14:36:00
|
||||||
@@ -6,11 +6,15 @@ ALTER TABLE configs ADD UNIQUE(confname);
|
|||||||
|
|
||||||
-- Delete db name, user, and password configs
|
-- Delete db name, user, and password configs
|
||||||
DELETE FROM configs where confname = "ol_dbname";
|
DELETE FROM configs where confname = "ol_dbname";
|
||||||
|
|
||||||
DELETE FROM configs where confname = "ol_dbuser";
|
DELETE FROM configs where confname = "ol_dbuser";
|
||||||
|
|
||||||
DELETE FROM configs where confname = "ol_dbpass";
|
DELETE FROM configs where confname = "ol_dbpass";
|
||||||
|
|
||||||
-- Add config option for server side error logging
|
-- Add config option for server side error logging
|
||||||
INSERT IGNORE INTO configs(confname,confvalue) values('log_errors','0')
|
INSERT IGNORE INTO
|
||||||
|
configs (confname, confvalue)
|
||||||
|
values ('log_errors', '0')
|
||||||
|
|
||||||
-- Update version number
|
-- Update version number
|
||||||
UPDATE configs SET confvalue = "5.2.1" WHERE confname = "ol_version";
|
UPDATE configs SET confvalue = "5.2.1" WHERE confname = "ol_version";
|
||||||
|
|||||||
@@ -92,5 +92,3 @@ pageblock("right","end");
|
|||||||
pagetable("end");
|
pagetable("end");
|
||||||
|
|
||||||
framework("end", "", "", $print);
|
framework("end", "", "", $print);
|
||||||
|
|
||||||
?>
|
|
||||||
|
|||||||
@@ -76,29 +76,31 @@ if(!$print){
|
|||||||
if ($add) {
|
if ($add) {
|
||||||
switch ($table) {
|
switch ($table) {
|
||||||
case "techs":
|
case "techs":
|
||||||
if ($admin) $admin=1; else $admin=0;
|
if ($admin) $admin = 1;
|
||||||
if ($active) $active=1; else $active=0;
|
else $admin = 0;
|
||||||
|
if ($active) $active = 1;
|
||||||
|
else $active = 0;
|
||||||
// do error checking
|
// do error checking
|
||||||
// test for name supplied
|
// test for name supplied
|
||||||
if (strlen(trim($name))) {
|
if (strlen(trim($name))) {
|
||||||
$namesuppld=1;
|
$namesuppld = TRUE;
|
||||||
} else {
|
} else {
|
||||||
$namesuppld=0;
|
$namesuppld = FALSE;
|
||||||
echo "<img src=\"icons/exclamation-red.png\" border=\"0\"> Tech name cannot be blank.<br>";
|
echo "<img src=\"icons/exclamation-red.png\" border=\"0\"> Tech name cannot be blank.<br>";
|
||||||
}
|
}
|
||||||
// test for name unique
|
// test for name unique
|
||||||
if (mysqli_num_rows(mysqli_query($db, "select techid from techs where techname=\"$name\""))) {
|
if (mysqli_num_rows(mysqli_query($db, "select techid from techs where techname=\"$name\""))) {
|
||||||
$nameunique=0;
|
$nameunique = FALSE;
|
||||||
echo "<img src=\"icons/exclamation-red.png\" border=\"0\"> Tech name already exists.<br>";
|
echo "<img src=\"icons/exclamation-red.png\" border=\"0\"> Tech name already exists.<br>";
|
||||||
} else {
|
} else {
|
||||||
$nameunique=1;
|
$nameunique = TRUE;
|
||||||
}
|
}
|
||||||
// test for matching passwords
|
// test for matching passwords
|
||||||
if ($pass == $passconf) {
|
if ($pass == $passconf) {
|
||||||
$passmatch=1;
|
$passmatch = TRUE;
|
||||||
$passhash = password_hash($pass, PASSWORD_DEFAULT);
|
$passhash = password_hash($pass, PASSWORD_DEFAULT);
|
||||||
} else {
|
} else {
|
||||||
$passmatch=0;
|
$passmatch = FALSE;
|
||||||
echo "<img src=\"icons/exclamation-red.png\" border=\"0\"> The passwords you supplied don't match.<br>";
|
echo "<img src=\"icons/exclamation-red.png\" border=\"0\"> The passwords you supplied don't match.<br>";
|
||||||
}
|
}
|
||||||
if ($namesuppld && $nameunique && $passmatch) {
|
if ($namesuppld && $nameunique && $passmatch) {
|
||||||
@@ -108,21 +110,22 @@ if(!$print){
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case "shifts":
|
case "shifts":
|
||||||
if ($active) $active=1; else $active=0;
|
if ($active) $active = 1;
|
||||||
|
else $active = 0;
|
||||||
// do error checking
|
// do error checking
|
||||||
// test for name supplied
|
// test for name supplied
|
||||||
if (strlen(trim($name))) {
|
if (strlen(trim($name))) {
|
||||||
$namesuppld=1;
|
$namesuppld = TRUE;
|
||||||
} else {
|
} else {
|
||||||
$namesuppld=0;
|
$namesuppld = FALSE;
|
||||||
echo "<img src=\"icons/exclamation-red.png\" border=\"0\"> Shift name cannot be blank.<br>";
|
echo "<img src=\"icons/exclamation-red.png\" border=\"0\"> Shift name cannot be blank.<br>";
|
||||||
}
|
}
|
||||||
// test for name unique
|
// test for name unique
|
||||||
if (mysqli_num_rows(mysqli_query($db, "select shiftid from shifts where shiftname=\"$name\""))) {
|
if (mysqli_num_rows(mysqli_query($db, "select shiftid from shifts where shiftname=\"$name\""))) {
|
||||||
$nameunique=0;
|
$nameunique = FALSE;
|
||||||
echo "<img src=\"icons/exclamation-red.png\" border=\"0\"> Shift name already exists.<br>";
|
echo "<img src=\"icons/exclamation-red.png\" border=\"0\"> Shift name already exists.<br>";
|
||||||
} else {
|
} else {
|
||||||
$nameunique=1;
|
$nameunique = TRUE;
|
||||||
}
|
}
|
||||||
if ($namesuppld && $nameunique) {
|
if ($namesuppld && $nameunique) {
|
||||||
// modify the table
|
// modify the table
|
||||||
@@ -131,21 +134,22 @@ if(!$print){
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case "subjects":
|
case "subjects":
|
||||||
if ($active) $active=1; else $active=0;
|
if ($active) $active = 1;
|
||||||
|
else $active = 0;
|
||||||
// do error checking
|
// do error checking
|
||||||
// test for name supplied
|
// test for name supplied
|
||||||
if (strlen(trim($name))) {
|
if (strlen(trim($name))) {
|
||||||
$namesuppld=1;
|
$namesuppld = TRUE;
|
||||||
} else {
|
} else {
|
||||||
$namesuppld=0;
|
$namesuppld = FALSE;
|
||||||
echo "<img src=\"icons/exclamation-red.png\" border=\"0\"> Subject name cannot be blank.<br>";
|
echo "<img src=\"icons/exclamation-red.png\" border=\"0\"> Subject name cannot be blank.<br>";
|
||||||
}
|
}
|
||||||
// test for name unique
|
// test for name unique
|
||||||
if (mysqli_num_rows(mysqli_query($db, "select subjectid from subjects where subjectname=\"$name\""))) {
|
if (mysqli_num_rows(mysqli_query($db, "select subjectid from subjects where subjectname=\"$name\""))) {
|
||||||
$nameunique=0;
|
$nameunique = FALSE;
|
||||||
echo "<img src=\"icons/exclamation-red.png\" border=\"0\"> Subject name already exists.<br>";
|
echo "<img src=\"icons/exclamation-red.png\" border=\"0\"> Subject name already exists.<br>";
|
||||||
} else {
|
} else {
|
||||||
$nameunique=1;
|
$nameunique = TRUE;
|
||||||
}
|
}
|
||||||
if ($namesuppld && $nameunique) {
|
if ($namesuppld && $nameunique) {
|
||||||
// modify the table
|
// modify the table
|
||||||
@@ -154,27 +158,28 @@ if(!$print){
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case "links":
|
case "links":
|
||||||
if ($active) $active=1; else $active=0;
|
if ($active) $active = 1;
|
||||||
|
else $active = 0;
|
||||||
// do error checking
|
// do error checking
|
||||||
// test for name supplied
|
// test for name supplied
|
||||||
if (strlen(trim($name))) {
|
if (strlen(trim($name))) {
|
||||||
$namesuppld=1;
|
$namesuppld = TRUE;
|
||||||
} else {
|
} else {
|
||||||
$namesuppld=0;
|
$namesuppld = FALSE;
|
||||||
echo "<img src=\"icons/exclamation-red.png\" border=\"0\"> Display text cannot be blank.<br>";
|
echo "<img src=\"icons/exclamation-red.png\" border=\"0\"> Display text cannot be blank.<br>";
|
||||||
}
|
}
|
||||||
// test for name unique
|
// test for name unique
|
||||||
if (mysqli_num_rows(mysqli_query($db, "select linkid from links where displaytxt=\"$name\""))) {
|
if (mysqli_num_rows(mysqli_query($db, "select linkid from links where displaytxt=\"$name\""))) {
|
||||||
$nameunique=0;
|
$nameunique = FALSE;
|
||||||
echo "<img src=\"icons/exclamation-red.png\" border=\"0\"> Display text already exists.<br>";
|
echo "<img src=\"icons/exclamation-red.png\" border=\"0\"> Display text already exists.<br>";
|
||||||
} else {
|
} else {
|
||||||
$nameunique=1;
|
$nameunique = TRUE;
|
||||||
}
|
}
|
||||||
// test for urltxt supplied
|
// test for urltxt supplied
|
||||||
if (strlen(trim($url))) {
|
if (strlen(trim($url))) {
|
||||||
$urlsuppld=1;
|
$urlsuppld = TRUE;
|
||||||
} else {
|
} else {
|
||||||
$urlsuppld=0;
|
$urlsuppld = FALSE;
|
||||||
echo "<img src=\"icons/exclamation-red.png\" border=\"0\"> URL text cannot be blank.<br>";
|
echo "<img src=\"icons/exclamation-red.png\" border=\"0\"> URL text cannot be blank.<br>";
|
||||||
}
|
}
|
||||||
if ($namesuppld && $nameunique && $urlsuppld) {
|
if ($namesuppld && $nameunique && $urlsuppld) {
|
||||||
@@ -188,60 +193,59 @@ if(!$print){
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case "flags":
|
case "flags":
|
||||||
if ($active) $active=1; else $active=0;
|
if ($active) $active = 1;
|
||||||
|
else $active = 0;
|
||||||
// do error checking
|
// do error checking
|
||||||
// test for name supplied
|
// test for name supplied
|
||||||
if (strlen(trim($name))) {
|
if (strlen(trim($name))) {
|
||||||
$namesuppld=1;
|
$namesuppld = TRUE;
|
||||||
} else {
|
} else {
|
||||||
$namesuppld=0;
|
$namesuppld = FALSE;
|
||||||
echo "<img src=\"icons/exclamation-red.png\" border=\"0\"> Flag name cannot be blank.<br>";
|
echo "<img src=\"icons/exclamation-red.png\" border=\"0\"> Flag name cannot be blank.<br>";
|
||||||
}
|
}
|
||||||
// test for name unique
|
// test for name unique
|
||||||
if (mysqli_num_rows(mysqli_query($db, "select flagid from flags where flagname=\"$name\""))) {
|
if (mysqli_num_rows(mysqli_query($db, "select flagid from flags where flagname=\"$name\""))) {
|
||||||
$nameunique=0;
|
$nameunique = FALSE;
|
||||||
echo "<img src=\"icons/exclamation-red.png\" border=\"0\"> Flag name already exists.<br>";
|
echo "<img src=\"icons/exclamation-red.png\" border=\"0\"> Flag name already exists.<br>";
|
||||||
} else {
|
} else {
|
||||||
$nameunique=1;
|
$nameunique = TRUE;
|
||||||
}
|
}
|
||||||
// test for symbol supplied
|
// test for symbol supplied
|
||||||
if (strlen(trim($flagsym))) {
|
if (strlen(trim($flagsym))) {
|
||||||
$symsuppld=1;
|
$symsuppld = TRUE;
|
||||||
} else {
|
} else {
|
||||||
$symsuppld=0;
|
$symsuppld = FALSE;
|
||||||
echo "<img src=\"icons/exclamation-red.png\" border=\"0\"> Flag symbol cannot be blank.<br>";
|
echo "<img src=\"icons/exclamation-red.png\" border=\"0\"> Flag symbol cannot be blank.<br>";
|
||||||
}
|
}
|
||||||
// test for symbol unique
|
// test for symbol unique
|
||||||
if (mysqli_num_rows(mysqli_query($db, "select flagid from flags where flagsym=\"$flagsym\""))) {
|
if (mysqli_num_rows(mysqli_query($db, "select flagid from flags where flagsym=\"$flagsym\""))) {
|
||||||
$symunique=0;
|
$symunique = FALSE;
|
||||||
echo "<img src=\"icons/exclamation-red.png\" border=\"0\"> Flag symbol already exists.<br>";
|
echo "<img src=\"icons/exclamation-red.png\" border=\"0\"> Flag symbol already exists.<br>";
|
||||||
} else {
|
} else {
|
||||||
$symunique=1;
|
$symunique = TRUE;
|
||||||
}
|
}
|
||||||
if ($namesuppld && $nameunique && $symsuppld && $symunique) {
|
if ($namesuppld && $nameunique && $symsuppld && $symunique) {
|
||||||
// insert record in links table
|
// insert record in flags table
|
||||||
mysqli_query($db, "insert into flags(flagname,flagsym,flagcolor,status) values(\"$name\",\"$flagsym\",\"$flagcolor\",\"$active\")");
|
mysqli_query($db, "insert into flags(flagname,flagsym,flagcolor,status) values(\"$name\",\"$flagsym\",\"$flagcolor\",\"$active\")");
|
||||||
// create sub tables for this link
|
|
||||||
$lastflagid=mysqli_insert_id($db);
|
|
||||||
mysqli_query($db,"create table flag_$lastflagid(target tinytext,id int not null)");
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case "logpartactions":
|
case "logpartactions":
|
||||||
if ($active) $active=1; else $active=0;
|
if ($active) $active = 1;
|
||||||
|
else $active = 0;
|
||||||
// do error checking
|
// do error checking
|
||||||
// test for name supplied
|
// test for name supplied
|
||||||
if (strlen(trim($name))) {
|
if (strlen(trim($name))) {
|
||||||
$namesuppld=1;
|
$namesuppld = TRUE;
|
||||||
} else {
|
} else {
|
||||||
$namesuppld=0;
|
$namesuppld = FALSE;
|
||||||
echo "<img src=\"icons/exclamation-red.png\" border=\"0\"> Part Action name cannot be blank.<br>";
|
echo "<img src=\"icons/exclamation-red.png\" border=\"0\"> Part Action name cannot be blank.<br>";
|
||||||
}
|
}
|
||||||
// test for name unique
|
// test for name unique
|
||||||
if (mysqli_num_rows(mysqli_query($db, "select lpactionid from logpartactions where lpactionname=\"$name\""))) {
|
if (mysqli_num_rows(mysqli_query($db, "select lpactionid from logpartactions where lpactionname=\"$name\""))) {
|
||||||
$nameunique=0;
|
$nameunique = FALSE;
|
||||||
echo "<img src=\"icons/exclamation-red.png\" border=\"0\"> Part Action name already exists.<br>";
|
echo "<img src=\"icons/exclamation-red.png\" border=\"0\"> Part Action name already exists.<br>";
|
||||||
} else {
|
} else {
|
||||||
$nameunique=1;
|
$nameunique = TRUE;
|
||||||
}
|
}
|
||||||
if ($namesuppld && $nameunique) {
|
if ($namesuppld && $nameunique) {
|
||||||
// modify the table
|
// modify the table
|
||||||
@@ -253,17 +257,17 @@ if(!$print){
|
|||||||
// do error checking
|
// do error checking
|
||||||
// test for name supplied
|
// test for name supplied
|
||||||
if (strlen(trim($name))) {
|
if (strlen(trim($name))) {
|
||||||
$namesuppld=1;
|
$namesuppld = TRUE;
|
||||||
} else {
|
} else {
|
||||||
$namesuppld=0;
|
$namesuppld = FALSE;
|
||||||
echo "<img src=\"icons/exclamation-red.png\" border=\"0\"> Banner name cannot be blank.<br>";
|
echo "<img src=\"icons/exclamation-red.png\" border=\"0\"> Banner name cannot be blank.<br>";
|
||||||
}
|
}
|
||||||
// test for name unique
|
// test for name unique
|
||||||
if (mysqli_num_rows(mysqli_query($db, "select bannerid from banners where bannername=\"$name\""))) {
|
if (mysqli_num_rows(mysqli_query($db, "select bannerid from banners where bannername=\"$name\""))) {
|
||||||
$nameunique=0;
|
$nameunique = FALSE;
|
||||||
echo "<img src=\"icons/exclamation-red.png\" border=\"0\"> Banner name already exists.<br>";
|
echo "<img src=\"icons/exclamation-red.png\" border=\"0\"> Banner name already exists.<br>";
|
||||||
} else {
|
} else {
|
||||||
$nameunique=1;
|
$nameunique = TRUE;
|
||||||
}
|
}
|
||||||
if ($namesuppld && $nameunique) {
|
if ($namesuppld && $nameunique) {
|
||||||
// modify the table
|
// modify the table
|
||||||
@@ -281,29 +285,31 @@ if(!$print){
|
|||||||
if ($edit) {
|
if ($edit) {
|
||||||
switch ($table) {
|
switch ($table) {
|
||||||
case "techs":
|
case "techs":
|
||||||
if ($admin) $admin=1; else $admin=0;
|
if ($admin) $admin = 1;
|
||||||
if ($active) $active=1; else $active=0;
|
else $admin = 0;
|
||||||
|
if ($active) $active = 1;
|
||||||
|
else $active = 0;
|
||||||
if ($delete) {
|
if ($delete) {
|
||||||
// check for log notes by this tech
|
// check for log notes by this tech
|
||||||
if (mysqli_num_rows(mysqli_query($db, "select lognoteid from lognotes where tech=\"$id\""))) {
|
if (mysqli_num_rows(mysqli_query($db, "select lognoteid from lognotes where tech=\"$id\""))) {
|
||||||
$hasnotes=1;
|
$hasnotes = TRUE;
|
||||||
echo "<img src=\"icons/exclamation-red.png\" border=\"0\"> Tech has notes in logbook and cannot be deleted.<br>";
|
echo "<img src=\"icons/exclamation-red.png\" border=\"0\"> Tech has notes in logbook and cannot be deleted.<br>";
|
||||||
} else {
|
} else {
|
||||||
$hasnotes=0;
|
$hasnotes = FALSE;
|
||||||
}
|
}
|
||||||
// check for maintenance forms by this tech
|
// check for maintenance forms by this tech
|
||||||
if (mysqli_num_rows(mysqli_query($db, "select maintformid from maintforms where mftech=\"$id\""))) {
|
if (mysqli_num_rows(mysqli_query($db, "select maintformid from maintforms where mftech=\"$id\""))) {
|
||||||
$hasmfs=1;
|
$hasmfs = TRUE;
|
||||||
echo "<img src=\"icons/exclamation-red.png\" border=\"0\"> Tech has maintenance forms and cannot be deleted.<br>";
|
echo "<img src=\"icons/exclamation-red.png\" border=\"0\"> Tech has maintenance forms and cannot be deleted.<br>";
|
||||||
} else {
|
} else {
|
||||||
$hasmfs=0;
|
$hasmfs = FALSE;
|
||||||
}
|
}
|
||||||
// check for maintenance actions by this tech
|
// check for maintenance actions by this tech
|
||||||
if (mysqli_num_rows(mysqli_query($db, "select maintactionid from maintactions where actiontech=\"$id\""))) {
|
if (mysqli_num_rows(mysqli_query($db, "select maintactionid from maintactions where actiontech=\"$id\""))) {
|
||||||
$hasmas=1;
|
$hasmas = TRUE;
|
||||||
echo "<img src=\"icons/exclamation-red.png\" border=\"0\"> Tech has maintenance actions and cannot be deleted.<br>";
|
echo "<img src=\"icons/exclamation-red.png\" border=\"0\"> Tech has maintenance actions and cannot be deleted.<br>";
|
||||||
} else {
|
} else {
|
||||||
$hasmas=0;
|
$hasmas = FALSE;
|
||||||
}
|
}
|
||||||
if (!$hasnotes && !$hasmfs && !$hasmas) {
|
if (!$hasnotes && !$hasmfs && !$hasmas) {
|
||||||
// delete entity
|
// delete entity
|
||||||
@@ -314,34 +320,34 @@ if(!$print){
|
|||||||
// do error checking
|
// do error checking
|
||||||
// test for name supplied
|
// test for name supplied
|
||||||
if (strlen(trim($name))) {
|
if (strlen(trim($name))) {
|
||||||
$namesuppld=1;
|
$namesuppld = TRUE;
|
||||||
} else {
|
} else {
|
||||||
$namesuppld=0;
|
$namesuppld = FALSE;
|
||||||
echo "<img src=\"icons/exclamation-red.png\" border=\"0\"> Tech name cannot be blank.<br>";
|
echo "<img src=\"icons/exclamation-red.png\" border=\"0\"> Tech name cannot be blank.<br>";
|
||||||
}
|
}
|
||||||
// test for name unique
|
// test for name unique
|
||||||
if (mysqli_num_rows(mysqli_query($db, "select techid from techs where techname=\"$name\" and techid!=\"$id\""))) {
|
if (mysqli_num_rows(mysqli_query($db, "select techid from techs where techname=\"$name\" and techid!=\"$id\""))) {
|
||||||
if (mysqli_num_rows(mysqli_query($db, "select techid from techs where techname=\"$name\""))) {
|
if (mysqli_num_rows(mysqli_query($db, "select techid from techs where techname=\"$name\""))) {
|
||||||
$nameunique=0;
|
$nameunique = FALSE;
|
||||||
echo "<img src=\"icons/exclamation-red.png\" border=\"0\"> Tech name already exists.<br>";
|
echo "<img src=\"icons/exclamation-red.png\" border=\"0\"> Tech name already exists.<br>";
|
||||||
} else {
|
} else {
|
||||||
$nameunique=1;
|
$nameunique = TRUE;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
$nameunique=1;
|
$nameunique = TRUE;
|
||||||
}
|
}
|
||||||
// test for matching passwords
|
// test for matching passwords
|
||||||
if ($pass != "password_is_unchanged") {
|
if ($pass != "password_is_unchanged") {
|
||||||
if ($pass == $passconf) {
|
if ($pass == $passconf) {
|
||||||
$passmatch=1;
|
$passmatch = TRUE;
|
||||||
$passhash = password_hash($pass, PASSWORD_DEFAULT);
|
$passhash = password_hash($pass, PASSWORD_DEFAULT);
|
||||||
$updqry = ("update techs set techname=\"$name\",admin=\"$admin\",shift=\"$shift\",techpass=\"$passhash\",status=\"$active\" where techid=\"$id\"");
|
$updqry = ("update techs set techname=\"$name\",admin=\"$admin\",shift=\"$shift\",techpass=\"$passhash\",status=\"$active\" where techid=\"$id\"");
|
||||||
} else {
|
} else {
|
||||||
$passmatch=0;
|
$passmatch = FALSE;
|
||||||
echo "<img src=\"icons/exclamation-red.png\" border=\"0\"> The passwords you supplied don't match.<br>";
|
echo "<img src=\"icons/exclamation-red.png\" border=\"0\"> The passwords you supplied don't match.<br>";
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
$passmatch=1;
|
$passmatch = TRUE;
|
||||||
$updqry = "update techs set techname=\"$name\",admin=\"$admin\",shift=\"$shift\",status=\"$active\" where techid=\"$id\"";
|
$updqry = "update techs set techname=\"$name\",admin=\"$admin\",shift=\"$shift\",status=\"$active\" where techid=\"$id\"";
|
||||||
}
|
}
|
||||||
if ($namesuppld && $nameunique && $passmatch) {
|
if ($namesuppld && $nameunique && $passmatch) {
|
||||||
@@ -351,14 +357,15 @@ if(!$print){
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case "shifts":
|
case "shifts":
|
||||||
if ($active) $active=1; else $active=0;
|
if ($active) $active = 1;
|
||||||
|
else $active = 0;
|
||||||
if ($delete) {
|
if ($delete) {
|
||||||
// check for log notes with this shift
|
// check for log notes with this shift
|
||||||
if (mysqli_num_rows(mysqli_query($db, "select lognoteid from lognotes where shift=\"$id\""))) {
|
if (mysqli_num_rows(mysqli_query($db, "select lognoteid from lognotes where shift=\"$id\""))) {
|
||||||
$hasnotes=1;
|
$hasnotes = TRUE;
|
||||||
echo "<img src=\"icons/exclamation-red.png\" border=\"0\"> Shift has notes in logbook and cannot be deleted.<br>";
|
echo "<img src=\"icons/exclamation-red.png\" border=\"0\"> Shift has notes in logbook and cannot be deleted.<br>";
|
||||||
} else {
|
} else {
|
||||||
$hasnotes=0;
|
$hasnotes = FALSE;
|
||||||
}
|
}
|
||||||
if (!$hasnotes) {
|
if (!$hasnotes) {
|
||||||
// delete entity
|
// delete entity
|
||||||
@@ -369,21 +376,21 @@ if(!$print){
|
|||||||
// do error checking
|
// do error checking
|
||||||
// test for name supplied
|
// test for name supplied
|
||||||
if (strlen(trim($name))) {
|
if (strlen(trim($name))) {
|
||||||
$namesuppld=1;
|
$namesuppld = TRUE;
|
||||||
} else {
|
} else {
|
||||||
$namesuppld=0;
|
$namesuppld = FALSE;
|
||||||
echo "<img src=\"icons/exclamation-red.png\" border=\"0\"> Shift name cannot be blank.<br>";
|
echo "<img src=\"icons/exclamation-red.png\" border=\"0\"> Shift name cannot be blank.<br>";
|
||||||
}
|
}
|
||||||
// test for name unique
|
// test for name unique
|
||||||
if (mysqli_num_rows(mysqli_query($db, "select shiftid from shifts where shiftname=\"$name\" and shiftid!=\"$id\""))) {
|
if (mysqli_num_rows(mysqli_query($db, "select shiftid from shifts where shiftname=\"$name\" and shiftid!=\"$id\""))) {
|
||||||
if (mysqli_num_rows(mysqli_query($db, "select shiftid from shifts where shiftname=\"$name\""))) {
|
if (mysqli_num_rows(mysqli_query($db, "select shiftid from shifts where shiftname=\"$name\""))) {
|
||||||
$nameunique=0;
|
$nameunique = FALSE;
|
||||||
echo "<img src=\"icons/exclamation-red.png\" border=\"0\"> Shift name already exists.<br>";
|
echo "<img src=\"icons/exclamation-red.png\" border=\"0\"> Shift name already exists.<br>";
|
||||||
} else {
|
} else {
|
||||||
$nameunique=1;
|
$nameunique = TRUE;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
$nameunique=1;
|
$nameunique = TRUE;
|
||||||
}
|
}
|
||||||
if ($namesuppld && $nameunique) {
|
if ($namesuppld && $nameunique) {
|
||||||
// modify the table
|
// modify the table
|
||||||
@@ -392,14 +399,15 @@ if(!$print){
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case "subjects":
|
case "subjects":
|
||||||
if ($active) $active=1; else $active=0;
|
if ($active) $active = 1;
|
||||||
|
else $active = 0;
|
||||||
if ($delete) {
|
if ($delete) {
|
||||||
// check for log notes with this subject
|
// check for log notes with this subject
|
||||||
if (mysqli_num_rows(mysqli_query($db, "select lognoteid from lognotes where subject=\"$id\""))) {
|
if (mysqli_num_rows(mysqli_query($db, "select lognoteid from lognotes where subject=\"$id\""))) {
|
||||||
$hasnotes=1;
|
$hasnotes = TRUE;
|
||||||
echo "<img src=\"icons/exclamation-red.png\" border=\"0\"> Subject has notes in logbook and cannot be deleted.<br>";
|
echo "<img src=\"icons/exclamation-red.png\" border=\"0\"> Subject has notes in logbook and cannot be deleted.<br>";
|
||||||
} else {
|
} else {
|
||||||
$hasnotes=0;
|
$hasnotes = FALSE;
|
||||||
}
|
}
|
||||||
if (!$hasnotes) {
|
if (!$hasnotes) {
|
||||||
// delete entity
|
// delete entity
|
||||||
@@ -410,21 +418,21 @@ if(!$print){
|
|||||||
// do error checking
|
// do error checking
|
||||||
// test for name supplied
|
// test for name supplied
|
||||||
if (strlen(trim($name))) {
|
if (strlen(trim($name))) {
|
||||||
$namesuppld=1;
|
$namesuppld = TRUE;
|
||||||
} else {
|
} else {
|
||||||
$namesuppld=0;
|
$namesuppld = FALSE;
|
||||||
echo "<img src=\"icons/exclamation-red.png\" border=\"0\"> Subject name cannot be blank.<br>";
|
echo "<img src=\"icons/exclamation-red.png\" border=\"0\"> Subject name cannot be blank.<br>";
|
||||||
}
|
}
|
||||||
// test for name unique
|
// test for name unique
|
||||||
if (mysqli_num_rows(mysqli_query($db, "select subjectid from subjects where subjectname=\"$name\" and subjectid!=\"$id\""))) {
|
if (mysqli_num_rows(mysqli_query($db, "select subjectid from subjects where subjectname=\"$name\" and subjectid!=\"$id\""))) {
|
||||||
if (mysqli_num_rows(mysqli_query($db, "select subjectid from subjects where subjectname=\"$name\""))) {
|
if (mysqli_num_rows(mysqli_query($db, "select subjectid from subjects where subjectname=\"$name\""))) {
|
||||||
$nameunique=0;
|
$nameunique = FALSE;
|
||||||
echo "<img src=\"icons/exclamation-red.png\" border=\"0\"> Subject name already exists.<br>";
|
echo "<img src=\"icons/exclamation-red.png\" border=\"0\"> Subject name already exists.<br>";
|
||||||
} else {
|
} else {
|
||||||
$nameunique=1;
|
$nameunique = TRUE;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
$nameunique=1;
|
$nameunique = TRUE;
|
||||||
}
|
}
|
||||||
if ($namesuppld && $nameunique) {
|
if ($namesuppld && $nameunique) {
|
||||||
// modify the table
|
// modify the table
|
||||||
@@ -433,7 +441,8 @@ if(!$print){
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case "links":
|
case "links":
|
||||||
if ($active) $active=1; else $active=0;
|
if ($active) $active = 1;
|
||||||
|
else $active = 0;
|
||||||
if ($delete) {
|
if ($delete) {
|
||||||
mysqli_query($db, "delete from links where linkid=\"$id\"");
|
mysqli_query($db, "delete from links where linkid=\"$id\"");
|
||||||
}
|
}
|
||||||
@@ -441,27 +450,27 @@ if(!$print){
|
|||||||
// do error checking
|
// do error checking
|
||||||
// test for name supplied
|
// test for name supplied
|
||||||
if (strlen(trim($name))) {
|
if (strlen(trim($name))) {
|
||||||
$namesuppld=1;
|
$namesuppld = TRUE;
|
||||||
} else {
|
} else {
|
||||||
$namesuppld=0;
|
$namesuppld = FALSE;
|
||||||
echo "<img src=\"icons/exclamation-red.png\" border=\"0\"> Display text cannot be blank.<br>";
|
echo "<img src=\"icons/exclamation-red.png\" border=\"0\"> Display text cannot be blank.<br>";
|
||||||
}
|
}
|
||||||
// test for name unique
|
// test for name unique
|
||||||
if (mysqli_num_rows(mysqli_query($db, "select linkid from links where displaytxt=\"$name\" and linkid!=\"$id\""))) {
|
if (mysqli_num_rows(mysqli_query($db, "select linkid from links where displaytxt=\"$name\" and linkid!=\"$id\""))) {
|
||||||
if (mysqli_num_rows(mysqli_query($db, "select linkid from links where displaytxt=\"$name\""))) {
|
if (mysqli_num_rows(mysqli_query($db, "select linkid from links where displaytxt=\"$name\""))) {
|
||||||
$nameunique=0;
|
$nameunique = FALSE;
|
||||||
echo "<img src=\"icons/exclamation-red.png\" border=\"0\"> Display text already exists.<br>";
|
echo "<img src=\"icons/exclamation-red.png\" border=\"0\"> Display text already exists.<br>";
|
||||||
} else {
|
} else {
|
||||||
$nameunique=1;
|
$nameunique = TRUE;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
$nameunique=1;
|
$nameunique = TRUE;
|
||||||
}
|
}
|
||||||
// test for urltxt supplied
|
// test for urltxt supplied
|
||||||
if (strlen(trim($url))) {
|
if (strlen(trim($url))) {
|
||||||
$urlsuppld=1;
|
$urlsuppld = TRUE;
|
||||||
} else {
|
} else {
|
||||||
$urlsuppld=0;
|
$urlsuppld = FALSE;
|
||||||
echo "<img src=\"icons/exclamation-red.png\" border=\"0\"> URL text cannot be blank.<br>";
|
echo "<img src=\"icons/exclamation-red.png\" border=\"0\"> URL text cannot be blank.<br>";
|
||||||
}
|
}
|
||||||
if ($namesuppld && $nameunique && $urlsuppld) {
|
if ($namesuppld && $nameunique && $urlsuppld) {
|
||||||
@@ -476,58 +485,58 @@ if(!$print){
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case "flags":
|
case "flags":
|
||||||
if ($active) $active=1; else $active=0;
|
if ($active) $active = 1;
|
||||||
|
else $active = 0;
|
||||||
if ($delete) {
|
if ($delete) {
|
||||||
// check for things using this flag
|
// check for things using this flag
|
||||||
if (mysqli_num_rows(mysqli_query($db,"select * from flag_$id"))) {
|
if (mysqli_num_rows(mysqli_query($db, "select id from flagmap where flagid=\"$id\""))) {
|
||||||
$used=1;
|
$used = TRUE;
|
||||||
echo "<img src=\"icons/exclamation-red.png\" border=\"0\"> Flag is used by other tables and cannot be deleted.<br>";
|
echo "<img src=\"icons/exclamation-red.png\" border=\"0\"> Flag is used by other tables and cannot be deleted.<br>";
|
||||||
} else {
|
} else {
|
||||||
$used=0;
|
$used = FALSE;
|
||||||
}
|
}
|
||||||
if (!$used) {
|
if (!$used) {
|
||||||
// delete entity
|
// delete entity
|
||||||
mysqli_query($db, "delete from flags where flagid=\"$id\"");
|
mysqli_query($db, "delete from flags where flagid=\"$id\"");
|
||||||
mysqli_query($db,"drop table flag_$id");
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ($update) {
|
if ($update) {
|
||||||
// do error checking
|
// do error checking
|
||||||
// test for name supplied
|
// test for name supplied
|
||||||
if (strlen(trim($name))) {
|
if (strlen(trim($name))) {
|
||||||
$namesuppld=1;
|
$namesuppld = TRUE;
|
||||||
} else {
|
} else {
|
||||||
$namesuppld=0;
|
$namesuppld = FALSE;
|
||||||
echo "<img src=\"icons/exclamation-red.png\" border=\"0\"> Flag name cannot be blank.<br>";
|
echo "<img src=\"icons/exclamation-red.png\" border=\"0\"> Flag name cannot be blank.<br>";
|
||||||
}
|
}
|
||||||
// test for name unique
|
// test for name unique
|
||||||
if (mysqli_num_rows(mysqli_query($db, "select flagid from flags where flagname=\"$name\" and flagid!=\"$id\""))) {
|
if (mysqli_num_rows(mysqli_query($db, "select flagid from flags where flagname=\"$name\" and flagid!=\"$id\""))) {
|
||||||
if (mysqli_num_rows(mysqli_query($db, "select flagid from flags where flagname=\"$name\""))) {
|
if (mysqli_num_rows(mysqli_query($db, "select flagid from flags where flagname=\"$name\""))) {
|
||||||
$nameunique=0;
|
$nameunique = FALSE;
|
||||||
echo "<img src=\"icons/exclamation-red.png\" border=\"0\"> Flag name already exists.<br>";
|
echo "<img src=\"icons/exclamation-red.png\" border=\"0\"> Flag name already exists.<br>";
|
||||||
} else {
|
} else {
|
||||||
$nameunique=1;
|
$nameunique = TRUE;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
$nameunique=1;
|
$nameunique = TRUE;
|
||||||
}
|
}
|
||||||
// test for symbol supplied
|
// test for symbol supplied
|
||||||
if (strlen(trim($flagsym))) {
|
if (strlen(trim($flagsym))) {
|
||||||
$symsuppld=1;
|
$symsuppld = TRUE;
|
||||||
} else {
|
} else {
|
||||||
$symsuppld=0;
|
$symsuppld = FALSE;
|
||||||
echo "<img src=\"icons/exclamation-red.png\" border=\"0\"> Flag symbol cannot be blank.<br>";
|
echo "<img src=\"icons/exclamation-red.png\" border=\"0\"> Flag symbol cannot be blank.<br>";
|
||||||
}
|
}
|
||||||
// test for symbol unique
|
// test for symbol unique
|
||||||
if (mysqli_num_rows(mysqli_query($db, "select flagid from flags where flagsym=\"$flagsym\" and flagid!=\"$id\""))) {
|
if (mysqli_num_rows(mysqli_query($db, "select flagid from flags where flagsym=\"$flagsym\" and flagid!=\"$id\""))) {
|
||||||
if (mysqli_num_rows(mysqli_query($db, "select flagid from flags where flagsym=\"$flagsym\""))) {
|
if (mysqli_num_rows(mysqli_query($db, "select flagid from flags where flagsym=\"$flagsym\""))) {
|
||||||
$symunique=0;
|
$symunique = FALSE;
|
||||||
echo "<img src=\"icons/exclamation-red.png\" border=\"0\"> Flag symbol already exists.<br>";
|
echo "<img src=\"icons/exclamation-red.png\" border=\"0\"> Flag symbol already exists.<br>";
|
||||||
} else {
|
} else {
|
||||||
$symunique=1;
|
$symunique = TRUE;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
$symunique=1;
|
$symunique = TRUE;
|
||||||
}
|
}
|
||||||
if ($namesuppld && $nameunique && $symsuppld && $symunique) {
|
if ($namesuppld && $nameunique && $symsuppld && $symunique) {
|
||||||
// modify the table
|
// modify the table
|
||||||
@@ -536,14 +545,15 @@ if(!$print){
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case "logpartactions":
|
case "logpartactions":
|
||||||
if ($active) $active=1; else $active=0;
|
if ($active) $active = 1;
|
||||||
|
else $active = 0;
|
||||||
if ($delete) {
|
if ($delete) {
|
||||||
// check for logparts with this part action
|
// check for logparts with this part action
|
||||||
if (mysqli_num_rows(mysqli_query($db, "select logpartid from logparts where action=\"$id\""))) {
|
if (mysqli_num_rows(mysqli_query($db, "select logpartid from logparts where action=\"$id\""))) {
|
||||||
$hasparts=1;
|
$hasparts = TRUE;
|
||||||
echo "<img src=\"icons/exclamation-red.png\" border=\"0\"> Action is assigned to parts in logbook notes and cannot be deleted.<br>";
|
echo "<img src=\"icons/exclamation-red.png\" border=\"0\"> Action is assigned to parts in logbook notes and cannot be deleted.<br>";
|
||||||
} else {
|
} else {
|
||||||
$hasparts=0;
|
$hasparts = FALSE;
|
||||||
}
|
}
|
||||||
if (!$hasparts) {
|
if (!$hasparts) {
|
||||||
// delete entity
|
// delete entity
|
||||||
@@ -554,21 +564,21 @@ if(!$print){
|
|||||||
// do error checking
|
// do error checking
|
||||||
// test for name supplied
|
// test for name supplied
|
||||||
if (strlen(trim($name))) {
|
if (strlen(trim($name))) {
|
||||||
$namesuppld=1;
|
$namesuppld = TRUE;
|
||||||
} else {
|
} else {
|
||||||
$namesuppld=0;
|
$namesuppld = FALSE;
|
||||||
echo "<img src=\"icons/exclamation-red.png\" border=\"0\"> Part Action name cannot be blank.<br>";
|
echo "<img src=\"icons/exclamation-red.png\" border=\"0\"> Part Action name cannot be blank.<br>";
|
||||||
}
|
}
|
||||||
// test for name unique
|
// test for name unique
|
||||||
if (mysqli_num_rows(mysqli_query($db, "select lpactionid from logpartactions where lpactionname=\"$name\" and lpactionid!=\"$id\""))) {
|
if (mysqli_num_rows(mysqli_query($db, "select lpactionid from logpartactions where lpactionname=\"$name\" and lpactionid!=\"$id\""))) {
|
||||||
if (mysqli_num_rows(mysqli_query($db, "select lpactionid from logpartactions where lpactionname=\"$name\""))) {
|
if (mysqli_num_rows(mysqli_query($db, "select lpactionid from logpartactions where lpactionname=\"$name\""))) {
|
||||||
$nameunique=0;
|
$nameunique = FALSE;
|
||||||
echo "<img src=\"icons/exclamation-red.png\" border=\"0\"> Part Action name already exists.<br>";
|
echo "<img src=\"icons/exclamation-red.png\" border=\"0\"> Part Action name already exists.<br>";
|
||||||
} else {
|
} else {
|
||||||
$nameunique=1;
|
$nameunique = TRUE;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
$nameunique=1;
|
$nameunique = TRUE;
|
||||||
}
|
}
|
||||||
if ($namesuppld && $nameunique) {
|
if ($namesuppld && $nameunique) {
|
||||||
// modify the table
|
// modify the table
|
||||||
@@ -585,21 +595,21 @@ if(!$print){
|
|||||||
// do error checking
|
// do error checking
|
||||||
// test for name supplied
|
// test for name supplied
|
||||||
if (strlen(trim($name))) {
|
if (strlen(trim($name))) {
|
||||||
$namesuppld=1;
|
$namesuppld = TRUE;
|
||||||
} else {
|
} else {
|
||||||
$namesuppld=0;
|
$namesuppld = FALSE;
|
||||||
echo "<img src=\"icons/exclamation-red.png\" border=\"0\"> Banner name cannot be blank.<br>";
|
echo "<img src=\"icons/exclamation-red.png\" border=\"0\"> Banner name cannot be blank.<br>";
|
||||||
}
|
}
|
||||||
// test for name unique
|
// test for name unique
|
||||||
if (mysqli_num_rows(mysqli_query($db, "select bannerid from banners where bannername=\"$name\" and bannerid!=\"$id\""))) {
|
if (mysqli_num_rows(mysqli_query($db, "select bannerid from banners where bannername=\"$name\" and bannerid!=\"$id\""))) {
|
||||||
if (mysqli_num_rows(mysqli_query($db, "select bannerid from banners where bannername=\"$name\""))) {
|
if (mysqli_num_rows(mysqli_query($db, "select bannerid from banners where bannername=\"$name\""))) {
|
||||||
$nameunique=0;
|
$nameunique = FALSE;
|
||||||
echo "<img src=\"icons/exclamation-red.png\" border=\"0\"> Banner name already exists.<br>";
|
echo "<img src=\"icons/exclamation-red.png\" border=\"0\"> Banner name already exists.<br>";
|
||||||
} else {
|
} else {
|
||||||
$nameunique=1;
|
$nameunique = TRUE;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
$nameunique=1;
|
$nameunique = TRUE;
|
||||||
}
|
}
|
||||||
if ($namesuppld && $nameunique) {
|
if ($namesuppld && $nameunique) {
|
||||||
// modify the table
|
// modify the table
|
||||||
@@ -610,21 +620,24 @@ if(!$print){
|
|||||||
case "configs":
|
case "configs":
|
||||||
switch ($type) {
|
switch ($type) {
|
||||||
case "display":
|
case "display":
|
||||||
if ($display_showts) $display_showts=1; else $display_showts=0;
|
if ($display_showts) $display_showts = 1;
|
||||||
if ($display_techalpha=="a") $display_techalpha=1; else $display_techalpha=0;
|
else $display_showts = 0;
|
||||||
if ($display_subjalpha=="a") $display_subjalpha=1; else $display_subjalpha=0;
|
if ($display_techalpha == "a") $display_techalpha = 1;
|
||||||
|
else $display_techalpha = 0;
|
||||||
|
if ($display_subjalpha == "a") $display_subjalpha = 1;
|
||||||
|
else $display_subjalpha = 0;
|
||||||
// test for logname supplied
|
// test for logname supplied
|
||||||
if (strlen(trim($display_logname))) {
|
if (strlen(trim($display_logname))) {
|
||||||
$namesuppld=1;
|
$namesuppld = TRUE;
|
||||||
} else {
|
} else {
|
||||||
$namesuppld=0;
|
$namesuppld = FALSE;
|
||||||
echo "<img src=\"icons/exclamation-red.png\" border=\"0\"> Log name cannot be blank.<br>";
|
echo "<img src=\"icons/exclamation-red.png\" border=\"0\"> Log name cannot be blank.<br>";
|
||||||
}
|
}
|
||||||
// test for urlchunk supplied
|
// test for urlchunk supplied
|
||||||
if (strlen(trim($display_urlchunk))) {
|
if (strlen(trim($display_urlchunk))) {
|
||||||
$chunksuppld=1;
|
$chunksuppld = TRUE;
|
||||||
} else {
|
} else {
|
||||||
$chunksuppld=0;
|
$chunksuppld = FALSE;
|
||||||
echo "<img src=\"icons/exclamation-red.png\" border=\"0\"> URL chunk size cannot be blank.<br>";
|
echo "<img src=\"icons/exclamation-red.png\" border=\"0\"> URL chunk size cannot be blank.<br>";
|
||||||
}
|
}
|
||||||
if ($namesuppld && $chunksuppld) {
|
if ($namesuppld && $chunksuppld) {
|
||||||
@@ -666,16 +679,16 @@ if(!$print){
|
|||||||
}
|
}
|
||||||
// test for sessttl supplied
|
// test for sessttl supplied
|
||||||
if (strlen(trim($misc_sessttl))) {
|
if (strlen(trim($misc_sessttl))) {
|
||||||
$ttlsuppld=1;
|
$ttlsuppld = TRUE;
|
||||||
} else {
|
} else {
|
||||||
$ttlsuppld=0;
|
$ttlsuppld = FALSE;
|
||||||
echo "<img src=\"icons/exclamation-red.png\" border=\"0\"> Session expiration time cannot be blank.<br>";
|
echo "<img src=\"icons/exclamation-red.png\" border=\"0\"> Session expiration time cannot be blank.<br>";
|
||||||
}
|
}
|
||||||
// test for sessdir supplied
|
// test for sessdir supplied
|
||||||
if (strlen(trim($misc_sessdir))) {
|
if (strlen(trim($misc_sessdir))) {
|
||||||
$dirsuppld=1;
|
$dirsuppld = TRUE;
|
||||||
} else {
|
} else {
|
||||||
$dirsuppld=0;
|
$dirsuppld = FALSE;
|
||||||
echo "<img src=\"icons/exclamation-red.png\" border=\"0\"> Server session file directory cannot be blank.<br>";
|
echo "<img src=\"icons/exclamation-red.png\" border=\"0\"> Server session file directory cannot be blank.<br>";
|
||||||
}
|
}
|
||||||
if ($ttlsuppld && $dirsuppld) {
|
if ($ttlsuppld && $dirsuppld) {
|
||||||
@@ -831,7 +844,8 @@ switch($table) {
|
|||||||
$statdef = "<img src=\"icons/cross.png\" title=\"inactive\" alt=\"inactive\">";
|
$statdef = "<img src=\"icons/cross.png\" title=\"inactive\" alt=\"inactive\">";
|
||||||
}
|
}
|
||||||
$shiftname = dblookup($db, "shifts", "shiftid", "shiftname", $tablerow["shift"]);
|
$shiftname = dblookup($db, "shifts", "shiftid", "shiftname", $tablerow["shift"]);
|
||||||
printf("
|
printf(
|
||||||
|
"
|
||||||
<tr>
|
<tr>
|
||||||
<td><a href=\"admin.php?table=$table&edit=1&id=%s\">%s</a></td>
|
<td><a href=\"admin.php?table=$table&edit=1&id=%s\">%s</a></td>
|
||||||
<td>%s</td>
|
<td>%s</td>
|
||||||
@@ -839,11 +853,13 @@ switch($table) {
|
|||||||
<td align=\"center\">%s</td>
|
<td align=\"center\">%s</td>
|
||||||
<td align=\"center\">%s</td>
|
<td align=\"center\">%s</td>
|
||||||
</tr>",
|
</tr>",
|
||||||
$tablerow["techid"],$tablerow["techid"],
|
$tablerow["techid"],
|
||||||
|
$tablerow["techid"],
|
||||||
$tablerow["techname"],
|
$tablerow["techname"],
|
||||||
$shiftname,
|
$shiftname,
|
||||||
$admdef,
|
$admdef,
|
||||||
$statdef);
|
$statdef
|
||||||
|
);
|
||||||
}
|
}
|
||||||
echo "</table>";
|
echo "</table>";
|
||||||
break;
|
break;
|
||||||
@@ -906,15 +922,18 @@ switch($table) {
|
|||||||
} else {
|
} else {
|
||||||
$statdef = "<img src=\"icons/cross.png\" title=\"inactive\" alt=\"inactive\">";
|
$statdef = "<img src=\"icons/cross.png\" title=\"inactive\" alt=\"inactive\">";
|
||||||
}
|
}
|
||||||
printf("
|
printf(
|
||||||
|
"
|
||||||
<tr>
|
<tr>
|
||||||
<td><a href=\"admin.php?table=$table&edit=1&id=%s\">%s</a></td>
|
<td><a href=\"admin.php?table=$table&edit=1&id=%s\">%s</a></td>
|
||||||
<td>%s</td>
|
<td>%s</td>
|
||||||
<td align=\"center\">%s</td>
|
<td align=\"center\">%s</td>
|
||||||
</tr>",
|
</tr>",
|
||||||
$tablerow["shiftid"],$tablerow["shiftid"],
|
$tablerow["shiftid"],
|
||||||
|
$tablerow["shiftid"],
|
||||||
$tablerow["shiftname"],
|
$tablerow["shiftname"],
|
||||||
$statdef);
|
$statdef
|
||||||
|
);
|
||||||
}
|
}
|
||||||
echo "</table>";
|
echo "</table>";
|
||||||
break;
|
break;
|
||||||
@@ -977,15 +996,18 @@ switch($table) {
|
|||||||
} else {
|
} else {
|
||||||
$statdef = "<img src=\"icons/cross.png\" title=\"inactive\" alt=\"inactive\">";
|
$statdef = "<img src=\"icons/cross.png\" title=\"inactive\" alt=\"inactive\">";
|
||||||
}
|
}
|
||||||
printf("
|
printf(
|
||||||
|
"
|
||||||
<tr>
|
<tr>
|
||||||
<td><a href=\"admin.php?table=$table&edit=1&id=%s\">%s</a></td>
|
<td><a href=\"admin.php?table=$table&edit=1&id=%s\">%s</a></td>
|
||||||
<td>%s</td>
|
<td>%s</td>
|
||||||
<td align=\"center\">%s</td>
|
<td align=\"center\">%s</td>
|
||||||
</tr>",
|
</tr>",
|
||||||
$tablerow["subjectid"],$tablerow["subjectid"],
|
$tablerow["subjectid"],
|
||||||
|
$tablerow["subjectid"],
|
||||||
$tablerow["subjectname"],
|
$tablerow["subjectname"],
|
||||||
$statdef);
|
$statdef
|
||||||
|
);
|
||||||
}
|
}
|
||||||
echo "</table>";
|
echo "</table>";
|
||||||
break;
|
break;
|
||||||
@@ -1090,17 +1112,21 @@ switch($table) {
|
|||||||
} else {
|
} else {
|
||||||
$statdef = "<img src=\"icons/cross.png\" title=\"inactive\" alt=\"inactive\">";
|
$statdef = "<img src=\"icons/cross.png\" title=\"inactive\" alt=\"inactive\">";
|
||||||
}
|
}
|
||||||
printf("
|
printf(
|
||||||
|
"
|
||||||
<tr>
|
<tr>
|
||||||
<td><a href=\"admin.php?table=$table&edit=1&id=%s\">%s</a></td>
|
<td><a href=\"admin.php?table=$table&edit=1&id=%s\">%s</a></td>
|
||||||
<td>%s</td>
|
<td>%s</td>
|
||||||
<td><a href=\"%s\">%s</a></td>
|
<td><a href=\"%s\">%s</a></td>
|
||||||
<td align=\"center\">%s</td>
|
<td align=\"center\">%s</td>
|
||||||
</tr>",
|
</tr>",
|
||||||
$tablerow["linkid"],$tablerow["linkid"],
|
$tablerow["linkid"],
|
||||||
|
$tablerow["linkid"],
|
||||||
$tablerow["displaytxt"],
|
$tablerow["displaytxt"],
|
||||||
$tablerow["urltxt"],$tablerow["urltxt"],
|
$tablerow["urltxt"],
|
||||||
$statdef);
|
$tablerow["urltxt"],
|
||||||
|
$statdef
|
||||||
|
);
|
||||||
}
|
}
|
||||||
echo "</table>";
|
echo "</table>";
|
||||||
break;
|
break;
|
||||||
@@ -1187,17 +1213,21 @@ switch($table) {
|
|||||||
} else {
|
} else {
|
||||||
$statdef = "<img src=\"icons/cross.png\" title=\"inactive\" alt=\"inactive\">";
|
$statdef = "<img src=\"icons/cross.png\" title=\"inactive\" alt=\"inactive\">";
|
||||||
}
|
}
|
||||||
printf("
|
printf(
|
||||||
|
"
|
||||||
<tr>
|
<tr>
|
||||||
<td><a href=\"admin.php?table=$table&edit=1&id=%s\">%s</a></td>
|
<td><a href=\"admin.php?table=$table&edit=1&id=%s\">%s</a></td>
|
||||||
<td>%s</td>
|
<td>%s</td>
|
||||||
<td align=\"center\"><font color=\"%s\">%s</font></td>
|
<td align=\"center\"><font color=\"%s\">%s</font></td>
|
||||||
<td align=\"center\">%s</td>
|
<td align=\"center\">%s</td>
|
||||||
</tr>",
|
</tr>",
|
||||||
$tablerow["flagid"],$tablerow["flagid"],
|
$tablerow["flagid"],
|
||||||
|
$tablerow["flagid"],
|
||||||
$tablerow["flagname"],
|
$tablerow["flagname"],
|
||||||
$tablerow["flagcolor"],$tablerow["flagsym"],
|
$tablerow["flagcolor"],
|
||||||
$statdef);
|
$tablerow["flagsym"],
|
||||||
|
$statdef
|
||||||
|
);
|
||||||
}
|
}
|
||||||
echo "</table>";
|
echo "</table>";
|
||||||
break;
|
break;
|
||||||
@@ -1260,15 +1290,18 @@ switch($table) {
|
|||||||
} else {
|
} else {
|
||||||
$statdef = "<img src=\"icons/cross.png\" title=\"inactive\" alt=\"inactive\">";
|
$statdef = "<img src=\"icons/cross.png\" title=\"inactive\" alt=\"inactive\">";
|
||||||
}
|
}
|
||||||
printf("
|
printf(
|
||||||
|
"
|
||||||
<tr>
|
<tr>
|
||||||
<td><a href=\"admin.php?table=$table&edit=1&id=%s\">%s</a></td>
|
<td><a href=\"admin.php?table=$table&edit=1&id=%s\">%s</a></td>
|
||||||
<td>%s</td>
|
<td>%s</td>
|
||||||
<td align=\"center\">%s</td>
|
<td align=\"center\">%s</td>
|
||||||
</tr>",
|
</tr>",
|
||||||
$tablerow["lpactionid"],$tablerow["lpactionid"],
|
$tablerow["lpactionid"],
|
||||||
|
$tablerow["lpactionid"],
|
||||||
$tablerow["lpactionname"],
|
$tablerow["lpactionname"],
|
||||||
$statdef);
|
$statdef
|
||||||
|
);
|
||||||
}
|
}
|
||||||
echo "</table>";
|
echo "</table>";
|
||||||
break;
|
break;
|
||||||
@@ -1363,13 +1396,18 @@ switch($table) {
|
|||||||
<tr><th>Banner ID</th><th>Banner</th></tr>
|
<tr><th>Banner ID</th><th>Banner</th></tr>
|
||||||
";
|
";
|
||||||
while ($tablerow = mysqli_fetch_assoc($existingdata)) {
|
while ($tablerow = mysqli_fetch_assoc($existingdata)) {
|
||||||
printf("
|
printf(
|
||||||
|
"
|
||||||
<tr>
|
<tr>
|
||||||
<td><a href=\"admin.php?table=$table&edit=1&id=%s\">%s</a></td>
|
<td><a href=\"admin.php?table=$table&edit=1&id=%s\">%s</a></td>
|
||||||
<td align=\"center\" bgcolor=\"%s\"><font color=\"%s\">%s</font></td>
|
<td align=\"center\" bgcolor=\"%s\"><font color=\"%s\">%s</font></td>
|
||||||
</tr>",
|
</tr>",
|
||||||
$tablerow["bannerid"],$tablerow["bannerid"],
|
$tablerow["bannerid"],
|
||||||
$tablerow["bannercolor"],$tablerow["textcolor"],$tablerow["bannername"]);
|
$tablerow["bannerid"],
|
||||||
|
$tablerow["bannercolor"],
|
||||||
|
$tablerow["textcolor"],
|
||||||
|
$tablerow["bannername"]
|
||||||
|
);
|
||||||
}
|
}
|
||||||
echo "</table>";
|
echo "</table>";
|
||||||
break;
|
break;
|
||||||
@@ -1586,5 +1624,3 @@ pageblock("right","end");
|
|||||||
pagetable("end");
|
pagetable("end");
|
||||||
|
|
||||||
framework("end", "", "", $print);
|
framework("end", "", "", $print);
|
||||||
|
|
||||||
?>
|
|
||||||
|
|||||||
@@ -45,11 +45,13 @@ $basic_colors=array(
|
|||||||
"Blue" => "#0000FF",
|
"Blue" => "#0000FF",
|
||||||
"Navy" => "#000080",
|
"Navy" => "#000080",
|
||||||
"Fuchsia" => "#FF00FF",
|
"Fuchsia" => "#FF00FF",
|
||||||
"Purple" => "#800080");
|
"Purple" => "#800080"
|
||||||
|
);
|
||||||
|
|
||||||
// Generic functions
|
// Generic functions
|
||||||
|
|
||||||
function framework($option,$htmltitle,$pagetitle,$print) {
|
function framework($option, $htmltitle, $pagetitle, $print)
|
||||||
|
{
|
||||||
// generates html code for the beginning and end of all pages
|
// generates html code for the beginning and end of all pages
|
||||||
if ($option == "begin") {
|
if ($option == "begin") {
|
||||||
// generates everything down to the first horiz rule inclusive
|
// generates everything down to the first horiz rule inclusive
|
||||||
@@ -221,7 +223,8 @@ function framework($option,$htmltitle,$pagetitle,$print) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function pagetable($option) {
|
function pagetable($option)
|
||||||
|
{
|
||||||
if ($option == "begin") {
|
if ($option == "begin") {
|
||||||
echo "
|
echo "
|
||||||
<br>
|
<br>
|
||||||
@@ -240,7 +243,8 @@ function pagetable($option) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function pageblock($block,$option) {
|
function pageblock($block, $option)
|
||||||
|
{
|
||||||
global $sbcolor;
|
global $sbcolor;
|
||||||
if ($block == "left") {
|
if ($block == "left") {
|
||||||
if ($option == "begin") {
|
if ($option == "begin") {
|
||||||
@@ -280,7 +284,8 @@ function pageblock($block,$option) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function sidemenu($noprint=false) {
|
function sidemenu($noprint = false)
|
||||||
|
{
|
||||||
// Displays sidebar menu
|
// Displays sidebar menu
|
||||||
global $db, $mbgcolor, $noprint;
|
global $db, $mbgcolor, $noprint;
|
||||||
$doparts = PARTS_FUNCTIONS;
|
$doparts = PARTS_FUNCTIONS;
|
||||||
@@ -359,7 +364,8 @@ function sidemenu($noprint=false) {
|
|||||||
";
|
";
|
||||||
}
|
}
|
||||||
|
|
||||||
function banner($print) {
|
function banner($print)
|
||||||
|
{
|
||||||
// displays a banner
|
// displays a banner
|
||||||
global $db;
|
global $db;
|
||||||
$bannerid = BANNER;
|
$bannerid = BANNER;
|
||||||
@@ -385,7 +391,8 @@ function banner($print) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function dblookup($dbhandle,$table,$in_field,$out_field,$in_data) {
|
function dblookup($dbhandle, $table, $in_field, $out_field, $in_data)
|
||||||
|
{
|
||||||
// look up a single field in a database given a value for a single field
|
// look up a single field in a database given a value for a single field
|
||||||
$dbqry = mysqli_query($dbhandle, "select $out_field from $table where $in_field=\"$in_data\"");
|
$dbqry = mysqli_query($dbhandle, "select $out_field from $table where $in_field=\"$in_data\"");
|
||||||
if (mysqli_num_rows($dbqry)) {
|
if (mysqli_num_rows($dbqry)) {
|
||||||
@@ -396,7 +403,8 @@ function dblookup($dbhandle,$table,$in_field,$out_field,$in_data) {
|
|||||||
return ($out_data);
|
return ($out_data);
|
||||||
}
|
}
|
||||||
|
|
||||||
function calendar($year,$month,$day,$link_url) {
|
function calendar($year, $month, $day, $link_url)
|
||||||
|
{
|
||||||
// takes a numeric year, month, day, and the basic url for the day links as arguments
|
// takes a numeric year, month, day, and the basic url for the day links as arguments
|
||||||
// Shows a calendar with clickable dates.
|
// Shows a calendar with clickable dates.
|
||||||
// Based on an embeddable calendar by Yves Glodt.
|
// Based on an embeddable calendar by Yves Glodt.
|
||||||
@@ -512,7 +520,8 @@ EOT;
|
|||||||
print "</table>\n";
|
print "</table>\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
function colorpicker($baseurl) {
|
function colorpicker($baseurl)
|
||||||
|
{
|
||||||
// takes a standard url and tacks the color number on to the end of it
|
// takes a standard url and tacks the color number on to the end of it
|
||||||
// giving a palette of links
|
// giving a palette of links
|
||||||
echo "
|
echo "
|
||||||
@@ -595,7 +604,8 @@ function colorpicker($baseurl) {
|
|||||||
// Project functions
|
// Project functions
|
||||||
|
|
||||||
|
|
||||||
function getsetting($setting_name,$tech_id) {
|
function getsetting($setting_name, $tech_id)
|
||||||
|
{
|
||||||
// get the value of a setting for a tech
|
// get the value of a setting for a tech
|
||||||
global $db;
|
global $db;
|
||||||
$confinfo = mysqli_fetch_assoc(mysqli_query($db, "select confid,confvalue from configs where confname=\"$setting_name\""));
|
$confinfo = mysqli_fetch_assoc(mysqli_query($db, "select confid,confvalue from configs where confname=\"$setting_name\""));
|
||||||
@@ -617,7 +627,8 @@ function getsetting($setting_name,$tech_id) {
|
|||||||
return $result;
|
return $result;
|
||||||
}
|
}
|
||||||
|
|
||||||
function putsetting($setting_name,$setting_value,$tech_id) {
|
function putsetting($setting_name, $setting_value, $tech_id)
|
||||||
|
{
|
||||||
// set the value of a setting for a tech
|
// set the value of a setting for a tech
|
||||||
global $db;
|
global $db;
|
||||||
$confinfo = mysqli_fetch_assoc(mysqli_query($db, "select confid,confvalue from configs where confname=\"$setting_name\""));
|
$confinfo = mysqli_fetch_assoc(mysqli_query($db, "select confid,confvalue from configs where confname=\"$setting_name\""));
|
||||||
@@ -637,7 +648,8 @@ function putsetting($setting_name,$setting_value,$tech_id) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function islink($il_note) {
|
function islink($il_note)
|
||||||
|
{
|
||||||
// takes a noteid number as an argument
|
// takes a noteid number as an argument
|
||||||
// determines if the argument is a link in a reference chain
|
// determines if the argument is a link in a reference chain
|
||||||
// returns 1 if note is a link, 0 if not
|
// returns 1 if note is a link, 0 if not
|
||||||
@@ -651,7 +663,8 @@ function islink($il_note) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
function generate_chain($chainlink) {
|
function generate_chain($chainlink)
|
||||||
|
{
|
||||||
// generate a reference chain
|
// generate a reference chain
|
||||||
// takes a single parameter, a noteid
|
// takes a single parameter, a noteid
|
||||||
// finds all notes that are members of a chain containing the supplied noteid
|
// finds all notes that are members of a chain containing the supplied noteid
|
||||||
@@ -693,7 +706,8 @@ function generate_chain($chainlink) {
|
|||||||
return ($chainarray);
|
return ($chainarray);
|
||||||
}
|
}
|
||||||
|
|
||||||
function convertweblinks($rawstring) {
|
function convertweblinks($rawstring)
|
||||||
|
{
|
||||||
// takes a string, finds urls, and returns the string with urls converted to clickable links
|
// takes a string, finds urls, and returns the string with urls converted to clickable links
|
||||||
$urlchunksize = URL_CHUNK_SIZE;
|
$urlchunksize = URL_CHUNK_SIZE;
|
||||||
// define regex pattern for urls
|
// define regex pattern for urls
|
||||||
@@ -712,7 +726,8 @@ function convertweblinks($rawstring) {
|
|||||||
return $rawstring;
|
return $rawstring;
|
||||||
}
|
}
|
||||||
|
|
||||||
function showlinklist($print) {
|
function showlinklist($print)
|
||||||
|
{
|
||||||
global $db;
|
global $db;
|
||||||
$linkresult = mysqli_query($db, "select linkid from links where status=\"1\"");
|
$linkresult = mysqli_query($db, "select linkid from links where status=\"1\"");
|
||||||
if (mysqli_num_rows($linkresult) && !$print) {
|
if (mysqli_num_rows($linkresult) && !$print) {
|
||||||
@@ -726,7 +741,8 @@ function showlinklist($print) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function nag($tech_id) {
|
function nag($tech_id)
|
||||||
|
{
|
||||||
// nags the user if something is pending
|
// nags the user if something is pending
|
||||||
global $db, $today;
|
global $db, $today;
|
||||||
// maintenance forms
|
// maintenance forms
|
||||||
@@ -751,7 +767,8 @@ function nag($tech_id) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function get_part_data($partinputdata) {
|
function get_part_data($partinputdata)
|
||||||
|
{
|
||||||
// given an associative array of partid, uid, partnum, sernum,
|
// given an associative array of partid, uid, partnum, sernum,
|
||||||
// return an associative array of
|
// return an associative array of
|
||||||
// partid, uid, partnum, sernum, partname, result
|
// partid, uid, partnum, sernum, partname, result
|
||||||
@@ -821,7 +838,8 @@ function get_part_data($partinputdata) {
|
|||||||
return $partdata;
|
return $partdata;
|
||||||
}
|
}
|
||||||
|
|
||||||
function get_upcoming_events() {
|
function get_upcoming_events()
|
||||||
|
{
|
||||||
// build array of upcoming events
|
// build array of upcoming events
|
||||||
// takes no arguments
|
// takes no arguments
|
||||||
// returns an array containing arrays of upcoming event data
|
// returns an array containing arrays of upcoming event data
|
||||||
@@ -910,7 +928,8 @@ function get_upcoming_events() {
|
|||||||
return $ucevents;
|
return $ucevents;
|
||||||
}
|
}
|
||||||
|
|
||||||
function format_message($msgtype,$msgtxt) {
|
function format_message($msgtype, $msgtxt)
|
||||||
|
{
|
||||||
// displays a formatted message
|
// displays a formatted message
|
||||||
// $msgtype is 0 for success or anything else for failure
|
// $msgtype is 0 for success or anything else for failure
|
||||||
// $msgtxt is the string to display
|
// $msgtxt is the string to display
|
||||||
@@ -930,7 +949,8 @@ function format_message($msgtype,$msgtxt) {
|
|||||||
";
|
";
|
||||||
}
|
}
|
||||||
|
|
||||||
function templateselect($techid,$operation) {
|
function templateselect($techid, $operation)
|
||||||
|
{
|
||||||
// Displays a line enabling selection of a user or global template
|
// Displays a line enabling selection of a user or global template
|
||||||
// $techid is the id number of the current tech
|
// $techid is the id number of the current tech
|
||||||
// $operation is one of "add" "edit" "delete"
|
// $operation is one of "add" "edit" "delete"
|
||||||
@@ -980,4 +1000,3 @@ function templateselect($techid,$operation) {
|
|||||||
</form>
|
</form>
|
||||||
";
|
";
|
||||||
}
|
}
|
||||||
?>
|
|
||||||
|
|||||||
@@ -380,5 +380,3 @@ pageblock("right","end");
|
|||||||
pagetable("end");
|
pagetable("end");
|
||||||
|
|
||||||
framework("end", "", "", $print);
|
framework("end", "", "", $print);
|
||||||
|
|
||||||
?>
|
|
||||||
|
|||||||
@@ -239,7 +239,6 @@ if ($add) {
|
|||||||
if ($mfreqs[$plidx] == "on") {
|
if ($mfreqs[$plidx] == "on") {
|
||||||
mysqli_query($db, "insert into maintforms(mfdate,mftech,mfpart,pending,lognoteid) values(\"$date\",\"$techid\",\"$lpid\",1,\"$newnoteid\")");
|
mysqli_query($db, "insert into maintforms(mfdate,mftech,mfpart,pending,lognoteid) values(\"$date\",\"$techid\",\"$lpid\",1,\"$newnoteid\")");
|
||||||
}
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
// no part info was entered
|
// no part info was entered
|
||||||
}
|
}
|
||||||
@@ -401,7 +400,6 @@ if ($edit) {
|
|||||||
if ($mfreqs[$plidx] == "on") {
|
if ($mfreqs[$plidx] == "on") {
|
||||||
mysqli_query($db, "insert into maintforms(mfdate,mftech,mfpart,pending,lognoteid) values(\"$date\",\"$techid\",\"$lpid\",1,\"$noteid\")");
|
mysqli_query($db, "insert into maintforms(mfdate,mftech,mfpart,pending,lognoteid) values(\"$date\",\"$techid\",\"$lpid\",1,\"$noteid\")");
|
||||||
}
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
// no part info was entered
|
// no part info was entered
|
||||||
;
|
;
|
||||||
@@ -520,7 +518,8 @@ if ($isadmin) {
|
|||||||
<td><b>Tech: </b>
|
<td><b>Tech: </b>
|
||||||
<select name=\"efftechid\">
|
<select name=\"efftechid\">
|
||||||
";
|
";
|
||||||
if ($techalpha) $torder="techname"; else $torder="techid";
|
if ($techalpha) $torder = "techname";
|
||||||
|
else $torder = "techid";
|
||||||
$techrow = mysqli_query($db, "select * from techs order by $torder asc");
|
$techrow = mysqli_query($db, "select * from techs order by $torder asc");
|
||||||
while ($techitem = mysqli_fetch_assoc($techrow)) {
|
while ($techitem = mysqli_fetch_assoc($techrow)) {
|
||||||
if ($techitem["status"] == 1) {
|
if ($techitem["status"] == 1) {
|
||||||
@@ -563,7 +562,8 @@ echo "
|
|||||||
<td colspan=\"2\"><b>Subject: </b>
|
<td colspan=\"2\"><b>Subject: </b>
|
||||||
<select name=\"subject\">
|
<select name=\"subject\">
|
||||||
";
|
";
|
||||||
if ($subjalpha) $sorder="subjectname"; else $sorder="subjectid";
|
if ($subjalpha) $sorder = "subjectname";
|
||||||
|
else $sorder = "subjectid";
|
||||||
$subjrow = mysqli_query($db, "select * from subjects order by $sorder asc");
|
$subjrow = mysqli_query($db, "select * from subjects order by $sorder asc");
|
||||||
while ($subjitem = mysqli_fetch_assoc($subjrow)) {
|
while ($subjitem = mysqli_fetch_assoc($subjrow)) {
|
||||||
if ($subjitem["status"] == 1) {
|
if ($subjitem["status"] == 1) {
|
||||||
@@ -618,13 +618,23 @@ $flagcount=1;
|
|||||||
while ($flagcheckbox = mysqli_fetch_assoc($flagslist)) {
|
while ($flagcheckbox = mysqli_fetch_assoc($flagslist)) {
|
||||||
|
|
||||||
if (in_array($flagcheckbox["flagid"], $theseflags)) {
|
if (in_array($flagcheckbox["flagid"], $theseflags)) {
|
||||||
printf("<input type=\"checkbox\" name=\"flags[]\" value=\"%s\" checked><font color=\"%s\" title=\"%s\">%s</font>",
|
printf(
|
||||||
$flagcheckbox["flagid"],$flagcheckbox["flagcolor"],$flagcheckbox["flagname"],$flagcheckbox["flagsym"]);
|
"<input type=\"checkbox\" name=\"flags[]\" value=\"%s\" checked><font color=\"%s\" title=\"%s\">%s</font>",
|
||||||
|
$flagcheckbox["flagid"],
|
||||||
|
$flagcheckbox["flagcolor"],
|
||||||
|
$flagcheckbox["flagname"],
|
||||||
|
$flagcheckbox["flagsym"]
|
||||||
|
);
|
||||||
} else {
|
} else {
|
||||||
$flagid = $flagcheckbox["flagid"];
|
$flagid = $flagcheckbox["flagid"];
|
||||||
if (mysqli_num_rows(mysqli_query($db, "select flagid from flags where flagid=\"$flagid\" and status=1"))) {
|
if (mysqli_num_rows(mysqli_query($db, "select flagid from flags where flagid=\"$flagid\" and status=1"))) {
|
||||||
printf("<input type=\"checkbox\" name=\"flags[]\" value=\"%s\"><font color=\"%s\" title=\"%s\">%s</font>",
|
printf(
|
||||||
$flagcheckbox["flagid"],$flagcheckbox["flagcolor"],$flagcheckbox["flagname"],$flagcheckbox["flagsym"]);
|
"<input type=\"checkbox\" name=\"flags[]\" value=\"%s\"><font color=\"%s\" title=\"%s\">%s</font>",
|
||||||
|
$flagcheckbox["flagid"],
|
||||||
|
$flagcheckbox["flagcolor"],
|
||||||
|
$flagcheckbox["flagname"],
|
||||||
|
$flagcheckbox["flagsym"]
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ($flagcount < $flagsperline) {
|
if ($flagcount < $flagsperline) {
|
||||||
@@ -786,5 +796,3 @@ pageblock("right","end");
|
|||||||
pagetable("end");
|
pagetable("end");
|
||||||
|
|
||||||
framework("end", "", "", $print);
|
framework("end", "", "", $print);
|
||||||
|
|
||||||
?>
|
|
||||||
|
|||||||
@@ -58,7 +58,6 @@ if ($login) {
|
|||||||
while ($admintech = mysqli_fetch_row($adminqry)[0]) {
|
while ($admintech = mysqli_fetch_row($adminqry)[0]) {
|
||||||
echo "$admintech <br>";
|
echo "$admintech <br>";
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
} else if ($cancel) {
|
} else if ($cancel) {
|
||||||
echo "
|
echo "
|
||||||
@@ -72,7 +71,8 @@ if ($login) {
|
|||||||
<b>Tech: </b>
|
<b>Tech: </b>
|
||||||
<select name=\"tech\">
|
<select name=\"tech\">
|
||||||
";
|
";
|
||||||
if ($techalpha) $torder="techname"; else $torder="techid";
|
if ($techalpha) $torder = "techname";
|
||||||
|
else $torder = "techid";
|
||||||
$techrow = mysqli_query($db, "select * from techs order by $torder asc");
|
$techrow = mysqli_query($db, "select * from techs order by $torder asc");
|
||||||
while ($techitem = mysqli_fetch_assoc($techrow)) {
|
while ($techitem = mysqli_fetch_assoc($techrow)) {
|
||||||
if ($techitem["status"] == 1) {
|
if ($techitem["status"] == 1) {
|
||||||
@@ -98,5 +98,3 @@ pageblock("right","end");
|
|||||||
pagetable("end");
|
pagetable("end");
|
||||||
|
|
||||||
framework("end", "", "", $print);
|
framework("end", "", "", $print);
|
||||||
|
|
||||||
?>
|
|
||||||
|
|||||||
@@ -32,7 +32,8 @@ if ($print) {
|
|||||||
if ($tgt_date == "") $tgt_date = $today;
|
if ($tgt_date == "") $tgt_date = $today;
|
||||||
|
|
||||||
// define shifttable_classic function
|
// define shifttable_classic function
|
||||||
function shifttable_classic($shift, $tgt_date, $db) {
|
function shifttable_classic($shift, $tgt_date, $db)
|
||||||
|
{
|
||||||
// convert the shift number to a name for display
|
// convert the shift number to a name for display
|
||||||
$doparts = PARTS_FUNCTIONS;
|
$doparts = PARTS_FUNCTIONS;
|
||||||
$showtime = SHOW_TS;
|
$showtime = SHOW_TS;
|
||||||
@@ -89,7 +90,9 @@ function shifttable_classic($shift, $tgt_date, $db) {
|
|||||||
<td valign=\"top\">%s</td>
|
<td valign=\"top\">%s</td>
|
||||||
<td valign=\"top\">%s</td>
|
<td valign=\"top\">%s</td>
|
||||||
</tr>\n",
|
</tr>\n",
|
||||||
$tablerow["lognoteid"],$tablerow["lognoteid"],$tablerow["time"],
|
$tablerow["lognoteid"],
|
||||||
|
$tablerow["lognoteid"],
|
||||||
|
$tablerow["time"],
|
||||||
$tname,
|
$tname,
|
||||||
$subjname,
|
$subjname,
|
||||||
$fmtnote,
|
$fmtnote,
|
||||||
@@ -104,7 +107,8 @@ function shifttable_classic($shift, $tgt_date, $db) {
|
|||||||
<td valign=\"top\">%s</td>
|
<td valign=\"top\">%s</td>
|
||||||
<td valign=\"top\">%s</td>
|
<td valign=\"top\">%s</td>
|
||||||
</tr>\n",
|
</tr>\n",
|
||||||
$tablerow["lognoteid"],$tablerow["lognoteid"],
|
$tablerow["lognoteid"],
|
||||||
|
$tablerow["lognoteid"],
|
||||||
$tname,
|
$tname,
|
||||||
$subjname,
|
$subjname,
|
||||||
$fmtnote,
|
$fmtnote,
|
||||||
@@ -121,7 +125,8 @@ function shifttable_classic($shift, $tgt_date, $db) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// define the shifttable_clean function
|
// define the shifttable_clean function
|
||||||
function shifttable_clean($shift, $tgt_date, $db) {
|
function shifttable_clean($shift, $tgt_date, $db)
|
||||||
|
{
|
||||||
// convert the shift number to a name for display
|
// convert the shift number to a name for display
|
||||||
$doparts = PARTS_FUNCTIONS;
|
$doparts = PARTS_FUNCTIONS;
|
||||||
$showtime = SHOW_TS;
|
$showtime = SHOW_TS;
|
||||||
@@ -177,7 +182,8 @@ function shifttable_clean($shift, $tgt_date, $db) {
|
|||||||
%s</b>
|
%s</b>
|
||||||
<br>%s<br>
|
<br>%s<br>
|
||||||
<hr>\n",
|
<hr>\n",
|
||||||
$tablerow["lognoteid"],$tablerow["lognoteid"],
|
$tablerow["lognoteid"],
|
||||||
|
$tablerow["lognoteid"],
|
||||||
$tablerow["time"],
|
$tablerow["time"],
|
||||||
$tname,
|
$tname,
|
||||||
$subjname,
|
$subjname,
|
||||||
@@ -192,7 +198,8 @@ function shifttable_clean($shift, $tgt_date, $db) {
|
|||||||
%s</b>
|
%s</b>
|
||||||
<br>%s<br>
|
<br>%s<br>
|
||||||
<hr>\n",
|
<hr>\n",
|
||||||
$tablerow["lognoteid"],$tablerow["lognoteid"],
|
$tablerow["lognoteid"],
|
||||||
|
$tablerow["lognoteid"],
|
||||||
$tname,
|
$tname,
|
||||||
$subjname,
|
$subjname,
|
||||||
$refs,
|
$refs,
|
||||||
@@ -249,5 +256,3 @@ pageblock("right","end");
|
|||||||
pagetable("end");
|
pagetable("end");
|
||||||
|
|
||||||
framework("end", "", "", $print);
|
framework("end", "", "", $print);
|
||||||
|
|
||||||
?>
|
|
||||||
|
|||||||
@@ -29,7 +29,8 @@ if ($print) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// define pendtable function
|
// define pendtable function
|
||||||
function pendtable($tech_id, $db) {
|
function pendtable($tech_id, $db)
|
||||||
|
{
|
||||||
$uidtext = UID_TEXT;
|
$uidtext = UID_TEXT;
|
||||||
// print section header
|
// print section header
|
||||||
if ($tech_id) {
|
if ($tech_id) {
|
||||||
@@ -89,14 +90,16 @@ function pendtable($tech_id, $db) {
|
|||||||
<td valign=\"top\">%s</td>
|
<td valign=\"top\">%s</td>
|
||||||
<td align=\"center\" valign=\"top\">$notetag</td>
|
<td align=\"center\" valign=\"top\">$notetag</td>
|
||||||
</tr>",
|
</tr>",
|
||||||
$pendrow["maintformid"],$pendrow["maintformid"],
|
$pendrow["maintformid"],
|
||||||
|
$pendrow["maintformid"],
|
||||||
$pendrow["mfdate"],
|
$pendrow["mfdate"],
|
||||||
$tname,
|
$tname,
|
||||||
$uid,
|
$uid,
|
||||||
$partno,
|
$partno,
|
||||||
$serno,
|
$serno,
|
||||||
$partname,
|
$partname,
|
||||||
$noteidval,$noteidval
|
$noteidval,
|
||||||
|
$noteidval
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
printf(
|
printf(
|
||||||
@@ -109,13 +112,15 @@ function pendtable($tech_id, $db) {
|
|||||||
<td valign=\"top\">%s</td>
|
<td valign=\"top\">%s</td>
|
||||||
<td align=\"center\" valign=\"top\">$notetag</td>
|
<td align=\"center\" valign=\"top\">$notetag</td>
|
||||||
</tr>",
|
</tr>",
|
||||||
$pendrow["maintformid"],$pendrow["maintformid"],
|
$pendrow["maintformid"],
|
||||||
|
$pendrow["maintformid"],
|
||||||
$pendrow["mfdate"],
|
$pendrow["mfdate"],
|
||||||
$uid,
|
$uid,
|
||||||
$partno,
|
$partno,
|
||||||
$serno,
|
$serno,
|
||||||
$partname,
|
$partname,
|
||||||
$noteidval,$noteidval
|
$noteidval,
|
||||||
|
$noteidval
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -125,7 +130,8 @@ function pendtable($tech_id, $db) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// define histtable function
|
// define histtable function
|
||||||
function histtable($hist_days,$db) {
|
function histtable($hist_days, $db)
|
||||||
|
{
|
||||||
$uidtext = UID_TEXT;
|
$uidtext = UID_TEXT;
|
||||||
$dayopts = array(30, 90, 180, 365);
|
$dayopts = array(30, 90, 180, 365);
|
||||||
// print section header
|
// print section header
|
||||||
@@ -187,14 +193,16 @@ function histtable($hist_days,$db) {
|
|||||||
<td valign=\"top\">%s</td>
|
<td valign=\"top\">%s</td>
|
||||||
<td align=\"center\" valign=\"top\">$notetag</td>
|
<td align=\"center\" valign=\"top\">$notetag</td>
|
||||||
</tr>",
|
</tr>",
|
||||||
$histrow["maintformid"],$histrow["maintformid"],
|
$histrow["maintformid"],
|
||||||
|
$histrow["maintformid"],
|
||||||
$histrow["mfdate"],
|
$histrow["mfdate"],
|
||||||
$tname,
|
$tname,
|
||||||
$uid,
|
$uid,
|
||||||
$partno,
|
$partno,
|
||||||
$serno,
|
$serno,
|
||||||
$partname,
|
$partname,
|
||||||
$noteidval,$noteidval
|
$noteidval,
|
||||||
|
$noteidval
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
echo "
|
echo "
|
||||||
@@ -227,5 +235,3 @@ pageblock("right","end");
|
|||||||
pagetable("end");
|
pagetable("end");
|
||||||
|
|
||||||
framework("end", "", "", $print);
|
framework("end", "", "", $print);
|
||||||
|
|
||||||
?>
|
|
||||||
|
|||||||
@@ -17,14 +17,16 @@ if (!$_SESSION['login'] && ($_REQUEST['mfadd'] || $_REQUEST['actionadd'])) {
|
|||||||
$loggedinas = $_SESSION['login'];
|
$loggedinas = $_SESSION['login'];
|
||||||
$isadmin = dblookup($db, "techs", "techid", "admin", $loggedinas);
|
$isadmin = dblookup($db, "techs", "techid", "admin", $loggedinas);
|
||||||
|
|
||||||
function getmfdata($maintformid) {
|
function getmfdata($maintformid)
|
||||||
|
{
|
||||||
// pull maintenance form data from maintforms table
|
// pull maintenance form data from maintforms table
|
||||||
global $db;
|
global $db;
|
||||||
$mfdata = mysqli_fetch_assoc(mysqli_query($db, "select * from maintforms where maintformid=\"$maintformid\""));
|
$mfdata = mysqli_fetch_assoc(mysqli_query($db, "select * from maintforms where maintformid=\"$maintformid\""));
|
||||||
return $mfdata;
|
return $mfdata;
|
||||||
}
|
}
|
||||||
|
|
||||||
function getactiondata($maintactionid) {
|
function getactiondata($maintactionid)
|
||||||
|
{
|
||||||
// pull maintenance action data from maintactions table
|
// pull maintenance action data from maintactions table
|
||||||
global $db;
|
global $db;
|
||||||
$actiondata = mysqli_fetch_assoc(mysqli_query($db, "select * from maintactions where maintactionid=\"$maintactionid\""));
|
$actiondata = mysqli_fetch_assoc(mysqli_query($db, "select * from maintactions where maintactionid=\"$maintactionid\""));
|
||||||
@@ -314,7 +316,8 @@ if (($mfedit || $actionadd || $actionedit) && ! ($mfsubmit || $actionaddsubmit |
|
|||||||
$sernum = $partinfo['sernum'];
|
$sernum = $partinfo['sernum'];
|
||||||
$partname = $partinfo['partname'];
|
$partname = $partinfo['partname'];
|
||||||
$pluresult = $partinfo['result'];
|
$pluresult = $partinfo['result'];
|
||||||
if ($pluresult==2) $pdatamismatch=TRUE; else $pdatamismatch=FALSE;
|
if ($pluresult == 2) $pdatamismatch = TRUE;
|
||||||
|
else $pdatamismatch = FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
$techname = dblookup($db, "techs", "techid", "techname", $mftech);
|
$techname = dblookup($db, "techs", "techid", "techname", $mftech);
|
||||||
@@ -481,13 +484,23 @@ if ($printfmt) {
|
|||||||
while ($flagcheckbox = mysqli_fetch_assoc($flagslist)) {
|
while ($flagcheckbox = mysqli_fetch_assoc($flagslist)) {
|
||||||
//if ($theseflags[0]=="") $theseflags=[];
|
//if ($theseflags[0]=="") $theseflags=[];
|
||||||
if (in_array($flagcheckbox["flagid"], $theseflags)) {
|
if (in_array($flagcheckbox["flagid"], $theseflags)) {
|
||||||
printf("<input type=\"checkbox\" name=\"flags[]\" value=\"%s\" checked><font color=\"%s\" title=\"%s\">%s</font>",
|
printf(
|
||||||
$flagcheckbox["flagid"],$flagcheckbox["flagcolor"],$flagcheckbox["flagname"],$flagcheckbox["flagsym"]);
|
"<input type=\"checkbox\" name=\"flags[]\" value=\"%s\" checked><font color=\"%s\" title=\"%s\">%s</font>",
|
||||||
|
$flagcheckbox["flagid"],
|
||||||
|
$flagcheckbox["flagcolor"],
|
||||||
|
$flagcheckbox["flagname"],
|
||||||
|
$flagcheckbox["flagsym"]
|
||||||
|
);
|
||||||
} else {
|
} else {
|
||||||
$flagid = $flagcheckbox["flagid"];
|
$flagid = $flagcheckbox["flagid"];
|
||||||
if (mysqli_num_rows(mysqli_query($db, "select flagid from flags where flagid=\"$flagid\" and status=1"))) {
|
if (mysqli_num_rows(mysqli_query($db, "select flagid from flags where flagid=\"$flagid\" and status=1"))) {
|
||||||
printf("<input type=\"checkbox\" name=\"flags[]\" value=\"%s\"><font color=\"%s\" title=\"%s\">%s</font>",
|
printf(
|
||||||
$flagcheckbox["flagid"],$flagcheckbox["flagcolor"],$flagcheckbox["flagname"],$flagcheckbox["flagsym"]);
|
"<input type=\"checkbox\" name=\"flags[]\" value=\"%s\"><font color=\"%s\" title=\"%s\">%s</font>",
|
||||||
|
$flagcheckbox["flagid"],
|
||||||
|
$flagcheckbox["flagcolor"],
|
||||||
|
$flagcheckbox["flagname"],
|
||||||
|
$flagcheckbox["flagsym"]
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ($flagcount < $flagsperline) {
|
if ($flagcount < $flagsperline) {
|
||||||
@@ -649,5 +662,3 @@ pageblock("right","end");
|
|||||||
pagetable("end");
|
pagetable("end");
|
||||||
|
|
||||||
framework("end", "", "", $print);
|
framework("end", "", "", $print);
|
||||||
|
|
||||||
?>
|
|
||||||
|
|||||||
@@ -172,5 +172,3 @@ pageblock("right","end");
|
|||||||
pagetable("end");
|
pagetable("end");
|
||||||
|
|
||||||
framework("end", "", "", $print);
|
framework("end", "", "", $print);
|
||||||
|
|
||||||
?>
|
|
||||||
|
|||||||
@@ -10,9 +10,9 @@
|
|||||||
include("functions.php");
|
include("functions.php");
|
||||||
|
|
||||||
if (isset($_SESSION['login'])) {
|
if (isset($_SESSION['login'])) {
|
||||||
$loggedin=1;
|
$loggedin = TRUE;
|
||||||
} else {
|
} else {
|
||||||
unset($loggedin);
|
$loggedin = FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
$print = $_REQUEST['print'] ?? NULL;
|
$print = $_REQUEST['print'] ?? NULL;
|
||||||
@@ -79,7 +79,8 @@ while ($partline=mysqli_fetch_assoc($partqry)) {
|
|||||||
$pluidtxt = $partline['uid'];
|
$pluidtxt = $partline['uid'];
|
||||||
}
|
}
|
||||||
if ($loggedin) {
|
if ($loggedin) {
|
||||||
printf("
|
printf(
|
||||||
|
"
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
<a href=\"partentry.php?edit=1&partid=%s\" title=\"Edit this part\">%s</a>
|
<a href=\"partentry.php?edit=1&partid=%s\" title=\"Edit this part\">%s</a>
|
||||||
@@ -87,13 +88,15 @@ while ($partline=mysqli_fetch_assoc($partqry)) {
|
|||||||
<td>%s</td>
|
<td>%s</td>
|
||||||
<td>%s</td>
|
<td>%s</td>
|
||||||
<td>%s</td>",
|
<td>%s</td>",
|
||||||
$partline['partid'],$pluidtxt,
|
$partline['partid'],
|
||||||
|
$pluidtxt,
|
||||||
$partline['partnum'],
|
$partline['partnum'],
|
||||||
$partline['sernum'],
|
$partline['sernum'],
|
||||||
$partline['partname']
|
$partline['partname']
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
printf("
|
printf(
|
||||||
|
"
|
||||||
<tr>
|
<tr>
|
||||||
<td>%s</td>
|
<td>%s</td>
|
||||||
<td>%s</td>
|
<td>%s</td>
|
||||||
@@ -119,5 +122,3 @@ pageblock("right","end");
|
|||||||
pagetable("end");
|
pagetable("end");
|
||||||
|
|
||||||
framework("end", "", "", $print);
|
framework("end", "", "", $print);
|
||||||
|
|
||||||
?>
|
|
||||||
|
|||||||
@@ -54,34 +54,34 @@ if(!$print){
|
|||||||
// do error checking
|
// do error checking
|
||||||
// test for name supplied
|
// test for name supplied
|
||||||
if (strlen(trim($name))) {
|
if (strlen(trim($name))) {
|
||||||
$namesuppld=1;
|
$namesuppld = TRUE;
|
||||||
} else {
|
} else {
|
||||||
$namesuppld=0;
|
$namesuppld = FALSE;
|
||||||
echo "<img src=\"icons/exclamation-red.png\" border=\"0\"> Tech name cannot be blank.<br>";
|
echo "<img src=\"icons/exclamation-red.png\" border=\"0\"> Tech name cannot be blank.<br>";
|
||||||
}
|
}
|
||||||
// test for name unique
|
// test for name unique
|
||||||
if (mysqli_num_rows(mysqli_query($db, "select techid from techs where techname=\"$name\" and techid!=\"$techid\""))) {
|
if (mysqli_num_rows(mysqli_query($db, "select techid from techs where techname=\"$name\" and techid!=\"$techid\""))) {
|
||||||
if (mysqli_num_rows(mysqli_query($db, "select techid from techs where techname=\"$name\""))) {
|
if (mysqli_num_rows(mysqli_query($db, "select techid from techs where techname=\"$name\""))) {
|
||||||
$nameunique=0;
|
$nameunique = FALSE;
|
||||||
echo "<img src=\"icons/exclamation-red.png\" border=\"0\"> Tech name already exists.<br>";
|
echo "<img src=\"icons/exclamation-red.png\" border=\"0\"> Tech name already exists.<br>";
|
||||||
} else {
|
} else {
|
||||||
$nameunique=1;
|
$nameunique = TRUE;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
$nameunique=1;
|
$nameunique = TRUE;
|
||||||
}
|
}
|
||||||
// test for matching passwords
|
// test for matching passwords
|
||||||
if ($pass != "password_is_unchanged") {
|
if ($pass != "password_is_unchanged") {
|
||||||
if ($pass == $passconf) {
|
if ($pass == $passconf) {
|
||||||
$passmatch=1;
|
$passmatch = TRUE;
|
||||||
$passhash = password_hash($pass, PASSWORD_DEFAULT);
|
$passhash = password_hash($pass, PASSWORD_DEFAULT);
|
||||||
$namepassupdqry = ("update techs set techname=\"$name\",techpass=\"$passhash\" where techid=\"$techid\"");
|
$namepassupdqry = ("update techs set techname=\"$name\",techpass=\"$passhash\" where techid=\"$techid\"");
|
||||||
} else {
|
} else {
|
||||||
$passmatch=0;
|
$passmatch = FALSE;
|
||||||
echo "<img src=\"icons/exclamation-red.png\" border=\"0\"> The passwords you supplied don't match.<br>";
|
echo "<img src=\"icons/exclamation-red.png\" border=\"0\"> The passwords you supplied don't match.<br>";
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
$passmatch=1;
|
$passmatch = TRUE;
|
||||||
$namepassupdqry = "update techs set techname=\"$name\" where techid=\"$techid\"";
|
$namepassupdqry = "update techs set techname=\"$name\" where techid=\"$techid\"";
|
||||||
}
|
}
|
||||||
if ($namesuppld && $nameunique && $passmatch) {
|
if ($namesuppld && $nameunique && $passmatch) {
|
||||||
@@ -91,14 +91,17 @@ if(!$print){
|
|||||||
}
|
}
|
||||||
if ($updatedisplay) {
|
if ($updatedisplay) {
|
||||||
// display settings
|
// display settings
|
||||||
if ($display_showts) $display_showts=1; else $display_showts=0;
|
if ($display_showts) $display_showts = 1;
|
||||||
if ($display_techalpha=="a") $display_techalpha=1; else $display_techalpha=0;
|
else $display_showts = 0;
|
||||||
if ($display_subjalpha=="a") $display_subjalpha=1; else $display_subjalpha=0;
|
if ($display_techalpha == "a") $display_techalpha = 1;
|
||||||
|
else $display_techalpha = 0;
|
||||||
|
if ($display_subjalpha == "a") $display_subjalpha = 1;
|
||||||
|
else $display_subjalpha = 0;
|
||||||
// test for urlchunk supplied
|
// test for urlchunk supplied
|
||||||
if (strlen(trim($display_urlchunk))) {
|
if (strlen(trim($display_urlchunk))) {
|
||||||
$chunksuppld=1;
|
$chunksuppld = TRUE;
|
||||||
} else {
|
} else {
|
||||||
$chunksuppld=0;
|
$chunksuppld = FALSE;
|
||||||
echo "<img src=\"icons/exclamation-red.png\" border=\"0\"> URL chunk size cannot be blank.<br>";
|
echo "<img src=\"icons/exclamation-red.png\" border=\"0\"> URL chunk size cannot be blank.<br>";
|
||||||
}
|
}
|
||||||
if ($chunksuppld) {
|
if ($chunksuppld) {
|
||||||
@@ -294,5 +297,3 @@ pageblock("right","end");
|
|||||||
pagetable("end");
|
pagetable("end");
|
||||||
|
|
||||||
framework("end", "", "", $print);
|
framework("end", "", "", $print);
|
||||||
|
|
||||||
?>
|
|
||||||
|
|||||||
@@ -10,7 +10,7 @@
|
|||||||
include("functions.php");
|
include("functions.php");
|
||||||
|
|
||||||
$print = $_REQUEST['print'] ?? "";
|
$print = $_REQUEST['print'] ?? "";
|
||||||
$chainnote=$_REQUEST['chainnote'];
|
$chainnote = $_REQUEST['chainnote'] ?? NULL;
|
||||||
|
|
||||||
$logname = LOG_NAME;
|
$logname = LOG_NAME;
|
||||||
|
|
||||||
@@ -71,7 +71,8 @@ while($mptr<count($master)) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ($flagstring) $fmtnote = $fmtnote . "<br>" . $flagstring;
|
if ($flagstring) $fmtnote = $fmtnote . "<br>" . $flagstring;
|
||||||
printf("
|
printf(
|
||||||
|
"
|
||||||
<tr>
|
<tr>
|
||||||
<td><a href=\"logentry.php?edit=1¬eid=%s\">%s</a></td>
|
<td><a href=\"logentry.php?edit=1¬eid=%s\">%s</a></td>
|
||||||
<td>%s / %s</td>
|
<td>%s / %s</td>
|
||||||
@@ -81,13 +82,16 @@ while($mptr<count($master)) {
|
|||||||
<td>%s</td>
|
<td>%s</td>
|
||||||
<td>%s</td>
|
<td>%s</td>
|
||||||
</tr>",
|
</tr>",
|
||||||
$tablerow["lognoteid"],$tablerow["lognoteid"],
|
$tablerow["lognoteid"],
|
||||||
$tablerow["date"],$tablerow["time"],
|
$tablerow["lognoteid"],
|
||||||
|
$tablerow["date"],
|
||||||
|
$tablerow["time"],
|
||||||
$shname,
|
$shname,
|
||||||
$tname,
|
$tname,
|
||||||
$subjname,
|
$subjname,
|
||||||
$fmtnote,
|
$fmtnote,
|
||||||
$refs);
|
$refs
|
||||||
|
);
|
||||||
} else {
|
} else {
|
||||||
printf("<tr><td colspan=\"7\"><font color=\"red\">Note Id <b> %s</b> has been deleted and cannot be displayed.</font></td></tr>\n", $master[$mptr]);
|
printf("<tr><td colspan=\"7\"><font color=\"red\">Note Id <b> %s</b> has been deleted and cannot be displayed.</font></td></tr>\n", $master[$mptr]);
|
||||||
}
|
}
|
||||||
@@ -99,5 +103,3 @@ pageblock("right","end");
|
|||||||
pagetable("end");
|
pagetable("end");
|
||||||
|
|
||||||
framework("end", "", "", $print);
|
framework("end", "", "", $print);
|
||||||
|
|
||||||
?>
|
|
||||||
|
|||||||
@@ -509,7 +509,8 @@ if ($action) {
|
|||||||
} else {
|
} else {
|
||||||
$tasktitle = "Repeat every $taskdata_frequency $taskdata_period";
|
$tasktitle = "Repeat every $taskdata_frequency $taskdata_period";
|
||||||
}
|
}
|
||||||
printf("
|
printf(
|
||||||
|
"
|
||||||
<tr>
|
<tr>
|
||||||
<td><a href=\"schedmaint.php?schedule=1&edit=1&id=%s\">%s</a></td>
|
<td><a href=\"schedmaint.php?schedule=1&edit=1&id=%s\">%s</a></td>
|
||||||
<td title=\"%s\">%s</td>
|
<td title=\"%s\">%s</td>
|
||||||
@@ -520,14 +521,17 @@ if ($action) {
|
|||||||
<td>%s</td>
|
<td>%s</td>
|
||||||
<td align=\"center\">%s</td>
|
<td align=\"center\">%s</td>
|
||||||
</tr>",
|
</tr>",
|
||||||
$eventid,$eventid,
|
$eventid,
|
||||||
$tasktitle,$taskdata_taskname,
|
$eventid,
|
||||||
|
$tasktitle,
|
||||||
|
$taskdata_taskname,
|
||||||
$devicedata_devicename,
|
$devicedata_devicename,
|
||||||
$start_date,
|
$start_date,
|
||||||
$last_date,
|
$last_date,
|
||||||
$deferredflag,
|
$deferredflag,
|
||||||
$deferred_date,
|
$deferred_date,
|
||||||
$statdef);
|
$statdef
|
||||||
|
);
|
||||||
}
|
}
|
||||||
echo "</table>";
|
echo "</table>";
|
||||||
} else if ($tasks) {
|
} else if ($tasks) {
|
||||||
@@ -650,7 +654,8 @@ if ($action) {
|
|||||||
} else {
|
} else {
|
||||||
$wdoflag = "<img src=\"icons/cross.png\" title=\"inactive\" alt=\"inactive\">";
|
$wdoflag = "<img src=\"icons/cross.png\" title=\"inactive\" alt=\"inactive\">";
|
||||||
}
|
}
|
||||||
printf("
|
printf(
|
||||||
|
"
|
||||||
<tr>
|
<tr>
|
||||||
<td><a href=\"schedmaint.php?tasks=1&edit=1&id=%s\">%s</a></td>
|
<td><a href=\"schedmaint.php?tasks=1&edit=1&id=%s\">%s</a></td>
|
||||||
<td>%s</td>
|
<td>%s</td>
|
||||||
@@ -660,16 +665,17 @@ if ($action) {
|
|||||||
<td>%s</td>
|
<td>%s</td>
|
||||||
<td align=\"center\">%s</td>
|
<td align=\"center\">%s</td>
|
||||||
</tr>",
|
</tr>",
|
||||||
$taskid,$taskname,
|
$taskid,
|
||||||
|
$taskname,
|
||||||
$taskdesc,
|
$taskdesc,
|
||||||
$rptstrg,
|
$rptstrg,
|
||||||
$duecalc,
|
$duecalc,
|
||||||
$wdoflag,
|
$wdoflag,
|
||||||
$refstrg,
|
$refstrg,
|
||||||
$statdef);
|
$statdef
|
||||||
|
);
|
||||||
}
|
}
|
||||||
echo "</table>";
|
echo "</table>";
|
||||||
|
|
||||||
} else if ($devices) {
|
} else if ($devices) {
|
||||||
// manage devices
|
// manage devices
|
||||||
if ($edit) {
|
if ($edit) {
|
||||||
@@ -735,7 +741,8 @@ if ($action) {
|
|||||||
} else {
|
} else {
|
||||||
$memberdef = "<input type=\"checkbox\" name=\"members[]\" value=\"$gtbl_deviceid\">";
|
$memberdef = "<input type=\"checkbox\" name=\"members[]\" value=\"$gtbl_deviceid\">";
|
||||||
}
|
}
|
||||||
printf("
|
printf(
|
||||||
|
"
|
||||||
<tr>
|
<tr>
|
||||||
<td>%s</td>
|
<td>%s</td>
|
||||||
<td>%s</td>
|
<td>%s</td>
|
||||||
@@ -743,7 +750,8 @@ if ($action) {
|
|||||||
</tr>",
|
</tr>",
|
||||||
$gtbl_devicename,
|
$gtbl_devicename,
|
||||||
$gtbl_devicedesc,
|
$gtbl_devicedesc,
|
||||||
$memberdef);
|
$memberdef
|
||||||
|
);
|
||||||
}
|
}
|
||||||
echo "</table><br>";
|
echo "</table><br>";
|
||||||
}
|
}
|
||||||
@@ -774,7 +782,8 @@ if ($action) {
|
|||||||
} else {
|
} else {
|
||||||
$statdef = "<img src=\"icons/cross.png\" title=\"inactive\" alt=\"inactive\">";
|
$statdef = "<img src=\"icons/cross.png\" title=\"inactive\" alt=\"inactive\">";
|
||||||
}
|
}
|
||||||
printf("
|
printf(
|
||||||
|
"
|
||||||
<tr>
|
<tr>
|
||||||
<td><a href=\"schedmaint.php?devices=1&edit=1&id=%s\">%s</a></td>
|
<td><a href=\"schedmaint.php?devices=1&edit=1&id=%s\">%s</a></td>
|
||||||
<td>%s</td>
|
<td>%s</td>
|
||||||
@@ -782,18 +791,23 @@ if ($action) {
|
|||||||
<td align=\"center\">%s</td>
|
<td align=\"center\">%s</td>
|
||||||
<td align=\"center\">%s</td>
|
<td align=\"center\">%s</td>
|
||||||
</tr>",
|
</tr>",
|
||||||
$deviceid,$deviceid,
|
$deviceid,
|
||||||
|
$deviceid,
|
||||||
$devicename,
|
$devicename,
|
||||||
$devicedesc,
|
$devicedesc,
|
||||||
$groupdef,
|
$groupdef,
|
||||||
$statdef);
|
$statdef
|
||||||
|
);
|
||||||
}
|
}
|
||||||
echo "</table>";
|
echo "</table>";
|
||||||
} else {
|
} else {
|
||||||
$ucevents = get_upcoming_events();
|
$ucevents = get_upcoming_events();
|
||||||
|
|
||||||
// sort the upcoming events
|
// sort the upcoming events
|
||||||
function uc_cmp($a,$b) { return strcmp($a["duedate"], $b["duedate"]); }
|
function uc_cmp($a, $b)
|
||||||
|
{
|
||||||
|
return strcmp($a["duedate"], $b["duedate"]);
|
||||||
|
}
|
||||||
uasort($ucevents, 'uc_cmp');
|
uasort($ucevents, 'uc_cmp');
|
||||||
|
|
||||||
// show upcoming events table
|
// show upcoming events table
|
||||||
@@ -806,16 +820,20 @@ if ($action) {
|
|||||||
";
|
";
|
||||||
foreach ($ucevents as $ucline) {
|
foreach ($ucevents as $ucline) {
|
||||||
extract($ucline);
|
extract($ucline);
|
||||||
printf("
|
printf(
|
||||||
|
"
|
||||||
<tr>
|
<tr>
|
||||||
<td><a href=\"schedmaint.php?action=1&id=%s\" title=\"Click to complete or defer this scheduled maintenance event\">%s</a></td>
|
<td><a href=\"schedmaint.php?action=1&id=%s\" title=\"Click to complete or defer this scheduled maintenance event\">%s</a></td>
|
||||||
<td><font title=\"%s\">%s</font></td>
|
<td><font title=\"%s\">%s</font></td>
|
||||||
<td><font title=\"%s\">%s</font></td>
|
<td><font title=\"%s\">%s</font></td>
|
||||||
<td>%s</td>
|
<td>%s</td>
|
||||||
</tr>",
|
</tr>",
|
||||||
$eventdata_eventid,$duedatestrg,
|
$eventdata_eventid,
|
||||||
$devicedata_devicedesc,$devicedata_devicename,
|
$duedatestrg,
|
||||||
$taskdata_taskdesc,$taskdata_taskname,
|
$devicedata_devicedesc,
|
||||||
|
$devicedata_devicename,
|
||||||
|
$taskdata_taskdesc,
|
||||||
|
$taskdata_taskname,
|
||||||
$lastdatestrg
|
$lastdatestrg
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@@ -865,16 +883,20 @@ if ($action) {
|
|||||||
";
|
";
|
||||||
foreach ($defevents as $defline) {
|
foreach ($defevents as $defline) {
|
||||||
extract($defline);
|
extract($defline);
|
||||||
printf("
|
printf(
|
||||||
|
"
|
||||||
<tr>
|
<tr>
|
||||||
<td><a href=\"schedmaint.php?action=1&id=%s\" title=\"Click to complete or defer this scheduled maintenance event\"><font color=\"#FFA500\">%s</font></a></td>
|
<td><a href=\"schedmaint.php?action=1&id=%s\" title=\"Click to complete or defer this scheduled maintenance event\"><font color=\"#FFA500\">%s</font></a></td>
|
||||||
<td><font title=\"%s\">%s</font></td>
|
<td><font title=\"%s\">%s</font></td>
|
||||||
<td><font title=\"%s\">%s</font></td>
|
<td><font title=\"%s\">%s</font></td>
|
||||||
<td>%s</td>
|
<td>%s</td>
|
||||||
</tr>",
|
</tr>",
|
||||||
$def_eventid,$def_deferred_date,
|
$def_eventid,
|
||||||
$devicedata_devicedesc,$devicedata_devicename,
|
$def_deferred_date,
|
||||||
$taskdata_taskdesc,$taskdata_taskname,
|
$devicedata_devicedesc,
|
||||||
|
$devicedata_devicename,
|
||||||
|
$taskdata_taskdesc,
|
||||||
|
$taskdata_taskname,
|
||||||
$lastdatestrg
|
$lastdatestrg
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@@ -890,5 +912,3 @@ pageblock("right","end");
|
|||||||
pagetable("end");
|
pagetable("end");
|
||||||
|
|
||||||
framework("end", "", "", $print);
|
framework("end", "", "", $print);
|
||||||
|
|
||||||
?>
|
|
||||||
|
|||||||
@@ -9,12 +9,12 @@
|
|||||||
|
|
||||||
include("functions.php");
|
include("functions.php");
|
||||||
|
|
||||||
$noprint=1;
|
$noprint = TRUE;
|
||||||
|
|
||||||
if (isset($_SESSION['login'])) {
|
if (isset($_SESSION['login'])) {
|
||||||
$loggedin=1;
|
$loggedin = TRUE;
|
||||||
} else {
|
} else {
|
||||||
unset($loggedin);
|
$loggedin = FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
$print = $_REQUEST['print'] ?? NULL;
|
$print = $_REQUEST['print'] ?? NULL;
|
||||||
@@ -390,21 +390,36 @@ if(!$print){
|
|||||||
pageblock("right", "begin");
|
pageblock("right", "begin");
|
||||||
banner($print);
|
banner($print);
|
||||||
// display the form
|
// display the form
|
||||||
if ($srchnoteid) $noteidval=$srchnoteid; else $noteidval="any";
|
if ($srchnoteid) $noteidval = $srchnoteid;
|
||||||
if ($srchmfid) $mfidval=$srchmfid; else $mfidval="any";
|
else $noteidval = "any";
|
||||||
if ($srchbdate) $bdateval=$srchbdate; else $bdateval=$mindate;
|
if ($srchmfid) $mfidval = $srchmfid;
|
||||||
if ($srchedate) $edateval=$srchedate; else $edateval=$maxdate;
|
else $mfidval = "any";
|
||||||
if ($srchshift) $shiftval=$srchshift; else $shiftval=0;
|
if ($srchbdate) $bdateval = $srchbdate;
|
||||||
if ($srchtech) $techval=$srchtech; else $techval=0;
|
else $bdateval = $mindate;
|
||||||
if ($srchsubj) $subjval=$srchsubj; else $subjval=0;
|
if ($srchedate) $edateval = $srchedate;
|
||||||
if ($srchtext) $textval=$srchtext; else $textval="";
|
else $edateval = $maxdate;
|
||||||
if ($srchuid) $uidval=$srchuid; else $uidval="any";
|
if ($srchshift) $shiftval = $srchshift;
|
||||||
if ($srchpn) $pnval=$srchpn; else $pnval="any";
|
else $shiftval = 0;
|
||||||
if ($srchsn) $snval=$srchsn; else $snval="any";
|
if ($srchtech) $techval = $srchtech;
|
||||||
if ($srchpname) $pnameval=$srchpname; else $pnameval="any";
|
else $techval = 0;
|
||||||
if ($srchploc) $plocval=$srchploc; else $plocval="any";
|
if ($srchsubj) $subjval = $srchsubj;
|
||||||
if ($srchnha) $nhaval=$srchnha; else $nhaval="any";
|
else $subjval = 0;
|
||||||
if ($srchrepord) $repordval=$srchrepord; else $repordval="any";
|
if ($srchtext) $textval = $srchtext;
|
||||||
|
else $textval = "";
|
||||||
|
if ($srchuid) $uidval = $srchuid;
|
||||||
|
else $uidval = "any";
|
||||||
|
if ($srchpn) $pnval = $srchpn;
|
||||||
|
else $pnval = "any";
|
||||||
|
if ($srchsn) $snval = $srchsn;
|
||||||
|
else $snval = "any";
|
||||||
|
if ($srchpname) $pnameval = $srchpname;
|
||||||
|
else $pnameval = "any";
|
||||||
|
if ($srchploc) $plocval = $srchploc;
|
||||||
|
else $plocval = "any";
|
||||||
|
if ($srchnha) $nhaval = $srchnha;
|
||||||
|
else $nhaval = "any";
|
||||||
|
if ($srchrepord) $repordval = $srchrepord;
|
||||||
|
else $repordval = "any";
|
||||||
|
|
||||||
if (!$print) {
|
if (!$print) {
|
||||||
echo "
|
echo "
|
||||||
@@ -439,7 +454,8 @@ if (!$print) {
|
|||||||
} else {
|
} else {
|
||||||
echo "<option value=\"0\">any</option>";
|
echo "<option value=\"0\">any</option>";
|
||||||
}
|
}
|
||||||
if ($techalpha) $torder="techname"; else $torder="techid";
|
if ($techalpha) $torder = "techname";
|
||||||
|
else $torder = "techid";
|
||||||
$techrow = mysqli_query($db, "select * from techs order by $torder asc");
|
$techrow = mysqli_query($db, "select * from techs order by $torder asc");
|
||||||
while ($techitem = mysqli_fetch_assoc($techrow)) {
|
while ($techitem = mysqli_fetch_assoc($techrow)) {
|
||||||
if ($techitem['techid'] == $techval) {
|
if ($techitem['techid'] == $techval) {
|
||||||
@@ -457,7 +473,8 @@ if (!$print) {
|
|||||||
} else {
|
} else {
|
||||||
echo "<option value=\"0\">any</option>";
|
echo "<option value=\"0\">any</option>";
|
||||||
}
|
}
|
||||||
if ($subjalpha) $sorder="subjectname"; else $sorder="subjectid";
|
if ($subjalpha) $sorder = "subjectname";
|
||||||
|
else $sorder = "subjectid";
|
||||||
$subjrow = mysqli_query($db, "select * from subjects order by $sorder asc");
|
$subjrow = mysqli_query($db, "select * from subjects order by $sorder asc");
|
||||||
while ($subjitem = mysqli_fetch_assoc($subjrow)) {
|
while ($subjitem = mysqli_fetch_assoc($subjrow)) {
|
||||||
if ($subjitem['subjectid'] == $subjval) {
|
if ($subjitem['subjectid'] == $subjval) {
|
||||||
@@ -632,8 +649,11 @@ if (!$print) {
|
|||||||
if ($srchflags) {
|
if ($srchflags) {
|
||||||
if ($srchflags[0] == "") $srchflags = [];
|
if ($srchflags[0] == "") $srchflags = [];
|
||||||
if (in_array($flagcheckbox["flagid"], $srchflags)) {
|
if (in_array($flagcheckbox["flagid"], $srchflags)) {
|
||||||
printf("<font color=\"%s\">%s</font>",
|
printf(
|
||||||
$flagcheckbox["flagcolor"],$flagcheckbox["flagsym"]);
|
"<font color=\"%s\">%s</font>",
|
||||||
|
$flagcheckbox["flagcolor"],
|
||||||
|
$flagcheckbox["flagsym"]
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ($flagcount < $flagsperline) {
|
if ($flagcount < $flagsperline) {
|
||||||
@@ -711,7 +731,8 @@ if ($search) {
|
|||||||
$logfmtnote = $logfmtnote . "<br>";
|
$logfmtnote = $logfmtnote . "<br>";
|
||||||
}
|
}
|
||||||
|
|
||||||
printf("<tr>
|
printf(
|
||||||
|
"<tr>
|
||||||
<td valign=\"top\"><a href=logentry.php?edit=1¬eid=%s>%s</a></td>
|
<td valign=\"top\"><a href=logentry.php?edit=1¬eid=%s>%s</a></td>
|
||||||
<td valign=\"top\">%s / %s</td>
|
<td valign=\"top\">%s / %s</td>
|
||||||
<td valign=\"top\">%s</td>
|
<td valign=\"top\">%s</td>
|
||||||
@@ -720,13 +741,16 @@ if ($search) {
|
|||||||
<td valign=\"top\">%s</td>
|
<td valign=\"top\">%s</td>
|
||||||
<td valign=\"top\">%s</td>
|
<td valign=\"top\">%s</td>
|
||||||
</tr>",
|
</tr>",
|
||||||
$logtablerow['lognoteid'],$logtablerow['lognoteid'],
|
$logtablerow['lognoteid'],
|
||||||
$logtablerow['date'],$logtablerow['time'],
|
$logtablerow['lognoteid'],
|
||||||
|
$logtablerow['date'],
|
||||||
|
$logtablerow['time'],
|
||||||
$logshname,
|
$logshname,
|
||||||
$logtname,
|
$logtname,
|
||||||
$logsubjname,
|
$logsubjname,
|
||||||
$logfmtnote,
|
$logfmtnote,
|
||||||
$logrefs);
|
$logrefs
|
||||||
|
);
|
||||||
}
|
}
|
||||||
echo "</table><br><hr>";
|
echo "</table><br><hr>";
|
||||||
} else {
|
} else {
|
||||||
@@ -782,14 +806,16 @@ if ($search) {
|
|||||||
<td valign=\"top\">%s</td>
|
<td valign=\"top\">%s</td>
|
||||||
<td align=\"center\" valign=\"top\">$mfnotetag</td>
|
<td align=\"center\" valign=\"top\">$mfnotetag</td>
|
||||||
</tr>",
|
</tr>",
|
||||||
$mfrow["maintformid"],$mfrow["maintformid"],
|
$mfrow["maintformid"],
|
||||||
|
$mfrow["maintformid"],
|
||||||
$mfrow["mfdate"],
|
$mfrow["mfdate"],
|
||||||
$mftname,
|
$mftname,
|
||||||
$mfuid,
|
$mfuid,
|
||||||
$mfpartno,
|
$mfpartno,
|
||||||
$mfserno,
|
$mfserno,
|
||||||
$mfpartname,
|
$mfpartname,
|
||||||
$mfnoteidval,$mfnoteidval
|
$mfnoteidval,
|
||||||
|
$mfnoteidval
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
echo "</table><br><hr>";
|
echo "</table><br><hr>";
|
||||||
@@ -815,7 +841,8 @@ if ($search) {
|
|||||||
";
|
";
|
||||||
while ($partrow = mysqli_fetch_assoc($prowqry)) {
|
while ($partrow = mysqli_fetch_assoc($prowqry)) {
|
||||||
if ($loggedin) {
|
if ($loggedin) {
|
||||||
printf("
|
printf(
|
||||||
|
"
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
<a href=\"partentry.php?edit=1&partid=%s\"><img src=\"icons/notebook--pencil.png\" border=\"0\" title=\"Edit this part\" alt=\"Edit this part\"></a>
|
<a href=\"partentry.php?edit=1&partid=%s\"><img src=\"icons/notebook--pencil.png\" border=\"0\" title=\"Edit this part\" alt=\"Edit this part\"></a>
|
||||||
@@ -831,7 +858,8 @@ if ($search) {
|
|||||||
$partrow['partname']
|
$partrow['partname']
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
printf("
|
printf(
|
||||||
|
"
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
<img src=\"icons/notebook--pencil.png\" border=\"0\" title=\"You must be logged in to edit a part\" alt=\"You must be logged in to edit a part\">
|
<img src=\"icons/notebook--pencil.png\" border=\"0\" title=\"You must be logged in to edit a part\" alt=\"You must be logged in to edit a part\">
|
||||||
@@ -864,5 +892,3 @@ pageblock("right","end");
|
|||||||
pagetable("end");
|
pagetable("end");
|
||||||
|
|
||||||
framework("end", "", "", $print);
|
framework("end", "", "", $print);
|
||||||
|
|
||||||
?>
|
|
||||||
|
|||||||
@@ -61,5 +61,3 @@ if ($logerrors==1) {
|
|||||||
} else {
|
} else {
|
||||||
error_reporting(0);
|
error_reporting(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
|
||||||
|
|||||||
@@ -58,7 +58,8 @@ if ($isadmin) {
|
|||||||
|
|
||||||
// var_dump($_REQUEST);
|
// var_dump($_REQUEST);
|
||||||
|
|
||||||
function templatetable($db,$techid,$user) {
|
function templatetable($db, $techid, $user)
|
||||||
|
{
|
||||||
// Show template table
|
// Show template table
|
||||||
$isadmin = dblookup($db, "techs", "techid", "admin", $techid);
|
$isadmin = dblookup($db, "techs", "techid", "admin", $techid);
|
||||||
$templatequery = mysqli_query($db, "select * from notetemplates where tech=\"$user\" order by templatename asc");
|
$templatequery = mysqli_query($db, "select * from notetemplates where tech=\"$user\" order by templatename asc");
|
||||||
@@ -393,7 +394,8 @@ if ($operation=="delete") {
|
|||||||
} else {
|
} else {
|
||||||
echo "<option value=\"0\">--Global Template--</option>";
|
echo "<option value=\"0\">--Global Template--</option>";
|
||||||
}
|
}
|
||||||
if ($techalpha) $torder="techname"; else $torder="techid";
|
if ($techalpha) $torder = "techname";
|
||||||
|
else $torder = "techid";
|
||||||
$techrow = mysqli_query($db, "select * from techs order by $torder asc");
|
$techrow = mysqli_query($db, "select * from techs order by $torder asc");
|
||||||
while ($techitem = mysqli_fetch_assoc($techrow)) {
|
while ($techitem = mysqli_fetch_assoc($techrow)) {
|
||||||
if ($techitem["techid"] == $filltech) {
|
if ($techitem["techid"] == $filltech) {
|
||||||
@@ -431,7 +433,8 @@ if ($operation=="delete") {
|
|||||||
<td><b>Subject: </b>
|
<td><b>Subject: </b>
|
||||||
<select name=\"subject\">
|
<select name=\"subject\">
|
||||||
";
|
";
|
||||||
if ($subjalpha) $sorder="subjectname"; else $sorder="subjectid";
|
if ($subjalpha) $sorder = "subjectname";
|
||||||
|
else $sorder = "subjectid";
|
||||||
$subjrow = mysqli_query($db, "select * from subjects order by $sorder asc");
|
$subjrow = mysqli_query($db, "select * from subjects order by $sorder asc");
|
||||||
while ($subjitem = mysqli_fetch_assoc($subjrow)) {
|
while ($subjitem = mysqli_fetch_assoc($subjrow)) {
|
||||||
if ($subjitem["status"] == 1) {
|
if ($subjitem["status"] == 1) {
|
||||||
@@ -474,13 +477,23 @@ if ($operation=="delete") {
|
|||||||
// display checkboxes for all the flags, selecting the ones that are set for this template
|
// display checkboxes for all the flags, selecting the ones that are set for this template
|
||||||
while ($flagcheckbox = mysqli_fetch_assoc($flagslist)) {
|
while ($flagcheckbox = mysqli_fetch_assoc($flagslist)) {
|
||||||
if ($operation == "edit" && in_array($flagcheckbox["flagid"], $theseflags)) {
|
if ($operation == "edit" && in_array($flagcheckbox["flagid"], $theseflags)) {
|
||||||
printf("<input type=\"checkbox\" name=\"flags[]\" value=\"%s\" checked><font color=\"%s\" title=\"%s\">%s</font>",
|
printf(
|
||||||
$flagcheckbox["flagid"],$flagcheckbox["flagcolor"],$flagcheckbox["flagname"],$flagcheckbox["flagsym"]);
|
"<input type=\"checkbox\" name=\"flags[]\" value=\"%s\" checked><font color=\"%s\" title=\"%s\">%s</font>",
|
||||||
|
$flagcheckbox["flagid"],
|
||||||
|
$flagcheckbox["flagcolor"],
|
||||||
|
$flagcheckbox["flagname"],
|
||||||
|
$flagcheckbox["flagsym"]
|
||||||
|
);
|
||||||
} else {
|
} else {
|
||||||
$flagid = $flagcheckbox["flagid"];
|
$flagid = $flagcheckbox["flagid"];
|
||||||
if (mysqli_num_rows(mysqli_query($db, "select flagid from flags where flagid=\"$flagid\" and status=1"))) {
|
if (mysqli_num_rows(mysqli_query($db, "select flagid from flags where flagid=\"$flagid\" and status=1"))) {
|
||||||
printf("<input type=\"checkbox\" name=\"flags[]\" value=\"%s\"><font color=\"%s\" title=\"%s\">%s</font>",
|
printf(
|
||||||
$flagcheckbox["flagid"],$flagcheckbox["flagcolor"],$flagcheckbox["flagname"],$flagcheckbox["flagsym"]);
|
"<input type=\"checkbox\" name=\"flags[]\" value=\"%s\"><font color=\"%s\" title=\"%s\">%s</font>",
|
||||||
|
$flagcheckbox["flagid"],
|
||||||
|
$flagcheckbox["flagcolor"],
|
||||||
|
$flagcheckbox["flagname"],
|
||||||
|
$flagcheckbox["flagsym"]
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ($flagcount < $flagsperline) {
|
if ($flagcount < $flagsperline) {
|
||||||
@@ -550,5 +563,3 @@ pageblock("right","end");
|
|||||||
pagetable("end");
|
pagetable("end");
|
||||||
|
|
||||||
framework("end", "", "", $print);
|
framework("end", "", "", $print);
|
||||||
|
|
||||||
?>
|
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
# install.sh
|
# install.sh
|
||||||
# OpenLog Online Logbook
|
# OpenLog Online Logbook
|
||||||
# Copyright (C) 2025 Rod Wright
|
# Copyright (C) 2026 Rod Wright
|
||||||
|
|
||||||
# SPDX-License-Identifier: GPL-2.0
|
# SPDX-License-Identifier: GPL-2.0
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user