-
Notifications
You must be signed in to change notification settings - Fork 0
/
account_summary.php
62 lines (46 loc) · 1.19 KB
/
account_summary.php
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
<?
include_once(dirname(__FILE__) . "/first.php");
$library_account_ID = urldecode($query[0]);
if(! $_SESSION['library_account_ID'])
{
exit_error("Not Signed In", "You must be signed into perform that action.");
}; // end if
if(! $db->is_librarian_account && FALSE)
{
exit_error("Access Denied", "Only a librarian can perform that action.");
}; // end if
if($library_account_ID < 1)
{
$library_account_ID = $_SESSION['library_account_ID'];
}; // end if
include_once(dirname(__FILE__) . "/top.php");
$sql = "
SELECT
*
FROM
`" . $db->table_library_checkout . "`
WHERE
`" . $db->field_account_ID . "`='" . $library_account_ID . "'
AND `in_datetime`='" . $db->blank_datetime . "'
";
$result = mysql_query($sql, $mysql->link);
if(mysql_num_rows($result) > 0)
{
?><h1>Items Checked Out</h1><?
while($record = mysql_fetch_object($result))
{
$item_sql = "
SELECT
*
FROM
`" . $db->table_library_item . "`
WHERE
`ID`='" . $record->item_ID . "'
";
$item_result = mysql_query($item_sql, $mysql->link);
$item_record = mysql_fetch_object($item_result);
echo $item_record->title . "<br>";
}; // end while
}; // end if
include_once(dirname(__FILE__) . "/bottom.php");
?>