-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathallequipment_minEB.php
executable file
·106 lines (91 loc) · 2.95 KB
/
allequipment_minEB.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
<?php require_once('config.php');
//include('includes/headingEB.html');
mysql_select_db($database_equip, $equip);
$query_Recordset1 = sprintf("SELECT kit.ID AS KitID, kit.Name AS KitName, kit.ImageThumb AS KitImageThumb, accessorytype.ID AS AccessoryTypeID, accessorytype.Name AS AccessoryTypeName, kit_accessorytype.ID AS KitAccID FROM kit LEFT JOIN kit_accessorytype ON kit_accessorytype.KitID = kit.ID LEFT JOIN accessorytype ON kit_accessorytype.AccessorytypeID = accessorytype.ID ORDER BY kit.ID");
$Recordset1 = mysql_query($query_Recordset1, $equip) or die(mysql_error());
$row_Recordset1 = mysql_fetch_assoc($Recordset1);
$totalRows_Recordset1 = mysql_num_rows($Recordset1);
mysql_select_db($database_equip, $equip);
$query_Recordset2 = sprintf("SELECT * FROM checkedout WHERE DateIn = 0");
$Recordset2 = mysql_query($query_Recordset2, $equip) or die(mysql_error());
$row_Recordset2 = mysql_fetch_assoc($Recordset2);
$totalRows_Recordset2 = mysql_num_rows($Recordset2);
$CheckedOutCount = 0;
?>
<style type="text/css">
<!--
.accessoryText {
font-family: Arial, Helvetica, sans-serif;
font-size: 11px;
font-style: normal;
line-height: normal;
font-weight: normal;
font-variant: normal;
text-transform: none;
color: #666666;
}
-->
</style>
<div align="center"><strong>LIST OF EQUIPMENT</strong><br>
<br>
</div>
<table width="550" border="0" align="center" cellpadding="5" cellspacing="5">
<?php
$AccessoryCount = 0;
do {
if ($CurrentKitID != $row_Recordset1['KitID']) {
if ($FirstTime == 1) {
echo "</td></tr>";
}
$AccessoryCount = 0;
$AccessoryFirstTime = 0;
?>
<tr>
<td>
<? echo $row_Recordset1['KitID']; ?> - <strong>Kit Name:</strong> <? echo $row_Recordset1['KitName']; ?></div>
</td><td>
<?
if(isset($row_Recordset2['ID'])){
do {
if ($row_Recordset1['KitID']==$row_Recordset2['KitID']){
echo("<B><font color=\"red\">Checked Out</font></B>");
}
} while ($row_Recordset2 = mysql_fetch_assoc($Recordset2));
mysql_data_seek($Recordset2, 0);
}
?>
</td>
</tr>
<tr>
<td valign='top' CLASS='accessoryText'>
<?
if (isset($row_Recordset1['KitImageThumb'])){
echo "<p><IMG SRC='images/".$row_Recordset1['KitImageThumb']."' align='center'>";
echo "</td><td valign='top' CLASS='accessoryText'>";
}
if (isset($row_Recordset1['AccessoryTypeName'])){
echo '<em><strong>Accessories</strong></em>';
}
$CurrentKitID = $row_Recordset1['KitID'];
echo "<BR>";
}
if (isset($row_Recordset1['AccessoryTypeName'])){
//echo $row_Recordset1['KitAccID'];
//echo " - ";
if($AccessoryCount > 8){
if($AccessoryFirstTime < 1){
echo "</td><td valign='top' CLASS='accessoryText'>";
$AccessoryFirstTime++;
}
}
echo $row_Recordset1['AccessoryTypeName'];
echo "<BR>";
$AccessoryCount++;
}
$FirstTime++;
} while ($row_Recordset1 = mysql_fetch_assoc($Recordset1));
?>
</div>
</blockquote>
</table>
<?// include('includes/footerEB.html'); ?>