0% found this document useful (0 votes)
75 views

Coding KERJA PRAKTEK

1. The document contains scripts for various pages of a student information system including login, home, reports, and logout pages. 2. The scripts define the layout and functionality of the pages, connect to a database, perform authentication, and include dynamic content. 3. Key scripts include login validation, generating menus and content areas on the home page, querying the database for student and teacher data, and printing reports.

Uploaded by

Agusyana
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
75 views

Coding KERJA PRAKTEK

1. The document contains scripts for various pages of a student information system including login, home, reports, and logout pages. 2. The scripts define the layout and functionality of the pages, connect to a database, perform authentication, and include dynamic content. 3. Key scripts include login validation, generating menus and content areas on the home page, querying the database for student and teacher data, and printing reports.

Uploaded by

Agusyana
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 123

1

a. SCRIPT PADA FOLDER SIAKAD echo


1. Script cek-login.php "<script>alert('Selamat
<?php Datang $nama');</script>";
include 'conn/koneksi.php'; echo "<meta
if(isset($_POST['log'])) { http-equiv='refresh'
$user = content='0;
mysql_real_escape_string($_PO url=guest/index.php'>";
ST['user']); } else {
$pass = echo "<meta
mysql_real_escape_string($_PO http-equiv='refresh'
ST['pass']); content='0; url=index.php'>";
$pass = md5($pass); echo
"<script>alert('Username dan
$sql = password anda salah, Silahkan
mysql_query("SELECT * FROM login kembali !');</script>";
tbl_walisiswa where }
NIS='$user' and
password='$pass'");
$data = }
mysql_fetch_array($sql);
$NIS = $data['NIS']; ?>
$nama =
$data['nama_siswa']; 2. Script home.php
$password =
$data['password']; <!-- menu tengah -->
<div id="menu-tengah">
if ($user==$NIS && <div
$pass==$password) { id="bg_menu"><marquee>Welco
session_start(); me to Sistem Informasi
Akademik SDN 3
Winduhaji</marquee>
$_SESSION['nama_siswa']=$nama
</div>
;
<div
id="content_menu">
$_SESSION['NIS']=$NIS; <div
id="menu_header2">
2

<td

<center> class="img_home"

~ Silahkan pilih align="center"><a href="?

Panel Dibawah ini ~ page=nilai"><img

</center> src="../images/user.ico"
width="100"
height="100"></a></a><br
</div>
/><center>Nilai</center></t
d>
<div
<td
class="table_home">
class="img_home"
<table
align="center"><a href="?
width="100%" height="100%"
page=laporan"><img
align="center"
src="../images/laporan.png"
cellpadding="2" border="0">
width="100"
<tbody>
height="100"></a><br
<tr>
/><center>Laporan</center><
<td
/td>
class="img_home"
align="center"><a href="?
</tr>
page=guru"><img
src="../images/guru.png"
width="100"
height="100"></a><br /> </tbody>
</table>
<center>Data </div>
guru</center></td>
<td </div>
class="img_home" </div>
align="center"><a href="?
page=siswa"><img 3. Script index.php
src="../images/siswa.png"
width="100" <!DOCTYPE HTML>
height="100"></a><br <html>
/><center>Siswa</center></t <head>
d> <title>Login
Sistem</title>
3

<style type="text/css"> <div


body { id="log_head"><strong>Men
} u Login</strong>
#body { </div>
position:absolute; <div id="log_cont">
margin-left:auto; <form action="cek-
margin-right:auto; login.php" method="POST">
margin-top:auto; <table width="100%"
margin-bottom:auto; style="background:#FFF;
left:0; ">
right:0; <tr>
top:0; <td
bottom :0; width="20%">Username</td>
border:1px solid <td>:</td>
#333;; <td><input
} type="text" name="user"
size="30%" required></td>
#log_head{ </tr>
background-image: <tr>
url(images/menu-
biru.gif); <td>Password</td>
padding:8px; <td>:</td>
border:1px solid <td><input
#000;; type="password"
color:#FFF; name="pass" size="30%"
text-align:center; required></td>
margin-bottom:10px; </tr>
} <tr>
</style> <td></td>
<td></td>
</head> <td><button
<body> type="submit"
<div id="body" name="log">LOGIN</td>
style="width:350px; </tr>
height:160px;"> </table>
</form>
4

style="background-
color:#9cc;">
<tr>
</div>
<td
</body>
align="center">All
</html>
Laporan</td>
</tr>
4. Script laporan.php

<style </table>

type="text/css">
.lap {
text- </div>
decoration:none;
}
<div
.table_input
class="table_input">
a:hover {
<table
color:#0FF;
width="100%" height="80%"
}
align="center"
</style>
cellspacing="0"
cellpadding="5">
<?php include <tbody>
'../conn/koneksi.php'; ?> <tr>
<!-- menu tengah --> <td
<div id="menu- width="30%"><a
tengah"> href="../print-buku.php"
<div class="lap"
id="bg_menu">Laporan target="_blank">1.
</div> Laporan Guru</a></td>
<div </tr>
id="content_menu"> <tr>
<div <td
id="menu_header"> width="30%"><a
<table href="../print-
width="100%" anggota.php" class="lap"
height="100%" target="_blank">2.
Laporan Siswa</a></td>
5

</tr>
<tr> <?php
<td include
width="30%"><a 'conn/koneksi.php';
href="../print- ?>
transaksi.php" <style
class="lap" type="text/css">
target="_blank">3. body {
Laporan NIlai Rapot font-size:12px;
</a></td> font-family:Arial,
</tr> Helvetica, sans-serif;
}

</tbody> .style1{

</table> font-size:12px;

</div> font-family:Arial,

</div> Helvetica, sans-serif;

</div> }
</style>

5. Script Logout.php <p align="center">LAPORAN


DATA SISWA SDN NEGERI 3

<?php WINDUHAJI KUNINGAN </p>

echo "<script>alert('Anda <table

berhasil width="100%"

Logout');</script>"; cellspacing="0"

echo "<meta http- cellpadding="2"

equiv='refresh' border="1px"

content='0; class="style1">

url=index.php'>";
session_destroy(); <tr>
?> <th
width="5%" align="center"
6. Script print-anggota.php class="style1"
bgcolor="#CCCCCC">No</th>
<html> <th
<body width="13%"
onLoad="window.print();"> align="center"
6

class="style1" bgcolor="#CCCCCC">Tempat
bgcolor="#CCCCCC">NIS</th Tanggal Lahir</th>
>
<th <th width="14%"
width="26%" align="center"
align="center" class="style1"
class="style1" bgcolor="#CCCCCC">Agama</
bgcolor="#CCCCCC">Nama th>
Siswa</th>
<th <th width="14%"
width="14%" align="center"
align="center" class="style1"
class="style1" bgcolor="#CCCCCC">Anak-
bgcolor="#CCCCCC">Kelas</ Ke</th>
th>
<th
<th width="14%"
width="11%"
align="center"
align="center"
class="style1"
class="style1"
bgcolor="#CCCCCC">Nama
bgcolor="#CCCCCC">Tahun
Wali</th>
Masuk</th>
<th
</tr>
width="9%" align="center"
class="style1"
<?php
bgcolor="#CCCCCC">Jns
Kelamin</th>
<th $query = "SELECT *

width="14%" FROM tbl_walisiswa ORDER

align="center" by NIS";

class="style1"
bgcolor="#CCCCCC">Alamat< $sql =
/th> mysql_query($query);
<th
width="8%" align="center" $total =
class="style1" mysql_num_rows($sql);
7

<td
$no = 1; align="center"><?php echo
$data['tempat_tanggal_lah
ir']; ?></td>
<td
while
align="center"><?php echo
($data=mysql_fetch_array(
$data['agama']; ?></td>
$sql)) {
?>
<tbody> <td

<tr> align="center"><?php echo

<td $data['anak_ke']; ?></td>

align="center"><?php echo
$no; ?></td> <td
<td ><? align="center"><?php echo
php echo $data['NIS']; ? $data['nama_wali']; ?
></td> ></td>
<td ><? </tr>
php echo
$data['nama_siswa']; ? <?php $no+
></td> +; } ?>
<td
align="center"><?php echo </tbody>
$data['id_kelas']; ? </table>
></td>
<td
</body>
align="center"><?php echo
</html>
$data['tahun_masuk']; ?
></td>
7. Script print-buku.php
<td
align="center"><?php echo
<html>
$data['jenis_kelamin']; ?
<body
></td>
onLoad="window.print();">
<td
<?php
align="center"><?php echo
include
$data['alamat']; ?></td>
'conn/koneksi.php';
?>
8

<td
<style type="text/css"> width="16%"
body { bgcolor="#CCCCCC"
font-size:12px; align="center">Nama
font-family:Arial, Guru</td>
Helvetica, sans-serif; <td
} width="14%"
.style1{ bgcolor="#CCCCCC"
font-size:12px; align="center">Jenis
font-family:Arial, Kelamin</td>
Helvetica, sans-serif; <td
} width="15%"
</style> bgcolor="#CCCCCC"
align="center">Agama</td>
<p <td
align="center">LAPORAN width="15%"
DATA GURU SDN NEGERI 3 bgcolor="#CCCCCC"
WINDUHAJI KUNINGAN</p> align="center">Pendidikan
<table </td>
width="100%"
align="center" <td width="15%"
cellspacing="0" bgcolor="#CCCCCC"
cellpadding="2" align="center">
border="1px" Perkawinan</td>
class="style1"> <td
width="7%"
<tr> bgcolor="#CCCCCC"
<td align="center">Status
width="4%" height="34" Jabatan</td>
align="center" <td
bgcolor="#CCCCCC">No</td> width="8%"
<td bgcolor="#CCCCCC"
width="21%" align="center">Tahun
bgcolor="#CCCCCC" Mulai Kerja</td>
align="center">NIP</td>
<td width="8%"
9

bgcolor="#CCCCCC" ($data=mysql_fetch_array(
align="center">Masa $sql)) {
Kerja</td> ?>
<tbody>
<td width="8%" <tr>
bgcolor="#CCCCCC" <td
align="center">NO height="27"
Tlp</td> align="center"><?php echo
$no; ?></td>

<td width="8%" <td

bgcolor="#CCCCCC" align="center"><?php echo

align="center">Alamat</td $data['NIP']; ?></a>

> <td
align="center"><?php echo
$data['nama_guru']; ?
<td width="8%"
></td>
bgcolor="#CCCCCC"
<td
align="center">Tanggal
align="center"><?php echo
Lahir</td>
$data['jenis_kelamin']; ?
</tr>
></td>
<?php
<td
align="center"><?php echo
$query = "SELECT *
$data['Agama']; ?></td>
FROM tbl_guru ORDER by
<td
NIP";
align="center"><?php echo
$data['pendidikan']; ?
$sql =
></td>
mysql_query($query);
<td
align="center"><?php echo
$total = $data['perkawinan']; ?
mysql_num_rows($sql); ></td>
<td
$no = 1; align="center"><?php echo
$data['status_jabatan'];
?></td>
while
10

<td <html>
align="center"><?php echo <body
$data['tahun_mulai_kerja' onLoad="window.print();">
]; ?></td> <?php
include

<td 'conn/koneksi.php';

align="center"><?php echo ?>

$data['masa_kerja']; ?
></td> <style type="text/css">
body {
font-size:12px;
<td
font-family:Arial,
align="center"><?php echo
Helvetica, sans-serif;
$data['no_hp']; ?></td>
}
.style1{
<td
font-size:12px;
align="center"><?php echo
font-family:Arial,
$data['alamat']; ?></td>
Helvetica, sans-serif;
}
<td
</style>
align="center"><?php echo
$data['tgl_lahir']; ?
<p
></td>
align="center">LAPORAN
DATA BUKU PERPUSTAKAAN
INSAN PEMBANGUNAN</p>
</tr> <table
<?php $no+ width="100%"
+; } ?> align="center"
cellspacing="0"
</tbody> cellpadding="2"
</table> border="1px"
class="style1">
</body>
<tr>
8. Script print-guru.php
11

<td bgcolor="#CCCCCC"
width="4%" height="34" align="center">Lokasi</td
align="center" >
bgcolor="#CCCCCC">No</td> </tr>
<td <?php
width="21%"
bgcolor="#CCCCCC" $query = "SELECT *
align="center">Judul FROM tbl_buku ORDER by
Buku</td> judul";
<td
width="16%" $sql =
bgcolor="#CCCCCC" mysql_query($query);
align="center">Pengarang<
/td>
$total =
<td
mysql_num_rows($sql);
width="14%"
bgcolor="#CCCCCC"
$no = 1;
align="center">Penerbit</
td>
<td
width="15%" while

bgcolor="#CCCCCC" ($data=mysql_fetch_array(

align="center">Tahun $sql)) {

Terbit</td> ?>

<td <tbody>

width="15%" <tr>

bgcolor="#CCCCCC" <td

align="center">Kode height="27"

ISBN</td> align="center"><?php echo

<td $no; ?></td>

width="7%" <td

bgcolor="#CCCCCC" align="center"><?php echo

align="center">Jumlah</td $data['judul']; ?></a>

> <td

<td align="center"><?php echo

width="8%" $data['pengarang']; ?
></td>
12

<td include
align="center"><?php echo 'conn/koneksi.php';
$data['penerbit']; ? ?>
></td> <style
<td type="text/css">
align="center"><?php echo body {
$data['thn_terbit']; ? font-size:12px;
></td> font-family:Arial,
<td Helvetica, sans-serif;
align="center"><?php echo }
$data['isbn']; ?></td> .style1{
<td font-size:12px;
align="center"><?php echo font-family:Arial,
$data['jumlah_buku']; ? Helvetica, sans-serif;
></td> }
<td </style>
align="center"><?php echo <p align="center">LAPORAN
$data['lokasi']; ?></td> DATA ANGGOTA PERPUSTAKAAN
INSAN PEMBANGUNAN</p>

</tr> <table

<?php $no+ width="100%"

+; } ?> cellspacing="0"
cellpadding="2"
border="1px"
</tbody>
class="style1">
</table>

</body> <tr>
<th

9. Script print-siswa.php width="5%" align="center"


class="style1"

<html> bgcolor="#CCCCCC">No</th>

<body
onLoad="window.print();">

<?php
13

<th <th
width="13%" width="8%" align="center"
align="center" class="style1"
class="style1" bgcolor="#CCCCCC">Thn
bgcolor="#CCCCCC">Nim</th Masuk</th>
> </tr>
<th
width="26%" <?php
align="center"
class="style1"
$query = "SELECT *
bgcolor="#CCCCCC">Nama</t
FROM tbl_anggota ORDER by
h>
nim";
<th
width="14%"
$sql =
align="center"
mysql_query($query);
class="style1"
bgcolor="#CCCCCC">Tempat
$total =
Lahir</th>
mysql_num_rows($sql);
<th
width="11%"
$no = 1;
align="center"
class="style1"
bgcolor="#CCCCCC">Tgl
Lahir</th> while
<th ($data=mysql_fetch_array(
width="9%" align="center" $sql)) {
class="style1" ?>
bgcolor="#CCCCCC">Jns <tbody>
Kelamin</th> <tr>
<th <td
width="14%" align="center"><?php echo
align="center" $no; ?></td>
class="style1" <td ><?
bgcolor="#CCCCCC">Prodi</ php echo $data['nim']; ?
th> ></td>
14

<td ><? <html>


php echo $data['nama']; ? <body
></td> onLoad="window.print();">
<td <?php
align="center"><?php echo include
$data['tempat_lahir']; ? 'conn/koneksi.php';
></td> ?>
<td
align="center"><?php echo <p
$data['tgl_lahir']; ? align="center">LAPORAN
></td> DATA NILAI RAPOT SDN 3
<td WINDUHAJI KUNINGAN</p>
align="center"><?php echo <table
$data['jk']; ?></td> width="100%"
<td align="center"
align="center"><?php echo cellspacing="0"
$data['prodi']; ?></td> cellpadding="2"
<td border="1px"
align="center"><?php echo class="style1">
$data['thn_masuk']; ?
></td>
<tr>
<th
</tr> width="5%" align="center"
class="style1"
<?php $no+ bgcolor="#CCCCCC">No</th>
+; } ?>
<th
</tbody> width="13%"
</table> align="center"
class="style1"
bgcolor="#CCCCCC">Nama
</body>
Materi</th>
</html>

10. Script print- <th width="26%"

transaksi.php align="center"
class="style1"
15

bgcolor="#CCCCCC">Kelas</
th> $query = "SELECT *
<th FROM tbl_daftar_mapel
width="26%" ORDER by
align="center" id_daftar_mapel";
class="style1"
bgcolor="#CCCCCC">Semeste $sql =
r</th> mysql_query($query);
<th
width="14%"
$no = 1;
align="center"
class="style1"
while
bgcolor="#CCCCCC">Nilai</
($data=mysql_fetch_array(
th>
$sql)) {
<th
?>
width="11%"
<tbody>
align="center"
<tr>
class="style1"
<td
bgcolor="#CCCCCC">Absensi
align="center"><?php echo
</th>
$no; ?></td>
<th
<td ><?
width="9%" align="center"
php echo
class="style1"
$data['nama_materi']; ?
bgcolor="#CCCCCC">NIS</th
></td>
>
<td
<th
align="center"><?php echo
width="14%"
$data['semester']; ?
align="center"
></td>
class="style1"
bgcolor="#CCCCCC">NIP</th
<td
>
align="center"><?php echo
$data['id_kelas']; ?
></td>
</tr>
<td
align="center"><?php echo
<?php
$data['nilai']; ?></td>
16

<td <table
align="center"><?php echo width="100%"
$data['absensi']; ?></td> align="center"
<td cellspacing="0"
align="center"><?php echo cellpadding="2"
$data['NIS']; ?></td> border="1px"
<td class="style1">
align="center"><?php echo
$data['NIP']; ?></td> <tr>
<th
</tr> width="5%" align="center"
class="style1"

<?php $no+ bgcolor="#CCCCCC">No</th>

+; } ?>
<th
width="13%"
</tbody>
align="center"
</table>
class="style1"
</body>
bgcolor="#CCCCCC">Nama
</html>
Materi</th>

11. Script
print.transaksia.php <th width="26%"
align="center"

<html> class="style1"

<body bgcolor="#CCCCCC">Kelas</

onLoad="window.print();"> th>

<?php <th

include width="26%"

'conn/koneksi.php'; align="center"

?> class="style1"
bgcolor="#CCCCCC">Semeste
r</th>
<p
<th
align="center">LAPORAN
width="14%"
DATA NILAI RAPOT SDN 3
align="center"
WINDUHAJI KUNINGAN</p>
class="style1"
17

bgcolor="#CCCCCC">Nilai</ ($data=mysql_fetch_array(
th> $sql)) {
<th ?>
width="11%" <tbody>
align="center" <tr>
class="style1" <td
bgcolor="#CCCCCC">Absensi align="center"><?php echo
</th> $no; ?></td>
<th <td ><?
width="9%" align="center" php echo
class="style1" $data['nama_materi']; ?
bgcolor="#CCCCCC">NIS</th ></td>
> <td
<th align="center"><?php echo
width="14%" $data['semester']; ?
align="center" ></td>
class="style1"
bgcolor="#CCCCCC">NIP</th <td
> align="center"><?php echo
$data['id_kelas']; ?
></td>
</tr> <td
align="center"><?php echo
<?php $data['nilai']; ?></td>
<td

$query = "SELECT * align="center"><?php echo

FROM tbl_daftar_mapel $data['absensi']; ?></td>

WHERE <td

NIS='$_SESSION[NIS]'"; align="center"><?php echo


$data['NIS']; ?></td>
<td
$sql =
align="center"><?php echo
mysql_query($query);
$data['NIP']; ?></td>

$no = 1;
</tr>

while
18

<?php $no+ $password =


+; } ?> $data['password'];

</tbody> if

</table> ($user==$username &&

</body> $pass==$password) {

</html>
session_start();

b. SCRIPT PADA FOLDER ADMIN


12. Script cek-login.php $_SESSION['nama']=$nama;
<?php
include
'../conn/koneksi.php'; $_SESSION['id']=$id;

if(isset($_POST['log']))
{
//$_SESSION['level']=$lev
$user =
el;
mysql_real_escape_string(
echo
$_POST['user']);
"<script>alert('Selamat
$pass =
Datang
mysql_real_escape_string(
$nama');</script>";
$_POST['pass']);
echo
$pass = md5($pass);
"<meta http-
equiv='refresh'
$sql =
content='0;
mysql_query("SELECT *
url=dashboard.php'>";
FROM tbl_user where
} else {
username='$user' and
echo
password='$pass'");
"<meta http-
$data =
equiv='refresh'
mysql_fetch_array($sql);
content='0;
$id = $data['id'];
url=index.php'>";
$username =
echo
$data['username'];
"<script>alert('Username
$nama =
dan password anda salah,
$data['nama'];
19

Silahkan login
kembali !');</script>"; <body>
} <!-- menu main sebagai div
Utama -->

} <div id="main">
<!-- menu Header -->

?> <div id="header">

13. Script dashboard.php <img


src="../images/header1.jpg" /

<?php >

session_start(); </div>

if(!isset($_SESSION['id'])){
echo <!-- menu Header -->
"<script>alert('Silahkan <div id="menu-atas">
login terlebih <div
dahulu')</script>"; id="menu_user">
echo "<meta http-
equiv='refresh' content='0; </div>
url=index.php'>"; <div
} else { id="menu_tanggal"
align="right">
?> <span><?php
<!DOCTYPE html> $array_hr=
<html lang="en"> array(1=>"Senin","Selasa","Ra
<head> bu","Kamis","Jumat","Sabtu","
<meta http-equiv="Content- Minggu");
Type" content="text/html; $hr =
charset=utf-8" /> $array_hr[date('N')];
<title>Sistem Informasi $tgl=
Akademik SDN 3 Winduhaji date('j');
</title> $array_bln =
<link rel="stylesheet" array(1=>"Januari","Februari"
type="text/css" ,"Maret", "April",
href="../images/style.css" /> "Mei","Juni","Juli","Agustus"
</head>
20

,"September","Oktober", <a href="?


"November","Desember"); page=nilai"
$bln = class="menu">&raquo; Nilai
$array_bln[date('n')]; </a> <br />
$thn = <a href="?
date('Y'); page=laporan"
echo $hr . ", class="menu">&raquo; Laporan
" . $tgl . " " . $bln . " " . </a> <br />
$thn . " "; <a href="?
?> page=user"
</span> class="menu">&raquo; User
</div> </a> <br />
</div> <a
href="../logout.php"
class="menu">&raquo; Logout
</a> <br />
<div>
</div>
<!-- menu Kiri -->
</div>
<div id="menu-kiri">
<div
id="bg_menu">Menu Utama <?php

</div>
<div error_reporting(0);
id="left_menu">
<a switch($_GET['page'])
href="dashboard.php" {
class="menu">&raquo; Home
</a> <br /> default:
<a href="?
page=guru" include "../home.php";
class="menu">&raquo; Guru
</a> <br />
break;
<a href="?
page=siswa"
class="menu">&raquo; Siswa
// menu guru
</a> <br />
21

case "guru"; include "guru_edit.php";

include "guru_data.php"; break;

break; case "guru_proses_edit";

case "detil-guru"; include


"guru_proses_edit.php";
include "guru_detil.php";
break;
break;
case "guru_hapus";
case "guru_input";
include "guru_hapus.php";
include "guru_input.php";
break;
break;

case "guru_proses";

// siswa
include
"guru_proses.php";
case "siswa";

break;
include "siswa_data.php";

case "guru_search";
break;

include
case "detil-siswa";
"guru_search.php";

include
break;
"siswa_detil.php";

case "guru_edit";
break;
22

case "siswa_input"; case "siswa_hapus";

include include
"siswa_input.php"; "siswa_hapus.php";

break; break;

case "siswa_proses";

include // Nilai

"siswa_proses.php";

break;
case "nilai";
case "siswa_search";
include "nilai_data.php";
include
"siswa_search.php"; break;

break; case "detil-nilai";

case "siswa_edit"; include


"nilai_detil.php";
include "siswa_edit.php";
break;
break;
case "nilai_input";
case "siswa_proses_edit";
include
include "nilai_input.php";
"siswa_proses_edit.php";
break;
break;
case "nilai_proses";
23

include // laporan
"nilai_proses.php";
case "laporan";
break;
include "../laporan.php";
case "nilai_search";
break;
include
"nilai_search.php";

// User
break;

case "user";
case "nilai_edit";

include "user_data.php";
include "nilai_edit.php";

break;
break;

case "user_search";
case "nilai_proses_edit";

include
include "user_search.php";
"nilai_proses_edit.php";

break;
break;

case "user_input";
case "nilai_hapus";

include "user_input.php";
include
"nilai_hapus.php"; break;

break; case "user_proses";


24

include <!-- menu Merapikan div


"user_proses.php"; content -->
<div class="clear">
break; </div>

case "user_detil"; <!-- menu Footer -->


<div

include "user_detil.php"; id="footer"><center>Kelompok


Kerja Praktek 37 FKOM UNIKU
&copy; 2018</center></div>
break;

case "user_edit"; </div>

</body>
include "user_edit.php";
</html>

break;
<?php } ?>

case "user_proses_edit";
14. Script data_guru.php

include <?php
"user_proses_edit.php"; include
'../conn/koneksi.php';
break; ?>

case "user_hapus"; <!-- menu tengah -->


<div id="menu-tengah">
include "user_hapus.php"; <div
id="bg_menu">Data Guru
break; </div>
<div
} id="content_menu">
?> <div
id="menu_header">

</div>
25

<form action="? <thead


page=guru_search" align="center">
method="post"> <tr>
<table width="100%" <th
height="100%" align="center" width="5%"
style="border:1px solid >No</th>
#9cc;"> <th
<tr> width="30%">NIP</th>
<td <th
width="50%"><a href="? width="20%">Nama guru</th>
page=guru_input">Input <th
Guru</a></td> width="15%">Jenis
<td Kelamin</th>
width="50%" <th
align="right"><input width="15%">Agama</th>
type="text" name="cari" <th
size="30" width="15%">Pendidikan</th>
placeholder="kertikan Nama <th
Guru"></td> width="8%">Edit</th>
<th
<td><input type="submit" width="8%">Hapus</th>
id="submit" </tr>
value="cari"></td> </thead>
</tr> <?php
$query
= "SELECT * FROM tbl_guru
</table>
ORDER by NIP";
</form>
$sql =
mysql_query($query);
</div>
$total
<div class="zebra-
= mysql_num_rows($sql);
table">
$no =
<table width="100%"
1;
height="100%" align="center"
cellspacing="0"
cellpadding="5">
26

while <td
($data=mysql_fetch_array($sql align="center"><a href="?
)) { page=guru_hapus&id_guru=<?php
?> echo $data['id_guru']; ?>"
<tbody> onclick="return confirm('Anda
<tr> yakin ingin menghapus data
<td guru <?php echo $data['NIP'];
align="center"><?php echo ?> ?')"><img
$no; ?></td> src="../images/delete.png"/
<td><a width="15px"
href="?page=detil-guru&NIP=<? height="15px"></a></td>
php echo $data['NIP']; ?>"
class="detil"><?php echo </tr>
$data['NIP']; ?></a></td>
<td
<?php $no++; } ?>
align="center"><?php echo
$data['nama_guru']; ?></td>
</tbody>
<td
</table>
align="center"><?php echo
</div>
$data['jenis_kelamin']; ?
<div
></td>
id="menu_bottom">
<td
<table width="100%"
align="center"><?php echo
style="border:0px solid
$data['Agama']; ?></td>
#9cc;">
<td
<tr>
align="center"><?php echo
<td
$data['pendidikan']; ?></td>
width="50%">Jumlah : <?php
echo $total; ?> Guru</td>
<td
align="center"><a href="?
</tr>
page=guru_edit&id_guru=<?php
</table>
echo $data['id_guru']; ?
</div>
>"><img
</div>
src="../images/edit.png"/
</div>
width="15px"
height="15px"></a></td>
15. Script guru_detil.php
27

<?php include
'../conn/koneksi.php'; ?>
<!-- menu tengah --> $query=mysql_query("SELECT *
<div id="menu-tengah"> FROM tbl_guru WHERE
<div NIP='$NIP'", $konek);
id="bg_menu">Data Guru
</div>
<div $data=mysql_fetch_array($quer
id="content_menu"> y);
<div ?>
id="menu_header">
<table width="100%" <tbody>
height="100%" <tr>
style="background- <td
color:#9cc;"> width="30%"
<tr> align="right">NIP</td>
<td <td
align="center">Guru width="2%">:</td>
Detail</td> <td><?php
</tr> echo $data[1]; ?></td>
</tr>
</table> <tr>
<td
width="20%"
align="right">Nama Guru</td>
</div>

<td>:</td>
<div
<td><?php
class="table_input">
echo $data[2]; ?></td>
<table width="100%"
</tr>
height="80%" align="center"
<tr>
cellspacing="0"
<td
cellpadding="5">
width="20%"
<?php
align="right">Jenis
$NIP =
Kelamin</td>
isset($_GET['NIP']) ?
$_GET['NIP'] : "";
28

align="right">Status
<td>:</td> Jabatan</td>
<td><?php
echo $data[3]; ?></td> <td>:</td>
</tr> <td><?php
<tr> echo $data[7]; ?></td>
<td </tr>
width="20%" <tr>
align="right">Agama</td> <td
width="20%"
<td>:</td> align="right">Tahun Mulai
<td><?php Kerja</td>
echo $data[4]; ?></td>
</tr> <td>:</td>
<tr> <td><?php
<td echo $data[8]; ?></td>
width="20%" </tr>
align="right">Pendidikan</td> <tr>
<td
<td>:</td> width="20%"
<td><?php align="right">Masa Kerja</td>
echo $data[5]; ?></td>
</tr> <td>:</td>
<tr> <td><?php
<td echo $data[9]; ?></td>
width="20%" </tr>
align="right">perkawinan</td> <tr>
<td
<td>:</td> width="20%" align="right">No
<td><?php Telepon</td>
echo $data[6]; ?></td>
</tr> <td>:</td>
<td><?php
<tr> echo $data[10]; ?></td>
<td </tr>
width="20%" <tr>
29

<td $tanggal = date('Y-


width="20%" m-d');
align="right">Alamat</td> $jam =
date('H:i:s');
<td>:</td> $waktu = $tanggal.'
<td><?php '.$jam;
echo $data[11]; ?></td>
</tr> $id_guru =
<tr> $_GET['id_guru'];
<td
width="20%" align="right">Tgl $query = "SELECT *
Lahir</td> FROM tbl_guru WHERE
id_guru=$id_guru";
<td>:</td> $sql =
<td><?php mysql_query($query);
echo $data[12]; ?></td> $data =
</tr> mysql_fetch_array($sql);
$id_guru =

<tr> $data['id_guru'];

<td><a $NIP =

href="? $data['NIP'];

page=guru">Kembali</td> $nama_guru =

</tr> $data['nama_guru'];
$jenis_kelamin =
$data['jenis_kelamin'];
</tbody>
$Agama =
</table>
$data['Agama'];
</div>
$pendidikan =
</div>
$data['pendidikan'];
</div>
$perkawinan =
$data['perkawinan'];
16. Script
$status_jabatan =
guru_edit.php
$data['status_jabatan'];
<?php
include
'../conn/koneksi.php';
30

$tahun_mulai_kerja </div>
= <div
$data['tahun_mulai_kerja' class="table_input">
]; <form action="?
$masa_kerja = page=guru_proses_edit"
$data['masa_kerja']; method="post">
$no_hp = <input
$data['no_hp']; type="hidden"
$alamat = name="id_guru" value="<?
$data['alamat']; php echo $id_guru; ?>" />
$tgl_lahir =
$data['tgl_lahir']; <table
?> width="100%" height="80%"
align="center"
<!-- menu tengah --> cellspacing="0"
<div id="menu- cellpadding="5">
tengah"> <tbody>
<div <tr>
id="bg_menu">Data Guru <td
</div> width="25%"
<div align="right">NIP</td>
id="content_menu">
<div
<td><input type="text"
id="menu_header">
name="NIP" size="50%"
<table
value="<?=$NIP ?>"></td>
width="100%"
</tr>
height="100%"
<tr>
style="background-
<td
color:#9cc;">
width="20%"
<tr>
align="right">Nama
<td
Guru</td>
align="center">Edit
Guru</td>
<td><input type="text"
</tr>
name="nama_guru"
</table>
size="50%" value="<?
=$nama_guru ?>"></td>
31

</tr>
<tr> <tr>
<td <td
width="20%" width="20%"
align="right">Jenis align="right">perkawinan<
kelamin</td> /td>

<td><input type="text" <td><input type="text"


name="jenis_kelamin" name="perkawinan"
size="50%" value="<? size="50%" value="<?
=$jenis_kelamin ?>"></td> =$perkawinan ?>"></td>
</tr> </tr>

<tr> <tr>
<td <td
width="20%" width="20%"
align="right">Agama</td> align="right">Status
Jabatan </td>
<td><input type="text"
name="Agama" size="50%" <td><select
value="<?=$Agama ? name="status_jabatan">
>"></td>
</tr> <option
value="">Pilih
<tr> Status</option>
<td
width="20%" <option value="AKTIF" <?
align="right">pendidikan< php
/td> if( $status_jabatan=='AKT
IF'){echo "selected"; } ?
<td><input type="text" >>AKTIF</option>
name="pendidikan"
size="50%" value="<? <option
=$pendidikan ?>"></td> value="TIDAK_AKTIF" <?php
</tr> if( $status_jabatan=='TID
AK_AKTIF'){echo
32

"selected"; } ?>>TIDAK align="right">NO


AKTIF</option> Telepon</td>

<td><input type="text"
</select> name="no_hp" size="50%"
</td> value="<?=$no_hp ?
</tr> >"></td>
<tr> </tr>
<td <tr>
width="20%" <td
align="right">tahun_mulai width="20%"
_kerja</td> align="right">Alamat</td>

<td><input type="text" <td><input type="text"


name="tahun_mulai_kerja" name="alamat" size="50%"
size="50%" value="<? value="<?=$alamat ?
=$tahun_mulai_kerja ? >"></td>
>"></td> </tr>
</tr> <tr>
<tr> <td
<td width="20%"
width="20%" align="right">Tanggal
align="right">masa_kerja< Lahir</td>
/td>
<td><input type="text"
<td><input type="text" name="tgl_lahir"
name="masa_kerja" size="50%" value="<?
size="50%" value="<? =$tgl_lahir ?>"></td>
=$masa_kerja ?>"></td> </tr>
</tr> <tr>

<tr> <td></td>
<tr>
<td <td><input type="submit"
width="20%" value="Simpan"></td>
</tr>
33

<tr> echo "<meta http-


equiv='refresh' content='0;
<td><a href="? url=?page=guru'>";
page=guru">Batal }

</a></td>
</tr> ?>

18. Script guru_input.php


</tbody>
<?php
</table>
include
</form>
'conn/koneksi.php';
</div>
$tanggal = date('Y-m-d');
</div>
$jam = date('H:i:s');
</div>
$waktu = $tanggal.' '.
17. Script guru_hapus
$jam;
<?php
?>
include
'../conn/koneksi.php';
<!-- menu tengah -->
<div id="menu-tengah">
$id_guru= $_GET['id_guru'];
<div
$query = mysql_query("DELETE
id="bg_menu">Data Guru
FROM tbl_guru WHERE
</div>
id_guru='$id_guru'");
<div
if ($query) {
id="content_menu">
echo
<div
"<script>alert('Data berhasil
id="menu_header">
dihapus')</script>";
<table width="100%"
echo "<meta http-
height="100%"
equiv='refresh' content='0;
style="background-
url=?page=guru'>";
color:#9cc;">
} else {
<tr>
echo "Data anda
<td
gagal dihapus. Ulangi sekali
align="center">Input
lagi";
Guru</td>
</tr>
34

</table> <td
width="20%"

</div> align="right">jenis

<div Kelamin</td>

class="table_input">
<form action="? <td><input type="text"
page=guru_proses" name="jenis_kelamin"
method="post"> size="50%"
<input type="hidden" required="required"></td>
name="tgl_input" value="<?php </tr>
echo $waktu; ?>"> <tr>
<table width="100%" <td
height="80%" align="center" width="20%"
cellspacing="0" align="right">Agama</td>
cellpadding="5">
<tbody> <td><input type="text"
<tr> name="Agama" size="50%"
<td required="required"></td>
width="25%" </tr>
align="right">NIP</td> <tr>
<td
<td><input type="text" width="20%"
name="NIP" size="50%" align="right">Pendidikan</td>
required="required"></td>
</tr> <td><input type="text"
<tr> name="pendidikan" size="50%"
<td required="required"></td>
width="20%" </tr>
align="right">Nama Guru</td> <tr>
<td
<td><input type="text" width="20%"
name="nama_guru" size="50%" align="right">Status
required="required"></td> Perkawinan</td>
</tr>
<tr> <td><input type="text"
35

name="perkawinan" size="50%" size="50%"


required="required"></td> required="required"></td>
</tr> </tr>
<tr>
<tr> <td
<td width="20%"
width="20%" align="right">Masa Kerja
align="right">Status </td>
Jabatan</td>
<td><input type="text"
<td><select name="masa_kerja" size="50%"
name="status_jabatan"> required="required"></td>
</tr>

<option value="">Pilih <tr>

Status</option> <td
width="20%" align="right">No
Telepon</td>
<option
value="AKTIF">AKTIF</option>
<td><input type="text"
name="no_hp" size="50%"
<option
required="required"></td>
value="TIDAK_AKTIF">TIDAK
</tr>
AKTIF</option>
<tr>
<td
width="20%"
</select>
align="right">alamat</td>
</td>
</tr>
<td><input type="text"
<tr>
name="alamat" size="50%"
<td
required="required"></td>
width="20%"
</tr>
align="right">Tahun Mulai
<tr>
Kerja</td>
<td
width="20%"
<td><input type="text"
align="right">Tanggaal
name="tahun_mulai_kerja"
Lahir</td>
36

$Agama = $_POST['Agama'];
<td><input type="text" $pendidikan =
name="tgl_lahir" size="50%" $_POST['pendidikan'];
required="required"></td> $perkawinan =
</tr> $_POST['perkawinan'];
<tr> $status_jabatan =
$_POST['status_jabatan'];

<td></td> $tahun_mulai_kerja =
$_POST['tahun_mulai_kerja'];
$masa_kerja =
<td><input type="submit"
$_POST['masa_kerja'];
value="Simpan"></td>
$no_hp = $_POST['no_hp'];
</tr>
$alamat = $_POST['alamat'];
<tr>
$tgl_lahir =
<td><a
$_POST['tgl_lahir'];
href="?
page=guru">Kembali</td>
</tr>

$input = mysql_query("INSERT
</tbody>
into tbl_guru
</table>
values('','$NIP','$nama_guru'
</form>
,'$jenis_kelamin','$Agama','$
</div>
pendidikan','$perkawinan','$s
</div>
tatus_jabatan','$tahun_mulai_
</div>
kerja','$masa_kerja','$no_hp'
,'$alamat','$tgl_lahir')");

19. Script guru_proses.php


<?php if ($input) {

include echo "<script>

'../conn/koneksi.php'; alert('Data berhasil


Ditambahkan') </script>";

$NIP = $_POST ['NIP']; echo "<meta http-

$nama_guru = equiv='refresh' content='0;

$_POST['nama_guru']; url=?page=detil-

$jenis_kelamin = guru&NIP=$NIP'>";

$_POST['jenis_kelamin']; }
37

else { $no_hp = $_POST['no_hp'];


echo "<script> $alamat =
alert('Data Gagal Di Input') $_POST['alamat'];
</script>"; $tgl_lahir =
echo "<meta http- $_POST['tgl_lahir'];
equiv='refresh' content='0; $input =
url=?page=input-guru'>"; mysql_query("UPDATE
} tbl_guru SET NIP='$NIP',

?>
20. Script nama_guru='$nama_guru',
guru_proses_edit.php jenis_kelamin='$jenis_kel
<?php amin, Agama='$Agama',
include pendidikan='$pendidikan',
'../conn/koneksi.php';

perkawinan='$perkawinan',
$id_guru = $_POST
['id_guru'];
status_jabatan='$status_jabatan
$NIP = $_POST ['NIP'];
',
$nama_guru =
tahun_mulai_kerja='$tahun_mulai
$_POST['nama_guru'];
_kerja',
$jenis_kelamin =
$_POST['jenis_kelamin']; masa_kerja='$masa_kerja',

$Agama = no_hp='$no_hp',

$_POST['Agama']; alamat='$alamat',

$pendidikan = tgl_lahir='$tgl_lahir'

$_POST['pendidikan']; WHERE

$perkawinan = id_guru='$id_guru'");
$_POST['perkawinan'];
$status_jabatan = if ($input) {

$_POST['status_jabatan']; echo "<script>

$tahun_mulai_kerja = alert('Data Berhasil Di

$_POST['tahun_mulai_kerja Update') </script>";

']; echo "<meta http-

$masa_kerja = equiv='refresh'

$_POST['masa_kerja']; content='0; url=?


page=guru'>";
38

} style="border:1px solid
else { #9cc;">
echo "<script> <tr>
alert('Data Gagal Di <td
Input') </script>"; width="50%"><a href="?
echo "<meta http- page=guru_input">Input
equiv='refresh' Guru</a></td>
content='0; url=? <td
page=edit- width="50%"
guru&id_guru=$id_guru'>"; align="right"><input
} type="text" name="cari"
size="30" placeholder="
?> Ketikan Nama Guru"></td>

21. Script <td><input type="submit"


guru_search.php id="submit"
value="cari"></td>
<!-- menu tengah </tr>
-->
<div id="menu- </table>
tengah"> </form>
<div
id="bg_menu">Data Guru
</div>
</div>
<div
<div
id="content_menu">
class="zebra-table">
<div
<table
id="menu_header">
width="100%"
<form
height="100%"
action="?
align="center"
page=guru_search"
cellspacing="0"
method="post">
cellpadding="5">
<table
<thead
width="100%"
align="center">
height="100%"
<tr>
39

<th nama_guru like '%$cari%'


align="center" width="5%" ";
>No</th>
<th $sql =
width="30%">NIP</th> mysql_query($query);
<th
width="20%">Nama $total =
guru</th> mysql_num_rows($sql);
<th
width="15%">Jenis
$no = 1;
Kelamin</th>

<th
while
width="15%">Agama</th>
($data=mysql_fetch_array(
$sql)) {
<th
?>
width="15%">pendidikan</t
<tbody>
h>
<tr>
<th
<td
width="8%">Edit</th>
align="center"><?php echo
<th
$no; ?></td>
width="8%">Hapus</th>
<td><a
</tr>
href="?page=detil-
</thead>
guru&NIP=<?php echo
<?php
$data['NIP']; ?>"
class="detil"><?php echo
include $data['NIP']; ?></a></td>
'../conn/koneksi.php'; <td
align="center"><?php echo
$cari = $data['nama_guru']; ?
$_POST['cari']; ></td>
<td
$query = "SELECT * align="center"><?php echo
FROM tbl_guru where NIP $data['jenis_kelamin']; ?
like '%$cari%' OR ></td>
40

<?php $no+
<td +; } ?>
align="center"><?php echo
$data['Agama']; ?></td> </table>
</div>
<td <div
align="center"><?php echo id="menu_bottom">
$data['pendidikan']; ? <table
></td> width="100%"
style="border:0px solid

<td #9cc;">

align="center"><a href="? <tr>

page=edit-guru&id_guru=<? <td

php echo width="50%">Jumlah : <?

$data['id_guru']; ? php echo $total; ?>

>"><img guru</td>

src="../images/edit.png"/ </tr>

width="15px"
height="15px"></a></td> </table>
<td </div>
align="center"><a href="? </div>
page=hapus- </div>
guru&id_guru=<?php echo
$data['id_guru']; ?>" 22. Script index.php
onclick="return <!DOCTYPE HTML>
confirm('Anda yakin ingin <html>
menghapus data guru <?php <head>
echo $data['NIP']; ? <title>Login
> ?')"><img Sistem</title>
src="../images/delete.png <style type="text/css">
"/ width="15px" body {
height="15px"></a></td> }
#body {

</tr> position:absolute;
margin-left:auto;
margin-right:auto;
41

margin-top:auto; <table width="100%"


margin-bottom:auto; style="background:#FFF;
left:0; ">
right:0; <tr>
top:0; <td
bottom :0; width="20%">Username</td>
border:1px solid <td>:</td>
#333;; <td><input
} type="text" name="user"
size="30%" required></td>
#log_head{ </tr>
background-image: <tr>
url(../images/menu-
biru.gif); <td>Password</td>
padding:8px; <td>:</td>
border:1px solid <td><input
#000;; type="password"
color:#FFF; name="pass" size="30%"
text-align:center; required></td>
margin-bottom:10px; </tr>
} <tr>
</style> <td></td>
<td></td>
</head> <td><button
<body> type="submit"
<div id="body" name="log">LOGIN</td>
style="width:350px; </tr>
height:160px;"> </table>
</form>
<div
id="log_head"><strong>Men
u Login</strong>
</div>
</div>
</body>
<div id="log_cont">
</html>
<form action="cek-
login.php" method="POST">
42

23. Script placeholder="kertikan


nilai_data.php NIS/Nama
<?php Matapelajaran"></td>
include
'../conn/koneksi.php'; <td><input type="submit"
?> id="submit"
value="cari"></td>
<!-- menu tengah --> </tr>
<div id="menu-
tengah"> </table>
<div </form>
id="bg_menu">Data Nilai
</div>
</div>
<div
<div
id="content_menu">
class="zebra-table">
<div
<table
id="menu_header">
width="100%"
<form
height="100%"
action="?
align="center"
page=nilai_search"
cellspacing="0"
method="post">
cellpadding="5">
<table
<thead
width="100%"
align="center">
height="100%"
<tr>
style="border:1px solid
<th
#9cc;">
align="center" width="5%"
<tr>
>No</th>
<td
<th
width="50%"><a href="?
width="30%">Nama
page=nilai_input">Input
materi</th>
Nilai</a></td>
<td
<th
width="50%"
width="30%">Kelas</th>
align="right"><input
<th
type="text" name="cari"
width="20%">Semester</th>
size="30"
43

<th ?>
width="15%">Nilai</th> <tbody>
<tr>
<th <td
width="15%">Absensi</th> align="center"><?php echo
$no; ?></td>

<th <td><a

width="15%">NIS</th> href="?page=detil-
nilai&nama_materi=<?php
echo
<th
$data['nama_materi']; ?>"
width="15%">NIP</th>
class="detil"><?php echo
<th
$data['nama_materi']; ?
width="8%">Edit</th>
></a></td>
<th
width="8%">Hapus</th>
</tr> <td

</thead> align="center"><?php echo

<?php $data['id_kelas']; ?
></td>
<td
$query = "SELECT *
align="center"><?php echo
FROM tbl_daftar_mapel
$data['semester']; ?
ORDER by nama_materi";
></td>
<td
$sql =
align="center"><?php echo
mysql_query($query);
$data['nilai']; ?></td>

$total =
<td
mysql_num_rows($sql);
align="center"><?php echo
$data['absensi']; ?></td>
$no = 1;

<td
align="center"><a href="?
while page=detil-siswa&NIS=<?
($data=mysql_fetch_array( php echo $data['NIS']; ?
$sql)) { >" class="detil"><?php
44

echo $data['NIS']; ? <?php $no+


></a></td> +; } ?>

<td </tbody>
align="center"><a href="? </table>
page=detil-guru&NIP=<?php </div>
echo $data['NIP']; ?>" <div
class="detil"><?php echo id="menu_bottom">
$data['NIP']; ?></a></td> <table
width="100%"
<td style="border:0px solid
align="center"><a href="? #9cc;">
page=nilai_edit&id_daftar <tr>
_mapel=<?php echo <td
$data['id_daftar_mapel']; width="50%">Jumlah : <?
?>"><img php echo $total; ?> </td>
src="../images/edit.png"/
width="15px" </tr>
height="15px"></a></td> </table>
<td </div>
align="center"><a href="? </div>
page=nilai_hapus&id_dafta </div>
r_mapel=<?php echo
$data['id_daftar_mapel']; 24. Script
?>" onclick="return nilai_detil.php
confirm('Anda yakin ingin <?php include
menghapus data '../conn/koneksi.php'; ?>
Matapelajaran <?php echo <!-- menu tengah -->
$data['NIP']; ? <div id="menu-
> ?')"><img tengah">
src="../images/delete.png <div
"/ width="15px" id="bg_menu">Data
height="15px"></a></td> Matapelajaran
</div>
</tr> <div
id="content_menu">
45

<div nama_materi='$nama_materi
id="menu_header"> '", $konek);
<table
width="100%"
height="100%" $data=mysql_fetch_array($
style="background- query);
color:#9cc;"> ?>
<tr>
<td <tbody>
align="center">Mata <tr>
Pelajaran Detail</td> <td
</tr> width="30%"
align="right">Nama
</table> Matapelajaran</td>
<td
width="2%">:</td>

</div>
<td><?php echo
$data[1]; ?></td>
<div
</tr>
class="table_input">
<table
<tr>
width="100%" height="80%"
<td
align="center"
width="20%"
cellspacing="0"
align="right">Kelas</td>
cellpadding="5">
<?php
$nama_materi <td>:</td>

=
isset($_GET['nama_materi' <td><?php echo
]) ? $_GET['nama_materi'] $data[2]; ?></td>
: ""; </tr>
<tr>
<td
$query=mysql_query("SELEC width="20%"
T * FROM tbl_daftar_mapel align="right">Semester</t
WHERE d>
46

<td>:</td> <td>:</td>

<td><?php echo <td><?php echo


$data[3]; ?></td> $data[6]; ?></td>
</tr> </tr>
<tr>
<td <tr>
width="20%" <td
align="right">Nilai</td> width="20%"
align="right">NIP</td>
<td>:</td>
<td>:</td>
<td><?php echo
$data[4]; ?></td> <td><?php echo
</tr> $data[7]; ?></td>
</tr>

<tr>
<td <tr>
width="20%"
align="right">Absensi</td <td><a href="?
> page=nilai">Kembali</td>
</tr>
<td>:</td>

</tbody>
<td><?php echo </table>
$data[5]; ?></td> </div>
</tr> </div>
</div>

<tr> 25. Script


<td nilai_edit.php
width="20%" <?php
align="right">NIS</td>
47

include $NIS =
'../conn/koneksi.php'; $data['NIS'];
$tanggal = date('Y- $NIP =
m-d'); $data['NIP'];
$jam =
date('H:i:s'); ?>
$waktu = $tanggal.'
'.$jam; <!-- menu tengah -->
<div id="menu-
$id_daftar_mapel tengah">
= <div
$_GET['id_daftar_mapel']; id="bg_menu">Data Nilai
</div>
$query = "SELECT * <div
FROM tbl_daftar_mapel id="content_menu">
WHERE <div
id_daftar_mapel=$id_dafta id="menu_header">
r_mapel"; <table
$sql = width="100%"
mysql_query($query); height="100%"
$data = style="background-
mysql_fetch_array($sql); color:#9cc;">
<tr>

$id_daftar_mapel = <td

$data['id_daftar_mapel']; align="center">Edit

$nama_materi = Nilai</td>

$data['nama_materi']; </tr>

$id_kelas = </table>

$data['id_kelas'];
$semester = </div>
$data['semester']; <div
$nilai = class="table_input">
$data['nilai']; <form action="?
$absensi = page=nilai_proses_edit"
$data['absensi']; method="post">
48

<input >>Pendidikan
type="hidden" Kewarganegaraan</option>
name="id_daftar_mapel"
value="<?php echo <option
$id_daftar_mapel; ?>" /> value="b_indonesia" <?php
if( $nama_materi=='b_indo
<table nesia'){echo
width="100%" height="80%" "selected"; } ?>>Bahasa
align="center" Indonesia</option>
cellspacing="0"
cellpadding="5"> <option
<tbody> value="matematika" <?php
if( $nama_materi=='matema
<tr> tika'){echo "selected"; }
<td ?>>Matematika</option>
width="20%"
align="right">Matapelajar <option
an </td> value="IPA" <?php
if( $nama_materi=='IPA')
<td><select {echo "selected"; } ?
name="nama_materi"> >>Ilmu Pengetahuan
Alam</option>

<option
value="">Pilih <option
Matapelajaran</option> value="senibudaya" <?php
if( $nama_materi=='senibu

<option value="agama" <? daya'){echo "selected"; }

php ?>>Seni Budaya Dan

if( $nama_materi=='agama' Keterampilan</option>

){echo "selected"; } ?
>>Pendidikan <option
Agama</option> value="olahraga" <?php
if( $nama_materi=='olahra

<option value="PKN" <?php ga'){echo "selected"; } ?

if( $nama_materi=='PKN') >>Pendidikan Jasmani ,

{echo "selected"; } ?
49

Olahraga dan
Kesehatan</option> </select>
</td>
<option </tr>
value="sunda" <?php <tr>
if( $nama_materi=='sunda' <td
){echo "selected"; } ? width="20%"
>>Bahasa Dan Sastra align="right">Kelas</td>
Sunda</option>
<td><input type="text"
<option name="id_kelas"
value="inggris" <?php if( size="50%" value="<?
$nama_materi=='inggris') =$id_kelas ?>"></td>
{echo "selected"; } ? </tr>
>>Bahasa Inggris</option> <tr>
<td
<option width="20%"
value="sikap" <?php align="right">Semester</t
if( $nama_materi=='sikap' d>
){echo "selected"; } ?
>>Sikap</option> <td><input type="text"
name="semester"
<option size="50%" value="<?
value="kerajinan" <?php =$semester ?>"></td>
if( $nama_materi=='keraji </tr>
nan'){echo <tr>
"selected"; } ? <td
>>Kerajinan</option> width="20%"
align="right">Nilai</td>

<option
value="kebersihan" <?php <td><input type="text"
if( $nama_materi=='kebers name="nilai" size="50%"
ihan'){echo "selected"; } value="<?=$nilai ?
?>>Kebersihan Dan >"></td>
Kerapihan</option> </tr>
50

<tr> <td><input type="submit"


<td value="Simpan"></td>
width="20%" </tr>
align="right">Absensi</td <tr>
>
<td><a href="?
<td><input type="text" page=nilai">Batal
name="absensi" size="50%"
value="<?=$absensi ? </a></td>
>"></td> </tr>
</tr>

</tbody>
<tr> </table>
<td </form>
width="20%" </div>
align="right">NIS</td> </div>
</div>
<td><input type="text"
name="NIS" size="50%" 26. Script
value="<?=$NIS ?>"></td> nilai_hapus.php
</tr> <?php
<tr> include
<td '../conn/koneksi.php';
width="20%"
align="right">NIP</td> $id_daftar_mapel=
$_GET['id_daftar_mapel'];
<td><input type="text" $query =
name="NIP" size="50%" mysql_query("DELETE FROM
value="<?=$NIP ?>"></td> tbl_daftar_mapel WHERE
</tr> id_daftar_mapel='$id_daft
ar_mapel'");
<tr> if ($query) {
echo
<td></td> "<script>alert('Data
51

berhasil <div
dihapus')</script>"; id="bg_menu">Data
echo "<meta Matapelajaran
http-equiv='refresh' </div>
content='0; url=? <div
page=nilai'>"; id="content_menu">
} else { <div
echo "Data id="menu_header">
anda gagal dihapus. <table
Ulangi sekali lagi"; width="100%"
echo "<meta height="100%"
http-equiv='refresh' style="background-
content='0; url=? color:#9cc;">
page=nilai'>"; <tr>
} <td
align="center">Input
Matapelajaran</td>
?> </tr>
27. Script </table>
nilai_input.php
<?php </div>
include <div
'conn/koneksi.php'; class="table_input">
$tanggal = date('Y- <form action="?
m-d'); page=nilai_proses"
$jam = method="post">
date('H:i:s'); <input
$waktu = $tanggal.' type="hidden"
'.$jam; name="tgl_input"
?> value="<?php echo $waktu;
?>">
<!-- menu tengah --> <table
<div id="menu- width="100%" height="80%"
tengah"> align="center"
cellspacing="0"
cellpadding="5">
52

<tbody> value="senibudaya">Seni
<tr> Budaya Dan
<td Keterampilan</option>
width="20%"
align="right">Matapelajar <option
an</td> value="olahraga">Pendidik
an Jasmani , Olahraga dan
<td><select Kesehatan</option>
name="nama_materi">
<option
<option value="sunda">Bahasa Dan
value="">Pilih Sastra Sunda</option>
Matapelajaran</option>
<option
<option value="inggris">Bahasa
value="agama">Pendidikan Inggris</option>
Agama</option>
<option
<option value="sikap">Sikap</opti
value="PKN">Pendidikan on>
Kewarganegaraan</option>
<option
<option value="kerajinan">Kerajin
value="b_indonesia">Bahas an</option>
a Indonesia</option>
<option
<option value="kebersihan">Kebers
value="matematika">Matema ihan Dan
tika</option> Kerapihan</option>

<option </select>
value="IPA">Ilmu </td>
Pengetahuan Alam</option> </tr>

<option <tr>
53

<td
width="20%" <td><input type="text"
align="right">Kelas</td> name="absensi" size="50%"
required="required"></td>
<td><input type="text" </tr>
name="id_kelas"
size="50%"
required="required"></td> <tr>
</tr> <td
<tr> width="20%"
<td align="right">NIS</td>
width="20%"
align="right">Semester</t
<td><input type="text"
d>
name="NIS" size="50%"
required="required"></td>
<td><input type="text" </tr>
name="semester"
size="50%"
<tr>
required="required"></td>
<td
</tr>
width="20%"
<tr>
align="right">NIP</td>
<td
width="20%"
<td><input type="text"
align="right">Nilai</td>
name="NIP" size="50%"
required="required"></td>
<td><input type="text"
</tr>
name="nilai" size="50%"
<tr>
required="required"></td>
</tr>
<td></td>

<tr>
<td><input type="submit"
<td
value="Simpan"></td>
width="20%"
</tr>
align="right">Absensi</td
<tr>
>
54

$nilai','$absensi','$NIS'
<td><a href="? ,'$NIP')");
page=nilai">Kembali</td>
</tr> if ($input) {
echo "<script>
</tbody> alert('Data berhasil
</table> Ditambahkan') </script>";
</form> echo "<meta http-
</div> equiv='refresh'
</div> content='0; url=?
</div> page=detil-
nilai&nama_materi=$nama_m
28. Script ateri'>";
nilai_proses.php }
<?php else {
include echo "<script>
'../conn/koneksi.php'; alert('Data Gagal Di
Input') </script>";
$nama_materi = $_POST echo "<meta http-
['nama_materi']; equiv='refresh'
$id_kelas = content='0; url=?
$_POST['id_kelas']; page=input-nilai'>";
$semester = }
$_POST['semester'];
$nilai = $_POST['nilai']; ?>
$absensi =
$_POST['absensi']; 29. Script
$NIS = $_POST['NIS']; nilai_proses_edit.php
$NIP = $_POST['NIP']; <?php
include
'../conn/koneksi.php';

$input =
mysql_query("INSERT into $id_daftar_mapel = $_POST

tbl_daftar_mapel ['id_daftar_mapel'];

values('','$nama_materi', $nama_materi = $_POST

'$id_kelas','$semester',' ['nama_materi'];
55

$id_kelas = $_POST content='0; url=?


['id_kelas']; page=nilai'>";
$semester = }
$_POST['semester']; else {
$nilai = $_POST['nilai']; echo "<script>
$absensi = alert('Data Gagal Di
$_POST['absensi']; Input') </script>";
$NIS = $_POST['NIS']; echo "<meta http-
$NIP = $_POST['NIP']; equiv='refresh'
content='0; url=?
$input = page=edit-
mysql_query("UPDATE nilai&id_daftar_mapel=$id
tbl_daftar_mapel SET _daftar_mapel'>";
nama_materi='$nama_materi }
',
?>

id_kelas='$id_kelas', 30. Script


semester='$semester', nilai_search.php
nilai='$nilai',

<!-- menu tengah


absensi='$absensi', -->
<div id="menu-
NIS='$NIS', tengah">
NIP='$NIP' <div
WHERE id="bg_menu">Data
id_daftar_mapel='$id_daft Matapelajaran
ar_mapel'"); </div>
<div
if ($input) { id="content_menu">
echo "<script> <div
alert('Data Berhasil Di id="menu_header">
Update') </script>"; <form
echo "<meta http- action="?
equiv='refresh' page=nilai_search"
method="post">
56

<table <thead
width="100%" align="center">
height="100%" <tr>
style="border:1px solid <th
#9cc;"> align="center" width="5%"
<tr> >No</th>
<td <th
width="50%"><a href="? width="30%">nama
page=nilai_input">Input Matapelajaran</th>
Matapelajaran</a></td>
<td <th
width="50%" width="20%">Kelas</th>
align="right"><input <th
type="text" name="cari" width="20%">Semester</th>
size="30" placeholder=" <th
Ketikan NIS / Nama width="15%">Nilai</th>
Matapelajaran"></td>

<th
<td><input type="submit" width="15%">absensi</th>
id="submit"
value="cari"></td> <th
</tr> width="15%">NIS</th>

</table> <th
</form> width="15%">NIP</th>
<th
width="8%">Edit</th>

</div> <th

<div width="8%">Hapus</th>

class="zebra-table"> </tr>

<table </thead>

width="100%" <?php

height="100%"
align="center" include
cellspacing="0" '../conn/koneksi.php';
cellpadding="5">
57

$cari = <td
$_POST['cari']; align="center"><?php echo
$data['id_kelas']; ?
$query = "SELECT * ></td>
FROM tbl_daftar_mapel <td
where nama_materi like '% align="center"><?php echo
$cari%' OR NIS like '% $data['semester']; ?
$cari%' "; ></td>
<td

$sql = align="center"><?php echo

mysql_query($query); $data['nilai']; ?></td>

$total = <td

mysql_num_rows($sql); align="center"><?php echo


$data['absensi']; ?></td>

$no = 1;
<td
align="center"><a href="?
page=detil-siswa&NIS=<?
while
php echo $data['NIS']; ?
($data=mysql_fetch_array(
>" class="detil"><?php
$sql)) {
echo $data['NIS']; ?
?>
></a></td>
<tbody>
<tr>
<td
<td
align="center"><a href="?
align="center"><?php echo
page=detil-guru&NIP=<?php
$no; ?></td>
echo $data['NIP']; ?>"
<td><a
class="detil"><?php echo
href="?page=detil-
$data['NIP']; ?></a></td>
nilai&nama_materi=<?php
echo
$data['nama_materi']; ?>" <td

class="detil"><?php echo align="center"><a href="?

$data['nama_materi']; ? page=edit-

></a></td> nilai&id_daftar_mapel=<?
php echo
58

$data['id_daftar_mapel']; <td
?>"><img width="50%">Jumlah : <?
src="../images/edit.png"/ php echo $total; ?>
width="15px" Matapelajaran</td>
height="15px"></a></td> </tr>
<td
align="center"><a href="? </table>
page=hapus- </div>
nilai&id_daftar_mapel=<? </div>
php echo </div>
$data['id_daftar_mapel'];
?>" onclick="return
confirm('Anda yakin ingin 31. Script
menghapus data siswa_data.php
matapelajaran <?php echo <?php
$data['nama_materi']; ? include
> ?')"><img '../conn/koneksi.php';
src="../images/delete.png ?>
"/ width="15px"
height="15px"></a></td>
<!-- menu tengah -->
<div id="menu-
</tr> tengah">
<div
<?php $no+ id="bg_menu">Data siswa
+; } ?> </div>
<div

</table> id="content_menu">

</div> <div

<div id="menu_header">

id="menu_bottom"> <form

<table action="?

width="100%" page=siswa_search"

style="border:0px solid method="post">

#9cc;"> <table

<tr> width="100%"
height="100%"
59

style="border:1px solid <th


#9cc;"> align="center" width="5%"
<tr> >No</th>
<td <th
width="50%"><a href="? width="30%">NIS</th>
page=siswa_input">Input <th
Siswa</a></td> width="20%">Nama
<td siswa</th>
width="50%" <th
align="right"><input width="15%"> Kelas</th>
type="text" name="cari"
size="30" <th
placeholder="kertikan width="15%">Tahun
Nama Siswa / NIS "></td> Masuk</th>

<td><input type="submit" <th


id="submit" width="8%">Edit</th>
value="cari"></td> <th
</tr> width="8%">Hapus</th>
</tr>
</table> </thead>
</form> <?php

</div> $query = "SELECT *


<div FROM tbl_walisiswa ORDER
class="zebra-table"> by NIS";
<table
width="100%" $sql =
height="100%" mysql_query($query);
align="center"
cellspacing="0" $total =
cellpadding="5"> mysql_num_rows($sql);
<thead
align="center"> $no = 1;
<tr>
60

width="15px"
while height="15px"></a></td>
($data=mysql_fetch_array( <td
$sql)) { align="center"><a href="?
?> page=siswa_hapus&NIS=<?
<tbody> php echo $data['NIS']; ?
<tr> >" onclick="return
<td confirm('Anda yakin ingin
align="center"><?php echo menghapus data Siswa <?
$no; ?></td> php echo $data['NIS']; ?>
<td><a ?')"><img
href="?page=detil- src="../images/delete.png
siswa&NIS=<?php echo "/ width="15px"
$data['NIS']; ?>" height="15px"></a></td>
class="detil"><?php echo
$data['NIS']; ?></a></td> </tr>
<td
align="center"><?php echo <?php $no+
$data['nama_siswa']; ? +; } ?>
></td>
<td
</tbody>
align="center"><?php echo
</table>
$data['id_kelas']; ?
</div>
></td>
<div
id="menu_bottom">
<td
<table
align="center"><?php echo
width="100%"
$data['tahun_masuk']; ?
style="border:0px solid
></td>
#9cc;">
<tr>
<td <td
align="center"><a href="? width="50%">Jumlah : <?
page=siswa_edit&NIS=<?php php echo $total; ?>
echo $data['NIS']; ? Siswa</td>
>"><img
src="../images/edit.png"/
</tr>
61

</table> <div
</div> class="table_input">
</div> <table
</div> width="100%" height="80%"
align="center"
32. Script cellspacing="0"
siswa_detil.php cellpadding="5">
<?php include <?php
'../conn/koneksi.php'; ?> $NIS =
<!-- menu tengah --> isset($_GET['NIS']) ?
<div id="menu- $_GET['NIS'] : "";
tengah">
<div
id="bg_menu">Data Siswa $query=mysql_query("SELEC
</div> T * FROM tbl_walisiswa
<div WHERE NIS='$NIS'",
id="content_menu"> $konek);
<div
id="menu_header">
<table $data=mysql_fetch_array($
width="100%" query);
height="100%" ?>
style="background-
color:#9cc;"> <tbody>
<tr> <tr>
<td <td
align="center">Siswa width="30%"
Detail</td> align="right">NIS</td>
</tr> <td
width="2%">:</td>
</table>
<td><?php echo
$data[1]; ?></td>
</tr>
</div>
<tr>
62

<td <td
width="20%" width="20%"
align="right">Nama align="right">jenis
Siswa</td> kelamin</td>

<td>:</td> <td>:</td>

<td><?php echo <td><?php echo


$data[2]; ?></td> $data[5]; ?></td>
</tr> </tr>
<tr>
<td <tr>
width="20%" <td
align="right"> width="20%"
Kelas</td> align="right">Alamat</td>

<td>:</td> <td>:</td>

<td><?php echo <td><?php echo


$data[3]; ?></td> $data[6]; ?></td>
</tr> </tr>

<tr> <tr>
<td <td
width="20%" width="20%"
align="right">Tahun align="right">Tempat
Masuk</td> tanggal Lahir</td>

<td>:</td> <td>:</td>

<td><?php echo <td><?php echo


$data[4]; ?></td> $data[7]; ?></td>
</tr> </tr>

<tr> <tr>
63

<td align="right">User
width="20%" Id</td>
align="right">Agama</td>
<td>:</td>
<td>:</td>
<td><?php echo $data[11];
<td><?php echo ?></td>
$data[8]; ?></td> </tr>
</tr> <tr>
<td
<tr> width="20%"
<td align="right">Password</t
width="20%" d>
align="right">Anak_ke</td
> <td>:</td>

<td>:</td> <td><?php echo $data[12];


?></td>
<td><?php echo </tr>
$data[9]; ?></td>
</tr> <tr>
<tr>
<td <td><a href="?
width="20%" page=siswa">Kembali</td>
align="right">Nama </tr>
wali</td>

</tbody>
<td>:</td> </table>
</div>
<td><?php echo $data[10]; </div>
?></td> </div>
</tr>
<tr> 33. Script
<td siswa_edit.php
width="20%" <?php
64

include $agama =
'../conn/koneksi.php'; $data['agama'];
$tanggal = date('Y- $anak_ke =
m-d'); $data['anak_ke'];
$jam = $nama_wali =
date('H:i:s'); $data['nama_wali'];
$waktu = $tanggal.' $user_id =
'.$jam; $data['user_id'];
$password =
$NIS = $data['password'];
$_GET['NIS']; ?>

$query = "SELECT * <!-- menu tengah -->

FROM tbl_walisiswa WHERE <div id="menu-

NIS=$NIS"; tengah">

$sql = <div

mysql_query($query); id="bg_menu">Data Siswa

$data = </div>

mysql_fetch_array($sql); <div
id="content_menu">
<div
$NIS =
id="menu_header">
$data['NIS'];
<table
$nama_siswa =
width="100%"
$data['nama_siswa'];
height="100%"
$id_kelas =
style="background-
$data['id_kelas'];
color:#9cc;">
$tahun_masuk =
<tr>
$data['tahun_masuk'];
<td
$jenis_kelamin =
align="center">Edit
$data['jenis_kelamin'];
Siswa</td>
$alamat =
</tr>
$data['alamat'];
</table>

$tempat_tanggal_lahir =
</div>
$data['tempat_tanggal_lah
ir'];
65

<div size="50%" value="<?


class="table_input"> =$id_kelas ?>"></td>
<form action="? </tr>
page=siswa_proses_edit"
method="post"> <tr>
<input <td
type="hidden" name="NIS" width="20%"
value="<?php echo $NIS; ? align="right">Tahun
>" /> masuk</td>

<table <td><input type="text"


width="100%" height="80%" name="tahun_masuk"
align="center" size="50%" value="<?
cellspacing="0" =$tahun_masuk ?>"></td>
cellpadding="5"> </tr>
<tbody>

<tr>
<tr> <td
<td width="20%"
width="20%" align="right">Jenis
align="right">Nama Kelamin</td>
Siswa</td>

<td><input type="text"
<td><input type="text" name="jenis_kelamin"
name="nama_siswa" size="50%" value="<?
size="50%" value="<? =$jenis_kelamin ?>"></td>
=$nama_siswa ?>"></td> </tr>
</tr>
<tr> <tr>
<td <td
width="20%" width="20%"
align="right">Kelas</td> align="right">Alamat</td>

<td><input type="text" <td><input type="text"


name="id_kelas" name="alamat" size="50%"
66

value="<?=$alamat ? value="<?=$anak_ke ?
>"></td> >"></td>
</tr> </tr>
<tr>
<tr> <td
<td width="20%"
width="20%" align="right">Nama
align="right">tempat Wali</td>
tanggal lahir</td>
<td><input type="text"
<td><input type="text" name="nama_wali"
name="tempat_tanggal_lahi size="50%" value="<?
r" size="50%" value="<? =$nama_wali ?>"></td>
=$tempat_tanggal_lahir ? </tr>
>"></td> <tr>
</tr> <td
<tr> width="20%"
<td align="right">User
width="20%" ID</td>
align="right">Agama</td>
<td><input type="text"
<td><input type="text" name="user_id" size="50%"
name="agama" size="50%" value="<?=$user_id ?
value="<?=$agama ? >"></td>
>"></td> </tr>
</tr> <tr>
<td

<tr> width="20%"

<tr> align="right">Password</t

<td d>

width="20%"
align="right">Anak- <td><input type="text"
ke</td> name="password"
size="50%" value="<?

<td><input type="text" =$password ?>"></td>

name="anak_ke" size="50%"
67

</tr> echo
"<script>alert('Data
<tr> berhasil
dihapus')</script>";
<td></td> echo "<meta
http-equiv='refresh'
<td><input type="submit" content='0; url=?
value="Simpan"></td> page=siswa'>";
</tr> } else {
<tr> echo "Data
anda gagal dihapus.
<td><a href="? Ulangi sekali lagi";
page=siswa">Batal echo "<meta
http-equiv='refresh'

</a></td> content='0; url=?

</tr> page=siswa'>";
}

</tbody>
</table>
?>
</form>
35. Script
</div>
siswa_input.php
</div>
<?php
</div>
include
'conn/koneksi.php';
34. Script siswa_hapus
$tanggal = date('Y-
<?php
m-d');
include
$jam =
'../conn/koneksi.php';
date('H:i:s');
$waktu = $tanggal.'
$NIS= $_GET['NIS'];
'.$jam;
$query =
?>
mysql_query("DELETE FROM
tbl_walisiswa WHERE
<!-- menu tengah -->
NIS='$NIS'");
<div id="menu-
if ($query) {
tengah">
68

<div <tbody>
id="bg_menu">Data Siswa <tr>
</div> <td
<div width="25%"
id="content_menu"> align="right">NIS</td>
<div
id="menu_header"> <td><input type="text"
<table name="NIS" size="50%"
width="100%" required="required"></td>
height="100%" </tr>
style="background- <tr>
color:#9cc;"> <td
<tr> width="20%"
<td align="right">Nama
align="center">Input Siswa</td>
Siswa</td>
</tr> <td><input type="text"
</table> name="nama_siswa"
size="50%"
</div> required="required"></td>
<div </tr>
class="table_input"> <tr>
<form action="? <td
page=siswa_proses" width="20%"
method="post"> align="right"> kelas</td>
<input
type="hidden" <td><input type="text"
name="tgl_input" name="id_kelas"
value="<?php echo $waktu; size="50%"
?>"> required="required"></td>
<table </tr>
width="100%" height="80%"
align="center"
<tr>
cellspacing="0"
<td
cellpadding="5">
width="20%"
69

align="right">Tahun align="right">tempat
Masuk</td> Tanggal Lahir</td>

<td><input type="text" <td><input type="text"


name="tahun_masuk" name="tempat_tanggal_lahi
size="50%" r" size="50%"
required="required"></td> required="required"></td>
</tr> </tr>

<tr> <tr>
<td <td
width="20%" width="20%"
align="right">Jenis align="right">Agama </td>
Kelamin</td>
<td><input type="text"
<td><input type="text" name="agama" size="50%"
name="jenis_kelamin" required="required"></td>
size="50%" </tr>
required="required"></td> <tr>
</tr> <td
width="20%"
<tr> align="right">Anak-
<td ke</td>
width="20%"
align="right">Alamat</td> <td><input type="text"
name="anak_ke" size="50%"
<td><input type="text" required="required"></td>
name="alamat" size="50%" </tr>
required="required"></td> <tr>
</tr> <td
width="20%"
align="right">Nama
wali</td>
<tr>
<td
width="20%" <td><input type="text"
name="nama_wali"
70

size="50%" </tr>
required="required"></td>
</tr> </tbody>
<tr> </table>
<td </form>
width="20%" </div>
align="right">User </div>
ID</td> </div>

<td><input type="text" 36. Script


name="user_id" size="50%" siswa_proses.php
required="required"></td> <?php
</tr> include
'../conn/koneksi.php';
<tr>
<td $NIS = $_POST ['NIS'];
width="20%" $nama_siswa =
align="right">Password</t $_POST['nama_siswa'];
d> $id_kelas =
$_POST['id_kelas'];

<td><input type="text" $tahun_masuk =

name="password" $_POST['tahun_masuk'];

size="50%" $jenis_kelamin =

required="required"></td> $_POST['jenis_kelamin'];

</tr> $alamat =

<tr> $_POST['alamat'];
$tempat_tanggal_lahir =
$_POST['tempat_tanggal_la
<td></td>
hir'];
$agama = $_POST['agama'];
<td><input type="submit"
$anak_ke =
value="Simpan"></td>
$_POST['anak_ke'];
</tr>
$nama_wali =
<tr>
$_POST['nama_wali'];
$user_id =
<td><a href="?
$_POST['user_id'];
page=siswa">Kembali</td>
71

$password =
$_POST['password']; ?>
$password =
md5($password); 37. Script
siswa_proses_edit.php
<?php
$input = include
mysql_query("INSERT into '../conn/koneksi.php';
tbl_walisiswa
values('','$NIS','$nama_s $NIS = $_POST ['NIS'];
iswa','$id_kelas','$tahun $nama_siswa =
_masuk','$jenis_kelamin', $_POST['nama_siswa'];
'$alamat','$tempat_tangga $id_kelas =
l_lahir','$agama','$anak_ $_POST['id_kelas'];
ke','$nama_wali','$user_i $tahun_masuk =
d','$password')"); $_POST['tahun_masuk'];
$jenis_kelamin =
$_POST['jenis_kelamin'];
if ($input) {
$alamat =
echo "<script>
$_POST['alamat'];
alert('Data berhasil
$tempat_tanggal_lahir =
Ditambahkan') </script>";
$_POST['tempat_tanggal_la
echo "<meta http-
hir'];
equiv='refresh'
$agama = $_POST['agama'];
content='0; url=?
$anak_ke =
page=detil-
$_POST['anak_ke'];
siswa&NIS=$NIS'>";
$nama_wali =
}
$_POST['nama_wali'];
else {
$user_id =
echo "<script>
$_POST['user_id'];
alert('Data Gagal Di
$password =
Input') </script>";
$_POST['password'];
echo "<meta http-
$input =
equiv='refresh'
mysql_query("UPDATE
content='0; url=?
tbl_walisiswa SET
page=input-siswa'>";
NIS='$NIS',
}
72

echo "<script>
nama_siswa='$nama_siswa', alert('Data Gagal Di
Input') </script>";
echo "<meta http-
id_kelas='$id_kelas', equiv='refresh'
content='0; url=?
tahun_masuk='$tahun_masuk
page=edit-
',
siswa&NIS=$NIS'>";
jenis_kelamin='$jenis_kel
}
amin',
alamat='$alamat',
?>

tempat_tanggal_lahir='$te 38. Script

mpat_tanggal_lahir', siswa_search.php

agama='$agama'
anak_ke='$anak_ke', <!-- menu tengah
-->
nama_wali='$nama_wali', <div id="menu-
user_id='$user_id', tengah">
<div
password='$password'
id="bg_menu">Data Siswa
</div>
<div
WHERE id="content_menu">
NIS='$NIS'"); <div
id="menu_header">
if ($input) { <form
echo "<script> action="?
alert('Data Berhasil Di page=siswa_search"
Update') </script>"; method="post">
echo "<meta http- <table
equiv='refresh' width="100%"
content='0; url=? height="100%"
page=siswa'>"; style="border:1px solid
} #9cc;">
else { <tr>
73

<td <th
width="50%"><a href="? width="30%">NIS</th>
page=siswa_input">Input <th
Siswa</a></td> width="20%">Nama
<td Siswa</th>
width="50%" <th
align="right"><input width="15%">Kelas</th>
type="text" name="cari"
size="30" placeholder=" <th
Ketikan Nama Siswa"></td> width="15%">Tahun
Masuk</th>
<td><input type="submit"
id="submit" <th
value="cari"></td> width="15%">Jenis
</tr> kelamin</th>

</table> <th
</form> width="8%">Edit</th>
<th
width="8%">Hapus</th>
</tr>
</div>
</thead>
<div
<?php
class="zebra-table">
<table
width="100%" include

height="100%" '../conn/koneksi.php';

align="center"
cellspacing="0" $cari =
cellpadding="5"> $_POST['cari'];
<thead
align="center"> $query = "SELECT *
<tr> FROM tbl_walisiswa where
<th NIS like '%$cari%' OR
align="center" width="5%" nama_siswa like '%$cari%'
>No</th> ";
74

$sql = $data['tahun_masuk']; ?
mysql_query($query); ></td>

$total = <td
mysql_num_rows($sql); align="center"><?php echo
$data['jenis_kelamin']; ?
$no = 1; ></td>

<td align="center"><a

while href="?page=edit-

($data=mysql_fetch_array( siswa&NIS=<?php echo

$sql)) { $data['NIS']; ?>"><img

?> src="../images/edit.png"/

<tbody> width="15px"

<tr> height="15px"></a></td>

<td <td

align="center"><?php echo align="center"><a href="?

$no; ?></td> page=hapus-siswa&NIS=<?

<td><a php echo $data['NIS']; ?

href="?page=detil- >" onclick="return

siswa&NIS=<?php echo confirm('Anda yakin ingin

$data['NIS']; ?>" menghapus data siswa <?

class="detil"><?php echo php echo $data['NIS']; ?>

$data['NIS']; ?></a></td> ?')"><img

<td src="../images/delete.png

align="center"><?php echo "/ width="15px"

$data['nama_siswa']; ? height="15px"></a></td>

></td>
<td </tr>
align="center"><?php echo
$data['id_kelas']; ? <?php $no+
></td> +; } ?>

<td </table>
align="center"><?php echo </div>
75

<div <form
id="menu_bottom"> action="?
<table page=user_search"
width="100%" method="post">
style="border:0px solid <table
#9cc;"> width="100%"
<tr> height="100%"
<td style="border:1px solid
width="50%">Jumlah : <? #9cc;">
php echo $total; ?> <tr>
Siswa</td> <td
</tr> width="50%"><a href="?
page=user_input">Input

</table> User</a></td>

</div> <td

</div> width="50%"

</div> align="right"><input
type="text" name="cari"

39. Script size="30"

user_data.php placeholder="Cari nama,

<?php username"></td>

include
'../conn/koneksi.php'; <td><input type="submit"
?> id="submit"
value="cari"></td>

<!-- menu tengah --> </tr>

<div id="menu-
tengah"> </table>
<div </form>
id="bg_menu">Data User
</div> </div>
<div <div
id="content_menu"> class="zebra-table">
<div <table
id="menu_header"> width="100%"
height="100%"
76

align="center" while
cellspacing="0" ($data=mysql_fetch_array(
cellpadding="5"> $sql)) {
<thead ?>
align="center"> <tbody>
<tr> <tr>
<th <td
align="center" width="5%" align="center"><?php echo
>No</th> $no; ?></td>
<th <td><a
width="30%">Nama</th> href="?
<th page=user_detil&id=<?
width="40%">Email</th> =$data['id']?>"><?php
<th echo $data['nama']; ?
width="15%">Level</th> ></a></td>
<th <td><?
width="8%">Edit</th> php echo
<th $data['email']; ?></td>
width="8%">Hapus</th> <td><?
</tr> php echo
</thead> $data['level']; ?></td>
<?php <td
align="center"><a href="?
$query = "SELECT * page=user_edit&id=<?
FROM tbl_user ORDER by =$data['id']?>"><img
id"; src="../images/edit.png"/
width="15px"

$sql = height="15px"></a></td>

mysql_query($query); <td
align="center"><a href="?
page=user_hapus&id=<?
$total =
=$data['id']?>"
mysql_num_rows($sql);
onclick="return
confirm('Anda yakin ingin
$no = 1;
menghapus data user <?
=$data['nama']?
77

> ?')"><img <div id="menu-


src="../images/delete.png tengah">
"/ width="15px" <div
height="15px"></a></td> id="bg_menu">Data Buku
</div>

</tr> <div
id="content_menu">
<div
<?php $no+
id="menu_header">
+; } ?>
<table
width="100%"
</tbody>
height="100%"
</table>
style="background-
</div>
color:#9cc;">
<div
<tr>
id="menu_bottom">
<td
<table
align="center">User
width="100%"
Detail</td>
style="border:0px solid
</tr>
#9cc;">
<tr>
</table>
<td
width="50%">Jumlah : <?
php echo $total; ?> </div>

User</td> <div
class="table_input">
<form action=""
</tr>
method="post">
</table>
<table
</div>
width="100%" height="80%"
</div>
align="center"
</div>
cellspacing="0"
cellpadding="5">
40. Script
<?php
user_detil.php
$id =
<?php include
isset($_GET['id']) ?
'../conn/koneksi.php'; ?>
$_GET['id'] : "";
<!-- menu tengah -->
78

<td
width="20%"
$query=mysql_query("SELEC align="right">Email</td>
T * FROM tbl_user WHERE
id='$id'"); <td><input type="text"
name="email" size="50%"
value="<?=$data[4]?>"
$data=mysql_fetch_array($ readonly></td>
query); </tr>
?> <tr>
<tbody> <td
<tr> width="20%"
<td align="right">Foto</td>
width="25%"
align="right">Nama
<td><img
Lengkap</td>
src="../images/<?
=$data[5]?>" width="190"
<td><input type="text" height="170"><br>
name="nama" size="50%" </tr>
value="<?=$data[1]?>" <tr>
readonly></td> <td
</tr> width="20%"
<tr> align="right">Group
<td User</td>
width="20%"
align="right">Username</t
<td><input type="text"
d>
name="email" size="30%"
value="<?=$data[6]?>"
<td><input type="text" readonly></td>
name="username" </tr>
size="50%" value="<? <tr>
=$data[2]?>"
readonly></td>
<td><a href="?
</tr>
page=user">Kembali</td>
<tr>
</tr>
79

</tbody> <div
</table> id="bg_menu">Data Buku
</form> </div>
</div> <div
</div> id="content_menu">
</div> <div
41. Script id="menu_header">
user_edit.php <table
<?php width="100%"
include height="100%"
'../conn/koneksi.php'; style="background-
color:#9cc;">

$id = $_GET['id']; <tr>

$query = "SELECT * <td

FROM tbl_user WHERE align="center">Edit

id=$id"; User</td>

$sql = </tr>

mysql_query($query);
$data = </table>
mysql_fetch_array($sql);
$id = $data['id']; </div>
$nama = $data['nama']; <div
$username = class="table_input">
$data['username']; <form action="?
$password = page=user_proses_edit"
$data['password']; method="post">
$email = <input
$data['email']; type="hidden" name="id"
$foto = $data['foto']; value="<?=$id?>" />
$level = <table
$data['level']; width="100%" height="80%"
?> align="center"
cellspacing="0"
<!-- menu tengah --> cellpadding="5">
<div id="menu- <tbody>
tengah"> <tr>
80

<td <td
width="25%" width="20%"
align="right">Nama align="right">Email</td>
Lengkap</td>
<td><input type="text"
<td><input type="text" name="email" size="50%"
name="nama" size="50%" value="<?=$email?>"
value="<?=$nama?>" required></td>
required></td> </tr>
</tr> <tr>
<tr> <td
<td width="20%"
width="20%" align="right">Foto</td>
align="right">Username</t
d> <td><img
src="../images/<?=$foto?
<td><input type="text" >" width="190"
name="username" height="170"><br>
size="50%" value="<?
=$username?>" <input type="file"
required></td> name="foto" value="<?
</tr> =$foto?>"></td>
<tr> </tr>
<td <tr>
width="20%" <td
align="right">Password</t width="20%"
d> align="right">Level</td>

<td><input <td><select name="level">


type="password"
name="password" <option
size="50%" value="">Pilih
placeholder="********" User</option>
required></td>
</tr>
<option value="admin" <?
<tr>
php if($level=='admin')
81

{echo "selected"; } ?
>>Administrator</option> $id= $_GET['id'];
$query =
<option value="user" <? mysql_query("DELETE FROM
php if ($level=='user') tbl_user WHERE
{echo "selected"; }? id='$id'");
>>User</option> if ($query) {
echo

</select> "<script>alert('Data

</td> berhasil

</tr> dihapus')</script>";

<tr> echo "<meta


http-equiv='refresh'
content='0; url=?
<td></td>
page=user'>";
} else {
<td><input type="submit"
echo "Data
value="Simpan"></td>
anda gagal dihapus.
</tr>
Ulangi sekali lagi";
<tr>
echo "<meta
http-equiv='refresh'
<td><a href="?
content='0; url=?
page=user">Kembali</td>
page=user'>";
</tr>
}

</tbody>
</table> ?>
</form>
</div> 43. Script
</div> user_input.php
</div> <!-- menu tengah -->
<div id="menu-
42. Script tengah">
user_hapus.php <div
<?php id="bg_menu">Data Buku
include </div>
'../conn/koneksi.php';
82

<div name="nama" size="50%"


id="content_menu"> required="required"></td>
<div </tr>
id="menu_header"> <tr>
<table <td
width="100%" width="20%"
height="100%" align="right">Username</t
style="background- d>
color:#9cc;">
<tr> <td><input type="text"
<td name="username"
align="center">User size="50%"
Detail</td> required="required"></td>
</tr> </tr>
<tr>
</table> <td
width="20%"

</div> align="right">Password</t

<div d>

class="table_input">
<form action="? <td><input type="text"
page=user_proses" name="password"
method="post"> size="50%"
<table required="required"></td>
width="100%" height="80%" </tr>
align="center" <tr>
cellspacing="0" <td
cellpadding="5"> width="20%"
<tbody> align="right">Email</td>
<tr>
<td <td><input type="email"
width="25%" name="email" size="50%"
align="right">Nama required="required"></td>
Lengkap</td> </tr>
<tr>
<td><input type="text"
83

<td
width="20%" <td></td>
align="right">Foto</td>

<td><input type="submit"
<td><img src="" value="Simpan"></td>
width="190" </tr>
height="170"><br> <tr>

<input type="file" <td><a href="?


name="foto"></td> page=user">Kembali</a></t
</tr> d>
<tr> </tr>
<td
width="20%"
</tbody>
align="right">Group
</table>
User</td>
</form>
</div>
<td><select name="level"> </div>
</div>
<option>Pilih
User</option> 44. Script
user_proses.php
<option <?php
value="admin">Administrat include
or</option> '../conn/koneksi.php';
$nama =

<option $_POST['nama'];

value="user">User</option $user =

> mysql_real_escape_string(
$_POST['username']);
$pass =
</select>
mysql_real_escape_string(
</td>
$_POST['password']);
</tr>
$pass = md5($pass);
<tr>
$email =
$_POST['email'];
84

$foto = include
$_POST['foto']; '../conn/koneksi.php';
$level =
$_POST['level']; $id = $_POST['id'];
$nama = $_POST['nama'];
$input = $user =
mysql_query("INSERT into mysql_real_escape_string(
tbl_user $_POST['username']);
values('','$nama','$user' $pass =
,'$pass','$email','$foto' mysql_real_escape_string(
,'$level')"); $_POST['password']);
$pass = md5($pass);

if ($input) { $email = $_POST['email'];

echo "<script> $foto = $_FILES['foto'];

alert('Data berhasil $level = $_POST['level'];

Ditambahkan') </script>";
echo "<meta http-
equiv='refresh' $input =
content='0; url=? mysql_query("UPDATE
page=user'>"; tbl_user SET
} nama='$nama',
else {
echo "<script> username='$user',
alert('Data Gagal Di password='$pass',
Input') </script>";
email='$email',
echo "<meta http-
equiv='refresh' foto='$foto',

content='0; url=? level='$level'

page=user'>"; WHERE id='$id'");

} if ($input) {
?> echo "<script>
alert('Data berhasil
45. Script Dirubah') </script>";
user_proses_edit.php echo "<meta http-
<?php equiv='refresh'
85

content='0; url=? height="100%"


page=user'>"; style="border:1px solid
} #9cc;">
else { <tr>
echo "<script> <td
alert('Data Gagal width="50%"><a href="?
dirubah') </script>"; page=user_input">Input
echo "<meta http- User</a></td>
equiv='refresh' <td
content='0; url=? width="50%"
page=user'>"; align="right"><input
} type="text" name="cari"
size="30"
?> placeholder="Cari nama,
username"></td>
46. Script
user_search.php <td><input type="submit"
<?php id="submit"
include value="cari"></td>
'../conn/koneksi.php'; </tr>
?>

</table>
<!-- menu tengah --> </form>
<div id="menu-
tengah">
</div>
<div
<div
id="bg_menu">Data User
class="zebra-table">
</div>
<table
<div
width="100%"
id="content_menu">
height="100%"
<div
align="center"
id="menu_header">
cellspacing="0"
<form
cellpadding="5">
action="" method="post">
<thead
<table
align="center">
width="100%"
<tr>
86

<th ($data=mysql_fetch_array(
align="center" width="5%" $sql)) {
>No</th> ?>
<th <tbody>
width="30%">Nama</th> <tr>
<th <td
width="40%">Email</th> align="center"><?php echo
<th $no; ?></td>
width="15%">Level</th> <td><a
<th href="?
width="8%">Edit</th> page=user_detil&id=<?
<th =$data['id']?>"><?php
width="8%">Hapus</th> echo $data['nama']; ?
</tr> ></a></td>
</thead> <td><?
<?php php echo
$data['email']; ?></td>
$cari = <td><?
$_POST['cari']; php echo
$data['level']; ?></td>

$query = "SELECT * <td

FROM tbl_user WHERE nama align="center"><a href="?

like '%$cari%' OR page=user_edit&id=<?

username like '%$cari%' =$data['id']?>"><img

"; src="../images/edit.png"/
width="15px"
height="15px"></a></td>
$sql =
<td
mysql_query($query);
align="center"><a href="?
page=user_hapus&id=<?
$total =
=$data['id']?>"
mysql_num_rows($sql);
onclick="return
confirm('Anda yakin ingin
$no = 1;
menghapus data user <?
=$data['nama']?
> ?')"><img
while
87

src="../images/delete.png $db_user = "root";


"/ width="15px" $db_pass = "";
height="15px"></a></td> $db_name =
"db_perpus";

</tr>
$konek =
mysql_connect($db_host,
<?php $no+
$db_user,$db_pass,
+; } ?>
$db_name) or die ("Gagal
koneksi ke server");
</tbody>
mysql_select_db($db_name,
</table>
$konek) or die ("Gagal
</div>
mengaktifkan
<div
database".mysql_error());
id="menu_bottom">
<table
$denda1=2000;
width="100%"
?>
style="border:0px solid
#9cc;">
d. SCRIPT PADA FOLDER GUEST
<tr>
48. Script
<td
guru_data.php
width="50%">Jumlah : <?
<?php
php echo $total; ?>
include
User</td>
'../conn/koneksi.php';
?>
</tr>
</table>
<!-- menu tengah -->
</div>
<div id="menu-
</div>
tengah">
</div>
<div
id="bg_menu">Guru
c. SCRIPT PADA FOLDER KONEKSI
</div>
47. Script koneksi.php
<div
<?php
id="content_menu">
<div
$db_host =
id="menu_header">
"localhost";
88

<form cellspacing="0"
action="? cellpadding="5">
page=guru_search" <thead
method="post"> align="center">
<table <tr>
width="100%" <th
height="100%" align="center" width="5%"
style="border:1px solid >No</th>
#9cc;"> <th
<tr> width="30%">NIP</th>
<td <th
width="50%"></td> width="20%">Nama
<td Guru</th>
width="50%" <th
align="right"><input width="15%">Jenis
type="text" name="cari" Kelamin</th>
size="30"
placeholder="nama <th
guru"></td> width="15%">Agama</th>

<td><input type="submit" <th


id="submit" width="15%">Pedidikan</th
value="cari"></td> >
</tr>

</tr>
</table> </thead>
</form> <?php

</div> $query = "SELECT *


<div FROM tbl_guru ORDER by
class="zebra-table"> NIP";
<table
width="100%" $sql =
height="100%" mysql_query($query);
align="center"
89

$total = $data['pendidikan']; ?
mysql_num_rows($sql); ></td>

$no = 1;

</tr>

while <?php $no+


($data=mysql_fetch_array( +; } ?>
$sql)) {
?>
</tbody>
<tbody>
</table>
<tr>
</div>
<td
<div
align="center"><?php echo
id="menu_bottom">
$no; ?></td>
<table
<td><a
width="100%"
href="?page=detil-
style="border:0px solid
guru&NIP=<?php echo
#9cc;">
$data['NIP']; ?>"
<tr>
class="detil"><?php echo
<td
$data['NIP']; ?></a></td>
width="50%">Jumlah : <?
<td
php echo $total; ?>
align="center"><?php echo
guru</td>
$data['nama_guru']; ?
></td>
</tr>
<td
</table>
align="center"><?php echo
</div>
$data['jenis_kelamin']; ?
</div>
></td>
</div>
49. Script
<td
guru_detil.php
align="center"><?php echo
<?php include
$data['Agama']; ?></td>
'../conn/koneksi.php'; ?>
<!-- menu tengah -->
<td <div id="menu-
align="center"><?php echo tengah">
90

<div
id="bg_menu">Data Guru $query=mysql_query("SELEC
</div> T * FROM tbl_guru WHERE
<div NIP='$NIP'", $konek);
id="content_menu">
<div
id="menu_header"> $data=mysql_fetch_array($
<table query);
width="100%" ?>
height="100%"
style="background- <tbody>
color:#9cc;"> <tr>
<tr> <td
<td width="30%"
align="center">Guru align="right">NIP</td>
Detail</td> <td
</tr> width="2%">:</td>

</table> <td><?php echo


$data[1]; ?></td>
</tr>
</div> <tr>
<td
width="20%"
<div
align="right">Nama
class="table_input">
Guru</td>
<table
width="100%" height="80%"
align="center" <td>:</td>

cellspacing="0"
cellpadding="5"> <td><?php echo
<?php $data[2]; ?></td>
$NIP = </tr>
isset($_GET['NIP']) ? <tr>
$_GET['NIP'] : ""; <td
width="20%"
91

align="right">jenis align="right">perkawinan<
kelamin</td> /td>

<td>:</td> <td>:</td>

<td><?php echo <td><?php echo


$data[3]; ?></td> $data[6]; ?></td>
</tr> </tr>
<tr>
<tr> <td
<td width="20%"
width="20%" align="right">Status
align="right">Agama</td> Jabatan</td>

<td>:</td> <td>:</td>

<td><?php echo <td><?php echo


$data[4]; ?></td> $data[7]; ?></td>
</tr> </tr>

<tr> <tr>
<td <td
width="20%" width="20%"
align="right">Pendidikan< align="right">Tahun mulai
/td> Kerja</td>

<td>:</td> <td>:</td>

<td><?php echo <td><?php echo


$data[5]; ?></td> $data[8]; ?></td>
</tr> </tr>

<tr> <tr>
<td <td
width="20%" width="20%"
92

align="right">Masa
Kerja</td> <td><?php echo $data[12];
?></td>
<td>:</td> </tr>
<tr>
<td><?php echo
$data[9]; ?></td> <td><a href="?
</tr> page=guru">Kembali</td>
<tr> </tr>
<td
width="20%" </tbody>
align="right">No Tlp</td> </table>
</div>
<td>:</td> </div>
</div>
<td><?php echo $data[10];
?></td> 50. Script
</tr> guru_search.php
<tr>
<td <!-- menu tengah
width="20%" -->
align="right">Alamat</td> <div id="menu-
tengah">
<td>:</td> <div
id="bg_menu">Data Guru

<td><?php echo $data[11]; </div>

?></td> <div

</tr> id="content_menu">

<tr> <div

<td id="menu_header">

width="20%" <form

align="right">Tanggal action="?

Lahir</td> page=guru_search"
method="post">
<table
<td>:</td>
width="100%"
93

height="100%" <th
style="border:1px solid align="center" width="5%"
#9cc;"> >No</th>
<tr> <th
<td width="30%">NIP</th>
width="50%"><a <th
href=""></a></td> width="20%">Nama
<td Guru</th>
width="50%" <th
align="right"><input width="15%">Jenis
type="text" name="cari" Kelamin</th>
size="30"
placeholder="ketikan Nama <th
Guru"></td> width="15%">Agama</th>

<td><input type="submit" <th


id="submit" width="15%">Pendidikan</t
value="cari"></td> h>
</tr>

</tr>
</table> </thead>
</form> <?php

include

</div> '../conn/koneksi.php';

<div
class="zebra-table"> $cari =
<table $_POST['cari'];
width="100%"
height="100%" $query = "SELECT *
align="center" FROM tbl_guru where NIP
cellspacing="0" like '%$cari%' OR
cellpadding="5"> nama_guru like '%$cari%'
<thead ";
align="center">
<tr>
94

$sql =
mysql_query($query); <td
align="center"><?php echo
$total = $data['pendidikan']; ?
mysql_num_rows($sql); ></td>

$no = 1; </tr>

<?php $no+
while +; } ?>
($data=mysql_fetch_array(
$sql)) { </table>
?> </div>
<tbody> <div
<tr> id="menu_bottom">
<td <table
align="center"><?php echo width="100%"
$no; ?></td> style="border:0px solid
<td><a #9cc;">
href="?page=detil- <tr>
guru&Nip=<?php echo <td
$data['NIP']; ?>" width="50%">Jumlah : <?
class="detil"><?php echo php echo $total; ?>
$data['NIP']; ?></a></td> guru</td>
<td </tr>
align="center"><?php echo
$data['nama_guru']; ?
</table>
></td>
</div>
<td
</div>
align="center"><?php echo
</div>
$data['jenis_kelamin']; ?
></td>
51. Script home.php
<!-- menu tengah
<td -->
align="center"><?php echo <div id="menu-
$data['Agama']; ?></td> tengah">
95

<div
id="bg_menu"><marquee>Wel <center>Data
come to Sistem Informasi Guru</center></td>
Akademik SDN 3 <td
Winduhaji</marquee> class="img_home"
</div> align="center"><a href="?
<div page=siswa"><img
id="content_menu"> src="../images/siswa.png"
<div width="100"
id="menu_header2"> height="100"></a><br
/><center>Siswa</center><
<center> /td>
~ Silahkan pilih
Panel Dibawah ini ~ <td
</center> class="img_home"
align="center"><a href="?
</div> page=laporana"><img
src="../images/laporan.pn

<div g" width="100"

class="table_home"> height="100"></a><br

<table /><center>Laporan</center

width="100%" ></td>

height="100%"
align="center" </tr>
cellpadding="2"
border="0">
<tbody>
</tbody>
<tr>
</table>
<td
</div>
class="img_home"
align="center"><a href="?
</div>
page=guru"><img
</div>
src="../images/guru.png"
width="100"
52. Script index.php
height="100"></a><br />
<?php
96

session_start(); <!-- menu Header


if(! -->
isset($_SESSION['NIS'])){ <div id="header">
echo <img
"<script>alert('Silahkan src="../images/header1.jp
login terlebih g" />
dahulu')</script>"; </div>
echo "<meta http-
equiv='refresh' <!-- menu Header -->
content='0; <div id="menu-atas">
url=../index.php'>"; <div
} else { id="menu_user">

?>
</div>
<!DOCTYPE html>
<div
<html lang="en">
id="menu_tanggal"
<head>
align="right">
<meta http-
<span><?php
equiv="Content-Type"
content="text/html;
$array_hr=
charset=utf-8" />
array(1=>"Senin","Selasa"
<title>Sistem Informasi
,"Rabu","Kamis","Jumat","
Akademik SDN 3 Winduhaji
Sabtu","Minggu");
</title>
$hr =
<link rel="stylesheet"
$array_hr[date('N')];
type="text/css"
$tgl=
href="../images/style.css
date('j');
" />
</head>
$array_bln =
array(1=>"Januari","Febru
<body>
ari","Maret", "April",
<!-- menu main sebagai
"Mei","Juni","Juli","Agus
div Utama -->
tus","September","Oktober
",
<div id="main">
"November","Desember");
97

$bln = class="menu">&raquo;
$array_bln[date('n')]; Laporan </a> <br />
$thn = <a
date('Y'); href="../logout.php"
echo class="menu">&raquo;
$hr . ", " . $tgl . " " . Logout </a> <br />
$bln . " " . $thn . " "; </div>
?> </div>
</span>
</div> <?php
</div>

error_reporting(0);

<div> switch($_GET['page'])
<!-- menu Kiri -->
<div id="menu- {
kiri">
<div default:
id="bg_menu">Menu Utama
</div>
include
<div
"home.php";
id="left_menu">
<a
break;
href="index.php"
class="menu">&raquo; Home
</a> <br />
<a href="?
page=siswa"
class="menu">&raquo;
Siswa </a> <br />
<a href="?
// menu buku
page=nilai"
class="menu">&raquo;
case "guru";
Nilai </a> <br />
<a href="?
page=laporana"
98

include case
"guru_data.php"; "siswa_search";

break; include
"siswa_search.php";
case
"guru_search"; break;

include case "detil-


"guru_search.php"; siswa";

break; include
"siswa_detil.php";
case "detil-
guru"; break;

include
"guru_detil.php"; // menu nilai

break; case "nilai";

include
"nilai_data.php";
// menu
anggota
break;

case
"nilai_search";
case "siswa";

include
include
"nilai_search.php";
"siswa_data.php";

break;
break;
99

case "detil-
nilai"; <!-- menu Footer
-->
include <div
"nilai_detil.php"; id="footer"><center>Kelom
pok 37 Kerja Praktek FKOM
break; UNIKU &copy;
2018</center></div>

// menu </div>
laporan
</body>

case </html>

"laporana";
<?php } ?>

include
"laporana.php";
53. Script laporana.php
<style
break;
type="text/css">
.lap {
text-
decoration:none;
}
.table_input
}
a:hover {
?>
color:#0FF;
}
</style>
</div>
<!-- menu Merapikan
<?php include
div content -->
'../conn/koneksi.php'; ?>
<div class="clear">
<!-- menu tengah -->
</div>
<div id="menu-
tengah">
100

<div <td
id="bg_menu">Laporan width="30%"><a
</div> href="print-
<div transaksia.php"
id="content_menu"> class="lap"
<div target="_blank">1.
id="menu_header"> Laporan NIlai Rapot
<table </a></td>
width="100%" </tr>
height="100%"
style="background- </tbody>
color:#9cc;"> </table>
<tr> </div>
<td </div>
align="center">Laporan</t </div>
d>
</tr>

54. Script
</table> nilai_data.php
<?php
include
'../conn/koneksi.php';
</div>
?>

<div
<!-- menu tengah -->
class="table_input">
<div id="menu-
<table
tengah">
width="100%" height="80%"
<div
align="center"
id="bg_menu">Data Nilai
cellspacing="0"
</div>
cellpadding="5">
<div
<tbody>
id="content_menu">
<div
id="menu_header">
<tr>
<form
action="?
101

page=nilai_search" <thead
method="post"> align="center">
<table <tr>
width="100%" <th
height="100%" align="center" width="5%"
style="border:1px solid >No</th>
#9cc;"> <th
<tr> width="30%">Nama
<td materi</th>
width="50%">
<td <th
width="50%" width="30%">Kelas</th>
align="right"><input <th
type="text" name="cari" width="20%">Semester</th>
size="30" <th
placeholder="kertikan width="15%">Nilai</th>
Nama Matapelajaran"></td>

<th
<td><input type="submit" width="15%">Absensi</th>
id="submit"
value="cari"></td> <th
</tr> width="15%">NIS</th>

</table> <th
</form> width="15%">NIP</th>

</div> </tr>
<div </thead>
class="zebra-table"> <?php
<table
width="100%"
height="100%"
$query = "SELECT *
align="center"
FROM tbl_daftar_mapel
cellspacing="0"
WHERE
cellpadding="5">
NIS='$_SESSION[NIS]'";
102

<td
$sql = align="center"><?php echo
mysql_query($query); $data['nilai']; ?></td>

$total = <td
mysql_num_rows($sql); align="center"><?php echo
$data['absensi']; ?></td>

$no = 1;
<td
align="center"><a href="?
page=detil-siswa&NIS=<?
while
php echo $data['NIS']; ?
($data=mysql_fetch_array(
>" class="detil"><?php
$sql)) {
echo $data['NIS']; ?
?>
></a></td>
<tbody>
<tr>
<td <td

align="center"><?php echo align="center"><a href="?

$no; ?></td> page=detil-guru&NIP=<?php

<td><a echo $data['NIP']; ?>"

href="?page=detil- class="detil"><?php echo

nilai&nama_materi=<?php $data['NIP']; ?></a></td>

echo
$data['nama_materi']; ?>"
class="detil"><?php echo </tr>
$data['nama_materi']; ?
></a></td> <?php $no+
+; } ?>
<td
align="center"><?php echo
</tbody>
$data['id_kelas']; ?
</table>
></td>
</div>
<td
<div
align="center"><?php echo
id="menu_bottom">
$data['semester']; ?
></td>
103

<table <td
width="100%" align="center">Mata
style="border:0px solid Pelajaran Detail</td>
#9cc;"> </tr>
<tr>
<td </table>
width="50%">Jumlah : <?
php echo $total; ?> </td>

</div>
</tr>
</table>
<div
</div>
class="table_input">
</div>
<table
</div>
width="100%" height="80%"
align="center"
55. Script
cellspacing="0"
nilai_detil.php
cellpadding="5">
<?php include
<?php
'../conn/koneksi.php'; ?>
$nama_materi
<!-- menu tengah -->
=
<div id="menu-
isset($_GET['nama_materi'
tengah">
]) ? $_GET['nama_materi']
<div
: "";
id="bg_menu">Data
Matapelajaran
</div>
$query=mysql_query("SELEC
<div
T * FROM tbl_daftar_mapel
id="content_menu">
WHERE
<div
nama_materi='$nama_materi
id="menu_header">
'", $konek);
<table
width="100%"
height="100%"
$data=mysql_fetch_array($
style="background-
query);
color:#9cc;">
?>
<tr>
104

<tbody> <td
<tr> width="20%"
<td align="right">Nilai</td>
width="30%"
align="right">Nama <td>:</td>
Matapelajaran</td>
<td <td><?php echo
width="2%">:</td> $data[4]; ?></td>
</tr>
<td><?php echo
$data[1]; ?></td>
</tr>
<tr>
<td
<tr> width="20%"
<td align="right">Absensi</td
width="20%" >
align="right">Kelas</td>

<td>:</td>
<td>:</td>

<td><?php echo
<td><?php echo $data[5]; ?></td>
$data[2]; ?></td> </tr>
</tr>
<tr>
<td
<tr>
width="20%"
<td
align="right">Semester</t
width="20%"
d>
align="right">NIS</td>

<td>:</td>
<td>:</td>

<td><?php echo
<td><?php echo
$data[3]; ?></td>
$data[6]; ?></td>
</tr>
</tr>
<tr>
105

</div>
<tr> <div
<td id="content_menu">
width="20%" <div
align="right">NIP</td> id="menu_header">
<form

<td>:</td> action="?
page=nilai_search"
method="post">
<td><?php echo
<table
$data[7]; ?></td>
width="100%"
</tr>
height="100%"
style="border:1px solid
#9cc;">
<tr>
<tr>
<td
<td><a href="? width="50%"><a href="?
page=nilai">Kembali</td> page=nilai_input">Input
</tr> Matapelajaran</a></td>
<td
</tbody> width="50%"
</table> align="right"><input
</div> type="text" name="cari"
</div> size="30" placeholder="
</div> Ketikan Nama
Matapelajaran"></td>
56. Script
nilai_Search.php <td><input type="submit"
id="submit"
<!-- menu tengah value="cari"></td>
--> </tr>
<div id="menu-
tengah"> </table>
<div </form>
id="bg_menu">Data
Matapelajaran
106

</div> <th
<div width="8%">Hapus</th>
class="zebra-table"> </tr>
<table </thead>
width="100%" <?php
height="100%"
align="center" include
cellspacing="0" '../conn/koneksi.php';
cellpadding="5">
<thead $cari =
align="center"> $_POST['cari'];
<tr>
<th
$query = "SELECT *
align="center" width="5%"
FROM tbl_daftar_mapel
>No</th>
where nama_materi like '%
<th
$cari%' OR semester like
width="30%">nama
'%$cari%' ";
Matapelajaran</th>

$sql =
<th
mysql_query($query);
width="20%">Kelas</th>
<th
$total =
width="20%">Semester</th>
mysql_num_rows($sql);
<th
width="15%">Nilai</th>
$no = 1;

<th
width="15%">absensi</th>
while
($data=mysql_fetch_array(
<th
$sql)) {
width="15%">NIS</th>
?>
<tbody>
<th
<tr>
width="15%">NIP</th>
<th
width="8%">Edit</th>
107

<td <td
align="center"><?php echo align="center"><a href="?
$no; ?></td> page=detil-guru&NIP=<?php
<td><a echo $data['NIP']; ?>"
href="?page=detil- class="detil"><?php echo
nilai&nama_materi=<?php $data['NIP']; ?></a></td>
echo
$data['nama_materi']; ?>" <td
class="detil"><?php echo align="center"><a href="?
$data['nama_materi']; ? page=edit-
></a></td> nilai&id_daftar_mapel=<?
php echo
<td $data['id_daftar_mapel'];
align="center"><?php echo ?>"><img
$data['id_kelas']; ? src="../images/edit.png"/
></td> width="15px"
<td height="15px"></a></td>
align="center"><?php echo <td
$data['semester']; ? align="center"><a href="?
></td> page=hapus-
<td nilai&id_daftar_mapel=<?
align="center"><?php echo php echo
$data['nilai']; ?></td> $data['id_daftar_mapel'];
?>" onclick="return
<td confirm('Anda yakin ingin
align="center"><?php echo menghapus data
$data['absensi']; ?></td> matapelajaran <?php echo
$data['nama_materi']; ?

<td > ?')"><img

align="center"><a href="? src="../images/delete.png

page=detil-siswa&NIS=<? "/ width="15px"

php echo $data['NIS']; ? height="15px"></a></td>

>" class="detil"><?php
echo $data['NIS']; ? </tr>
></a></td>
108

<?php $no+ font-size:12px;


+; } ?> font-family:Arial,
Helvetica, sans-serif;

</table> }

</div> .style1{

<div font-size:12px;

id="menu_bottom"> font-family:Arial,

<table Helvetica, sans-serif;

width="100%" }

style="border:0px solid </style>

#9cc;"> <p align="center">LAPORAN

<tr> DATA ANGGOTA PERPUSTAKAAN

<td INSAN PEMBANGUNAN</p>

width="50%">Jumlah : <? <table

php echo $total; ?> width="100%"

Matapelajaran</td> cellspacing="0"

</tr> cellpadding="2"
border="1px"
class="style1">
</table>
</div>
</div> <tr>

</div> <th
width="5%" align="center"

57. Script print- class="style1"

siswa.php bgcolor="#CCCCCC">No</th>

<html> <th

<body width="13%"

onLoad="window.print();"> align="center"
class="style1"

<?php bgcolor="#CCCCCC">Nim</th

include >

'conn/koneksi.php'; <th

?> width="26%"

<style align="center"

type="text/css"> class="style1"

body {
109

bgcolor="#CCCCCC">Nama</t FROM tbl_anggota ORDER by


h> nim";
<th
width="14%" $sql =
align="center" mysql_query($query);
class="style1"
bgcolor="#CCCCCC">Tempat $total =
Lahir</th> mysql_num_rows($sql);
<th
width="11%"
$no = 1;
align="center"
class="style1"
bgcolor="#CCCCCC">Tgl
while
Lahir</th>
($data=mysql_fetch_array(
<th
$sql)) {
width="9%" align="center"
?>
class="style1"
<tbody>
bgcolor="#CCCCCC">Jns
<tr>
Kelamin</th>
<td
<th
align="center"><?php echo
width="14%"
$no; ?></td>
align="center"
<td ><?
class="style1"
php echo $data['nim']; ?
bgcolor="#CCCCCC">Prodi</
></td>
th>
<td ><?
<th
php echo $data['nama']; ?
width="8%" align="center"
></td>
class="style1"
<td
bgcolor="#CCCCCC">Thn
align="center"><?php echo
Masuk</th>
$data['tempat_lahir']; ?
</tr>
></td>
<td
<?php
align="center"><?php echo
$data['tgl_lahir']; ?
$query = "SELECT *
></td>
110

<td DATA NILAI RAPOT SDN 3


align="center"><?php echo WINDUHAJI KUNINGAN</p>
$data['jk']; ?></td> <table
<td width="100%"
align="center"><?php echo align="center"
$data['prodi']; ?></td> cellspacing="0"
<td cellpadding="2"
align="center"><?php echo border="1px"
$data['thn_masuk']; ? class="style1">
></td>
<tr>
</tr> <th
width="5%" align="center"

<?php $no+ class="style1"

+; } ?> bgcolor="#CCCCCC">No</th>

<th
</tbody>
width="13%"
</table>
align="center"
class="style1"
</body>
bgcolor="#CCCCCC">Nama
</html>
Materi</th>

58. Script print-


<th width="26%"
transaksia.php
align="center"
<html>
class="style1"
<body
bgcolor="#CCCCCC">Kelas</
onLoad="window.print();">
th>
<?php
<th
include
width="26%"
'../conn/koneksi.php';
align="center"
session_start();
class="style1"
?>
bgcolor="#CCCCCC">Semeste
r</th>
<p
<th
align="center">LAPORAN
width="14%"
111

align="center"
class="style1" while
bgcolor="#CCCCCC">Nilai</ ($data=mysql_fetch_array(
th> $sql)) {
<th ?>
width="11%" <tbody>
align="center" <tr>
class="style1" <td
bgcolor="#CCCCCC">Absensi align="center"><?php echo
</th> $no; ?></td>
<th <td ><?
width="9%" align="center" php echo
class="style1" $data['nama_materi']; ?
bgcolor="#CCCCCC">NIS</th ></td>
> <td
<th align="center"><?php echo
width="14%" $data['semester']; ?
align="center" ></td>
class="style1"
bgcolor="#CCCCCC">NIP</th <td
> align="center"><?php echo
$data['id_kelas']; ?
></td>
</tr> <td
align="center"><?php echo
<?php $data['nilai']; ?></td>
<td
$query = "SELECT * align="center"><?php echo
FROM tbl_daftar_mapel $data['absensi']; ?></td>
WHERE <td
NIS='$_SESSION[NIS]'"; align="center"><?php echo
$data['NIS']; ?></td>

$sql = <td

mysql_query($query); align="center"><?php echo


$data['NIP']; ?></td>

$no = 1;
112

</tr> style="border:1px solid


#9cc;">

<?php $no+ <tr>

+; } ?> <td
width="50%"></td>
<td
</tbody>
width="50%"
</table>
align="right">
</body>
</html>
</tr>

59. Script </table>


siswa_data.php </form>
<?php
include </div>
'../conn/koneksi.php'; <div
?> class="zebra-table">
<table
<!-- menu tengah --> width="100%"
<div id="menu- height="100%"
tengah"> align="center"
<div cellspacing="0"
id="bg_menu">Data siswa cellpadding="5">
</div> <thead
<div align="center">
id="content_menu"> <tr>
<div <th
id="menu_header"> align="center" width="5%"
<form >No</th>
action="? <th
page=siswa_search" width="30%">NIS</th>
method="post"> <th
<table width="20%">Nama
width="100%" siswa</th>
height="100%" <th
width="15%"> Kelas</th>
113

<td
<th align="center"><?php echo
width="15%">Tahun $data['nama_siswa']; ?
Masuk</th> ></td>
</tr> <td
</thead> align="center"><?php echo
<?php $data['id_kelas']; ?
></td>

$query = "SELECT *
FROM tbl_walisiswa WHERE <td
NIS='$_SESSION[NIS]'"; align="center"><?php echo
$data['tahun_masuk']; ?

$sql = ></td>

mysql_query($query);

$total = </tr>
mysql_num_rows($sql);
<?php $no+
$no = 1; +; } ?>

</tbody>
while </table>
($data=mysql_fetch_array( </div>
$sql)) { <div
?> id="menu_bottom">
<tbody> <table
<tr> width="100%"
<td style="border:0px solid
align="center"><?php echo #9cc;">
$no; ?></td> <tr>
<td><a <td
href="?page=detil- width="50%">Jumlah : <?
siswa&NIS=<?php echo php echo $total; ?>
$data['NIS']; ?>" Siswa</td>
class="detil"><?php echo
$data['NIS']; ?></a></td>
114

</tr> <div
</table> class="table_input">
</div> <table
</div> width="100%" height="80%"
</div> align="center"
cellspacing="0"
60. Script cellpadding="5">
siswa_detil.php <?php
<?php include $NIS =
'../conn/koneksi.php'; ?> isset($_GET['NIS']) ?
<!-- menu tengah --> $_GET['NIS'] : "";
<div id="menu-
tengah">
<div $query=mysql_query("SELEC
id="bg_menu">Data Siswa T * FROM tbl_walisiswa
</div> WHERE NIS='$NIS'",
<div $konek);
id="content_menu">
<div
id="menu_header"> $data=mysql_fetch_array($
<table query);
width="100%" ?>
height="100%"
style="background- <tbody>
color:#9cc;"> <tr>
<tr> <td
<td width="30%"
align="center">Siswa align="right">NIS</td>
Detail</td> <td
</tr> width="2%">:</td>

</table> <td><?php echo


$data[1]; ?></td>
</tr>
<tr>
</div>
115

<td <td
width="20%" width="20%"
align="right">Nama align="right">jenis
Siswa</td> kelamin</td>

<td>:</td> <td>:</td>

<td><?php echo <td><?php echo


$data[2]; ?></td> $data[5]; ?></td>
</tr> </tr>
<tr>
<td <tr>
width="20%" <td
align="right">Kelas</td> width="20%"
align="right">Alamat</td>
<td>:</td>
<td>:</td>
<td><?php echo
$data[3]; ?></td> <td><?php echo
</tr> $data[6]; ?></td>
</tr>
<tr>
<td <tr>
width="20%" <td
align="right">Tahun width="20%"
Masuk</td> align="right">Tempat
tanggal Lahir</td>
<td>:</td>
<td>:</td>
<td><?php echo
$data[4]; ?></td> <td><?php echo
</tr> $data[7]; ?></td>
</tr>
<tr>
<tr>
116

<td
width="20%" <td><a href="?
align="right">Agama</td> page=siswa">Kembali</td>
</tr>
<td>:</td>

</tbody>
<td><?php echo </table>
$data[8]; ?></td> </div>
</tr> </div>
</div>
<tr>
<td 61. Script
width="20%" siswa_search.php
align="right">Anak_ke</td
> <!-- menu tengah
-->
<td>:</td> <div id="menu-
tengah">

<td><?php echo <div

$data[9]; ?></td> id="bg_menu">Data Siswa

</tr> </div>

<tr> <div

<td id="content_menu">

width="20%" <div

align="right">Nama id="menu_header">

wali</td> <form
action="?
page=siswa_search"
<td>:</td>
method="post">
<table
<td><?php echo $data[10];
width="100%"
?></td>
height="100%"
</tr>
style="border:1px solid
#9cc;">
<tr>
<tr>
117

<td <th
width="50%"><a href="? width="30%">NIS</th>
page=siswa_input">Input <th
Siswa</a></td> width="20%">Nama
<td Siswa</th>
width="50%" <th
align="right"><input width="15%">Kelas</th>
type="text" name="cari"
size="30" placeholder=" <th
Ketikan Nama Siswa"></td> width="15%">Tahun
Masuk</th>
<td><input type="submit"
id="submit" <th
value="cari"></td> width="15%">Jenis
</tr> kelamin</th>

</table> <th
</form> width="15%">alamat</th>
<th
width="15%">Tempat
Tangggal Lahir</th>
</div>
<div
class="zebra-table"> <th

<table width="15%">Agama</th>

width="100%"
height="100%" <th
align="center" width="15%">Anak-ke</th>
cellspacing="0"
cellpadding="5"> <th
<thead width="15%">Nama
align="center"> Wali</th>
<tr>
<th <th
align="center" width="5%" width="15%">User ID</th>
>No</th>
118

<th <tbody>
width="15%">Password</th> <tr>
<th <td
width="8%">Edit</th> align="center"><?php echo
<th $no; ?></td>
width="8%">Hapus</th> <td><a
</tr> href="?page=detil-
</thead> siswa&NIS=<?php echo
<?php $data['NIS']; ?>"
class="detil"><?php echo
include $data['NIS']; ?></a></td>
'../conn/koneksi.php'; <td
align="center"><?php echo

$cari = $data['nama_siswa']; ?

$_POST['cari']; ></td>
<td
align="center"><?php echo
$query = "SELECT *
$data['id_kelas']; ?
FROM tbl_walisiswa where
></td>
NIS like '%$cari%' OR
nama_siswa like '%$cari%'
"; <td
align="center"><?php echo
$data['tahun_masuk']; ?
$sql =
></td>
mysql_query($query);

<td
$total =
align="center"><?php echo
mysql_num_rows($sql);
$data['jenis_kelamin']; ?
></td>
$no = 1;

<td
align="center"><?php echo
while
$data['alamat']; ?></td>
($data=mysql_fetch_array(
<td
$sql)) {
align="center"><?php echo
?>
119

$data['tempat_tanggal_lah onclick="return
ir']; ?></td> confirm('Anda yakin ingin
menghapus data Siswa <?
<td php echo $data['NIS']; ?>
align="center"><?php echo ?')"><img
$data['agama']; ?></td> src="../images/delete.png
"/ width="15px"

<td height="15px"></a></td>

align="center"><?php echo
$data['anak_ke']; ?></td> </tr>

<td <?php $no+


align="center"><?php echo +; } ?>
$data['nama_wali']; ?
></td> </table>
</div>
<td <div
align="center"><?php echo id="menu_bottom">
$data['user_id']; ?></td> <table
width="100%"
<td style="border:0px solid
align="center"><?php echo #9cc;">
$data['password']; ? <tr>
></td> <td
<td width="50%">Jumlah : <?
align="center"><a href="? php echo $total; ?>
page=edit-siswa&id=<?php Siswa</td>
echo $data['id']; ? </tr>
>"><img
src="../images/edit.png"/ </table>
width="15px" </div>
height="15px"></a></td> </div>
<td </div>
align="center"><a href="? e. SCRIPT CSS PADA FOLDER CSS
page=hapus-siswa&id=<?php 62. Script style.css
echo $data['id']; ?>" @charset "utf-8";
120

/* CSS Document */ background-color:


#CCC;
body { text-shadow: #0FF;
background-color: border: 1px solid
#CCC; #FFF;
font-family:Tahoma, border-bottom:2px
Geneva, sans-serif; solid #9cc;
font-size: 14px; padding:8px;
} padding-bottom:8px;
#main { }
background-color:
#ffffff;
width: 950px; #menu_user{
margin: 0 auto; color : #333333;
border: 1px ; font-size: 13px;
-moz-box-shadow: margin-right: 20px;
-5px -5px 5px #888; margin-left: 5px;
-webkit-box-shadow: text-
-5px -5px 5px #888; decoration:none;
box-shadow: -5px width:200;
-5px 5px #888; float:left;
} }
.clear { #menu_tanggal {
clear:both; color : #333333;
float:none; font-size: 13px;
} margin-right:5px;
#header { }
background-color: #menu-atas li a:hover {
#000000; color : #999;
} }
#footer {
#menu-atas{ background-
background- color:#333;
image:url(../images/menu- font-size:12px;
atas.gif); font:Tahoma,
Geneva, sans-serif;
121

color:#FFF; font-weight:bold;
border: 1px solid font-size:11px;
#FFF; height:13px;
padding:20px;
} }
#content_menu {
#content { background-color:
width : 750px; #FFF;
background- border: 1px solid
color:#FFF; #9CC;
line-height: 16px;
} padding: 3px;
margin-bottom:
#menu-kiri { 10px;
margin:5px; font-size:14px;
width:200px; padding:10px;
float:left; }
} #left_menu {
#menu-tengah { background-color:
margin:5px; #FFF;
width:730px; border: 1px solid
float:left; #9CC;
} line-height: 20px;
padding: 7px;
#bg_menu { margin-bottom:
background-color: 10px;
#ccc; font-size:14px;
background- }
image:url(../images/menu-
biru.gif); #left_menu a {
border:1px solid color: #00C;
#333; font-size: 12px;
border-bottom:0px; font-
padding:7px; family:Verdana, Geneva,
padding-left:10px; sans-serif;
color:#ffffff; font-weight:normal;
122

text- .zebra-table th,.zebra-


decoration:none; table td{
vertical-align:
top;

} padding:3px 3px;

#left_menu a:hover { margin:0;

color:#0FF; border-top:1px

} solid #9cc;
border-right:1px
solid #9cc;

/* CSS for Zebra Table in }

index.html */ .zebra-table tbody

.zebra-table { tr:nth-child(odd) { /*

background- Make table like zebra */

color:#FFF; background: #FFF;

font-size:12px; }

font- .zebra-table a {

family:Georgia, "Times text-

New Roman", Times, serif; decoration:none;

border-collapse: text-shadow:#FF9;

collapse; }

border: 1px solid .zebra-table a:hover {

#9cc; color:#0033cc;

overflow: hidden; }

margin-bottom:10px;
} /* End CSS for Zebra

.zebra-table th{ Table in index.html */

background-
color:#9FF;
color:; /*menu_header */

} #menu_header {

.zebra-table tbody font-size:12px;

tr:hover td font-

{ background:#f2f2f2; family:Georgia, "Times

} New Roman", Times, serif;


123

border-collapse: font-
collapse; family:Georgia, "Times
overflow: hidden; New Roman", Times, serif;
margin-bottom:10px; border-collapse:
} collapse;
#menu_bottom { overflow: hidden;
font-size:12px; margin-top:10px;
color:#00F; margin-
font- bottom:200px;
family:Verdana, Geneva, }
sans-serif; .table_home tbody
border-collapse: td:hover
collapse; { background: #d0dafd;
overflow: hidden; }
margin-bottom:50px;
} .img_home{
border:1px solid
/*menu_header */ #9cc;
#menu_header2 { }
font-size:12px; .table_input {
font-
family:Georgia, "Times background-
New Roman", Times, serif; color:#FFF;
border-collapse: font-size:12px;
collapse; font-
overflow: hidden; family:Georgia, "Times
margin-top:20px; New Roman", Times, serif;
margin-bottom:10px; border-collapse:
} collapse;
border: 1px solid
/*table home */ #9cc;
.table_home { overflow: hidden;
background- margin-
color:#FFF; bottom:100px;
font-size:12px; }

You might also like