Vous êtes sur la page 1sur 9

MEMBUAT APLIKASI BERBASIS WEB

(APLIKASI PELAPORAN BELAJAR SISWA DENGAN BERBEDA-


BEDA HAK AKSES)

LAPORAN

Diajukan Untuk memenuhi salah satu syarat Pelaksanaan Uji


Kompetensi

Praktek Kejuruan SMK SWASTA TELADAN SUMATERA UTARA 2

TAHUN AJARAN 2016/2017

Oleh:

Roulina Nainggolan
01-152-065-9

KOMPETENSI KEAHLIAN REKAYASA PERANGKAT LUNAK


SMK SWASTA TELADAN SUMATERA UTARA-2
2017
1.LOGIN ADMIN

<?php
session_start();
if (isset($_SESSION['username'])){
echo"Anda Telah Login, Silahkan masuk ke <a
href='admin'>Admin</a><br>Jika Anda Ingin Logout <a
href='logout.php'>Klik Di Sini</a>"
?>

<?php
}else
{
?>
<html>
<title>Login Admin</title>
<style type="text/css">
<!--
-->
</style>
<body <body background="paris.jpg">
<style type="text/css">
<!--
.style2 {color: #166D12}
-->
</style>
<div align="center">
<p>&nbsp;</p>
<h1 class="judul"><strong>LOGIN ADMIN</strong></h1>
<br /><br />
<form method="post" action="login.php">
<table width="329" height="198" border="0" align="center"
bgcolor="#00FF00">
<tr>
<th width="24" rowspan="3" scope="row">&nbsp;</th>
<th height="35%" colspan="3" scope="row">&nbsp;</th>
<td width="22" rowspan="3">&nbsp;</td>
</tr>
<tr>
<th width="85" height="45" scope="row"> <div
align="left">Username</div></th>
<td width="15">:</td>
<td width="161">
<input type="text" name="username" /></td>
</tr>
<tr>
<th height="47" scope="row"><div
align="left">Password</div></th>
<td>:</td>
<td><input type="password" name="password" /></td>
</tr>
<tr>
<th height="45" colspan="5" scope="row">
<input type="submit" name="Submit" value="Login" />
<input name="reset" type="reset" value="Reset" /></th>
</tr>
<tr>
<th height="27" colspan="5" scope="row">&nbsp;</th>
</tr>
</table>
</form>
</div>
</body>
</html>
<?php
}
?>
Tampilan Web

<?php include "../proteksi.php"; ?>

<a class="logout" href='../logout.php'>Klik Di Sini</a>

<!DOCTYPE html>
<html>
<head>
<title>Halaman Admin</title>
<link rel="stylesheet" type="text/css" href="style.css">
</head>
<body>
<div id="header"><marquee behavior="alternate">Welcome to
Teladan</marquee>
</div>
<div id="Top"> <div id="Menu_atas">
<a href="#">Sitemap</a>
<a href="#">Profil Sekolah</a>
<a href="#">Recent post</a>
</div> </div>
<div id="Menu_kiri"> <ul>
<li><a href="#">Home</a></ul></li>
<ul><li><a href="data_siswa.php">Data Siswa</a></ul></li>
<ul><li><a href="Tutorial.php">Tutorial</a></ul></li>
<ul><li><a href="berita.php">Berita terbaru</a></ul></li>
<ul><li><a href="../logout.php">Logout</a></ul></li>
</div>
<div id="content">

Tampilan Data Siswa

Data Siswa
<p>
<table style="width: 600px; border-collapse:collapse; color:black;
margin:auto;" border="1">
<tr>
<th>NIS</th>
<th>Nama</th>
<th>Kelas</th>
<th>Alamat</th>
<th>Jenis Kelamin</th>
<th>Opsi</th>
</tr>
<tr>
<?php
include '../koneksi.php';
$sql = mysql_query("SELECT * FROM table_siswa order by
nis asc") or die(mysql_error());
while ($tampil = mysql_fetch_array($sql)) {?>
<td><?php echo $tampil['Nis'];?></td>
<td><?php echo $tampil['Nama'];?></td>
<td><?php echo $tampil['Kelas'];?></td>
<td><?php echo $tampil['Alamat'];?></td>
<td><?php echo $tampil['Jenis_Kelamin'];?></td>
<td>
<a href="form_edit.php?Nis=<?php echo $tampil['Nis'];?
>">Edit</a>|
<a href="hapus.php?Nis=<?php echo $tampil['Nis']; ?
>">Hapus</a>
</tr>
<?php

}
?>
</table>
<a style="text-decoration:none;"
href="form_tambah.php">Tambah</a>
</div>
</div>
<div id="footer">
<blink> &copy;copyright:roulina nainggolan</blink></div>
</body>
</html>
</body>
</html>>
</head>

Database dari Data Siswa


Tampilan Edit Data Siswa

Edit Data Siswa


<p>
<form action="edit_proses.php" method="get">
<table style="width: 300px; border-collapse:collapse; color:black;
margin:auto;" border="1">
<?php
$Nis = $_GET['Nis'];
$query = mysql_query("SELECT * FROM table_siswa where
Nis='$Nis'") or die(mysql_error());
while ($tampil = mysql_fetch_array($query)) {?>
<tr>
<input type="hidden" name="Nis" value="<?php echo $tampil['Nis'];?
>">
</tr>
<tr>
<td>Nama</td><td><input type="text" name="Nama" value="<?
php echo $tampil['Nama'];?>">
</tr>
<tr>
<td>Kelas</td><td><input type="text" name="Kelas" value="<?php
echo $tampil['Kelas'];?>">
</tr>
<tr>
<td>Alamat</td><td><input type="text" name="Alamat" value="<?
php echo $tampil['Alamat'];?>">
</tr>
<tr>
<td>Jenis Kelamin</td><td><input type="text"
name="Jenis_Kelamin" value="<?php echo $tampil['Jenis_Kelamin'];?
>">
</tr>
<tr>
<td colspan="2"><center><input type="submit"
value="Edit/Simpan"></center></td>
</tr>

Tampilan Penambahan Data Siswa

<p>
<form action="tambah.php" method="GET">
<table style="width: 350px; border-collapse:collapse; color:black; margin:auto;"
border="1">
<tr>
<td>NIS</td><td><input style="width:100%;" type="text" name="nis"></td>
</tr>
<tr>
<td>Nama</td><td><input style="width:100%;" type="text" name="nama"></td>
</tr>
<tr>
<td>Kelas</td><td><input style="width:100%;" type="text" name="kelas"></td>
</tr>
<tr>
<td>Alamat</td><td><input style="width:100%;" type="text" name="alamat"></td>
</tr>
<tr>
<td>Jenis Kelamin</td><td><input style="width:100%;" type="text"
name="jenis_kelamin"></td>
</tr>
<tr>
<td colspan="2"><center><input type="submit" value="Tambah
Data"></center></td>
</tr>

Vous aimerez peut-être aussi