* @copyright Deakin University 2007,2008 * @package queXS * @subpackage user * @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"); /** * Operator functions */ include("functions/functions.operator.php"); xhtml_head(T_("Case Notes"),true,array("css/table.css","css/casenote.css"),false, (isset($_GET['add'])) ? "onload=\"document.getElementById('note').focus();\"" : false); //List the case note history // display in the operators time if (isset($_GET['add'])) { ?>

"/>

qstr($_POST['note']); $sql = "INSERT INTO `case_note` (case_note_id,case_id,operator_id,note,datetime) VALUES (NULL,'$case_id','$operator_id',$note,CONVERT_TZ(NOW(),'System','UTC'))"; $db->Execute($sql); } $sql = "SELECT DATE_FORMAT(CONVERT_TZ(c.datetime,'UTC',op.Time_zone_name),'".DATE_TIME_FORMAT."') as time, op.firstName, op.lastName, c.note as note FROM `case_note` as c JOIN (operator as op) on (c.operator_id = op.operator_id) WHERE c.case_id = '$case_id' ORDER BY c.datetime DESC"; $rs = $db->GetAll($sql); print "
" . T_("Add note") . "
"; if (empty($rs)) print "

" . T_("No notes") . "

"; else xhtml_table($rs,array("time","firstName","note"),array(T_("Date/Time"),T_("Operator"),T_("Note"))); } else print "

" . T_("No case") . "

"; } xhtml_foot(); ?>