-
Notifications
You must be signed in to change notification settings - Fork 6
/
assign_res.php
46 lines (39 loc) · 1.53 KB
/
assign_res.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
40
41
42
43
44
45
46
<?php
/**
* @package assign_res.php
* @author John Doe <[email protected]>
* @since 2009-04-26
* @version 2012-06-20
*/
/*
4/26/09 initial release
5/25/09 reset defined here to avoid need for current functions.inc.php
10/6/09 Added untries for new fields in assigns table u2fenr and u2farr (unit to facility status
7/28/10 Added inclusion of startup.inc.php for checking of network status and setting of file name variables to support no-maps versions of scripts.
9/1/10 set unit 'updated' time
6/20/12 don't apply NULL to `dispatched`
*/
error_reporting(E_ALL);
@session_start();
require_once($_SESSION['fip']); //7/28/10
$now = "'" . mysql_format_date(time() - (get_variable('delta_mins')*60)) . "'";
/*
USERS: you may replace NULL with $now (EXACTLY THAT!) in the following sql query to meet local needs
*/
// 6/20/12
$query = "UPDATE `$GLOBALS[mysql_prefix]assigns` SET
`responding` = NULL,
`on_scene` = NULL,
`u2fenr` = NULL,
`u2farr` = NULL,
`clear` = NULL,
`as_of` = $now
WHERE `id` = {$_POST['frm_id']} LIMIT 1;";
$result = mysql_query($query) or do_error($query, "", mysql_error(), basename( __FILE__), __LINE__);
$query = "SELECT * FROM `$GLOBALS[mysql_prefix]assigns` WHERE `id` = {$_POST['frm_id']} LIMIT 1";
$result = mysql_query($query) or do_error($query, "", mysql_error(), basename( __FILE__), __LINE__);
$row = mysql_fetch_assoc($result);
do_log($GLOBALS['LOG_CALL_RESET'], $row['ticket_id'], $row['responder_id'], $row['id']);
set_u_updated ($_POST['frm_id']); // 9/1/10
unset($result);
?>