-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathrequest_approval.php
65 lines (59 loc) · 2.28 KB
/
request_approval.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
<?php # - request_approval.php
session_start();
// If no session value presents, redirect to
if (!isset($_SESSION['nama_user'])) {
require_once('includes/login_functions.php');
$url = absolute_url();
header("Location: $url");
exit();
}
$page_title = 'Daftar Permohonan Sertifikat - Admin YOLO CA';
include('includes/admin_header.html');
include('connect/pg_connect.php');
?>
<!--Header-->
<div class="container">
<div class="row" style="padding-top: 100px;">
<div class="col-md-12">
<div class="panel panel-default">
<div class="panel-body">
<h1>Daftar Permohonan Sertifikat</h1>
<table class="table table-hover table-bordered table-striped">
<thead>
<tr>
<th style="text-align:center;">NAMA ORGANISASI</th>
<th style="text-align:center;width:200px">DOMAIN ORGANISASI</th>
<th style="text-align:center;width:200px">CSR</th>
<th style="text-align:center;width:180px">KONFIRMASI</th>
</tr>
<?php
$q = "SELECT o.nama, o.cn, c.detil_isi, o.id_organisasi
FROM organisasi o, csr c, sertifikat s
WHERE o.id_organisasi = c.id_organisasi
AND o.id_organisasi = s.id_organisasi
AND s.status = 'Pending'";
$result = pg_query($dbc, $q);
while ($row = pg_fetch_array($result)) {
echo "<tr>";
echo "<td>$row[0]</td>";
echo "<td>$row[1]</td>";
if ($row[2] == 'Kosong') {
echo "<td>Belum dimasukkan</td>";
} else {
echo "<td><a href=\" absolute_url() /$row[2]\">klik di sini</a></td>";
}
echo "<td><form action=\"upload_cert.php\" method=\"get\"><input class=\"btn btn-success\" type=\"submit\" name=\"submit\" value=\"approve\" />
<input type=\"hidden\" name=\"org_id\" value=".$row[3]." /></form></td>";
echo "</tr>";
}
?>
</thead>
</table>
</div>
</div>
</div>
</div>
</div>
<?php
include('includes/footer.html');
?>