forked from khoegenauer/tickets-cad
-
Notifications
You must be signed in to change notification settings - Fork 0
/
as_up_fac_status.php
39 lines (32 loc) · 1.08 KB
/
as_up_fac_status.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
<?php
/**
* @package as_up_fac_status.php
* @author John Doe <[email protected]>
* @since 2011-03-15
* @version 2011-03-15
*/
/*
3/15/11 Created from as_up_un_status.php to allow change of facility status through situation screen
*/
error_reporting(E_ALL);
// file as_up_fac_status.php
@session_start();
require_once($_SESSION['fip']);
//snap(basename(__FILE__), __LINE__);
extract($_GET);
$now = time() - (get_variable('delta_mins')*60);
@session_start();
$query = "UPDATE `$GLOBALS[mysql_prefix]facilities` SET `status_id`= ";
$query .= quote_smart($frm_status_id) ;
$query .= ", `updated` = " . quote_smart(mysql_format_date($now));
$query .= ", `user_id` = " . $_SESSION['user_id'];
$query .= " WHERE `id` = ";
$query .= quote_smart($frm_responder_id);
$query .=" LIMIT 1";
$result = mysql_query($query) or do_error($query, "", mysql_error(), basename( __FILE__), __LINE__);
// dump ($query);
do_log($GLOBALS['LOG_FACILITY_STATUS'], $frm_ticket_id, $frm_responder_id, $frm_status_id);
set_sess_exp(); // update session time
print date("H:i", $now) ;
//date("H:i", $row['as_of'])
?>