~sit-developers/sit/master

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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
<?php
// escalation_paths.php - List escalation paths
//
// SiT (Support Incident Tracker) - Support call tracking system
// Copyright (C) 2010-2014 The Support Incident Tracker Project
// Copyright (C) 2000-2009 Salford Software Ltd. and Contributors
//
// This software may be used and distributed according to the terms
// of the GNU General Public License, incorporated herein by reference.
//

// Author: Ivan Lucas <ivanlucas[at]users.sourceforge.net>

//// This Page Is Valid XHTML 1.0 Transitional!  (7 Oct 2006)

require ('core.php');
$permission = PERM_ESCALATION_MANAGE; // Manage escalation paths
require (APPLICATION_LIBPATH . 'functions.inc.php');

// This page requires authentication
require (APPLICATION_LIBPATH . 'auth.inc.php');

$title = $strEscalationPaths;

include (APPLICATION_INCPATH . 'htmlheader.inc.php');
echo "<h2>".icon('escalation', 32, $strEscalationPaths)." {$title}</h2>";

$sql = "SELECT * FROM `{$dbEscalationPaths}` ORDER BY name";
$result = mysql_query($sql);
if (mysql_error()) trigger_error(mysql_error(), E_USER_WARNING);
if (mysql_num_rows($result) >= 1)
{
    echo "<table class='maintable'>";
    echo "<tr>";
    echo colheader('name', $strName);
    echo colheader('track_url', $strTrackURL);
    echo colheader('home_url', $strHomeURL);
    echo colheader('url_title', $strURLTitle);
    echo colheader('email_domain', $strEmailDomain);
    echo colheader('edit', $strActions);
    echo "</tr>";
    $shade = 'shade1';
    while ($path = mysql_fetch_object($result))
    {
        $operations = array();
        $operations[$strEdit] = "escalation_path_edit.php?id={$path->id}";
        echo "<tr  class='{$shade}'>";
        echo "<td>{$path->name}</td>";
        echo "<td>{$path->track_url}</td>";
        echo "<td>{$path->home_url}</td>";
        echo "<td>{$path->url_title}</td>";
        echo "<td>{$path->email_domain}</td>";
        echo "<td>" . html_action_links($operations). "</td>";
        echo "</tr>";
        if ($shade == 'shade1') $shade = 'shade2';
        else $shade = 'shade1';
    }
    echo "</table>";
}
else echo user_alert($strNoRecords, E_USER_NOTICE);

echo "<p align='center'><a href='escalation_path_new.php'>{$strNew}</a></p>";

include (APPLICATION_INCPATH . 'htmlfooter.inc.php');

?>