~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
<?php
// control_panel.php
//
// 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: Paul Heaney <paul[at]sitracker.org>

require ('core.php');
$permission = PERM_SITE_VIEW;
require (APPLICATION_LIBPATH . 'functions.inc.php');
// This page requires authentication
require (APPLICATION_LIBPATH . 'auth.inc.php');

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

$title = $strShowOrphanedContacts;

$sql = "SELECT * FROM `{$dbContacts}` WHERE siteid = 0";
$result = mysql_query($sql);
if (mysql_error()) trigger_error(mysql_error(),E_USER_WARNING);

echo "<h2>{$title}</h2>";

if (mysql_num_rows($result) > 0)
{
    echo "<p align='center'>{$strOrphanedSites}</p>";

    echo "<div><table class='vertical'>";
    echo "<tr><th>{$strSiteName}</th></tr>";

    $shade = "shade1";

    while ($contact = mysql_fetch_object($result))
    {
        echo "<tr class='{$shade}'><td>{$contact->forenames} {$contact->surname}</td></tr>";

        if ($shade == 'shade1')
        {
            $shade = 'shade2';
        }
        else
        {
            $shade = 'shade1';
        }
    }

    echo "</table></div>";
}
else
{
    echo "<p align='center'>{$strNoOrphanedContacts}</p>";
}

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

?>