-
Notifications
You must be signed in to change notification settings - Fork 0
/
search_form.php
226 lines (215 loc) · 7.32 KB
/
search_form.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
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
<html>
<head>
<title>SpratlingSilver.com - Search</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body bgcolor="#FFFFFF" background="images/backgrnd.gif">
<a name="top"></a>
<?php
class MyDB extends SQLite3 {
function __construct() {
$this->open('db/SpratlingData1.sqlite');
}
}
$db = new MyDB();
if(!$db) {
echo $db->lastErrorMsg();
}
include "sidebar.htm";
?>
<table border="0" cellspacing="0" cellpadding="2">
<tr>
<td> </td>
<td> </td>
</tr>
<tr>
<td> </td>
<td>
<table border="0" cellspacing="0" cellpadding="5" align="Center">
<tr>
<td align="center"><b><font size="3" face="Arial" color="#990000">
<div align="center"><font size="3" face="Arial, Helvetica, sans-serif"><b>Spratling
Database Search</b></font></div>
</td>
</tr>
</table>
<p></p>
<form method="post" action="search_results.php" name="">
<table border="0" cellspacing="0" cellpadding="2">
<tr valign="top">
<td align="right"><font size="2" face="Arial"><b>Item:</b>
<br>What is it? </font></td>
<td> <font size="2" face="Arial">
<select name="ItemType[]" size="4" multiple>
<option selected value="All">All Items
<?php
$sql =<<<EOF
SELECT * FROM lkpItemTypes
WHERE ExcludeOnWebsite='False'
ORDER BY ItemType COLLATE NOCASE ASC;
EOF;
$ret = $db->query($sql);
while($row = $ret->fetchArray(SQLITE3_ASSOC) ) {
echo "<option value=". $row['ItemTypeID'] .">". $row['ItemType'] ."</option>";
}
?>
</select>
</font>
<br><font size="1">Multiple select ok</font>
</td>
</tr>
<tr><td><p></p></tr>
<tr valign="top">
<td align="right"><font size="2" face="Arial"><b>Material:</b> <br>What is it made of? </font></td>
<td> <font size="2" face="Arial">
<select name="Materials[]" size="4" multiple>
<option selected value="All">All Materials
<?php
$sql =<<<EOF
SELECT * FROM lkpMaterials
WHERE ExcludeOnWebsite='False'
ORDER BY Material COLLATE NOCASE ASC;
EOF;
$ret = $db->query($sql);
while($row = $ret->fetchArray(SQLITE3_ASSOC) ) {
echo "<option value=". $row['MaterialID'] .">". $row['Material'] ."</option>";
}
?>
</select>
</font></td>
</tr>
<tr><td><p></p></tr>
<tr valign="top">
<td align="right"><font size="2" face="Arial"><b>Primary Hallmark:</b>
</font></td>
<td> <font size="2" face="Arial">
<select name="Primary_Hallmark[]" size="4" multiple>
<option selected value="All">All Hallmarks
<?php
$sql =<<<EOF
SELECT A.HallmarkID, A.Hallmark, B.Level
FROM tblHallmarks A, lkpLevels B
WHERE A.ExcludeOnWebsite='False'
AND A.level=B.LevelID
AND B.level='Primary'
ORDER BY B.Level, A.Hallmark COLLATE NOCASE ASC;
EOF;
$ret = $db->query($sql);
while($row = $ret->fetchArray(SQLITE3_ASSOC) ) {
echo "<option value=". $row['HallmarkId'] .">". $row['Hallmark'] ."</option>";
}
?>
</select>
</font></td>
</tr>
<tr><td></tr>
<tr valign="top">
<td align="right"><font size="2" face="Arial"><b>Secondary Hallmark:</b> <br>Place
</font></td>
<td> <font size="2" face="Arial">
<select name="Secondary_Hallmark[]" size="4" multiple>
<option selected value="All">All Hallmarks
<?php
$sql =<<<EOF
SELECT A.HallmarkID, A.Hallmark, B.Level
FROM tblHallmarks A, lkpLevels B
WHERE A.ExcludeOnWebsite='False'
AND A.level=B.LevelID
AND B.level='Secondary'
ORDER BY B.Level, A.Hallmark COLLATE NOCASE ASC;
EOF;
$ret = $db->query($sql);
while($row = $ret->fetchArray(SQLITE3_ASSOC) ) {
echo "<option value=". $row['HallmarkId'] .">". $row['Hallmark'] ."</option>";
}
?>
</select>
</font></td>
</tr>
<tr><td></tr>
<tr valign="top">
<td align="right"><font size="2" face="Arial"><b>Tertiary Hallmark:</b> <br>Silver Content
</font></td>
<td> <font size="2" face="Arial">
<select name="Third_Hallmark[]" size="4" multiple>
<option selected value="All">All Hallmarks
<?php
$sql =<<<EOF
SELECT A.HallmarkID, A.Hallmark, B.Level
FROM tblHallmarks A, lkpLevels B
WHERE A.ExcludeOnWebsite='False'
AND A.level=B.LevelID
AND B.level='Tertiary'
ORDER BY B.Level, A.Hallmark COLLATE NOCASE ASC;
EOF;
$ret = $db->query($sql);
while($row = $ret->fetchArray(SQLITE3_ASSOC) ) {
echo "<option value=". $row['HallmarkId'] .">". $row['Hallmark'] ."</option>";
}
?>
</select>
</font></td>
</tr>
<tr><td></tr>
<tr valign="top">
<td align="right">
<p><font size="2" face="Arial"><b>Additional Hallmark:</b> </font></p>
</td>
<td> <font size="2" face="Arial">
<select name="Additional_Hallmarks[]" size="4" multiple>
<option selected value="All">All Hallmarks
<?php
$sql =<<<EOF
SELECT A.HallmarkID, A.Hallmark, B.Level
FROM tblHallmarks A, lkpLevels B
WHERE A.ExcludeOnWebsite='False'
AND A.level=B.LevelID
AND B.level='Other'
ORDER BY B.Level, A.Hallmark COLLATE NOCASE ASC;
EOF;
$ret = $db->query($sql);
while($row = $ret->fetchArray(SQLITE3_ASSOC) ) {
echo "<option value=". $row['HallmarkId'] .">". $row['Hallmark'] ."</option>";
}
?>
</select>
</font></td>
</tr>
<tr>
<td width="50"><font face="Arial"></font></td>
<td><font face="Arial"></font></td>
</tr>
<tr>
<td colspan="2"><font face="Arial"></font>
<table border="0" cellspacing="0" cellpadding="5" align="center">
<tr>
<td>
<input type="submit" name="Submit" value="Search">
</td>
<td> </td>
<td>
<input type="reset" name="Submit2" value="Reset">
</td>
<td align=center width=80>
<a href="/search_help.htm"><font face="Arial" size=2>Help</font></a>
</td>
<td>
<a href="/search_catnum.php"><font face="Arial" size=2>Search by Spratling catalog number</font></a>
</td>
</tr>
</table>
<div align="center"><font face="Arial"></font></div>
</td>
</tr>
</table>
</form>
<p> </p>
<p> </p>
<p> </p>
</td>
</tr>
</table>
</table>
<?php include "sidebar_end.htm"; ?>
</body>
</html>