-
Notifications
You must be signed in to change notification settings - Fork 0
/
followUp.php
142 lines (112 loc) · 4.51 KB
/
followUp.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
<?php include('partials/headerSection.php')?>
<div class="main">
<?php include('partials/sideMenu.php')?>
<div class="mainContent">
<div class="topSection flex">
<div class="dashboardTitle">
<h1>Follow Ups Page</h1>
</div>
<div class="userBox flex">
<a href="index.php">
<div class="adminImage">
<img src="./assets/images/pp.jpg" alt="Admin Image">
</div>
</a>
<div class="userName">
<span>Administrator</span>
<small><?php
if(isset($_SESSION['firstName'])){
echo $_SESSION['firstName'];
}
?></small>
</div>
<i class="uil uil-bell icon"></i>
</div>
</div>
<div class="body">
<div class="overViewDiv">
<div class="intro flex" >
<h3 class="title">Followed Up Cases</h3>
<?php
if(isset($_SESSION['follow'])){
echo $_SESSION['follow'];
unset ($_SESSION['follow']);
}
?>
<div class="buttons flex" style="gap: 10px;">
<div class="addBtn">
<a href="cases.php">
<span>Follow New Case</span>
</a>
</div>
<div class="addBtn excelBtn" >
<a href="#">
<span>Export Excel</span>
</a>
</div>
<div class="addBtn">
<a href="searcFollowup.php">
<span>Search</span>
</a>
</div>
</div>
</div>
</div>
<?php
?>
<div class="mainItems">
<table>
<tr class="tableHeader">
<th>OB No.</th>
<th>Incident Type</th>
<th>Date/Time(Followed Up)</th>
<th>Followed By</th>
<th>Status</th>
<th>Edit</th>
<th>Details</th>
</tr>
<?php
$sql = "SELECT * FROM followedup_table";
$res = mysqli_query($conn, $sql);
if($res == TRUE){
$count = mysqli_num_rows($res);
if($count>0){
while($row = mysqli_fetch_assoc($res)){
$id = $row['id'];
$incType = $row['incident_type'];
$obNumber = $row['incident_date'];
$obID = $row['ob_number'];
$dateTime = $row['date_time'];
$followerName = $row['follower_name'];
$status = $row['case_status'];
?>
<tr class="tableData">
<td><?php echo $obNumber;?>/<?php echo $obID;?></td>
<td><?php echo $incType;?></td>
<td><?php echo $dateTime;?></td>
<td><?php echo $followerName;?></td>
<td><?php echo $status;?></td>
<td><a href="<?php echo SITEURL?>updatefollowup.php?id= <?php echo $id;?>"><i class="uil uil-edit icon editIcon"></i></a></td>
<td><a href="<?php echo SITEURL?>followupdetails.php?id= <?php echo $id;?>"><i class="uil uil-file-info-alt icon detailsIcon"></i></a></td>
</tr>
<?php
}
}
else{
?>
<tr>
<td colspan="9"><span class="fail" style="textalign:center; color: red; font-size=25px; margin: 2rem 1rem;">No data in the database!</span></td>
</tr>
<?php
}
}
else{
die('Failed to connect to the database!');
}
?>
</table>
</div>
</div>
</div>
</div>
<?php include('partials/footer.php')?>