-
Notifications
You must be signed in to change notification settings - Fork 0
/
Event-Index-TLTSEquip-Select.php
85 lines (85 loc) · 3.07 KB
/
Event-Index-TLTSEquip-Select.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
<?php
include('Connection.php');
$sql = "SELECT * FROM ap_reservation where ap_reservation_main_ID = '".$_POST["id"]."' and Sector ='TLTS'";
$result = mysqli_query($conn, $sql);
if(mysqli_num_rows($result) > 0 )
{
echo '<table class = "table">
<thead>
<tr>
<th colspan = "3" class = "text-center">Teaching and Learning Technology Department(Equipment and Materials)</th>
</tr>
<tr>
<th>Pieces</th>
<th>Item</th>
<th>Functions</th>
</tr>
</thead>';
while($row = mysqli_fetch_array($result))
{
echo '
<tbody>
<tr>
<td data-idpass ="'.$row["ID"].'">' .$row["Pcs"].'</td>
<td data-idpass ="'.$row["ID"].'">' .$row["Subject"].'</td>
<td>
<button id ="btn_del-TLTSEquip" data-idunique = "'.$row["ID"].'" class="btn btn-sm btn-danger">
<span class="glyphicon glyphicon-remove"></span> Remove</button>
</td>
</tr>';
}
echo '
<tbody>
<tr>
<td><input type = "number" placeholder ="Pcs" id = "tltsequip-pcs" min = "0" value ="" class="form-control"></td>
<td>
<select class="selectpicker form-control" id = "tltsequip-subject" >
<option value="">Choose here...</option>
<option value="CD/Casette Player">CD/Casette Player</option>
<option value="Microphone/Karaoke">Microphone/Karaoke</option>
<option value="DVD/VCD Player">DVD/VCD Player</option>
<option value="Digital/Video Camera">Digital/Video Camera</option>
<option value = "Laptop/Wide Screen">Laptop/Wide Screen</option>
<option value="LCD/Overhead/Projector">LCD/Overhead/Projector</option>
</select>
</td>
<td><button type= "button" id ="btn_add-TLTSEquip" data-id6 = "'.$_POST["id"].'" class="btn btn-sm btn-success">
<span class="glyphicon glyphicon-plus"></span> Add</button></td>
</tr>
</tbody>';
}
else
{
echo '<table class = "table">
<thead>
<tr>
<th colspan = "3" class = "text-center">Teaching and Learning Technology Department(Equipment and Materials)</th>
</tr>
<tr>
<th>Pieces</th>
<th>Item</th>
<th>Functions</th>
</tr>
</thead>';
echo '
<tbody>
<tr>
<td><input type = "number" placeholder ="Pcs" id = "tltsequip-pcs" min = "0" value ="" class="form-control"></td>
<td>
<select class="form-control" id = "tltsequip-subject" >
<option value="">Choose here...</option>
<option value="CD/Casette Player">CD/Casette Player</option>
<option value="Microphone/Karaoke">Microphone/Karaoke</option>
<option value="DVD/VCD Player">DVD/VCD Player</option>
<option value="Digital/Video Camera">Digital/Video Camera</option>
<option value = "Laptop/Wide Screen">Laptop/Wide Screen</option>
<option value="LCD/Overhead/Projector">LCD/Overhead/Projector</option>
</select>
</td>
<td><button type= "button" id ="btn_add-TLTSEquip" data-id6 = "'.$_POST["id"].'" class="btn btn-sm btn-success">
<span class="glyphicon glyphicon-plus"></span> Add</button></td>
</tr>
</tbody>';
}
echo '</table>';
?>