-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdataMhs.php
111 lines (103 loc) · 4.46 KB
/
dataMhs.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
<?php
include 'createdb.php';
require 'functions.php';
$show = query_getData("SELECT * FROM Mahasiswa");
?>
<!DOCTYPE html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.4.1/css/bootstrap.min.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.11.2/css/all.min.css">
<link rel="stylesheet" href="style.css">
<title>Data Mahasiswa</title>
<style>
body,html {
background-image: url("background.jpg");
background-position: center;
background-repeat: no-repeat;
background-size: cover;
background-attachment: fixed;
color: white;
height: 100%;
margin-top: 35px;
}
</style>
<script>
document.getElementById("title_hover").innerHTML="Test";
</script>
</head>
<body>
<nav class="navbar navbar-expand-lg fixed-top navbar-dark bg-dark">
<a class="navbar-brand" href="index.php">Home</a>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#option" aria-controls="option"
aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="option">
<ul class="navbar-nav mr-auto">
<li class="nav-item">
<a class="nav-link" href="dataMhs.php">Daftar Mahasiswa<span class="sr-only">(current)</span></a>
</li>
</ul>
</div>
</nav>
<table border="0" align="center" cellpadding="10" cellspacing="0">
<thead align="center">
<tr>
<th><h3>Daftar Mahasiswa</h3></th>
</tr>
<tr style="width: 50%">
<td >
</td>
</tr>
</thead>
<tbody>
<td style="width: 97%">
<table class="table table table-striped table-dark">
<thead>
<tr>
<th>NO</th>
<th>LANGKAH</th>
<th>NIM</th>
<th>NAMA</th>
<th>EMAIL</th>
<th>JURUSAN</th>
<th>JENJANG</th>
<th>JENIS KELAMIN</th>
<th>ASAL</th>
</tr>
</thead>
<tbody>
<?php $i = 1; ?>
<?php if (!$show)
echo "<tr>
<td colspan='9' align='center'>Data Masih Kosong...</td></tr>";?>
<?php foreach($show as $row): ?>
<tr>
<td><?= $i ?></td>
<td><a href="ubah.php?id=<?= $row["idMahasiswa"]; ?>" class="btn btn-outline-warning" role="button" aria-pressed="active">ubah</a>
<a href="hapus.php?id=<?= $row["idMahasiswa"]; ?>" class="btn btn-outline-danger" role="button" aria-pressed="active">hapus</a></td>
<td><?= $row["nim"] ?></td>
<td><?= $row["nama"] ?></td>
<td><?= $row["email"] ?></td>
<td><?= $row["jurusan"] ?></td>
<td><?= $row["jenjang"] ?></td>
<td><?= $row["jenis_kelamin"] ?></td>
<td><?= $row["kota_asal"] ?></td>
</tr>
<?php $i++; endforeach;?>
</tbody>
</table>
</td>
</tbody>
<tfoot align="center">
<td style="font-family: 'Courier New', Courier, monospace; font-size: 10pt">April 2020</td>
</tfoot>
</table>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.slim.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.16.0/umd/popper.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.4.1/js/bootstrap.min.js"></script>
</body>
</html>