-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathItemUsage.php
More file actions
563 lines (425 loc) · 18.6 KB
/
ItemUsage.php
File metadata and controls
563 lines (425 loc) · 18.6 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
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
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
<?php
require_once('inc/startsession.php');
/////////////////////////////////////////////////////////////////////
//
// Written by Jim Garbe-- Dynamic Checksheet
//
/////////////////////////////////////////////////////////////////////
require_once('inc/appvars.php');
$Title="Item Usage Query";
require_once('inc/title.php');
require("inc/functions.php.inc");
require_once('inc/connectvars.php');
// Generate the navigation menu
if (isset($_SESSION['username'])) {
}
else {
echo ' <a href="login.php">Log In</a><br />';
//echo ' <a href="signup.php">Sign Up</a>';
}
// Connect to the database
$dbc = mysqli_connect(DB_HOST, DB_USER, DB_PASSWORD, DB_NAME);
// Retrieve the user data from MySQL
$query = "SELECT user_id, first_name FROM _user WHERE first_name IS NOT NULL ORDER BY join_date DESC LIMIT 5";
$data = mysqli_query($dbc, $query);
mysqli_close($dbc);
?>
</div>
<?php
if (isset($_SESSION['user_id']) && ($_SESSION['status'] < 3)) {
////////////////////////////////////////////////////////////////////////////////////////////////////
//
// Verticle Bar Gragh
//
//////////////////////////////////////////////////////////////////////////////////////////////////////
function verticle_bar_graph($width, $height, $data, $max_value, $filename,$item_id) {
$img= imagecreatetruecolor($width, $height);
$bg_color=imagecolorallocate ($img, 255,255,255);
$text_color=imagecolorallocate ($img, 255,86,7);
$bar_color=imagecolorallocate ($img, 0,0,0);
$border_color=imagecolorallocate ($img, 192,192,192);
imagefilledrectangle($img, 0, 0, $width, $height, $bg_color);
$bar_width= $width/((count($data) *2) +1);
for($i=0;$i< count($data);$i++) {
imagefilledrectangle($img, ($i*$bar_width*2) +$bar_width,$height,($i*$bar_width*2) + ($bar_width*2), $height-(($height/$max_value)*$data[$i][1]), $bar_color);
imagestringup($img,5,($i*$bar_width*2)+($bar_width), $height-5, $data[$i][0]."--".$data[$i][1]." ".ItemidtoName($item_id), $text_color);
}
imagerectangle($img, 0, 0, $width-1, $height-1, $border_color);
//for($i = 1; $i<=$max_value;$i++) {
// imagestring($img,5,0,$height-($i*($height/$max_value)), $i, $bar_color);
//}
imagepng($img,$filename,5);
imagedestroy($img);
}
////////////////////////////////////////////////////////////////////////////////////////////////////
//
// End Verticle Bar GRaph
//
//////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////
//
// Horizontal Bar Gragh
//
//////////////////////////////////////////////////////////////////////////////////////////////////////
function horizontal_bar_graph($width, $height, $data, $max_value, $filename, $item_id) {
$img= imagecreatetruecolor($width, $height);
$bg_color=imagecolorallocate ($img, 255,255,255);
$text_color=imagecolorallocate ($img, 255,86,7);
$bar_color=imagecolorallocate ($img, 5,19,143);
$border_color=imagecolorallocate ($img, 192,192,192);
imagefilledrectangle($img, 0, 0, $width, $height, $bg_color);
$bar_height= $height/((count($data) *2) +1); // height of each bar= (total height/no. of bars)2 + pixel spacer
for($i=0;$i< count($data);$i++) { //for each bar
imagefilledrectangle($img,0, ($i*$bar_height*2) +$bar_height, (($width/$max_value)*$data[$i][1]),($i*$bar_height*2) + ($bar_height*2), $bar_color);
imagestring($img,5,5,($i*$bar_height*2)+($bar_height), $data[$i][0]."--".$data[$i][1]." ".ItemidtoName($item_id), $text_color);
}
imagerectangle($img, 0, 0, $width-3, $height-3, $border_color);
//for($i = 1; $i<=$max_value;$i++) {
// imagestring($img,5,$i*($width/$max_value),0,$i , $bar_color);}
imagepng($img,$filename,5);
imagedestroy($img);
}
////////////////////////////////////////////////////////////////////////////////////////////////////
//
// End Horizontal Bar GRaph
//
//////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////
//
// Render Info
//
//////////////////////////////////////////////////////////////////////////////////////////////////////
if (isset($_POST['item_usage']) && !empty($_POST['criteria']) && !empty($_POST['item_id'])) {
$BDay=$_POST['BDay'];
$BMonth=$_POST['BMonth'];
$BYear=$_POST['BYear'];
$EDay=$_POST['EDay'];
$EMonth=$_POST['EMonth'];
$EYear=$_POST['EYear'];
$criteria=$_POST['criteria'];
$item_id=$_POST['item_id'];
//print("$item_id");
if (empty($_POST['BMonth'])) {
$BMonth=date ("m");
}
if (empty($_POST['BYear'])) {
$BYear=date ("Y");
}
if (empty($_POST['BDay'])) {
$BDay=date ("d");
}
if (empty($_POST['EMonth'])) {
$EMonth=date ("m");
}
if (empty($_POST['EYear'])) {
$EYear=date ("Y");
}
if (empty($_POST['EDay'])) {
$EDay=date ("d");
}
//echo " $BDay, $BMonth, $BYear ------$EDay, $EMonth, $EYear ";
//$ffilled = ffill($Month,$Year);
//Calculate the viewed Month.
$Begdate=mktime(0,0,0,$BMonth,$BDay,$BYear);
$Enddate=mktime(23,59,59,$EMonth,$EDay,$EYear);
//echo"$Begdate";
//echo"$Enddate";
//Get all of the Checksheets to query from
require_once('inc/connectvars.php');
$dbc = mysqli_connect(DB_HOST, DB_USER, DB_PASSWORD, DB_NAME);
//first, get the Primary Checksheet names.
$sqlpch="SELECT * FROM Checksheets WHERE (merged IS NULL || merged = '0') order by ChecksheetName";
$resultpch = mysqli_query($dbc, $sqlpch);
while ($rowpch = mysqli_fetch_array($resultpch, MYSQL_NUM)) {
$PChName = $rowpch[1]; //The Name of each Checksheet
$PChEvent = $rowpch[1]."_events"; //the events in each Checksheet Table
$PChCh = $rowpch[1]."_checksheet"; //Each Checksheet Name
$Prim_id = $rowpch[0]; //Each Checksheet id
//second, get the merged Checksheet names.
$sqlsch="SELECT * FROM Checksheets WHERE merged = '".$Prim_id."' order by ChecksheetName";
$resultsch = mysqli_query($dbc, $sqlsch)or die("MySQL error: " . mysqli_error($dbc) . "<hr>\nQuery: $sqlsch");
while ($rowsch = mysqli_fetch_array($resultsch, MYSQL_NUM)) {
$SChName = $rowsch[1]; //The Name of each Checksheet
$SChEvent = $rowsch[1]."_events"; //the events in each Checksheet Table
$SChCh = $rowsch[1]."_checksheet"; //Each Checksheet Name
$PCh[$PChName][]=$rowsch[1]; //Each Checksheet id
} //End getting the Secondary Checksheets.
} //End getting the Primary Checksheets.
//print_r2($PCh);
//////////////////////////////////////////////////////////////////////////////////////////
// Query by Checksheet
//
/////////////////////////////////////////////////////////////////////////////////////////////
if ($criteria == 'Primary_Checksheet') {
print("Sometimes the caching on your computer's web browser may show the previous query graphic. Just hit the \"F5\" button to update. I'll fix it later.");
foreach ($PCh as $Primary => $Secondary_set) {
$PCH=$Primary."_checksheet";
$PCHE=$Primary."_events";
$counter[][0]=$PCH;
$dbc = mysqli_connect(DB_HOST, DB_USER, DB_PASSWORD, DB_NAME);
$sqliq="SELECT * FROM ".$PCH.",".$PCHE." WHERE item_id = '".$item_id."' AND ".$PCH.".event_id = ".$PCHE.".id AND ".$PCHE.".submitted = '1' AND (UNIX_TIMESTAMP(".$PCHE.".date) BETWEEN ".$Begdate." AND ".$Enddate.") ";
$resultiq = mysqli_query($dbc, $sqliq);
//if ($resultiq) {
// $rowiq = mysqli_fetch_array($resultiq,MYSQLI_ASSOC);
while ($rowiq = mysqli_fetch_array($resultiq)) {
$result = $rowiq['result']; //Each Checksheet Name
if($rowiq['hm_value_id']=='cb') {$hm=1;} else {$hm=$rowiq['hm_value_id'];} //Each Checksheet Name
$amt=$hm-$result;
if($amt >=1) {$counter[count($counter)-1][1]=$counter[count($counter)-1][1]+$amt; }
$added=$added+($hm-$result);
//$counter[][$Primary][$date][]=$amt;
}
foreach ($Secondary_set as $SCH) {
$SCHCH=$SCH."_checksheet";
$SCHCHE=$SCH."_events";
// print("$SCHCH--$SCHCHE<br>");
//print("<br>$item_id<br>");
//$counter[count($counter)-1][1]=$SCHCH;
$dbc = mysqli_connect(DB_HOST, DB_USER, DB_PASSWORD, DB_NAME);
$sqlsiq="SELECT * FROM $SCHCH,$SCHCHE WHERE item_id = '".$item_id."' AND $SCHCH.event_id = $SCHCHE.id AND $SCHCHE.submitted = '1' AND (UNIX_TIMESTAMP(".$SCHCHE.".date) BETWEEN ".$Begdate." AND ".$Enddate.")";
$resultsiq = mysqli_query($dbc, $sqlsiq)or die("MySQL error: " . mysqli_error($dbc) . "<hr>\nQuery: $sqlsiq");
//if ($resultsiq) {
//$rowsiq = mysqli_fetch_array($resultsiq, MYSQLI_ASSOC);
while ($rowsiq = mysqli_fetch_array($resultsiq)) {
$result = $rowsiq['result'];
if($rowsiq['hm_value_id']=='cb') {$hm=1;} else {$hm=$rowsiq['hm_value_id'];} //Each Checksheet Name
$amt=$hm-$result;
$added=$added+($hm-$result);
if($amt >=1) {$counter[count($counter)-1][1]=$counter[count($counter)-1][1]+$amt; }
$id=$rowsiq['id'];
} //End getting the Primary Query
} //End getting the Primary Query
} //End of for each $Primary (Primary Checksheet)
//print_r2($counter);
foreach($counter as $ch) {
$no[] = $ch[1]; }
//print_r2($no);
$greatest = max($no);
//print("The greatest no. =$greatest");
print("<br>TTL Items = ".$added." ".ItemidtoName($item_id).". \n");
$Chart_Size = $greatest+$greatest*0.1;
print("<div><center><table><tr>");
print("<th>".ItemidtoName($item_id)." ordered between ".date("M d H:i:s", $Begdate)." and ".date("M d H:i:s", $Enddate).". </th>");
print("</tr>");
print("<td style=\"padding:10;text-align:center;\">");
//verticle_bar_graph(800, 600, $counter, $Chart_Size, MM_UPLOADPATH.'ch_usage.png',$item_id);
horizontal_bar_graph(600, 800, $counter, $Chart_Size, MM_UPLOADPATH.'ch_usage.png',$item_id);
echo'<img src="'.MM_UPLOADPATH.'ch_usage.png" alt="Bar Graph" />';
print("</td></tr></table></center></div>");
}
//////////////////////////////////////////////////////////////////////////////////////////////////////////
// CallSign Query
//
//////////////////////////////////////////////////////////////////////////////////////////////////////////
if ($criteria == 'CallSign') {
print("Sometimes the caching on your computer's web browser may show the previous query graphic. Just hit the \"F5\" button to update. I'll fix it later.");
//print ("$criteria--$item_id");
//print_r2($counter);
//print("Under Construction!");
$dbc = mysqli_connect(DB_HOST, DB_USER, DB_PASSWORD, DB_NAME);
$sqlCS="SELECT * FROM CallSign";
$resultCS = mysqli_query($dbc, $sqlCS);
while ($rowCS = mysqli_fetch_array($resultCS)) {
$CSid[]=$rowCS['id']; }
//print_r2($CSid); //testing array
mysqli_close($dbc);
$dbc = mysqli_connect(DB_HOST, DB_USER, DB_PASSWORD, DB_NAME);
$sqlCH="SELECT * FROM Checksheets cs1 where (cs1.merged IS NULL || cs1.merged ='0')";
$resultCH = mysqli_query($dbc, $sqlCH);
while ($rowCH = mysqli_fetch_array($resultCH)) {
$CHNames[][0]=$rowCH['ChecksheetName'];
$CHNames[count($CHNames)-1][1]=$rowCH['id'];
//$CHNames[count($CHNames)-1][2]=$rowCH[merged];
}
//print_r2($CHNames); //testing array
mysqli_close($dbc);
foreach($CSid as $CS) { //For Each Call Sign
$CSName=reciper($CS,'CallSign');
// print("<br>$CSName");
$CHE[][0]=$CSName;
foreach($CHNames as $CH) {
$CSCH=$CH[0]."_checksheet";
$CSCHE=$CH[0]."_events";
$CHID=$CH[1]; //id
$dbc = mysqli_connect(DB_HOST, DB_USER, DB_PASSWORD, DB_NAME);
// print("<br>".$CH[0]."--".$CH[1]."--".$CH[2]."</br>");
$sqlsecondary="SELECT cs2.ChecksheetName FROM Checksheets cs2 WHERE (cs2.merged = '".$CHID."' || cs2.id = '".$CHID."')";
$resultsecondary = mysqli_query($dbc, $sqlsecondary)or die("MySQL error: " . mysqli_error($dbc) . "<hr>\nQuery: $sqlsecondary");
while ($rowsecondary = mysqli_fetch_array($resultsecondary)) {
$CSCH2=$rowsecondary['ChecksheetName']."_checksheet";
// print("<br>$CSCH2");
//The big query
$sqlCHE="SELECT ch2.event_id,ch2.hm_value_id, ch2.result FROM $CSCH,".$CSCHE." sch1".
",".$CSCH2." ch2 ".
"WHERE ".
" ".$CSCH.".item_id = '7'".
" AND ".
" ".$CSCH.".result = '".$CS."' ".
"AND ch2.item_id = '".$item_id."' ".
"AND ".$CSCH.".event_id = ch2.event_id ".
"AND ".$CSCH.".event_id = sch1.id".
" AND sch1.submitted = '1' AND (UNIX_TIMESTAMP(sch1.date) BETWEEN ".$Begdate." AND ".$Enddate.") ";
$resultCHE = mysqli_query($dbc, $sqlCHE)or die("MySQL error: " . mysqli_error($dbc) . "<hr>\nQuery: $sqlsiq");
while ($rowCHE = mysqli_fetch_array($resultCHE)) {
//$hm=rowCHE[hm_value_id];
$result=$rowCHE['result'];
if($rowCHE['hm_value_id']=='cb') {$hm=1;} else {$hm=$rowCHE['hm_value_id'];} //Each Checksheet Name
$amt=$hm-$result;
if($amt >=1) {$CHE[count($CHE)-1][1]=$CHE[count($CHE)-1][1]+$amt;
}
$added=$added+($hm-$result);
}
} //End of foreach $CH2
} //End of foreach $CH*/
} // End of foreach $CSid
mysqli_close($dbc);
//print_r2($CHE);
foreach($CHE as $ch) {
$no[] = $ch[1]; }
//print_r2($no);
$greatest = max($no);
//print("The greatest no. =$greatest");
print("<br>TTL Items = ".$added." ".ItemidtoName($item_id).". \n");
$Chart_Size = $greatest+$greatest*0.1;
print("<div><center><table><tr>");
print("<th>".ItemidtoName($item_id)." ordered between ".date("M d H:i:s", $Begdate)." and ".date("M d H:i:s", $Enddate).". </th>");
print("</tr>");
print("<td style=\"padding:10;text-align:center;\">");
//verticle_bar_graph(800, 600, $counter, $Chart_Size, MM_UPLOADPATH.'ch_usage.png',$item_id);
horizontal_bar_graph(800, 800, $CHE, $Chart_Size, MM_UPLOADPATH.'ch_usage.png',$item_id);
echo'<img src="'.MM_UPLOADPATH.'ch_usage.png" alt="Bar Graph" />';
print("</td></tr></table></center></div>");
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//
//
//
//
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
}
} elseif (isset($_POST['item_usage']) && (empty($_POST['criteria']) || empty($_POST['item_id']))) { print("Please go back and fill, both, the \"Criteria\" and \"Item\" fields."); } else { //Open the initial form
////////////////////////////////////////////////////////////////////////////////////////////////////
//
// Opening Form
//
//////////////////////////////////////////////////////////////////////////////////////////////////////
print("<table border=1>");
print("<tr><th colspan=4>Item Query Generator</th></tr>");
print("<TR><td style=\"text-align:center;\"><label>Item</label></TD>");
print("<td style=\"text-align:center;\"><label>Criteria</label></td>");
print("<td style=\"text-align:center;\"><label>Beginning Date</label></td>");
print("<td style=\"text-align:center;\"><label>Ending Date</label></td>");
print("</TR>");
?>
<tr><TD>
<form name="item_usage" ID="item_usage" ACTION="<?php echo $PHP_SELF; ?>" METHOD="post" >
<?
//echo"<label>Select Item</label>";
$dbc = mysqli_connect(DB_HOST, DB_USER, DB_PASSWORD, DB_NAME);
$itemoptions="";
$itemoptions .="<OPTION VALUE=\"\">Choose</OPTION>\n";
$sqlnegcat3 ="SELECT DISTINCT * FROM Items WHERE Items.item_id ORDER BY item_name";
$resultnegcat3 = mysqli_query($dbc,$sqlnegcat3) or die ("can't get the Checksheet negcat3 selection.");
while ($rownegcat3=mysqli_fetch_array($resultnegcat3)) {
$item_id=$rownegcat3['item_id'];
$item_name=$rownegcat3['item_name'];
//echo"$newcategory_name<br>";
$itemoptions .="<OPTION VALUE=\"$item_id\">".$item_name."</OPTION>\n";
}
mysqli_close($dbc);
echo"<SELECT NAME=item_id >\n";
?>
<?=$itemoptions?>
</SELECT> <br>
<?php
print("</td><td>");
//echo"<label>By Criteria</label>";
$criteriaoptions .="<OPTION VALUE=\"\">Choose</OPTION>\n";
$criteriaoptions .="<OPTION VALUE=\"Primary_Checksheet\">Checksheet</OPTION>\n";
$criteriaoptions .="<OPTION VALUE=\"CallSign\">Call Sign</OPTION>\n";
echo"<SELECT NAME=criteria >\n";
?>
<?=$criteriaoptions?>
</SELECT> <br>
<?php
print("</td><td>");
//////////////////////////////////////////////////////////////////////////
// Day of Month Selection
////////////////////////////////////////////////////////////////////////
print ("<SELECT NAME=BDay>\n
<OPTION VALUE=''>Today</OPTION>\n ");
for($day=1; $day <=31; $day++) {
print ("<OPTION VALUE=".$day.">".$day."</OPTION>\n");
}
print("</SELECT>\n");
////////////////////////////////////////////////////////////////////////////
// End of Day of Month Selection
///////////////////////////////////////////////////////////////////////////
print ("<SELECT NAME=BMonth>
<OPTION VALUE=''>This Month</OPTION>\n
<OPTION VALUE=01>January</OPTION>\n
<OPTION VALUE=02>February</OPTION>\n
<OPTION VALUE=03>March</OPTION>\n
<OPTION VALUE=04>April</OPTION>\n
<OPTION VALUE=05>May</OPTION>\n
<OPTION VALUE=06>June</OPTION>\n
<OPTION VALUE=07>July</OPTION>\n
<OPTION VALUE=08>August</OPTION>\n
<OPTION VALUE=09>September</OPTION>\n
<OPTION VALUE=10>October</OPTION>\n
<OPTION VALUE=11>November</OPTION>\n
<OPTION VALUE=12>December</OPTION>\n
</SELECT>\n");
print ("<SELECT NAME=BYear>
<OPTION VALUE=''>This Year</OPTION>\n
<OPTION VALUE=2010>2010</OPTION>\n
<OPTION VALUE=2011>2011</OPTION>\n
<OPTION VALUE=2012>2012</OPTION>\n
<OPTION VALUE=2013>2013</OPTION>\n
<OPTION VALUE=2014>2014</OPTION>\n
</SELECT>\n");
print ("</td><td>");
//////////////////////////////////////////////////////////////////////////
// Day of Month Selection
////////////////////////////////////////////////////////////////////////
print ("<SELECT NAME=EDay>\n
<OPTION VALUE=''>Today</OPTION>\n ");
for($day=1; $day <=31; $day++) {
print ("<OPTION VALUE=".$day.">".$day."</OPTION>\n");
}
print("</SELECT>\n");
////////////////////////////////////////////////////////////////////////////
// End of Day of Month Selection
///////////////////////////////////////////////////////////////////////////
print ("<SELECT NAME=EMonth>
<OPTION VALUE=''>This Month</OPTION>\n
<OPTION VALUE=01>January</OPTION>\n
<OPTION VALUE=02>February</OPTION>\n
<OPTION VALUE=03>March</OPTION>\n
<OPTION VALUE=04>April</OPTION>\n
<OPTION VALUE=05>May</OPTION>\n
<OPTION VALUE=06>June</OPTION>\n
<OPTION VALUE=07>July</OPTION>\n
<OPTION VALUE=08>August</OPTION>\n
<OPTION VALUE=09>September</OPTION>\n
<OPTION VALUE=10>October</OPTION>\n
<OPTION VALUE=11>November</OPTION>\n
<OPTION VALUE=12>December</OPTION>\n
</SELECT>\n");
print ("<SELECT NAME=EYear>
<OPTION VALUE=''>This Year</OPTION>\n
<OPTION VALUE=2010>2010</OPTION>\n
<OPTION VALUE=2011>2011</OPTION>\n
<OPTION VALUE=2012>2012</OPTION>\n
<OPTION VALUE=2013>2013</OPTION>\n
<OPTION VALUE=2014>2014</OPTION>\n
</SELECT>\n");
print ("</td></tr><tr><td colspan=4>");
print(" <center><INPUT TYPE='submit' NAME='item_usage' ID='item_usage' VALUE='Submit' ></center>");
?>
</form>
</td></tr>
</table>
<?php
//print("<center><p>This data is only queriable from December, 15th 2010 to present time.</p></center> ");
} //End the Form
}?>