-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhome.php
148 lines (106 loc) · 3.33 KB
/
home.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
143
144
145
146
147
148
<?php
session_start();
error_reporting(0);
include_once("homeaddbackend.php");
include_once("homereadbackend.php");
?>
<html>
<head>
<title>Police File Tracker</title>
<link rel = "icon" href="up_police_icon.ico" type = "image/x-icon">
<script src="linksfunctionality.js"></script>
<link rel="stylesheet" href="homestyle.css">
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<script src="linksfunctionality.js"></script>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.1/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.1/js/bootstrap.min.js"></script>
<style>
table, th, td {
border:2px solid black;
}
</style>
</head>
<body>
<?php
if($_SESSION["username"]) {
?>
<div class="container">
<h4>Welcome <?php echo htmlspecialchars($_SESSION["username"]); ?>. <button id="logout" onclick="myFunction2()" type="button">Logout</button> <button id="update" onclick="myFunction3()" type="button">Update</button> <button id="delete" onclick="myFunction4()" type="button">Delete</button> </h4>
<hr>
<h1>Upload File Details:</h1>
<div class="container">
<br>
<form method="post" autocomplete="off">
<div class="row">
<div class="col-sm-3 item"><b>Beneficiary Name</b></div>
<div class="col-sm-2 item"><b>File Type</b></div>
<div class="col-sm-3 item"><b>File Details</b></div>
</div>
<br>
<div class="row">
<div class="col-sm-3 item"><input type="text" name="bnn" class="form-control" required></div>
<div class="col-sm-2 item">
<select name="ft" id="cars" required>
<option value="" selected>Select Options</option>
<option value="TA/DA">TA/DA</option>
<option value="Medical Reimbursment">Medical Reimbursment</option>
<option value="Quarter Allocation">Quarter Allocation</option>
<option value="Leave Request">Leave Request</option>
<option value="Case File">Case File</option>
</select>
</div>
<div class="col-sm-4 item">
<textarea id="w3review" name="fn" class="form-control" rows="2" cols="40" required></textarea>
</div>
<div class="col-sm-3 item"><input type="submit" name="submit" class="btn btn-secondary" value="Create File"></div>
</div>
</form>
<hr>
<?php
if(isset($msg)){ ?>
<div class="alert alert-success centre">
<?php
echo $msg;
?>
</div>
<br>
<?php } ?>
<h1>File Details:</h1>
<br>
<table class="table table-hover">
<tr>
<th>Token No</th>
<th>Beneficiary Name</th>
<th>File Type</th>
<th>File Details</th>
<th>Date of Origin</th>
<th>Status</th>
<th>Updated By</th>
<th>History</th>
</tr>
<?php
while($rows=$resultread->fetch_assoc()){
?>
<tr>
<td><?php echo $rows['tokenno']??''; ?></td>
<td><?php echo $rows['beneficiaryname']??''; ?></td>
<td><?php echo $rows['filtetype']??''; ?></td>
<td><?php echo $rows['filename']??''; ?></td>
<td><?php echo $rows['dateoforigin']??''; ?></td>
<td><?php echo $rows['status']??''; ?></td>
<td><?php echo $rows['updatedby']??''; ?></td>
<td><?php echo $rows['history']??''; ?></td>
</tr>
<?php
}
?>
</table>
<br>
</div>
<?php
}else header("Location:index.php");
?>
</body>
</html>