1<?php
2/*********************************************************************
3    logo.php
4
5    Simple logo to facilitate serving a customized client-side logo from
6    osTicet. The logo is configurable in Admin Panel -> Settings -> Pages
7
8    Peter Rotich <peter@osticket.com>
9    Jared Hancock <jared@osticket.com>
10    Copyright (c)  2006-2013 osTicket
11    http://www.osticket.com
12
13    Released under the GNU General Public License WITHOUT ANY WARRANTY.
14    See LICENSE.TXT for details.
15
16    vim: expandtab sw=4 ts=4 sts=4:
17**********************************************************************/
18
19// Don't update the session for inline image fetches
20if (!function_exists('noop')) { function noop() {} }
21session_set_save_handler('noop','noop','noop','noop','noop','noop');
22define('DISABLE_SESSION', true);
23
24require_once('../main.inc.php');
25
26$ttl = 86400; // max-age
27if (isset($_GET['backdrop'])) {
28    if (($backdrop = $ost->getConfig()->getStaffLoginBackdrop())) {
29        $backdrop->display(false, $ttl);
30        // ::display() will not return
31    }
32    header("Cache-Control: private, max-age=$ttl");
33    header('Pragma: private');
34    Http::redirect('images/login-headquarters.jpg');
35}
36elseif (($logo = $ost->getConfig()->getStaffLogo())) {
37    $logo->display(false, $ttl);
38}
39
40header("Cache-Control: private, max-age=$ttl");
41header('Pragma: private');
42Http::redirect('images/ost-logo.png');
43
44?>
45