Universitas Sumatera Utara
elseif ($_GET['menu']=='sistkadm'){ include ('siswa/sistkadm.php'); } elseif ($_GET['menu']=='sistkform'){ include ('siswa/sistkform.php'); } elseif ($_GET['menu']=='sistkprosform'){ include ('siswa/sistkprosform.php'); } elseif ($_GET['menu']=='sisdadm'){ include ('siswa/sisdadm.php'); } elseif ($_GET['menu']=='sisdform'){ include ('siswa/sisdform.php'); } elseif ($_GET['menu']=='sisdprosform'){ include ('siswa/sisdprosform.php'); } elseif ($_GET['menu']=='siswa'){ include ('siswa/admsiswa.php'); } elseif ($_GET['menu']=='datasistk'){ include ('siswa/siswatk.php'); } elseif ($_GET['menu']=='datasissd'){ include ('siswa/siswasd.php'); } elseif($_GET['menu']=='preseniup'){ include('prestasi/seniadm.php'); } elseif ($_GET['menu']=='tambahseni'){ include ('prestasi/seniform.php'); } elseif ($_GET['menu']=='seniprosform'){ include ('prestasi/seniprosform.php'); } elseif($_GET['menu']=='presorkesup'){ include('prestasi/orkesadm.php'); } elseif ($_GET['menu']=='tambahorkes'){ include ('prestasi/orkesform.php'); } elseif ($_GET['menu']=='orkesprosform'){ include ('prestasi/orkesprosform.php'); } elseif ($_GET['menu']=='prestamikup'){ include('prestasi/amikadm.php'); } elseif ($_GET['menu']=='tambahamik'){ include ('prestasi/amikform.php'); } elseif ($_GET['menu']=='amikprosform'){ include ('prestasi/amikprosform.php'); } else{ echo "
";} ?>
Universitas Sumatera Utara
10. siswatk.php
Siswa Yayasan Pendidikan TK Islam Terpadu Raudhatus Sakinah
No NIS Nama Jenis Kelamin Tanggal Lahir Alamat Telepon Agama Orangtua Hobi Kelas "; while($data=mysql_fetch_assoc($tampil)) { echo"
$data[no] $data[nis] $data[nama] $data [jkel] $data[ttl] $data[alamat] $data[tlp] $data[ agama] $data[ortu] $data[hobi] $data[kelas] "; } echo"
"; ?>
Universitas Sumatera Utara
11. sistkubah.php
Ubah Data Siswa TK Dengan No=$no "; ?>
12. sistkhap.php data berhasil dihapus "; } else { echo" data gagal dihapus "; } echo"
Tampilkan Table "; ?>
Universitas Sumatera Utara
13. sistkform.php
"; ?>
14. sistkprosubah.php
Universitas Sumatera Utara
echo"
Data Berhasil Di Edit Tampil Table || Tambah Data "; } else { echo"
Data Gagal Di Edit Tampil Table || Tambah Data "; }?>
15. sistkprosform.php data berhasil dimasukkan"; } else { echo"
data gagal dimasukkan "; } echo"
Tampilkan Table ||Tambah Data "; ?>
16. ubah.php (pengajar)
Ubah Data Pegawai Dengan No=$no
Universitas Sumatera Utara
"; ?>
17. form.php (pengajar) "; ?>
18. hapus.php (pengajar) Data Berhasil Dihapus /center>"; } else { echo" Data Gagal Dihapus "; }
Universitas Sumatera Utara
echo"
Tampilkan Table "; ?>
19. prosubah.php (pengajar)
Data Berhasil Di Edit || "; } else { echo"
Data Gagal Di Edit ||
"; }?>
20. prosform.php (pengajar) data berhasil dimasukkan";
Universitas Sumatera Utara
} else { echo"
data gagal dimasukkan "; } echo"
Tampilkan Table ||Tambah Data "; ?>
21. adm.php (admin pengajar)
No Nama Jenis Kelamin Tanggal Lahir Jabatan Opsi "; while($data=mysql_fetch_assoc($tampil)) { echo"
$data[no] $data[nama] $data[lp] $data[ttl] $data[jabat] Hapus Ubah "; } echo"
"; echo""; ?>
22. seniform.php
"; ?>
23. seniubah.php
Ubah Data Prestasi No=$no "; ?>
24. senihap.php data berhasil dihapus "; } else { echo" data gagal dihapus "; } echo"
Tampilkan Table "; ?>
Universitas Sumatera Utara
25. seniprosubah.php Data Berhasil Di Edit
Tampil Table ||
Tambah Data "; }else{ echo"
Data Gagal Di Edit Tampil Table || Tambah Data "; }?>
26. seniprosform.php data berhasil dimasukkan";} else{ echo"
data gagal dimasukkan ";} echo"
Tampilkan Table ||Tambah Data "; ?>
Universitas Sumatera Utara
27. seniadm.php
No Kesenian yang Diikuti Nama Lomba Tahun Prestsi yang Diraih Bukti Fisik Opsi "; while($data=mysql_fetch_assoc($tampil)) { echo"
$data[no] $data[kesenian] $data[lomba] $data[tahun] $data[prestasi] $data[bukti] Hapus Ubah "; } echo"
Tambah Data
"; echo""; ?>
28. tambah.php (berita)
Universitas Sumatera Utara
29. edit.php (berita)
30. berita_detil.php
Detail Berita <small>Ditulis oleh : , pada :
Universitas Sumatera Utara
<strong>
31. aksi_tambah_berita.php
= $_POST['id_berita']; = $_POST['judul']; = $_POST['kategori']; = $_POST['penulis']; = $_POST['isi'];
//get variabel $lokasi_file = $tipe_file = $nama_file = $direktori =
file upload $_FILES['gambar']['tmp_name']; $_FILES['gambar']['type']; $_FILES['gambar']['name']; "gambar/$nama_file";
if (!empty($lokasi_file)) { if (move_uploaded_file($lokasi_file,$direktori)) { $query_tambah= mysql_query("INSERT INTO berita VALUES ('', '$kategori', '$judul', '$penulis', '$isi', NOW(), '$nama_file')"); header("Location: berita.php"); } else { $query_tambah= mysql_query("INSERT INTO berita VALUES ('', '$kategori', '$judul', '$penulis', '$isi', NOW(), '-')"); header("Location: berita.php"); } } else { $query_tambah= mysql_query("INSERT INTO berita VALUES ('', '$kategori', '$judul', '$penulis', '$isi', NOW(), '-')"); header("Location: berita.php"); } ?>
Universitas Sumatera Utara
31. aksi_edit_berita.php
= $_POST['id_berita']; = $_POST['judul']; = $_POST['kategori']; = $_POST['penulis']; = $_POST['isi'];
//get variabel $lokasi_file = $tipe_file = $nama_file = $direktori =
file upload $_FILES['gambar']['tmp_name']; $_FILES['gambar']['type']; $_FILES['gambar']['name']; "gambar/$nama_file";
if (!empty($lokasi_file)) { if (move_uploaded_file($lokasi_file,$direktori)) { //untuk keperluan upload gambar// $query_ambil_file_gambar_lama = mysql_query("SELECT gambar FROM berita WHERE id_berita = '$id_berita'"); $data_file_gambar_lama=mysql_fetch_array($query_ambil_file_gamba r_lama); unlink("gambar/".$data_file_gambar_lama['gambar']); //upload gambar selesai disini// $query_update= mysql_query("UPDATE berita SET judul = '$judul',penulis = '$penulis', isi_berita = '$isi', gambar = '$nama_file' WHERE id_berita = '$id_berita'"); header("Location: berita.php"); } else { $query_update= mysql_query("UPDATE berita SET judul = '$judul',penulis = '$penulis', isi_berita = '$isi' WHERE id_berita = '$id_berita'"); header("Location: berita.php"); } } else { $query_update= mysql_query("UPDATE berita SET judul = '$judul',penulis = '$penulis', isi_berita = '$isi' WHERE id_berita = '$id_berita'" header("Location: berita.php"); } ?>
32. berita.php
Berita Terbaru
Universitas Sumatera Utara
<small>Ditulis oleh : , pada :
... ">selengkapnya
"> [
">Edit ]
33. index.php (admin galeri tambah, edit dan hapus gambar)
Admin Galeri Foto alert('Berhasil Ditambahkan'); window.open('index.php', '_self');"; } else { echo "<script>alert('Gagal Ditambahkan'); window.open('index.php', '_self');"; }
Universitas Sumatera Utara
} //variabel Get $mod = $_GET['mod']; $id_kat = $_GET['id_kat']; if ($mod == "del_kat") { //hapus file $QDelKategori = mysql_query("DELETE FROM galerikategori WHERE id = '$id_kat'"); $QDelGaleriKat= mysql_query("DELETE FROM galeri WHERE kategori = '$id_kat'"); if ($QDelKategori && $QDelGaleriKat) { echo "<script>alert('Berhasil Dihapuskan'); window.open('index.php', '_self');"; } else {echo "<script>alert('Gagal Dihapus'); window.open('index.php', '_self');";} } else if ($mod == "upload") { $id_kat = $_POST['id_kat']; $ket = $_POST['ket']; //upload foto $fileName = $fileSize = $fileError = $fileType =
$_FILES['foto']['name']; $_FILES['foto']['size']; $_FILES['foto']['error']; $_FILES['foto']['type'];
if ($fileType == "image/gif" || $fileType == "image/pjpeg" || $fileType == "image/jpeg") { if (move_uploaded_file($_FILES['foto']['tmp_name'], '../foto/'.$fileName)) { perkecil("../foto/$fileName", "../foto/"); mysql_query("INSERT INTO galeri VALUES ('', '$fileName', '$id_kat', '$ket', '0', now())"); } echo "<script>alert('Berhasil Ditambahkan'); window.open('galeri_form.php?id_kat=".$_POST['kategori']."', '_self');"; } else { echo "<script>alert('Gagal Ditambahkan'); window.open('galeri_form.php?id_kat=".$_POST['kategori']."', '_self');"; } } ?>
Universitas Sumatera Utara
while ($AKategori = mysql_fetch_array($QKategori)) { $Kategori = $AKategori[0]; $QGetNamaKategori = mysql_query("SELECT nama FROM galerikategori WHERE id = '$Kategori'"); $AGetNamaKategori = mysql_fetch_array($QGetNamaKategori); $QJumlahPerKategori = mysql_query("SELECT file FROM galeri WHERE kategori = '$Kategori'"); $JJumlahPerKategori = mysql_num_rows($QJumlahPerKategori); echo "
"; $QGaleri = mysql_query("SELECT * FROM galeri WHERE kategori = '$Kategori'"); $no = 1; if ($JJumlahPerKategori == 0) { echo "
Belum ada foto dalam kategori ini "; } else { while ($AGaleri = mysql_fetch_array($QGaleri)) { echo "
"; $no++; if ($no > 6 ) { echo "
"; } } } echo ""; } ?>
34. galeri_detil.php
nama
FROM
Galeri Foto | Back to Gallery
Universitas Sumatera Utara
35. galeri_form.php alert('Pilih dulu albumnya')"; echo"<meta http-equiv='refresh' content='0;url=http:index.php'>"; } $q_ket_kategori= mysql_query("SELECT * FROM galerikategori WHERE id = '".$id_kat."'"); $ket_kat= mysql_fetch_array($q_ket_kategori); if ($p == "upload") { $id_kat= $_POST['id_kat']; $ket= $_POST['ket']; //upload foto $fileName = $fileSize = $fileError = $fileType =
$_FILES['foto']['name']; $_FILES['foto']['size']; $_FILES['foto']['error']; $_FILES['foto']['type'];
Universitas Sumatera Utara
if ($fileType == "image/gif" || $fileType == "image/pjpeg" || $fileType == "image/jpeg") { $QUpload = mysql_query("INSERT INTO galeri VALUES ('', '$fileName', '$id_kat', '$ket', '0', now())"); $move=move_uploaded_file($_FILES['foto']['tmp_name'],'../foto/'.$fileN ame); perkecil("../foto/$fileName", "../foto/"); echo"<script>alert('BerhasilDitambahkan'); window.open('galeri_form.php?id_kat=$id_kat', '_self');"; } else { echo"<script>alert('GagalDitambahkan'); window.open('galeri_form.php?id_kat=$id_kat', '_self');"; } } else if ($p == "del_foto") { $getNamaFile = mysql_query("SELECT file FROM galeri WHERE id = '".$id_foto."'"); $aNamaFile = mysql_fetch_array($getNamaFile); $q_del = mysql_query("DELETE FROM galeri WHERE id = '$id_foto'"); if ($q_del) { $del_file1 = unlink("../foto/".$aNamaFile[0]); $del_file2 = unlink("../foto/_s_".$aNamaFile[0]); echo"<script>alert('BerhasilDihapuskan'); window.open('galeri_form.php?id_kat=$id_kat', '_self');"; } else { echo"<script>alert('GagalDihapuskan'); window.open('galeri_form.php?id_kat=$id_kat', '_self');"; } } ?>
Upload Foto Kategori : Daftar Foto dalam kategori ini "; ?>
Universitas Sumatera Utara
36.admbuta.php <style type="text/css"> .admin { font-family: Lucida Console, Monaco, monospace; font-size:30px; color:#C36; font-weight:bold; }
BACK
Buku Tamu
Id Nama Email URL Komentar Tanggal Opsi "; while($data=mysql_fetch_assoc($tampil)) { echo"
$data[id] $data[nama] $data[email] $data[url] $data[komentar] $data[tanggal] Hapus "; } ?>
Universitas Sumatera Utara
37. isi.php (buku tamu)
"
"; ""; "Nama "; " : "; " ".$data["nama"]." "; " ";
echo ""; echo "Email "; echo " : "; echo " ".$data["email"]." "; echo " "; echo echo echo echo echo
""; "Tanggal Kirim "; " : "; "".$data["tanggal"]." "; " ";
echo echo echo echo echo
""; "URL "; " : "; " ".$data["url"]." "; " ";
echo echo echo echo echo
""; "Komentar "; " : "; " ".$data["komentar"]." "; " ";
echo "
"; } ?>
Universitas Sumatera Utara
38. simpan.php (buku tamu) Pengisian Buku Tamu Berhasil
Back To Menu " ; else echo"
Pengisian Buku Tamu Gagal "; ?>
39. hapbuta.php
data berhasil dihapus "; } else { echo"
data gagal dihapus "; } echo"
Tampilkan Table "; ?>
Universitas Sumatera Utara
40. koneksi.php
= = = =
"localhost"; "root"; ""; "data";
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_height, $src_width, $src_height);
$dst_width,
//Simpan gambar imagejpeg($im, $imgTujuan."_s_".$namaFileAsli); imagedestroy($im_src); imagedestroy($im); } ?> <script type="text/javascript" src="JS/jquery.min.js"> <script type="text/javascript" src="JS/fancybox/jquery.fancybox.js"> <script type="text/javascript" src="JS/fancybox/jquery.mousewheel.js">
<script type="text/javascript"> $(document).ready(function() { $(".fancybox").fancybox(); });
<script type="text/javascript" src="JS/tooltip.js">
Universitas Sumatera Utara