forked from osTicket/osTicket-1.7
-
Notifications
You must be signed in to change notification settings - Fork 0
/
view.php
36 lines (29 loc) · 1.26 KB
/
view.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
<?php
/*********************************************************************
view.php
Ticket View.
TODO: Support different views based on auth_token - e.g for BCC'ed users vs. Ticket owner.
Peter Rotich <[email protected]>
Copyright (c) 2006-2010 osTicket
http://www.osticket.com
Released under the GNU General Public License WITHOUT ANY WARRANTY.
See LICENSE.TXT for details.
vim: expandtab sw=4 ts=4 sts=4:
$Id: $
**********************************************************************/
require_once('client.inc.php');
//If the user is NOT logged in - try auto-login (if params exists).
if(!$thisclient || !$thisclient->isValid()) {
// * On login Client::login will redirect the user to tickets.php view.
// * See TODO above for planned multi-view.
$user = null;
if($_GET['t'] && $_GET['e'] && $_GET['a'])
$user = Client::login($_GET['t'], $_GET['e'], $_GET['a'], $errors);
//XXX: For now we're assuming the user is the ticket owner
// (multi-view based on auth token will come later).
if($user && $user->getTicketID()==trim($_GET['t']))
@header('Location: tickets.php?id='.$user->getTicketID());
}
//Simply redirecting to tickets.php until multiview is implemented.
require('tickets.php');
?>