-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathclient_info.php
More file actions
62 lines (56 loc) · 1.87 KB
/
client_info.php
File metadata and controls
62 lines (56 loc) · 1.87 KB
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
<?php
// Authenticate
require("class.AuthenticationManager.php");
require("class.CommandMenu.php");
if (!$authenticationManager->isLoggedIn()) {
Header("Location: login.php");
exit;
}
//load local vars from superglobals
$client_id = $_REQUEST['client_id'];
// Connect to database.
$dbh = dbConnect();
$contextUser = strtolower($_SESSION['contextUser']);
?>
<HTML>
<head>
<title>Client Info</title>
<?php
include ("header.inc");
?>
</head>
<body <?php include ("body.inc"); ?> >
<?php
$query = "SELECT organisation, description, address1, address2,".
"city, country, postal_code, contact_first_name, contact_last_name,".
"username, contact_email, phone_number, fax_number, gsm_number, ".
"http_url ".
"FROM $CLIENT_TABLE ".
"WHERE $CLIENT_TABLE.client_id=$client_id";
print "<center><table border=\"0\" ";
include("table.inc");
print " width=\"100%\">\n";
list($qh, $num) = dbQuery($query);
if ($num > 0) {
$data = dbResult($qh);
print "<tr><td COLSPAN=3><font SIZE=+1><B>$data[organisation]</B></font></td></tr>\n";
print "<tr><td COLSPAN=3><I>$data[description]</I></td></tr>\n";
print "<tr><td>Address1:</td><td COLSPAN=2 WIDTH=80%> $data[address1]</td></tr>\n";
print "<tr><td>Address2:</td><td COLSPAN=2> $data[address2]</td></tr>\n";
print "<tr><td>ZIP, City:</td><td COLSPAN=2> $data[postal_code] $data[city]</td></tr>\n";
print "<tr><td>Country:</td><td COLSPAN=2> $data[country]</td></tr>\n";
print "<tr><td>Contract:</td><td COLSPAN=2> $data[contact_first_name] $data[contact_last_name]</td></tr>\n";
print "<tr><td>Phone:</td><td COLSPAN=2> $data[phone_number]</td></tr>\n";
print "<tr><td>Fax::</td><td COLSPAN=2> $data[fax_number]</td></tr>\n";
print "<tr><td>GSM:</td><td COLSPAN=2> $data[gsm_number]</td></tr>\n";
} else {
print "None.";
}
print "</td></tr>";
print "</table></center>\n";
?>
</body>
</HTML>
<?php
// vim:ai:ts=4:sw=4
?>