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 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> </ul>
<div class="clr"> <div class="content"> <div class="content_resize"> <div class="mainbar"> <div class="article"> 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');
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 class="sidebar"> <div class="gadget"> <h2 class="star"></h2> <ul class="sb_menu"> <li> <div class='title-post'> <font color=#066><img src='images/kreatif.jpg' align='left' width=30>inspiratif</font>
<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='boxlink'href=?menu=inspiratif>selengkapnya</a><br><br> </li> </ul> <div class="gadget"> <h2 class="star">kalender</h2> <ul class="ex_menu"> <li> 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>"); document.write("<td bgcolor='#9999cc' align='center'>m</td>"); document.write("<td bgcolor='#9999cc' align='center'>s</td>"); document.write("<td bgcolor='#9999cc' align='center'>s</td>"); document.write("<td bgcolor='#9999cc' align='center'>r</td>"); document.write("<td bgcolor='#9999cc' align='center'>k</td>"); document.write("<td bgcolor='#9999cc' align='center'>j</td>"); document.write("<td bgcolor='#9999cc' align='center'>s</td>");
document.write("</tr>"); if (currentdate.getday()!= 0) document.write("<tr>"); for (i = 0; i < currentdate.getday(); i++) document.write("<td> </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> </td>"); document.write("</font></table>"); </SCRIPT> </li> </ul> <h3 class="star"></h3> <ul class="ex_menu"></ul> include "counter.php"; </li> </ul>
<div class="clr"> <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 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 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 class="clr"> <div class="footer"> <div class="footer_resize">
<p class="lf"> 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"> </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 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 class="divider"> <h2>prestasi</h2> 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" <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"; <p class="readmore"><a href="?menu=prestasi">selengkapnya</a></p> 3. profil.php <center><img src="galeri/galeri5.jpg"alt="" width="533" height="243"/></center> 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> <br>ruang Perpustakaan : $data[perpustakaan]</br> <br>laboratorium : $data[laboratorium]</br> <br>ruang UKS : $data[ruang_uks]</b></center>
"; 4. struktur.php <div id="struktur"> <center><img src="images/struktur.jpg" alt="" height="552" width="623" /></center> 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> 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" height="364" align=left class='for-images' /></p>
7. prestasi.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 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"; yong 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" <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"; 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', scroller_border_size: '0', scroller_border_color: '#CCC', scroller_images_width: '100', scroller_images_height: '80',
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> </p> <div id="amazon_scroller1" class="amazon_scroller"> <div class="amazon_scroller_mask"> <ul> include "koneksi.php"; $select=mysql_query("select * from galeri"); while($row=mysql_fetch_array($select)) <li><a href="./galeri/ echo $row['gambar'];" title=" echo $row['keterangan'];" class="info" name="gambar"><img src="./galeri/ echo $row['gambar'];" width="60" height="60" title="klik photo"/></a></li> </ul>
<ul class="amazon_scroller_nav"> <li></li> <li></li> </ul> <div style="clear: both"> <p><i><font color="#666666" size="2" face="verdana">*klik gambar untuk zoom</font></i></p> <img src="images/camera.jpg" /> </body> </html> <script language="javascript"> $('a.info').bigpicture( 'enableinfo': true, 'infoposition': 'bottom' ); </script> 9. berita.php <html> <head> <title>data berita</title> </head> <body> include "koneksi.php"; <h2>berita Terbaru</h2> $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"> echo $data_berita['judul']; </h5> <small>ditulis oleh : echo $data_berita['penulis'];, pada : echo $data_berita['tanggal_posting']; </small> <p>
echo substr($data_berita['isi_berita'], 0, 300);... <a href="berita_detil.php?id= echo $data_berita['id_berita']; ">selengkapnya</a> </p> <hr style="border: dashed 1px #e9e9e9"> //penutup perulangan while </body> </html> 10. berita_detil.php.php include "koneksi.php"; <h3>detail Berita</h3> $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"> echo $data_berita['judul']; </h5> <small>ditulis oleh : echo $data_berita['penulis'];, pada : echo $data_berita['tanggal_posting']; </small> <p> echo $data_berita['isi_berita']; </p> <hr> <a href="index.php?menu=berita">back</a> 11. Guru.php error_reporting(0); mysql_connect("localhost","root",""); mysql_select_db ("muhammadiyah"); $query= "select*from guru"; $tampil= mysql_query("$query");
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='forimages' /><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> 13. kontak.php
<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> //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"); //menampilan isi buku tamu
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 mysql_connect("localhost", "root", "") or di (mysql_error()); mysql_select_db("muhammadiyah"); 15. koneksi1.php
$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" /> <script type="text/javascript"> $(document).ready(function()
$(".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, sansserif; 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; -mozborder-radius-topleft:12px; -moz-border-radius-topright:12px; -webkit-bordertop-left-radius:12px; -webkit-border-top-right-radius:12px;.header.logo width:932px; height:217px; background:url(images/logo2.jpg) norepeat center center; /* menu */.dropmenu background: #066; height: 30px; list-style-type: none; margin: 0; padding: 0px;.dropmenu li border-right: solid 1px white; float: left; height: 30px;
.dropmenu li a color: #fff; display: block; font: 12px arial, verdana, sansserif; 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; lineheight: 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 border-bottom-left-radius:12px; border-bottom-right-radius:12px; - moz-border-radius-bottomleft:12px; -moz-border-radius-bottomright:12px; -webkitborder-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-borderradius:12px;.fbg h2,.fbg a color:#000;
.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 */ /* produk */ #produk
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; font-weight: bold; text-align: center;
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 // 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() alert('password belum diisi');
</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"> </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> <td><input name="username" type="text"></td> </tr>
<tr> <td>password </td> <td><input name="pass" type="password"></td> </tr> <tr> <td> </td> <td><input type="submit" name="submit" value="login"></td> </tr> </table> </form> </p> <p> </p> <div align="center"><a href="../?menu=home">back to Home</a> </td> </tr> <tr> <td valign="top" bgcolor="#066"><p> </p> <p> <? include "footer.php"; </p> <p> </p></td> </tr> </table> 18. logout.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" /> <script type="text/javascript" src="js/clockp.js"></script> <script type="text/javascript" src="js/clockh.js"></script> <script type="text/javascript" src="js/jquery.min.js"></script> <script type="text/javascript" src="js/ddaccordion.js"></script>
<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"> </script> $(document).ready(function() $('.ask').jconfirmaction(); ); <script language="javascript" type="text/javascript" src="js/niceforms.js"></script> <link rel="stylesheet" type="text/css" media="all" href="niceforms-default.css" /> </head>
<body> <div id="main_container"> <div class="header"> <div class="logo"><a href="#"><img src="images/logo.gif" alt="" title="" border="0" /></a> <div class="right_header">welcome Admin, <a href="logout.php" class="logout">logout</a> <div id="clock_a"> <div class="main_content"> <div class="menu"> <ul> <li><a href="">halaman ADMINISTRATOR SMA MUHAMMADIYAH 2 MEDAN</a></li> </ul> <div class="center_content"> <div class="left_content"> <div class="sidebar_search"> <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 class="sidebar_box"> <div class="sidebar_box_top"> <div class="sidebar_box_content">
<div class="sidebar_box_bottom"> <div class="sidebar_box"> <div class="sidebar_box_top"> <div class="sidebar_box_content"> <div class="sidebar_box_bottom"> <div class="sidebar_box"> <div class="sidebar_box_top"> <div class="sidebar_box_content"> <div class="sidebar_box_bottom"> <div class="sidebar_box"> <div class="sidebar_box_top"> <div class="sidebar_box_content"> <div class="sidebar_box_bottom"> <div class="right_content"> <div class="pagination"> error_reporting('0'); $menu =$_GET['admin']; if($_get['admin']=='home') include('beranda.php'); elseif($_get['admin']=='profil') include('profil/index.php'); elseif($_get['admin']=='berita') include('berita/berita.php');
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'); elseif($_get['admin']=='prestasinon') include('prestasinon/indexnon.php');
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>";
<div class="form"> <!-- end of right content--> <!--end of center content --> <div class="clear"> <!--end of main content--> <div class="footer"> <div class="left_footer">fmipa UNIVERSITAS SUMATERA UTARA Powered by <a href="">nurlela</a> </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" /> </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"> <p><a href="http://facebook.com/" target="_blank"><img src="icon/logo_facebook1.png" width="134" height="51" border="0" /></a><a
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> </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 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;.clear
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; #clock_a
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;.footerwidth:900px;height:87px;background:url(images/footer_bg.jpg) repeat center top;.footer_loginwidth:600px;margin:auto;.left_footer float:left; padding:25px 0 0 10px; color:#0cf; font-size:11px;.left_footer a color:#000;
text-decoration:none;.right_footerfloat:right;padding:25px 10px 0 0;.left_footer_loginfloat:left;padding:15px 0 0 10px;color:#a8549b;font-size:11px;.left_footer_login acolor:#ffffff;text-decoration:none;.right_footer_loginfloat: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;lineheight:1em; /* style the links for the top level */.menu a,.menu a:visited display:block;float:left;height:100%;font-size:11px;textdecoration:none;color:#fff;padding:0 21px 0 17px;.menu a.currentbackground: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; borderbottom:1px #81dafc solid; color:#fff;width:12em;height:100%;lineheight: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 */.menu ul :hover a.sub1 background:url(images/arrow.gif) no-repeat right #309dc7; /* style the sub level 2 background */
.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:hovercolor:#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 ulleft: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; paddingbottom: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 ulvisibility:hidden; /* keep the fourth level hidden when you hover on second level list OR link */.menu ul :hover ul :hover ul ulvisibility:hidden; /* make the third level visible when you hover over second level list OR link */.menu ul :hover ul :hover ulvisibility: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;.right_content
width:625px; float:left; padding:30px 0 0 30px;.sidebarmenu margin:0px 0; padding:0; width:195px;.sidebarmenu a.menuitembackground: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_greenbackground: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_redbackground: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:hoverbackground:url(images/sidebar_menu_top_a.gif) norepeat center top;.sidebarmenu a.menuitem_green:hoverbackground:url(images/green_bt_a.gif) norepeat center top;.sidebarmenu a.menuitem_red:hoverbackground: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; padding: 0 0 5px 0;
.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; #rounded-corner thead th.rounded-company
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; margin-top: -6em; opacity: 0;
.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_greendisplay:block; float:right; margin:10px 5px 10px 5px; line-height:31px; text-decoration:none; color:#ffffff; text-shadow:1px 1px #8fa42b; a.bt_green strongwidth: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_lftwidth:10px;height:31px;display:block; float:left;background:url(images/bt_green_left.gif) no-repeat center right; a.bt_green span.bt_green_rwidth: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_bluedisplay:block; float:right; margin:10px 5px 10px 5px; line-height:31px; text-decoration:none; color:#ffffff; text-shadow:1px 1px #3597bf; a.bt_blue strongwidth: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_lftwidth:10px;height:31px;display:block; float:left;background:url(images/bt_blue_left.gif) no-repeat center right; a.bt_blue span.bt_blue_rwidth: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_reddisplay:block; float:right; margin:10px 5px 10px 5px; line-height:31px; textdecoration:none; color:#ffffff; text-shadow:1px 1px #c24739; a.bt_red strongwidth:auto;height:31px; padding:0 10px 0 10px;display:block; float:left;background:url(images/bt_red_center.gif) repeat-x center;
a.bt_red span.bt_red_lftwidth:10px;height:31px;display:block; float:left;background:url(images/bt_red_left.gif) no-repeat center right; a.bt_red span.bt_red_rwidth: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_topwidth:195px;height:8px;background:url(images/sidebar_box_top.gi f) no-repeat center bottom;.sidebar_box_bottomwidth:195px;height:8px;background:url(images/sidebar_box_b ottom.gif) no-repeat center bottom;.sidebar_box_contentwidth: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 ppadding: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_boxwidth: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_boxwidth:540px;clear:both;background:url(images/valid.png) no-repeat left #edfce9; border:1px #cceac4 solid;background-position:15px 10px;padding:20px 20px 15px 60px;margin:0 0 10px 0;
.error_boxwidth: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 <h3>berita Terbaru</h3>
<h4><a href="?admin=formberita">tambah Berita</a></h4> 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"> echo $data_berita['judul']; </h5> <small>ditulis oleh : echo $data_berita['penulis'];, pada : echo $data_berita['tanggal_posting']; </small> <p> if (is_file("berita/gambar/".$data_berita['gambar']) == TRUE) echo substr($data_berita['isi_berita'], 0, 300);... <p><a href="berita_detil.php?id= echo $data_berita['id_berita']; ">selengkapnya</a> </p> <br>[<a href="hapusberita.php?id_berita= echo $data_berita['id_berita']; " onclick="return confirm('anda yakin..?')">hapus</a>] [<a href="editberita.php?id= echo $data_berita['id_berita']; ">Edit</a>] <hr style="border: dashed 1px #e9e9e9"> //penutup perulangan while
Buku Tamu 26. admbuta.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 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>"; while($data=mysql_fetch_assoc($tampil))
echo" <tr><td>$data[id_gallery]</td> <td>$data[gambar]</td> <td>$data[tanggal]</td> <td>$data[id_kategori]</td> <td>$data[keterangan]</td> <td><p></p><a href='hapusgaleri.php?id_gallery=$data[id_gallery]'> Hapus</a><p></p></td></tr>"; echo"</table> <p></p><p></p><a href='?admin=formgaleri'>tambah Data</a></td></tr>"; Data Guru 28. index.php error_reporting(0); mysql_connect("localhost","root",""); mysql_select_db ("muhammadiyah"); $query= "select *from guru"; $tampil= mysql_query("$query"); echo"<p><p><p><h4>daftar Guru SMA Muhammadiyah 2 Medan</h4> <table border ='1'> <p></p> <p></p> <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><th>Menu</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> <td><p></p><a href='hapusguru.php?no=$data[no]'> Hapus</a><p></p><p></p> <a href='editguru.php?no=$data[no]'> Ubah</a><p></p></td>></tr>";
echo"</table> <p></p><a href='?admin=formguru'>tambah Data</a></td></tr"; Prestasi Akademik 29. index.php error_reporting(0); mysql_connect("localhost","root",""); mysql_select_db ("muhammadiyah"); $query= "select *from prestasi09"; $tampil= mysql_query("$query"); echo"<h3><center>prestasi Yang Akademik</h3> <br><br><br> <table border ='1'> <p></p> <p></p> <tr><th>no</th><th>nama</th><th>kelas</th><th>kejuaraan yong Diperoleh</th><th>Tingkat Penyelenggara</th><th>Tahun</th><th>Menu</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> <td><p></p><a href='hapusprestasi09.php?no=$data[no]'> Hapus</a><p></p><p></p> <a href='editprestasi09.php?no=$data[no]'> Ubah</a><p></p><p></p></td></tr>"; echo"</table> <p></p><p></p><a href='?admin=formprestasi09'>tambah Data</a> <a href='?admin=prestasi'>back Menu Prestasi</a>"; Prestasi Non Akademik 30. indexnon.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'> <p></p> <p></p> <tr><th>no</th><th>nama</th><th>kelas</th><th>kejuaraan yong Diperoleh</th><th>Tingkat Penyelenggara</th><th>Tahun</th><th>Menu</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> <td><p></p><a href='hapusprestasinon.php?no=$data[no]'> Hapus</a> <p></p><p></p><a href='editnon.php?no=$data[no]'> Ubah</a><p></p></td>></tr>"; echo"</table> <p></p><p></p><a href='?admin=formprestasinon'>tambah Data</a> <a href='?admin=prestasi'>back Menu Prestasi</a> "; Profil 31. index.php error_reporting(0); mysql_connect("localhost","root",""); mysql_select_db("muhammadiyah"); $query="select * from profil"; $tampil=mysql_query("$query"); echo"<table border='1'>"; while($data=mysql_fetch_assoc($tampil)) echo"<h2>profil SEKOLAH</h2> <tr><th>nama Sekolah</th><td>$data[Nama_sekolah]</td>
<td><a href='editprofil.php?nama_sekolah=$data[nama_sekolah]'>ubah</a></td></tr> <tr><th>nss</th><td>$data[nss]</td> <td><a href='editprofil.php?nama_sekolah=$data[nama_sekolah]'>ubah</a></td></tr> <tr><th>sk Pendiri</th><td>$data[SK_Pendiri]</td> <td><a href='editprofil.php.php?nama_sekolah=$data[nama_sekolah]'>ubah</a></td></tr> <tr><th>jenjang Akreditasi</th><td>$data[Jenjang_Akreditasi]</td><td><a href='editprofil.php.php?nama_sekolah=$data[nama_sekolah]'>ubah</a></td></tr> <tr><th>alamat Sekolah</th><td>$data[Alamat_Sekolah]</td><td><a href='editprofil.php.php?nama_sekolah=$data[nama_sekolah]'>ubah</a></td></tr> <tr><th>kelurahan</th><td>$data[kelurahan]</td><td><a href='editprofil.php.php?nama_sekolah=$data[nama_sekolah]'>ubah</a></td></tr> <tr><th>kecamatan</th><td>$data[kecamatan]</td><td><a href='editprofil.php?nama_sekolah=$data[nama_sekolah]'>ubah</a></td></tr> <tr><th>kota</th><td>$data[kota]</td><td><a href='editprofil.php?nama_sekolah=$data[nama_sekolah]'>ubah</a></td></tr> <tr><th>provinsi</th><td>$data[provinsi]</td><td><a href='editprofil.php?nama_sekolah=$data[nama_sekolah]'>ubah</a></td></tr> <tr><th>kepala Sekolah</th><td>$data[Kepala_Sekolah]</td><td><a href='editprofil.php?nama_sekolah=$data[nama_sekolah]'>ubah</a></td></tr> <tr><th>wakasek Kurikulum</th><td>$data[wakasek_kuri]</td><td><a href='editprofil.php?nama_sekolah=$data[nama_sekolah]'>ubah</a></td></tr> <tr><th>wakasek Kesiswaan</th><td>$data[wakasek_siswa]</td><td><a href='editprofil.php?nama_sekolah=$data[nama_sekolah]'>ubah</a></td></tr> <tr><th>penyelenggara Sekolah</th><td>$data[Penyelenggara]</td><td><a href='editprofil.php?nama_sekolah=$data[nama_sekolah]'>ubah</a></td></tr> <tr><th>ketua Penyelenggara</th><td>$data[Ketua]</td><td><a href='editprofil.phpnama_sekolah=$data[nama_sekolah]'>ubah</a></td></tr> <tr><th>status Sekolah</th><td>$data[Status]</td><td><a href='editprofil.php?nama_sekolah=$data[nama_sekolah]'>ubah</a></td></tr> <tr><th>keadaan Gedung</th><td>$data[gedung]</td><td><a href='editprofil.php?nama_sekolah=$data[nama_sekolah]'>ubah</a></td></tr> <tr><th>luas Tanah Seluruhnya</th><td>$data[Luas_Tanah]</td><td><a href='editprofil.php?nama_sekolah=$data[nama_sekolah]'>ubah</a></td></tr> <tr><th>luas Bangunan</th><td>$data[luas_bangunan]</td><td><a href='editprofil.php?nama_sekolah=$data[nama_sekolah]'>ubah</a></td></tr> <tr><th>jumlah Ruang Kelas</th><td>$data[Ruang_Kelas]</td><td><a href='editprofil.php?nama_sekolah=$data[nama_sekolah]'>ubah</a></td></tr> <tr><th>jumlah Kantor</th><td>$data[Jumlah_Kantor]</td><td><a href='editprofil.php?nama_sekolah=$data[nama_sekolah]'>ubah</a></td></tr> <tr><th>ruang Guru</th><td>$data[Ruang_Guru]</td><td><a href=editprofil.php?nama_sekolah=$data[nama_sekolah]'>ubah</a></td></tr> <tr><th>tata Usaha</th><td>$data[Tata_Usaha]</td><td><a href='editprofil.php?nama_sekolah=$data[nama_sekolah]'>ubah</a></td></tr> <tr><th>ruang Perpustakaan</th><td>$data[Perpustakaan]</td><td><a href='editprofil.php?nama_sekolah=$data[nama_sekolah]'>ubah</a></td></tr>
<tr><th>laboratorium</th><td>$data[laboratorium]</td><td><a href='editprofil.php?nama_sekolah=$data[nama_sekolah]'>ubah</a></td></tr> <tr><th>ruang UKS</th><td>$data[Ruang_UKS]</td> <td><a href='editprofil.php?nama_sekolah=$data[nama_sekolah]'>ubah</a></td></tr> "; echo"</table> ";