-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.php
111 lines (99 loc) · 6 KB
/
index.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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
<?php
$page_title = 'Collection Purchase Request';
require_once 'includes/headerNoMenu.php';
require_once 'includes/connection.php';
?>
<form class="container" method="post" action="requestAdd.php">
<table id="request">
<tr class="input requester">
<th class="request requester"><label for="requester">Requester</label></th>
<td class="request requester">
<select id="requester" name="requester">
<?php
$result = mysqli_query($dbc, 'select rqstID, rqstName from requesters order by rqstID') or die('Error retrieving requesters:' . mysqli_error($dbc));
while ($row = mysqli_fetch_assoc($result)) {
echo '<option value='.$row['rqstID'].'>'.$row['rqstName'].'</option>';
}
mysqli_free_result($result);
?>
</select>
</td>
<td class="request requester instructions"><span class="requester instructions">Optional.</span></td>
</tr>
<tr class="input librarian">
<th class="librarian request"><label for="librarian">Librarian Name</label></th>
<td class="librarian request">
<select id="librarian" name="librarian" class="mustHave">
<option class="librSelect" value="" selected="selected"></option>
<?php
$query = "select librID as ID, librFName as FName, librLName as LName " .
"from librarians where librActive='yes' order by librLName";
$result = mysqli_query($dbc, $query) or die('Error querying for librarians: ' . mysqli_error($dbc));
while ($row = mysqli_fetch_assoc($result))
{
$id = $row['ID'];
$librarianName = $row['FName'] . ' ' . $row['LName'];
echo '<option id="libr' . $id . '" value="' . $id . '">' . $librarianName . '</option>';
}
mysqli_free_result($result);
?>
</select>
</td>
<td class="librarian instructions request"><span class="librarian instructions">Required. Select from drop-down. </span></td>
</tr>
<tr class="input itemTitle">
<th class="itemTitle request"><label for="itemTitle">Item Title</label></th>
<td class="itemTitle request"><input id="itemTitle" name="itemTitle" type="text" maxlength="300" class="mustHave"/></td>
<td class="itemTitle instructions request"><span class="itemTitle instructions">Required. </span></td>
</tr>
<tr class="input authorEditor">
<th class="authorEditor request"><label for="authorEditor">Author/Editor</label></th>
<td class="authorEditor request"><input id="authorEditor" name="authorEditor" type="text" maxlength="300" class="mustHave"/></td>
<td class="authorEditor instructions request"><span class="authorEditor instructions">Required. </span></td>
</tr>
<tr class="input isbnOrWeb">
<th class="isbnOrWeb request"><label for="isbnOrWeb">ISBN or Web link</label></th>
<td class="isbnOrWeb request"><input id="isbnOrWeb" name="isbnOrWeb" type="text" maxlength="300" class="mustHave"/></td>
<td class="isbnOrWeb instructions request"><span class="isbnOrWeb instructions">Required. </span></td>
</tr>
<tr class="input academicDept">
<th class="academicDept request"><label for="academicDept">Academic Department</label></th>
<td class="academicDept request">
<select id="academicDept" name="academicDept" class="mustHave">
<option class="adptSelect" value="" selected="selected"></option>
<?php
$query = "select adptID as ID, adptName as Name " .
"from academic_department where adptActive='yes'";
$result = mysqli_query($dbc, $query) or die('Error querying for librarians: ' . mysqli_error($dbc));
while ($row = mysqli_fetch_assoc($result))
{
$id = $row['ID'];
$Name = $row['Name'];
echo '<option id="adpt' . $id . '" value="' . $id . '">' . $Name . '</option>';
}
mysqli_free_result($result);
?>
</select>
</td>
<td class="academicDept instructions request"><span class="academicDept instructions">Required. Select from drop-down. </span></td>
</tr>
<tr class="input rush">
<th class="rush request"><label for="rush">Rush</label></th>
<td class="rush request"><input id="norush" name="rush" value="no" type="radio" checked>No <input id="rush" name="rush" value="yes" type="radio">Yes</td>
<td class="rush instructions request"><span class="rush instructions">Optional. <br>If yes, please add explanation to note.<span></td>
</tr>
<tr class="input notes">
<th class="notes request"><label for="notes">Additional notes <br><span id="noteReason"> </span></label></th>
<td class="notes request"> <textarea id="notes" cols="35" rows="8" name="notes" maxlength="3000"></textarea></td>
<td class="notes instructions request"><span class="notes instructions">Optional.<br>Indicate special instructions, request a hold or notification, etc.<span></td>
</tr>
<tr>
<th><input id="submit" name="submit" type="submit" disabled="disabled" value="Make Request"/></th>
<td></td>
</tr>
</table>
</form>
<?php
//$jsOutput .= '$("#class").spinner();';
require_once 'includes/footer.php';
?>