• Tidak ada hasil yang ditemukan

Sistem Informasi Akademik pada SMA Hang Tuah Belawan

N/A
N/A
Protected

Academic year: 2019

Membagikan "Sistem Informasi Akademik pada SMA Hang Tuah Belawan"

Copied!
45
0
0

Teks penuh

(1)

Listing Program

style.css

body {

text-align: justify;

font-family: "Trebuchet MS", Arial, Helvetica, sans-serif;

font-size: small;

text-align: justify;

color: #555E4F;

background-color: #A7ADF5;

}

h1, h2, h3, h4, h5 {

margin: 0;

}

#header {

width:800px;

height:150px;

margin: auto;

padding: 0;

border: 10px solid #3366CC;

border-bottom:5px solid #0066FF ;

background: #788770;

}

#header h1 {

float: left;

margin: 20px 0 0 20px;

font-size: 50px;

letter-spacing: -7px;

(2)

}

#header h2 {

float: right;

margin: 40px 20px 0 0;

font-size: 18px;

letter-spacing: -2px;

}

a {

color: #323B2E;

text-decoration: none;

}

a:hover {

color: #555E4F;

text-decoration: none;

}

#menu1 {

float: left;

width: 100px;

margin: 0px auto;

padding-bottom: 20px;

text-transform: uppercase;

font-weight: bold;

font-size: 14px;

color: #323B2E;

}

#menu1 ul {

margin: 0px;

(3)

padding: 0px;

}

#menu1 li {

}

#menu1 a {

display: block;

width: 190px;

padding: 12px 0px;

background-color: #5364D7;

border-top: 1px solid #323B2E;

border-bottom: 1px solid #788770;

text-align: center;

text-decoration: none;

text-transform: uppercase;

font-weight: bold;

color: #FFFFFF;

}

#menu1 a:hover {

background-color: #B0C0F9;

border-top: 1px solid #000099;

border-bottom: 1px solid #000099;

}

#content {

width: 800px;

margin: 0 auto;

border: 10px solid #3366CC;

border-top:5px solid #0066FF;

background: #97ABFB;

(4)

#colOne {

float: left;

width: 190px;

margin-top: 20px;

padding: 0 10px 0 20px;

}

#colTwo {

float: right;

margin-top: 20px;

width: 440px;

padding: 0 20px 0 20px;

}

#content h2 {

margin-bottom: 20px;

font-size: 18px;

letter-spacing: -2px;

}

table{

border: 1px solid #000000;

font-size:12px;

}

#footer {

width: 800px;

margin: 0 auto;

padding-top: 20px;

}

#footer p {

text-align: center;

(5)

font-size: 10px;

}

index.php

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<!--

Design by Free CSS Templates

http://www.freecsstemplates.org

Released for free under a Creative Commons Attribution 2.5 License

-->

<html xmlns="http://www.w3.org/1999/xhtml">

<head>

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

<title>SMA HANG TUAH BELAWAN</title>

<meta name="Keywords" content="" />

<meta name="Description" content="" />

<link href="style.css" rel="stylesheet" type="text/css"/>

<style type="text/css">

<!--

.style1 {color: #333333}

-->

</style>

</head>

<body>

<div id="header"><img border="2" src="foto/header.JPG"align="top" width="800" height="150"/>

</div>

(6)

<div id="colOne">

<div id="menu1">

<ul>

<li id="menu-01"><a href="home1.php">Home</a></li>

<li id="menu-02"><a href="profil.php">Profil</a></li>

<li id="menu-03"><a href="visi.php">visi misi </a></li>

<li id="menu-04"><a href="struktur.php">struktur organisasi </a></li>

<li id="menu-05"><a href="menampilkanguru.php">guru</a></li>

<li id="menu-05"><a href="fas.php">Fasilitas</a></li>

<li id="menu-05"><a href="form_tamu.php">buku tamu </a></li>

<li id="menu-05"><a href="admin1/formlogin.php">ADMINISTRATOR </a></li>

<li></li>

</ul>

<div id="leftcontent">

<p>

<?php

include "kalender.php";

?>

</p>

</div>

</div>

<div class="margin-news">

<h2>&nbsp;</h2>

</div>

</div>

<p>

<?php

(7)

include "./home.php";

}

else{

include "./$hal.php";

}

?>

</p>

<div style="clear: both;"> <p>&nbsp;</p>

</div>

</div>

</div>

<div id="footer">

<p>Copyright &copy; 2012<a href="http://freecsstemplates.org"><strong> SMA Hang Tuah Belawan </strong></a></p>

</div>

</body>

</html>

home.php

<style type="text/css">

<!--

.style1 {

font-family: "Times New Roman", Times, serif;

font-size: 16px;

}

.style3 {font-size: 16px}

(8)

-->

</style>

<p>

<p>

<p>

<h3 class="style8"> Selamat Datang di Website SMA Hang Tuah Belawan </h3>

</p>

<hr size= 5 noshade width=60% align=left />

<p align="justify">

<h6 align="justify" class="style3"><img border="2" img src="foto/foto049.jpg" align="left" width="250" height="150" hspace="5" /><span class="style1 style6">

Website SMA Hang Tuah ini merupakan sebuah inovasi sekolah dalam menghadapi era teknologi informasi yang semakin pesat. Dimana melalui website ini diharapkan bisa menjadi sarana atau media untuk mempublikasikan informasi-informasi tentang SMA Hang Tuah Belawan. Situs ini diperuntukkan bagi siapa saja yang ingin memperoleh informasi tentang sekolah ini. </span></h6>

<h6 align="justify" class="style1 style6">Saran dan masukan dari semua pihak akan selalu kami terima dengan senang hati. Terima kasih.</h6>

<p align="justify" class="style1 style6">&nbsp;</p>

<h6 align="right" class="style7 style1 style6">Kepala SMA Hang Tuah Medan,</h6>

<p align="right" class="style7 style1 style6">&nbsp;</p>

<h6 align="right" class="style7 style1 style6">Akbar, SS.</h6>

</p>

</h6>

profil.php

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<!--

Design by Free CSS Templates

(9)

Released for free under a Creative Commons Attribution 2.5 License

-->

<html xmlns="http://www.w3.org/1999/xhtml">

<head>

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

<title>SMA Hang Tuah Belawan</title>

<meta name="Keywords" content="" />

<meta name="Description" content="" />

<link href="style.css" rel="stylesheet" type="text/css" />

<style type="text/css">

<!--

.style1 {

font-size: 18px;

font-weight: bold;

}

-->

</style>

</head>

<body>

<div id="header"><img border="2" src="foto/header.JPG"align="top" width="800" height="150"/>

</div>

<div id="content">

<div id="colOne">

<div id="menu1">

<ul>

<li id="menu-01"><a href="home1.php">Home</a></li>

(10)

<li id="menu-03"><a href="visi.php">visi misi </a></li>

<li id="menu-04"><a href="struktur.php">struktur organisasi </a></li>

<li id="menu-05"><a href="menampilkanguru.php">guru</a></li>

<li id="menu-05"><a href="fas.php">fasilitas</a></li>

<li id="menu-05"><a href="form_tamu.php">buku tamu </a></li>

<li id="menu-05"><a href="admin1/formlogin.php">ADMINISTRATOR </a></li>

</ul>

</div>

<div class="margin-news">

<h2>&nbsp;</h2>

</div>

</div>

<h3>&nbsp;</h3>

<h3>ID Sekolah SMA Hang Tuah Belawan </h3>

<hr size= 5 noshade width=53% align=left />

</p>

</p>

<table width="419" height="326" border="6">

<tr>

<th width="163" scope="row">No.Statistik</th>

<td width="288"><div align="center">301066109378</div></td>

</tr>

<tr>

<th scope="row">Nama Sekolah </th>

<td><div align="center">SMA Hang Tuah Belawan </div></td>

</tr>

(11)

<th scope="row">Tingkat Sekolah </th>

<td><div align="center">SMA</div></td>

</tr>

<tr>

<th scope="row">Status Sekolah </th>

<td><div align="center">Disamakan</div></td>

</tr>

<tr>

<th scope="row">Jenis Sekolah </th>

<td><div align="center">Sekolah Menengah Umum </div></td>

</tr>

<tr>

<th scope="row">Alamat</th>

<td><div align="center">Jl.Raden Sullian Belawan</div></td>

</tr>

<tr>

<th scope="row">Kota</th>

<td><div align="center">Medan</div></td>

</tr>

<tr>

<th scope="row">Kecamatan</th>

<td><div align="center">Medan Belawan </div></td>

</tr>

<tr>

<th scope="row">Provinsi </th>

<td><div align="center">Sumatera Utara </div></td>

</tr>

<tr>

(12)

<td><div align="center">061 - 77839821 </div></td>

</tr>

</table>

<p>&nbsp;</p>

<p>&nbsp;</p>

<p>&nbsp;</p>

<p>&nbsp;</p>

</div>

</div>

<div id="footer">

<p>Copyright &copy; 2012<a href="http://freecsstemplates.org"><strong> SMA Hang Tuah Belawan </strong></a></p>

</div>

</body>

</html>

struktur.php

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<!--

Design by Free CSS Templates

http://www.freecsstemplates.org

Released for free under a Creative Commons Attribution 2.5 License

-->

<html xmlns="http://www.w3.org/1999/xhtml">

<head>

(13)

<title>SMA Hang Tuah Belawan</title>

<meta name="Keywords" content="" />

<meta name="Description" content="" />

<link href="style.css" rel="stylesheet" type="text/css" />

<style type="text/css">

<!--

.style1 {

font-size: 18px;

font-weight: bold;

}

-->

</style>

</head>

<body>

<div id="header"><img border="2" src="foto/header.JPG"align="top" width="800" height="150"/>

</div>

<div id="content">

<div id="colOne">

<div id="menu1">

<ul>

<li id="menu-01"><a href="home1.php">Home</a></li>

<li id="menu-02"><a href="profil.php">Profil</a></li>

<li id="menu-03"><a href="visi.php">visi misi </a></li>

<li id="menu-04"><a href="struktur.php">struktur organisasi </a></li>

<li id="menu-05"><a href="menampilkanguru.php">guru</a></li>

<li id="menu-05"><a href="fas.php">fasilitas</a></li>

(14)

<li id="menu-05"><a href="admin1/formlogin.php">ADMINISTRATOR </a></li>

<li></li>

</ul>

</div>

<div class="margin-news">

<h2>&nbsp;</h2>

</div>

</div>

<p>

<center>

<span class="style2">Struktur Organisasi SMA Hang Tuah Belawan </span>

</center>

<hr size= 5 noshade width=72% align=left />

<br>

<img border="2" src="foto/struktur.jpg" align="center" width="525" height="525" hspace="5" />

</p>

<p>&nbsp;</p>

<p>&nbsp;</p>

<p>&nbsp;</p>

<div style="clear: both;"></div>

</div>

</div>

<div id="footer">

(15)

</div>

</body>

</html>

menampilkanguru.php

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<!--

Design by Free CSS Templates

http://www.freecsstemplates.org

Released for free under a Creative Commons Attribution 2.5 License

-->

<html xmlns="http://www.w3.org/1999/xhtml">

<head>

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

<title>SMA Hang Tuah Belawan</title>

<meta name="Keywords" content="" />

<meta name="Description" content="" />

<link href="style.css" rel="stylesheet" type="text/css" />

<style type="text/css">

<!--

.style1 {

font-size: 18px;

font-weight: bold;

}

-->

</style>

(16)

<body>

<div id="header"><img border="2" src="foto/header.JPG"align="top" width="800" height="150"/>

</div>

<div id="content">

<div id="colOne">

<div id="menu1">

<ul>

<li id="menu-01"><a href="home1.php">Home</a></li>

<li id="menu-02"><a href="profil.php">Profil</a></li>

<li id="menu-03"><a href="visi.php">visi misi </a></li>

<li id="menu-04"><a href="struktur.php">struktur organisasi </a></li>

<li id="menu-05"><a href="menampilkanguru.php">guru</a></li>

<li id="menu-05"><a href="fas.php">fasilitas</a></li>

<li id="menu-05"><a href="form_tamu.php">buku tamu </a></li>

<li id="menu-05"><a href="admin1/formlogin.php">ADMINISTRATOR </a></li>

</ul>

</div>

<div class="margin-news">

<h2>&nbsp;</h2>

</div>

</div>

<?php

include "koneksi.php";

$tampil="select * from guru";

$hasil=mysql_query($tampil);

(17)

echo"<style type = 'text/css'>

<!--

th { font-weight : bold;

background-color:black;

color : white; }

tr { background-color: silver;

color: black; }

-->

</style>";

echo"<table border=1>";

echo"<h3>Daftar Data Guru</h3>";

echo"<tr><th>No. </th>

<th>Nama Guru</th>

<th>TTL </th>

<th>Bidang Studi</th>

<th>Jenis Kelamin</th></tr>";

$nomor=1;

while($data=mysql_fetch_row($hasil))

{

echo "<tr><td>$nomor</td>";

echo "<td>$data[1]</td>";

echo "<td>$data[2]</td>";

echo "<td>$data[3]</td>";

echo "<td>$data[4]</td>";

$nomor++;

}

echo"</table>";

echo "<a href='index.php'>Kembali</a>";

(18)

</div>

<div style="clear: both;"></div>

<p>&nbsp;</p>

</div>

</div>

<div id="footer">

<p>Copyright &copy; 2012<a href="http://freecsstemplates.org"><strong> SMA Hang Tuah Belawan </strong></a></p>

</div>

</body>

</html>

visi.php

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<!--

Design by Free CSS Templates

http://www.freecsstemplates.org

Released for free under a Creative Commons Attribution 2.5 License

-->

<html xmlns="http://www.w3.org/1999/xhtml">

<head>

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

<title>SMA Hang Tuah Belawan</title>

<meta name="Keywords" content="" />

<meta name="Description" content="" />

<link href="style.css" rel="stylesheet" type="text/css" />

(19)

<!--

.style1 {

font-size: 18px;

font-weight: bold;

}

-->

</style>

</head>

<body>

<div id="header"><img border="2" src="foto/header.JPG"align="top" width="800" height="150"/>

</div>

<div id="content">

<div id="colOne">

<div id="menu1">

<ul>

<li id="menu-01"><a href="home1.php">Home</a></li>

<li id="menu-02"><a href="profil.php">Profil</a></li>

<li id="menu-03"><a href="visi.php">visi misi </a></li>

<li id="menu-04"><a href="struktur.php">struktur organisasi </a></li>

<li id="menu-05"><a href="menampilkanguru.php">guru</a></li>

<li id="menu-05"><a href="fas.php">fasilitas</a></li>

<li id="menu-05"><a href="form_tamu.php">buku tamu </a></li>

<li id="menu-05"><a href="admin1/formlogin.php">ADMINISTRATOR </a></li>

</ul>

</div>

<div class="margin-news">

(20)

</div>

</div>

<h3>&nbsp;</h3>

<h3 class="style2">Visi SMA Hang Tuah Belawan :</h3>

<hr size= 5 noshade width=60% align=left />

</p>

<p align="justify"><span class="style1"></span> MENCIPTAKAN SUMBER DAYA MANUSIA YANG BERWAWASAN IPTEK DAN IMTAQ SERTA CINTA TANAH AIR DENGAN MEMILIKI APRESIASI YANG TINGGI TERHADAP BUDAYA DAN MARITIM<br>

</p>

<p align="justify">&nbsp; </p>

<h3 class="style2">Misi SMA Hang Tuah Belawan :</h3>

<hr size= 5 noshade width=60% align=left />

<p>1. MENINGKATKAN KINERJA FUNGSIONAL, STAF PENGAJAR, </p>

<p>GURU BP/BK YANG DIARAHKAN UNTUK MENGAJAR/MENDIDIK SISWA</p>

<p>2. MENINGKATKAN DISIPLIN SELURUH PERSONIL YANG ADA BAIK GURU, TU MAUPUN SISWA.</p>

<p>3. MELENGKAPI SARANA DAN PRASARANA YANG BAIK YANG ADA MAUPUN</p>

<p> YANG BELUM ADA, SESUAI DENGAN TUNTUTAN KURIKULUM TINGKAT SATUAN </p>

<p>PENDIDIK (KTSP). </p>

<p>4. MENINGKATKAN MUTU PENDIDIKAN YANG BERWAWASAN IPTEK, BUDAYA DAN MARITIM. </p>

</p>

<p>&nbsp;</p>

<p>&nbsp;</p>

<p>&nbsp;</p>

(21)

<div style="clear: both;"></div>

<p>&nbsp;</p>

fas.php

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<!--

Design by Free CSS Templates

http://www.freecsstemplates.org

Released for free under a Creative Commons Attribution 2.5 License

-->

<html xmlns="http://www.w3.org/1999/xhtml">

<head>

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

<title>SMA Hang Tuah Belawan</title>

<meta name="Keywords" content="" />

<meta name="Description" content="" />

<link href="style.css" rel="stylesheet" type="text/css" />

<style type="text/css">

<!--

.style1 {

font-size: 18px;

font-weight: bold;

}

-->

</style>

(22)

<body>

<div id="header"><img border="2" src="foto/header.JPG"align="top" width="800" height="150"/>

</div>

<div id="content">

<div id="colOne">

<div id="menu1">

<ul>

<li id="menu-01"><a href="home1.php">Home</a></li>

<li id="menu-02"><a href="profil.php">Profil</a></li>

<li id="menu-03"><a href="visi.php">visi misi </a></li>

<li id="menu-04"><a href="struktur.php">struktur organisasi </a></li>

<li id="menu-05"><a href="menampilkanguru.php">guru</a></li>

<li id="menu-05"><a href="fas.php">fasilitas</a></li>

<li id="menu-05"><a href="form_tamu.php">buku tamu </a></li>

<li id="menu-05"><a href="admin1/formlogin.php">ADMINISTRATOR </a></li>

</ul>

</div>

<div class="margin-news">

<h2>&nbsp;</h2>

</div>

</div>

<span class="style2">FASILITAS SMA HANG TUAH BELAWAN </span><br>

<br>

<center>

(23)

<tr valign="bottom"><td align="center"><img border="2" src="foto/Foto041.JPG" align="top" width="150" height="100" hspace="5" /></a>

<br>

Lab Biologi</td>

<td align="center"><img border="2" src="foto/foto075.JPG" align="top" width="150" height="100" hspace="5" /></a>

<br>

Ruang Komputer</td>

<td align="center"><img border="2" src="foto/foto048.JPG" align="top" width="150" height="100" hspace="5" /></a>

<br>

Perpustakaan</td>

<td align="center">&nbsp;</td>

</tr>

<tr valign="bottom"><td align="center"><img border="2" src="foto/Foto042.JPG" align="top" width="150" height="100" hspace="5" /></a>

<br>

Ruang Kesenian</td>

<td align="center"><img border="2" src="foto/foto039.JPG" align="top" width="150" height="100" hspace="5" />

<br>

Lapangan Basket</td>

<td align="center"><img border="2" src="foto/Foto036.JPG" align="top" width="150" height="100" hspace="5" /></a>

<br>

Musholla</td>

<td align="center">&nbsp;</td>

</tr>

(24)

<br></td>

<td align="center"><a href="pages/belgian Tervueren17_jpg.htm"></a>

<br></td>

<td align="center"><a href="pages/belgian Tervueren8_jpg.htm"></a>

<br></td>

<td align="center">&nbsp;</td>

</tr>

<tr valign="bottom"><td align="center"><a href="pages/rough collie5_jpg.htm"></a>

<br></td>

<td align="center"><a href="pages/rough collie9_jpg.htm"></a>

<br></td>

<td align="center"><a href="pages/samoyed17_jpg.htm"></a>

<br></td>

</tr>

</table>

</center>

<div align="right"><a href="fas1.php"></a> </div>

<p>&nbsp;</p>

<div style="clear: both;"></div>

<p>&nbsp;</p>

</div>

</div>

<div id="footer">

<p>Copyright &copy; 2012<a href="http://freecsstemplates.org"><strong> SMA Hang Tuah Belawan </strong></a></p>

</div>

</body>

(25)

koneksi.php

<?php

$link=mysql_connect("localhost","root","");

mysql_select_db("smahangtuah",$link);

?>

tabel_tamu.php

</ul>

</div>

<div class="margin-news">

<h2>&nbsp;</h2>

</div>

</div>

<p>

<?

include"koneksi.php";

$tampil="select * from data_tamu";

$hasil=mysql_query($tampil);

echo"<body bgcolor='black'>";

echo"<style type = 'text/css'>

<!--

th { font-weight : bold;

background-color:black;

color : white; }

tr { background-color: silver;

color: black; }

(26)

</style>";

echo"<table border=1>";

echo"<h3>Buku Tamu</h3>";

echo"<tr><th>No. </th>

<th>Nama</th>

<th>Tanggal</th>

<th>Email</th>

<th>Pesan</th></tr>";

$nomor=1;

while($data=mysql_fetch_row($hasil))

{

echo "<tr><td>$nomor</td>";

echo "<td>$data[2]</td>";

echo "<td>$data[1]</td>";

echo "<td>$data[5]</td>";

echo "<td>$data[6]</td>";

$nomor++;

}

echo"</table>";

?>

</p>

<div style="clear: both;">

<p>&nbsp;</p>

(27)

</div>

</div>

<div id="footer">

<p>Copyright &copy; 2012<a href="http://freecsstemplates.org"><strong> SMA Hang Tuah Belawan </strong></a></p>

</div>

</body>

</html>

simpan_tamu.php

<?php

include "koneksi.php";

$tanggal=date("Y-m-d");

mysql_query("insert into data_tamu set

id='',

tanggal='$tanggal',

nama='$_REQUEST[nama]',

pesan='$_REQUEST[pesan]'

");

?>

check_login.php

<?php

include "koneksi.php";

$username=$_POST['username'];

(28)

$username = stripslashes($username);

$password = stripslashes($password);

$username = mysql_real_escape_string($username);

$password = mysql_real_escape_string($password);

$sql="SELECT * FROM $tb_user WHERE username='$username' and password='$password'";

$result=mysql_query($sql);

session_register("username");

session_register("password");

header("location:login_success.php");

echo "Wrong Username or Password";

ob_end_flush();

?>

formlogin.php

<html><head>

<title></title>

<body>

<div id="header"><img border="2" src="header.JPG"align="top" width="800" height="150"/>

</div>

<script language="javascript">

(29)

if (form.username.value == ""){

alert("Anda belum mengisikan Username.");

form.username.focus();

return (false);

}

if (form.password.value == ""){

alert("Anda belum mengisikan Password.");

form.password.focus();

return (false);

}

return (true);

}

</script>

<link href="style.css" rel="stylesheet" type="text/css" />

</head>

<body OnLoad="document.login.username.focus();">

<div id="header">

<p>&nbsp;</p>

<p><img src="login-welcome.gif" width="97" height="105" hspace="10" align="left">

</p>

<form name="login" action="proses.php" method="POST" onSubmit="return validasi(this)">

<table>

<tr><td>Username</td><td> : <input type="text" name="username"></td></tr>

(30)

<tr><td colspan="2"><input type="submit" value="Login"></td></tr>

</table>

</form>

<p>&nbsp;</p>

<p>&nbsp;</p>

<p>&nbsp;</p>

<p>&nbsp;</p>

</div>

<div id="footer">

Copyright 2012 by SMA Hang Tuah </div>

</div>

</body>

</html>

login_success.php

<?

session_start();

if(!session_is_registered(myusername)){

header("location:formlogin.php");

}

?>

<html>

<body>

Login Successful

(31)

</html>

proses_tambah_guru.php

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<!--

Design by Free CSS Templates

http://www.freecsstemplates.org

Released for free under a Creative Commons Attribution 2.5 License

-->

<html xmlns="http://www.w3.org/1999/xhtml">

<head>

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

<title>SMA HANG TUAH BELAWAN</title>

<meta name="Keywords" content="" />

<meta name="Description" content="" />

<link href="style.css" rel="stylesheet" type="text/css"/>

<style type="text/css">

<!--

.style1 {color: #333333}

-->

</style>

</head>

<body>

<div id="header"><img border="2" src="header.JPG"align="top" width="800" height="150"/>

</div>

(32)

<div id="colOne">

<div id="menu1">

<ul>

<li id="menu-01"><a href="guru_add.php">Tambah Guru</a></li>

<li id="menu-01"><a href="guru_edit.php">Edit Guru</a></li>

<li id="menu-01"><a href="logout.php">Logout</a></li>

<li></li>

</ul>

<div id="page"></div>

</div>

<div class="margin-news">

<h2>&nbsp;</h2>

</div>

</div>

<?php

include "koneksi.php";

$input="INSERT INTO guru values(0,'$_POST[nama]','$_POST[ttl]','$_POST[bidstudi]','$_POST[jk]')";

$hasil=mysql_query($input);

if ($hasil){

echo"<br><br>Data berhasil dimasukkan.";

}

?>

<div style="clear: both;">

<p>&nbsp;</p>

</div>

(33)

</div>

<div id="footer">

<p>Copyright &copy; 2012<a href="http://freecsstemplates.org"><strong> SMA Hang Tuah Belawan </strong></a></p>

</div>

</body>

</html>

guru_add.php

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<!--

Design by Free CSS Templates

http://www.freecsstemplates.org

Released for free under a Creative Commons Attribution 2.5 License

-->

<html xmlns="http://www.w3.org/1999/xhtml">

<head>

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

<title>Tambah Guru</title>

<meta name="Keywords" content="" />

<meta name="Description" content="" />

<link href="style.css" rel="stylesheet" type="text/css"/>

<style type="text/css">

<!--

.style1 {color: #333333}

-->

</style>

(34)

<body>

<div id="header"><img border="2" src="header.JPG"align="top" width="800" height="150"/>

</div>

<div id="content">

<div id="colOne">

<div id="menu1">

<ul><li id="menu-01"><a href="guru_add.php">Tambah Guru</a></li>

<li id="menu-01"><a href="guru_edit.php">Edit Guru</a></li>

<li id="menu-01"><a href="logout.php">Logout</a></li>

<li></li>

</ul>

<div id="page"></div>

</div>

<div class="margin-news">

<h2>&nbsp;</h2>

</div>

</div>

<p>

<body>

<h1 align="center">Input Data Guru</h1>

<form action="proses_tambah_guru.php" method="post">

<table width="70%" border="0" cellpadding="2" cellspacing="2">

<tr>

(35)

<th width="79%" scope="col"><div align="left">

<input type="text" name="nama" class="width50"/>

</div></th>

</tr>

<tr>

<td>Tempat Tgl Lhr</td>

<td><input type="text" name="ttl" class="width50"/></td>

</tr>

<tr>

<td>Bidang Studi</td>

<td><input type="text" name="bidstudi" class="width50"/></td>

</tr>

<tr>

<td>Jenis Kelamin</td>

<td><select name="jk">

<option value="Pria">Pria</option>

<option value="Wanita">Wanita</option>

</select></td>

</tr>

<tr>

<td><label></label></td>

<td><input name="submit" type="submit" class="button" value="Submit"/>

<input name="reset" type="reset" class="button" value="Reset"/></td>

</tr>

</table>

<td align="center" colspan="2"><label>&nbsp;</label></td>

</p>

</form>

(36)

</p>

<div style="clear: both;">

<p>&nbsp;</p>

</div>

</div>

</div>

<div id="footer">

<p>Copyright &copy; 2012<a href="http://freecsstemplates.org"><strong> SMA Hang Tuah Belawan </strong></a></p>

</div>

</body>

</html>

proses_ubah_data.php

<?php

include "koneksi.php";

$ubah="update guru set nama='$_POST[nama]', ttl='$_POST[ttl]', bidstudi='$_POST[bidstudi]', jk='$_POST[jk]' where no='$_POST[no]'";

mysql_query($ubah);

header("location:./guru_edit.php");

(37)

guru_edit.php

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<!--

Design by Free CSS Templates

http://www.freecsstemplates.org

Released for free under a Creative Commons Attribution 2.5 License

-->

<html xmlns="http://www.w3.org/1999/xhtml">

<head>

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

<title>Edit Guru</title>

<meta name="Keywords" content="" />

<meta name="Description" content="" />

<link href="style.css" rel="stylesheet" type="text/css"/>

<style type="text/css">

<!--

.style1 {color: #333333}

-->

</style>

</head>

<body>

<div id="header"><img border="2" src="header.JPG"align="top" width="800" height="150"/>

</div>

<html>

<head>

<title>Data Guru</title>

</head>

(38)

<p align="center"><span style="text-transform:uppercase">Data Guru</span></p>

<table border="1" width="100%" cellspacing="1" cellpadding="0" id="table1">

<tr

<td align="center"><b>No</b></td>

<td align="center"><b>Nama</b></td>

<td align="center"><b>TTL</b></td>

<td align="center"><b>Bidang Studi</b></td>

<td align="center"><b>Jenis Kelamin</b></td>

<td align="center"><b>Keterangan</b></td>

</tr>

<?php

include "koneksi.php";

$cari="select*from guru";

$hasil=mysql_query($cari);

while($data=mysql_fetch_row($hasil)){

echo"<tr>

<td>$data[0]</td>

<td>$data[1]</td>

<td>$data[2]</td>

<td>$data[3]</td>

<td>$data[4]</td>

<td>&nbsp;<a href=\"ubah_data.php?id=$data[0]\">Ubah</a> <a href=\"proses_hapus.php?id=$data[0]\">Hapus</a></td>

</tr>";

}

?>

(39)

<a href="index.php">Kembali</a></li>

</body>

</html>

</p>

<p>&nbsp;</p>

<p>&nbsp;</p>

<p>&nbsp;</p>

<p>&nbsp;</p>

<div style="clear: both;">

<p>&nbsp;</p>

</div>

<p>&nbsp;</p>

<p>&nbsp;</p>

</div>

</div>

<div id="footer">

<p>Copyright &copy; 2012<a href="http://freecsstemplates.org"><strong> SMA Hang Tuah Belawan </strong></a></p>

</div>

</body>

</html>

ubah_data.php

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<!--

Design by Free CSS Templates

http://www.freecsstemplates.org

(40)

-->

<html xmlns="http://www.w3.org/1999/xhtml">

<head>

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

<title>SMA HANG TUAH BELAWAN</title>

<meta name="Keywords" content="" />

<meta name="Description" content="" />

<link href="style.css" rel="stylesheet" type="text/css"/>

<style type="text/css">

<!--

.style1 {color: #333333}

-->

</style>

</head>

<body>

<div id="header"><img border="2" src="header.JPG"align="top" width="800" height="150"/>

</div>

<div id="content">

<div id="colOne">

<div id="menu1">

<ul>

<li id="menu-01"><a href="guru_add.php">Tambah Guru</a></li>

<li id="menu-01"><a href="guru_edit.php">Edit Guru</a></li>

<li id="menu-01"><a href="logout.php">Logout</a></li>

(41)

<li></li>

</ul>

<div id="page"></div>

</div>

<div class="margin-news">

<h2>&nbsp;</h2>

</div>

</div>

<p>

<body>

<h1 align="center">Edit Data Guru</h1>

<form action="proses_ubah_data.php" method="post">

<table width="70%" border="0" cellpadding="2" cellspacing="2">

<tr>

<?php

include "koneksi.php";

$edit="Select * from guru where no='$_GET[id]'";

$hasil=mysql_query($edit);

while ($data=mysql_fetch_array($hasil))

{

?>

<th width="21%" scope="col"><div align="left">Nama Guru</div></th>

<th width="79%" scope="col"><div align="left">

<input name="nama" type="text" class="width50" value="<?php echo $data[1];?>" size="50"/>

<input name="no" type="hidden" id="no" value="<?php echo $data[0];?>" />

(42)

</tr>

<tr>

<td>Tempat Tgl Lhr</td>

<td><input name="ttl" type="text" class="width50" value="<?php echo $data[2];?>" size="50"/></td>

</tr>

<tr>

<td>Bidang Studi</td>

<td><input name="bidstudi" type="text" class="width50" value="<?php echo $data[3];?>" size="40"/></td>

</tr>

<tr>

<td>Jenis Kelamin</td>

<td><select name="jk">

<option value="Pria">Pria</option>

<option value="Wanita">Wanita</option>

</select></td>

</tr>

<tr>

<td><label></label></td>

<td><input name="submit" type="submit" class="button" value="U p d a t e"/></td>

</tr>

<?php } ?>

</table>

<td align="center" colspan="2"><label>&nbsp;</label></td>

</p>

</form>

</body>

(43)

<div style="clear: both;">

<p>&nbsp;</p>

</div>

</div>

</div>

<div id="footer">

<p>Copyright &copy; 2012<a href="http://freecsstemplates.org"><strong> SMA Hang Tuah Belawan </strong></a></p>

</div>

</body>

</html>

kirim_data.php

<?

include"connect.php";

if($nama==""||$alamat==""||$kota==""||$email==""||$pesan==""){

$pesan="formulir belum lengkap";

}elseif(!ereg("[a-zA-Z]",$kota)){

$pesan="penulisan kota tidak benar";

}elseif($email && ereg("^.+@.+\\.+"$,$email)){

$pesan='Penulisan Email Tidak Benar;

}else{

$tanggal=date("d M Y");

$baca=mysql_query("select*from smahangtuah where pesan='$pesan'");

(44)

if($t==0){

$pesan=str_replace("

","<br>",$pesan);

$pesan=str_replace("\\","",pesan);

$nama=str_replace("\\","",$nama);

$alamat=str_replace("\\","",$alamat);

$kota=str_replace("\\","",$kota);

$kota=ucfirst($kota);

$add=mysql_query("insert into data_tamu(tanggal, nama, alamat, kota, email, pesan)

values('$tanggal','$alamat','$kota','$email','$pesan')");

$pesan="beres";

header("location:./data_tamu.php?p=0");

}else{

$pesan="data sudah dimasukkan";

}

}

echo"$pesan";

(45)

Referensi

Dokumen terkait

Dengan ini diberitahukan bahwa setelah diadakan proses Pengadaan langsung, maka telah diterbitkan Surat Penetapan Penyedia Barang/Jasa pada tanggal 22 Maret 2011

[r]

Anak usia SD masih memasuki tahap perkembangan yang sangat pesat. Berbagai otot dan tulang mengalami penguatan sehingga anak cenderung aktif dalam melakukan kegiatan fisik

Hasil penelitian menunjukkan bahwa karet mulai disadap pada umur enam tahun dan produksi terus meningkat hingga tanaman berumur 25 tahun, lalu berlahan

[r]

Dengan ini kami beritahukan bahwa berdasarkan evaluasi Kualifikasi Pengadaan Belanja Bahan Produk Untuk Balita Gizi Buruk, yang dilakukan oleh Panitia Pengadaan Barang dan Jasa

Penelitian tentang penggunaan ekstrak bahan alam sebagai inhibitor korosi di lingkungan asam klorida masih terbatas dan beberapa peneliti penggunaaan ekstrak bahan

Tujuan dari perpaduan metode tematik-interdisipliner terhadap pembagian waris laki-laki dan perempuan adalah; (1) proses pembagian waris berlaku secara bijakasana, karena