Compare commits
No commits in common. "master" and "gh-pages" have entirely different histories.
@ -1,143 +0,0 @@
|
|||||||
-- MySQL dump 10.15 Distrib 10.0.17-MariaDB, for Linux (x86_64)
|
|
||||||
--
|
|
||||||
-- Host: localhost Database: bms
|
|
||||||
-- ------------------------------------------------------
|
|
||||||
-- Server version 10.0.17-MariaDB-wsrep
|
|
||||||
|
|
||||||
/*!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 NAMES utf8 */;
|
|
||||||
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
|
|
||||||
/*!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 `alerts`
|
|
||||||
--
|
|
||||||
|
|
||||||
DROP TABLE IF EXISTS `alerts`;
|
|
||||||
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
|
||||||
/*!40101 SET character_set_client = utf8 */;
|
|
||||||
CREATE TABLE `alerts` (
|
|
||||||
`alert_id` int(11) NOT NULL AUTO_INCREMENT,
|
|
||||||
`alert_name` varchar(99) NOT NULL,
|
|
||||||
`utype_id` int(11) NOT NULL,
|
|
||||||
PRIMARY KEY (`alert_id`),
|
|
||||||
KEY `fk_alertsunittype` (`utype_id`),
|
|
||||||
CONSTRAINT `fk_alertsunittype` FOREIGN KEY (`utype_id`) REFERENCES `unittypes` (`utype_id`)
|
|
||||||
) ENGINE=InnoDB AUTO_INCREMENT=84 DEFAULT CHARSET=latin1;
|
|
||||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
|
||||||
|
|
||||||
--
|
|
||||||
-- Table structure for table `datacenters`
|
|
||||||
--
|
|
||||||
|
|
||||||
DROP TABLE IF EXISTS `datacenters`;
|
|
||||||
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
|
||||||
/*!40101 SET character_set_client = utf8 */;
|
|
||||||
CREATE TABLE `datacenters` (
|
|
||||||
`dc_id` int(11) NOT NULL AUTO_INCREMENT,
|
|
||||||
`dc_name` varchar(20) NOT NULL,
|
|
||||||
PRIMARY KEY (`dc_id`)
|
|
||||||
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=latin1;
|
|
||||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
|
||||||
|
|
||||||
--
|
|
||||||
-- Table structure for table `event_updates`
|
|
||||||
--
|
|
||||||
|
|
||||||
DROP TABLE IF EXISTS `event_updates`;
|
|
||||||
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
|
||||||
/*!40101 SET character_set_client = utf8 */;
|
|
||||||
CREATE TABLE `event_updates` (
|
|
||||||
`update_id` int(11) NOT NULL AUTO_INCREMENT,
|
|
||||||
`update_desc` text,
|
|
||||||
`update_date_time` varchar(99) DEFAULT NULL,
|
|
||||||
`update_is_ongoing` tinyint(1) DEFAULT NULL,
|
|
||||||
`end_date_time` varchar(99) DEFAULT NULL,
|
|
||||||
`event_id` int(11) DEFAULT NULL,
|
|
||||||
`update_user` varchar(99) DEFAULT NULL,
|
|
||||||
`update_image` varchar(255) NOT NULL,
|
|
||||||
PRIMARY KEY (`update_id`),
|
|
||||||
KEY `fk_updatevent` (`event_id`),
|
|
||||||
CONSTRAINT `fk_updatevent` FOREIGN KEY (`event_id`) REFERENCES `events` (`event_id`)
|
|
||||||
) ENGINE=InnoDB AUTO_INCREMENT=22 DEFAULT CHARSET=latin1;
|
|
||||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
|
||||||
|
|
||||||
--
|
|
||||||
-- Table structure for table `events`
|
|
||||||
--
|
|
||||||
|
|
||||||
DROP TABLE IF EXISTS `events`;
|
|
||||||
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
|
||||||
/*!40101 SET character_set_client = utf8 */;
|
|
||||||
CREATE TABLE `events` (
|
|
||||||
`event_id` int(11) NOT NULL AUTO_INCREMENT,
|
|
||||||
`unit_id` int(11) DEFAULT NULL,
|
|
||||||
`date_time_start` varchar(99) DEFAULT NULL,
|
|
||||||
`description` text,
|
|
||||||
`is_ongoing` tinyint(1) DEFAULT NULL,
|
|
||||||
`date_time_end` varchar(99) DEFAULT NULL,
|
|
||||||
`user` varchar(99) NOT NULL,
|
|
||||||
`alert_id` int(11) DEFAULT NULL,
|
|
||||||
`event_image` varchar(255) NOT NULL,
|
|
||||||
PRIMARY KEY (`event_id`),
|
|
||||||
KEY `user` (`user`),
|
|
||||||
KEY `fk_eventunit` (`unit_id`),
|
|
||||||
KEY `fk_eventalert` (`alert_id`),
|
|
||||||
KEY `date_time_start` (`date_time_start`),
|
|
||||||
KEY `date_time_end` (`date_time_end`),
|
|
||||||
CONSTRAINT `fk_eventalert` FOREIGN KEY (`alert_id`) REFERENCES `alerts` (`alert_id`),
|
|
||||||
CONSTRAINT `fk_eventunit` FOREIGN KEY (`unit_id`) REFERENCES `units` (`unit_id`)
|
|
||||||
) ENGINE=InnoDB AUTO_INCREMENT=69 DEFAULT CHARSET=latin1;
|
|
||||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
|
||||||
|
|
||||||
--
|
|
||||||
-- Table structure for table `units`
|
|
||||||
--
|
|
||||||
|
|
||||||
DROP TABLE IF EXISTS `units`;
|
|
||||||
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
|
||||||
/*!40101 SET character_set_client = utf8 */;
|
|
||||||
CREATE TABLE `units` (
|
|
||||||
`unit_id` int(11) NOT NULL AUTO_INCREMENT,
|
|
||||||
`unit_name` varchar(99) NOT NULL,
|
|
||||||
`utype_id` int(11) NOT NULL,
|
|
||||||
`dc_id` int(11) NOT NULL,
|
|
||||||
PRIMARY KEY (`unit_id`),
|
|
||||||
UNIQUE KEY `unit_name` (`unit_name`),
|
|
||||||
KEY `fk_unitstypes` (`utype_id`),
|
|
||||||
KEY `fk_unitsdcs` (`dc_id`),
|
|
||||||
CONSTRAINT `fk_unitsdcs` FOREIGN KEY (`dc_id`) REFERENCES `datacenters` (`dc_id`),
|
|
||||||
CONSTRAINT `fk_unitstypes` FOREIGN KEY (`utype_id`) REFERENCES `unittypes` (`utype_id`)
|
|
||||||
) ENGINE=InnoDB AUTO_INCREMENT=188 DEFAULT CHARSET=latin1;
|
|
||||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
|
||||||
|
|
||||||
--
|
|
||||||
-- Table structure for table `unittypes`
|
|
||||||
--
|
|
||||||
|
|
||||||
DROP TABLE IF EXISTS `unittypes`;
|
|
||||||
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
|
||||||
/*!40101 SET character_set_client = utf8 */;
|
|
||||||
CREATE TABLE `unittypes` (
|
|
||||||
`utype_id` int(11) NOT NULL AUTO_INCREMENT,
|
|
||||||
`utype_name` varchar(99) NOT NULL,
|
|
||||||
PRIMARY KEY (`utype_id`)
|
|
||||||
) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=latin1;
|
|
||||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
|
||||||
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
|
|
||||||
|
|
||||||
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
|
|
||||||
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
|
|
||||||
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
|
|
||||||
/*!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 2015-05-07 23:35:03
|
|
3
README
@ -1,3 +0,0 @@
|
|||||||
This project was created to provide my workplace's Maintenance and Monitoring Teams a place to correspond about Building Maintenance Systems issues and events.
|
|
||||||
|
|
||||||
The MySQL directory holds a structure-only .sql dump of the database used. This should NOT be placed in a web-accessible area.
|
|
212
addevent.php
@ -1,212 +0,0 @@
|
|||||||
<?php
|
|
||||||
session_start();
|
|
||||||
if( $_SESSION['access'] != 1 ) {
|
|
||||||
require( 'login.php' );
|
|
||||||
} else {
|
|
||||||
$uname=$_SESSION['uname'];
|
|
||||||
?>
|
|
||||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
|
||||||
<html>
|
|
||||||
<head>
|
|
||||||
<link rel="stylesheet" type="text/css" href="css/sestyle.css">
|
|
||||||
<link rel="shortcut icon" href="favicon.ico" />
|
|
||||||
<script type="text/javascript" src="includes/jquery-2.1.3.min.js"></script>
|
|
||||||
<link rel="stylesheet" href="//code.jquery.com/ui/1.11.4/themes/smoothness/jquery-ui.css">
|
|
||||||
<link rel="stylesheet" type="text/css" href="includes/js/dtp/jquery.datetimepicker.css"/ >
|
|
||||||
<script src="includes/js/dtp/jquery.js"></script>
|
|
||||||
<script src="includes/js/dtp/jquery.datetimepicker.js"></script>
|
|
||||||
<title>Add BMS Event</title>
|
|
||||||
<script>
|
|
||||||
$(document).ready(function() {
|
|
||||||
$('#start_date_time').datetimepicker();
|
|
||||||
$('#end_date_time').datetimepicker();
|
|
||||||
$('#select_form').submit(function(event) {
|
|
||||||
|
|
||||||
if (!$("#is_ongoing").prop("checked") && $("#end_date_time").val() === "") {
|
|
||||||
alert('You must enter a value for Currently Ongoing or End Date and Time');
|
|
||||||
event.preventDefault();
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
});
|
|
||||||
</script>
|
|
||||||
<script type="text/javascript">
|
|
||||||
$(document).ready(function(){
|
|
||||||
var queryString = $('select_form').serialize();
|
|
||||||
$("select#utype").prop("disabled", true);
|
|
||||||
$("select#unit").prop("disabled", true);
|
|
||||||
$("select#alert").prop("disabled", true);
|
|
||||||
$("select#datacenter").change(function(){
|
|
||||||
$("select#utype").prop("disabled", true);
|
|
||||||
/*$("select#utype").html("<option>wait...</option>");*/
|
|
||||||
var dc_id = $("select#datacenter option:selected").val();
|
|
||||||
$.post("includes/select_utype.php", function(data){
|
|
||||||
$("select#utype").prop("disabled", false);
|
|
||||||
$("select#utype").html(data);
|
|
||||||
});
|
|
||||||
});
|
|
||||||
$("select#utype").change(function(){
|
|
||||||
$("select#unit").prop("disabled", true);
|
|
||||||
/*$("select#unit").html("<option>wait...</option>");*/
|
|
||||||
var utype_id = $("select#utype option:selected").val();
|
|
||||||
$.post("includes/select_unit.php", {utype_id:utype_id, dc_id:$('#datacenter').val()}, function(data){
|
|
||||||
$("select#unit").prop("disabled", false);
|
|
||||||
$("select#unit").html(data);
|
|
||||||
});
|
|
||||||
});
|
|
||||||
$("select#unit").change(function(){
|
|
||||||
$("select#alert").prop("disabled", true);
|
|
||||||
var unit_id = $("select#unit option:selected").val();
|
|
||||||
$.post("includes/select_alert.php", {utype_id:$('#utype').val()}, function(data){
|
|
||||||
$("select#alert").prop("disabled", false);
|
|
||||||
$("select#alert").html(data);
|
|
||||||
});
|
|
||||||
});
|
|
||||||
$("form#select_form").submit(function(){
|
|
||||||
var dc = $("select#datacenter option:selected").val();
|
|
||||||
var utype = $("select#utype option:selected").val();
|
|
||||||
if(cat>0 && type>0)
|
|
||||||
{
|
|
||||||
var result = $("select#utype option:selected").html();
|
|
||||||
$("#result").html('your choice: '+result);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
$("#result").html("you must choose a DC and Unit Type!");
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
var alert = $("select#alert option:selected").val();
|
|
||||||
if(cat>0 && type>0)
|
|
||||||
{
|
|
||||||
var result = $("select#alert option:selected").html();
|
|
||||||
$("#result").html('your choice: '+result);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
$("#result").html("you must choose a DC, Unit Type, and Alert!");
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
var unit = $("select#unit option:selected").val();
|
|
||||||
if(cat>0 && type>0)
|
|
||||||
{
|
|
||||||
var result = $("select#unit option:selected").html();
|
|
||||||
$("#result").html('your choice: '+result);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
$("#result").html("you must choose a DC, Unit Type, Alert, and Unit!");
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
});
|
|
||||||
});
|
|
||||||
</script>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
<div class=header>
|
|
||||||
<h1>BMS Events</h1>
|
|
||||||
<?php
|
|
||||||
if(isset($_SESSION['uname'])) {
|
|
||||||
echo "Hello, ";
|
|
||||||
print_r($_SESSION['uname']);
|
|
||||||
}
|
|
||||||
echo "<h2>Add an Event</h2>";
|
|
||||||
include("includes/menu.php"); ?>
|
|
||||||
</div>
|
|
||||||
<?php include "includes/classes/select.class.php";?>
|
|
||||||
<br />
|
|
||||||
<form id="select_form" required method="post" action="includes/insert_event.php" enctype="multipart/form-data">
|
|
||||||
<table align="center">
|
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
Choose a DC:
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<select name="datacenter" id="datacenter" required>
|
|
||||||
<?php echo $opt->ShowDCs(); ?>
|
|
||||||
</select>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
Choose a Unit Type:
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<select name="utype" id="utype" required>
|
|
||||||
<?php echo $opt->ShowUnitType(); ?>
|
|
||||||
</select>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
Choose a Unit:
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<select name="unit" id="unit" required>
|
|
||||||
<?php echo $opt->ShowUnits(); ?>
|
|
||||||
</select>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
Select the Alert:
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<select name="alert" id="alert" required>
|
|
||||||
<?php echo $opt->ShowAlerts(); ?>
|
|
||||||
</select>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
Start date and time:
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<input type="text" name="start_date_time" id="start_date_time" required />
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
Issue Description:
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<!-- <input type="text" name="description" id="description" required /> --!>
|
|
||||||
<textarea name="description" id="description" cols="40" rows="5" required></textarea>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
Currently Ongoing?
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<input type="checkbox" name="is_ongoing" value="1" id="is_ongoing" />
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
End date and time:
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<input type="text" name="end_date_time" id="end_date_time" />
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
Attach an Image:
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<input type="file" name="fileToUpload" id="fileToUpload" />
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td colspan="2" class="ui-helper-center">
|
|
||||||
<input type="submit" value="Add Event" />
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
You must press "Add Event" to record the issue!
|
|
||||||
<input type="hidden" name="user" id="user" value="<?=$uname;?>"/>
|
|
||||||
</form>
|
|
||||||
<div id="result"></div>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
<?php } ?>
|
|
@ -1,5 +0,0 @@
|
|||||||
/* DateTimeEntry styles v2.0.0 */
|
|
||||||
.datetimeEntry-control {
|
|
||||||
vertical-align: middle;
|
|
||||||
margin-left: 2px;
|
|
||||||
}
|
|
@ -1,5 +0,0 @@
|
|||||||
/* TimeEntry styles v2.0.0 */
|
|
||||||
.timeEntry-control {
|
|
||||||
vertical-align: middle;
|
|
||||||
margin-left: 2px;
|
|
||||||
}
|
|
61
css/menu.css
@ -1,61 +0,0 @@
|
|||||||
nav ul ul {
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
nav ul li:hover > ul {
|
|
||||||
display: block;
|
|
||||||
}
|
|
||||||
nav ul {
|
|
||||||
color: #000000;
|
|
||||||
background: #808080;
|
|
||||||
background: linear-gradient(top, #808080 0%, #404040 100%);
|
|
||||||
background: -moz-linear-gradient(top, #808080 0%, #404040 100%);
|
|
||||||
background: -webkit-linear-gradient(top, #808080 0%,#404040 100%);
|
|
||||||
box-shadow: 0px 0px 9px rgba(0,0,0,0.15);
|
|
||||||
padding: 0 10px;
|
|
||||||
border-radius: 10px;
|
|
||||||
list-style: none;
|
|
||||||
position: relative;
|
|
||||||
display: inline-table;
|
|
||||||
/* margin: 0.5em;*/
|
|
||||||
}
|
|
||||||
nav ul:after {
|
|
||||||
content: ""; clear: both; display: block;
|
|
||||||
}
|
|
||||||
nav ul li {
|
|
||||||
float: left;
|
|
||||||
}
|
|
||||||
nav ul li:hover {
|
|
||||||
background: #505050;
|
|
||||||
background: linear-gradient(top, #505050 0%, #585858 40%);
|
|
||||||
background: -moz-linear-gradient(top, #505050 0%, #585858 40%);
|
|
||||||
background: -webkit-linear-gradient(top, #505050 0%, #585858 40%);
|
|
||||||
}
|
|
||||||
nav ul li:hover a {
|
|
||||||
color: #fff;
|
|
||||||
}
|
|
||||||
|
|
||||||
nav ul li a {
|
|
||||||
display: block; padding: 10px 10px;
|
|
||||||
color: #FFFFFF; text-decoration: none;
|
|
||||||
}
|
|
||||||
nav ul ul {
|
|
||||||
background: #505050; border-radius: 0px; padding: 0;
|
|
||||||
position: absolute; top: 100%;
|
|
||||||
}
|
|
||||||
nav ul ul li {
|
|
||||||
float: none;
|
|
||||||
border-top: 1px solid #000000;
|
|
||||||
border-bottom: 1px solid #000000;
|
|
||||||
position: relative;
|
|
||||||
}
|
|
||||||
nav ul ul li a {
|
|
||||||
padding: 5px 20px;
|
|
||||||
color: #fff;
|
|
||||||
}
|
|
||||||
nav ul ul li a:hover {
|
|
||||||
background: #585858;
|
|
||||||
}
|
|
||||||
nav ul ul ul {
|
|
||||||
position: absolute; left: 100%; top:0;
|
|
||||||
}
|
|
@ -1,64 +0,0 @@
|
|||||||
body {
|
|
||||||
background-color: #E0E0E0;
|
|
||||||
font-family: 'Source Sans Pro', 'Segoe UI', 'Droid Sans', Tahoma, Arial, sans-serif;
|
|
||||||
text-align: center;
|
|
||||||
}
|
|
||||||
|
|
||||||
.header {
|
|
||||||
background-color: #313338;
|
|
||||||
color: white;
|
|
||||||
width: 100%;
|
|
||||||
}
|
|
||||||
.header h1 {
|
|
||||||
color: #F8F8F8;
|
|
||||||
text-align: center;
|
|
||||||
font-family: 'Source Sans Pro', 'Segoe UI', 'Droid Sans', Tahoma, Arial, sans-serif;
|
|
||||||
font-size: 1.75em;
|
|
||||||
margin: 0.2em;
|
|
||||||
}
|
|
||||||
h3, h4, h5 {
|
|
||||||
color: black;
|
|
||||||
text-align: center;
|
|
||||||
font-family: 'Source Sans Pro', 'Segoe UI', 'Droid Sans', Tahoma, Arial, sans-serif;
|
|
||||||
}
|
|
||||||
table, th, td {
|
|
||||||
border: 1px solid black;
|
|
||||||
text-align: left;
|
|
||||||
border-collapse: collapse;
|
|
||||||
padding: 3px;
|
|
||||||
width: auto;
|
|
||||||
}
|
|
||||||
th {
|
|
||||||
background-color: #3366CC;
|
|
||||||
color: #F8F8F8;
|
|
||||||
font-weight: normal;
|
|
||||||
}
|
|
||||||
tr:nth-child(odd) {
|
|
||||||
background-color: white;
|
|
||||||
}
|
|
||||||
tr:nth-child(even) {
|
|
||||||
background-color: lightgray;
|
|
||||||
}
|
|
||||||
td a, td a:link, td a:visited {
|
|
||||||
font-weight:normal;
|
|
||||||
color:black;
|
|
||||||
background: none;
|
|
||||||
width: auto;
|
|
||||||
text-decoration: underline;
|
|
||||||
text-transform: none;
|
|
||||||
margin: 0px;
|
|
||||||
padding: 3px;
|
|
||||||
}
|
|
||||||
th a, th a:link, th a:visited {
|
|
||||||
font-weight:normal;
|
|
||||||
color:white;
|
|
||||||
background: none;
|
|
||||||
width: auto;
|
|
||||||
text-decoration: underline;
|
|
||||||
text-transform: none;
|
|
||||||
margin: 0px;
|
|
||||||
padding: 3px;
|
|
||||||
}
|
|
||||||
.ui-helper-center {
|
|
||||||
text-align:center;
|
|
||||||
}
|
|
@ -1,61 +0,0 @@
|
|||||||
body {
|
|
||||||
background-color: #E0E0E0;
|
|
||||||
font-family: 'Source Sans Pro', 'Segoe UI', 'Droid Sans', Tahoma, Arial, sans-serif;
|
|
||||||
text-align: center;
|
|
||||||
}
|
|
||||||
|
|
||||||
.header {
|
|
||||||
background-color: #313338;
|
|
||||||
color: white;
|
|
||||||
width: 100%;
|
|
||||||
}
|
|
||||||
.header h1 {
|
|
||||||
color: #F8F8F8;
|
|
||||||
text-align: center;
|
|
||||||
font-family: 'Source Sans Pro', 'Segoe UI', 'Droid Sans', Tahoma, Arial, sans-serif;
|
|
||||||
font-size: 1.75em;
|
|
||||||
margin: 0.2em;
|
|
||||||
}
|
|
||||||
h3, h4, h5 {
|
|
||||||
color: black;
|
|
||||||
text-align: center;
|
|
||||||
font-family: 'Source Sans Pro', 'Segoe UI', 'Droid Sans', Tahoma, Arial, sans-serif;
|
|
||||||
}
|
|
||||||
table, th, td {
|
|
||||||
border: 1px solid black;
|
|
||||||
text-align: center;
|
|
||||||
border-collapse: collapse;
|
|
||||||
padding: 3px;
|
|
||||||
width: auto;
|
|
||||||
}
|
|
||||||
th {
|
|
||||||
background-color: #3366CC;
|
|
||||||
color: #F8F8F8;
|
|
||||||
font-weight: normal;
|
|
||||||
}
|
|
||||||
tr:nth-child(odd) {
|
|
||||||
background-color: white;
|
|
||||||
}
|
|
||||||
tr:nth-child(even) {
|
|
||||||
background-color: lightgray;
|
|
||||||
}
|
|
||||||
td a, td a:link, td a:visited {
|
|
||||||
font-weight:normal;
|
|
||||||
color:black;
|
|
||||||
background: none;
|
|
||||||
width: auto;
|
|
||||||
text-decoration: underline;
|
|
||||||
text-transform: none;
|
|
||||||
margin: 0px;
|
|
||||||
padding: 3px;
|
|
||||||
}
|
|
||||||
th a, th a:link, th a:visited {
|
|
||||||
font-weight:normal;
|
|
||||||
color:white;
|
|
||||||
background: none;
|
|
||||||
width: auto;
|
|
||||||
text-decoration: underline;
|
|
||||||
text-transform: none;
|
|
||||||
margin: 0px;
|
|
||||||
padding: 3px;
|
|
||||||
}
|
|
196
editevent.php
@ -1,196 +0,0 @@
|
|||||||
<?php
|
|
||||||
session_start();
|
|
||||||
if( $_SESSION['access'] != 1 ) {
|
|
||||||
require( 'login.php' );
|
|
||||||
} else {
|
|
||||||
$uname=$_SESSION['uname'];
|
|
||||||
?>
|
|
||||||
|
|
||||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
|
||||||
<html>
|
|
||||||
<head>
|
|
||||||
<link rel="stylesheet" type="text/css" href="css/sestyle.css">
|
|
||||||
<link rel="shortcut icon" href="favicon.ico" />
|
|
||||||
<script type="text/javascript" src="includes/jquery-2.1.3.min.js"></script>
|
|
||||||
<link rel="stylesheet" href="//code.jquery.com/ui/1.11.4/themes/smoothness/jquery-ui.css">
|
|
||||||
<link rel="stylesheet" type="text/css" href="includes/js/dtp/jquery.datetimepicker.css"/ >
|
|
||||||
<script src="includes/js/dtp/jquery.js"></script>
|
|
||||||
<script src="includes/js/dtp/jquery.datetimepicker.js"></script>
|
|
||||||
<title>Edit BMS Event</title>
|
|
||||||
<script>
|
|
||||||
$(document).ready(function() {
|
|
||||||
$('#start_date_time').datetimepicker();
|
|
||||||
$('#end_date_time').datetimepicker();
|
|
||||||
$('#select_form').submit(function(event) {
|
|
||||||
|
|
||||||
if (!$("#is_ongoing").prop("checked") && $("#end_date_time").val() === "") {
|
|
||||||
alert('You must enter a value for Currently Ongoing or End Date and Time');
|
|
||||||
event.preventDefault();
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
});
|
|
||||||
</script>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
<div class=header>
|
|
||||||
<h1>BMS Events</h1>
|
|
||||||
<?php
|
|
||||||
if(isset($_SESSION['uname'])) {
|
|
||||||
echo "Hello, ";
|
|
||||||
print_r($_SESSION['uname']);
|
|
||||||
}
|
|
||||||
echo "<h2>Edit Event</h2>";
|
|
||||||
include("includes/menu.php"); ?>
|
|
||||||
</div>
|
|
||||||
<div class=body>
|
|
||||||
<?php include "includes/db_config.php";
|
|
||||||
//Get Event ID from URL
|
|
||||||
if(isset($_GET['event_id']) && is_numeric($_GET['event_id'])) {
|
|
||||||
$varEvent = $_GET['event_id'];
|
|
||||||
} else {
|
|
||||||
$varEvent = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
$conn1 = new mysqli($servername, $username, $password, $db);
|
|
||||||
if ($conn1->connect_error) {
|
|
||||||
die ("Connection Failed: " . $conn1->connect_error);
|
|
||||||
}
|
|
||||||
$sql1 = "SELECT * FROM events WHERE event_id='".$varEvent."'";
|
|
||||||
|
|
||||||
$result1 = $conn1->query($sql1);
|
|
||||||
if ($result1->num_rows >=1) {
|
|
||||||
while($row1 = $result1->fetch_assoc()) {
|
|
||||||
$unitid=$row1['unit_id'];
|
|
||||||
$starttimedate=$row1['date_time_start'];
|
|
||||||
$desc=$row1['description'];
|
|
||||||
$ongoing=$row1['is_ongoing'];
|
|
||||||
$endtimedate=$row1['date_time_end'];
|
|
||||||
$alertid=$row1['alert_id'];
|
|
||||||
$eventid=$row1['event_id'];
|
|
||||||
}
|
|
||||||
include "includes/classes/select2.class.php"; ?>
|
|
||||||
<br />
|
|
||||||
<form id="select_form" required method="post" action="includes/update_event.php" enctype="multipart/form-data">
|
|
||||||
<table align=center>
|
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
Affected unit:
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<?php
|
|
||||||
if ($conn1->connect_error) {
|
|
||||||
die ("Connection Failed: " . $conn1->connect_error);
|
|
||||||
}
|
|
||||||
$sql2 = "SELECT unit_name FROM units WHERE unit_id='".$unitid."'";
|
|
||||||
|
|
||||||
$result2 = $conn1->query($sql2);
|
|
||||||
if ($result2->num_rows >0) {
|
|
||||||
while($row2 = $result2->fetch_assoc()) {
|
|
||||||
$unitname=$row2['unit_name'];
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
echo "Database Error";
|
|
||||||
}
|
|
||||||
echo $unitname;
|
|
||||||
?>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
Alert:
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<?php
|
|
||||||
if ($conn1->connect_error) {
|
|
||||||
die ("Connection Failed: " . $conn1->connect_error);
|
|
||||||
}
|
|
||||||
$sql3 = "SELECT alert_name FROM alerts WHERE alert_id='".$alertid."'";
|
|
||||||
|
|
||||||
$result3 = $conn1->query($sql3);
|
|
||||||
if ($result3->num_rows >0) {
|
|
||||||
while($row3 = $result3->fetch_assoc()) {
|
|
||||||
$alertname=$row3['alert_name'];
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
echo "Database Error";
|
|
||||||
}
|
|
||||||
echo $alertname;
|
|
||||||
$conn1->close();
|
|
||||||
?>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
Start date and time:
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<?php
|
|
||||||
echo $starttimedate;
|
|
||||||
?>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
Issue Description:
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<?=nl2br($desc)?>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
Update:
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<textarea name="description" id="description" cols="40" rows="5" required></textarea>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
Currently Ongoing?
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<?php
|
|
||||||
if ($ongoing == 1) $checked= ' checked="true"';
|
|
||||||
|
|
||||||
echo '<input type="checkbox" name="is_ongoing" id="is_ongoing" value="1"' . $checked .' />';
|
|
||||||
?>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
End date and time:
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<input type="text" name="end_date_time" id="end_date_time" value="<?=$endtimedate;?>" />
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
Attach an image:
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<input type="file" name="fileToUpload" id="fileToUpload" />
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td colspan=2 class="ui-helper-center">
|
|
||||||
<input type="submit" value="Submit"/>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
You must press "Submit" to record the update!
|
|
||||||
<input type="hidden" name="event" id="event" value="<?=$eventid;?>"/>
|
|
||||||
<input type="hidden" name="user" id="user" value="<?=$uname;?>"/>
|
|
||||||
</form>
|
|
||||||
<?php
|
|
||||||
}else{
|
|
||||||
echo 'No entry found. <a href="javascript:history.back()">Go back</a>';
|
|
||||||
}
|
|
||||||
?>
|
|
||||||
</div>
|
|
||||||
<div id="result"></div>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
<?php } ?>
|
|
BIN
favicon.ico
Before Width: | Height: | Size: 1.1 KiB |
@ -1 +0,0 @@
|
|||||||
This directory is for the storage of images uploaded via the web interface. This file can and should be removed when this is put into production.
|
|
BIN
images/body-bg.png
Normal file
After Width: | Height: | Size: 2.3 KiB |
BIN
images/highlight-bg.jpg
Normal file
After Width: | Height: | Size: 30 KiB |
BIN
images/hr.png
Normal file
After Width: | Height: | Size: 130 B |
BIN
images/octocat-icon.png
Normal file
After Width: | Height: | Size: 477 B |
BIN
images/tar-gz-icon.png
Normal file
After Width: | Height: | Size: 741 B |
BIN
images/zip-icon.png
Normal file
After Width: | Height: | Size: 735 B |
@ -1,69 +0,0 @@
|
|||||||
<?php
|
|
||||||
class SelectList
|
|
||||||
{
|
|
||||||
protected $conn;
|
|
||||||
|
|
||||||
public function __construct()
|
|
||||||
{
|
|
||||||
$this->DbConnect();
|
|
||||||
}
|
|
||||||
|
|
||||||
protected function DbConnect()
|
|
||||||
{
|
|
||||||
include "/home/srv/html/bms/includes/db_config.php";
|
|
||||||
$this->conn = mysql_connect($servername,$username,$password) OR die("Unable to connect to the database");
|
|
||||||
mysql_select_db($db,$this->conn) OR die("can not select the database $db");
|
|
||||||
return TRUE;
|
|
||||||
}
|
|
||||||
|
|
||||||
public function ShowDCs()
|
|
||||||
{
|
|
||||||
$sql = "SELECT * FROM datacenters ORDER BY dc_name";
|
|
||||||
$res = mysql_query($sql,$this->conn);
|
|
||||||
$datacenter = '<option value="0">choose...</option>';
|
|
||||||
while($row = mysql_fetch_array($res))
|
|
||||||
{
|
|
||||||
$datacenter .= '<option value="' . $row['dc_id'] . '">' . $row['dc_name'] . '</option>';
|
|
||||||
}
|
|
||||||
return $datacenter;
|
|
||||||
}
|
|
||||||
|
|
||||||
public function ShowUnitType()
|
|
||||||
{
|
|
||||||
$sql = "SELECT * FROM unittypes ORDER BY utype_name";
|
|
||||||
$res = mysql_query($sql,$this->conn);
|
|
||||||
$unittype = '<option value="0">choose...</option>';
|
|
||||||
while($row = mysql_fetch_array($res))
|
|
||||||
{
|
|
||||||
$unittype .= '<option value="' . $row['utype_id'] . '">' . $row['utype_name'] . '</option>';
|
|
||||||
}
|
|
||||||
return $unittype;
|
|
||||||
}
|
|
||||||
|
|
||||||
public function ShowUnits()
|
|
||||||
{
|
|
||||||
$sql = "SELECT * FROM units WHERE utype_id=$_POST[utype_id] AND dc_id=$_POST[dc_id] ORDER BY unit_name";
|
|
||||||
$res = mysql_query($sql,$this->conn);
|
|
||||||
$unit = '<option value="0">choose...</option>';
|
|
||||||
while($row = mysql_fetch_array($res))
|
|
||||||
{
|
|
||||||
$unit .= '<option value="' . $row['unit_id'] . '">' . $row['unit_name'] . '</option>';
|
|
||||||
}
|
|
||||||
return $unit;
|
|
||||||
}
|
|
||||||
|
|
||||||
public function ShowAlerts()
|
|
||||||
{
|
|
||||||
$sql = "SELECT * FROM alerts WHERE utype_id=$_POST[utype_id] ORDER BY alert_name";
|
|
||||||
$res = mysql_query($sql,$this->conn);
|
|
||||||
$alert = '<option value="0">choose...</option>';
|
|
||||||
while($row = mysql_fetch_array($res))
|
|
||||||
{
|
|
||||||
$alert .= '<option value="' . $row['alert_id'] . '">' . $row['alert_name'] . '</option>';
|
|
||||||
}
|
|
||||||
return $alert;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
$opt = new SelectList();
|
|
||||||
?>
|
|
@ -1,69 +0,0 @@
|
|||||||
<?php
|
|
||||||
class SelectList
|
|
||||||
{
|
|
||||||
protected $conn;
|
|
||||||
|
|
||||||
public function __construct()
|
|
||||||
{
|
|
||||||
$this->DbConnect();
|
|
||||||
}
|
|
||||||
|
|
||||||
protected function DbConnect()
|
|
||||||
{
|
|
||||||
include "/home/srv/html/bms/includes/db_config.php";
|
|
||||||
$this->conn = mysql_connect($servername,$username,$password) OR die("Unable to connect to the database");
|
|
||||||
mysql_select_db($db,$this->conn) OR die("can not select the database $db");
|
|
||||||
return TRUE;
|
|
||||||
}
|
|
||||||
|
|
||||||
public function ShowDCs()
|
|
||||||
{
|
|
||||||
$sql = "SELECT * FROM datacenters ORDER BY dc_name";
|
|
||||||
$res = mysql_query($sql,$this->conn);
|
|
||||||
$datacenter = '<option value="0">choose...</option>';
|
|
||||||
while($row = mysql_fetch_array($res))
|
|
||||||
{
|
|
||||||
$datacenter .= '<option value="' . $row['dc_id'] . '">' . $row['dc_name'] . '</option>';
|
|
||||||
}
|
|
||||||
return $datacenter;
|
|
||||||
}
|
|
||||||
|
|
||||||
public function ShowUnitType()
|
|
||||||
{
|
|
||||||
$sql = "SELECT * FROM unittypes order by utype_name";
|
|
||||||
$res = mysql_query($sql,$this->conn);
|
|
||||||
$unittype = '<option value="0">choose...</option>';
|
|
||||||
while($row = mysql_fetch_array($res))
|
|
||||||
{
|
|
||||||
$unittype .= '<option value="' . $row['utype_id'] . '">' . $row['utype_name'] . '</option>';
|
|
||||||
}
|
|
||||||
return $unittype;
|
|
||||||
}
|
|
||||||
|
|
||||||
public function ShowUnits()
|
|
||||||
{
|
|
||||||
$sql = "SELECT * FROM units ORDER BY unit_name";
|
|
||||||
$res = mysql_query($sql,$this->conn);
|
|
||||||
$unit = '<option value="0">choose...</option>';
|
|
||||||
while($row = mysql_fetch_array($res))
|
|
||||||
{
|
|
||||||
$unit .= '<option value="' . $row['unit_id'] . '">' . $row['unit_name'] . '</option>';
|
|
||||||
}
|
|
||||||
return $unit;
|
|
||||||
}
|
|
||||||
|
|
||||||
public function ShowAlerts()
|
|
||||||
{
|
|
||||||
$sql = "SELECT * FROM alerts ORDER BY alert_name";
|
|
||||||
$res = mysql_query($sql,$this->conn);
|
|
||||||
$alert = '<option value="0">choose...</option>';
|
|
||||||
while($row = mysql_fetch_array($res))
|
|
||||||
{
|
|
||||||
$alert .= '<option value="' . $row['alert_id'] . '">' . $row['alert_name'] . '</option>';
|
|
||||||
}
|
|
||||||
return $alert;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
$opt = new SelectList();
|
|
||||||
?>
|
|
@ -1,6 +0,0 @@
|
|||||||
<?php
|
|
||||||
$servername = 'localhost';
|
|
||||||
$username = 'USERNAME';
|
|
||||||
$password = 'PASSWORD';
|
|
||||||
$db = 'DBNAME';
|
|
||||||
?>
|
|
Before Width: | Height: | Size: 439 B |
Before Width: | Height: | Size: 974 B |
Before Width: | Height: | Size: 374 B |
Before Width: | Height: | Size: 836 B |
Before Width: | Height: | Size: 325 B |
Before Width: | Height: | Size: 750 B |
Before Width: | Height: | Size: 433 B |
Before Width: | Height: | Size: 967 B |
Before Width: | Height: | Size: 432 B |
Before Width: | Height: | Size: 966 B |
Before Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 424 B |
Before Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 718 B |
Before Width: | Height: | Size: 998 B |
@ -1,125 +0,0 @@
|
|||||||
<?php
|
|
||||||
include "db_config.php";
|
|
||||||
$conn = mysqli_connect($servername, $username, $password, $db);
|
|
||||||
|
|
||||||
//Allow Image Upload
|
|
||||||
$target_dir = "../images/";
|
|
||||||
if(empty($_FILES["fileToUpload"]["name"])) {
|
|
||||||
$target_file_name = "";
|
|
||||||
$target_file = "";
|
|
||||||
$image_link = "";
|
|
||||||
} else {
|
|
||||||
$target_file_name = preg_replace('/[^a-zA-Z0-9s.]/', '_', basename($_FILES["fileToUpload"]["name"]));
|
|
||||||
$target_file = $target_dir . $target_file_name;
|
|
||||||
$image_link = mysqli_real_escape_string($conn, "https://DOMAIN.com/bms/images/$target_file_name");
|
|
||||||
}
|
|
||||||
$target_file = $target_dir . $target_file_name;
|
|
||||||
$uploadOk = 1;
|
|
||||||
$imageFileType = pathinfo($target_file,PATHINFO_EXTENSION);
|
|
||||||
// Check if image file is a actual image or fake image
|
|
||||||
if(isset($_POST["submit"])) {
|
|
||||||
$check = getimagesize($_FILES["fileToUpload"]["tmp_name"]);
|
|
||||||
if($check !== false) {
|
|
||||||
echo "File is an image - " . $check["mime"] . ".";
|
|
||||||
$uploadOk = 1;
|
|
||||||
} else {
|
|
||||||
echo "File is not an image.";
|
|
||||||
$uploadOk = 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
// Check if file already exists
|
|
||||||
if (file_exists($target_file)) {
|
|
||||||
echo "Sorry, file already exists.";
|
|
||||||
$uploadOk = 0;
|
|
||||||
}
|
|
||||||
// Check file size
|
|
||||||
if ($_FILES["fileToUpload"]["size"] > 500000) {
|
|
||||||
echo "Sorry, your file is too large.";
|
|
||||||
$uploadOk = 0;
|
|
||||||
}
|
|
||||||
// Allow certain file formats
|
|
||||||
if($imageFileType != "jpg" && $imageFileType != "png" && $imageFileType != "jpeg"
|
|
||||||
&& $imageFileType != "gif" ) {
|
|
||||||
echo "Sorry, only JPG, JPEG, PNG & GIF files are allowed.";
|
|
||||||
$uploadOk = 0;
|
|
||||||
}
|
|
||||||
// Check if $uploadOk is set to 0 by an error
|
|
||||||
if ($uploadOk == 0) {
|
|
||||||
echo "Sorry, your file was not uploaded.";
|
|
||||||
// if everything is ok, try to upload file
|
|
||||||
} else {
|
|
||||||
if (move_uploaded_file($_FILES["fileToUpload"]["tmp_name"], $target_file)) {
|
|
||||||
echo "The file ". basename( $_FILES["fileToUpload"]["name"]). " has been uploaded.";
|
|
||||||
} else {
|
|
||||||
echo "Sorry, there was an error uploading your file.";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
//Set variables for MySQL Insert
|
|
||||||
$unit = mysqli_real_escape_string($conn, $_POST['unit']);
|
|
||||||
$start_date_time = mysqli_real_escape_string($conn, $_POST['start_date_time']);
|
|
||||||
$description = mysqli_real_escape_string($conn, $_POST['description']);
|
|
||||||
$is_ongoing = mysqli_real_escape_string($conn, $_POST['is_ongoing']);
|
|
||||||
$end_date_time = mysqli_real_escape_string($conn, $_POST['end_date_time']);
|
|
||||||
$alert = mysqli_real_escape_string($conn, $_POST['alert']);
|
|
||||||
$user = mysqli_real_escape_string($conn, $_POST['user']);
|
|
||||||
|
|
||||||
//Insert event to events table
|
|
||||||
$event = "INSERT INTO events (unit_id, date_time_start, description, is_ongoing, date_time_end, alert_id, user, event_image) VALUES ('$unit','$start_date_time', '$description', '$is_ongoing', '$end_date_time', '$alert', '$user', '$image_link')";
|
|
||||||
|
|
||||||
//Set variables for email
|
|
||||||
//MySQL queries to get Unit Name and Alert
|
|
||||||
$unitname_query = "SELECT unit_name FROM units WHERE unit_id=".$_POST['unit']."";
|
|
||||||
$unitname_query_run = mysqli_query($conn, $unitname_query);
|
|
||||||
$unitname_array = mysqli_fetch_assoc($unitname_query_run);
|
|
||||||
$unitname = $unitname_array['unit_name'];
|
|
||||||
$alertname_query = "SELECT alert_name FROM alerts WHERE alert_id=".$_POST['alert']."";
|
|
||||||
$alertname_query_run = mysqli_query($conn, $alertname_query);
|
|
||||||
$alertname_array = mysqli_fetch_assoc($alertname_query_run);
|
|
||||||
$alertname = $alertname_array['alert_name'];
|
|
||||||
$description_for_email = nl2br($_POST['description']);
|
|
||||||
|
|
||||||
//If successful, redirect back to index.php and send email, else tell user that it failed.
|
|
||||||
$result = mysqli_query($conn, $event);
|
|
||||||
if($result){
|
|
||||||
echo("Event added, redirecting...");
|
|
||||||
sleep (2);
|
|
||||||
header('Location: ../index.php');
|
|
||||||
//Get inserted Event ID
|
|
||||||
$event_id = $conn->insert_id;
|
|
||||||
$to = "TOEMAIL@DOMAIN>COM";
|
|
||||||
$subject = "New BMS Alert: ".$unitname." ".$alertname."";
|
|
||||||
$headers = "MIME-Version: 1.0" . "\r\n";
|
|
||||||
$headers .= "Content-type:text/html;charset=UTF-8" . "\r\n";
|
|
||||||
$headers .= "From: FROMEMAIL@.com";
|
|
||||||
$message = "
|
|
||||||
<html>
|
|
||||||
<body>
|
|
||||||
BMS Unit: ".$unitname."
|
|
||||||
<br />
|
|
||||||
Type of Alert: ".$alertname."
|
|
||||||
<br />
|
|
||||||
Start Date / Time: ".$start_date_time."
|
|
||||||
<br />
|
|
||||||
End Date / Time: ".$end_date_time."
|
|
||||||
<br />
|
|
||||||
Description: ".$description_for_email."
|
|
||||||
<br />
|
|
||||||
Created by: ".$user."
|
|
||||||
<br />
|
|
||||||
Image: ".$image_link."
|
|
||||||
<br />
|
|
||||||
Event Link: https://DOMAIN.com/bms/viewevent.php?eventid=$event_id
|
|
||||||
<br /><br />
|
|
||||||
This message generated by https://DOMAIN.com/bms
|
|
||||||
</body>
|
|
||||||
</html>";
|
|
||||||
//WordWrap the message
|
|
||||||
$message_wrapped = wordwrap($message, 70, "\n", true);
|
|
||||||
//Send the email
|
|
||||||
mail($to,$subject,$message_wrapped,$headers);
|
|
||||||
} else{
|
|
||||||
echo('Error! Please <a href="javascript:history.back()">go back</a> and try again');
|
|
||||||
}
|
|
||||||
$conn->close();
|
|
||||||
?>
|
|
4
includes/jquery-2.1.3.min.js
vendored
@ -1,36 +0,0 @@
|
|||||||
{
|
|
||||||
"disallowEmptyBlocks": true,
|
|
||||||
"disallowKeywords": ["with"],
|
|
||||||
"disallowMixedSpacesAndTabs": true,
|
|
||||||
"disallowMultipleLineStrings": true,
|
|
||||||
"disallowMultipleVarDecl": true,
|
|
||||||
"disallowQuotedKeysInObjects": "allButReserved",
|
|
||||||
"disallowSpaceAfterPrefixUnaryOperators": ["++", "--", "+", "-", "~", "!"],
|
|
||||||
"disallowSpaceBeforeBinaryOperators": [","],
|
|
||||||
"disallowSpaceBeforePostfixUnaryOperators": ["++", "--"],
|
|
||||||
"disallowSpacesInNamedFunctionExpression": { "beforeOpeningRoundBrace": true },
|
|
||||||
"disallowSpacesInsideArrayBrackets": true,
|
|
||||||
"disallowSpacesInsideParentheses": true,
|
|
||||||
"disallowTrailingComma": true,
|
|
||||||
"disallowTrailingWhitespace": true,
|
|
||||||
"requireCamelCaseOrUpperCaseIdentifiers": true,
|
|
||||||
"requireCapitalizedConstructors": true,
|
|
||||||
"requireCommaBeforeLineBreak": true,
|
|
||||||
"requireDotNotation": true,
|
|
||||||
"requireLineFeedAtFileEnd": true,
|
|
||||||
"requireSpaceAfterBinaryOperators": ["+", "-", "/", "*", "=", "==", "===", "!=", "!==", ">", "<", ">=", "<="],
|
|
||||||
"requireSpaceAfterKeywords": ["if", "else", "for", "while", "do", "switch", "return", "try", "catch"],
|
|
||||||
"requireSpaceAfterLineComment": true,
|
|
||||||
"requireSpaceBeforeBinaryOperators": ["+", "-", "/", "*", "=", "==", "===", "!=", "!==", ">", "<", ">=", "<="],
|
|
||||||
"requireSpaceBetweenArguments": true,
|
|
||||||
"requireSpacesInAnonymousFunctionExpression": { "beforeOpeningCurlyBrace": true, "beforeOpeningRoundBrace": true },
|
|
||||||
"requireSpacesInConditionalExpression": true,
|
|
||||||
"requireSpacesInForStatement": true,
|
|
||||||
"requireSpacesInFunctionDeclaration": { "beforeOpeningCurlyBrace": true },
|
|
||||||
"requireSpacesInFunctionExpression": { "beforeOpeningCurlyBrace": true },
|
|
||||||
"requireSpacesInNamedFunctionExpression": { "beforeOpeningCurlyBrace": true },
|
|
||||||
"requireSpacesInsideObjectBrackets": "allButNested",
|
|
||||||
"validateIndentation": 2,
|
|
||||||
"validateLineBreaks": "LF",
|
|
||||||
"validateQuoteMarks": "'"
|
|
||||||
}
|
|
@ -1,15 +0,0 @@
|
|||||||
{
|
|
||||||
"asi" : true,
|
|
||||||
"browser" : true,
|
|
||||||
"eqeqeq" : false,
|
|
||||||
"eqnull" : true,
|
|
||||||
"es3" : true,
|
|
||||||
"expr" : true,
|
|
||||||
"jquery" : true,
|
|
||||||
"latedef" : true,
|
|
||||||
"laxbreak" : true,
|
|
||||||
"nonbsp" : true,
|
|
||||||
"strict" : true,
|
|
||||||
"undef" : true,
|
|
||||||
"unused" : true
|
|
||||||
}
|
|
2
includes/js/dtp/.gitignore
vendored
@ -1,2 +0,0 @@
|
|||||||
$ cat .gitignore
|
|
||||||
parse.php
|
|
@ -1,19 +0,0 @@
|
|||||||
Copyright (c) 2013 http://xdsoft.net
|
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
|
||||||
in the Software without restriction, including without limitation the rights
|
|
||||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
||||||
copies of the Software, and to permit persons to whom the Software is
|
|
||||||
furnished to do so, subject to the following conditions:
|
|
||||||
|
|
||||||
The above copyright notice and this permission notice shall be included in
|
|
||||||
all copies or substantial portions of the Software.
|
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
||||||
THE SOFTWARE.
|
|
@ -1,20 +0,0 @@
|
|||||||
datetimepicker
|
|
||||||
==============
|
|
||||||
[Documentation][doc]
|
|
||||||
|
|
||||||
|
|
||||||
jQuery Plugin Date and Time Picker
|
|
||||||
|
|
||||||
DateTimePicker
|
|
||||||
|
|
||||||
![ScreenShot](https://raw.github.com/xdan/datetimepicker/master/screen/1.png)
|
|
||||||
|
|
||||||
DatePicker
|
|
||||||
|
|
||||||
![ScreenShot](https://raw.github.com/xdan/datetimepicker/master/screen/2.png)
|
|
||||||
|
|
||||||
TimePicker
|
|
||||||
|
|
||||||
![ScreenShot](https://raw.github.com/xdan/datetimepicker/master/screen/3.png)
|
|
||||||
|
|
||||||
[doc]: http://xdsoft.net/jqplugins/datetimepicker/
|
|
@ -1,50 +0,0 @@
|
|||||||
{
|
|
||||||
"name":"datetimepicker",
|
|
||||||
"version":"2.4.1",
|
|
||||||
"main": [
|
|
||||||
"jquery.datetimepicker.js",
|
|
||||||
"jquery.datetimepicker.css"
|
|
||||||
],
|
|
||||||
"ignore": [
|
|
||||||
"**/screen",
|
|
||||||
"**/datetimepicker.jquery.json",
|
|
||||||
"**/*.png",
|
|
||||||
"**/*.txt",
|
|
||||||
"**/*.md",
|
|
||||||
"**/*.html",
|
|
||||||
"**/*.tpl",
|
|
||||||
"**/jquery.js"
|
|
||||||
],
|
|
||||||
"keywords": [
|
|
||||||
"calendar",
|
|
||||||
"date",
|
|
||||||
"time",
|
|
||||||
"form",
|
|
||||||
"datetime",
|
|
||||||
"datepicker",
|
|
||||||
"timepicker",
|
|
||||||
"datetimepicker",
|
|
||||||
"validation",
|
|
||||||
"ui",
|
|
||||||
"scroller",
|
|
||||||
"picker",
|
|
||||||
"i18n",
|
|
||||||
"input",
|
|
||||||
"jquery",
|
|
||||||
"touch"
|
|
||||||
],
|
|
||||||
"dependencies": {
|
|
||||||
"jquery": ">= 1.7.2"
|
|
||||||
},
|
|
||||||
"authors": [
|
|
||||||
{
|
|
||||||
"name": "Chupurnov Valeriy",
|
|
||||||
"email": "chupurnov@gmail.com",
|
|
||||||
"homepage": "http://xdsoft.net/contacts.html"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"homepage":"http://xdsoft.net/jqplugins/datetimepicker/",
|
|
||||||
"repository": {
|
|
||||||
"type": "git", "url": "git://github.com:xdan/datetimepicker.git"
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,47 +0,0 @@
|
|||||||
{
|
|
||||||
"name": "datetimepicker",
|
|
||||||
"version": "2.4.1",
|
|
||||||
"title": "jQuery Date and Time picker",
|
|
||||||
"description": "jQuery plugin for date, time, or datetime manipulation in form",
|
|
||||||
"keywords": [
|
|
||||||
"calendar",
|
|
||||||
"date",
|
|
||||||
"time",
|
|
||||||
"form",
|
|
||||||
"datetime",
|
|
||||||
"datepicker",
|
|
||||||
"timepicker",
|
|
||||||
"datetimepicker",
|
|
||||||
"validation",
|
|
||||||
"ui",
|
|
||||||
"scroller",
|
|
||||||
"picker",
|
|
||||||
"i18n",
|
|
||||||
"input",
|
|
||||||
"jquery",
|
|
||||||
"touch"
|
|
||||||
],
|
|
||||||
"author": {
|
|
||||||
"name": "Chupurnov Valeriy",
|
|
||||||
"email": "chupurnov@gmail.com",
|
|
||||||
"url": "http://xdsoft.net/contacts.html"
|
|
||||||
},
|
|
||||||
"maintainers": [{
|
|
||||||
"name": "Chupurnov Valeriy",
|
|
||||||
"email": "chupurnov@gmail.com",
|
|
||||||
"url": "http://xdsoft.net"
|
|
||||||
}],
|
|
||||||
"licenses": [
|
|
||||||
{
|
|
||||||
"type": "MIT",
|
|
||||||
"url": "https://github.com/xdan/datetimepicker/blob/master/MIT-LICENSE.txt"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"bugs": "https://github.com/xdan/datetimepicker/issues",
|
|
||||||
"homepage": "http://xdsoft.net/jqplugins/datetimepicker/",
|
|
||||||
"docs": "http://xdsoft.net/jqplugins/datetimepicker/",
|
|
||||||
"download": "https://github.com/xdan/datetimepicker/archive/master.zip",
|
|
||||||
"dependencies": {
|
|
||||||
"jquery": ">=1.7"
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,190 +0,0 @@
|
|||||||
<!DOCTYPE html>
|
|
||||||
<html lang="en">
|
|
||||||
<head>
|
|
||||||
<meta http-equiv="content-type" content="text/html; charset=utf-8"/>
|
|
||||||
<link rel="stylesheet" type="text/css" href="./jquery.datetimepicker.css"/>
|
|
||||||
<style type="text/css">
|
|
||||||
|
|
||||||
.custom-date-style {
|
|
||||||
background-color: red !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
</style>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
|
|
||||||
<p><a href="http://xdsoft.net/jqplugins/datetimepicker/">Homepage</a></p>
|
|
||||||
<h3>DateTimePicker</h3>
|
|
||||||
<input type="text" value="" id="datetimepicker"/><br><br>
|
|
||||||
<h3>DateTimePickers selected by class</h3>
|
|
||||||
<input type="text" class="some_class" value="" id="some_class_1"/>
|
|
||||||
<input type="text" class="some_class" value="" id="some_class_2"/>
|
|
||||||
<h3>Mask DateTimePicker</h3>
|
|
||||||
<input type="text" value="" id="datetimepicker_mask"/><br><br>
|
|
||||||
<h3>TimePicker</h3>
|
|
||||||
<input type="text" id="datetimepicker1"/><br><br>
|
|
||||||
<h3>DatePicker</h3>
|
|
||||||
<input type="text" id="datetimepicker2"/><br><br>
|
|
||||||
<h3>Inline DateTimePicker</h3>
|
|
||||||
<!--<div id="console" style="background-color:#fff;color:red">sdfdsfsdf</div>-->
|
|
||||||
<input type="text" id="datetimepicker3"/><input type="button" onclick="$('#datetimepicker3').datetimepicker({value:'2011/12/11 12:00'})" value="set inline value 2011/12/11 12:00"/><br><br>
|
|
||||||
<h3>Button Trigger</h3>
|
|
||||||
<input type="text" value="2013/12/03 18:00" id="datetimepicker4"/><input id="open" type="button" value="open"/><input id="close" type="button" value="close"/><input id="reset" type="button" value="reset"/>
|
|
||||||
<h3>TimePicker allows time</h3>
|
|
||||||
<input type="text" id="datetimepicker5"/><br><br>
|
|
||||||
<h3>Destroy DateTimePicker</h3>
|
|
||||||
<input type="text" id="datetimepicker6"/><input id="destroy" type="button" value="destroy"/>
|
|
||||||
<h3>Set options runtime DateTimePicker</h3>
|
|
||||||
<input type="text" id="datetimepicker7"/>
|
|
||||||
<p>If select day is Saturday, the minimum set 11:00, otherwise 8:00</p>
|
|
||||||
<h3>onGenerate</h3>
|
|
||||||
<input type="text" id="datetimepicker8"/>
|
|
||||||
<h3>disable all weekend</h3>
|
|
||||||
<input type="text" id="datetimepicker9"/>
|
|
||||||
<h3>Default date and time </h3>
|
|
||||||
<input type="text" id="default_datetimepicker"/>
|
|
||||||
<h3>Show inline</h3>
|
|
||||||
<a href="javascript:void(0)" onclick="var si = document.getElementById('show_inline').style; si.display = (si.display=='none')?'block':'none';return false; ">Show/Hide</a>
|
|
||||||
<div id="show_inline" style="display:none">
|
|
||||||
<input type="text" id="datetimepicker10"/>
|
|
||||||
</div>
|
|
||||||
<h3>Disable Specific Dates</h3>
|
|
||||||
<p>Disable the dates 2 days from now.</p>
|
|
||||||
<input type="text" id="datetimepicker11"/>
|
|
||||||
<h3>Custom Date Styling</h3>
|
|
||||||
<p>Make the background of the date 2 days from now bright red.</p>
|
|
||||||
<input type="text" id="datetimepicker12"/>
|
|
||||||
<h3>Dark theme</h3>
|
|
||||||
<p>thank for this <a href="https://github.com/lampslave">https://github.com/lampslave</a></p>
|
|
||||||
<input type="text" id="datetimepicker_dark"/>
|
|
||||||
</body>
|
|
||||||
<script src="./jquery.js"></script>
|
|
||||||
<script src="./jquery.datetimepicker.js"></script>
|
|
||||||
<script>/*
|
|
||||||
window.onerror = function(errorMsg) {
|
|
||||||
$('#console').html($('#console').html()+'<br>'+errorMsg)
|
|
||||||
}*/
|
|
||||||
$('#datetimepicker').datetimepicker({
|
|
||||||
dayOfWeekStart : 1,
|
|
||||||
lang:'en',
|
|
||||||
disabledDates:['1986/01/08','1986/01/09','1986/01/10'],
|
|
||||||
startDate: '1986/01/05'
|
|
||||||
});
|
|
||||||
$('#datetimepicker').datetimepicker({value:'2015/04/15 05:03',step:10});
|
|
||||||
|
|
||||||
$('.some_class').datetimepicker();
|
|
||||||
|
|
||||||
$('#default_datetimepicker').datetimepicker({
|
|
||||||
formatTime:'H:i',
|
|
||||||
formatDate:'d.m.Y',
|
|
||||||
defaultDate:'8.12.1986', // it's my birthday
|
|
||||||
defaultTime:'10:00',
|
|
||||||
timepickerScrollbar:false
|
|
||||||
});
|
|
||||||
|
|
||||||
$('#datetimepicker10').datetimepicker({
|
|
||||||
step:5,
|
|
||||||
inline:true
|
|
||||||
});
|
|
||||||
$('#datetimepicker_mask').datetimepicker({
|
|
||||||
mask:'9999/19/39 29:59'
|
|
||||||
});
|
|
||||||
|
|
||||||
$('#datetimepicker1').datetimepicker({
|
|
||||||
datepicker:false,
|
|
||||||
format:'H:i',
|
|
||||||
step:5
|
|
||||||
});
|
|
||||||
$('#datetimepicker2').datetimepicker({
|
|
||||||
yearOffset:222,
|
|
||||||
lang:'ch',
|
|
||||||
timepicker:false,
|
|
||||||
format:'d/m/Y',
|
|
||||||
formatDate:'Y/m/d',
|
|
||||||
minDate:'-1970/01/02', // yesterday is minimum date
|
|
||||||
maxDate:'+1970/01/02' // and tommorow is maximum date calendar
|
|
||||||
});
|
|
||||||
$('#datetimepicker3').datetimepicker({
|
|
||||||
inline:true
|
|
||||||
});
|
|
||||||
$('#datetimepicker4').datetimepicker();
|
|
||||||
$('#open').click(function(){
|
|
||||||
$('#datetimepicker4').datetimepicker('show');
|
|
||||||
});
|
|
||||||
$('#close').click(function(){
|
|
||||||
$('#datetimepicker4').datetimepicker('hide');
|
|
||||||
});
|
|
||||||
$('#reset').click(function(){
|
|
||||||
$('#datetimepicker4').datetimepicker('reset');
|
|
||||||
});
|
|
||||||
$('#datetimepicker5').datetimepicker({
|
|
||||||
datepicker:false,
|
|
||||||
allowTimes:['12:00','13:00','15:00','17:00','17:05','17:20','19:00','20:00'],
|
|
||||||
step:5
|
|
||||||
});
|
|
||||||
$('#datetimepicker6').datetimepicker();
|
|
||||||
$('#destroy').click(function(){
|
|
||||||
if( $('#datetimepicker6').data('xdsoft_datetimepicker') ){
|
|
||||||
$('#datetimepicker6').datetimepicker('destroy');
|
|
||||||
this.value = 'create';
|
|
||||||
}else{
|
|
||||||
$('#datetimepicker6').datetimepicker();
|
|
||||||
this.value = 'destroy';
|
|
||||||
}
|
|
||||||
});
|
|
||||||
var logic = function( currentDateTime ){
|
|
||||||
if( currentDateTime.getDay()==6 ){
|
|
||||||
this.setOptions({
|
|
||||||
minTime:'11:00'
|
|
||||||
});
|
|
||||||
}else
|
|
||||||
this.setOptions({
|
|
||||||
minTime:'8:00'
|
|
||||||
});
|
|
||||||
};
|
|
||||||
$('#datetimepicker7').datetimepicker({
|
|
||||||
onChangeDateTime:logic,
|
|
||||||
onShow:logic
|
|
||||||
});
|
|
||||||
$('#datetimepicker8').datetimepicker({
|
|
||||||
onGenerate:function( ct ){
|
|
||||||
$(this).find('.xdsoft_date')
|
|
||||||
.toggleClass('xdsoft_disabled');
|
|
||||||
},
|
|
||||||
minDate:'-1970/01/2',
|
|
||||||
maxDate:'+1970/01/2',
|
|
||||||
timepicker:false
|
|
||||||
});
|
|
||||||
$('#datetimepicker9').datetimepicker({
|
|
||||||
onGenerate:function( ct ){
|
|
||||||
$(this).find('.xdsoft_date.xdsoft_weekend')
|
|
||||||
.addClass('xdsoft_disabled');
|
|
||||||
},
|
|
||||||
weekends:['01.01.2014','02.01.2014','03.01.2014','04.01.2014','05.01.2014','06.01.2014'],
|
|
||||||
timepicker:false
|
|
||||||
});
|
|
||||||
var dateToDisable = new Date();
|
|
||||||
dateToDisable.setDate(dateToDisable.getDate() + 2);
|
|
||||||
$('#datetimepicker11').datetimepicker({
|
|
||||||
beforeShowDay: function(date) {
|
|
||||||
if (date.getMonth() == dateToDisable.getMonth() && date.getDate() == dateToDisable.getDate()) {
|
|
||||||
return [false, ""]
|
|
||||||
}
|
|
||||||
|
|
||||||
return [true, ""];
|
|
||||||
}
|
|
||||||
});
|
|
||||||
$('#datetimepicker12').datetimepicker({
|
|
||||||
beforeShowDay: function(date) {
|
|
||||||
if (date.getMonth() == dateToDisable.getMonth() && date.getDate() == dateToDisable.getDate()) {
|
|
||||||
return [true, "custom-date-style"];
|
|
||||||
}
|
|
||||||
|
|
||||||
return [true, ""];
|
|
||||||
}
|
|
||||||
});
|
|
||||||
$('#datetimepicker_dark').datetimepicker({theme:'dark'})
|
|
||||||
|
|
||||||
|
|
||||||
</script>
|
|
||||||
</html>
|
|
@ -1,523 +0,0 @@
|
|||||||
.xdsoft_datetimepicker {
|
|
||||||
box-shadow: 0 5px 15px -5px rgba(0, 0, 0, 0.506);
|
|
||||||
background: #fff;
|
|
||||||
border-bottom: 1px solid #bbb;
|
|
||||||
border-left: 1px solid #ccc;
|
|
||||||
border-right: 1px solid #ccc;
|
|
||||||
border-top: 1px solid #ccc;
|
|
||||||
color: #333;
|
|
||||||
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
|
|
||||||
padding: 8px;
|
|
||||||
padding-left: 0;
|
|
||||||
padding-top: 2px;
|
|
||||||
position: absolute;
|
|
||||||
z-index: 9999;
|
|
||||||
-moz-box-sizing: border-box;
|
|
||||||
box-sizing: border-box;
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
.xdsoft_datetimepicker iframe {
|
|
||||||
position: absolute;
|
|
||||||
left: 0;
|
|
||||||
top: 0;
|
|
||||||
width: 75px;
|
|
||||||
height: 210px;
|
|
||||||
background: transparent;
|
|
||||||
border: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*For IE8 or lower*/
|
|
||||||
.xdsoft_datetimepicker button {
|
|
||||||
border: none !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
.xdsoft_noselect {
|
|
||||||
-webkit-touch-callout: none;
|
|
||||||
-webkit-user-select: none;
|
|
||||||
-khtml-user-select: none;
|
|
||||||
-moz-user-select: none;
|
|
||||||
-ms-user-select: none;
|
|
||||||
-o-user-select: none;
|
|
||||||
user-select: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
.xdsoft_noselect::selection { background: transparent }
|
|
||||||
.xdsoft_noselect::-moz-selection { background: transparent }
|
|
||||||
|
|
||||||
.xdsoft_datetimepicker.xdsoft_inline {
|
|
||||||
display: inline-block;
|
|
||||||
position: static;
|
|
||||||
box-shadow: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
.xdsoft_datetimepicker * {
|
|
||||||
-moz-box-sizing: border-box;
|
|
||||||
box-sizing: border-box;
|
|
||||||
padding: 0;
|
|
||||||
margin: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.xdsoft_datetimepicker .xdsoft_datepicker, .xdsoft_datetimepicker .xdsoft_timepicker {
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
.xdsoft_datetimepicker .xdsoft_datepicker.active, .xdsoft_datetimepicker .xdsoft_timepicker.active {
|
|
||||||
display: block;
|
|
||||||
}
|
|
||||||
|
|
||||||
.xdsoft_datetimepicker .xdsoft_datepicker {
|
|
||||||
width: 224px;
|
|
||||||
float: left;
|
|
||||||
margin-left: 8px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.xdsoft_datetimepicker.xdsoft_showweeks .xdsoft_datepicker {
|
|
||||||
width: 256px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.xdsoft_datetimepicker .xdsoft_timepicker {
|
|
||||||
width: 58px;
|
|
||||||
float: left;
|
|
||||||
text-align: center;
|
|
||||||
margin-left: 8px;
|
|
||||||
margin-top: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.xdsoft_datetimepicker .xdsoft_datepicker.active+.xdsoft_timepicker {
|
|
||||||
margin-top: 8px;
|
|
||||||
margin-bottom: 3px
|
|
||||||
}
|
|
||||||
|
|
||||||
.xdsoft_datetimepicker .xdsoft_mounthpicker {
|
|
||||||
position: relative;
|
|
||||||
text-align: center;
|
|
||||||
}
|
|
||||||
|
|
||||||
.xdsoft_datetimepicker .xdsoft_label i,
|
|
||||||
.xdsoft_datetimepicker .xdsoft_prev,
|
|
||||||
.xdsoft_datetimepicker .xdsoft_next,
|
|
||||||
.xdsoft_datetimepicker .xdsoft_today_button {
|
|
||||||
background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGQAAAAeCAYAAADaW7vzAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMy1jMDExIDY2LjE0NTY2MSwgMjAxMi8wMi8wNi0xNDo1NjoyNyAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNiAoV2luZG93cykiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6Q0NBRjI1NjM0M0UwMTFFNDk4NkFGMzJFQkQzQjEwRUIiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6Q0NBRjI1NjQ0M0UwMTFFNDk4NkFGMzJFQkQzQjEwRUIiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDpDQ0FGMjU2MTQzRTAxMUU0OTg2QUYzMkVCRDNCMTBFQiIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDpDQ0FGMjU2MjQzRTAxMUU0OTg2QUYzMkVCRDNCMTBFQiIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PoNEP54AAAIOSURBVHja7Jq9TsMwEMcxrZD4WpBYeKUCe+kTMCACHZh4BFfHO/AAIHZGFhYkBBsSEqxsLCAgXKhbXYOTxh9pfJVP+qutnZ5s/5Lz2Y5I03QhWji2GIcgAokWgfCxNvcOCCGKqiSqhUp0laHOne05vdEyGMfkdxJDVjgwDlEQgYQBgx+ULJaWSXXS6r/ER5FBVR8VfGftTKcITNs+a1XpcFoExREIDF14AVIFxgQUS+h520cdud6wNkC0UBw6BCO/HoCYwBhD8QCkQ/x1mwDyD4plh4D6DDV0TAGyo4HcawLIBBSLDkHeH0Mg2yVP3l4TQMZQDDsEOl/MgHQqhMNuE0D+oBh0CIr8MAKyazBH9WyBuKxDWgbXfjNf32TZ1KWm/Ap1oSk/R53UtQ5xTh3LUlMmT8gt6g51Q9p+SobxgJQ/qmsfZhWywGFSl0yBjCLJCMgXail3b7+rumdVJ2YRss4cN+r6qAHDkPWjPjdJCF4n9RmAD/V9A/Wp4NQassDjwlB6XBiCxcJQWmZZb8THFilfy/lfrTvLghq2TqTHrRMTKNJ0sIhdo15RT+RpyWwFdY96UZ/LdQKBGjcXpcc1AlSFEfLmouD+1knuxBDUVrvOBmoOC/rEcN7OQxKVeJTCiAdUzUJhA2Oez9QTkp72OTVcxDcXY8iKNkxGAJXmJCOQwOa6dhyXsOa6XwEGAKdeb5ET3rQdAAAAAElFTkSuQmCC);
|
|
||||||
}
|
|
||||||
|
|
||||||
.xdsoft_datetimepicker .xdsoft_label i {
|
|
||||||
opacity: 0.5;
|
|
||||||
background-position: -92px -19px;
|
|
||||||
display: inline-block;
|
|
||||||
width: 9px;
|
|
||||||
height: 20px;
|
|
||||||
vertical-align: middle;
|
|
||||||
}
|
|
||||||
|
|
||||||
.xdsoft_datetimepicker .xdsoft_prev {
|
|
||||||
float: left;
|
|
||||||
background-position: -20px 0;
|
|
||||||
}
|
|
||||||
.xdsoft_datetimepicker .xdsoft_today_button {
|
|
||||||
float: left;
|
|
||||||
background-position: -70px 0;
|
|
||||||
margin-left: 5px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.xdsoft_datetimepicker .xdsoft_next {
|
|
||||||
float: right;
|
|
||||||
background-position: 0 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.xdsoft_datetimepicker .xdsoft_next,
|
|
||||||
.xdsoft_datetimepicker .xdsoft_prev ,
|
|
||||||
.xdsoft_datetimepicker .xdsoft_today_button {
|
|
||||||
background-color: transparent;
|
|
||||||
background-repeat: no-repeat;
|
|
||||||
border: 0 none;
|
|
||||||
cursor: pointer;
|
|
||||||
display: block;
|
|
||||||
height: 30px;
|
|
||||||
opacity: 0.5;
|
|
||||||
-ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=50)";
|
|
||||||
outline: medium none;
|
|
||||||
overflow: hidden;
|
|
||||||
padding: 0;
|
|
||||||
position: relative;
|
|
||||||
text-indent: 100%;
|
|
||||||
white-space: nowrap;
|
|
||||||
width: 20px;
|
|
||||||
min-width: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.xdsoft_datetimepicker .xdsoft_timepicker .xdsoft_prev,
|
|
||||||
.xdsoft_datetimepicker .xdsoft_timepicker .xdsoft_next {
|
|
||||||
float: none;
|
|
||||||
background-position: -40px -15px;
|
|
||||||
height: 15px;
|
|
||||||
width: 30px;
|
|
||||||
display: block;
|
|
||||||
margin-left: 14px;
|
|
||||||
margin-top: 7px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.xdsoft_datetimepicker .xdsoft_timepicker .xdsoft_prev {
|
|
||||||
background-position: -40px 0;
|
|
||||||
margin-bottom: 7px;
|
|
||||||
margin-top: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.xdsoft_datetimepicker .xdsoft_timepicker .xdsoft_time_box {
|
|
||||||
height: 151px;
|
|
||||||
overflow: hidden;
|
|
||||||
border-bottom: 1px solid #ddd;
|
|
||||||
}
|
|
||||||
|
|
||||||
.xdsoft_datetimepicker .xdsoft_timepicker .xdsoft_time_box >div >div {
|
|
||||||
background: #f5f5f5;
|
|
||||||
border-top: 1px solid #ddd;
|
|
||||||
color: #666;
|
|
||||||
font-size: 12px;
|
|
||||||
text-align: center;
|
|
||||||
border-collapse: collapse;
|
|
||||||
cursor: pointer;
|
|
||||||
border-bottom-width: 0;
|
|
||||||
height: 25px;
|
|
||||||
line-height: 25px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.xdsoft_datetimepicker .xdsoft_timepicker .xdsoft_time_box >div > div:first-child {
|
|
||||||
border-top-width: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.xdsoft_datetimepicker .xdsoft_today_button:hover,
|
|
||||||
.xdsoft_datetimepicker .xdsoft_next:hover,
|
|
||||||
.xdsoft_datetimepicker .xdsoft_prev:hover {
|
|
||||||
opacity: 1;
|
|
||||||
-ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=100)";
|
|
||||||
}
|
|
||||||
|
|
||||||
.xdsoft_datetimepicker .xdsoft_label {
|
|
||||||
display: inline;
|
|
||||||
position: relative;
|
|
||||||
z-index: 9999;
|
|
||||||
margin: 0;
|
|
||||||
padding: 5px 3px;
|
|
||||||
font-size: 14px;
|
|
||||||
line-height: 20px;
|
|
||||||
font-weight: bold;
|
|
||||||
background-color: #fff;
|
|
||||||
float: left;
|
|
||||||
width: 182px;
|
|
||||||
text-align: center;
|
|
||||||
cursor: pointer;
|
|
||||||
}
|
|
||||||
|
|
||||||
.xdsoft_datetimepicker .xdsoft_label:hover>span {
|
|
||||||
text-decoration: underline;
|
|
||||||
}
|
|
||||||
|
|
||||||
.xdsoft_datetimepicker .xdsoft_label:hover i {
|
|
||||||
opacity: 1.0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.xdsoft_datetimepicker .xdsoft_label > .xdsoft_select {
|
|
||||||
border: 1px solid #ccc;
|
|
||||||
position: absolute;
|
|
||||||
right: 0;
|
|
||||||
top: 30px;
|
|
||||||
z-index: 101;
|
|
||||||
display: none;
|
|
||||||
background: #fff;
|
|
||||||
max-height: 160px;
|
|
||||||
overflow-y: hidden;
|
|
||||||
}
|
|
||||||
|
|
||||||
.xdsoft_datetimepicker .xdsoft_label > .xdsoft_select.xdsoft_monthselect{ right: -7px }
|
|
||||||
.xdsoft_datetimepicker .xdsoft_label > .xdsoft_select.xdsoft_yearselect{ right: 2px }
|
|
||||||
.xdsoft_datetimepicker .xdsoft_label > .xdsoft_select > div > .xdsoft_option:hover {
|
|
||||||
color: #fff;
|
|
||||||
background: #ff8000;
|
|
||||||
}
|
|
||||||
|
|
||||||
.xdsoft_datetimepicker .xdsoft_label > .xdsoft_select > div > .xdsoft_option {
|
|
||||||
padding: 2px 10px 2px 5px;
|
|
||||||
text-decoration: none !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
.xdsoft_datetimepicker .xdsoft_label > .xdsoft_select > div > .xdsoft_option.xdsoft_current {
|
|
||||||
background: #33aaff;
|
|
||||||
box-shadow: #178fe5 0 1px 3px 0 inset;
|
|
||||||
color: #fff;
|
|
||||||
font-weight: 700;
|
|
||||||
}
|
|
||||||
|
|
||||||
.xdsoft_datetimepicker .xdsoft_month {
|
|
||||||
width: 100px;
|
|
||||||
text-align: right;
|
|
||||||
}
|
|
||||||
|
|
||||||
.xdsoft_datetimepicker .xdsoft_calendar {
|
|
||||||
clear: both;
|
|
||||||
}
|
|
||||||
|
|
||||||
.xdsoft_datetimepicker .xdsoft_year{
|
|
||||||
width: 48px;
|
|
||||||
margin-left: 5px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.xdsoft_datetimepicker .xdsoft_calendar table {
|
|
||||||
border-collapse: collapse;
|
|
||||||
width: 100%;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
.xdsoft_datetimepicker .xdsoft_calendar td > div {
|
|
||||||
padding-right: 5px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.xdsoft_datetimepicker .xdsoft_calendar th {
|
|
||||||
height: 25px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.xdsoft_datetimepicker .xdsoft_calendar td,.xdsoft_datetimepicker .xdsoft_calendar th {
|
|
||||||
width: 14.2857142%;
|
|
||||||
background: #f5f5f5;
|
|
||||||
border: 1px solid #ddd;
|
|
||||||
color: #666;
|
|
||||||
font-size: 12px;
|
|
||||||
text-align: right;
|
|
||||||
vertical-align: middle;
|
|
||||||
padding: 0;
|
|
||||||
border-collapse: collapse;
|
|
||||||
cursor: pointer;
|
|
||||||
height: 25px;
|
|
||||||
}
|
|
||||||
.xdsoft_datetimepicker.xdsoft_showweeks .xdsoft_calendar td,.xdsoft_datetimepicker.xdsoft_showweeks .xdsoft_calendar th {
|
|
||||||
width: 12.5%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.xdsoft_datetimepicker .xdsoft_calendar th {
|
|
||||||
background: #f1f1f1;
|
|
||||||
}
|
|
||||||
|
|
||||||
.xdsoft_datetimepicker .xdsoft_calendar td.xdsoft_today {
|
|
||||||
color: #33aaff;
|
|
||||||
}
|
|
||||||
|
|
||||||
.xdsoft_datetimepicker .xdsoft_calendar td.xdsoft_default,
|
|
||||||
.xdsoft_datetimepicker .xdsoft_calendar td.xdsoft_current,
|
|
||||||
.xdsoft_datetimepicker .xdsoft_timepicker .xdsoft_time_box >div >div.xdsoft_current {
|
|
||||||
background: #33aaff;
|
|
||||||
box-shadow: #178fe5 0 1px 3px 0 inset;
|
|
||||||
color: #fff;
|
|
||||||
font-weight: 700;
|
|
||||||
}
|
|
||||||
|
|
||||||
.xdsoft_datetimepicker .xdsoft_calendar td.xdsoft_other_month,
|
|
||||||
.xdsoft_datetimepicker .xdsoft_calendar td.xdsoft_disabled,
|
|
||||||
.xdsoft_datetimepicker .xdsoft_time_box >div >div.xdsoft_disabled {
|
|
||||||
opacity: 0.5;
|
|
||||||
-ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=50)";
|
|
||||||
cursor: default;
|
|
||||||
}
|
|
||||||
|
|
||||||
.xdsoft_datetimepicker .xdsoft_calendar td.xdsoft_other_month.xdsoft_disabled {
|
|
||||||
opacity: 0.2;
|
|
||||||
-ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=20)";
|
|
||||||
}
|
|
||||||
|
|
||||||
.xdsoft_datetimepicker .xdsoft_calendar td:hover,
|
|
||||||
.xdsoft_datetimepicker .xdsoft_timepicker .xdsoft_time_box >div >div:hover {
|
|
||||||
color: #fff !important;
|
|
||||||
background: #ff8000 !important;
|
|
||||||
box-shadow: none !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
.xdsoft_datetimepicker .xdsoft_calendar td.xdsoft_current.xdsoft_disabled:hover,
|
|
||||||
.xdsoft_datetimepicker .xdsoft_timepicker .xdsoft_time_box>div>div.xdsoft_current.xdsoft_disabled:hover {
|
|
||||||
background: #33aaff !important;
|
|
||||||
box-shadow: #178fe5 0 1px 3px 0 inset !important;
|
|
||||||
color: #fff !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
.xdsoft_datetimepicker .xdsoft_calendar td.xdsoft_disabled:hover,
|
|
||||||
.xdsoft_datetimepicker .xdsoft_timepicker .xdsoft_time_box >div >div.xdsoft_disabled:hover {
|
|
||||||
color: inherit !important;
|
|
||||||
background: inherit !important;
|
|
||||||
box-shadow: inherit !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
.xdsoft_datetimepicker .xdsoft_calendar th {
|
|
||||||
font-weight: 700;
|
|
||||||
text-align: center;
|
|
||||||
color: #999;
|
|
||||||
cursor: default;
|
|
||||||
}
|
|
||||||
|
|
||||||
.xdsoft_datetimepicker .xdsoft_copyright {
|
|
||||||
color: #ccc !important;
|
|
||||||
font-size: 10px;
|
|
||||||
clear: both;
|
|
||||||
float: none;
|
|
||||||
margin-left: 8px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.xdsoft_datetimepicker .xdsoft_copyright a { color: #eee !important }
|
|
||||||
.xdsoft_datetimepicker .xdsoft_copyright a:hover { color: #aaa !important }
|
|
||||||
|
|
||||||
.xdsoft_time_box {
|
|
||||||
position: relative;
|
|
||||||
border: 1px solid #ccc;
|
|
||||||
}
|
|
||||||
.xdsoft_scrollbar >.xdsoft_scroller {
|
|
||||||
background: #ccc !important;
|
|
||||||
height: 20px;
|
|
||||||
border-radius: 3px;
|
|
||||||
}
|
|
||||||
.xdsoft_scrollbar {
|
|
||||||
position: absolute;
|
|
||||||
width: 7px;
|
|
||||||
right: 0;
|
|
||||||
top: 0;
|
|
||||||
bottom: 0;
|
|
||||||
cursor: pointer;
|
|
||||||
}
|
|
||||||
.xdsoft_scroller_box {
|
|
||||||
position: relative;
|
|
||||||
}
|
|
||||||
|
|
||||||
.xdsoft_datetimepicker.xdsoft_dark {
|
|
||||||
box-shadow: 0 5px 15px -5px rgba(255, 255, 255, 0.506);
|
|
||||||
background: #000;
|
|
||||||
border-bottom: 1px solid #444;
|
|
||||||
border-left: 1px solid #333;
|
|
||||||
border-right: 1px solid #333;
|
|
||||||
border-top: 1px solid #333;
|
|
||||||
color: #ccc;
|
|
||||||
}
|
|
||||||
|
|
||||||
.xdsoft_datetimepicker.xdsoft_dark .xdsoft_timepicker .xdsoft_time_box {
|
|
||||||
border-bottom: 1px solid #222;
|
|
||||||
}
|
|
||||||
.xdsoft_datetimepicker.xdsoft_dark .xdsoft_timepicker .xdsoft_time_box >div >div {
|
|
||||||
background: #0a0a0a;
|
|
||||||
border-top: 1px solid #222;
|
|
||||||
color: #999;
|
|
||||||
}
|
|
||||||
|
|
||||||
.xdsoft_datetimepicker.xdsoft_dark .xdsoft_label {
|
|
||||||
background-color: #000;
|
|
||||||
}
|
|
||||||
.xdsoft_datetimepicker.xdsoft_dark .xdsoft_label > .xdsoft_select {
|
|
||||||
border: 1px solid #333;
|
|
||||||
background: #000;
|
|
||||||
}
|
|
||||||
|
|
||||||
.xdsoft_datetimepicker.xdsoft_dark .xdsoft_label > .xdsoft_select > div > .xdsoft_option:hover {
|
|
||||||
color: #000;
|
|
||||||
background: #007fff;
|
|
||||||
}
|
|
||||||
|
|
||||||
.xdsoft_datetimepicker.xdsoft_dark .xdsoft_label > .xdsoft_select > div > .xdsoft_option.xdsoft_current {
|
|
||||||
background: #cc5500;
|
|
||||||
box-shadow: #b03e00 0 1px 3px 0 inset;
|
|
||||||
color: #000;
|
|
||||||
}
|
|
||||||
|
|
||||||
.xdsoft_datetimepicker.xdsoft_dark .xdsoft_label i,
|
|
||||||
.xdsoft_datetimepicker.xdsoft_dark .xdsoft_prev,
|
|
||||||
.xdsoft_datetimepicker.xdsoft_dark .xdsoft_next,
|
|
||||||
.xdsoft_datetimepicker.xdsoft_dark .xdsoft_today_button {
|
|
||||||
background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGQAAAAeCAYAAADaW7vzAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMy1jMDExIDY2LjE0NTY2MSwgMjAxMi8wMi8wNi0xNDo1NjoyNyAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNiAoV2luZG93cykiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6QUExQUUzOTA0M0UyMTFFNDlBM0FFQTJENTExRDVBODYiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6QUExQUUzOTE0M0UyMTFFNDlBM0FFQTJENTExRDVBODYiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDpBQTFBRTM4RTQzRTIxMUU0OUEzQUVBMkQ1MTFENUE4NiIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDpBQTFBRTM4RjQzRTIxMUU0OUEzQUVBMkQ1MTFENUE4NiIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/Pp0VxGEAAAIASURBVHja7JrNSgMxEMebtgh+3MSLr1T1Xn2CHoSKB08+QmR8Bx9A8e7RixdB9CKCoNdexIugxFlJa7rNZneTbLIpM/CnNLsdMvNjM8l0mRCiQ9Ye61IKCAgZAUnH+mU3MMZaHYChBnJUDzWOFZdVfc5+ZFLbrWDeXPwbxIqrLLfaeS0hEBVGIRQCEiZoHQwtlGSByCCdYBl8g8egTTAWoKQMRBRBcZxYlhzhKegqMOageErsCHVkk3hXIFooDgHB1KkHIHVgzKB4ADJQ/A1jAFmAYhkQqA5TOBtocrKrgXwQA8gcFIuAIO8sQSA7hidvPwaQGZSaAYHOUWJABhWWw2EMIH9QagQERU4SArJXo0ZZL18uvaxejXt/Em8xjVBXmvFr1KVm/AJ10tRe2XnraNqaJvKE3KHuUbfK1E+VHB0q40/y3sdQSxY4FHWeKJCunP8UyDdqJZenT3ntVV5jIYCAh20vT7ioP8tpf6E2lfEMwERe+whV1MHjwZB7PBiCxcGQWwKZKD62lfGNnP/1poFAA60T7rF1UgcKd2id3KDeUS+oLWV8DfWAepOfq00CgQabi9zjcgJVYVD7PVzQUAUGAQkbNJTBICDhgwYTjDYD6XeW08ZKh+A4pYkzenOxXUbvZcWz7E8ykRMnIHGX1XPl+1m2vPYpL+2qdb8CDAARlKFEz/ZVkAAAAABJRU5ErkJggg==);
|
|
||||||
}
|
|
||||||
|
|
||||||
.xdsoft_datetimepicker.xdsoft_dark .xdsoft_calendar td,
|
|
||||||
.xdsoft_datetimepicker.xdsoft_dark .xdsoft_calendar th {
|
|
||||||
background: #0a0a0a;
|
|
||||||
border: 1px solid #222;
|
|
||||||
color: #999;
|
|
||||||
}
|
|
||||||
|
|
||||||
.xdsoft_datetimepicker.xdsoft_dark .xdsoft_calendar th {
|
|
||||||
background: #0e0e0e;
|
|
||||||
}
|
|
||||||
|
|
||||||
.xdsoft_datetimepicker.xdsoft_dark .xdsoft_calendar td.xdsoft_today {
|
|
||||||
color: #cc5500;
|
|
||||||
}
|
|
||||||
|
|
||||||
.xdsoft_datetimepicker.xdsoft_dark .xdsoft_calendar td.xdsoft_default,
|
|
||||||
.xdsoft_datetimepicker.xdsoft_dark .xdsoft_calendar td.xdsoft_current,
|
|
||||||
.xdsoft_datetimepicker.xdsoft_dark .xdsoft_timepicker .xdsoft_time_box >div >div.xdsoft_current {
|
|
||||||
background: #cc5500;
|
|
||||||
box-shadow: #b03e00 0 1px 3px 0 inset;
|
|
||||||
color: #000;
|
|
||||||
}
|
|
||||||
|
|
||||||
.xdsoft_datetimepicker.xdsoft_dark .xdsoft_calendar td:hover,
|
|
||||||
.xdsoft_datetimepicker.xdsoft_dark .xdsoft_timepicker .xdsoft_time_box >div >div:hover {
|
|
||||||
color: #000 !important;
|
|
||||||
background: #007fff !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
.xdsoft_datetimepicker.xdsoft_dark .xdsoft_calendar th {
|
|
||||||
color: #666;
|
|
||||||
}
|
|
||||||
|
|
||||||
.xdsoft_datetimepicker.xdsoft_dark .xdsoft_copyright { color: #333 !important }
|
|
||||||
.xdsoft_datetimepicker.xdsoft_dark .xdsoft_copyright a { color: #111 !important }
|
|
||||||
.xdsoft_datetimepicker.xdsoft_dark .xdsoft_copyright a:hover { color: #555 !important }
|
|
||||||
|
|
||||||
.xdsoft_dark .xdsoft_time_box {
|
|
||||||
border: 1px solid #333;
|
|
||||||
}
|
|
||||||
|
|
||||||
.xdsoft_dark .xdsoft_scrollbar >.xdsoft_scroller {
|
|
||||||
background: #333 !important;
|
|
||||||
}
|
|
||||||
.xdsoft_datetimepicker .xdsoft_save_selected {
|
|
||||||
display: block;
|
|
||||||
border: 1px solid #dddddd !important;
|
|
||||||
margin-top: 5px;
|
|
||||||
width: 100%;
|
|
||||||
color: #454551;
|
|
||||||
font-size: 13px;
|
|
||||||
}
|
|
||||||
.xdsoft_datetimepicker .blue-gradient-button {
|
|
||||||
font-family: "museo-sans", "Book Antiqua", sans-serif;
|
|
||||||
font-size: 12px;
|
|
||||||
font-weight: 300;
|
|
||||||
color: #82878c;
|
|
||||||
height: 28px;
|
|
||||||
position: relative;
|
|
||||||
padding: 4px 17px 4px 33px;
|
|
||||||
border: 1px solid #d7d8da;
|
|
||||||
background: -moz-linear-gradient(top, #fff 0%, #f4f8fa 73%);
|
|
||||||
/* FF3.6+ */
|
|
||||||
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #fff), color-stop(73%, #f4f8fa));
|
|
||||||
/* Chrome,Safari4+ */
|
|
||||||
background: -webkit-linear-gradient(top, #fff 0%, #f4f8fa 73%);
|
|
||||||
/* Chrome10+,Safari5.1+ */
|
|
||||||
background: -o-linear-gradient(top, #fff 0%, #f4f8fa 73%);
|
|
||||||
/* Opera 11.10+ */
|
|
||||||
background: -ms-linear-gradient(top, #fff 0%, #f4f8fa 73%);
|
|
||||||
/* IE10+ */
|
|
||||||
background: linear-gradient(to bottom, #fff 0%, #f4f8fa 73%);
|
|
||||||
/* W3C */
|
|
||||||
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#fff', endColorstr='#f4f8fa',GradientType=0 );
|
|
||||||
/* IE6-9 */
|
|
||||||
}
|
|
||||||
.xdsoft_datetimepicker .blue-gradient-button:hover, .xdsoft_datetimepicker .blue-gradient-button:focus, .xdsoft_datetimepicker .blue-gradient-button:hover span, .xdsoft_datetimepicker .blue-gradient-button:focus span {
|
|
||||||
color: #454551;
|
|
||||||
background: -moz-linear-gradient(top, #f4f8fa 0%, #FFF 73%);
|
|
||||||
/* FF3.6+ */
|
|
||||||
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #f4f8fa), color-stop(73%, #FFF));
|
|
||||||
/* Chrome,Safari4+ */
|
|
||||||
background: -webkit-linear-gradient(top, #f4f8fa 0%, #FFF 73%);
|
|
||||||
/* Chrome10+,Safari5.1+ */
|
|
||||||
background: -o-linear-gradient(top, #f4f8fa 0%, #FFF 73%);
|
|
||||||
/* Opera 11.10+ */
|
|
||||||
background: -ms-linear-gradient(top, #f4f8fa 0%, #FFF 73%);
|
|
||||||
/* IE10+ */
|
|
||||||
background: linear-gradient(to bottom, #f4f8fa 0%, #FFF 73%);
|
|
||||||
/* W3C */
|
|
||||||
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#f4f8fa', endColorstr='#FFF',GradientType=0 );
|
|
||||||
/* IE6-9 */
|
|
||||||
}
|
|
6
includes/js/dtp/jquery.js
vendored
@ -1,28 +0,0 @@
|
|||||||
{
|
|
||||||
"name": "jquery-datetimepicker",
|
|
||||||
"version": "2.4.0",
|
|
||||||
"description": "jQuery Plugin DateTimePicker it is DatePicker and TimePicker in one",
|
|
||||||
"main": "jquery.datetimepicker.js",
|
|
||||||
"scripts": {
|
|
||||||
"test": "echo \"Error: no test specified\" && exit 1"
|
|
||||||
},
|
|
||||||
"repository": {
|
|
||||||
"type": "git",
|
|
||||||
"url": "https://github.com/xdan/datetimepicker.git"
|
|
||||||
},
|
|
||||||
"keywords": [
|
|
||||||
"jquery-plugin",
|
|
||||||
"calendar",
|
|
||||||
"date",
|
|
||||||
"time",
|
|
||||||
"datetime",
|
|
||||||
"datepicker",
|
|
||||||
"timepicker"
|
|
||||||
],
|
|
||||||
"author": "Chupurnov <chupurnov@gmail.com> (http://xdsoft.net/)",
|
|
||||||
"license": "MIT",
|
|
||||||
"bugs": {
|
|
||||||
"url": "https://github.com/xdan/datetimepicker/issues"
|
|
||||||
},
|
|
||||||
"homepage": "https://github.com/xdan/datetimepicker"
|
|
||||||
}
|
|
Before Width: | Height: | Size: 9.5 KiB |
Before Width: | Height: | Size: 5.0 KiB |
Before Width: | Height: | Size: 4.3 KiB |
Before Width: | Height: | Size: 2.4 KiB |
@ -1,344 +0,0 @@
|
|||||||
/* Simple JavaScript Inheritance
|
|
||||||
* By John Resig http://ejohn.org/
|
|
||||||
* MIT Licensed.
|
|
||||||
*/
|
|
||||||
// Inspired by base2 and Prototype
|
|
||||||
(function(){
|
|
||||||
var initializing = false;
|
|
||||||
|
|
||||||
// The base JQClass implementation (does nothing)
|
|
||||||
window.JQClass = function(){};
|
|
||||||
|
|
||||||
// Collection of derived classes
|
|
||||||
JQClass.classes = {};
|
|
||||||
|
|
||||||
// Create a new JQClass that inherits from this class
|
|
||||||
JQClass.extend = function extender(prop) {
|
|
||||||
var base = this.prototype;
|
|
||||||
|
|
||||||
// Instantiate a base class (but only create the instance,
|
|
||||||
// don't run the init constructor)
|
|
||||||
initializing = true;
|
|
||||||
var prototype = new this();
|
|
||||||
initializing = false;
|
|
||||||
|
|
||||||
// Copy the properties over onto the new prototype
|
|
||||||
for (var name in prop) {
|
|
||||||
// Check if we're overwriting an existing function
|
|
||||||
prototype[name] = typeof prop[name] == 'function' &&
|
|
||||||
typeof base[name] == 'function' ?
|
|
||||||
(function(name, fn){
|
|
||||||
return function() {
|
|
||||||
var __super = this._super;
|
|
||||||
|
|
||||||
// Add a new ._super() method that is the same method
|
|
||||||
// but on the super-class
|
|
||||||
this._super = function(args) {
|
|
||||||
return base[name].apply(this, args || []);
|
|
||||||
};
|
|
||||||
|
|
||||||
var ret = fn.apply(this, arguments);
|
|
||||||
|
|
||||||
// The method only need to be bound temporarily, so we
|
|
||||||
// remove it when we're done executing
|
|
||||||
this._super = __super;
|
|
||||||
|
|
||||||
return ret;
|
|
||||||
};
|
|
||||||
})(name, prop[name]) :
|
|
||||||
prop[name];
|
|
||||||
}
|
|
||||||
|
|
||||||
// The dummy class constructor
|
|
||||||
function JQClass() {
|
|
||||||
// All construction is actually done in the init method
|
|
||||||
if (!initializing && this._init) {
|
|
||||||
this._init.apply(this, arguments);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Populate our constructed prototype object
|
|
||||||
JQClass.prototype = prototype;
|
|
||||||
|
|
||||||
// Enforce the constructor to be what we expect
|
|
||||||
JQClass.prototype.constructor = JQClass;
|
|
||||||
|
|
||||||
// And make this class extendable
|
|
||||||
JQClass.extend = extender;
|
|
||||||
|
|
||||||
return JQClass;
|
|
||||||
};
|
|
||||||
})();
|
|
||||||
|
|
||||||
(function($) { // Ensure $, encapsulate
|
|
||||||
|
|
||||||
/** Abstract base class for collection plugins v1.0.1.
|
|
||||||
Written by Keith Wood (kbwood{at}iinet.com.au) December 2013.
|
|
||||||
Licensed under the MIT (https://github.com/jquery/jquery/blob/master/MIT-LICENSE.txt) license.
|
|
||||||
@module $.JQPlugin
|
|
||||||
@abstract */
|
|
||||||
JQClass.classes.JQPlugin = JQClass.extend({
|
|
||||||
|
|
||||||
/** Name to identify this plugin.
|
|
||||||
@example name: 'tabs' */
|
|
||||||
name: 'plugin',
|
|
||||||
|
|
||||||
/** Default options for instances of this plugin (default: {}).
|
|
||||||
@example defaultOptions: {
|
|
||||||
selectedClass: 'selected',
|
|
||||||
triggers: 'click'
|
|
||||||
} */
|
|
||||||
defaultOptions: {},
|
|
||||||
|
|
||||||
/** Options dependent on the locale.
|
|
||||||
Indexed by language and (optional) country code, with '' denoting the default language (English/US).
|
|
||||||
@example regionalOptions: {
|
|
||||||
'': {
|
|
||||||
greeting: 'Hi'
|
|
||||||
}
|
|
||||||
} */
|
|
||||||
regionalOptions: {},
|
|
||||||
|
|
||||||
/** Names of getter methods - those that can't be chained (default: []).
|
|
||||||
@example _getters: ['activeTab'] */
|
|
||||||
_getters: [],
|
|
||||||
|
|
||||||
/** Retrieve a marker class for affected elements.
|
|
||||||
@private
|
|
||||||
@return {string} The marker class. */
|
|
||||||
_getMarker: function() {
|
|
||||||
return 'is-' + this.name;
|
|
||||||
},
|
|
||||||
|
|
||||||
/** Initialise the plugin.
|
|
||||||
Create the jQuery bridge - plugin name <code>xyz</code>
|
|
||||||
produces <code>$.xyz</code> and <code>$.fn.xyz</code>. */
|
|
||||||
_init: function() {
|
|
||||||
// Apply default localisations
|
|
||||||
$.extend(this.defaultOptions, (this.regionalOptions && this.regionalOptions['']) || {});
|
|
||||||
// Camel-case the name
|
|
||||||
var jqName = camelCase(this.name);
|
|
||||||
// Expose jQuery singleton manager
|
|
||||||
$[jqName] = this;
|
|
||||||
// Expose jQuery collection plugin
|
|
||||||
$.fn[jqName] = function(options) {
|
|
||||||
var otherArgs = Array.prototype.slice.call(arguments, 1);
|
|
||||||
if ($[jqName]._isNotChained(options, otherArgs)) {
|
|
||||||
return $[jqName][options].apply($[jqName], [this[0]].concat(otherArgs));
|
|
||||||
}
|
|
||||||
return this.each(function() {
|
|
||||||
if (typeof options === 'string') {
|
|
||||||
if (options[0] === '_' || !$[jqName][options]) {
|
|
||||||
throw 'Unknown method: ' + options;
|
|
||||||
}
|
|
||||||
$[jqName][options].apply($[jqName], [this].concat(otherArgs));
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
$[jqName]._attach(this, options);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
};
|
|
||||||
},
|
|
||||||
|
|
||||||
/** Set default values for all subsequent instances.
|
|
||||||
@param options {object} The new default options.
|
|
||||||
@example $.plugin.setDefauls({name: value}) */
|
|
||||||
setDefaults: function(options) {
|
|
||||||
$.extend(this.defaultOptions, options || {});
|
|
||||||
},
|
|
||||||
|
|
||||||
/** Determine whether a method is a getter and doesn't permit chaining.
|
|
||||||
@private
|
|
||||||
@param name {string} The method name.
|
|
||||||
@param otherArgs {any[]} Any other arguments for the method.
|
|
||||||
@return {boolean} True if this method is a getter, false otherwise. */
|
|
||||||
_isNotChained: function(name, otherArgs) {
|
|
||||||
if (name === 'option' && (otherArgs.length === 0 ||
|
|
||||||
(otherArgs.length === 1 && typeof otherArgs[0] === 'string'))) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
return $.inArray(name, this._getters) > -1;
|
|
||||||
},
|
|
||||||
|
|
||||||
/** Initialise an element. Called internally only.
|
|
||||||
Adds an instance object as data named for the plugin.
|
|
||||||
@param elem {Element} The element to enhance.
|
|
||||||
@param options {object} Overriding settings. */
|
|
||||||
_attach: function(elem, options) {
|
|
||||||
elem = $(elem);
|
|
||||||
if (elem.hasClass(this._getMarker())) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
elem.addClass(this._getMarker());
|
|
||||||
options = $.extend({}, this.defaultOptions, this._getMetadata(elem), options || {});
|
|
||||||
var inst = $.extend({name: this.name, elem: elem, options: options},
|
|
||||||
this._instSettings(elem, options));
|
|
||||||
elem.data(this.name, inst); // Save instance against element
|
|
||||||
this._postAttach(elem, inst);
|
|
||||||
this.option(elem, options);
|
|
||||||
},
|
|
||||||
|
|
||||||
/** Retrieve additional instance settings.
|
|
||||||
Override this in a sub-class to provide extra settings.
|
|
||||||
@param elem {jQuery} The current jQuery element.
|
|
||||||
@param options {object} The instance options.
|
|
||||||
@return {object} Any extra instance values.
|
|
||||||
@example _instSettings: function(elem, options) {
|
|
||||||
return {nav: elem.find(options.navSelector)};
|
|
||||||
} */
|
|
||||||
_instSettings: function(elem, options) {
|
|
||||||
return {};
|
|
||||||
},
|
|
||||||
|
|
||||||
/** Plugin specific post initialisation.
|
|
||||||
Override this in a sub-class to perform extra activities.
|
|
||||||
@param elem {jQuery} The current jQuery element.
|
|
||||||
@param inst {object} The instance settings.
|
|
||||||
@example _postAttach: function(elem, inst) {
|
|
||||||
elem.on('click.' + this.name, function() {
|
|
||||||
...
|
|
||||||
});
|
|
||||||
} */
|
|
||||||
_postAttach: function(elem, inst) {
|
|
||||||
},
|
|
||||||
|
|
||||||
/** Retrieve metadata configuration from the element.
|
|
||||||
Metadata is specified as an attribute:
|
|
||||||
<code>data-<plugin name>="<setting name>: '<value>', ..."</code>.
|
|
||||||
Dates should be specified as strings in this format: 'new Date(y, m-1, d)'.
|
|
||||||
@private
|
|
||||||
@param elem {jQuery} The source element.
|
|
||||||
@return {object} The inline configuration or {}. */
|
|
||||||
_getMetadata: function(elem) {
|
|
||||||
try {
|
|
||||||
var data = elem.data(this.name.toLowerCase()) || '';
|
|
||||||
data = data.replace(/'/g, '"');
|
|
||||||
data = data.replace(/([a-zA-Z0-9]+):/g, function(match, group, i) {
|
|
||||||
var count = data.substring(0, i).match(/"/g); // Handle embedded ':'
|
|
||||||
return (!count || count.length % 2 === 0 ? '"' + group + '":' : group + ':');
|
|
||||||
});
|
|
||||||
data = $.parseJSON('{' + data + '}');
|
|
||||||
for (var name in data) { // Convert dates
|
|
||||||
var value = data[name];
|
|
||||||
if (typeof value === 'string' && value.match(/^new Date\((.*)\)$/)) {
|
|
||||||
data[name] = eval(value);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return data;
|
|
||||||
}
|
|
||||||
catch (e) {
|
|
||||||
return {};
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
/** Retrieve the instance data for element.
|
|
||||||
@param elem {Element} The source element.
|
|
||||||
@return {object} The instance data or {}. */
|
|
||||||
_getInst: function(elem) {
|
|
||||||
return $(elem).data(this.name) || {};
|
|
||||||
},
|
|
||||||
|
|
||||||
/** Retrieve or reconfigure the settings for a plugin.
|
|
||||||
@param elem {Element} The source element.
|
|
||||||
@param name {object|string} The collection of new option values or the name of a single option.
|
|
||||||
@param [value] {any} The value for a single named option.
|
|
||||||
@return {any|object} If retrieving a single value or all options.
|
|
||||||
@example $(selector).plugin('option', 'name', value)
|
|
||||||
$(selector).plugin('option', {name: value, ...})
|
|
||||||
var value = $(selector).plugin('option', 'name')
|
|
||||||
var options = $(selector).plugin('option') */
|
|
||||||
option: function(elem, name, value) {
|
|
||||||
elem = $(elem);
|
|
||||||
var inst = elem.data(this.name);
|
|
||||||
if (!name || (typeof name === 'string' && value == null)) {
|
|
||||||
var options = (inst || {}).options;
|
|
||||||
return (options && name ? options[name] : options);
|
|
||||||
}
|
|
||||||
if (!elem.hasClass(this._getMarker())) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
var options = name || {};
|
|
||||||
if (typeof name === 'string') {
|
|
||||||
options = {};
|
|
||||||
options[name] = value;
|
|
||||||
}
|
|
||||||
this._optionsChanged(elem, inst, options);
|
|
||||||
$.extend(inst.options, options);
|
|
||||||
},
|
|
||||||
|
|
||||||
/** Plugin specific options processing.
|
|
||||||
Old value available in <code>inst.options[name]</code>, new value in <code>options[name]</code>.
|
|
||||||
Override this in a sub-class to perform extra activities.
|
|
||||||
@param elem {jQuery} The current jQuery element.
|
|
||||||
@param inst {object} The instance settings.
|
|
||||||
@param options {object} The new options.
|
|
||||||
@example _optionsChanged: function(elem, inst, options) {
|
|
||||||
if (options.name != inst.options.name) {
|
|
||||||
elem.removeClass(inst.options.name).addClass(options.name);
|
|
||||||
}
|
|
||||||
} */
|
|
||||||
_optionsChanged: function(elem, inst, options) {
|
|
||||||
},
|
|
||||||
|
|
||||||
/** Remove all trace of the plugin.
|
|
||||||
Override <code>_preDestroy</code> for plugin-specific processing.
|
|
||||||
@param elem {Element} The source element.
|
|
||||||
@example $(selector).plugin('destroy') */
|
|
||||||
destroy: function(elem) {
|
|
||||||
elem = $(elem);
|
|
||||||
if (!elem.hasClass(this._getMarker())) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
this._preDestroy(elem, this._getInst(elem));
|
|
||||||
elem.removeData(this.name).removeClass(this._getMarker());
|
|
||||||
},
|
|
||||||
|
|
||||||
/** Plugin specific pre destruction.
|
|
||||||
Override this in a sub-class to perform extra activities and undo everything that was
|
|
||||||
done in the <code>_postAttach</code> or <code>_optionsChanged</code> functions.
|
|
||||||
@param elem {jQuery} The current jQuery element.
|
|
||||||
@param inst {object} The instance settings.
|
|
||||||
@example _preDestroy: function(elem, inst) {
|
|
||||||
elem.off('.' + this.name);
|
|
||||||
} */
|
|
||||||
_preDestroy: function(elem, inst) {
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
/** Convert names from hyphenated to camel-case.
|
|
||||||
@private
|
|
||||||
@param value {string} The original hyphenated name.
|
|
||||||
@return {string} The camel-case version. */
|
|
||||||
function camelCase(name) {
|
|
||||||
return name.replace(/-([a-z])/g, function(match, group) {
|
|
||||||
return group.toUpperCase();
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
/** Expose the plugin base.
|
|
||||||
@namespace "$.JQPlugin" */
|
|
||||||
$.JQPlugin = {
|
|
||||||
|
|
||||||
/** Create a new collection plugin.
|
|
||||||
@memberof "$.JQPlugin"
|
|
||||||
@param [superClass='JQPlugin'] {string} The name of the parent class to inherit from.
|
|
||||||
@param overrides {object} The property/function overrides for the new class.
|
|
||||||
@example $.JQPlugin.createPlugin({
|
|
||||||
name: 'tabs',
|
|
||||||
defaultOptions: {selectedClass: 'selected'},
|
|
||||||
_initSettings: function(elem, options) { return {...}; },
|
|
||||||
_postAttach: function(elem, inst) { ... }
|
|
||||||
}); */
|
|
||||||
createPlugin: function(superClass, overrides) {
|
|
||||||
if (typeof superClass === 'object') {
|
|
||||||
overrides = superClass;
|
|
||||||
superClass = 'JQPlugin';
|
|
||||||
}
|
|
||||||
superClass = camelCase(superClass);
|
|
||||||
var className = camelCase(overrides.name);
|
|
||||||
JQClass.classes[className] = JQClass.classes[superClass].extend(overrides);
|
|
||||||
new JQClass.classes[className]();
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
})(jQuery);
|
|
4
includes/js/jquery.plugin.min.js
vendored
@ -1,4 +0,0 @@
|
|||||||
/** Abstract base class for collection plugins v1.0.1.
|
|
||||||
Written by Keith Wood (kbwood{at}iinet.com.au) December 2013.
|
|
||||||
Licensed under the MIT (https://github.com/jquery/jquery/blob/master/MIT-LICENSE.txt) license. */
|
|
||||||
(function(){var j=false;window.JQClass=function(){};JQClass.classes={};JQClass.extend=function extender(f){var g=this.prototype;j=true;var h=new this();j=false;for(var i in f){h[i]=typeof f[i]=='function'&&typeof g[i]=='function'?(function(d,e){return function(){var b=this._super;this._super=function(a){return g[d].apply(this,a||[])};var c=e.apply(this,arguments);this._super=b;return c}})(i,f[i]):f[i]}function JQClass(){if(!j&&this._init){this._init.apply(this,arguments)}}JQClass.prototype=h;JQClass.prototype.constructor=JQClass;JQClass.extend=extender;return JQClass}})();(function($){JQClass.classes.JQPlugin=JQClass.extend({name:'plugin',defaultOptions:{},regionalOptions:{},_getters:[],_getMarker:function(){return'is-'+this.name},_init:function(){$.extend(this.defaultOptions,(this.regionalOptions&&this.regionalOptions[''])||{});var c=camelCase(this.name);$[c]=this;$.fn[c]=function(a){var b=Array.prototype.slice.call(arguments,1);if($[c]._isNotChained(a,b)){return $[c][a].apply($[c],[this[0]].concat(b))}return this.each(function(){if(typeof a==='string'){if(a[0]==='_'||!$[c][a]){throw'Unknown method: '+a;}$[c][a].apply($[c],[this].concat(b))}else{$[c]._attach(this,a)}})}},setDefaults:function(a){$.extend(this.defaultOptions,a||{})},_isNotChained:function(a,b){if(a==='option'&&(b.length===0||(b.length===1&&typeof b[0]==='string'))){return true}return $.inArray(a,this._getters)>-1},_attach:function(a,b){a=$(a);if(a.hasClass(this._getMarker())){return}a.addClass(this._getMarker());b=$.extend({},this.defaultOptions,this._getMetadata(a),b||{});var c=$.extend({name:this.name,elem:a,options:b},this._instSettings(a,b));a.data(this.name,c);this._postAttach(a,c);this.option(a,b)},_instSettings:function(a,b){return{}},_postAttach:function(a,b){},_getMetadata:function(d){try{var f=d.data(this.name.toLowerCase())||'';f=f.replace(/'/g,'"');f=f.replace(/([a-zA-Z0-9]+):/g,function(a,b,i){var c=f.substring(0,i).match(/"/g);return(!c||c.length%2===0?'"'+b+'":':b+':')});f=$.parseJSON('{'+f+'}');for(var g in f){var h=f[g];if(typeof h==='string'&&h.match(/^new Date\((.*)\)$/)){f[g]=eval(h)}}return f}catch(e){return{}}},_getInst:function(a){return $(a).data(this.name)||{}},option:function(a,b,c){a=$(a);var d=a.data(this.name);if(!b||(typeof b==='string'&&c==null)){var e=(d||{}).options;return(e&&b?e[b]:e)}if(!a.hasClass(this._getMarker())){return}var e=b||{};if(typeof b==='string'){e={};e[b]=c}this._optionsChanged(a,d,e);$.extend(d.options,e)},_optionsChanged:function(a,b,c){},destroy:function(a){a=$(a);if(!a.hasClass(this._getMarker())){return}this._preDestroy(a,this._getInst(a));a.removeData(this.name).removeClass(this._getMarker())},_preDestroy:function(a,b){}});function camelCase(c){return c.replace(/-([a-z])/g,function(a,b){return b.toUpperCase()})}$.JQPlugin={createPlugin:function(a,b){if(typeof a==='object'){b=a;a='JQPlugin'}a=camelCase(a);var c=camelCase(b.name);JQClass.classes[c]=JQClass.classes[a].extend(b);new JQClass.classes[c]()}}})(jQuery);
|
|
6
includes/js/jquery.timeentry.min.js
vendored
@ -1,73 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
// Initialize session
|
|
||||||
// server should keep session data for AT LEAST 1 hour
|
|
||||||
ini_set('session.gc_maxlifetime', 28800);
|
|
||||||
|
|
||||||
// each client should remember their session id for EXACTLY 1 hour
|
|
||||||
session_set_cookie_params(3600);
|
|
||||||
|
|
||||||
session_start();
|
|
||||||
function authenticate($uname, $password) {
|
|
||||||
// Active Directory server
|
|
||||||
$ldap_host = "ldaps://auth.DOMAIN.com";
|
|
||||||
|
|
||||||
// Active Directory DN
|
|
||||||
$ldap_dn = "cn=users,dc=DOMAIN,dc=com";
|
|
||||||
|
|
||||||
// user group
|
|
||||||
$ldap_user_group = "users";
|
|
||||||
|
|
||||||
// Supervisor group
|
|
||||||
$ldap_super_group = "supervisors";
|
|
||||||
|
|
||||||
// Login, for purposes of constructing $user login
|
|
||||||
$login = "uid=$uname,cn=users,dc=DOMAIN,dc=com";
|
|
||||||
|
|
||||||
// connect to active directory
|
|
||||||
$ldap = ldap_connect($ldap_host);
|
|
||||||
|
|
||||||
// verify user and password
|
|
||||||
if($bind = @ldap_bind($ldap, $login, $password)) {
|
|
||||||
// valid
|
|
||||||
// check presence in groups
|
|
||||||
$filter = "(uid=" . $uname . ")";
|
|
||||||
|
|
||||||
// get list of groups $uname is a member of
|
|
||||||
$attr = array("memberOf");
|
|
||||||
$result = ldap_search($ldap, $ldap_dn, $filter, $attr) or exit("Unable to search LDAP server");
|
|
||||||
$groups = ldap_get_entries($ldap, $result);
|
|
||||||
|
|
||||||
// get use name from ldap
|
|
||||||
$name_attr = array("cn");
|
|
||||||
$name_result = ldap_search($ldap, $ldap_dn, $filter, $name_attr) or exit("Unable to search LDAP server");
|
|
||||||
$name = ldap_get_entries($ldap, $name_result);
|
|
||||||
|
|
||||||
// check groups
|
|
||||||
foreach($groups[0]['memberof'] as $grps) {
|
|
||||||
// is regular user
|
|
||||||
if (strpos($grps, $ldap_user_group)) $access = 1;
|
|
||||||
|
|
||||||
// is supervisor
|
|
||||||
if (strpos($grps, $ldap_super_group)) $access = 1;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($access != 0) {
|
|
||||||
// establish session variables for user, access level, photo and name
|
|
||||||
$_SESSION['uname'] = $uname;
|
|
||||||
$_SESSION['access'] = $access;
|
|
||||||
ldap_unbind($ldap);
|
|
||||||
return true;
|
|
||||||
} else {
|
|
||||||
// user has no rights
|
|
||||||
ldap_unbind($ldap);
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
} else {
|
|
||||||
// invalid name or password
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
?>
|
|
@ -1,15 +0,0 @@
|
|||||||
<html>
|
|
||||||
<head>
|
|
||||||
<link rel="stylesheet" type="text/css" href="css/menu.css">
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
<nav>
|
|
||||||
<ul>
|
|
||||||
<li><a href="index.php">Home</a></li>
|
|
||||||
<li><a href="addevent.php">Add an Event</a></li>
|
|
||||||
<li><a href="search.php">Search</a></li>
|
|
||||||
<li><a href="logout.php">Logout</a></li>
|
|
||||||
</ul>
|
|
||||||
</nav>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
@ -1,4 +0,0 @@
|
|||||||
<?php
|
|
||||||
include "classes/select.class.php";
|
|
||||||
echo $opt->ShowAlerts();
|
|
||||||
?>
|
|
@ -1,4 +0,0 @@
|
|||||||
<?php
|
|
||||||
include "classes/select.class.php";
|
|
||||||
echo $opt->ShowDCs();
|
|
||||||
?>
|
|
@ -1,4 +0,0 @@
|
|||||||
<?php
|
|
||||||
include "classes/select.class.php";
|
|
||||||
echo $opt->ShowUnits();
|
|
||||||
?>
|
|
@ -1,4 +0,0 @@
|
|||||||
<?php
|
|
||||||
include "classes/select.class.php";
|
|
||||||
echo $opt->ShowUnitType();
|
|
||||||
?>
|
|
@ -1,135 +0,0 @@
|
|||||||
<?php
|
|
||||||
include "db_config.php";
|
|
||||||
$conn = mysqli_connect($servername, $username, $password, $db);
|
|
||||||
|
|
||||||
//Allow Image Upload
|
|
||||||
$target_dir = "../images/";
|
|
||||||
if(empty($_FILES["fileToUpload"]["name"])) {
|
|
||||||
$target_file_name = "";
|
|
||||||
$target_file = "";
|
|
||||||
$image_link = "";
|
|
||||||
} else {
|
|
||||||
$target_file_name = preg_replace('/[^a-zA-Z0-9s.]/', '_', basename($_FILES["fileToUpload"]["name"]));
|
|
||||||
$target_file = $target_dir . $target_file_name;
|
|
||||||
$image_link = mysqli_real_escape_string($conn, "https://DOMAIN.com/bms/images/$target_file_name");
|
|
||||||
}
|
|
||||||
$uploadOk = 1;
|
|
||||||
$imageFileType = pathinfo($target_file,PATHINFO_EXTENSION);
|
|
||||||
// Check if image file is a actual image or fake image
|
|
||||||
if(isset($_POST["submit"])) {
|
|
||||||
$check = getimagesize($_FILES["fileToUpload"]["tmp_name"]);
|
|
||||||
if($check !== false) {
|
|
||||||
echo "File is an image - " . $check["mime"] . ".";
|
|
||||||
$uploadOk = 1;
|
|
||||||
} else {
|
|
||||||
echo "File is not an image.";
|
|
||||||
$uploadOk = 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
// Check if file already exists
|
|
||||||
if (file_exists($target_file)) {
|
|
||||||
echo "Sorry, file already exists.";
|
|
||||||
$uploadOk = 0;
|
|
||||||
}
|
|
||||||
// Check file size
|
|
||||||
if ($_FILES["fileToUpload"]["size"] > 500000) {
|
|
||||||
echo "Sorry, your file is too large.";
|
|
||||||
$uploadOk = 0;
|
|
||||||
}
|
|
||||||
// Allow certain file formats
|
|
||||||
if($imageFileType != "jpg" && $imageFileType != "png" && $imageFileType != "jpeg"
|
|
||||||
&& $imageFileType != "gif" ) {
|
|
||||||
echo "Sorry, only JPG, JPEG, PNG & GIF files are allowed.";
|
|
||||||
$uploadOk = 0;
|
|
||||||
}
|
|
||||||
// Check if $uploadOk is set to 0 by an error
|
|
||||||
if ($uploadOk == 0) {
|
|
||||||
echo "Sorry, your file was not uploaded.";
|
|
||||||
// if everything is ok, try to upload file
|
|
||||||
} else {
|
|
||||||
if (move_uploaded_file($_FILES["fileToUpload"]["tmp_name"], $target_file)) {
|
|
||||||
echo "The file ". basename( $_FILES["fileToUpload"]["name"]). " has been uploaded.";
|
|
||||||
} else {
|
|
||||||
echo "Sorry, there was an error uploading your file.";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
//Set Variables
|
|
||||||
$event_id = mysqli_real_escape_string($conn, $_POST['event']);
|
|
||||||
$description = mysqli_real_escape_string($conn, $_POST['description']);
|
|
||||||
$is_ongoing = mysqli_real_escape_string($conn, $_POST['is_ongoing']);
|
|
||||||
$end_date_time = mysqli_real_escape_string($conn, $_POST['end_date_time']);
|
|
||||||
$user = mysqli_real_escape_string($conn, $_POST['user']);
|
|
||||||
|
|
||||||
//Get timestamp
|
|
||||||
$timestamp = new DateTime();
|
|
||||||
$update_date_time = date_format($timestamp, 'Y/m/d H:i');
|
|
||||||
|
|
||||||
//Insert event update into event updates table
|
|
||||||
$update_query = "INSERT INTO event_updates (update_desc, update_date_time, update_is_ongoing, end_date_time, event_id, update_user, update_image) VALUES ('$description', '$update_date_time', '$is_ongoing', '$end_date_time', '$event_id', '$user', '$image_link')";
|
|
||||||
|
|
||||||
//Update value of is_ongoing in main events table
|
|
||||||
$is_ongoing_endtime_query = "UPDATE events SET is_ongoing='$is_ongoing', date_time_end='$end_date_time' WHERE event_id='$event_id'";
|
|
||||||
|
|
||||||
//Set variables for email
|
|
||||||
//MySQL queries to get Unit Name and Alert
|
|
||||||
$unitname_query = "SELECT unit_name FROM units AS units INNER JOIN events AS events ON events.unit_id=units.unit_id WHERE events.event_id=".$_POST['event']."";
|
|
||||||
$unitname_query_run = mysqli_query($conn, $unitname_query);
|
|
||||||
$unitname_array = mysqli_fetch_assoc($unitname_query_run);
|
|
||||||
$unitname = $unitname_array['unit_name'];
|
|
||||||
|
|
||||||
$alertname_query = "SELECT alert_name FROM alerts AS alerts INNER JOIN events AS events ON events.alert_id=alerts.alert_id WHERE events.event_id=".$_POST['event']."";
|
|
||||||
$alertname_query_run = mysqli_query($conn, $alertname_query);
|
|
||||||
$alertname_array = mysqli_fetch_assoc($alertname_query_run);
|
|
||||||
$alertname = $alertname_array['alert_name'];
|
|
||||||
|
|
||||||
$start_date_time_query = "SELECT date_time_start FROM events WHERE event_id=".$_POST['event']."";
|
|
||||||
$start_date_time_query_run = mysqli_query($conn, $start_date_time_query);
|
|
||||||
$start_date_time_array = mysqli_fetch_assoc($start_date_time_query_run);
|
|
||||||
$start_date_time = $start_date_time_array['date_time_start'];
|
|
||||||
|
|
||||||
$description_for_email = nl2br($_POST['description']);
|
|
||||||
//If successful, redirect back to index.php and send email, else tell user that it failed.
|
|
||||||
$event_update = mysqli_query($conn, $is_ongoing_endtime_query);
|
|
||||||
$result = mysqli_query($conn, $update_query);
|
|
||||||
if($result){
|
|
||||||
echo("Event added, redirecting...");
|
|
||||||
sleep (2);
|
|
||||||
header('Location: ../index.php');
|
|
||||||
//Set Email Info
|
|
||||||
$to = "TOEMAIL@DOMAIN.com";
|
|
||||||
$subject = "Updated BMS Alert: ".$unitname." ".$alertname."";
|
|
||||||
$headers = "MIME-Version: 1.0" . "\r\n";
|
|
||||||
$headers .= "Content-type:text/html;charset=UTF-8" . "\r\n";
|
|
||||||
$headers .= "From: FROMEMAIL@DOMAIN.com";
|
|
||||||
$message = "
|
|
||||||
<html>
|
|
||||||
<body>
|
|
||||||
BMS Unit: ".$unitname."
|
|
||||||
<br />
|
|
||||||
Type of Alert: ".$alertname."
|
|
||||||
<br />
|
|
||||||
Start Date / Time: ".$start_date_time."
|
|
||||||
<br />
|
|
||||||
End Date / Time: ".$end_date_time."
|
|
||||||
<br />
|
|
||||||
Description: ".$description_for_email."
|
|
||||||
<br />
|
|
||||||
Updated by: ".$user."
|
|
||||||
<br />
|
|
||||||
Image Link (if any): ".$image_link."
|
|
||||||
<br />
|
|
||||||
Event Link: https://DOMAIN.com/bms/viewevent.php?eventid=$event_id
|
|
||||||
<br /><br />
|
|
||||||
This message generated by https://DOMAIN.com/bms
|
|
||||||
</body>
|
|
||||||
</html>";
|
|
||||||
//WordWrap the message
|
|
||||||
$message_wrapped = wordwrap($message, 70, "\n", true);
|
|
||||||
//Send the email
|
|
||||||
mail($to,$subject,$message_wrapped,$headers);
|
|
||||||
} else{
|
|
||||||
echo('Error! Please <a href="javascript:history.back()">go back</a> and try again');
|
|
||||||
}
|
|
||||||
$conn->close();
|
|
||||||
?>
|
|
49
index.html
Normal file
@ -0,0 +1,49 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<meta charset='utf-8'>
|
||||||
|
<meta http-equiv="X-UA-Compatible" content="chrome=1">
|
||||||
|
<link href='https://fonts.googleapis.com/css?family=Chivo:900' rel='stylesheet' type='text/css'>
|
||||||
|
<link rel="stylesheet" type="text/css" href="stylesheets/stylesheet.css" media="screen">
|
||||||
|
<link rel="stylesheet" type="text/css" href="stylesheets/pygment_trac.css" media="screen">
|
||||||
|
<link rel="stylesheet" type="text/css" href="stylesheets/print.css" media="print">
|
||||||
|
<!--[if lt IE 9]>
|
||||||
|
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
|
||||||
|
<![endif]-->
|
||||||
|
<title>Bmspage by tfmm</title>
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
<div id="container">
|
||||||
|
<div class="inner">
|
||||||
|
|
||||||
|
<header>
|
||||||
|
<h1>Bmspage</h1>
|
||||||
|
<h2></h2>
|
||||||
|
</header>
|
||||||
|
|
||||||
|
<section id="downloads" class="clearfix">
|
||||||
|
<a href="https://github.com/tfmm/bmspage/zipball/master" id="download-zip" class="button"><span>Download .zip</span></a>
|
||||||
|
<a href="https://github.com/tfmm/bmspage/tarball/master" id="download-tar-gz" class="button"><span>Download .tar.gz</span></a>
|
||||||
|
<a href="https://github.com/tfmm/bmspage" id="view-on-github" class="button"><span>View on GitHub</span></a>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<hr>
|
||||||
|
|
||||||
|
<section id="main_content">
|
||||||
|
<h1>
|
||||||
|
<a id="recurring-events" class="anchor" href="#recurring-events" aria-hidden="true"><span class="octicon octicon-link"></span></a>Recurring Events</h1>
|
||||||
|
|
||||||
|
<p>This web interface was created to provide a place for 2 departments at my employer to have a page to monitor and communicate regarding recurring or ongoing events for our BMS (Building Maintenance Systems) Units. </p>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<footer>
|
||||||
|
Bmspage is maintained by <a href="https://github.com/tfmm">tfmm</a><br>
|
||||||
|
This page was generated by <a href="https://pages.github.com">GitHub Pages</a>. Tactile theme by <a href="https://twitter.com/jasonlong">Jason Long</a>.
|
||||||
|
</footer>
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</body>
|
||||||
|
</html>
|
172
index.php
@ -1,172 +0,0 @@
|
|||||||
<?php
|
|
||||||
//cleanup old sessions
|
|
||||||
gc_collect_cycles();
|
|
||||||
//start php session
|
|
||||||
session_start();
|
|
||||||
//if user not logged in, force to login.php
|
|
||||||
if( $_SESSION['access'] != 1 ) {
|
|
||||||
require( 'login.php' );
|
|
||||||
} else {
|
|
||||||
?>
|
|
||||||
<html>
|
|
||||||
<head>
|
|
||||||
<link rel="stylesheet" type="text/css" href="css/style.css">
|
|
||||||
<link rel="shortcut icon" href="favicon.ico" />
|
|
||||||
<title>BMS Events</title>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
<div class=header>
|
|
||||||
<h1>BMS Events</h1>
|
|
||||||
<?php
|
|
||||||
if(isset($_SESSION['uname'])) {
|
|
||||||
echo "Hello, ";
|
|
||||||
print_r($_SESSION['uname']);
|
|
||||||
}
|
|
||||||
include("includes/menu.php"); ?>
|
|
||||||
</div>
|
|
||||||
<div class=content>
|
|
||||||
<h3>Current Ongoing Events</h3>
|
|
||||||
<?php include "includes/db_config.php";
|
|
||||||
$conn1 = new mysqli($servername, $username, $password, $db);
|
|
||||||
if ($conn1->connect_error) {
|
|
||||||
die("Connection Failed: " . $conn1->connect_error);
|
|
||||||
}
|
|
||||||
$currently_ongoing_query = "SELECT * FROM events AS events INNER JOIN units AS units ON events.unit_id=units.unit_id INNER JOIN alerts as alerts ON events.alert_id=alerts.alert_id where is_ongoing=1;";
|
|
||||||
$currently_ongoing_result = $conn1->query($currently_ongoing_query);
|
|
||||||
if ($currently_ongoing_result->num_rows >0){
|
|
||||||
echo "<table align='center'><tr><th>Event ID</th><th>Unit</th><th>Alert</th><th>Start Date and Time</th><th>Description</th><th>End Date and Time</th><th>User</th><th>Updates</th><th>Attachments</th><th>Edit</th></tr>";
|
|
||||||
while ($currently_ongoing_row = $currently_ongoing_result->fetch_assoc()) {
|
|
||||||
echo "<tr><td>";
|
|
||||||
echo "<a href=viewevent.php?eventid=".$currently_ongoing_row["event_id"]." target=_blank>".$currently_ongoing_row["event_id"]."</a>";
|
|
||||||
echo "</td><td>";
|
|
||||||
print_r($currently_ongoing_row["unit_name"]);
|
|
||||||
echo "</td><td>";
|
|
||||||
print_r($currently_ongoing_row["alert_name"]);
|
|
||||||
echo "</td><td>";
|
|
||||||
print_r($currently_ongoing_row["date_time_start"]);
|
|
||||||
echo "</td><td>";
|
|
||||||
echo nl2br($currently_ongoing_row["description"]);
|
|
||||||
echo "</td><td>";
|
|
||||||
print_r($currently_ongoing_row["date_time_end"]);
|
|
||||||
echo "</td><td>";
|
|
||||||
print_r($currently_ongoing_row["user"]);
|
|
||||||
echo "</td><td>";
|
|
||||||
$update_query = "SELECT update_desc, update_date_time, update_user, update_image FROM event_updates WHERE event_updates.event_id=".$currently_ongoing_row["event_id"].";";
|
|
||||||
$update_result = $conn1->query($update_query);
|
|
||||||
if ($update_result->num_rows >0){
|
|
||||||
while ($update_row = $update_result->fetch_assoc()) {
|
|
||||||
echo "<table align='center'><tr><td>";
|
|
||||||
echo "Info: ";
|
|
||||||
echo "</td><td>";
|
|
||||||
echo nl2br($update_row['update_desc']);
|
|
||||||
echo "</td></tr><tr><td>";
|
|
||||||
echo "User: ";
|
|
||||||
echo "</td><td>";
|
|
||||||
print_r($update_row['update_user']);
|
|
||||||
echo "</td></tr><tr><td>";
|
|
||||||
echo "Time: ";
|
|
||||||
echo "</td><td>";
|
|
||||||
print_r($update_row['update_date_time']);
|
|
||||||
echo "</td></tr>";
|
|
||||||
if(empty($update_row['update_image'])) {
|
|
||||||
echo "</table>";
|
|
||||||
} else {
|
|
||||||
echo "<tr><td>";
|
|
||||||
echo "Image: ";
|
|
||||||
echo "</td><td>";
|
|
||||||
echo "<a href=".$update_row['update_image']." target=blank>Attachment</a>";
|
|
||||||
echo "</td></tr></table>";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
echo "No updates to this event";
|
|
||||||
}
|
|
||||||
|
|
||||||
echo "</td><td>";
|
|
||||||
if(empty($currently_ongoing_row["event_image"])) {
|
|
||||||
echo "";
|
|
||||||
} else{
|
|
||||||
echo "<a href=".$currently_ongoing_row["event_image"]." target=blank>Attachment</a>";
|
|
||||||
}
|
|
||||||
echo "</td><td>";
|
|
||||||
echo "<a href=editevent.php?event_id=".$currently_ongoing_row["event_id"]." target=blank>Edit</a></td></tr> ";
|
|
||||||
}
|
|
||||||
echo "</table>";
|
|
||||||
} else {
|
|
||||||
echo "<h5>No Ongoing Events at This Time</h5>";
|
|
||||||
}
|
|
||||||
if ($conn1->connect_error) {
|
|
||||||
die("Connection Failed: " . $conn1->connect_error);
|
|
||||||
}
|
|
||||||
$past_event_query = "SELECT * FROM events AS events INNER JOIN units AS units ON events.unit_id=units.unit_id INNER JOIN alerts as alerts ON events.alert_id=alerts.alert_id where is_ongoing=0 ORDER BY date_time_end DESC LIMIT 10;";
|
|
||||||
$past_event_result = $conn1->query($past_event_query);
|
|
||||||
if ($past_event_result->num_rows >0){
|
|
||||||
echo "<h3>Previous 10 Events</h3>";
|
|
||||||
echo "This does not include ongoing events.";
|
|
||||||
echo "<table align='center'><tr><th>Event ID</th><th>Unit</th><th>Alert</th><th>Start Date and Time</th><th>Description</th><th>End Date and Time</th><th>User</th><th>Updates</th><th>Attachments</th><th>Edit</th></tr>";
|
|
||||||
while ($past_event_row = $past_event_result->fetch_assoc()) {
|
|
||||||
echo "<tr><td>";
|
|
||||||
echo "<a href=viewevent.php?eventid=".$past_event_row["event_id"]." target=_blank>".$past_event_row["event_id"]."</a>";
|
|
||||||
echo "</td><td>";
|
|
||||||
print_r($past_event_row["unit_name"]);
|
|
||||||
echo "</td><td>";
|
|
||||||
print_r($past_event_row["alert_name"]);
|
|
||||||
echo "</td><td>";
|
|
||||||
print_r($past_event_row["date_time_start"]);
|
|
||||||
echo "</td><td>";
|
|
||||||
echo nl2br($past_event_row["description"]);
|
|
||||||
echo "</td><td>";
|
|
||||||
print_r($past_event_row["date_time_end"]);
|
|
||||||
echo "</td><td>";
|
|
||||||
print_r($past_event_row["user"]);
|
|
||||||
echo "</td><td>";
|
|
||||||
$update_query = "SELECT update_desc, update_date_time, update_user, update_image FROM event_updates WHERE event_updates.event_id=".$past_event_row["event_id"].";";
|
|
||||||
$update_result = $conn1->query($update_query);
|
|
||||||
if ($update_result->num_rows >0){
|
|
||||||
while ($update_row = $update_result->fetch_assoc()) {
|
|
||||||
echo "<table align='center'><tr><td>";
|
|
||||||
echo "Info: ";
|
|
||||||
echo "</td><td>";
|
|
||||||
echo nl2br($update_row['update_desc']);
|
|
||||||
echo "</td></tr><tr><td>";
|
|
||||||
echo "User: ";
|
|
||||||
echo "</td><td>";
|
|
||||||
print_r($update_row['update_user']);
|
|
||||||
echo "</td></tr><tr><td>";
|
|
||||||
echo "Time: ";
|
|
||||||
echo "</td><td>";
|
|
||||||
print_r($update_row['update_date_time']);
|
|
||||||
echo "</td></tr>";
|
|
||||||
if(empty($update_row['update_image'])) {
|
|
||||||
echo "</table>";
|
|
||||||
} else {
|
|
||||||
echo "<tr><td>";
|
|
||||||
echo "Image: ";
|
|
||||||
echo "</td><td>";
|
|
||||||
echo "<a href=".$update_row['update_image']." target=blank>Attachment</a>";
|
|
||||||
echo "</td></tr></table>";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
echo "No updates to this event";
|
|
||||||
}
|
|
||||||
echo "</td><td>";
|
|
||||||
if(empty($past_event_row["event_image"])) {
|
|
||||||
echo "";
|
|
||||||
} else {
|
|
||||||
echo "<a href=".$past_event_row["event_image"]." target=blank>Attachment</a>";
|
|
||||||
}
|
|
||||||
echo "</td><td>";
|
|
||||||
echo "<a href=editevent.php?event_id=".$past_event_row["event_id"]." target=blank>Edit</a>";
|
|
||||||
echo "</td></tr>";
|
|
||||||
}
|
|
||||||
echo "</table>";
|
|
||||||
} else {
|
|
||||||
echo "<h3>Previous 10 Events</h3>";
|
|
||||||
echo "<h5>No Previous Events</h5>";
|
|
||||||
}
|
|
||||||
$conn1->close();
|
|
||||||
?>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
<?php } ?>
|
|
1
javascripts/main.js
Normal file
@ -0,0 +1 @@
|
|||||||
|
console.log('This would be the main JS file.');
|
79
login.php
@ -1,79 +0,0 @@
|
|||||||
<?php
|
|
||||||
include("includes/login-post.php");
|
|
||||||
|
|
||||||
// check to see if user is logging out
|
|
||||||
if(isset($_GET['out'])) {
|
|
||||||
// destroy session
|
|
||||||
session_unset();
|
|
||||||
$_SESSION = array();
|
|
||||||
unset($_SESSION['uname'],$_SESSION['access']);
|
|
||||||
session_destroy();
|
|
||||||
}
|
|
||||||
|
|
||||||
// check to see if login form has been submitted
|
|
||||||
if(isset($_POST['userLogin'])){
|
|
||||||
// run information through authenticator
|
|
||||||
if(authenticate($_POST['userLogin'],$_POST['userPassword']))
|
|
||||||
{
|
|
||||||
// authentication passed
|
|
||||||
header("Location: index.php");
|
|
||||||
die();
|
|
||||||
} else {
|
|
||||||
// authentication failed
|
|
||||||
$error = 1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// output error to user
|
|
||||||
if (isset($error)) echo "Login failed: Incorrect user name, password, or rights<br /-->";
|
|
||||||
|
|
||||||
// output logout success
|
|
||||||
if (isset($_GET['out'])) echo "Logout successful";
|
|
||||||
?>
|
|
||||||
<html>
|
|
||||||
<head>
|
|
||||||
<link rel="stylesheet" type="text/css" href="css/style.css">
|
|
||||||
<link rel="shortcut icon" href="favicon.ico" />
|
|
||||||
<title>BMS Event Login</title>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
<div class=header>
|
|
||||||
<h1>BMS Events</h1>
|
|
||||||
<?php include("includes/menu.php"); ?>
|
|
||||||
</div>
|
|
||||||
<div class=content>
|
|
||||||
<h2>Please Login with LDAP</h2>
|
|
||||||
<form action="login.php" method="post">
|
|
||||||
<table align='center'>
|
|
||||||
<tr>
|
|
||||||
<th colspan='2'>
|
|
||||||
Please Login with LDAP
|
|
||||||
</th>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
Username:
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<input type="text" name="userLogin" />
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
Password:
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<input type="password" name="userPassword" />
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td colspan='2'>
|
|
||||||
<input type="submit" name="submit" value="Login" />
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
</form>
|
|
||||||
You will be returned to the main BMS status page after login.
|
|
||||||
</div>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
@ -1,7 +0,0 @@
|
|||||||
<?php
|
|
||||||
session_start();
|
|
||||||
if(session_destroy()) // Destroying All Sessions
|
|
||||||
{
|
|
||||||
header("Location: index.php"); // Redirecting To Home Page
|
|
||||||
}
|
|
||||||
?>
|
|
1
params.json
Normal file
@ -0,0 +1 @@
|
|||||||
|
{"name":"Bmspage","tagline":"","body":"# Recurring Events\r\n\r\nThis web interface was created to provide a place for 2 departments at my employer to have a page to monitor and communicate regarding recurring or ongoing events for our BMS (Building Maintenance Systems) Units. ","google":"","note":"Don't delete this file! It's used internally to help with page regeneration."}
|
160
search.php
@ -1,160 +0,0 @@
|
|||||||
<?php
|
|
||||||
//start php session
|
|
||||||
session_start();
|
|
||||||
//if user not logged in, force to login.php
|
|
||||||
if( $_SESSION['access'] != 1 ) {
|
|
||||||
require( 'login.php' );
|
|
||||||
} else {
|
|
||||||
|
|
||||||
?>
|
|
||||||
<html>
|
|
||||||
<head>
|
|
||||||
<link rel="stylesheet" type="text/css" href="css/sestyle.css">
|
|
||||||
<link rel="shortcut icon" href="favicon.ico" />
|
|
||||||
<script type="text/javascript" src="includes/jquery-2.1.3.min.js"></script>
|
|
||||||
<link rel="stylesheet" href="//code.jquery.com/ui/1.11.4/themes/smoothness/jquery-ui.css">
|
|
||||||
<link rel="stylesheet" type="text/css" href="includes/js/dtp/jquery.datetimepicker.css"/ >
|
|
||||||
<script src="includes/js/dtp/jquery.js"></script>
|
|
||||||
<script src="includes/js/dtp/jquery.datetimepicker.js"></script>
|
|
||||||
<title>BMS Event Search</title>
|
|
||||||
<script>
|
|
||||||
$(function() {
|
|
||||||
$('#start_date_time').datetimepicker({timepicker:false, format: 'Y/m/d'});
|
|
||||||
$('#end_date_time').datetimepicker({timepicker:false, format: 'Y/m/d'});
|
|
||||||
});
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<script type="text/javascript">
|
|
||||||
$(document).ready(function(){
|
|
||||||
var queryString = $('select_form').serialize();
|
|
||||||
$("select#utype").prop("disabled", true);
|
|
||||||
$("select#unit").prop("disabled", true);
|
|
||||||
$("select#alert").prop("disabled", true);
|
|
||||||
$("select#datacenter").change(function(){
|
|
||||||
$("select#utype").prop("disabled", true);
|
|
||||||
/*$("select#utype").html("<option>wait...</option>");*/
|
|
||||||
var dc_id = $("select#datacenter option:selected").val();
|
|
||||||
$.post("includes/select_utype.php", function(data){
|
|
||||||
$("select#utype").prop("disabled", false);
|
|
||||||
$("select#utype").html(data);
|
|
||||||
});
|
|
||||||
});
|
|
||||||
$("select#utype").change(function(){
|
|
||||||
$("select#unit").prop("disabled", true);
|
|
||||||
/*$("select#unit").html("<option>wait...</option>");*/
|
|
||||||
var utype_id = $("select#utype option:selected").val();
|
|
||||||
$.post("includes/select_unit.php", {utype_id:utype_id, dc_id:$('#datacenter').val()}, function(data){
|
|
||||||
$("select#unit").prop("disabled", false);
|
|
||||||
$("select#unit").html(data);
|
|
||||||
});
|
|
||||||
});
|
|
||||||
// $("select#unit").change(function(){
|
|
||||||
// $("select#alert").prop("disabled", true);
|
|
||||||
// var unit_id = $("select#unit option:selected").val();
|
|
||||||
// $.post("includes/select_alert.php", {utype_id:$('#utype').val()}, function(data){
|
|
||||||
// $("select#alert").prop("disabled", false);
|
|
||||||
// $("select#alert").html(data);
|
|
||||||
// });
|
|
||||||
// });
|
|
||||||
$("form#select_form").submit(function(){
|
|
||||||
var dc = $("select#datacenter option:selected").val();
|
|
||||||
var utype = $("select#utype option:selected").val();
|
|
||||||
if(cat>0 && type>0)
|
|
||||||
{
|
|
||||||
var result = $("select#utype option:selected").html();
|
|
||||||
$("#result").html('your choice: '+result);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
$("#result").html("you must choose a DC and Unit Type!");
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
var unit = $("select#unit option:selected").val();
|
|
||||||
if(cat>0 && type>0)
|
|
||||||
{
|
|
||||||
var result = $("select#unit option:selected").html();
|
|
||||||
$("#result").html('your choice: '+result);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
$("#result").html("you must choose a DC, Unit Type, Alert, and Unit!");
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
});
|
|
||||||
});
|
|
||||||
</script>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
<div class=header>
|
|
||||||
<h1>BMS Events</h1>
|
|
||||||
<?php
|
|
||||||
if(isset($_SESSION['uname'])) {
|
|
||||||
echo "Hello, ";
|
|
||||||
print_r($_SESSION['uname']);
|
|
||||||
}
|
|
||||||
echo "<h2>Search</h2>";
|
|
||||||
include("includes/menu.php"); ?>
|
|
||||||
</div>
|
|
||||||
<?php include "includes/classes/select.class.php";?>
|
|
||||||
<br />
|
|
||||||
<form id="select_form" required method="post" action="search_results.php">
|
|
||||||
<table align="center">
|
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
Choose a DC:
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<select name="datacenter" id="datacenter">
|
|
||||||
<?php echo $opt->ShowDCs(); ?>
|
|
||||||
</select>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
Choose a Unit Type:
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<select name="utype" id="utype" >
|
|
||||||
<?php echo $opt->ShowUnitType(); ?>
|
|
||||||
</select>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
Choose a unit:
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<select name="unit" id="unit" >
|
|
||||||
<?php echo $opt->ShowUnits(); ?>
|
|
||||||
</select>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
Event Start Date:
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<input type="text" name="start_date_time" id="start_date_time" />
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
Event End Date:
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<input type="text" name="end_date_time" id="end_date_time" />
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td colspan="2" class="ui-helper-center">
|
|
||||||
<input type="submit" value="Search" />
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
</form>
|
|
||||||
Search by Unit, start date, or end date of the event. The form will accept any or all of these three options.
|
|
||||||
<br />
|
|
||||||
When entering start or end date, enter any portion of the value, and the search should return relevant data.
|
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
<?php } ?>
|
|
@ -1,126 +0,0 @@
|
|||||||
<?php
|
|
||||||
//start php session
|
|
||||||
session_start();
|
|
||||||
//if user not logged in, force to login.php
|
|
||||||
if( $_SESSION['access'] != 1 ) {
|
|
||||||
require( 'login.php' );
|
|
||||||
} else {
|
|
||||||
include "includes/db_config.php";
|
|
||||||
$conn = mysqli_connect($servername, $username, $password, $db);
|
|
||||||
|
|
||||||
$unit = mysqli_real_escape_string($conn, $_POST['unit']);
|
|
||||||
$start_date_time = mysqli_real_escape_string($conn, $_POST['start_date_time']);
|
|
||||||
$end_date_time = mysqli_real_escape_string($conn, $_POST['end_date_time']);
|
|
||||||
|
|
||||||
|
|
||||||
if(!empty($unit)) {
|
|
||||||
if(!empty($start_date_time)) {
|
|
||||||
if(!empty($end_date_time)) {
|
|
||||||
$query = "SELECT * FROM events AS events INNER JOIN units AS units ON events.unit_id=units.unit_id INNER JOIN alerts as alerts ON events.alert_id=alerts.alert_id WHERE events.unit_id='$unit' AND date_time_start LIKE '%$start_date_time%' AND date_time_end LIKE '%$end_date_time%'";
|
|
||||||
} else {
|
|
||||||
$query = "SELECT * FROM events AS events INNER JOIN units AS units ON events.unit_id=units.unit_id INNER JOIN alerts as alerts ON events.alert_id=alerts.alert_id WHERE events.unit_id='$unit' AND date_time_start LIKE '%$start_date_time%'";
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
$query = "SELECT * FROM events AS events INNER JOIN units AS units ON events.unit_id=units.unit_id INNER JOIN alerts as alerts ON events.alert_id=alerts.alert_id WHERE events.unit_id='$unit'";
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
if(!empty($start_date_time)) {
|
|
||||||
if(!empty($end_date_time)) {
|
|
||||||
$query = "SELECT * FROM events AS events INNER JOIN units AS units ON events.unit_id=units.unit_id INNER JOIN alerts as alerts ON events.alert_id=alerts.alert_id WHERE date_time_start LIKE '%$start_date_time%' AND date_time_end LIKE '%$end_date_time%'";
|
|
||||||
} else {
|
|
||||||
$query = "SELECT * FROM events AS events INNER JOIN units AS units ON events.unit_id=units.unit_id INNER JOIN alerts as alerts ON events.alert_id=alerts.alert_id WHERE date_time_start LIKE '%$start_date_time%'";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
$result = $conn->query($query);
|
|
||||||
if($result->num_rows >0){
|
|
||||||
?>
|
|
||||||
<html>
|
|
||||||
<head>
|
|
||||||
<link rel="stylesheet" type="text/css" href="css/style.css">
|
|
||||||
<link rel="shortcut icon" href="favicon.ico" />
|
|
||||||
<title>BMS Event Search Results</title>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
<div class=header>
|
|
||||||
<h1>BMS Events</h1>
|
|
||||||
<?php
|
|
||||||
if(isset($_SESSION['uname'])) {
|
|
||||||
echo "Hello, ";
|
|
||||||
print_r($_SESSION['uname']);
|
|
||||||
}
|
|
||||||
echo "<h2>Search Results</h2>";
|
|
||||||
include("includes/menu.php"); ?>
|
|
||||||
</div>
|
|
||||||
<div class=content>
|
|
||||||
<br />
|
|
||||||
<?php
|
|
||||||
if ($result->num_rows >0){
|
|
||||||
echo "<table align='center'><tr><th>Event ID</th><th>Unit</th><th>Alert</th><th>Start Date and Time</th><th>Description</th><th>End Date and Time</th><th>User</th><th>Updates</th><th>Attachments</th><th>Edit</th></tr>";
|
|
||||||
while ($row1 = $result->fetch_assoc()) {
|
|
||||||
echo "<tr><td>";
|
|
||||||
echo "<a href=viewevent.php?eventid=".$row1["event_id"]." target=_blank>".$row1["event_id"]."</a>";
|
|
||||||
echo "</td><td>";
|
|
||||||
print_r($row1["unit_name"]);
|
|
||||||
echo "</td><td>";
|
|
||||||
print_r($row1["alert_name"]);
|
|
||||||
echo "</td><td>";
|
|
||||||
print_r($row1["date_time_start"]);
|
|
||||||
echo "</td><td>";
|
|
||||||
echo nl2br($row1["description"]);
|
|
||||||
echo "</td><td>";
|
|
||||||
print_r($row1["date_time_end"]);
|
|
||||||
echo "</td><td>";
|
|
||||||
print_r($row1["user"]);
|
|
||||||
echo "</td><td>";
|
|
||||||
$update_query = "SELECT update_desc, update_date_time, update_user, update_image FROM event_updates WHERE event_updates.event_id=".$row1["event_id"].";";
|
|
||||||
$update_result = $conn->query($update_query);
|
|
||||||
if ($update_result->num_rows >0){
|
|
||||||
while ($update_row = $update_result->fetch_assoc()) {
|
|
||||||
echo "<table align='center'><tr><td>";
|
|
||||||
echo "Info: ";
|
|
||||||
echo "</td><td>";
|
|
||||||
echo nl2br($update_row['update_desc']);
|
|
||||||
echo "</td></tr><tr><td>";
|
|
||||||
echo "User: ";
|
|
||||||
echo "</td><td>";
|
|
||||||
print_r($update_row['update_user']);
|
|
||||||
echo "</td></tr><tr><td>";
|
|
||||||
echo "Time: ";
|
|
||||||
echo "</td><td>";
|
|
||||||
print_r($update_row['update_date_time']);
|
|
||||||
echo "</td></tr>";
|
|
||||||
if(empty($update_row['update_image'])) {
|
|
||||||
echo "</table>";
|
|
||||||
} else {
|
|
||||||
echo "<tr><td>";
|
|
||||||
echo "Image: ";
|
|
||||||
echo "</td><td>";
|
|
||||||
echo "<a href=".$update_row['update_image']." target=blank>Attachment</a>";
|
|
||||||
echo "</td></tr></table>";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
echo "No updates to this event";
|
|
||||||
}
|
|
||||||
echo "</td><td>";
|
|
||||||
if(empty($row1["event_image"])) {
|
|
||||||
echo "";
|
|
||||||
} else {
|
|
||||||
echo "<a href=".$row1["event_image"]." target=blank>Attachment</a>";
|
|
||||||
}
|
|
||||||
echo "</td><td>";
|
|
||||||
echo "<a href=editevent.php?event_id=".$row1["event_id"]." target=blank>Edit</a>";
|
|
||||||
echo "</td></tr>";
|
|
||||||
}
|
|
||||||
echo "</table>";
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
} else{
|
|
||||||
echo('No Results Found! Please <a href="javascript:history.back()">Go back</a> and try again');
|
|
||||||
}
|
|
||||||
?>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
<?php } ?>
|
|
228
stylesheets/print.css
Normal file
@ -0,0 +1,228 @@
|
|||||||
|
html, body, div, span, applet, object, iframe,
|
||||||
|
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
|
||||||
|
a, abbr, acronym, address, big, cite, code,
|
||||||
|
del, dfn, em, img, ins, kbd, q, s, samp,
|
||||||
|
small, strike, strong, sub, sup, tt, var,
|
||||||
|
b, u, i, center,
|
||||||
|
dl, dt, dd, ol, ul, li,
|
||||||
|
fieldset, form, label, legend,
|
||||||
|
table, caption, tbody, tfoot, thead, tr, th, td,
|
||||||
|
article, aside, canvas, details, embed,
|
||||||
|
figure, figcaption, footer, header, hgroup,
|
||||||
|
menu, nav, output, ruby, section, summary,
|
||||||
|
time, mark, audio, video {
|
||||||
|
padding: 0;
|
||||||
|
margin: 0;
|
||||||
|
font: inherit;
|
||||||
|
font-size: 100%;
|
||||||
|
vertical-align: baseline;
|
||||||
|
border: 0;
|
||||||
|
}
|
||||||
|
/* HTML5 display-role reset for older browsers */
|
||||||
|
article, aside, details, figcaption, figure,
|
||||||
|
footer, header, hgroup, menu, nav, section {
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
body {
|
||||||
|
line-height: 1;
|
||||||
|
}
|
||||||
|
ol, ul {
|
||||||
|
list-style: none;
|
||||||
|
}
|
||||||
|
blockquote, q {
|
||||||
|
quotes: none;
|
||||||
|
}
|
||||||
|
blockquote:before, blockquote:after,
|
||||||
|
q:before, q:after {
|
||||||
|
content: '';
|
||||||
|
content: none;
|
||||||
|
}
|
||||||
|
table {
|
||||||
|
border-spacing: 0;
|
||||||
|
border-collapse: collapse;
|
||||||
|
}
|
||||||
|
body {
|
||||||
|
font-family: 'Helvetica Neue', Helvetica, Arial, serif;
|
||||||
|
font-size: 13px;
|
||||||
|
line-height: 1.5;
|
||||||
|
color: #000;
|
||||||
|
}
|
||||||
|
|
||||||
|
a {
|
||||||
|
font-weight: bold;
|
||||||
|
color: #d5000d;
|
||||||
|
}
|
||||||
|
|
||||||
|
header {
|
||||||
|
padding-top: 35px;
|
||||||
|
padding-bottom: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
header h1 {
|
||||||
|
font-size: 48px;
|
||||||
|
font-weight: bold;
|
||||||
|
line-height: 1.2;
|
||||||
|
color: #303030;
|
||||||
|
letter-spacing: -1px;
|
||||||
|
}
|
||||||
|
|
||||||
|
header h2 {
|
||||||
|
font-size: 24px;
|
||||||
|
font-weight: normal;
|
||||||
|
line-height: 1.3;
|
||||||
|
color: #aaa;
|
||||||
|
letter-spacing: -1px;
|
||||||
|
}
|
||||||
|
#downloads {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
#main_content {
|
||||||
|
padding-top: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
code, pre {
|
||||||
|
margin-bottom: 30px;
|
||||||
|
font-family: Monaco, "Bitstream Vera Sans Mono", "Lucida Console", Terminal;
|
||||||
|
font-size: 12px;
|
||||||
|
color: #222;
|
||||||
|
}
|
||||||
|
|
||||||
|
code {
|
||||||
|
padding: 0 3px;
|
||||||
|
}
|
||||||
|
|
||||||
|
pre {
|
||||||
|
padding: 20px;
|
||||||
|
overflow: auto;
|
||||||
|
border: solid 1px #ddd;
|
||||||
|
}
|
||||||
|
pre code {
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
ul, ol, dl {
|
||||||
|
margin-bottom: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* COMMON STYLES */
|
||||||
|
|
||||||
|
table {
|
||||||
|
width: 100%;
|
||||||
|
border: 1px solid #ebebeb;
|
||||||
|
}
|
||||||
|
|
||||||
|
th {
|
||||||
|
font-weight: 500;
|
||||||
|
}
|
||||||
|
|
||||||
|
td {
|
||||||
|
font-weight: 300;
|
||||||
|
text-align: center;
|
||||||
|
border: 1px solid #ebebeb;
|
||||||
|
}
|
||||||
|
|
||||||
|
form {
|
||||||
|
padding: 20px;
|
||||||
|
background: #f2f2f2;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* GENERAL ELEMENT TYPE STYLES */
|
||||||
|
|
||||||
|
h1 {
|
||||||
|
font-size: 2.8em;
|
||||||
|
}
|
||||||
|
|
||||||
|
h2 {
|
||||||
|
margin-bottom: 8px;
|
||||||
|
font-size: 22px;
|
||||||
|
font-weight: bold;
|
||||||
|
color: #303030;
|
||||||
|
}
|
||||||
|
|
||||||
|
h3 {
|
||||||
|
margin-bottom: 8px;
|
||||||
|
font-size: 18px;
|
||||||
|
font-weight: bold;
|
||||||
|
color: #d5000d;
|
||||||
|
}
|
||||||
|
|
||||||
|
h4 {
|
||||||
|
font-size: 16px;
|
||||||
|
font-weight: bold;
|
||||||
|
color: #303030;
|
||||||
|
}
|
||||||
|
|
||||||
|
h5 {
|
||||||
|
font-size: 1em;
|
||||||
|
color: #303030;
|
||||||
|
}
|
||||||
|
|
||||||
|
h6 {
|
||||||
|
font-size: .8em;
|
||||||
|
color: #303030;
|
||||||
|
}
|
||||||
|
|
||||||
|
p {
|
||||||
|
margin-bottom: 20px;
|
||||||
|
font-weight: 300;
|
||||||
|
}
|
||||||
|
|
||||||
|
a {
|
||||||
|
text-decoration: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
p a {
|
||||||
|
font-weight: 400;
|
||||||
|
}
|
||||||
|
|
||||||
|
blockquote {
|
||||||
|
padding: 0 0 0 30px;
|
||||||
|
margin-bottom: 20px;
|
||||||
|
font-size: 1.6em;
|
||||||
|
border-left: 10px solid #e9e9e9;
|
||||||
|
}
|
||||||
|
|
||||||
|
ul li {
|
||||||
|
list-style-position: inside;
|
||||||
|
list-style: disc;
|
||||||
|
padding-left: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
ol li {
|
||||||
|
list-style-position: inside;
|
||||||
|
list-style: decimal;
|
||||||
|
padding-left: 3px;
|
||||||
|
}
|
||||||
|
|
||||||
|
dl dd {
|
||||||
|
font-style: italic;
|
||||||
|
font-weight: 100;
|
||||||
|
}
|
||||||
|
|
||||||
|
footer {
|
||||||
|
padding-top: 20px;
|
||||||
|
padding-bottom: 30px;
|
||||||
|
margin-top: 40px;
|
||||||
|
font-size: 13px;
|
||||||
|
color: #aaa;
|
||||||
|
}
|
||||||
|
|
||||||
|
footer a {
|
||||||
|
color: #666;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* MISC */
|
||||||
|
.clearfix:after {
|
||||||
|
display: block;
|
||||||
|
height: 0;
|
||||||
|
clear: both;
|
||||||
|
visibility: hidden;
|
||||||
|
content: '.';
|
||||||
|
}
|
||||||
|
|
||||||
|
.clearfix {display: inline-block;}
|
||||||
|
* html .clearfix {height: 1%;}
|
||||||
|
.clearfix {display: block;}
|
69
stylesheets/pygment_trac.css
Normal file
@ -0,0 +1,69 @@
|
|||||||
|
.highlight { background: #ffffff; }
|
||||||
|
.highlight .c { color: #999988; font-style: italic } /* Comment */
|
||||||
|
.highlight .err { color: #a61717; background-color: #e3d2d2 } /* Error */
|
||||||
|
.highlight .k { font-weight: bold } /* Keyword */
|
||||||
|
.highlight .o { font-weight: bold } /* Operator */
|
||||||
|
.highlight .cm { color: #999988; font-style: italic } /* Comment.Multiline */
|
||||||
|
.highlight .cp { color: #999999; font-weight: bold } /* Comment.Preproc */
|
||||||
|
.highlight .c1 { color: #999988; font-style: italic } /* Comment.Single */
|
||||||
|
.highlight .cs { color: #999999; font-weight: bold; font-style: italic } /* Comment.Special */
|
||||||
|
.highlight .gd { color: #000000; background-color: #ffdddd } /* Generic.Deleted */
|
||||||
|
.highlight .gd .x { color: #000000; background-color: #ffaaaa } /* Generic.Deleted.Specific */
|
||||||
|
.highlight .ge { font-style: italic } /* Generic.Emph */
|
||||||
|
.highlight .gr { color: #aa0000 } /* Generic.Error */
|
||||||
|
.highlight .gh { color: #999999 } /* Generic.Heading */
|
||||||
|
.highlight .gi { color: #000000; background-color: #ddffdd } /* Generic.Inserted */
|
||||||
|
.highlight .gi .x { color: #000000; background-color: #aaffaa } /* Generic.Inserted.Specific */
|
||||||
|
.highlight .go { color: #888888 } /* Generic.Output */
|
||||||
|
.highlight .gp { color: #555555 } /* Generic.Prompt */
|
||||||
|
.highlight .gs { font-weight: bold } /* Generic.Strong */
|
||||||
|
.highlight .gu { color: #800080; font-weight: bold; } /* Generic.Subheading */
|
||||||
|
.highlight .gt { color: #aa0000 } /* Generic.Traceback */
|
||||||
|
.highlight .kc { font-weight: bold } /* Keyword.Constant */
|
||||||
|
.highlight .kd { font-weight: bold } /* Keyword.Declaration */
|
||||||
|
.highlight .kn { font-weight: bold } /* Keyword.Namespace */
|
||||||
|
.highlight .kp { font-weight: bold } /* Keyword.Pseudo */
|
||||||
|
.highlight .kr { font-weight: bold } /* Keyword.Reserved */
|
||||||
|
.highlight .kt { color: #445588; font-weight: bold } /* Keyword.Type */
|
||||||
|
.highlight .m { color: #009999 } /* Literal.Number */
|
||||||
|
.highlight .s { color: #d14 } /* Literal.String */
|
||||||
|
.highlight .na { color: #008080 } /* Name.Attribute */
|
||||||
|
.highlight .nb { color: #0086B3 } /* Name.Builtin */
|
||||||
|
.highlight .nc { color: #445588; font-weight: bold } /* Name.Class */
|
||||||
|
.highlight .no { color: #008080 } /* Name.Constant */
|
||||||
|
.highlight .ni { color: #800080 } /* Name.Entity */
|
||||||
|
.highlight .ne { color: #990000; font-weight: bold } /* Name.Exception */
|
||||||
|
.highlight .nf { color: #990000; font-weight: bold } /* Name.Function */
|
||||||
|
.highlight .nn { color: #555555 } /* Name.Namespace */
|
||||||
|
.highlight .nt { color: #000080 } /* Name.Tag */
|
||||||
|
.highlight .nv { color: #008080 } /* Name.Variable */
|
||||||
|
.highlight .ow { font-weight: bold } /* Operator.Word */
|
||||||
|
.highlight .w { color: #bbbbbb } /* Text.Whitespace */
|
||||||
|
.highlight .mf { color: #009999 } /* Literal.Number.Float */
|
||||||
|
.highlight .mh { color: #009999 } /* Literal.Number.Hex */
|
||||||
|
.highlight .mi { color: #009999 } /* Literal.Number.Integer */
|
||||||
|
.highlight .mo { color: #009999 } /* Literal.Number.Oct */
|
||||||
|
.highlight .sb { color: #d14 } /* Literal.String.Backtick */
|
||||||
|
.highlight .sc { color: #d14 } /* Literal.String.Char */
|
||||||
|
.highlight .sd { color: #d14 } /* Literal.String.Doc */
|
||||||
|
.highlight .s2 { color: #d14 } /* Literal.String.Double */
|
||||||
|
.highlight .se { color: #d14 } /* Literal.String.Escape */
|
||||||
|
.highlight .sh { color: #d14 } /* Literal.String.Heredoc */
|
||||||
|
.highlight .si { color: #d14 } /* Literal.String.Interpol */
|
||||||
|
.highlight .sx { color: #d14 } /* Literal.String.Other */
|
||||||
|
.highlight .sr { color: #009926 } /* Literal.String.Regex */
|
||||||
|
.highlight .s1 { color: #d14 } /* Literal.String.Single */
|
||||||
|
.highlight .ss { color: #990073 } /* Literal.String.Symbol */
|
||||||
|
.highlight .bp { color: #999999 } /* Name.Builtin.Pseudo */
|
||||||
|
.highlight .vc { color: #008080 } /* Name.Variable.Class */
|
||||||
|
.highlight .vg { color: #008080 } /* Name.Variable.Global */
|
||||||
|
.highlight .vi { color: #008080 } /* Name.Variable.Instance */
|
||||||
|
.highlight .il { color: #009999 } /* Literal.Number.Integer.Long */
|
||||||
|
|
||||||
|
.type-csharp .highlight .k { color: #0000FF }
|
||||||
|
.type-csharp .highlight .kt { color: #0000FF }
|
||||||
|
.type-csharp .highlight .nf { color: #000000; font-weight: normal }
|
||||||
|
.type-csharp .highlight .nc { color: #2B91AF }
|
||||||
|
.type-csharp .highlight .nn { color: #000000 }
|
||||||
|
.type-csharp .highlight .s { color: #A31515 }
|
||||||
|
.type-csharp .highlight .sc { color: #A31515 }
|
373
stylesheets/stylesheet.css
Normal file
@ -0,0 +1,373 @@
|
|||||||
|
/* http://meyerweb.com/eric/tools/css/reset/
|
||||||
|
v2.0 | 20110126
|
||||||
|
License: none (public domain)
|
||||||
|
*/
|
||||||
|
html, body, div, span, applet, object, iframe,
|
||||||
|
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
|
||||||
|
a, abbr, acronym, address, big, cite, code,
|
||||||
|
del, dfn, em, img, ins, kbd, q, s, samp,
|
||||||
|
small, strike, strong, sub, sup, tt, var,
|
||||||
|
b, u, i, center,
|
||||||
|
dl, dt, dd, ol, ul, li,
|
||||||
|
fieldset, form, label, legend,
|
||||||
|
table, caption, tbody, tfoot, thead, tr, th, td,
|
||||||
|
article, aside, canvas, details, embed,
|
||||||
|
figure, figcaption, footer, header, hgroup,
|
||||||
|
menu, nav, output, ruby, section, summary,
|
||||||
|
time, mark, audio, video {
|
||||||
|
padding: 0;
|
||||||
|
margin: 0;
|
||||||
|
font: inherit;
|
||||||
|
font-size: 100%;
|
||||||
|
vertical-align: baseline;
|
||||||
|
border: 0;
|
||||||
|
}
|
||||||
|
/* HTML5 display-role reset for older browsers */
|
||||||
|
article, aside, details, figcaption, figure,
|
||||||
|
footer, header, hgroup, menu, nav, section {
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
body {
|
||||||
|
line-height: 1;
|
||||||
|
}
|
||||||
|
ol, ul {
|
||||||
|
list-style: none;
|
||||||
|
}
|
||||||
|
blockquote, q {
|
||||||
|
quotes: none;
|
||||||
|
}
|
||||||
|
blockquote:before, blockquote:after,
|
||||||
|
q:before, q:after {
|
||||||
|
content: '';
|
||||||
|
content: none;
|
||||||
|
}
|
||||||
|
table {
|
||||||
|
border-spacing: 0;
|
||||||
|
border-collapse: collapse;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* LAYOUT STYLES */
|
||||||
|
body {
|
||||||
|
font-family: 'Helvetica Neue', Helvetica, Arial, serif;
|
||||||
|
font-size: 1em;
|
||||||
|
line-height: 1.5;
|
||||||
|
color: #6d6d6d;
|
||||||
|
text-shadow: 0 1px 0 rgba(255, 255, 255, 0.8);
|
||||||
|
background: #e7e7e7 url(../images/body-bg.png) 0 0 repeat;
|
||||||
|
}
|
||||||
|
|
||||||
|
a {
|
||||||
|
color: #d5000d;
|
||||||
|
}
|
||||||
|
a:hover {
|
||||||
|
color: #c5000c;
|
||||||
|
}
|
||||||
|
|
||||||
|
header {
|
||||||
|
padding-top: 35px;
|
||||||
|
padding-bottom: 25px;
|
||||||
|
}
|
||||||
|
|
||||||
|
header h1 {
|
||||||
|
font-family: 'Chivo', 'Helvetica Neue', Helvetica, Arial, serif;
|
||||||
|
font-size: 48px; font-weight: 900;
|
||||||
|
line-height: 1.2;
|
||||||
|
color: #303030;
|
||||||
|
letter-spacing: -1px;
|
||||||
|
}
|
||||||
|
|
||||||
|
header h2 {
|
||||||
|
font-size: 24px;
|
||||||
|
font-weight: normal;
|
||||||
|
line-height: 1.3;
|
||||||
|
color: #aaa;
|
||||||
|
letter-spacing: -1px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#container {
|
||||||
|
min-height: 595px;
|
||||||
|
background: transparent url(../images/highlight-bg.jpg) 50% 0 no-repeat;
|
||||||
|
}
|
||||||
|
|
||||||
|
.inner {
|
||||||
|
width: 620px;
|
||||||
|
margin: 0 auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
#container .inner img {
|
||||||
|
max-width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
#downloads {
|
||||||
|
margin-bottom: 40px;
|
||||||
|
}
|
||||||
|
|
||||||
|
a.button {
|
||||||
|
display: block;
|
||||||
|
float: left;
|
||||||
|
width: 179px;
|
||||||
|
padding: 12px 8px 12px 8px;
|
||||||
|
margin-right: 14px;
|
||||||
|
font-size: 15px;
|
||||||
|
font-weight: bold;
|
||||||
|
line-height: 25px;
|
||||||
|
color: #303030;
|
||||||
|
background: #fdfdfd; /* Old browsers */
|
||||||
|
background: -moz-linear-gradient(top, #fdfdfd 0%, #f2f2f2 100%); /* FF3.6+ */
|
||||||
|
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#fdfdfd), color-stop(100%,#f2f2f2)); /* Chrome,Safari4+ */
|
||||||
|
background: -webkit-linear-gradient(top, #fdfdfd 0%,#f2f2f2 100%); /* Chrome10+,Safari5.1+ */
|
||||||
|
background: -o-linear-gradient(top, #fdfdfd 0%,#f2f2f2 100%); /* Opera 11.10+ */
|
||||||
|
background: -ms-linear-gradient(top, #fdfdfd 0%,#f2f2f2 100%); /* IE10+ */
|
||||||
|
background: linear-gradient(top, #fdfdfd 0%,#f2f2f2 100%); /* W3C */
|
||||||
|
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#fdfdfd', endColorstr='#f2f2f2',GradientType=0 ); /* IE6-9 */
|
||||||
|
border-top: solid 1px #cbcbcb;
|
||||||
|
border-right: solid 1px #b7b7b7;
|
||||||
|
border-bottom: solid 1px #b3b3b3;
|
||||||
|
border-left: solid 1px #b7b7b7;
|
||||||
|
border-radius: 30px;
|
||||||
|
-webkit-box-shadow: 10px 10px 5px #888;
|
||||||
|
-moz-box-shadow: 10px 10px 5px #888;
|
||||||
|
box-shadow: 0px 1px 5px #e8e8e8;
|
||||||
|
-moz-border-radius: 30px;
|
||||||
|
-webkit-border-radius: 30px;
|
||||||
|
}
|
||||||
|
a.button:hover {
|
||||||
|
background: #fafafa; /* Old browsers */
|
||||||
|
background: -moz-linear-gradient(top, #fdfdfd 0%, #f6f6f6 100%); /* FF3.6+ */
|
||||||
|
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#fdfdfd), color-stop(100%,#f6f6f6)); /* Chrome,Safari4+ */
|
||||||
|
background: -webkit-linear-gradient(top, #fdfdfd 0%,#f6f6f6 100%); /* Chrome10+,Safari5.1+ */
|
||||||
|
background: -o-linear-gradient(top, #fdfdfd 0%,#f6f6f6 100%); /* Opera 11.10+ */
|
||||||
|
background: -ms-linear-gradient(top, #fdfdfd 0%,#f6f6f6 100%); /* IE10+ */
|
||||||
|
background: linear-gradient(top, #fdfdfd 0%,#f6f6f6, 100%); /* W3C */
|
||||||
|
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#fdfdfd', endColorstr='#f6f6f6',GradientType=0 ); /* IE6-9 */
|
||||||
|
border-top: solid 1px #b7b7b7;
|
||||||
|
border-right: solid 1px #b3b3b3;
|
||||||
|
border-bottom: solid 1px #b3b3b3;
|
||||||
|
border-left: solid 1px #b3b3b3;
|
||||||
|
}
|
||||||
|
|
||||||
|
a.button span {
|
||||||
|
display: block;
|
||||||
|
height: 23px;
|
||||||
|
padding-left: 50px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#download-zip span {
|
||||||
|
background: transparent url(../images/zip-icon.png) 12px 50% no-repeat;
|
||||||
|
}
|
||||||
|
#download-tar-gz span {
|
||||||
|
background: transparent url(../images/tar-gz-icon.png) 12px 50% no-repeat;
|
||||||
|
}
|
||||||
|
#view-on-github span {
|
||||||
|
background: transparent url(../images/octocat-icon.png) 12px 50% no-repeat;
|
||||||
|
}
|
||||||
|
#view-on-github {
|
||||||
|
margin-right: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
code, pre {
|
||||||
|
margin-bottom: 30px;
|
||||||
|
font-family: Monaco, "Bitstream Vera Sans Mono", "Lucida Console", Terminal;
|
||||||
|
font-size: 14px;
|
||||||
|
color: #222;
|
||||||
|
}
|
||||||
|
|
||||||
|
code {
|
||||||
|
padding: 0 3px;
|
||||||
|
background-color: #f2f2f2;
|
||||||
|
border: solid 1px #ddd;
|
||||||
|
}
|
||||||
|
|
||||||
|
pre {
|
||||||
|
padding: 20px;
|
||||||
|
overflow: auto;
|
||||||
|
color: #f2f2f2;
|
||||||
|
text-shadow: none;
|
||||||
|
background: #303030;
|
||||||
|
}
|
||||||
|
pre code {
|
||||||
|
padding: 0;
|
||||||
|
color: #f2f2f2;
|
||||||
|
background-color: #303030;
|
||||||
|
border: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
ul, ol, dl {
|
||||||
|
margin-bottom: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* COMMON STYLES */
|
||||||
|
|
||||||
|
hr {
|
||||||
|
height: 1px;
|
||||||
|
padding-bottom: 1em;
|
||||||
|
margin-top: 1em;
|
||||||
|
line-height: 1px;
|
||||||
|
background: transparent url('../images/hr.png') 50% 0 no-repeat;
|
||||||
|
border: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
strong {
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
|
||||||
|
em {
|
||||||
|
font-style: italic;
|
||||||
|
}
|
||||||
|
|
||||||
|
table {
|
||||||
|
width: 100%;
|
||||||
|
border: 1px solid #ebebeb;
|
||||||
|
}
|
||||||
|
|
||||||
|
th {
|
||||||
|
font-weight: 500;
|
||||||
|
}
|
||||||
|
|
||||||
|
td {
|
||||||
|
font-weight: 300;
|
||||||
|
text-align: center;
|
||||||
|
border: 1px solid #ebebeb;
|
||||||
|
}
|
||||||
|
|
||||||
|
form {
|
||||||
|
padding: 20px;
|
||||||
|
background: #f2f2f2;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* GENERAL ELEMENT TYPE STYLES */
|
||||||
|
|
||||||
|
h1 {
|
||||||
|
font-size: 32px;
|
||||||
|
}
|
||||||
|
|
||||||
|
h2 {
|
||||||
|
margin-bottom: 8px;
|
||||||
|
font-size: 22px;
|
||||||
|
font-weight: bold;
|
||||||
|
color: #303030;
|
||||||
|
}
|
||||||
|
|
||||||
|
h3 {
|
||||||
|
margin-bottom: 8px;
|
||||||
|
font-size: 18px;
|
||||||
|
font-weight: bold;
|
||||||
|
color: #d5000d;
|
||||||
|
}
|
||||||
|
|
||||||
|
h4 {
|
||||||
|
font-size: 16px;
|
||||||
|
font-weight: bold;
|
||||||
|
color: #303030;
|
||||||
|
}
|
||||||
|
|
||||||
|
h5 {
|
||||||
|
font-size: 1em;
|
||||||
|
color: #303030;
|
||||||
|
}
|
||||||
|
|
||||||
|
h6 {
|
||||||
|
font-size: .8em;
|
||||||
|
color: #303030;
|
||||||
|
}
|
||||||
|
|
||||||
|
p {
|
||||||
|
margin-bottom: 20px;
|
||||||
|
font-weight: 300;
|
||||||
|
}
|
||||||
|
|
||||||
|
a {
|
||||||
|
text-decoration: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
p a {
|
||||||
|
font-weight: 400;
|
||||||
|
}
|
||||||
|
|
||||||
|
blockquote {
|
||||||
|
padding: 0 0 0 30px;
|
||||||
|
margin-bottom: 20px;
|
||||||
|
font-size: 1.6em;
|
||||||
|
border-left: 10px solid #e9e9e9;
|
||||||
|
}
|
||||||
|
|
||||||
|
ul li {
|
||||||
|
list-style-position: inside;
|
||||||
|
list-style: disc;
|
||||||
|
padding-left: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
ol li {
|
||||||
|
list-style-position: inside;
|
||||||
|
list-style: decimal;
|
||||||
|
padding-left: 3px;
|
||||||
|
}
|
||||||
|
|
||||||
|
dl dt {
|
||||||
|
color: #303030;
|
||||||
|
}
|
||||||
|
|
||||||
|
footer {
|
||||||
|
padding-top: 20px;
|
||||||
|
padding-bottom: 30px;
|
||||||
|
margin-top: 40px;
|
||||||
|
font-size: 13px;
|
||||||
|
color: #aaa;
|
||||||
|
background: transparent url('../images/hr.png') 0 0 no-repeat;
|
||||||
|
}
|
||||||
|
|
||||||
|
footer a {
|
||||||
|
color: #666;
|
||||||
|
}
|
||||||
|
footer a:hover {
|
||||||
|
color: #444;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* MISC */
|
||||||
|
.clearfix:after {
|
||||||
|
display: block;
|
||||||
|
height: 0;
|
||||||
|
clear: both;
|
||||||
|
visibility: hidden;
|
||||||
|
content: '.';
|
||||||
|
}
|
||||||
|
|
||||||
|
.clearfix {display: inline-block;}
|
||||||
|
* html .clearfix {height: 1%;}
|
||||||
|
.clearfix {display: block;}
|
||||||
|
|
||||||
|
/* #Media Queries
|
||||||
|
================================================== */
|
||||||
|
|
||||||
|
/* Smaller than standard 960 (devices and browsers) */
|
||||||
|
@media only screen and (max-width: 959px) { }
|
||||||
|
|
||||||
|
/* Tablet Portrait size to standard 960 (devices and browsers) */
|
||||||
|
@media only screen and (min-width: 768px) and (max-width: 959px) { }
|
||||||
|
|
||||||
|
/* All Mobile Sizes (devices and browser) */
|
||||||
|
@media only screen and (max-width: 767px) {
|
||||||
|
header {
|
||||||
|
padding-top: 10px;
|
||||||
|
padding-bottom: 10px;
|
||||||
|
}
|
||||||
|
#downloads {
|
||||||
|
margin-bottom: 25px;
|
||||||
|
}
|
||||||
|
#download-zip, #download-tar-gz {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
.inner {
|
||||||
|
width: 94%;
|
||||||
|
margin: 0 auto;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Mobile Landscape Size to Tablet Portrait (devices and browsers) */
|
||||||
|
@media only screen and (min-width: 480px) and (max-width: 767px) { }
|
||||||
|
|
||||||
|
/* Mobile Portrait Size to Mobile Landscape Size (devices and browsers) */
|
||||||
|
@media only screen and (max-width: 479px) { }
|
124
viewevent.php
@ -1,124 +0,0 @@
|
|||||||
<?php
|
|
||||||
//start php session
|
|
||||||
session_start();
|
|
||||||
//if user not logged in, force to login.php
|
|
||||||
if( $_SESSION['access'] != 1 ) {
|
|
||||||
require( 'login.php' );
|
|
||||||
} else {
|
|
||||||
|
|
||||||
?>
|
|
||||||
<html>
|
|
||||||
<head>
|
|
||||||
<link rel="stylesheet" type="text/css" href="css/sestyle.css">
|
|
||||||
<link rel="shortcut icon" href="favicon.ico" />
|
|
||||||
<title>BMS Events</title>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
<div class=header>
|
|
||||||
<h1>BMS Events</h1>
|
|
||||||
<?php
|
|
||||||
if(isset($_SESSION['uname'])) {
|
|
||||||
echo "Hello, ";
|
|
||||||
print_r($_SESSION['uname']);
|
|
||||||
}
|
|
||||||
echo "<h2>View Event</h2>";
|
|
||||||
include("includes/menu.php"); ?>
|
|
||||||
</div>
|
|
||||||
<div class=content>
|
|
||||||
<?php include "includes/db_config.php";
|
|
||||||
$eventid=$_GET['eventid'];
|
|
||||||
$conn1 = new mysqli($servername, $username, $password, $db);
|
|
||||||
if ($conn1->connect_error) {
|
|
||||||
die("Connection Failed: " . $conn1->connect_error);
|
|
||||||
}
|
|
||||||
$sql1 = "SELECT * FROM events AS events INNER JOIN units AS units ON events.unit_id=units.unit_id INNER JOIN alerts as alerts ON events.alert_id=alerts.alert_id WHERE events.event_id=".$eventid.";";
|
|
||||||
$result1 = $conn1->query($sql1);
|
|
||||||
if ($result1->num_rows >0){
|
|
||||||
while ($row1 = $result1->fetch_assoc()) {
|
|
||||||
echo "<br />";
|
|
||||||
echo "<table align='center'><tr><td>";
|
|
||||||
echo "Unit: ";
|
|
||||||
echo "</td><td>";
|
|
||||||
print_r($row1['unit_name']);
|
|
||||||
echo "</td></tr><tr><td>";
|
|
||||||
echo "Alert: ";
|
|
||||||
echo "</td><td>";
|
|
||||||
print_r($row1['alert_name']);
|
|
||||||
echo "</td></tr><tr><td>";
|
|
||||||
echo "Description: ";
|
|
||||||
echo "</td><td>";
|
|
||||||
echo nl2br($row1['description']);
|
|
||||||
echo "</td></tr><tr><td>";
|
|
||||||
echo "Start Date and Time: ";
|
|
||||||
echo "</td><td>";
|
|
||||||
print_r($row1['date_time_start']);
|
|
||||||
echo "</td></tr><tr><td>";
|
|
||||||
echo "Currently Ongoing? ";
|
|
||||||
echo "</td><td>";
|
|
||||||
if($row1['is_ongoing'] ==1) {
|
|
||||||
echo "Yes";
|
|
||||||
} else {
|
|
||||||
echo "No";
|
|
||||||
}
|
|
||||||
echo "</td></tr><tr><td>";
|
|
||||||
echo "End Date and Time: ";
|
|
||||||
echo "</td><td>";
|
|
||||||
print_r($row1['date_time_end']);
|
|
||||||
echo "</td></tr>";
|
|
||||||
echo "<tr><td>";
|
|
||||||
echo "Event Updates:";
|
|
||||||
echo "</td><td>";
|
|
||||||
$update_query = "SELECT update_desc, update_date_time, update_user FROM event_updates WHERE event_updates.event_id=".$eventid.";";
|
|
||||||
$update_result = $conn1->query($update_query);
|
|
||||||
if ($update_result->num_rows >0){
|
|
||||||
while ($update_row = $update_result->fetch_assoc()) {
|
|
||||||
echo "<table align='center'><tr><td>";
|
|
||||||
echo "Update Desc: ";
|
|
||||||
echo "</td><td>";
|
|
||||||
echo nl2br($update_row['update_desc']);
|
|
||||||
echo "</td></tr><tr><td>";
|
|
||||||
echo "Update User: ";
|
|
||||||
echo "</td><td>";
|
|
||||||
print_r($update_row['update_user']);
|
|
||||||
echo "</td></tr><tr><td>";
|
|
||||||
echo "Update Date and Time: ";
|
|
||||||
echo "</td><td>";
|
|
||||||
print_r($update_row['update_date_time']);
|
|
||||||
if(empty($update_row['update_image'])) {
|
|
||||||
echo "</td></tr></table>";
|
|
||||||
} else {
|
|
||||||
echo "<tr><td>";
|
|
||||||
echo "Image: ";
|
|
||||||
echo "</td><td>";
|
|
||||||
echo "<a href=".$update_row['update_image']." target=blank>Attachment</a>";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
echo "No updates to this event";
|
|
||||||
}
|
|
||||||
echo "</td></tr>";
|
|
||||||
if(empty($row1['event_image'])) {
|
|
||||||
echo "<tr><td colspan='2' class='ui-helper-center'>";
|
|
||||||
echo "<a href=editevent.php?event_id=".$row1['event_id'].">Edit Event</a>";
|
|
||||||
echo "</td></tr></table>";
|
|
||||||
} else {
|
|
||||||
echo "<tr><td>";
|
|
||||||
echo "Attachments:";
|
|
||||||
echo "</td><td>";
|
|
||||||
echo "<a href=".$row1['event_image']." target=blank>Attachment</a>";
|
|
||||||
echo "<tr><td colspan='2' class='ui-helper-center'>";
|
|
||||||
echo "<a href=editevent.php?event_id=".$row1['event_id'].">Edit Event</a>";
|
|
||||||
echo "</td></tr></table>";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
echo "<h4>ERROR Event ID Not Found</h4>";
|
|
||||||
}
|
|
||||||
if ($conn1->connect_error) {
|
|
||||||
die("Connection Failed: " . $conn1->connect_error);
|
|
||||||
}
|
|
||||||
?>
|
|
||||||
</div>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
<?php } ?>
|
|