70 |
rodolico |
1 |
<?php
|
|
|
2 |
include_once( '../../header.php' );
|
|
|
3 |
include_once( '../../includes/functions.php' );
|
|
|
4 |
include_once( './functions.php' );
|
|
|
5 |
define ( 'DEBUG', false );
|
|
|
6 |
?>
|
|
|
7 |
<?xml version="1.0" encoding="utf-8"?>
|
|
|
8 |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" >
|
|
|
9 |
<html xmlns="http://www.w3.org/1999/xhtml">
|
|
|
10 |
<head>
|
|
|
11 |
<title>Computer Asset Management Program - Backups - PAGE NAME</title>
|
|
|
12 |
<link rel="stylesheet" type="text/css" href="../../camp.css">
|
|
|
13 |
</head>
|
|
|
14 |
<body>
|
|
|
15 |
<?php include_once('../../menu.php'); ?>
|
|
|
16 |
|
|
|
17 |
<div id="content">
|
|
|
18 |
<?php
|
|
|
19 |
include_once( 'functions.php' );
|
|
|
20 |
/* $sql = "select
|
|
|
21 |
backups.backups_id 'ID',
|
|
|
22 |
device.name 'Device',
|
|
|
23 |
server_device.name 'Server',
|
|
|
24 |
round ( backups.allocated_size / 1024 / 1024, 0 ) 'Size (M)',
|
|
|
25 |
backups.start_time 'Start Time',
|
|
|
26 |
backups.bandwidth_allocated 'Bandwidth (Mb/s)',
|
|
|
27 |
backups.responsible_party 'Responsible'
|
|
|
28 |
from
|
|
|
29 |
backups join device using (device_id)
|
|
|
30 |
join (
|
|
|
31 |
backups_server join device server_device using (device_id)
|
|
|
32 |
)
|
|
|
33 |
using ( backups_server_id )
|
|
|
34 |
where
|
|
|
35 |
backups.removed_date is null
|
|
|
36 |
order by
|
|
|
37 |
server_device.name,
|
|
|
38 |
device.name
|
|
|
39 |
";
|
|
|
40 |
*/
|
|
|
41 |
$sql = insertValuesIntoQuery(SQL_GET_BACKUPS,
|
|
|
42 |
array('whereClause' => setAuth(implode( ' and ',
|
|
|
43 |
array("backups.removed_date is null"
|
|
|
44 |
)))));
|
|
|
45 |
|
|
|
46 |
/*
|
|
|
47 |
* if ( $client_id ) { // we have a client, show sites
|
|
|
48 |
$sql = insertValuesIntoQuery(SQL_SHOW_SITES,
|
|
|
49 |
array('whereClause' => setAuth(implode( ' and ',
|
|
|
50 |
array("site.client_id = $client_id"
|
|
|
51 |
)))));
|
|
|
52 |
|
|
|
53 |
$currentScreen = '<a href="edit.html?command=add_site">Add Site</a>';
|
|
|
54 |
$callables = callableOutput( 'client view', array( 'client_id' => $client_id ) );
|
|
|
55 |
} elseif ($site_id) { // we have a site, show devices
|
|
|
56 |
$sql = insertValuesIntoQuery(SQL_SHOW_DEVICES,
|
|
|
57 |
array('whereClause' => setAuth(implode( ' and ',
|
|
|
58 |
array("device.site_id = $site_id"
|
|
|
59 |
)))));
|
|
|
60 |
$currentScreen = '<a href="edit.html?command=add_device">Add Device</a>';
|
|
|
61 |
$callables = callableOutput( 'site view', array( 'site_id' => $site_id ) );
|
|
|
62 |
|
|
|
63 |
} else { // we have nothing, show client list
|
|
|
64 |
$sql = insertValuesIntoQuery(SQL_SHOW_CLIENTS,
|
|
|
65 |
array('whereClause' => setAuth('1')));
|
|
|
66 |
$currentScreen = '<a href="edit.html?command=add_client">Add Client</a>';
|
|
|
67 |
}
|
|
|
68 |
*/
|
|
|
69 |
//print "<pre>\n$sql\n</pre>";
|
|
|
70 |
print queryToTable( $sql );
|
|
|
71 |
// print $currentScreen;
|
|
|
72 |
// print $callables;
|
|
|
73 |
?>
|
|
|
74 |
|
|
|
75 |
</div>
|
|
|
76 |
</body>
|
|
|
77 |
</html>
|