• Tidak ada hasil yang ditemukan

LISTING PROGRAM Halaman Utama Website

N/A
N/A
Protected

Academic year: 2019

Membagikan "LISTING PROGRAM Halaman Utama Website"

Copied!
49
0
0

Teks penuh

(1)

LISTING PROGRAM

Halaman Utama Website

1. index.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>

<title>SMA Muhammadiyah 2 Medan</title>

<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <link href="style.css" rel="stylesheet" type="text/css" />

<script type="text/javascript" src="scripts/jquery-1.4.1.min.js"></script>

</head>

<link rel="shortcut icon" href="favicon.ico" type="image/x-icon"> <body>

<div class="main">

<div class="header">

<div class="header_resize">

<div class="logo"><h1><a href=""></a></h1></div> <div class="menu_nav">

<ul class="dropmenu">

<li><a href="?menu=home">BERANDA</a></li> <li><a href="">TENTANG SEKOLAH</a> <ul>

<li><a href="?menu=profil">PROFIL</a></li>

<li><a href="?menu=struktur">STRUKTUR ORGANISASI</a></li> <li><a href="?menu=visi">VISI DAN MISI</a></li>

</ul> </li>

<li><a href="">UNIT KEGIATAN</a> <ul>

<li><a href="?menu=ekstra">EKTSTRAKULIKULER</a></li> <li><a href="?menu=prestasi">PRESTASI</a></li>

</ul> </li>

<li><a href="?menu=galeri">GALERI</a></li> <li><a href="?menu=berita">BERITA</a></li> <li><a href="?menu=guru">DATA GURU</a></li> <li><a href="?menu=inspiratif">INSPIRATIF</a></li> <li><a href="?menu=kontak">KONTAK</a></li> </li>

(2)

</div>

<div class="clr"></div> </div>

</div>

<div class="content">

<div class="content_resize">

<div class="mainbar"> <div class="article"> <?php

error_reporting('0'); $menu =$_GET['menu'];

if($_GET['menu']=='home'){ include('home.php'); }

elseif($_GET['menu']=='profil'){ include('profil.php');

}

elseif($_GET['menu']=='galeri'){ include('galeri.php');

}

elseif($_GET['menu']=='berita'){ include('berita.php');

}

elseif($_GET['menu']=='unit'){ include('unit.php');

}

elseif($_GET['menu']=='guru'){ include('guru.php');

}

elseif($_GET['menu']=='kontak'){ include('kontak.php');

}

elseif($_GET['menu']=='visi'){ include('visi.php');

}

elseif($_GET['menu']=='struktur'){ include('struktur.php');

(3)

elseif($_GET['menu']=='ipm'){ include('ipm.php');

}

elseif($_GET['menu']=='prestasi'){ include('prestasi.php');

}

elseif($_GET['menu']=='galeri_detil'){ include('galeri_detil.php');

}

elseif($_GET['menu']=='simpan'){ include('simpan.php');

}

elseif($_GET['menu']=='berita_detil'){ include('berita_detil.php');

}

elseif($_GET['menu']=='inspiratif'){ include('inspiratif.php');

}

elseif($_GET['menu']=='ekstra'){ include('ekstra.php');

}

elseif($_GET['menu']=='galeri_detil'){ include('galeri_detil.php');

}

else{

echo "<center><h1>SELAMAT DATANG DI WEBSITE</h1> <h1>SMA MUHAMMADIYAH 2 MEDAN</h1></center>"; }

?> </div> </div>

<div class="sidebar"> <div class="gadget"> <h2 class="star"></h2> <ul class="sb_menu"> <li>

<div class='title-post'>

(4)

<div class=kreatif>

<p><img src='images/foto4.png' width="92" height="105" align=left class='for-images' /><strong>Kepala Sekolah Maulana Malik Muttaqin.MA</strong><br><i>WEBSITE Sekolah ini sangat bagus dan membantu siswa-siswa maupun masyarakat yang ingin melihat informasi tentang Sekolah SMA Muhammadiyah 2 Medan.</i><br><a class='box-link'href=?menu=inspiratif>Selengkapnya</a><br><br></div>

</li> </ul> </div>

<div class="gadget">

<h2 class="star">KALENDER</h2> <ul class="ex_menu">

<li> <?php

echo ""; ?>

<SCRIPT type=text/javascript> var months = new Array(); months[0] = "Januari"; months[1] = "Peburari"; months[2] = "Maret"; months[3] = "April"; months[4] = "Mei"; months[5] = "Juni"; months[6] = "Juli"; months[7] = "Agustus"; months[8] = "September"; months[9] = "Oktober"; months[10] = "Nopember"; months[11] = "Desember"; var currentDate = new Date();

var currentMonth = currentDate.getMonth(); var hariini=currentDate.getDate();

currentDate.setDate(1);

document.write("<br><br><table border=1 width='200px' bgcolor='#EFCC44' cellpadding=2 cellspacing=0>");

document.write("<tr>");

document.write("<td colspan=7 bgcolor='#GGCC33' align='center'><strong>" + months[currentMonth] + "</td>");

document.write("<tr>");

(5)

document.write("</tr>"); if (currentDate.getDay() != 0) {

document.write("<tr>");

for (i = 0; i < currentDate.getDay(); i++) {

document.write("<td>&nbsp;</td>"); }

}

while (currentDate.getMonth() == currentMonth) {

if (currentDate.getDay == 0) {

document.write("<tr>"); }

if (hariini==currentDate.getDate()) {

document.write("<td align='center' bgcolor='#FF9900'> <font color='#CC0000'><strong>" + currentDate.getDate() + "</strong></font></td>"); }

else {

document.write("<td align='center'>" + currentDate.getDate() + "</td>"); }

if (currentDate.getDay() == 6) {

document.write("</tr>"); }

currentDate.setDate(currentDate.getDate() + 1); }

for (i = currentDate.getDay(); i <= 6; i++) {

document.write("<td>&nbsp;</td>"); }

document.write("</font></table>"); </SCRIPT>

</li> </ul>

<h3 class="star"></h3> <ul class="ex_menu"></ul> <?php

include "counter.php"; ?> </li>

(6)

</div>

<div class="clr"></div> </div>

</div>

<div class="fbg">

<div class="fbg_resize"> <div class="col c1">

<a href="?menu=galeri"><h2>Galeri Foto</h2></a>

<a href="#"><img src="galeri/galeri1.JPG" width="56" height="56" alt="ad" class="ad" /></a>

<a href="#"><img src="galeri/galeri2.JPG" width="56" height="56" alt="ad" class="ad" /></a>

<a href="#"><img src="galeri/galeri3.JPG" width="56" height="56" alt="ad" class="ad" /></a>

<a href="#"><img src="galeri/galeri4.JPG" width="56" height="56" alt="ad" class="ad" /></a>

<a href="#"><img src="galeri/galeri5.jpg" width="56" height="56" alt="ad" class="ad" /></a>

<a href="#"><img src="galeri/galeri6.jpg" width="56" height="56" alt="ad" class="ad" /></a>

<a href="#"><img src="galeri/galeri7.jpg" width="56" height="56" alt="ad" class="ad" /></a>

<a href="#"><img src="galeri/galeri8.JPG" width="56" height="56" alt="ad" class="ad" /></a>

<div class="clr"></div> </div>

<div class="col c2">

<a href="?menu=berita"><h2>Berita Sekolah</h2></a> <p>MILAD MUHAMMADIYAH KE 104</p>

<p>Kegiatan milad muhaamdiyah yang di adakan pada tanggal 24 November 2013 di hadiri langsung oleh ketua PP MUHAMMADIYAH oleh Drs, H.A.Dahlan Rais, M.Hum dan di dampingi oleh dikdasmen muhammadiyah tanjung sari medan Bpk HERMANTO, SAg dan pimpinan cabang muhammadiyah tanjung sari Drs. NAZARUDIN AR-RASYID LUBIS.

</p> </div>

<div class="col c3">

<a href="?menu=kontak"><h2>Kontak</h2></a>

<p>Jalan Abdul Hakim No. 2 Tanjung Sari Medan-Selayang</p> <p><strong>Telepon:</strong> (061) 822 5749<br />

<strong>Alamat:</strong> Jl. Abdul Hakim Tj. Sari<br /> </div>

<div class="clr"></div> </div>

</div>

<div class="footer">

(7)

<p class="lf">&copy; Copyright MyWebSite. Designed by NURLELA </p> <ul class="fmenu">

<p>D3 Teknik Informatika Fakultas Matematika dan Ilmu Pengetahuan Alam Sumatera Utara

</ul>

<div class="clr"></div> </div>

</div> </div> </body> </html>

2. home.php

<div id="galeri">

<h2>Foto-Foto SMA Muhammadiyah 2 Medan</h2>

<a href="?menu=galeri"><img src="galeri/galeri4.JPG" alt="four men walking" height="272" width="513" /></a></div>

<div class="berita"> <h2>Berita Terbaru</h2>

<h4>MILAD MUHAMMADIYAH KE 104</h4>

<p>Kegiatan milad muhaamdiyah yang di adakan pada tanggal 24 November 2013 di hadiri langsung oleh ketua PP MUHAMMADIYAH oleh Drs, H.A.Dahlan Rais, M.Hum dan di dampingi oleh dikdasmen muhammadiyah tanjung sari medan Bpk HERMANTO, SAg dan pimpinan cabang muhammadiyah tanjung sari Drs. NAZARUDIN AR-RASYID LUBIS.</p>

<a href="?menu=berita">Selengkapnya</a></p></div> <div class="divider">

<h2>Prestasi</h2> <?php

error_reporting(0);

mysql_connect("localhost","root",""); mysql_select_db ("muhammadiyah");

$query= "select*from prestasinon"; $tampil= mysql_query("$query");

echo"<p><p><p><h4>Prestasi yang pernah dicapai untuk Non Akademik</h4> <table border ='1'>

<tr><th>No</th><th>Nama</th><th>Kelas</th><th>Kejuaraan yong Diperoleh</th><th>Tingkat Penyelenggara</th><th>Tahun</th></tr>";

while($data=mysql_fetch_assoc($tampil)) {

echo"

(8)

<td>$data[tahun]</td>></tr>"; }

echo"</table> <p></p>";

echo"*Data berdasarkan tahun"; ?>

<p class="readmore"><a href="?menu=prestasi">Selengkapnya</a></p> </div>

3. profil.php

<center><img src="GALERI/galeri5.jpg"alt="" width="533" height="243"/></center>

<?php

mysql_connect("localhost","root",""); mysql_select_db("muhammadiyah"); $query= "select*from profil";

$tampil= mysql_query("$query");

echo"<center><h1>PROFIL SEKOLAH</h1></center>"; while($data=mysql_fetch_assoc($tampil))

{ echo"

<center><b><tr>

<br>Nama Sekolah : $data[Nama_sekolah]</br> <br>NSS : $data[NSS]</br>

<br>SK Pendiri : $data[SK_Pendiri]</br>

<br>Jenjang Akreditasi : $data[Jenjang_Akreditasi]</br> <br>Alamat Sekolah : $data[Alamat_Sekolah]</br> <br>Kelurahan : $data[Kelurahan]</br>

<br>Kecamatan : $data[Kecamatan]</br> <br>Kota : $data[Kota]</br>

<br>Provinsi : $data[Provinsi]</br>

<br>Kepala Sekolah : $data[Kepala_Sekolah]</br> <br>Wakasek Kurikulum : $data[wakasek_kuri]</br> <br>Wakasek Kesiswaan : $data[wakasek_siswa]</br> <br>Penyelenggara Sekolah : $data[Penyelenggara]</br> <br>Ketua Penyelenggara : $data[Ketua]</br>

<br>Status Sekolah : $data[Status]</br> <br>Keadaan Gedung : $data[gedung]</br>

<br>Luas Tanah Seluruhnya : $data[Luas_Tanah]</br> <br>Luas Bangunan : $data[luas_bangunan]</br> <br>Jumlah Ruang Kelas: $data[Ruang_Kelas]</br> <br>Jumlah Kantor : $data[Jumlah_Kantor]</br> <br>Ruang Guru : $data[Ruang_Guru]</br> <br>Tata Usaha : $data[Tata_Usaha]</br>

(9)

"; } ?>

4. struktur.php

<div id="struktur">

<center><img src="images/struktur.jpg" alt="" height="552" width="623" /></center>

</div>

5. visi.php

<div id="visi">

<center><img src="images/logo1.jpg"alt="" width="271" height="264"/></center> <center><h1>VISI DAN MISI</h1></center>

<center><h2>SMA MUHAMMADIYAH 2 MEDAN</h2></center> <h2>VISI</h2>

<h3>UNGGUL DALAM PRESTASI, TELADAN DALAM BERPRILAKU BERDASARKAN IMAN DAN TAQWA (IMTAQ)</h3>

<h2>MISI</h2>

<h3><li>MELAKSANAKAN PEMBELAJARAN SECARA EFFEKTIF SEHINGGA SISWA BERKEMBANG SECARA OPTIMAL, SEUSUAI POTENSI YANG DIMILIKI.</li></h3>

<h3><li>MENUMBUHKAN SEMANGAT KEUNGGULAN SECARA

INTENSIF KEPADA SELURUH WARGASEKOLAH</li></h3>

<h3><li>MEMOTIVASI DAN MEMBANTU SETIAP SISWA UNTUK MENGENALI POTENSI DIRINYA DIRINYA SEHINGGA DAPAT DIKEMBANGKAN SECARA OPTIMAL</li></h3>

<h3><li>MENUMBUHKEMBANGKAN PENGHAYATAN TERHADAP

NILAI-NILAI ISLAMI DAN JUGA BUDAYA BANGSA SEHINGGA MENJADI SUMBER KEARIFAN DALAM BERPRILAKU BERDASARKAN KEIMANAN DAN KETAQWAAN</li></h3>

</div>

6. ekstra.php

<div id= "kegiatan">

<h2>EKSTRAKULIKULER SMA MUHAMMADIYAH 2 MEDAN</h2>

<p><h4>1. PASKIBRA</h4><img src='galeri/galeri24.jpg' width="438" height="364" align=left class='for-images' /></p>

<br><br><br><br><br><br><p><p><p><p><p><p><p><p><p><p><p><p><p><p> <p><h4>2. TAPAK SUCI</h4><img src='galeri/galeri31.JPG' width="438"

(10)

7. prestasi.php

<?php

error_reporting(0);

mysql_connect("localhost","root",""); mysql_select_db ("muhammadiyah");

$query= "select*from prestasi09"; $tampil= mysql_query("$query");

echo"<h2>Prestasi Yang pernah Dicapai</h2> <table border ='1'>

<tr><th>No</th><th>Nama</th><th>Kelas</th><th>Kejuaraan yong Diperoleh</th><th>Tingkat Penyelenggara</th><th>Tahun</th></tr>";

while($data=mysql_fetch_assoc($tampil)) {

echo"

<tr><td>$data[no]</td> <td>$data[nama]</td> <td>$data[kelas]</td> <td>$data[kejuaraan]</td> <td>$data[tingkat]</td> <td>$data[tahun]</td>></tr>"; }

echo"</table> <p></p>";

echo"*Data berdasarkan tahun"; ?>

<?php

error_reporting(0);

mysql_connect("localhost","root",""); mysql_select_db ("muhammadiyah");

$query= "select*from prestasinon"; $tampil= mysql_query("$query");

echo"<br/><br/><br/><h2>Prestasi Untuk Non Akademik</h2> <table border ='1'> <tr><th>No</th><th>Nama</th><th>Kelas</th><th>Kejuaraan yong

Diperoleh</th><th>Tingkat Penyelenggara</th><th>Tahun</th></tr>"; while($data=mysql_fetch_assoc($tampil))

{ echo"

(11)

<td>$data[tahun]</td>></tr>"; }

echo"</table> <p></p>";

echo"*Data berdasarkan tahun"; ?>

8. galeri.php

<!---untuk zoom image-->

<script type="text/javascript" src="./js/jquery.js"></script>

<script type="text/javascript" src="./js/jquery.bigPicture.js"></script> <script type="text/javascript" src="./js/jquer.bigPicture-min.js"></script> <script type="text/javascript" src="./js/jquery.bigPicture-pack.js"></script> <script type="text/javascript" src="./js/jquery.easing.js"></script>

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

<!--untuk slideshow-->

<link href="css/amazon_scroller.css" rel="stylesheet" type="text/css"></link> <script type="text/javascript" src="js/amazon_scroller.js"></script>

<script language="javascript" type="text/javascript">

$(function() {

$("#amazon_scroller1").amazon_scroller({ scroller_title_show: 'enable',

scroller_time_interval: '4000',

scroller_window_background_color: "#CCC", scroller_window_padding: '10',

scroller_border_size: '1', scroller_border_color: '#000', scroller_images_width: '150', scroller_images_height: '100', scroller_title_size: '12', scroller_title_color: 'black', scroller_show_count: '3', directory: 'images' });

$("#amazon_scroller2").amazon_scroller({ scroller_title_show: 'disable', scroller_time_interval: '3000',

scroller_window_background_color: "none", scroller_window_padding: '10',

(12)

scroller_title_size: '12', scroller_title_color: 'black', scroller_show_count: '3', directory: 'images' });

$("#amazon_scroller3").amazon_scroller({ scroller_title_show: 'enable',

scroller_time_interval: '3000',

scroller_window_background_color: "none", scroller_window_padding: '10',

scroller_border_size: '2', scroller_border_color: '#9C6', scroller_images_width: '80', scroller_images_height: '60', scroller_title_size: '11', scroller_title_color: 'black', scroller_show_count: '3', directory: 'images' });

}); </script>

<html> <head>

<title>Slideshow-Gallery-Ri32</title> </head>

<body>

<div id="content">

<h2>Foto-Foto SMA Muhammadiyah 2 Medan</h2> <p>&nbsp;</p>

<div id="amazon_scroller1" class="amazon_scroller"> <div class="amazon_scroller_mask">

<ul>

<?php

include "koneksi.php";

$select=mysql_query("select * from galeri"); while($row=mysql_fetch_array($select)){

?><li><a href="./galeri/<?php echo $row['gambar'];?>" title="<?php echo $row['keterangan'];?>" class="info" name="gambar"><img src="./galeri/<?php echo $row['gambar'];?>" width="60" height="60" title="Klik photo"/></a></li><?php

}

?>

</ul>

(13)

<ul class="amazon_scroller_nav"> <li></li>

<li></li> </ul>

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

<p><i><font color="#666666" size="2" face="verdana">*Klik gambar untuk zoom</font></i></p>

<img src="images/camera.jpg" /> </div>

</body> </html>

<script language="javascript"> $('a.info').bigPicture({

'enableInfo': true, 'infoPosition': 'bottom' });

</script>

9. berita.php

<html> <head>

<title>Data berita</title> </head>

<body> <?php

include "koneksi.php"; ?>

<h2>Berita Terbaru</h2>

<?php

$query_ambil_berita = mysql_query("SELECT * FROM berita"); //query ambil data berita.

while ($data_berita = mysql_fetch_array($query_ambil_berita)) { //perulangan untuk menampilkan berita

?>

<h5 style="margin-bottom: 0px"><?php echo $data_berita['judul']; ?></h5>

<small>Ditulis oleh : <?php echo $data_berita['penulis']; ?>, pada : <?php echo $data_berita['tanggal_posting']; ?></small>

(14)

<?php echo substr($data_berita['isi_berita'], 0, 300); ?> ...

<a href="berita_detil.php?id=<?php echo $data_berita['id_berita']; ?>">selengkapnya</a>

</p>

<hr style="border: dashed 1px #e9e9e9">

<?php }

//penutup perulangan while ?>

</body> </html>

10. berita_detil.php.php

<?php

include "koneksi.php"; ?>

<h3>Detail Berita</h3> <?php

$query_ambil_berita = mysql_query("SELECT * FROM berita WHERE id_berita = '".$_GET['id']."'"); //query ambil data berita.

$data_berita = mysql_fetch_array($query_ambil_berita); ?>

<h5 style="margin-bottom: 0px"><?php echo $data_berita['judul']; ?></h5>

<small>Ditulis oleh : <?php echo $data_berita['penulis']; ?>, pada : <?php echo $data_berita['tanggal_posting']; ?></small>

<p>

<?php echo $data_berita['isi_berita']; ?></p> <hr>

<a href="index.php?menu=berita">Back</a>

11. Guru.php

<?php

error_reporting(0);

mysql_connect("localhost","root",""); mysql_select_db ("muhammadiyah");

(15)

echo"<h2>Daftar Nama Guru SMA Muhammadiyah 2 Medan</h2> <table border ='2'>

<tr><th>No</th><th>Nama</th><th>Jabatan</th><th>Bidang Studi Yang Diajarkan</th><th>Alamat</th><th>Tanggal

Lahir</th><th>Agama</th><th>Jenis Kelamin</th></tr>"; while($data=mysql_fetch_assoc($tampil))

{ echo" <tr>

<td>$data[no]</td> <td>$data[nama]</td> <td>$data[jabatan]</td> <td>$data[bidang_studi]</td> <td>$data[alamat]</td> <td>$data[tmp_lahir]</td> <td>$data[agama]</td>

<td>$data[jenis_kelamin]</td>> </tr>";

}

echo"</table>"; ?>

12. inspiratif.php

<div id= "insfiratif">

<h2>APA KATA MEREKA TENTANG WEBSITE INI?

<p><img src='images/foto4.png' width="92" height="105" align=left

class='for-images' /><strong>Kepala Sekolah Maulana Malik

Muttaqin.MA</strong><br><i>WEBSITE Sekolah ini sangat bagus dan membantu siswa-siswa maupun masyarakat yang ingin melihat informasi tentang Sekolah SMA Muhammadiyah 2 Medan.</i></p>

<br><br><p><img src='images/mis.png' width="92" height="105" align=left class='for-images' /><strong> Pembantu Kepala Sekolah I Susilawati, S.Pd</strong><br><i>Menurut saya adanya website ini sangat membantu saya sendiri dan siswa-siwsi dalam mencari informasi tentang SMA Muhammadiyah 2 Medan.</i></p>

<br><br><p><img src='images/mis1.png' width="92" height="105" align=left class='for-images' /><strong> Pembantu Kepala Sekolah II Ridiyawati, M.Si</strong><br><i>Website SMA Muhammadiyah 2 Medan sangat bagus bagi saya maupun siswa-siswi atau juga masyarakat yang ingin melihat website ini.</i></p>

</div>

(16)

<div>

<h1 align="center">Buku Tamu</h1>

<p>Say hello, jika anda ingin tinggalkan pesan dan memberi saran serta komentar untuk SMA SMA MUHAMMADIYAH 2</p>

<form method="post" action="?menu=simpan"> <table>

<tr>

<td>Nama Pengunjung</td> <td>:</td>

<td><input type="text" name="nama"></td> </tr>

<tr>

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

<td><input type="text" name="email"></td> </tr>

<tr>

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

<td><input type="text" name="url" value="http://"></td> </tr>

<tr>

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

<td><textarea name="komentar"></textarea></td> </tr>

<tr>

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

<td><input type="submit" name="submit" value="submit"> <input type="reset" name="reset" value="reset"></td> </tr>

</table> </form> </div>

<?php

//menghubungkan ke server

mysql_connect("localhost","root","");

//memilih database yang digunakan mysql_select_db("muhammadiyah");

//query yang digunakan untuk menampilkan isi buku tamu

$hasil = mysql_query("SELECT * FROM guestbook ORDER BY Id DESC");

(17)

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

echo "<table>"; echo "<tr>";

echo "<td>Nama</td>"; echo "<td> : </td>";

echo "<td> ".$data["nama"]."</td>"; echo "</tr>";

echo "<tr>";

echo "<td>Email</td>"; echo "<td> : </td>";

echo "<td> <a href=mailto:".$data["email"].">".$data["email"]."</a></td>"; echo "</tr>";

echo "<tr>";

echo "<td>Tanggal Kirim</td>"; echo "<td> : </td>";

echo "<td>".$data["tanggal"]."</td>"; echo "</tr>";

echo "<tr>";

echo "<td>URL</td>"; echo "<td> : </td>";

echo "<td> <a href=".$data["url"].">".$data["url"]."</a></td>"; echo "</tr>";

echo "<tr>";

echo "<td>Komentar</td>"; echo "<td> : </td>";

echo "<td> ".$data["komentar"]."</td>"; echo "</tr>";

echo "</table><hr>"; }

?>

14. koneksi.php

<?php

mysql_connect("localhost", "root", "") or di (mysql_error()); mysql_select_db("muhammadiyah");

?>

15. koneksi1.php

(18)

$h = "localhost"; $u = "root"; $p = "";

$db = "muhammadiyah";

mysql_connect($h, $u, $p) or die ("Not connected, please try again later"); mysql_select_db($db);

//Fungsi Perkecil Ukuran Gambar //

//penggunaan ===> perkecil("img/siswa_1.JPG", "img/small/"); (folder/file, folder/folder/)

function perkecil($imgAsal, $imgTujuan) {

$pcImgAsal = explode("/", $imgAsal);

$jAr = count($pcImgAsal) - 1;

$namaFileAsli = $pcImgAsal[$jAr];

//identitas file asli

$im_src = imagecreatefromjpeg($imgAsal); $src_width = imageSX($im_src);

$src_height = imageSY($im_src);

//Simpan dalam versi small 110 pixel //set ukuran gambar hasil perubahan $dst_width = 110;

$dst_height = ($dst_width/$src_width)*$src_height;

//proses perubahan ukuran

$im = imagecreatetruecolor($dst_width,$dst_height);

imagecopyresampled($im, $im_src, 0, 0, 0, 0, $dst_width, $dst_height, $src_width, $src_height);

//Simpan gambar

imagejpeg($im, $imgTujuan."_s_".$namaFileAsli);

imagedestroy($im_src); imagedestroy($im); }

?> <html> <head>

<script type="text/javascript" src="JS/jquery.min.js"></script>

<script type="text/javascript" src="JS/fancybox/jquery.fancybox.js"></script> <script type="text/javascript" src="JS/fancybox/jquery.mousewheel.js"></script> <link rel="stylesheet" type="text/css" href="JS/fancybox/jquery.fancybox.css"

media="screen" />

(19)

$(".fancybox").fancybox(); });

</script>

<link href="style.css" rel="stylesheet" type="text/css" /> <script type="text/javascript" src="JS/tooltip.js"></script> </head>

<body>

16. style.css

/*

Released for free under a Creative Commons Attribution 3.0 License */

@charset "utf-8";

body { margin:0; padding:0; width:100%; color:#5f5f5f; font:normal 12px/1.8em Arial, Helvetica, sans-serif;}

html, .main { padding:0; margin:0; background: url(images/back.jpg);}

.clr { clear:both; padding:0; margin:0; width:100%; font-size:0px; line-height:0px;} h1 { margin:0; padding:72px 0 0 24px; color:#066; font:bold 48px/1.2em Arial, Helvetica, sans-serif; letter-spacing:-3px;}

h1 a, h1 a:hover { color:#066; text-decoration:none;}

h2 { font:bold 24px Arial, Helvetica, sans-serif; color:#066; padding:8px 0; margin:8px 0;}

p { margin:8px 0; padding:0 0 8px 0; font:normal 12px/1.8em Arial, Helvetica, sans-serif;}

a { color:#0d699e; text-decoration:underline;}

.header, .hbg, .content, .menu_nav, .fbg, .footer, form, ol, ol li, ul, .content .mainbar, .content .sidebar { margin:0; padding:0;}

.content_resize, .fbg_resize, .footer_resize { margin:0 auto; padding:0 40px; width:890px;}

.fbg, .footer { padding:16px 0;}

.header_resize, .content_resize { background-color:#fff;}

/* header */

.header { padding-top:48px;}

.header_resize { margin:0 auto; padding:19px; width:932px;}

.header_resize { border-top-left-radius:12px; border-top-right-radius:12px; -moz-border-radius-topleft:12px; -moz-border-radius-topright:12px; -webkit-border-top-left-radius:12px; -webkit-border-top-right-radius:12px;}

.header .logo { width:932px; height:217px; background:url(images/logo2.jpg) no-repeat center center;}

/* menu */

.dropmenu { background: #066; height: 30px; list-style-type: none; margin: 0; padding: 0px; }

(20)

.dropmenu li a { color: #fff; display: block; font: 12px arial, verdana, sans-serif; font-weight: bold; padding: 9px 20px; text-decoration: none; }

.dropmenu li:hover { background: #778899; position: relative; } .dropmenu li:hover a { text-decoration: underline; }

.dropmenu li:hover ul { background-color: #3f4a54; border: 1px solid grey; left: 0px; padding: 3px; top: 30px; width: 160px; }

.dropmenu li:hover ul li { border: none; height: 18px; }

.dropmenu li:hover ul li a { background-color: #066; border: 1px solid transparent; color: #fff; display: block; font-size: 11px; height: 18px; line-height: 18px; padding: 0px; text-decoration: none; text-indent: 5px; width: 158px; padding: 3px; }

.dropmenu li:hover ul li a:hover { background: silver; border: solid 1px #444; color: #000; height: 18px; padding: 3px; } .dropmenu ul { left: -9999px; list-style-type: none; position: absolute; top: -9999px; }

/* content */

.content { padding-bottom:16px;} .content_resize { padding:32px 40px;}

.content_resize { borderbottomleftradius:12px; borderbottomrightradius:12px; -moz-border-radius-bottomleft:12px; -moz-border-radius-bottomright:12px; -webkit-border-bottom-left-radius:12px; -webkit-border-bottom-right-radius:12px;}

.content img { padding:4px; border:1px solid #bbb;} .content img.ilf { margin-right:16px; float:left;} .content .mainbar { float:left; width:630px;}

.content .mainbar .article, .content .sidebar .gadget { margin:0; padding:0 0 16px 0;} .content .sidebar { float:right; width:236px;}

ul.sb_menu, ul.ex_menu { margin:0; padding:0; list-style:none; color:#959595;} ul.sb_menu li, ul.ex_menu li { margin:0;}

ul.sb_menu li { padding:4px 0;} ul.ex_menu li { padding:4px 0 8px;}

ul.sb_menu li a, ul.ex_menu li a { color:#5f5f5f; text-decoration:none;}

ul.sb_menu li a:hover, ul.ex_menu li a:hover { color:#0d699e; font-weight:bold;} ul.sb_menu li a:hover { text-decoration:underline;}

ul.ex_menu li a:hover { text-decoration:none;}

/* subpages */

.content .mainbar .comment { margin:0; padding:16px 0 0 0;}

.content .mainbar .comment img.userpic { border:1px solid #dedede; margin:10px 16px 0 0; padding:0; float:left;}

/* fbg */ .fbg_resize {

background-color:#FFF; color:#000;

}

.fbg_resize { border-radius:12px; -moz-border-radius:12px; -webkit-border-radius:12px;}

(21)

}

.fbg img { padding:5px; border:1px solid #085781; background-color:#4d8fb2;} .fbg .col { margin:0; float:left;}

.fbg .c1 { padding:0 16px 0 0; width:326px;} .fbg .c2 { padding:0 16px; width:276px;} .fbg .c3 { padding:0 0 0 16px; width:220px;}

.fbg .c2 img { margin:8px 16px 16px 0; padding:0; float:left;} .fbg .c1 img, .fbg_resize .c3 img { margin:4px;}

.fbg ul.sb_menu li { padding-left:12px; background:url(images/li.gif) no-repeat left center;}

.fbg ul.sb_menu li a, .fbg ul.sb_menu li a:hover { color:#000;

}

/* footer */

.footer img.flogo { float:left; border:none;}

.footer p.lf { margin:0; padding:4px 0; float:right; width:auto; line-height:1.5em;} ul.fmenu { margin:0; padding:2px 0; list-style:none; float:left; width:auto;} ul.fmenu li { margin:0; padding:0 4px; float:left;}

ul.fmenu li a { color:#5f5f5f; text-decoration:none; padding:2px 6px;} ul.fmenu li a:hover, ul.fmenu li.active a { color:#066;}

ul.fmenu li a:hover { text-decoration:underline;}

/* form */

ol { list-style:none;}

ol li { display:block; clear:both;}

ol li label { display:block; margin:0; padding:16px 0 0 0;}

ol li input.text { width:480px; border:1px solid #c0c0c0; margin:2px 0; padding:5px 2px; height:16px; background:#fff;}

ol li textarea { width:480px; border:1px solid #c0c0c0; margin:2px 0; padding:2px; background:#fff;}

ol li .send { margin:16px 0 0 0;}

/*galeri*/

/*________________TOOLTIP_____________*/ #tooltip{

position:absolute; border:1px solid #333; background:#f7f5d1; padding:10px; color:#333; display:none; border-radius: 8px; }

/*___________END TOOLTIP_____________*/

(22)

list-style-position:inside; padding: 15px 0 15px 7px; border-radius: 10px; background: #DBDBDB; list-style: none;

width: 553px; float: left; }

#produk .lis-produk { float: left; padding: 5px;

border: dotted 1px #85A737; margin: 5px;

border-radius: 10px; width: 160px; }

#produk .lis-produk h3{ font-weight: bold; font-size: 13px;

margin: -4px -4px 0 -4px; text-align: center;

padding: 4px; border-radius: 10px; background: #B2C290; }

#produk .lis-produk img{ margin: 13px; width: 130px; height: 150px;

border: solid 5px #eee; }

#produk .lis-produk .more{ font-size: 12px; font-weight: bold; text-align: center; margin: 15px 15px auto; }

#produk .lis-produk .isi{ height: 130px; width: 140px;

background-image:url('folder.png'); background-position:center; background-size:150px 130px; background-repeat:no-repeat; font-size: 12px;

(23)

margin: 15px 15px auto; }

#produk .lis-produk .isi img{

margin: 30px 20px 50px 20px; width: 90px;

height: 75px; border: none;

box-shadow:3px 3px 3px 1px #ADC2B3; }

/*KONTEN TEXT*/ .title-post{

font-family: 'Bree Serif', serif; font-weight: 100; font-size: 28px; line-height:34px; color: #4196ff;

text-shadow: 1px 1px 0 rgba(256,256,256,1.0); margin-bottom: 3px;

margin-top:20px; }

Halaman Administrator

17. login.php <?php

// memulai session session_start();

include "include/koneksi.php"; if(isset($_POST['Submit'])){ $username = $_POST['username']; $password = $_POST['pass']; if(empty($username)){

echo "<script type='text/javascript'> onload =function(){

alert('Username belum diisi'); }

</script>"; }

elseif(empty($password)){

echo "<script type='text/javascript'> onload =function(){

(24)

}

</script>"; } else {

// query untuk mendapatkan record dari username

$query = "SELECT * FROM user WHERE username = '$username'"; $hasil = mysql_query($query);

$data = mysql_fetch_array($hasil);

// cek kesesuaian password

if ($password == $data['password']) {

header("location:index.php");

// menyimpan username dan level ke dalam session $_SESSION['level'] = $data['level'];

$_SESSION['username'] = $data['username']; }

echo "<script type='text/javascript'> onload =function(){

alert('Username atau password salah!! Ulangi kembali'); }

</script>"; }

} ?>

<style type="text/css"> <!--

body {

background-color: #fff;

background-image: url(.../images/back.jpg); }

--> </style>

<table width="622" border="2" align="center" cellpadding="1" cellspacing="0" bgcolor="#fff">

<tr>

<td colspan="2"><? include "header.php"; ?></td> </tr>

<tr>

<td valign="top"><h2 align="center">&nbsp;</h2>

<h2 align="center"><strong>Login Administrator </strong> </h2> <p align="center"><img src="icon/Action-lock-icon.png" width="128" height="128" />

<form method="post" action=""> <table width="289" border="0" align="center"> <tr>

<td>Username </td>

(25)

<tr>

<td>Password </td>

<td><input name="pass" type="password"></td> </tr>

<tr>

<td>&nbsp;</td>

<td><input type="submit" name="Submit" value="Login"></td> </tr>

</table> </form>

</p> <p>&nbsp;</p>

<div align="center"><a href="../?menu=home">Back to Home</a> </div></td>

</tr> <tr>

<td valign="top" bgcolor="#066"><p>&nbsp;</p> <p>

<? include "footer.php"; ?> </p>

<p>&nbsp; </p></td> </tr>

</table>

18. logout.php

<?php

session_start(); session_destroy();

header("location:login.php"); ?>

19. index.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=utf-8" /> <title>IN ADMIN PANEL | SMA MUHAMMADIYAH 2 MEDAN</title> <link rel="stylesheet" type="text/css" href="style.css" />

(26)

<script type="text/javascript"> ddaccordion.init({

headerclass: "submenuheader", //Shared CSS class name of headers group contentclass: "submenu", //Shared CSS class name of contents group

revealtype: "click", //Reveal content when user clicks or onmouseover the header? Valid value: "click", "clickgo", or "mouseover"

mouseoverdelay: 200, //if revealtype="mouseover", set delay in milliseconds before header expands onMouseover

collapseprev: true, //Collapse previous content (so only one open at any time)? true/false

defaultexpanded: [], //index of content(s) open by default [index1, index2, etc] [] denotes no content

onemustopen: false, //Specify whether at least one header should be open always (so never all headers closed)

animatedefault: false, //Should contents open by default be animated into view?

persiststate: true, //persist state of opened contents within browser session? toggleclass: ["", ""], //Two CSS classes to be applied to the header when it's collapsed and expanded, respectively ["class1", "class2"]

togglehtml: ["suffix", "<img src='images/plus.gif' class='statusicon' />", "<img src='images/minus.gif' class='statusicon' />"], //Additional HTML added to the header when it's collapsed and expanded, respectively ["position", "html1", "html2"] (see docs)

animatespeed: "fast", //speed of animation: integer in milliseconds (ie: 200), or keywords "fast", "normal", or "slow"

oninit:function(headers, expandedindices){ //custom code to run when headers have initalized

//do nothing },

onopenclose:function(header, index, state, isuseractivated){ //custom code to run whenever a header is opened or closed

//do nothing }

})

</script>

<script type="text/javascript" src="js/jconfirmaction.jquery.js"></script> <script type="text/javascript">

$(document).ready(function() { $('.ask').jConfirmAction(); });

</script>

<script language="javascript" type="text/javascript" src="js/niceforms.js"></script> <link rel="stylesheet" type="text/css" media="all" href="niceforms-default.css" />

(27)

<body>

<div id="main_container">

<div class="header">

<div class="logo"><a href="#"><img src="images/logo.gif" alt="" title="" border="0" /></a></div>

<div class="right_header">Welcome Admin, ||| <a href="logout.php" class="logout">Logout</a></div>

<div id="clock_a"></div> </div>

<div class="main_content">

<div class="menu"> <ul>

<li><a href="">HALAMAN ADMINISTRATOR SMA MUHAMMADIYAH 2 MEDAN</a></li>

</ul> </div>

<div class="center_content">

<div class="left_content">

<div class="sidebar_search">

</div>

<div class="sidebarmenu">

<a class="menuitem submenuheader" href="">MENU</a> <div class="submenu">

<ul>

<li><a href="?admin=home">Beranda</a></li> <li><a href="?admin=berita">Berita</a></li> <li><a href="?admin=profil">Profil</a></li> <li><a href="?admin=prestasi">Prestasi</a></li> <li><a href="?admin=galeri">Galeri</a></li> <li><a href="?admin=guru">Data Guru</a></li> <li><a href="?admin=bukutamu">Kontak</a></li> </ul>

</div> </div>

<div class="sidebar_box">

(28)

</div>

<div class="sidebar_box_bottom"></div> </div>

<div class="sidebar_box">

<div class="sidebar_box_top"></div> <div class="sidebar_box_content">

</div>

<div class="sidebar_box_bottom"></div> </div>

<div class="sidebar_box">

<div class="sidebar_box_top"></div> <div class="sidebar_box_content">

</div>

<div class="sidebar_box_bottom"></div> </div>

<div class="sidebar_box">

<div class="sidebar_box_top"></div> <div class="sidebar_box_content">

</div>

<div class="sidebar_box_bottom"></div> </div>

</div>

<div class="right_content"> <div class="pagination">

<?php

error_reporting('0'); $menu =$_GET['admin'];

if($_GET['admin']=='home'){ include('beranda.php'); }

elseif($_GET['admin']=='profil'){ include('profil/index.php'); }

(29)

elseif($_GET['admin']=='hapusberita'){ include('berita/hapus.php'); }

elseif($_GET['admin']=='formberita'){ include('berita/form.php'); }

elseif($_GET['admin']=='prosesformberita'){ include('berita/prosesform.php'); }

elseif($_GET['admin']=='berita_detil'){ include('berita/berita_detil.php'); }

elseif($_GET['admin']=='prestasi'){ include('prestasi.php'); }

elseif($_GET['admin']=='prestasi09'){ include('prestasi09/index.php'); }

elseif($_GET['admin']=='formprestasi09'){ include('prestasi09/form.php'); }

elseif($_GET['admin']=='prosesformprestasi09'){ include('prestasi09/prosesform.php'); }

elseif($_GET['admin']=='galeri'){ include('galeri/index.php'); }

elseif($_GET['admin']=='formgaleri'){ include('galeri/form.php'); }

elseif($_GET['admin']=='prosesformgaleri'){ include('galeri/prosesform.php'); }

(30)

elseif($_GET['admin']=='formprestasinon'){ include('prestasinon/form.php'); }

elseif($_GET['admin']=='prosesformprestasinon'){ include('prestasinon/prosesform.php'); }

elseif($_GET['admin']=='editprestasinon'){ include('prestasinon/edit.php'); }

elseif($_GET['admin']=='proseseditprestasinon'){ include('prestasinon/prosesedit.php'); }

elseif($_GET['admin']=='hapusprestasinon'){ include('prestasinon/hapus.php'); }

elseif($_GET['admin']=='guru'){ include('guru/index.php'); }

elseif($_GET['admin']=='formguru'){ include('guru/form.php'); }

elseif($_GET['admin']=='prosesformguru'){ include('guru/prosesform.php'); }

elseif($_GET['admin']=='bukutamu'){ include('bukutamu/admbuta.php'); }

elseif($_GET['admin']=='hapusbukutamu'){ include('bukutamu/hapbuta.php'); }

else{

echo"<br><br><br><br><br><br><br><br><br> <center><h1>SELAMAT DATANG </h1> <h1>DI HALAMAN ADMINISTRATOR</h1> </center>";

(31)

<div class="form"> </div>

</div><!-- end of right content-->

</div> <!--end of center content --> <div class="clear"></div>

</div> <!--end of main content--> <div class="footer">

<div class="left_footer">FMIPA UNIVERSITAS SUMATERA UTARA | Powered by <a href="">NURLELA</a></div>

</div>

</div> </body> </html>

20. header.php

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

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>.:: Halaman Administrator ::.</title>

</head>

<body>

<div align="center"><img src="../images/logo2.jpg" width="700" height="175" /></div>

</body> </html>

21. 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>

</head> <body>

<div align="center">

(32)

href="http://twitter.com/" target="_blank"><img src="icon/logo_twitter1.png" width="95" height="71" /></a></p>

<p>Copyright@NURLELA----FMIPA SUMATERA UTARA</a> </p> </div>

</body> </html>

22. koneksi.php (untuk admin)

<?

//variabel database $nama_host="localhost"; $user_db="root";

$password_db="";

$nama_db="muhammadiyah";

//koneksi database

$koneksi=mysql_connect($nama_host,$user_db,$password_db);

//bila terkoneksi if($koneksi){ //pilih database

mysql_select_db($nama_db); }else{

echo "Database tidak terkoneksi"; }

?>

23. koneksi1.php

<?php

mysql_connect("localhost", "root", "") or di (mysql_error()); mysql_select_db("muhammadiyah");

?>

24. style.css

body {

background:url(images/bg.jpg) repeat center top #fff; font-family:Arial, Helvetica, sans-serif;

padding:0; font-size:14px; margin:0 auto; color: #0e4354; }

(33)

clear:both; }

a{

color:#256c89; }

h2{

font-size:18px; color:#256c89; font-weight:normal; padding:0px 0 15px 0; margin:0px;

clear:both; }

h3{

font-size:18px; color:#256c89; font-weight:normal; padding:15px 0 5px 20px; margin:0px;

float:left; clear:both; }

a.forgot_pass{ float:right; color:#256c89; text-decoration:none;

background:url(images/help.png) no-repeat left; padding:0 0 0 18px;

display:block;

margin:15px 20px 0 0; }

#main_container{ margin:0 auto; width:900px;

padding:0px 0 0px 0; }

.header{ width:900px; height:100px; }

.header_login{ width:600px; margin:auto; }

.logo{ float:left;

padding:35px 0 0 0; }

(34)

float:right;

padding:15px 0 0 0; }

.jclock{

color:#FFFFFF; float:right; font-size:22px; font-weight:bold; padding:34px 25px 0 0; }

.right_header{ width:350px; float:right; text-align:right; color:#000;

padding:40px 0 0 0; }

.right_header a{

margin:0 5px 0 5px; text-decoration:underline; color:#000;

}

.right_header a.messages{

background:url(images/comment.png) no-repeat right; padding-right:20px;

}

.right_header a.logout{

background:url(images/user_logout.png) no-repeat right; padding-right:20px;

}

.main_content{ margin:0 auto; width:900px; height:auto;

padding:0px 0 50px 0;

background:url(images/menu_bg.jpg) no-repeat center top #fff; }

.footer{width:900px;height:87px;background:url(images/footer_bg.jpg) repeat center top;}

.footer_login{width:600px;margin:auto;}

.left_footer{ float:left;

padding:25px 0 0 10px; color:#0CF;

font-size:11px; }

(35)

text-decoration:none; }

.right_footer{float:right;padding:25px 10px 0 0;}

.left_footer_login{float:left;padding:15px 0 0 10px;color:#a8549b;font-size:11px;} .left_footer_login a{color:#FFFFFF;text-decoration:none;}

.right_footer_login{float:right;padding:15px 10px 0 0;} /*--- menu---*/

.menu {font-size:11px;padding:0px 10px 0 10px; float:left; width:880px;}

/* remove all the bullets, borders and padding from the default list styling */ .menu ul {padding:0;margin:0;list-style-type:none; height:34px;}

/* style the sub-level lists */ .menu ul ul {width: auto;}

/* float the top list items to make it horizontal and a relative positon so that you can control the dropdown menu positon */

.menu ul li {float:left;height:34px;line-height:34px;}

/* style the sub level list items */

.menu ul ul li {display:block;width: auto;height:auto;position:relative;line-height:1em;}

/* style the links for the top level */

.menu a, .menu a:visited {display:block;float:left;height:100%;font-size:11px;text-decoration:none;color:#fff;padding:0 21px 0 17px;}

.menu a.current{background:url(images/menu_bg.gif) repeat-x center;} /* style the sub level links */

.menu ul ul a, .menu ul ul a:visited {display:block;background:#57c0e8; border-bottom:1px #81dafc solid; color:#fff;width:12em;height:100%;line-height:1em;padding:1em 1em;}

.menu ul table ul a, .menu ul table ul a:visited {width:14em; w\idth:12em;}

/* style the table so that it takes no part in the layout - required for IE to work */ .menu table {position:absolute; left:0; top:0; font-size:1em; z-index:-1;}

.menu ul ul table {lef\t:-1px;}

.menu ul ul table ul.left {margin-lef\t:2px;}

.menu li:hover {position:relative;} * html .menu a:hover {position:relative;}

/* style the third level background */

.menu ul ul ul a, .menu ul ul ul a:visited {background:#57c0e8;} /* style the fourth level background */

.menu ul ul ul ul a, .menu ul ul ul ul a:visited {background:#57c0e8;} /* style the sub level 1 background */

(36)

.menu ul ul :hover a.sub2 {background:url(images/arrow.gif) no-repeat right #088bb4;}

/* style the level hovers */ /* first */

.menu a:hover {color:#fff;background:url(images/menu_bg.gif) repeat-x center;} .menu :hover > a {color:#fff;background:url(images/menu_bg.gif) repeat-x center;} /* second */

.menu ul ul a:hover{color:#fff;background:url(images/menu_bg_a.gif) repeat-x center;}

.menu ul ul :hover > a {color:#fff;background:url(images/menu_bg_a.gif) repeat-x center;}

/* third */

.menu ul ul ul a:hover {background:url(images/menu_bg_a.gif) repeat-x center;} .menu ul ul ul :hover > a {background:url(images/menu_bg_a.gif) repeat-x center;} /* fourth */

.menu ul ul ul ul a:hover {background:url(images/menu_bg_a.gif) repeat-x center;}

/* hide the sub levels and give them a positon absolute so that they take up no room */ .menu ul ul {visibility:hidden;position:absolute;height:0;top:34px;left:0;width:14em; z-index:999;}

/* position the third level flyout menu */ .menu ul ul ul{left:14em;top:0;width:14em;}

/* position the third level flyout menu for a left flyout */ .menu ul ul ul.left {left:-14em;}

/* make the second level visible when hover on first level list OR link */

.menu ul li:hover ul, .menu ul a:hover ul {visibility:visible; height:auto; padding-bottom:3em; background:transparent url(images/trans.gif);}

/* keep the third level hidden when you hover on first level list OR link */ .menu ul :hover ul ul{visibility:hidden;}

/* keep the fourth level hidden when you hover on second level list OR link */ .menu ul :hover ul :hover ul ul{visibility:hidden;}

/* make the third level visible when you hover over second level list OR link */ .menu ul :hover ul :hover ul{visibility:visible;}

/* make the fourth level visible when you hover over third level list OR link */ .menu ul :hover ul :hover ul :hover ul {visibility:visible;}

.center_content{ clear:both; }

.left_content{ width:195px; float:left;

padding:30px 0 0 20px; }

(37)

width:625px; float:left;

padding:30px 0 0 30px; }

.sidebarmenu{ margin:0px 0; padding:0; width:195px; }

.sidebarmenu a.menuitem{background:url(images/sidebar_menu_top.gif) no-repeat center top;

color: #fff;display: block;position: relative;width:185px;height:31px;margin:0 0 5px 0;line-height:31px;padding:0px 0 0 10px;text-decoration: none;

}

.sidebarmenu a.menuitem_green{background:url(images/green_bt.gif) no-repeat center top;

color: #fff;display: block;position: relative;width:185px;height:31px;margin:0 0 5px 0;line-height:31px;padding:0px 0 0 10px;text-decoration: none;

}

.sidebarmenu a.menuitem_red{background:url(images/red_bt.gif) no-repeat center top;

color: #fff;display: block;position: relative;width:185px;height:31px;margin:0 0 5px 0;line-height:31px;padding:0px 0 0 10px;text-decoration: none;

}

.sidebarmenu a.menuitem:hover{background:url(images/sidebar_menu_top_a.gif) no-repeat center top;}

.sidebarmenu a.menuitem_green:hover{background:url(images/green_bt_a.gif) no-repeat center top;}

.sidebarmenu a.menuitem_red:hover{background:url(images/red_bt_a.gif) no-repeat center top;}

.sidebarmenu a.menuitem:visited, .sidebarmenu .menuitem:active{ color: white;

}

.sidebarmenu a.menuitem .statusicon{ position: absolute;

top:11px; right:7px; border: none; }

.sidebarmenu div.submenu{ background: white;

}

.sidebarmenu div.submenu ul{ list-style-type: none;

margin: 0;

(38)

}

.sidebarmenu div.submenu ul li{ border-bottom: 1px dotted #bfd1d9; }

.sidebarmenu div.submenu ul li a{ display: block;

color: black;

text-decoration: none; padding:5px 0; padding-left: 10px; }

.sidebarmenu div.submenu ul li a:hover{ background: #e2f0ff;

color: #0e4354; }

.sidebar_search{

background:url(images/sidebar_menu_top.gif) no-repeat center; width:195px;

height:31px; margin:0 0 5px 0; }

input.search_input{ width:155px; height:16px;

margin:5px 0 0 5px; border:1px #bdebfd solid; background:#92dbf8; padding:4px 0 0 2px; float:left;

color:#096184; font-size:12px; }

input.search_submit{ float:left;

background:none; border:none;

margin:7px 0 0 8px; }

#rounded-corner {

margin:0px; width:625px; text-align: left;

border-collapse: collapse; }

(39)

{

width:26px;

background: #60c8f2 url('images/left.jpg') left top no-repeat; }

#rounded-corner thead th.rounded-q4 {

background: #60c8f2 url('images/right.jpg') right top no-repeat; }

#rounded-corner th {

padding: 8px; font-weight: normal; font-size: 13px; color: #039;

background: #60c8f2; }

#rounded-corner td {

padding: 8px;

background: #ecf8fd; border-top: 1px solid #fff; color: #669;

}

#rounded-corner tfoot td.rounded-foot-left {

background: #ecf8fd url('images/botleft.jpg') left bottom no-repeat; }

#rounded-corner tfoot td.rounded-foot-right {

background: #ecf8fd url('images/botright.jpg') right bottom no-repeat; }

#rounded-corner tbody tr:hover td {

background: #d2e7f0; }

.question {

position: absolute; display: inline; text-align: center; width: 174px; height: 78px; font-size: 13px; line-height: 1.5em;

background: url('images/bubble.png') left top no-repeat; padding: 10px 0 0 0;

text-shadow: 0px 1px 0px #fff; margin-left: -7em;

(40)

}

.yes{

margin-top: .5em; margin-right: .5em; cursor: pointer; display: inline-block; width: 63px;

height: 21px; color: #434d17;

text-shadow: 0px 1px 0px #fff;

background: url('images/buttony.png') left top no-repeat; }

.cancel {

margin-top: .5em; margin-right: .5em; cursor: pointer; display: inline-block; width: 63px;

height: 21px; color: #fff;

text-shadow: 0px 1px 0px #000;

background: url('images/buttonn.png') left top no-repeat; }

a.bt_green{display:block; float:right; margin:10px 5px 10px 5px; line-height:31px; text-decoration:none; color:#FFFFFF; text-shadow:1px 1px #8fa42b;}

a.bt_green strong{width:auto;height:31px; padding:0 10px 0 10px;display:block; float:left;background:url(images/bt_green_center.gif) repeat-x center;}

a.bt_green span.bt_green_lft{width:10px;height:31px;display:block; float:left;background:url(images/bt_green_left.gif) no-repeat center right;}

a.bt_green span.bt_green_r{width:10px;height:31px;display:block;

float:left;background:url(images/bt_green_r.gif) no-repeat center right;} a:hover.bt_green{ text-decoration:underline;}

a.bt_blue{display:block; float:right; margin:10px 5px 10px 5px; line-height:31px; text-decoration:none; color:#FFFFFF; text-shadow:1px 1px #3597bf;}

a.bt_blue strong{width:auto;height:31px; padding:0 10px 0 10px;display:block; float:left;background:url(images/bt_blue_center.gif) repeat-x center;}

a.bt_blue span.bt_blue_lft{width:10px;height:31px;display:block;

float:left;background:url(images/bt_blue_left.gif) no-repeat center right;}

a.bt_blue span.bt_blue_r{width:10px;height:31px;display:block;

float:left;background:url(images/bt_blue_r.gif) no-repeat center right;} a:hover.bt_blue{ text-decoration:underline;}

a.bt_red{display:block; float:right; margin:10px 5px 10px 5px; line-height:31px; text-decoration:none; color:#FFFFFF; text-shadow:1px 1px #c24739;}

(41)

a.bt_red span.bt_red_lft{width:10px;height:31px;display:block; float:left;background:url(images/bt_red_left.gif) no-repeat center right;}

a.bt_red span.bt_red_r{width:10px;height:31px;display:block;

float:left;background:url(images/bt_red_r.gif) no-repeat center right;} a:hover.bt_red{ text-decoration:underline;}

.sidebar_box{ width:195px;

padding:15px 0 5px 0; }

.sidebar_box_top{width:195px;height:8px;background:url(images/sidebar_box_top.gi f) no-repeat center bottom;}

.sidebar_box_bottom{width:195px;height:8px;background:url(images/sidebar_box_b ottom.gif) no-repeat center bottom;}

.sidebar_box_content{width:175px;height:auto;background-color:#ecf8fd; padding:0 10px 0 10px;}

.sidebar_box_content h3{ color:#49bae8; float:left; font-size:18px; margin:0px;padding:0px; font-weight:normal;}

.sidebar_box_content h4{ color:#f75744; float:left; font-size:18px; margin:0px;padding:0px; font-weight:normal;}

.sidebar_box_content h5{ color:#a4bf40; float:left; font-size:18px; margin:0px;padding:0px; font-weight:normal;}

.sidebar_box_content p{padding:5px 0 5px 0; margin:0px; clear:both; font-size:11px; text-align:left; line-height:17px;}

img.sidebar_icon_right{ float:right; padding:0 0 0 0; }

.sidebar_box_content ul{ list-style:none;

padding:10px 0 10px 0; margin:0px;

clear:both; }

.sidebar_box_content ul li{ padding:5px 0 5px 10px;

background:url(images/list_bullet.gif) no-repeat left top; background-position:0px 10px;

}

.warning_box{width:540px;clear:both;background:url(images/warning.png) no-repeat left #fcfae9;

border:1px #e9e6c7 solid;background-position:15px 10px;padding:20px 20px 15px 60px;margin:0 0 10px 0;}

.valid_box{width:540px;clear:both;background:url(images/valid.png) no-repeat left #edfce9;

(42)

.error_box{width:540px;clear:both;background:url(images/error.png) no-repeat left #fce9e9;

border:1px #eac7c7 solid;background-position:15px 10px;padding:20px 20px 15px 60px;margin:0 0 10px 0;}

/*---*/ div.pagination { width:625px; clear:both;

padding:10px 0 10px 0; margin:0px;

text-align:center; float:left;

clear:both; font-size:11px; }

div.pagination a {

padding: 2px 5px 2px 5px; margin-right: 2px;

border: 1px solid #52bfea; text-decoration: none; color: #52bfea;

}

div.pagination a:hover, div.pagination a:active { border:1px solid #52bfea;

color: #fff;

background-color: #52bfea; }

div.pagination span.current { padding: 2px 5px 2px 5px; margin-right: 2px;

border: 1px solid #52bfea; font-weight: bold;

background-color: #52bfea; color: #FFF;

}

div.pagination span.disabled { padding: 2px 5px 2px 5px; margin-right: 2px;

border: 1px solid #f3f3f3; color: #ccc;

}

25. berita.php

(43)

<h4><a href="?admin=formberita">Tambah Berita</a></h4>

<?php

error_reporting(0);

mysql_connect("localhost","root",""); mysql_select_db ("muhammadiyah");

$query= "select *from berita"; $tampil= mysql_query("$query");

$query_ambil_berita = mysql_query("SELECT * FROM berita"); //query ambil data berita.

while ($data_berita = mysql_fetch_array($query_ambil_berita)) { //perulangan untuk menampilkan berita

?>

<h5 style="margin-bottom: 0px"><?php echo $data_berita['judul']; ?></h5>

<small>Ditulis oleh : <?php echo $data_berita['penulis']; ?>, pada : <?php echo $data_berita['tanggal_posting']; ?></small>

<p> <?php

if (is_file("berita/gambar/".$data_berita['gambar']) == TRUE) { ?>

<?php } ?>

<?php echo substr($data_berita['isi_berita'], 0, 300); ?> ...

<p><a href="berita_detil.php?id=<?php echo $data_berita['id_berita']; ?>">selengkapnya</a>

</p>

<br>[<a href="hapusberita.php?id_berita=<?php echo $data_berita['id_berita']; ?>" onClick="return confirm('Anda yakin..?')">Hapus</a>] &nbsp;&nbsp;

[<a href="editberita.php?id=<?php echo $data_berita['id_berita']; ?>">Edit</a>] &nbsp;&nbsp;

<hr style="border: dashed 1px #e9e9e9">

<?php }

//penutup perulangan while ?>

<?php

(44)

Buku Tamu

26. admbuta.php

<?php

error_reporting(0);

mysql_connect("localhost","root",""); mysql_select_db ("muhammadiyah");

$query= "select*from guestbook"; $tampil= mysql_query("$query");

echo" <table border ='1'> <h2>Daftar Buku Tamu</h2> <p></p>

<p></p>

<tr><th>Id</th><th>Nama</th><th>Email</th><th>URL</th><th>Komentar</th><t h>Tanggal</th><th>Opsi</th></tr>";

while($data=mysql_fetch_assoc($tampil)) {

echo"

<tr><td>$data[id]</td><td>$data[nama]</td><td>$data[email]</td>

<td>$data[url]</td><td>$data[komentar]</td><td>$data[tanggal]</td><td><p></p>< a href='hapbuta.php?id=$data[id]'>

Hapus</a><p></p></td></tr>"; }

echo"</table>";

echo"*Data belum diperbaharui"; ?>

Galeri

27. index.php

<?php

error_reporting(0);

mysql_connect("localhost","root",""); mysql_select_db ("muhammadiyah");

$query= "select *from galeri"; $tampil= mysql_query("$query");

echo"<h2>Foto-Foto SMA Muhammadiyah 2 Medan</h2> <table border ='1'> <tr><th>Id_Gallery</th><th>Gambar</th><th>Tanggal</th><th>Id_Kategori</th><t h>Keterangan</th><th>Menu</th></tr>";

Referensi

Dokumen terkait

Untuk mengetahui apakah pengembangan bahan ajar berbasis Adobe Flash pada pembelajaran Akuntansi Perusahaan Dagang layak dan efektif dalam meningkatkan prestasi belajar

Penulisan Karya Tulis Ilmiah yang berjudul “Pengaruh Pemberian Ubi Ungu (Ipomoea Batatas L) Terhadap Kadar Malondialdehida Serum Pada Tikus Wistar Yang Diberi Minyak Goreng

Perubahan dari fakultas muda (cabang ) menjadi fakultas madya didasarkan pada kebijakan Menteri Agama H. Alamsyah Ratu Prawiranegara yang tidak menginginkan asset umat Islam ini

Tujuan penelitian ini adalah untuk mengetahui dan menganalisis regulasi pengelolaan hasil hutan dalam rangka peningkatan pendapatan asli daerah di Kabupaten Barito Selatan, serta

Wanita yang bertabarruj atau pamer aurat dan menampakkan keindahan tubuh di depan kaum laki- laki lain, akan mengundang perhatian laki- laki hidung belang dan serigala berbulu

Adapun ttap« yang kaal tantukan dlainl adalah tea pa yang baradar dipaaar-paaar raaal kota Surabaya# aa - dang oara pangaabilan aaapal dllakukan dangan

Hasil pemeriksaan fungsi paru diinterpretasikan melalui pembandingan nilai pengukuran yang didapat dengan nilai prediksi pada individu normal.. Prediksi nilai normal

a. Rasio Posyandu per Satuan Balita. Penambahan jumlah Posyandu dimaksudkan untuk mengantisipasi pertambahan jumlah bayi dari tahun ke tahun, dan ini cukup efektif