* @copyright Deakin University 2007,2008 * @package queXS * @subpackage admin * @link http://www.deakin.edu.au/dcarf/ queXS was writen for DCARF - Deakin Computer Assisted Research Facility * @license http://opensource.org/licenses/gpl-2.0.php The GNU General Public License (GPL) Version 2 * */ /** * Configuration file */ include ("../config.inc.php"); /** * Database file */ include ("../db.inc.php"); /** * XHTML functions */ include ("../functions/functions.xhtml.php"); $css = array( "../include/bootstrap-3.3.2/css/bootstrap.min.css", //"../include/bootstrap-3.3.2/css/bootstrap-theme.min.css", "../include/clockpicker/dist/bootstrap-clockpicker.min.css", "../css/custom.css" ); $js_head = array( "../js/jquery-2.1.3.min.js", "../include/bootstrap-3.3.2/js/bootstrap.min.js", "../js/addrow-v2.js", ); $js_foot = array( "../include/clockpicker/dist/bootstrap-clockpicker.js", "../js/custom.js" ); global $db; $year="2008"; $woy="1"; if (isset($_POST['day'])) { $db->StartTrans(); $sql = "DELETE FROM shift_template WHERE 1"; $db->Execute($sql); foreach($_POST['day'] as $key => $val) { if (!empty($val)) { $val = intval($val); $key = intval($key); $start = $db->qstr($_POST['start'][$key],get_magic_quotes_gpc()); $end = $db->qstr($_POST['end'][$key],get_magic_quotes_gpc()); $sql = "INSERT INTO shift_template (day_of_week,start,end) VALUES ('$val',$start,$end)"; $db->Execute($sql); } } $db->CompleteTrans(); } xhtml_head(T_("Set default shift times"),true,$css,$js_head);//T_("Modify shift template"),array("../css/shifts.css"),array("../js/addrow-v2.js") $sql = "SELECT CONVERT_TZ(NOW(),'" . DEFAULT_TIME_ZONE . "','UTC') as t";//'Australia/Victoria' $rs = $db->GetRow($sql); if (empty($rs) || !$rs || empty($rs['t'])) print "
"; /** * Display warning if timezone data not installed */ //print "