This repository has been archived by the owner on Feb 11, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
inbox.php
78 lines (70 loc) · 3.22 KB
/
inbox.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
<?php
//cek status login
include "include/auth.php";
//file configurasi
include "include/config.php";
//mengambil data surat
$sql = "SELECT * from inbox";
$query = mysql_query ($sql,$connect);
//title page
$titlepage = "Surat Masuk";
//header aplikasi
include "include/header.php";
?>
<div class="wrapper">
<div class="container">
<div class="row">
<?php include "include/menu.php";?>
<div class="span9">
<div class="content">
<div class="module">
<div class="module-head">
<a href="proses/input_inbox.php" class="btn btn-module pull-right"><i class="icon-plus"></i> Tambah Data</a>
<h2><?php echo $titlepage;?> </h2>
</div>
<div class="module-body table">
<table cellpadding="0" cellspacing="0" border="0" class="datatable-1 table table-striped display"
width="100%">
<thead>
<tr>
<th>No Surat</th>
<th>Perihal</th>
<th>Pengirim</th>
<th>Status</th>
<th>Aksi</th>
</tr>
</thead>
<tbody>
<?php
while($data = mysql_fetch_array ($query)){
$tarik = mysql_query("select * from disposisi where id_surat='$data[id_surat]'",$connect);
$cek1 = mysql_num_rows($tarik);
$cek = mysql_fetch_array($tarik); ?>
<tr>
<td><?php echo $data['no_surat'];?></td>
<td><?php echo $data['perihal'];?></td>
<td><?php echo $data['pengirim'];?></td>
<td><?php if($cek['status'] == 'Diterima'){ echo '<a class="btn btn-small btn-success">Diterima</a>';} if($cek['status'] == 'Ditolak'){ echo '<a class="btn btn-small btn-danger">Ditolak</a>';} if($cek['status'] == 'Pending'){ echo '<a class="btn btn-small btn-warning">Pending</a>';} if($cek1 == 0){ echo '<a class="btn btn-small"> - </a>';} ?>
<td>
<div class="btn-group">
<a href="proses/detail_inbox.php?id=<?php echo $data['id_surat'];?>" class="btn btn-small">Detail</a>
<a type="button" class="btn dropdown-toggle" data-toggle="dropdown">
<span class="caret"></span>
</a>
<ul class="dropdown-menu">
<li><a href="proses/disposisi.php?id=<?php echo $data['id_surat'];?>" >Disposisi</a></li>
</ul>
</div>
</td>
</tr>
<?php } ?>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<?php include "include/footer.php";?>