Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

inisialisasi project jadi web-perpustakaan

  • Loading branch information...
commit 15c56ea9fd9daae42e1faa7f42b302b274cbd3d8 0 parents
Adi Sulistiono authored
Showing with 2,516 additions and 0 deletions.
  1. +23 −0 beranda.php
  2. +31 −0 cari.php
  3. +59 −0 config.php
  4. +60 −0 content.php
  5. +308 −0 database/db.sql
  6. +19 −0 deleteBuku.php
  7. +19 −0 deleteKatalog.php
  8. +19 −0 deletePenerbit.php
  9. +19 −0 deletePengarang.php
  10. +28 −0 exelogin.php
  11. +53 −0 exeregister.php
  12. +128 −0 formBuku.php
  13. +59 −0 formKatalog.php
  14. +113 −0 formPeminjaman.php
  15. +77 −0 formPenerbit.php
  16. +77 −0 formPengarang.php
  17. +81 −0 formPengembalian.php
  18. +65 −0 formUpdateStok.php
  19. BIN  foto_profile/pusio-gmail-tux.png
  20. +16 −0 home.php
  21. BIN  images/23.jpg
  22. BIN  images/Books.JPG
  23. BIN  images/Buku-Perpustakaan_main.jpg
  24. BIN  images/GEMBOK.jpg
  25. BIN  images/Jantung_Sekolah1.jpg
  26. BIN  images/L_is_for_Library_cover.jpg
  27. BIN  images/Thumbs.db
  28. BIN  images/WB01292_.GIF
  29. BIN  images/arrow.gif
  30. BIN  images/back.gif
  31. BIN  images/bg.jpg
  32. BIN  images/book sale.jpg
  33. BIN  images/book3.gif
  34. BIN  images/book_stack.jpg
  35. BIN  images/books1.gif
  36. BIN  images/books3.jpg
  37. BIN  images/comment.gif
  38. BIN  images/fb005.jpg
  39. BIN  images/finance.jpg
  40. BIN  images/finance1.jpg
  41. BIN  images/footer.jpg
  42. BIN  images/header.jpg
  43. BIN  images/images.jpg
  44. BIN  images/images2.jpg
  45. BIN  images/images3.jpg
  46. BIN  images/laptop1.jpg
  47. BIN  images/laptsop1.jpg
  48. BIN  images/leftbg.jpg
  49. BIN  images/library011.jpg
  50. BIN  images/library_clipart3.gif
  51. BIN  images/login-welcome.JPG
  52. BIN  images/more.gif
  53. BIN  images/perpus-sekolah.gif
  54. BIN  images/perpustakaanl2.jpg
  55. BIN  images/pile-of-books.jpg
  56. BIN  images/public library.jpg
  57. BIN  images/self_help_library_home.jpg
  58. BIN  images/smk2.gif
  59. BIN  images/spport.gif
  60. +81 −0 images/style.css
  61. +89 −0 images/style_3c.css
  62. BIN  images/timeicon.gif
  63. BIN  images/tmc054.jpg
  64. BIN  images/top.jpg
  65. +246 −0 index.php
  66. +8 −0 koneksi.php
  67. +66 −0 listBuku.php
  68. +51 −0 listKatalog.php
  69. +49 −0 listPeminjaman.php
  70. +60 −0 listPenerbit.php
  71. +60 −0 listPengarang.php
  72. +46 −0 listStok.php
  73. +24 −0 login.php
  74. +18 −0 logout.php
  75. +8 −0 notadmin.php
  76. +8 −0 notmember.php
  77. +18 −0 profil.php
  78. +37 −0 profile.php
  79. +85 −0 register.php
  80. +41 −0 saveBuku.php
  81. +24 −0 saveKatalog.php
  82. +42 −0 savePeminjaman.php
  83. +29 −0 savePenerbit.php
  84. +29 −0 savePengarang.php
  85. +17 −0 savePengembalian.php
  86. +44 −0 searching.php
  87. +8 −0 sessionFailed.php
  88. +16 −0 updateConfig.php
  89. +15 −0 updateStok.php
  90. +43 −0 viewbook.php
23 beranda.php
@@ -0,0 +1,23 @@
+<!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>Untitled Document</title>
+<style type="text/css">
+.style3 {color: #FF9933}
+</style>
+</head>
+
+<body>
+<p><a href="#" class="style3">Pustaka SMK Negeri 2 Surabaya.com</a>
+</p>
+<h3>Buku adalah alat pengantar pada pengetahuan yang nantinya pengetahuan itu akan menuju pada kesuksesan </h3>
+<div class="img"><img src="images/finance.jpg" alt="Finance" /></div>
+Pustaka Smekda adalah sebuah perpustakaan yang telah berdiri sejak jaman belanda dan hingga kini perpustakaan itu masih tetap setia menemani siswa/i SMK Negeri 2 Surabaya Dahulu (STM 1) untuk memberikan pengetahuan yang beranekaragam mulai dari pengetahuan tekhnik sampai dengan ilmu pelajaran umum tersedia disana.Harapannya dari sebuah perpustakaan kecil ini dapat membantu untuk mencerdaskan &amp; menambah wawasan siswa/i SMK Negeri 2 Surabaya / Anggota Perpustakaan yang gemar membaca dan tergabung dalam Perpus Smekda Club untuk terus menjadi penjelajah dunia, sehingga Perpus Smkeda dapat memberikan wadah agar tetap terpenuhi kebutuhannya .
+<p><a href="#" class="style3">Aktivitas Siswa Dalam Perpus </a></p>
+<h3>Canda tawa pelajar Smekda </h3>
+<div class="img"><img src="images/laptop1.jpg" alt="laptop" /></div>
+<p>Dapat dilihat bahwa keantusiasan siswa/i SMK Negeri 2 dalam membaca sungguh luar biasa apa lagi didukung dengan tersedianya buku - buku yang memadai mulai dari buku tekhnik maupun pelajaran umum tersedia disini ,sehingga memudahkan para siswa/i untuk mengapresiasikan rasa keingintahuan para siswa/i dan sistem management perpustakaan SMK Negeri 2 yang baik sehingga sang siswa tidak cepat bosan dalam membaca dan diharapkan aktivitas siswa/i pada gambar disamping ini akan terus terbudaya sehingga dapat mencetak generasi STM yang mempunyai kualitas dan potensi yang handal dalam dunia kerja yang sangat luas meskipun hanya seorang lulusan STM yang dianggap remeh oleh orang - orang apriori. </p>
+<p>&nbsp;</p>
+</body>
+</html>
31 cari.php
@@ -0,0 +1,31 @@
+<!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">
+ <table width="152" border="0" cellspacing="0" cellpadding="0">
+ <tr>
+ <td width="53">Search : </td>
+ <td width="99">&nbsp;</td>
+ </tr>
+ <tr> <form method="post" action="searching.php">
+ <td colspan="2"><input name="keyword" type="text" id="keyword" /></td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <label></label>
+ <div align="center">
+ <input type="submit" name="Submit" value="enter" />
+ </div>
+ </td>
+ </tr></form>
+ </table>
+ <label></label>
+ </form>
+</div>
+</body>
+</html>
59 config.php
@@ -0,0 +1,59 @@
+<?
+ include 'koneksi.php';
+
+ session_start();
+ $admin=$_GET['admin'];
+ if($admin!=''){
+ $select_admin=mysql_query("select * from admin where id = '$admin'");
+ $count=mysql_num_rows($select_admin);
+ if($count>0){
+ $row=mysql_fetch_array($select_admin);
+ if(session_is_registered($row[1]) && session_is_registered($row[2]) && $row[3]="ADM"){
+ $select_config=mysql_query("select * from config limit 1");
+ $dt_config=mysql_fetch_array($select_config);
+ }else {
+ header('location:index.php?pg=notadmin');
+ }
+ } else {
+ header('location:index.php?pg=sessionFailed');
+ }
+ }
+
+
+?>
+<html>
+<head>
+<title>Form Konfigurasi</title>
+</head>
+<body>
+
+<table width="400" align="left" border="0" cellpadding="5" cellspacing="0" style="font-family:arial;color:black;font-size:12px;">
+<form method="post" action="updateConfig.php" target="thetarget">
+<tr valign="center">
+<td align="left">MAX LAMA PINJAM</td>
+<td align="center">:</td>
+<td ><input type="text" name="maxLamaPinjam" maxlength="3" value="<?echo $dt_config[1];?>">&nbsp;(hari)</td>
+</tr>
+
+<tr valign="center">
+<td align="left">DENDA PER HARI</td>
+<td align="center">:</td>
+<td ><input type="text" name="dendaPerHari" value="<?echo $dt_config[2];?>">&nbsp;(Rupiah)</td>
+</tr>
+
+<tr valign="top">
+<td align="center" colspan="3">
+ <input type="submit" name="submit" value="submit">
+ <input type="reset" name="reset" value="reset">
+ <input type="hidden" name="admin" value=<? echo $admin;?>>
+ <input type="hidden" name="id" value=<? echo $dt_config[0];?>>
+</td>
+
+</tr>
+<tr>
+<td colspan="3"><iframe width="100%" name="thetarget" height="100" frameborder="0" scrolling="auto"></iframe></td>
+</tr>
+</form>
+
+</body>
+</html>
60 content.php
@@ -0,0 +1,60 @@
+<?
+ $admin=$_GET['admin'];
+?>
+<html>
+<head></head>
+<body onload="submitForm()">
+
+<?
+ $pg=$_GET['pg'];
+ switch($pg){
+ case 'home':
+ echo "<form method=POST target=content action=home.php name=contentForm id=contentForm>
+ <input type=hidden name=admin id=admin value=$admin>
+ </form>";
+ //include 'home.php';
+ break;
+ case 'register':
+ //include 'register.php';
+ echo "<form method=POST target=content action=register.php name=contentForm id=contentForm>
+ <input type=hidden name=admin id=admin value=$admin>
+ </form>";
+ break;
+ case 'viewbook':
+ //include 'viewbook.php';
+ echo "<form method=POST target=content action=viewbook.php name=contentForm id=contentForm>
+ <input type=hidden name=admin id=admin value=$admin>
+ </form>";
+ break;
+ case 'login':
+ //include 'login.php';
+ echo "<form method=POST target=content action=login.php name=contentForm id=contentForm>
+ <input type=hidden name=admin id=admin value=$admin>
+ </form>";
+ break;
+ case 'cari':
+ //include 'searching.php';
+ echo "<form method=POST target=content action=searching.php name=contentForm id=contentForm>
+ <input type=hidden name=admin id=admin value=$admin>
+ </form>";
+ break;
+ case 'logout':
+ //include 'logout.php';
+ echo "<form method=POST target=content action=logout.php name=contentForm id=contentForm>
+ <input type=hidden name=admin id=admin value=$admin>
+ </form>";
+ break;
+ case 'profile':
+ //include 'profile.php';
+ echo "<form method=POST target=content action=profile.php name=contentForm id=contentForm>
+ <input type=hidden name=admin id=admin value=$admin>
+ </form>";
+ break;
+ default:
+ //include 'login.php';
+ echo "<form method=POST target=content action=login.php name=contentForm id=contentForm>
+ <input type=hidden name=admin id=admin value=$admin>
+ </form>";
+ break;
+ }
+?><script type='text/javascript'>document.contentForm.submit();</script></body></html>
308 database/db.sql
@@ -0,0 +1,308 @@
+-- MySQL dump 10.13 Distrib 5.1.49, for debian-linux-gnu (i686)
+--
+-- Host: localhost Database: db_perpustakaan
+-- ------------------------------------------------------
+-- Server version 5.1.49-1ubuntu8.1
+
+/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
+/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
+/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
+/*!40101 SET NAMES utf8 */;
+/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
+/*!40103 SET TIME_ZONE='+00:00' */;
+/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
+/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
+/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
+/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
+
+--
+-- Table structure for table `admin`
+--
+
+DROP TABLE IF EXISTS `admin`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `admin` (
+ `id` varchar(255) NOT NULL,
+ `username` varchar(255) NOT NULL,
+ `password` varchar(255) NOT NULL,
+ `type` char(3) NOT NULL,
+ PRIMARY KEY (`id`),
+ UNIQUE KEY `username` (`username`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Dumping data for table `admin`
+--
+
+LOCK TABLES `admin` WRITE;
+/*!40000 ALTER TABLE `admin` DISABLE KEYS */;
+INSERT INTO `admin` VALUES ('21232f297a57a5a743894a0e4a801fc3','admin','0192023a7bbd73250516f069df18b500','ADM');
+/*!40000 ALTER TABLE `admin` ENABLE KEYS */;
+UNLOCK TABLES;
+
+--
+-- Table structure for table `anggota`
+--
+
+DROP TABLE IF EXISTS `anggota`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `anggota` (
+ `id_anggota` int(11) NOT NULL AUTO_INCREMENT,
+ `id_admin` varchar(255) NOT NULL,
+ `nama` varchar(255) NOT NULL,
+ `sex` char(1) NOT NULL,
+ `telp` varchar(15) NOT NULL,
+ `alamat` varchar(255) NOT NULL,
+ `email` varchar(255) NOT NULL,
+ `tgl_entry` date NOT NULL,
+ `descripsi` text NOT NULL,
+ `foto` varchar(255) DEFAULT NULL,
+ PRIMARY KEY (`id_anggota`),
+ KEY `admin` (`id_admin`),
+ CONSTRAINT `admin` FOREIGN KEY (`id_admin`) REFERENCES `admin` (`id`)
+) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Dumping data for table `anggota`
+--
+
+LOCK TABLES `anggota` WRITE;
+/*!40000 ALTER TABLE `anggota` DISABLE KEYS */;
+INSERT INTO `anggota` VALUES (1,'21232f297a57a5a743894a0e4a801fc3','administrator','L','085210831766','administrator home','admin@perpus.co.id','2011-02-15','iam administrator','pusio-gmail-tux.png');
+/*!40000 ALTER TABLE `anggota` ENABLE KEYS */;
+UNLOCK TABLES;
+
+--
+-- Table structure for table `buku`
+--
+
+DROP TABLE IF EXISTS `buku`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `buku` (
+ `isbn` varchar(25) NOT NULL,
+ `judul` varchar(255) DEFAULT NULL,
+ `tahun` int(11) DEFAULT NULL,
+ `id_penerbit` varchar(8) DEFAULT NULL,
+ `id_pengarang` varchar(8) DEFAULT NULL,
+ `id_katalog` varchar(3) DEFAULT NULL,
+ `qty_stok` int(11) DEFAULT '0',
+ PRIMARY KEY (`isbn`),
+ KEY `penerbit` (`id_penerbit`),
+ KEY `pengarang` (`id_pengarang`),
+ KEY `katalog` (`id_katalog`),
+ CONSTRAINT `katalog` FOREIGN KEY (`id_katalog`) REFERENCES `katalog` (`id_katalog`),
+ CONSTRAINT `penerbit` FOREIGN KEY (`id_penerbit`) REFERENCES `penerbit` (`id_penerbit`),
+ CONSTRAINT `pengarang` FOREIGN KEY (`id_pengarang`) REFERENCES `pengarang` (`id_pengarang`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Dumping data for table `buku`
+--
+
+LOCK TABLES `buku` WRITE;
+/*!40000 ALTER TABLE `buku` DISABLE KEYS */;
+INSERT INTO `buku` VALUES ('092-111','BELAJAR PHP',2010,'PN01','PG01','KG0',12);
+/*!40000 ALTER TABLE `buku` ENABLE KEYS */;
+UNLOCK TABLES;
+
+--
+-- Table structure for table `config`
+--
+
+DROP TABLE IF EXISTS `config`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `config` (
+ `id` int(11) NOT NULL AUTO_INCREMENT,
+ `maxLamaPinjam` int(11) DEFAULT NULL,
+ `dendaPerHari` decimal(19,0) DEFAULT NULL,
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Dumping data for table `config`
+--
+
+LOCK TABLES `config` WRITE;
+/*!40000 ALTER TABLE `config` DISABLE KEYS */;
+INSERT INTO `config` VALUES (1,3,'500');
+/*!40000 ALTER TABLE `config` ENABLE KEYS */;
+UNLOCK TABLES;
+
+--
+-- Table structure for table `detail_peminjaman`
+--
+
+DROP TABLE IF EXISTS `detail_peminjaman`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `detail_peminjaman` (
+ `id_pinjam` int(11) NOT NULL DEFAULT '0',
+ `isbn` varchar(25) NOT NULL DEFAULT '',
+ `qty` int(11) DEFAULT NULL,
+ PRIMARY KEY (`id_pinjam`,`isbn`),
+ KEY `id_pinjam` (`id_pinjam`),
+ KEY `isbn` (`isbn`),
+ CONSTRAINT `isbn` FOREIGN KEY (`isbn`) REFERENCES `buku` (`isbn`),
+ CONSTRAINT `id_pinjam` FOREIGN KEY (`id_pinjam`) REFERENCES `peminjaman` (`id_pinjam`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Dumping data for table `detail_peminjaman`
+--
+
+LOCK TABLES `detail_peminjaman` WRITE;
+/*!40000 ALTER TABLE `detail_peminjaman` DISABLE KEYS */;
+/*!40000 ALTER TABLE `detail_peminjaman` ENABLE KEYS */;
+UNLOCK TABLES;
+
+--
+-- Table structure for table `katalog`
+--
+
+DROP TABLE IF EXISTS `katalog`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `katalog` (
+ `id_katalog` varchar(3) NOT NULL,
+ `nama` varchar(255) DEFAULT NULL,
+ PRIMARY KEY (`id_katalog`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Dumping data for table `katalog`
+--
+
+LOCK TABLES `katalog` WRITE;
+/*!40000 ALTER TABLE `katalog` DISABLE KEYS */;
+INSERT INTO `katalog` VALUES ('KG0','KATALOG 1');
+/*!40000 ALTER TABLE `katalog` ENABLE KEYS */;
+UNLOCK TABLES;
+
+--
+-- Table structure for table `peminjaman`
+--
+
+DROP TABLE IF EXISTS `peminjaman`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `peminjaman` (
+ `id_pinjam` int(11) NOT NULL AUTO_INCREMENT,
+ `id_anggota` int(11) DEFAULT NULL,
+ `tgl_pinjam` date DEFAULT NULL,
+ `tgl_kembali` date DEFAULT NULL,
+ PRIMARY KEY (`id_pinjam`),
+ KEY `anggota` (`id_anggota`),
+ CONSTRAINT `anggota` FOREIGN KEY (`id_anggota`) REFERENCES `anggota` (`id_anggota`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Dumping data for table `peminjaman`
+--
+
+LOCK TABLES `peminjaman` WRITE;
+/*!40000 ALTER TABLE `peminjaman` DISABLE KEYS */;
+/*!40000 ALTER TABLE `peminjaman` ENABLE KEYS */;
+UNLOCK TABLES;
+
+--
+-- Table structure for table `penerbit`
+--
+
+DROP TABLE IF EXISTS `penerbit`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `penerbit` (
+ `id_penerbit` varchar(8) NOT NULL,
+ `nama_penerbit` varchar(255) DEFAULT NULL,
+ `email` varchar(50) DEFAULT NULL,
+ `telp` varchar(12) DEFAULT NULL,
+ `alamat` varchar(255) DEFAULT NULL,
+ PRIMARY KEY (`id_penerbit`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Dumping data for table `penerbit`
+--
+
+LOCK TABLES `penerbit` WRITE;
+/*!40000 ALTER TABLE `penerbit` DISABLE KEYS */;
+INSERT INTO `penerbit` VALUES ('PN01','PENERBIT 01','penerbit@perpus.co.id','0219999333','PENERBIT');
+/*!40000 ALTER TABLE `penerbit` ENABLE KEYS */;
+UNLOCK TABLES;
+
+--
+-- Table structure for table `pengarang`
+--
+
+DROP TABLE IF EXISTS `pengarang`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `pengarang` (
+ `id_pengarang` varchar(8) NOT NULL,
+ `nama_pengarang` varchar(255) DEFAULT NULL,
+ `email` varchar(50) DEFAULT NULL,
+ `telp` varchar(12) DEFAULT NULL,
+ `alamat` varchar(255) DEFAULT NULL,
+ PRIMARY KEY (`id_pengarang`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Dumping data for table `pengarang`
+--
+
+LOCK TABLES `pengarang` WRITE;
+/*!40000 ALTER TABLE `pengarang` DISABLE KEYS */;
+INSERT INTO `pengarang` VALUES ('PG01','PENGARANG 01','pengarang@perpus.co.id','0929211','PENGARANG');
+/*!40000 ALTER TABLE `pengarang` ENABLE KEYS */;
+UNLOCK TABLES;
+
+--
+-- Table structure for table `pengembalian`
+--
+
+DROP TABLE IF EXISTS `pengembalian`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `pengembalian` (
+ `id_kembali` int(11) NOT NULL AUTO_INCREMENT,
+ `id_pinjam` int(11) DEFAULT NULL,
+ `tgl_kembali` date DEFAULT NULL,
+ `denda` decimal(19,0) DEFAULT NULL,
+ PRIMARY KEY (`id_kembali`),
+ KEY `id_pinjam` (`id_pinjam`),
+ CONSTRAINT `pengembalian_ibfk_1` FOREIGN KEY (`id_pinjam`) REFERENCES `peminjaman` (`id_pinjam`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Dumping data for table `pengembalian`
+--
+
+LOCK TABLES `pengembalian` WRITE;
+/*!40000 ALTER TABLE `pengembalian` DISABLE KEYS */;
+/*!40000 ALTER TABLE `pengembalian` ENABLE KEYS */;
+UNLOCK TABLES;
+/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
+
+/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
+/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
+/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
+/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
+/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
+/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
+/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
+
+-- Dump completed on 2011-02-15 22:28:48
19 deleteBuku.php
@@ -0,0 +1,19 @@
+<?
+ session_start();
+ include 'koneksi.php';
+ $admin=$_GET['admin'];
+ $kode=$_GET['idBuku'];
+
+ if($kode!=''){
+ $query=mysql_query("delete from buku where isbn='$kode'");
+ } else {
+ echo "KODE TIDAK BOLEH NULL !!!<br>";
+ }
+ if($query){
+ echo "delete success<br>";
+ } else {
+ echo "delete failed<br>";
+ }
+ echo "<a href=index.php?pg=buku&admin=$admin>go to list buku</a>";
+ //echo $admin;
+?>
19 deleteKatalog.php
@@ -0,0 +1,19 @@
+<?
+ session_start();
+ include 'koneksi.php';
+ $admin=$_GET['admin'];
+ $kode=$_GET['idKatalog'];
+
+ if($kode!=''){
+ $query=mysql_query("delete from katalog where id_katalog='$kode'");
+ } else {
+ echo "KODE TIDAK BOLEH NULL !!!<br>";
+ }
+ if($query){
+ echo "delete success<br>";
+ } else {
+ echo "delete failed<br>";
+ }
+ echo "<a href=index.php?pg=katalog&admin=$admin>go to list katalog</a>";
+ //echo $admin;
+?>
19 deletePenerbit.php
@@ -0,0 +1,19 @@
+<?
+ session_start();
+ include 'koneksi.php';
+ $admin=$_GET['admin'];
+ $kode=$_GET['idPenerbit'];
+
+ if($kode!=''){
+ $query=mysql_query("delete from penerbit where id_penerbit='$kode'");
+ } else {
+ echo "KODE TIDAK BOLEH NULL !!!<br>";
+ }
+ if($query){
+ echo "delete success<br>";
+ } else {
+ echo "delete failed<br>";
+ }
+ echo "<a href=index.php?pg=penerbit&admin=$admin>go to list penerbit</a>";
+ //echo $admin;
+?>
19 deletePengarang.php
@@ -0,0 +1,19 @@
+<?
+ session_start();
+ include 'koneksi.php';
+ $admin=$_GET['admin'];
+ $kode=$_GET['idPengarang'];
+
+ if($kode!=''){
+ $query=mysql_query("delete from pengarang where id_pengarang='$kode'");
+ } else {
+ echo "KODE TIDAK BOLEH NULL !!!<br>";
+ }
+ if($query){
+ echo "delete success<br>";
+ } else {
+ echo "delete failed<br>";
+ }
+ echo "<a href=index.php?pg=pengarang&admin=$admin>go to list pengarang</a>";
+ //echo $admin;
+?>
28 exelogin.php
@@ -0,0 +1,28 @@
+<?
+ include 'koneksi.php';
+ $user=$_POST['user'];
+ $pass=$_POST['pass'];
+ $md_pass=md5($pass);
+
+ $sqlAdmin=mysql_query("select * from admin where username='$user' and password='$md_pass'");
+ $row=mysql_fetch_array($sqlAdmin);
+ $count=mysql_num_rows($sqlAdmin);
+
+ if($count==0)
+ echo "Username atau password salah";
+ else if($row[3]=='ADM'){
+ session_register($row[1]);
+ session_register($row[2]);
+ //session_register(administrator);
+ $id=1;
+ header("location:index.php?pg=profile&admin=$row[0]");
+ } else if($row[3]=='ANG'){
+ session_register($row[1]);
+ session_register($row[2]);
+ //session_register(member);
+ $id=2;
+ header("location:index.php?pg=profile&admin=$row[0]");
+ }
+ ob_end_flush();
+
+?>
53 exeregister.php
@@ -0,0 +1,53 @@
+<meta http-equiv="Page-Exit" content="BlendTrans(Duration:1.0)">
+<link rev="stylesheet" rel="stylesheet" type="text/css" href="style1.css">
+<?
+include 'koneksi.php';
+$user=$_POST['username'];
+$md_username=md5($user);
+
+$pass=$_POST['password'];
+$md_password=md5($pass);
+
+$name=$_POST['name'];
+$sex=$_POST['sex'];
+$tlp=$_POST['telp'];
+$alamat=$_POST['alamat'];
+$mail=$_POST['mail'];
+$desc=$_POST['description'];
+$tgl=$_POST['tglentry'];
+$filename='';
+
+if ((($_FILES["file"]["type"] == "image/gif") || ($_FILES["file"]["type"] == "image/jpeg") || ($_FILES["file"]["type"] == "image/pjpeg")
+ || ($_FILES["file"]["type"] == "image/jpg") || ($_FILES["file"]["type"] == "image/png"))
+ && ($_FILES["file"]["size"] < 1000000)){
+
+ if ($_FILES["file"]["error"] > 0){
+ echo "Return Code: " . $_FILES["file"]["error"] . "<br />";
+ } else {
+ $sqladmin=mysql_query("insert into admin (id, username, password, type) values('$md_username','$user', '$md_password', 'ANG')");
+ if($sqladmin){
+ $filename=$_FILES["file"]["name"];
+ $sqlanggota=mysql_query("insert into anggota values('','$md_username','$name', '$sex', '$tlp', '$alamat', '$mail', '$tgl', '$desc', '$filename')");
+ if($sqlanggota){
+ //echo "Upload: " . $_FILES["file"]["name"] . "<br />";
+ //echo "Type: " . $_FILES["file"]["type"] . "<br />";
+ //echo "Size: " . ($_FILES["file"]["size"] / 1024) . " Kb<br />";
+ //echo "Temp file: " . $_FILES["file"]["tmp_name"] . "<br />";
+
+ if (file_exists("foto_profile/" . $_FILES["file"]["name"])){
+ //echo $_FILES["file"]["name"] . " already exists. ";
+ } else {
+ move_uploaded_file($_FILES["file"]["tmp_name"],"foto_profile/" . $_FILES["file"]["name"]);
+ //echo "Stored in: " . "foto_profile/" . $_FILES["file"]["name"];
+ //echo "<br>";
+ }
+ echo "Registrasi Berhasil";
+ }
+ } else
+ echo "username yang anda gunakan sudah dipakai";
+ }
+}else{
+ echo "Invalid file";
+}
+
+?>
128 formBuku.php
@@ -0,0 +1,128 @@
+<?
+ include 'koneksi.php';
+
+ session_start();
+ $admin=$_GET['admin'];
+ if($admin!=''){
+ $select_admin=mysql_query("select * from admin where id = '$admin'");
+ $count=mysql_num_rows($select_admin);
+ if($count>0){
+ $row=mysql_fetch_array($select_admin);
+ if(session_is_registered($row[1]) && session_is_registered($row[2]) && $row[3]="ADM"){
+ $idBuku = $_GET['idBuku'];
+ $select_buku=mysql_query("select * from buku where isbn='$idBuku'");
+ $dtBuku=mysql_fetch_array($select_buku);
+ }else {
+ header('location:index.php?pg=notadmin');
+ }
+ } else {
+ header('location:index.php?pg=sessionFailed');
+ }
+ }
+
+
+?>
+<html>
+<head>
+<title>Form Buku</title>
+</head>
+<body>
+
+<table width="400" align="left" border="0" cellpadding="5" cellspacing="0" style="font-family:arial;color:black;font-size:12px;">
+<form method="post" action="saveBuku.php" target="thetarget">
+<tr valign="center">
+<td align="left">ISBN</td>
+<td align="center">:</td>
+<td ><input type="text" name="isbn" maxlength="25" <? if(mysql_num_rows($select_buku)==1) echo "value=$dtBuku[0]";?>></td>
+</tr>
+
+<tr valign="center">
+<td align="left">JUDUL</td>
+<td align="center">:</td>
+<td ><input type="text" name="judul" value="<? if(mysql_num_rows($select_buku)==1) echo $dtBuku[1];?>"></td>
+</tr>
+
+<tr valign="center">
+<td align="left">TAHUN</td>
+<td align="center">:</td>
+<td ><input type="text" name="tahun" value="<? if(mysql_num_rows($select_buku)==1) echo $dtBuku[2];?>"></td>
+</tr>
+
+<tr valign="center">
+<td align="left">PENERBIT</td>
+<td align="center">:</td>
+<td >
+ <select name="penerbit">
+ <option value='' >--[pilih]--</option>
+ <?
+ $penerbit=mysql_query("select * from penerbit");
+ while($p=mysql_fetch_array($penerbit)){
+ if($p[0]==$dtBuku[3]){
+ $selected='selected=selected';
+ } else {
+ $selected='';
+ }
+ echo "<option value=$p[0] $selected>$p[1]</option>";
+ }
+ ?>
+ </select>
+</td>
+</tr>
+
+<tr valign="center">
+<td align="left">PENGARANG</td>
+<td align="center">:</td>
+<td >
+ <select name="pengarang">
+ <option value='' >--[pilih]--</option>
+ <?
+ $pengarang=mysql_query("select * from pengarang");
+ while($w=mysql_fetch_array($pengarang)){
+ if($w[0]==$dtBuku[4]){
+ $selected='selected=selected';
+ } else {
+ $selected='';
+ }
+ echo "<option value=$w[0] $selected>$w[1]</option>";
+ }
+ ?>
+ </select>
+</td>
+</tr>
+
+<tr valign="center">
+<td align="left">KATALOG</td>
+<td align="center">:</td>
+<td >
+ <select name="katalog">
+ <option value='' >--[pilih]--</option>
+ <?
+ $katalog=mysql_query("select * from katalog");
+ while($k=mysql_fetch_array($katalog)){
+ if($k[0]==$dtBuku[5]){
+ $selected='selected=selected';
+ } else {
+ $selected='';
+ }
+ echo "<option value=$k[0] $selected>$k[1]</option>";
+ }
+ ?>
+ </select>
+</td>
+</tr>
+
+<tr valign="top">
+<td align="center" colspan="3">
+ <input type="submit" name="submit" value="submit">
+ <input type="reset" name="reset" value="reset">
+ <input type="hidden" name="admin" value=<? echo $admin;?>>
+</td>
+
+</tr>
+<tr>
+<td colspan="3"><iframe width="100%" name="thetarget" height="100" frameborder="0" scrolling="auto"></iframe></td>
+</tr>
+</form>
+
+</body>
+</html>
59 formKatalog.php
@@ -0,0 +1,59 @@
+<?
+ include 'koneksi.php';
+
+ session_start();
+ $admin=$_GET['admin'];
+ if($admin!=''){
+ $select_admin=mysql_query("select * from admin where id = '$admin'");
+ $count=mysql_num_rows($select_admin);
+ if($count>0){
+ $row=mysql_fetch_array($select_admin);
+ if(session_is_registered($row[1]) && session_is_registered($row[2]) && $row[3]="ADM"){
+ $idKatalog = $_GET['idKatalog'];
+ $select_katalog=mysql_query("select * from katalog where id_katalog='$idKatalog'");
+ $dtKatalog=mysql_fetch_array($select_katalog);
+ }else {
+ header('location:index.php?pg=notadmin');
+ }
+ } else {
+ header('location:index.php?pg=sessionFailed');
+ }
+ }
+
+
+?>
+<html>
+<head>
+<title>Form Katalog</title>
+</head>
+<body>
+
+<table width="400" align="left" border="0" cellpadding="5" cellspacing="0" style="font-family:arial;color:black;font-size:12px;">
+<form method="post" action="saveKatalog.php" target="thetarget">
+<tr valign="center">
+<td align="left">KODE</td>
+<td align="center">:</td>
+<td ><input type="text" name="kode" maxlength="3" <? if(mysql_num_rows($select_katalog)==1) echo "value=$dtKatalog[0]";?>></td>
+</tr>
+
+<tr valign="center">
+<td align="left">NAMA</td>
+<td align="center">:</td>
+<td ><input type="text" name="nama" value="<? if(mysql_num_rows($select_katalog)==1) echo $dtKatalog[1];?>"></td>
+</tr>
+
+<tr valign="top">
+<td align="center" colspan="3">
+ <input type="submit" name="submit" value="submit">
+ <input type="reset" name="reset" value="reset">
+ <input type="hidden" name="admin" value=<? echo $admin;?>>
+</td>
+
+</tr>
+<tr>
+<td colspan="3"><iframe width="100%" name="thetarget" height="100" frameborder="0" scrolling="auto"></iframe></td>
+</tr>
+</form>
+
+</body>
+</html>
113 formPeminjaman.php
@@ -0,0 +1,113 @@
+<?
+ include 'koneksi.php';
+
+ session_start();
+ $admin=$_GET['admin'];
+
+ if($admin!=''){
+ $select_admin=mysql_query("select * from admin where id = '$admin'");
+ $count=mysql_num_rows($select_admin);
+ if($count>0){
+ $row=mysql_fetch_array($select_admin);
+ if(session_is_registered($row[1]) && session_is_registered($row[2]) && $row[3]="ANG"){
+ $count = $_POST['txtCount'];
+ $count = $count + 1;
+ }else {
+ header('location:index.php?pg=notmember');
+ }
+ } else {
+ header('location:index.php?pg=sessionFailed');
+ }
+ }
+
+
+?>
+<html>
+<head>
+<title>Form Peminjaman</title>
+</head>
+<body>
+
+<table width="400" align="left" border="0" cellpadding="5" cellspacing="0" style="font-family:arial;color:black;font-size:12px;">
+<tr valign="center">
+<td align="left" colspan="3">
+ <form method="POST" action="" target="_self">
+ <input type="submit" value="add_detail" name="add" / >
+ <input type="hidden" value="<? echo $admin;?>" name="admin" / >
+ <input type="hidden" value="<? echo $count;?>" name="txtCount" / >
+ </form>
+</td>
+</tr>
+<form method="post" action="savePeminjaman.php" target="thetarget">
+<tr valign="center">
+<td align="left" width="80">ANGGOTA</td>
+<td align="center">:</td>
+<?
+ $Qanggota=mysql_query("select * from anggota where id_admin='$admin'");
+ $anggota = mysql_fetch_array($Qanggota);
+?>
+
+<td >
+ <? echo $anggota[2];?><input type="hidden" name="id_anggota" value="<? echo $anggota[0];?>">
+</td>
+</tr>
+
+<?
+ $tglPinjam = date("Y-m-d");
+ $config = mysql_query("select * from config");
+ $dtConfig = mysql_fetch_array($config);
+
+ $dateMax = mktime(0,0,0, date("m"), date("d")+$dtConfig[1], date("Y"));
+ $tglKembali = date("Y-m-d", $dateMax);
+?>
+
+<tr valign="center">
+<td align="left" width="80">TGL PINJAM</td>
+<td align="center">:</td>
+<td ><input type="hidden" name="tglPinjam" value="<? echo $tglPinjam; ?>"><? echo $tglPinjam; ?></td>
+</tr>
+
+<tr valign="center">
+<td align="left" width="80">TGL KEMBALI</td>
+<td align="center">:</td>
+<td ><input type="hidden" name="tglKembali" value="<? echo $tglKembali;?>"><? echo $tglKembali;?></td>
+</tr>
+
+<tr valign="center">
+<td align="left" colspan="3">
+ <table align="left" border="1" cellpadding="2" cellspacing="0" style="font-family:arial;color:black;font-size:12px;">
+ <?
+ for($i=0;$i<$count;$i++){
+ echo "<tr><td>";
+ echo "<select name=isbn$i >";
+ $buku=mysql_query("select * from buku");
+ while($w=mysql_fetch_array($buku)){
+ echo "<option value=$w[0]>$w[1]</option>";
+ }
+ echo "</select>";
+ echo "</td><td width=20>";
+ echo "<input type=hidden value=1 name=jml$i />1";
+ echo "</td></tr>";
+ }
+ ?>
+ </table>
+</td>
+</tr>
+
+
+<tr valign="top">
+<td align="center" colspan="3">
+ <input type="submit" name="submit" value="submit">
+ <input type="reset" name="reset" value="reset">
+ <input type="hidden" name="admin" value=<? echo $admin;?>>
+ <input type="hidden" name="count" value=<? echo $count;?>>
+</td>
+
+</tr>
+<tr>
+<td colspan="3"><iframe width="100%" name="thetarget" height="100" frameborder="0" scrolling="auto"></iframe></td>
+</tr>
+</form>
+
+</body>
+</html>
77 formPenerbit.php
@@ -0,0 +1,77 @@
+<?
+ include 'koneksi.php';
+
+ session_start();
+ $admin=$_GET['admin'];
+ if($admin!=''){
+ $select_admin=mysql_query("select * from admin where id = '$admin'");
+ $count=mysql_num_rows($select_admin);
+ if($count>0){
+ $row=mysql_fetch_array($select_admin);
+ if(session_is_registered($row[1]) && session_is_registered($row[2]) && $row[3]="ADM"){
+ $idPenerbit = $_GET['idPenerbit'];
+ $select_penerbit=mysql_query("select * from penerbit where id_penerbit='$idPenerbit'");
+ $dtPenerbit=mysql_fetch_array($select_penerbit);
+ }else {
+ header('location:index.php?pg=notadmin');
+ }
+ } else {
+ header('location:index.php?pg=sessionFailed');
+ }
+ }
+
+
+?>
+<html>
+<head>
+<title>Form Penerbit</title>
+</head>
+<body>
+
+<table width="400" align="left" border="0" cellpadding="5" cellspacing="0" style="font-family:arial;color:black;font-size:12px;">
+<form method="post" action="savePenerbit.php" target="thetarget">
+<tr valign="center">
+<td align="left">KODE</td>
+<td align="center">:</td>
+<td ><input type="text" name="kode" maxlength="8" <? if(mysql_num_rows($select_penerbit)==1) echo "value=$dtPenerbit[0]";?>></td>
+</tr>
+
+<tr valign="center">
+<td align="left">NAMA</td>
+<td align="center">:</td>
+<td ><input type="text" name="nama" value="<? if(mysql_num_rows($select_penerbit)==1) echo $dtPenerbit[1];?>"></td>
+</tr>
+
+<tr valign="center">
+<td align="left">ALAMAT</td>
+<td align="center">:</td>
+<td ><input type="text" name="address" value="<? if(mysql_num_rows($select_penerbit)==1) echo $dtPenerbit[4];?>"></td>
+</tr>
+
+<tr valign="center">
+<td align="left">EMAIL</td>
+<td align="center">:</td>
+<td ><input type="text" name="email" value="<? if(mysql_num_rows($select_penerbit)==1) echo $dtPenerbit[2];?>"></td>
+</tr>
+
+<tr valign="center">
+<td align="left">TELEPON</td>
+<td align="center">:</td>
+<td ><input type="text" name="telp" value="<? if(mysql_num_rows($select_penerbit)==1) echo $dtPenerbit[3];?>"></td>
+</tr>
+
+<tr valign="top">
+<td align="center" colspan="3">
+ <input type="submit" name="submit" value="submit">
+ <input type="reset" name="reset" value="reset">
+ <input type="hidden" name="admin" value=<? echo $admin;?>>
+</td>
+
+</tr>
+<tr>
+<td colspan="3"><iframe width="100%" name="thetarget" height="100" frameborder="0" scrolling="auto"></iframe></td>
+</tr>
+</form>
+
+</body>
+</html>
77 formPengarang.php
@@ -0,0 +1,77 @@
+<?
+ include 'koneksi.php';
+
+ session_start();
+ $admin=$_GET['admin'];
+ if($admin!=''){
+ $select_admin=mysql_query("select * from admin where id = '$admin'");
+ $count=mysql_num_rows($select_admin);
+ if($count>0){
+ $row=mysql_fetch_array($select_admin);
+ if(session_is_registered($row[1]) && session_is_registered($row[2]) && $row[3]="ADM"){
+ $idPengarang = $_GET['idPengarang'];
+ $select_pengarang=mysql_query("select * from pengarang where id_pengarang='$idPengarang'");
+ $dtPengarang=mysql_fetch_array($select_pengarang);
+ }else {
+ header('location:index.php?pg=notadmin');
+ }
+ } else {
+ header('location:index.php?pg=sessionFailed');
+ }
+ }
+
+
+?>
+<html>
+<head>
+<title>Form Pengarang</title>
+</head>
+<body>
+
+<table width="550" align="left" border="0" cellpadding="5" cellspacing="0" style="font-family:arial;color:black;font-size:12px;">
+<form method="post" action="savePengarang.php" target="thetarget">
+<tr valign="center">
+<td align="left">KODE</td>
+<td align="center">:</td>
+<td ><input type="text" name="kode" maxlength="8" <? if(mysql_num_rows($select_pengarang)==1) echo "value=$dtPengarang[0]";?>></td>
+</tr>
+
+<tr valign="center">
+<td align="left">NAMA</td>
+<td align="center">:</td>
+<td ><input type="text" name="nama" value="<? if(mysql_num_rows($select_pengarang)==1) echo $dtPengarang[1];?>"></td>
+</tr>
+
+<tr valign="center">
+<td align="left">ALAMAT</td>
+<td align="center">:</td>
+<td ><input type="text" name="address" value="<? if(mysql_num_rows($select_pengarang)==1) echo $dtPengarang[4];?>"></td>
+</tr>
+
+<tr valign="center">
+<td align="left">EMAIL</td>
+<td align="center">:</td>
+<td ><input type="text" name="email" value="<? if(mysql_num_rows($select_pengarang)==1) echo $dtPengarang[2];?>"></td>
+</tr>
+
+<tr valign="center">
+<td align="left">TELEPON</td>
+<td align="center">:</td>
+<td ><input type="text" name="telp" value="<? if(mysql_num_rows($select_pengarang)==1) echo $dtPengarang[3];?>"></td>
+</tr>
+
+<tr valign="top">
+<td align="center" colspan="3">
+ <input type="submit" name="submit" value="submit">
+ <input type="reset" name="reset" value="reset">
+ <input type="hidden" name="admin" value=<? echo $admin;?>>
+</td>
+
+</tr>
+<tr>
+<td colspan="3"><iframe width="100%" name="thetarget" height="100" frameborder="0" scrolling="auto"></iframe></td>
+</tr>
+</form>
+
+</body>
+</html>
81 formPengembalian.php
@@ -0,0 +1,81 @@
+<?
+ include 'koneksi.php';
+
+ session_start();
+ $admin=$_GET['admin'];
+ if($admin!=''){
+ $select_admin=mysql_query("select * from admin where id = '$admin'");
+ $count=mysql_num_rows($select_admin);
+ if($count>0){
+ $row=mysql_fetch_array($select_admin);
+ if(session_is_registered($row[1]) && session_is_registered($row[2]) && $row[3]="ANG"){
+ $idPinjam = $_GET['idPinjam'];
+ list($y, $m, $d) = explode("-", $_GET['tglKembali']);
+ $tglKembaliSeharusnya = mktime(0,0,0, $m, $d, $y);
+ $timeKembaliSebenarnya = mktime(0,0,0, date("m"), date("d"), date("Y") );
+ $tglKembaliSebenarnya = date("Y-m-d");
+
+ //untuk menghitung denda hitung dulu telat harinya
+ //kalau lebih dari 0 kalikan dengan nilai denda yang ada di table config
+ $selectConfig = mysql_query("select dendaPerHari from config");
+ $value = mysql_fetch_array($selectConfig);
+ $denda = 0;
+ $telat = 0;
+ if($timeKembaliSebenarnya > $tglKembaliSeharusnya){
+ $telat = round(abs($timeKembaliSebenarnya - $tglKembaliSeharusnya) / 86400);
+ }
+ $denda = $value[0] * $telat;
+ }else {
+ header('location:index.php?pg=notadmin');
+ }
+ } else {
+ header('location:index.php?pg=sessionFailed');
+ }
+ }
+
+
+?>
+<html>
+<head>
+<title>Form Pengembalian</title>
+</head>
+<body>
+
+<table width="550" align="left" border="0" cellpadding="5" cellspacing="0" style="font-family:arial;color:black;font-size:12px;">
+<form method="post" action="savePengembalian.php" target="thetarget">
+<tr valign="center">
+<td align="left" width="80">ID PINJAM</td>
+<td align="center" width="6">:</td>
+<td ><? echo $idPinjam;?>
+ <input type="hidden" name="idPinjam" value="<? echo $idPinjam;?>"></td>
+</tr>
+
+<tr valign="center">
+<td align="left" width="80">TGL KEMBALI</td>
+<td align="center" width="6">:</td>
+<td ><? echo $tglKembaliSebenarnya;?>
+<input type="hidden" name="tglKembali" value="<? echo $tglKembaliSebenarnya;?>"></td>
+</tr>
+
+<tr valign="center">
+<td align="left" width="80">DENDA</td>
+<td align="center" width="6">:</td>
+<td ><? echo $denda;?>
+ <input type="hidden" name="denda" value="<? echo $denda;?>"></td>
+</tr>
+
+<tr valign="top">
+<td align="left" colspan="3">
+ <input type="submit" name="submit" value="submit">
+ <input type="reset" name="reset" value="reset">
+ <input type="hidden" name="admin" value=<? echo $admin;?>>
+</td>
+
+</tr>
+<tr>
+<td colspan="3"><iframe width="100%" name="thetarget" height="100" frameborder="0" scrolling="auto"></iframe></td>
+</tr>
+</form>
+
+</body>
+</html>
65 formUpdateStok.php
@@ -0,0 +1,65 @@
+<?
+ include 'koneksi.php';
+
+ session_start();
+ $admin=$_GET['admin'];
+ if($admin!=''){
+ $select_admin=mysql_query("select * from admin where id = '$admin'");
+ $count=mysql_num_rows($select_admin);
+ if($count>0){
+ $row=mysql_fetch_array($select_admin);
+ if(session_is_registered($row[1]) && session_is_registered($row[2]) && $row[3]="ADM"){
+ $idBuku = $_GET['idBuku'];
+ $select_buku=mysql_query("select * from buku where isbn='$idBuku'");
+ $dtBuku=mysql_fetch_array($select_buku);
+ }else {
+ header('location:index.php?pg=notadmin');
+ }
+ } else {
+ header('location:index.php?pg=sessionFailed');
+ }
+ }
+
+
+?>
+<html>
+<head>
+<title>Form Update Stok</title>
+</head>
+<body>
+
+<table width="400" align="left" border="0" cellpadding="5" cellspacing="0" style="font-family:arial;color:black;font-size:12px;">
+<form method="post" action="updateStok.php" target="thetarget">
+<tr valign="center">
+<td align="left">ISBN</td>
+<td align="center">:</td>
+<td ><input type="text" name="isbn" maxlength="25" <? if(mysql_num_rows($select_buku)==1) echo "value=$dtBuku[0]";?>></td>
+</tr>
+
+<tr valign="center">
+<td align="left">JUDUL</td>
+<td align="center">:</td>
+<td ><input type="text" name="judul" value="<? if(mysql_num_rows($select_buku)==1) echo $dtBuku[1];?>" ></td>
+</tr>
+
+<tr valign="center">
+<td align="left">STOK</td>
+<td align="center">:</td>
+<td ><input type="text" name="stok" value="<? if(mysql_num_rows($select_buku)==1) echo $dtBuku[6];?>"></td>
+</tr>
+
+<tr valign="top">
+<td align="center" colspan="3">
+ <input type="submit" name="submit" value="submit">
+ <input type="reset" name="reset" value="reset">
+ <input type="hidden" name="admin" value=<? echo $admin;?>>
+</td>
+
+</tr>
+<tr>
+<td colspan="3"><iframe width="100%" name="thetarget" height="100" frameborder="0" scrolling="auto"></iframe></td>
+</tr>
+</form>
+
+</body>
+</html>
BIN  foto_profile/pusio-gmail-tux.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
16 home.php
@@ -0,0 +1,16 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
+<title>Untitled Document</title>
+<style type="text/css">
+<!--
+.style3 {font-family: "Times New Roman", Times, serif}
+-->
+</style>
+</head>
+
+<body>
+<span class="style3">Assalammualaikum mengingat perkembangan Zaman memang generasi muda saat ini lebih kreatif untuk mencari ilmu, sehingga mereka mempunyai SDM yang sangat kuat maka dari itu disini menciptakan web perpustakaan online dengan itu para user dapat mencari ilmu dengan mudah.....</span>
+</body>
+</html>
BIN  images/23.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
BIN  images/Books.JPG
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
BIN  images/Buku-Perpustakaan_main.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
BIN  images/GEMBOK.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
BIN  images/Jantung_Sekolah1.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
BIN  images/L_is_for_Library_cover.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
BIN  images/Thumbs.db
Binary file not shown
BIN  images/WB01292_.GIF
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
BIN  images/arrow.gif
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
BIN  images/back.gif
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
BIN  images/bg.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
BIN  images/book sale.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
BIN  images/book3.gif
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
BIN  images/book_stack.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
BIN  images/books1.gif
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
BIN  images/books3.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
BIN  images/comment.gif
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
BIN  images/fb005.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
BIN  images/finance.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
BIN  images/finance1.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
BIN  images/footer.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
BIN  images/header.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
BIN  images/images.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
BIN  images/images2.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
BIN  images/images3.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
BIN  images/laptop1.jpg
Diff not rendered
BIN  images/laptsop1.jpg
Diff not rendered
BIN  images/leftbg.jpg
Diff not rendered
BIN  images/library011.jpg
Diff not rendered
BIN  images/library_clipart3.gif
Diff not rendered
BIN  images/login-welcome.JPG
Diff not rendered
BIN  images/more.gif
Diff not rendered
BIN  images/perpus-sekolah.gif
Diff not rendered
BIN  images/perpustakaanl2.jpg
Diff not rendered
BIN  images/pile-of-books.jpg
Diff not rendered
BIN  images/public library.jpg
Diff not rendered
BIN  images/self_help_library_home.jpg
Diff not rendered
BIN  images/smk2.gif
Diff not rendered
BIN  images/spport.gif
Diff not rendered
81 images/style.css
@@ -0,0 +1,81 @@
+/*
+
+LGBlue Free Template
+By Herreman David
+http://www.free-css-templates.com
+
+*/
+
+body { margin:5px 0; padding:0; font: 74% Arial, Sans-Serif; color:#000; line-height: 1.4em; background-color:#999;}
+.content { color: #505050; margin: 0 auto; padding: 0; width: 791px; background: #FFFFFF url(bg.jpg) repeat-y center; }
+
+#toph { background: #F0F0F0 url(top.jpg) no-repeat center top; height: 14px; margin: 0; padding: 0;}
+#header { color: #FFF; padding: 0 15px 0 15px; line-height: 1.0em; }
+ #header .rside { background: #125E81 url(header.jpg) no-repeat; color: #337493; float: right; height: 129px; width: 587px; font-size: 90%; }
+ #header .citation { text-align: right; padding: 60px 25px 25px 6px; color: #f0f0f0;}
+ #header .lside { /*background: #FFB424;*/background: #125E81 url(header.jpg) no-repeat;
+ color: #FFF; height: 129px; width: 174px; padding: 0; margin: 0; float: left; }
+ #header h2 { background-color: inherit; color: #FFF; letter-spacing: 1px; }
+ #header .title { text-align: center; padding-top: 30px;}
+
+#main { margin: 0 20px 0 15px; }
+#main h2 { background-color: inherit; color: #156184; line-height: 0.2em; }
+#main h3 { font: 85% Arial, Sans-Serif; margin: 0 0 10px 0; padding: 0; color: #5f5f5f; background: inherit; }
+.center { background: #FFF; width: 540px !important; width: 535px; float: right; margin: 15px; }
+.leftmenu { background: #FFF url(leftbg.jpg) repeat-x; width: 174px; float: left; padding: 0; margin: 0; }
+.padding { padding: 15px 0px 0px 20px; }
+
+.img { background: #FFF; float: left; padding: 1px; margin: 5px 8px 5px 0; color: #333; border: 1px solid #e0e0e0; }
+
+/* FOOTER */
+#footer { background: #FFF url(footer.jpg) no-repeat; color: #a0a0a0; height: 43px; text-align: center; font-size: 90%; clear: both; padding: 0px; margin: 0;}
+#footer hr { width: 740px; color: #888; border: 1px solid #f0f0f0; margin: 0 25px 0 25px; }
+#footer a { color: #999; background: #FFF; text-decoration:none; }
+#footer a:hover { background: #FFF; text-decoration: underline; color: #444;}
+
+/* NAVIGATION */
+.nav { clear: both; text-align: left; font-size: 13; color: #7D8085; padding: 10px 0 0 0; }
+.nav li { font-weight: bold; margin: 0 0 8px 0; padding: 0 0 0 10px; border-bottom: 1px solid #ccc; }
+.nav li a { color: #546078; text-decoration: none; }
+.nav li a:hover { color: #F29900; text-decoration: none; }
+
+
+.boxads { background: #E7EDF0; padding: 5px; border: 1px solid #999; color: #333; }
+
+/* ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------*/
+
+p { margin: 0 0 5px 0; padding: 0; color: #555; background: inherit; }
+
+hr { border: 0; height: 1px; color: #eee; background-color: #eee; }
+a { color: #0F5B7F; background: inherit; text-decoration:none; }
+a:hover { background: inherit; text-decoration: underline; }
+h1 { padding:0; margin:0; color: #0F5B7F; background: inherit;font: bold 1.8em Arial, Sans-Serif; letter-spacing: -1px; }
+h1 a {color: #0F5BFF; background: inherit;}
+h2 { background-color: inherit; color:#0F5B7F; font-size:140%; font-weight:bold; margin: 10px 0 10px 0; padding:0; }
+h2 a { color: #0F5B7F; }
+h2 a:hover { color: #0F5BAF; text-decoration: none;}
+
+ul { margin: 5px 0 20px 15px; padding : 0; list-style : none; }
+li { list-style-type: none; color: #F29900; margin: 0 0 0px 0; padding: 0 0 0 0px; }
+li a { color: #546078; }
+li a:hover { color: #F29900; }
+
+/*----------------- for snews --------------------------*/
+
+fieldset { border: 1px solid #eee; }
+textarea.text { height: 150px; width: 90%; border: 1px solid #ccc; background: #fff; color: #000; }
+textarea.text:hover { border: 1px solid #eee; background: #FFFFF4; color: #000; }
+input.field { border: 1px solid #ccc; background-color: #3C3C3C; width: 100px; color: #000; }
+input.field:hover { border: 1px solid #eee; background: #ccc; color: #000; }
+input.text { margin: 0; width: 110px; border: 1px solid #546078; background: #FFF; color: #808080; }
+input.text:hover { border: 1px solid #3a4354; }
+input.searchbutton { margin: 0; font-size: 100%; font-family: Arial, Sans-serif; border: none; background: #FFFFFF; color: #333; padding: 1px; font-weight: bold; }
+.date { color: #505050; background: #FFF; text-align: right; margin: 4px 0 5px 0; padding: 0.4em 0 0 0; border-top: 1px solid #ddd; }
+.date a { color: #546078; }
+input.button { background: #FFFFF4; color: #808080; border-right: 1px solid #ccc; border-bottom: 1px solid #ccc; }
+.comments { padding: 10px 10px 8px 10px; margin: 0 0 7px 0; background: #FFF; color: #333; }
+.commentsbox { padding: 8px 0 10px 10px; margin: 0 0 10px 0; background: #f4f4f4; color: #000; }
+.error { color: #990000; background-color: #FFF0F0; padding: 7px; margin-top: 5px; margin-bottom: 10px; border: 1px dashed #990000; }
+.error h2 { color: #990000; background: inherit; }
+.success { color: #000000; background: #FAFAFA; padding: 7px; margin-top: 5px; margin-bottom: 5px; border: 1px dashed #546078; }
+.success h2 { color: #546078; background: inherit; }
89 images/style_3c.css
@@ -0,0 +1,89 @@
+/*
+
+LGBlue3c Free Template
+By Herreman David
+http://www.free-css-templates.com
+
+*/
+
+body { margin:5px 0; padding:0; font: 74% Arial, Sans-Serif; color:#000; line-height: 1.4em; background : #F0F0F0;}
+.content { color: #505050; margin: 0 auto; padding: 0; width: 791px; background: #FFFFFF url(bg.jpg) repeat-y center; }
+
+#toph { background: #F0F0F0 url(top.jpg) no-repeat center top; height: 14px; margin: 0; padding: 0;}
+#header { color: #FFF; padding: 0 15px 0 15px; line-height: 1.0em; }
+ #header .rside { background: #125E81 url(header.jpg) no-repeat; color: #337493; float: right; height: 129px; width: 587px; font-size: 90%; }
+ #header .citation { text-align: right; padding: 60px 25px 25px 6px; color: #f0f0f0;}
+ #header .lside { background: #FFB424; color: #FFF; height: 129px; width: 174px; padding: 0; margin: 0; float: left; }
+ #header h2 { background-color: inherit; color: #FFF; letter-spacing: 1px; }
+ #header .title { text-align: center; padding-top: 30px;}
+
+#main { margin: 0 20px 0 15px; }
+#main h2 { background-color: inherit; color: #156184; line-height: 0.2em; }
+#main h3 { font: 85% Arial, Sans-Serif; margin: 0 0 10px 0; padding: 0; color: #5f5f5f; background: inherit; }
+.center { background: #FFF; width: 375px !important; width: 380px; float: right; margin: 15px 20px 5px 5px; border-right: 1px solid #f0f0f0; padding-right: 5px;}
+.leftmenu { background: #FFF url(leftbg.jpg) repeat-x; width: 174px; float: left; padding: 0; margin: 0; }
+.padding { padding: 15px; }
+
+.right_side {
+ float: right;
+ width: 165px;
+ background: #FFF;
+ padding: 15px 5px 3px 0px !important;
+ padding: 30px 5px 3px 0px;
+}
+
+
+.img { background: #FFF; float: left; padding: 1px; margin: 5px 8px 5px 0; color: #333; border: 1px solid #e0e0e0; }
+
+/* FOOTER */
+#footer { background: #FFF url(footer.jpg) no-repeat; color: #a0a0a0; height: 43px; text-align: center; font-size: 90%; clear: both; padding: 0px; margin: 0;}
+#footer hr { width: 740px; color: #888; border: 1px solid #f0f0f0; margin: 0 25px 0 25px; }
+#footer a { color: #999; background: #FFF; text-decoration:none; }
+#footer a:hover { background: #FFF; text-decoration: underline; color: #444;}
+
+/* NAVIGATION */
+.nav { clear: both; text-align: left; color: #7D8085; padding: 20px 0 0 0; }
+.nav li { font-weight: bold; margin: 0 0 8px 0; padding: 0 0 0 5px; border-bottom: 1px solid #ccc; }
+.nav li a { color: #546078; text-decoration: none; }
+.nav li a:hover { color: #F29900; text-decoration: none; }
+
+
+.boxads { background: #E7EDF0; padding: 5px; border: 1px solid #999; color: #333; }
+
+/* ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------*/
+
+p { margin: 0 0 5px 0; padding: 0; color: #555; background: inherit; }
+
+hr { border: 0; height: 1px; color: #eee; background-color: #eee; }
+a { color: #0F5B7F; background: inherit; text-decoration:none; }
+a:hover { background: inherit; text-decoration: underline; }
+h1 { padding:0; margin:0; color: #0F5B7F; background: inherit;font: bold 1.8em Arial, Sans-Serif; letter-spacing: -1px; }
+h1 a {color: #0F5BFF; background: inherit;}
+h2 { background-color: inherit; color:#0F5B7F; font-size:140%; font-weight:bold; margin: 10px 0 10px 0; padding:0; }
+h2 a { color: #0F5B7F; }
+h2 a:hover { color: #0F5BAF; text-decoration: none;}
+
+ul { margin: 5px 0 20px 15px; padding : 0; list-style : none; }
+li { list-style-type: none; color: #F29900; margin: 0 0 0px 0; padding: 0 0 0 0px; }
+li a { color: #546078; }
+li a:hover { color: #F29900; }
+
+/*----------------- for snews --------------------------*/
+
+fieldset { border: 1px solid #eee; }
+textarea.text { height: 150px; width: 90%; border: 1px solid #ccc; background: #fff; color: #000; }
+textarea.text:hover { border: 1px solid #eee; background: #FFFFF4; color: #000; }
+input.field { border: 1px solid #ccc; background-color: #3C3C3C; width: 100px; color: #000; }
+input.field:hover { border: 1px solid #eee; background: #ccc; color: #000; }
+input.text { margin: 0; width: 110px; border: 1px solid #546078; background: #FFF; color: #808080; }
+input.text:hover { border: 1px solid #3a4354; }
+input.searchbutton { margin: 0; font-size: 100%; font-family: Arial, Sans-serif; border: none; background: #FFFFFF; color: #333; padding: 1px; font-weight: bold; }
+.date { color: #505050; background: #FFF; text-align: right; margin: 4px 0 5px 0; padding: 0.4em 0 0 0; border-top: 1px solid #ddd; }
+.date a { color: #546078; }
+input.button { background: #FFFFF4; color: #808080; border-right: 1px solid #ccc; border-bottom: 1px solid #ccc; }
+.comments { padding: 10px 10px 8px 10px; margin: 0 0 7px 0; background: #FFF; color: #333; }
+.commentsbox { padding: 8px 0 10px 10px; margin: 0 0 10px 0; background: #f4f4f4; color: #000; }
+.error { color: #990000; background-color: #FFF0F0; padding: 7px; margin-top: 5px; margin-bottom: 10px; border: 1px dashed #990000; }
+.error h2 { color: #990000; background: inherit; }
+.success { color: #000000; background: #FAFAFA; padding: 7px; margin-top: 5px; margin-bottom: 5px; border: 1px dashed #546078; }
+.success h2 { color: #546078; background: inherit; }
BIN  images/timeicon.gif
Diff not rendered
BIN  images/tmc054.jpg
Diff not rendered
BIN  images/top.jpg
Diff not rendered
246 index.php
@@ -0,0 +1,246 @@
+<?
+ include 'koneksi.php';
+ session_start();
+ $admin=$_GET['admin'];
+ if($admin!=''){
+ $select_admin=mysql_query("select * from admin where id = '$admin'");
+ $count=mysql_num_rows($select_admin);
+ if($count>0){
+ $row=mysql_fetch_array($select_admin);
+ if(session_is_registered($row[1]) && session_is_registered($row[2])){
+ $type=$row[3];
+ } else {
+ header('location:index.php?pg=sessionFailed');
+ }
+ }
+ }
+?>
+<html>
+<head>
+<title>Pustaka Smekda</title>
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
+ <meta http-equiv="Content-Language" content="en-us" />
+ <meta http-equiv="imagetoolbar" content="no" />
+ <meta name="MSSmartTagsPreventParsing" content="true" />
+ <meta name="description" content="LGBlue Free Css Template" />
+ <meta name="keywords" content="free,css,template,business" />
+ <meta name="author" content="David Herreman (http://www.free-css-templates.com)" />
+ <style type="text/css" media="all">@import "images/style.css";</style>
+ <link rel="alternate" type="application/rss+xml" title="RSS 2.0" href="rss/" />
+ <style type="text/css">
+<!--
+.style3 {color: #FF9933}
+.style6 {
+ font-size: 200%;
+ font-weight: bold;
+ color: #FF9933;
+}
+.style7 {font-size: 140%}
+-->
+ </style>
+</head>
+
+<body>
+ <!--Table Utama-->
+ <div class="content">
+ <table align="center" width="791" height="800" border="0" cellspacing="0" cellpadding="0">
+ <tr height="1%"><!--baris table untuk header-->
+ <td colspan="2" width="100%">
+ <div id="toph"></div>
+ <div id="header">
+ <div class="rside">
+ <div class="citation">
+ <h2 class="style7">PERPUSTAKAAN SMK NEGERI 2 SURABAYA </h2>
+ <?php
+ $tgl=date('Y-m-d');
+ echo "Tanggal " ;echo date('d-m-Y');
+ echo "<br>";?>
+ </div>
+ </div>
+ <div class="lside" align="center">
+ <p>&nbsp;</p>
+ <p><img src="images/book3.gif" width="132" height="86" /></p>
+ </div>
+
+ </div>
+ </td>
+ </tr>
+
+ <tr rowspan="2" height="95%">
+ <div class="leftmenu">
+ <td width="20%" valign="top">
+ <div class="padding">
+ <form align="left" method="GET" action="index.php">
+ Cari Buku <br>
+ <input type="text" name="keyword" /><input type="hidden" name="pg" value="cari" />
+ <input type="submit" name="btnCari" value="Go"/>
+ </form>
+ </div>
+ <div class="nav">
+ <ul>
+ <? if($type=="ADM"){
+ echo "<li><a href=index.php?pg=profile&admin=$admin>Profile</a></li>";
+ echo "<li><a href=index.php?pg=penerbit&admin=$admin>Penerbit</a></li>";
+ echo "<li><a href=index.php?pg=pengarang&admin=$admin>Pengarang</a></li>";
+ echo "<li><a href=index.php?pg=katalog&admin=$admin>Katalog</a></li>";
+ echo "<li><a href=index.php?pg=buku&admin=$admin>Buku</a></li>";
+ echo "<li><a href=index.php?pg=stokBuku&admin=$admin>Input Stok Buku</a></li>";
+ echo "<li><a href=index.php?pg=config&admin=$admin>Konfigurasi</a></li>";
+ echo "<li><a href=index.php?pg=logout&admin=$admin>Logout</a></li>";
+ } else if($type=="ANG"){
+ echo "<li><a href=index.php?pg=profile&admin=$admin>Profile</a></li>";
+ echo "<li><a href=index.php?pg=viewbook&admin=$admin>Lihat Data Buku</a></li>";
+ echo "<li><a href=index.php?pg=peminjaman&admin=$admin>Transaksi Peminjaman</a></li>";
+ echo "<li><a href=index.php?pg=pengembalian&admin=$admin>Transaksi Pengembalian</a></li>";
+ echo "<li><a href=index.php?pg=logout&admin=$admin>Logout</a></li>";
+ } else {
+ echo "<li><a href=index.php?pg=beranda&admin=$admin>Beranda</a></li>";
+ echo "<li><a href=index.php?pg=profil&admin=$admin>Profil</a></li>";
+ echo "<li><a href=index.php?pg=viewbook&admin=$admin>Lihat Data Buku</a></li>";
+ echo "<li><a href=index.php?pg=login&admin=$admin>Login</a></li>";
+ echo "<li><a href=index.php?pg=register&admin=$admin>Register</a></li>";
+ }?>
+ </ul><br>
+ </div>
+
+ </td>
+ </div>
+ <td width="80%" valign="top">
+ <div id="main">
+ <div class="center">
+ <!--Table untuk menu tengah (content)-->
+ <table align="center" width="100%" height="100%" border="0" cellspacing="0" cellpadding="0">
+ <tr height="97%">
+ <td valign="top" width="100%">
+ <?
+ $pg=$_GET['pg'];
+ switch($pg){
+ case 'home':
+ include 'home.php';
+ break;
+ case 'register':
+ include 'register.php';
+ break;
+ case 'viewbook':
+ include 'viewbook.php';
+ break;
+ case 'login':
+ include 'login.php';
+ break;
+ case 'cari':
+ include 'searching.php';
+ break;
+ case 'logout':
+ include 'logout.php';
+ break;
+ case 'profile':
+ include 'profile.php';
+ break;
+ case 'sessionFailed';
+ include 'sessionFailed.php';
+ break;
+ case 'pengarang';
+ include 'listPengarang.php';
+ break;
+ case 'penerbit';
+ include 'listPenerbit.php';
+ break;
+ case 'katalog';
+ include 'listKatalog.php';
+ break;
+ case 'buku';
+ include 'listBuku.php';
+ break;
+ case 'notadmin';
+ include 'notadmin.php';
+ break;
+ case 'notmember';
+ include 'notmember.php';
+ break;
+ case 'formPenerbit';
+ include 'formPenerbit.php';
+ break;
+ case 'deletePenerbit';
+ include 'deletePenerbit.php';
+ break;
+ case 'formKatalog';
+ include 'formKatalog.php';
+ break;
+ case 'deleteKatalog';
+ include 'deleteKatalog.php';
+ break;
+ case 'formPengarang';
+ include 'formPengarang.php';
+ break;
+ case 'deletePengarang';
+ include 'deletePengarang.php';
+ break;
+ case 'formBuku';
+ include 'formBuku.php';
+ break;
+ case 'deleteBuku';
+ include 'deleteBuku.php';
+ break;
+ case 'beranda';
+ include 'beranda.php';
+ break;
+ case 'profil';
+ include 'profil.php';
+ break;
+ case 'config';
+ include 'config.php';
+ break;
+ case 'stokBuku';
+ include 'listStok.php';
+ break;
+ case 'formUpdateStok';
+ include 'formUpdateStok.php';
+ break;
+ case 'peminjaman';
+ include 'formPeminjaman.php';
+ break;
+ case 'pengembalian';
+ include 'listPeminjaman.php';
+ break;
+ case 'formPengembalian';
+ include 'formPengembalian.php';
+ break;
+ default:
+ include 'beranda.php';
+ break;
+ }
+ ?>
+ <!--<iframe name="content" src="content.php" width="100%" height="100%" scrolling="auto" />-->
+ </td>
+ </tr>
+ <tr>
+ <td colspan="5">
+ <p class="date"><br /></p>
+ <div class="boxads">
+ <div align="center">
+ <p><span class="style6">Support By :</span></p>
+ <p align="center"><marquee><img src="images/spport.gif" width="586" height="129"></marquee></p>
+ </div>
+ </div>
+ <h3><br /><br /></h3>
+ <div align="center"></div>
+ </td>
+ </tr>
+ </div>