-
Notifications
You must be signed in to change notification settings - Fork 0
/
ActivityProposal-Table-Select.php
69 lines (68 loc) · 2.21 KB
/
ActivityProposal-Table-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
<?php
include('Connection.php');
session_start();
$output = '';
//$sql = "SELECT * FROM events where course = 'BSIT' and situation = 'Verified' order by date";
$sql = "SELECT title,start,place,ap_status,ap_id FROM ((events INNER JOIN activityproposal ON events.id = activityproposal.events_id))
inner join student_council on student_council.idstudent_council = events.student_council_idstudent_council
where student_council.organization_ID = '".$_SESSION['OrgID']."' and ap_status != 'Returned'";
// SELECT *, users.Department FROM events INNER JOIN users ON events.created = users.ID where users.Department = "BSN" and Situation = 'Verified' order by date
$result = mysqli_query($conn, $sql);
if(mysqli_num_rows($result) > 0 )
{
echo '<div class = "table-responsive">';
echo '<table class = "table">
<thead>
<tr>
<th colspan = "6" class = "text-center">List of <kbd>Activity Proposals</kbd></th>
</tr>
<tr>
<th>Title</th>
<th>Date</th>
<th>Place</th>
<th>Status</th>
<th>Functions</th>
</tr>
</thead>';
while($row = mysqli_fetch_array($result))
{
if($row["ap_status"] == 'Returned')
{
$stat = 'danger';
}
elseif ($row["ap_status"] == 'Pending')
{
$stat = 'info';
}
else
{
$stat = 'success';
}
echo '<tr class = "'.$stat.'">
<td class = "user_id" data-idpass ="'.$row["ap_id"].'">' .$row["title"].'</td>
<td class ="firstname" data-id1 = "'.$row["start"].'" >'.$row["start"].'</td>
<td class ="lastname" data-column="emp_lastname" data-id2 = "'.$row["place"].'">'.$row["place"].'</td>
<td class ="password" data-column="emp_password" data-id3 = "'.$row["ap_status"].'">'.$row["ap_status"].'</td>
<td>
<a name = "btn_makeAP" id = "btn_makeAP" data-toggle="modal" data-target="#myModal" data-id5="'.$row["ap_id"].'" class="btn btn-sm btn-primary">
<span class="glyphicon glyphicon-plus-sign"></span> Make Activity Proposal</a>
</td>
</tr>';
}
}
else
{
echo '<table class = "table">
<thead>
<tr>
<th colspan = "6" class = "text-center">List of <kbd>Activity Proposals</kbd></th>
<tr>
</thead>
';
echo '<tr>
<td colspan = "6" class = "text-center"> No verified events yet </td>
</tr>';
}
echo '</table>';
echo '</div>';
?>