• Tidak ada hasil yang ditemukan

Perancangan Aplikasi Sistem Informasi Manajemen Aset Sekolah Berbasis Web

N/A
N/A
Protected

Academic year: 2017

Membagikan "Perancangan Aplikasi Sistem Informasi Manajemen Aset Sekolah Berbasis Web"

Copied!
15
0
0

Teks penuh

(1)

LAMPIRAN

LISTING PROGRAM

1.

index.php

<?php

session_start();

include_once "library/inc.connection.php"; include_once "library/inc.library.php"; include_once "library/inc.pilihan.php";

// Baca Jam pada Komputer

date_default_timezone_set("Asia/Jakarta"); ?>

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

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />

<title>:: Aplikasi Sistem Manajemen Aset Sekolah</title>

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

href="plugins/tigra_calendar/tcal.css"/> <script type="text/javascript"

src="plugins/tigra_calendar/tcal.js"></script> <style type="text/css">

<!--

.style1 {font-family: Geneva, Arial, Helvetica, sans-serif} -->

</style> </head>

<div id="wrap"> <body>

<table width="100%" class="table-main"> <tr>

<td height="103" colspan="2" align="center"><a href="?page"><div id="header"></div>

</a></td> </tr>

<tr valign="top">

<td width="15%" style="border-right:5px solid #DDDDDD;"><div class="style1" style="margin:5px; padding:5px;"><?php include "menu.php"; ?></div></td>

<td width="69%" height="550"><div class="style1" style="margin:5px; padding:5px;"><?php include "buka_file.php";?></div></td>

(2)

2.

login.php

<div><center>

<form name="logForm" method="post" action="?page=Login-Validasi"> <table class="table-common" width="500" border="0" cellpadding="2" cellspacing="1" bgcolor="#999999">

<tr>

<td width="106" rowspan="5" align="center"

bgcolor="#FFFFFF"><img src="images/login-key.jpg" width="116" height="75" /></td>

<th colspan="2" bgcolor="#CCCCCC"><b>LOGIN SYSTEM </b></td> </tr>

<tr>

<td width="117" bgcolor="#FFFFFF"><b>Username</b></td> <td width="263" bgcolor="#FFFFFF"><b>:

<input name="txtUser" type="text" size="30" maxlength="20" /> </b></td>

</tr> <tr>

<td bgcolor="#FFFFFF"><b>Password</b></td> <td bgcolor="#FFFFFF"><b>:

<input name="txtPassword" type="password" size="30" maxlength="20" />

</b></td> </tr>

<tr>

<td bgcolor="#FFFFFF"><b>Level Akses </b></td> <td bgcolor="#FFFFFF"><b>:

<select name="cmbLevel">

<option value="KOSONG">....</option> <?php

$pilihan = array("Admin", "Kepala Sekolah"); foreach ($pilihan as $nilai) {

if ($_POST['cmbLevel']==$nilai) { $cek="selected";

} else { $cek = ""; }

echo "<option value='$nilai' $cek>$nilai</option>"; }

?>

</select> </b></td>

</tr> <tr>

<td bgcolor="#FFFFFF">&nbsp;</td>

<td bgcolor="#FFFFFF"><input type="submit" name="btnLogin" value=" Login " /></td>

</tr> </table> </form>

(3)

3.

main.php

<?php

if(isset($_SESSION['SES_ADMIN'])) { echo "<h2>Selamat datang !</h2>"; echo "<b> Anda login sebagai Admin"; exit;

}

else if(isset($_SESSION['SES_Kepala Sekolah'])) { echo "<h2>Selamat datang !</h2>";

echo "<b> Anda login sebagai Kepala Sekolah"; include "login_info.php";

exit; }

else {

echo "<h2>Selamat datang !</h2>";

echo "<b>Anda belum login, silahkan <a href='?page=Login' alt='Login'>login </a>untuk mengakses sitem ini ";

} ?>

4.

menu.php

<?php

if(isset($_SESSION['SES_ADMIN'])){

# JIKA YANG LOGIN LEVEL ADMIN, menu di bawah yang dijalankan ?>

<ul>

<li><a href='?page' title='Halaman Utama'>Home</a></li>

<li><a href='?page=User-Data' title='User Login'>Data User</a></li> <li><a href='?page=Supplier-Data' title='Supplier'>Data

Supplier</a></li>

<li><a href='?page=Kategori-Data' title='Data Kategori'>Data Kategori</a> </li>

<li><a href='?page=Barang-Data' title='Menu'>Data Inventaris </a></li>

<li><a href='?page=Pencarian-Barang' title='Pencarian'>Pencarian Barang</a></li>

<li><a href='pembelian/' title='Transaksi Pembelian' target='_blank'>Registrasi Barang Masuk </a> </li>

<li><a href='penjualan/' title='Transaksi Penjualan' target='_blank'>Registrasi Barang Rusak </a></li>

<li><a href='?page=Laporan' title='Laporan'>Laporan</a></li> <li><a href='?page=Logout' title='Logout (Exit)'>Logout</a></li> </ul>

<?php }

elseif(isset($_SESSION['SES_Kepala Sekolah'])){

# JIKA YANG LOGIN LEVEL KEPALA SEKOLAH, menu di bawah yang dijalankan ?>

<ul>

<li><a href='?page' title='Halaman Utama'>Home</a></li> <li><a href='?page=Barang-Data' title='Menu'>Data Inventaris </a></li>

<li><a href='?page=Pencarian-Barang' title='Pencarian'>Pencarian Barang</a></li>

(4)

</ul> <?php } else {

# JIKA BELUM LOGIN (BELUM ADA SESION LEVEL YG DIBACA) ?>

<ul>

<li><a href='?page=Login' title='Login System'>Login</a></li> </ul>

<?php } ?>

5.

buka_file.php

<?php

# KONTROL MENU PROGRAM if($_GET) {

// Jika mendapatkan variabel URL ?page switch($_GET['page']){

case '' :

if(!file_exists ("main.php")) die ("Empty Main Page!"); include "main.php"; break;

case 'Halaman-Utama' :

if(!file_exists ("main.php")) die ("Sorry Empty Page!"); include "main.php"; break;

case 'Login' :

if(!file_exists ("login.php")) die ("Sorry Empty Page!"); include "login.php"; break;

Page!");

Page!");

Page!");

Page!");

Page!");

Page!");

case 'Login-Validasi' :

if(!file_exists ("login_validasi.php")) die ("Sorry Empty

include "login_validasi.php"; break;

case 'Logout' :

if(!file_exists ("login_out.php")) die ("Sorry Empty

include "login_out.php"; break;

# USER LOGIN (Admin, Kepala Sekolah) case 'User-Data' :

if(!file_exists ("user_data.php")) die ("Sorry Empty

include "user_data.php"; break;

case 'User-Add' :

if(!file_exists ("user_add.php")) die ("Sorry Empty

include "user_add.php"; break; case 'User-Delete' :

if(!file_exists ("user_delete.php")) die ("Sorry Empty

include "user_delete.php"; break; case 'User-Edit' :

(5)

include "user_edit.php"; break;

Page!");

Page!");

# KATEGORI / PENGELOMPOKAN JENIS BARANG case 'Kategori-Data' :

if(!file_exists ("kategori_data.php")) die ("Sorry Empty

include "kategori_data.php"; break; case 'Kategori-Add' :

if(!file_exists ("kategori_add.php")) die ("Sorry Empty

include "kategori_add.php"; break; case 'Kategori-Delete' :

if(!file_exists ("kategori_delete.php")) die ("Sorry Empty Page!");

include "kategori_delete.php"; break;

Page!");

Page!");

Page!");

Page!");

Page!");

case 'Kategori-Edit' :

if(!file_exists ("kategori_edit.php")) die ("Sorry Empty

include "kategori_edit.php"; break;

# BARANG / PRODUK YANG DIJUAL case 'Barang-Data' :

if(!file_exists ("barang_data.php")) die ("Sorry Empty

include "barang_data.php"; break; case 'Barang-Add' :

if(!file_exists ("barang_add.php")) die ("Sorry Empty

include "barang_add.php"; break; case 'Barang-Delete' :

if(!file_exists ("barang_delete.php")) die ("Sorry Empty

include "barang_delete.php"; break; case 'Barang-Edit' :

if(!file_exists ("barang_edit.php")) die ("Sorry Empty

include "barang_edit.php"; break;

case 'Pencarian-Barang' :

if(!file_exists ("pencarian_barang.php")) die ("Sorry Empty Page!");

include "pencarian_barang.php"; break;

Page!");

Page!");

# SUPPLIER (PEMASOK) case 'Supplier-Data' :

if(!file_exists ("supplier_data.php")) die ("Sorry Empty

include "supplier_data.php"; break; case 'Supplier-Add' :

if(!file_exists ("supplier_add.php")) die ("Sorry Empty

include "supplier_add.php"; break;

case 'Supplier-Delete' :

if(!file_exists ("supplier_delete.php")) die ("Sorry Empty Page!");

include "supplier_delete.php"; break;

Page!");

case 'Supplier-Edit' :

if(!file_exists ("supplier_edit.php")) die ("Sorry Empty

(6)

Page!");

Page!");

# PELANGGAN (CUSTOMER) case 'Pelanggan-Data' :

if(!file_exists ("pelanggan_data.php")) die ("Sorry Empty

include "pelanggan_data.php"; break; case 'Pelanggan-Add' :

if(!file_exists ("pelanggan_add.php")) die ("Sorry Empty

include "pelanggan_add.php"; break; case 'Pelanggan-Delete' :

if(!file_exists ("pelanggan_delete.php")) die ("Sorry Empty Page!");

include "pelanggan_delete.php"; break;

Page!");

case 'Pelanggan-Edit' :

if(!file_exists ("pelanggan_edit.php")) die ("Sorry Empty

include "pelanggan_edit.php"; break;

# REPORT INFORMASI / LAPORAN DATA case 'Laporan' :

if(!file_exists ("menu_laporan.php")) die ("Sorry Empty Page!");

include "menu_laporan.php"; break;

# LAPORAN MASTER DATA (User, Supplier, Pelanggan, Kategori dan Barang)

case 'Laporan-User' :

if(!file_exists ("laporan_user.php")) die ("Sorry Empty Page!");

include "laporan_user.php"; break;

case 'Laporan-Supplier' :

if(!file_exists ("laporan_supplier.php")) die ("Sorry Empty Page!");

include "laporan_supplier.php"; break;

case 'Laporan-Pelanggan' :

if(!file_exists ("laporan_pelanggan.php")) die ("Sorry Empty Page!");

include "laporan_pelanggan.php"; break;

case 'Laporan-Kategori' :

if(!file_exists ("laporan_kategori.php")) die ("Sorry Empty Page!");

include "laporan_kategori.php"; break;

Empty Page!");

case 'Laporan-Barang' :

if(!file_exists ("laporan_barang.php")) die ("Sorry

include "laporan_barang.php"; break;

case 'Laporan-Barang-per-Kategori' :

if(!file_exists ("laporan_barang_kategori.php")) die ("Sorry Empty Page!");

include "laporan_barang_kategori.php"; break;

case 'Laporan-Barang-per-Supplier' :

if(!file_exists ("laporan_barang_supplier.php")) die ("Sorry Empty Page!");

(7)

# LAPORAN TRANSAKSI PEMBELIAN case 'Laporan-Pembelian' :

if(!file_exists ("laporan_pembelian.php")) die ("Sorry Empty Page!");

include "laporan_pembelian.php"; break;

case 'Laporan-Pembelian-per-Periode' :

if(!file_exists ("laporan_pembelian_periode.php")) die ("Sorry Empty Page!");

include "laporan_pembelian_periode.php"; break;

case 'Laporan-Pembelian-per-Supplier' :

if(!file_exists ("laporan_pembelian_supplier.php")) die ("Sorry Empty Page!");

include "laporan_pembelian_supplier.php"; break;

# LAPORAN TRANSAKSI PENJUALAN case 'Laporan-Penjualan' :

if(!file_exists ("laporan_penjualan.php")) die ("Sorry Empty Page!");

include "laporan_penjualan.php"; break;

case 'Laporan-Penjualan-per-Periode' :

if(!file_exists ("laporan_penjualan_periode.php")) die ("Sorry Empty Page!");

include "laporan_penjualan_periode.php"; break;

case 'Laporan-Penjualan-per-Pelanggan' : if(!file_exists

("laporan_penjualan_pelanggan.php")) die ("Sorry Empty Page!");

include "laporan_penjualan_pelanggan.php"; break;

case 'Laporan-Penjualan-per-Barang' :

if(!file_exists ("laporan_penjualan_barang.php")) die ("Sorry Empty Page!");

include "laporan_penjualan_barang.php"; break;

default:

if(!file_exists ("main.php")) die ("Empty Main Page!"); include "main.php";

break; }

} else {

// Jika tidak mendapatkan variabel URL : ?page

if(!file_exists ("main.php")) die ("Empty Main Page!"); include "main.php";

}

6.

barang_data.php

<?php

include_once "library/inc.seslogin.php"; include_once "library/inc.library.php";

# UNTUK PAGING (PEMBAGIAN HALAMAN) $row = 50;

(8)

$pageSql = "SELECT * FROM barang";

$pageQry = mysql_query($pageSql, $koneksidb) or die ("error paging: ".mysql_error());

$jml = mysql_num_rows($pageQry);

$max = ceil($jml/$row);

?>

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

.style1 {font-family: "Times New Roman", Times, serif} .style8 {

font-size: large; font-weight: bold; }

.style9 {font-family: "Times New Roman", Times, serif; font-size: large; }

.style10 {font-size: large} -->

</style>

<table width="900" border="0" cellpadding="2" cellspacing="1" class="style1">

<tr>

<td colspan="2" align="right"><h1><b>DATA INVENTARIS </b></h1></td> </tr>

<tr>

<td width="401"><a href="?page=Barang-Add" target="_self"><img src="images/btn_add_data.png" height="30" border="0" /></a></td>

<td width="488" align="right"></td> </tr>

<tr>

<td colspan="2">&nbsp;</td> </tr>

<tr>

<td colspan="2">

<table class="table-list" width="100%" border="0" cellspacing="1" cellpadding="2">

<tr class="style1">

<th width="27" align="center" class="style1"><span class="style8">No</span></th>

<th width="59" class="style1"><span class="style8">Kode</span></th>

<th width="120" class="style1"><span class="style8">Barcode</span></th>

<th width="351" class="style1"><div align="left" class="style8">Nama Barang</div></th>

<th width="68" class="style9">Jumlah</th>

<th width="128" class="style1"><div align="left" class="style8">Nilai (Rp)</div></th>

<td colspan="2" align="center" bgcolor="#CCCCCC" class="style1"><span class="style8">Tools</span></td>

</tr> <?php

$mySql = "SELECT * FROM barang ORDER BY kd_barang ASC LIMIT $hal, $row";

$myQry = mysql_query($mySql, $koneksidb) or die ("Query salah : ".mysql_error());

$nomor = 0;

while ($myData = mysql_fetch_array($myQry)) { $nomor++;

(9)

?>

<tr class="style1">

<td align="center" class="style1"><span class="style10"><?php echo $nomor; ?></span></td>

<td class="style1"><span class="style10"><?php echo $myData['kd_barang']; ?></span></td>

<td class="style1"><span class="style10"><?php echo $myData['barcode']; ?></span></td>

<td class="style1"><span class="style10"><?php echo $myData['nm_barang']; ?></span></td>

<td class="style1"><span class="style10"><?php echo $myData['stok']; ?></span></td>

<td align="left" class="style1"><span class="style10"><?php echo format_angka($myData['harga_beli']); ?></span></td>

<td width="46" align="center" class="style1"><a

href="?page=Barang-Edit&amp;Kode=<?php echo $Kode; ?>" target="_self" class="style10" alt="Edit Data">Edit</a></td>

<td width="54" align="center" class="style1"><a

href="?page=Barang-Delete&amp;Kode=<?php echo $Kode; ?>" target="_self" class="style10" onclick="return confirm('ANDA YAKIN AKAN MENGHAPUS DATA INI ?')" alt="Delete Data">Delete</a></td>

</tr> <?php } ?> </table></td> </tr>

<tr class="selKecil">

<td><b>Jumlah Data :</b> <?php echo $jml; ?> </td> <td align="right"><b>Halaman ke :</b>

<?php

for ($h = 1; $h <= $max; $h++) { $list[$h] = $row * $h - $row;

echo " <a href='?page=Barang-Data&hal=$list[$h]'>$h</a> "; }

?> </td> </tr>

</table>

7.

kategori_data.php

<?php

include_once "library/inc.seslogin.php";

# UNTUK PAGING (PEMBAGIAN HALAMAN) $row = 50;

$hal = isset($_GET['hal']) ? $_GET['hal'] : 0; $pageSql = "SELECT * FROM kategori";

$pageQry = mysql_query($pageSql, $koneksidb) or die ("error: ".mysql_error());

$jml = mysql_num_rows($pageQry);

$max = ceil($jml/$row);

?>

<table width="800" border="0" cellpadding="2" cellspacing="1" class="table-border">

<tr>

<td colspan="2" align="right"><h1><b>DATA KATEGORI</b></h1></td> </tr>

(10)

<td colspan="2"><a href="?page=Kategori-Add" target="_self"><img src="images/btn_add_data.png" border="0" /></a></td>

</tr> <tr>

<td colspan="2">&nbsp;</td> </tr>

<tr>

<td colspan="2"><table class="table-list" width="100%" border="0" cellspacing="1" cellpadding="2">

<tr>

<th width="30" align="center"><b>No</b></th> <th width="530"><b>Nama Kategori </b></th>

<th width="120" align="center"><b>Qty Barang </b> </th> <td colspan="2" align="center"

bgcolor="#CCCCCC"><b>Tools</b><b></b></td> </tr>

<?php

// Menampilkan daftar kategori

$mySql = "SELECT * FROM kategori ORDER BY kd_kategori ASC LIMIT $hal, $row";

$myQry = mysql_query($mySql, $koneksidb) or die ("Query salah : ".mysql_error());

$nomor = 0;

while ($myData = mysql_fetch_array($myQry)) { $nomor++;

$Kode = $myData['kd_kategori'];

// Menghitung jumlah barang per Kategori

$my2Sql = "SELECT COUNT(*) As qty_barang FROM barang WHERE kd_kategori='$Kode'";

$my2Qry = mysql_query($my2Sql, $koneksidb) or die ("Query salah : ".mysql_error());

$my2Data = mysql_fetch_array($my2Qry); ?>

<tr>

<td align="center"><?php echo $nomor; ?></td> <td><?php echo $myData['nm_kategori']; ?></td>

<td align="center"><?php echo $my2Data['qty_barang']; ?></td> <td width="44" align="center">

<a href="?page=Kategori-Edit&Kode=<?php echo $Kode; ?>" target="_self" alt="Edit Data">

Edit</a></td>

<td width="44" align="center">

<a href="?page=Kategori-Delete&Kode=<?php echo $Kode; ?>" target="_self" alt="Delete Data" onclick="return confirm('ANDA YAKIN AKAN MENGHAPUS DATA KATEGORI INI ... ?')">

Delete</a></td> </tr>

<?php } ?> </table></td> </tr>

<tr class="selKecil">

<td><b>Jumlah Data :</b> <?php echo $jml; ?> </td> <td align="right"> <b>Halaman ke :</b>

<?php

for ($h = 1; $h <= $max; $h++) { $list[$h] = $row * $h - $row;

echo " <a href='?page=Kategori-Data&hal=$list[$h]'>$h</a> "; }

(11)

</tr> </table>

8.

menu_laporan.php

<ul>

<ul> <ul>

<li><a href="?page=Laporan-User">Laporan Data User</a></li> <li><a href="?page=Laporan-Supplier">Laporan Data

Supplier</a></li>

<li><a href="?page=Laporan-Kategori">Laporan Data Kategori</a></li>

<li><a href="?page=Laporan-Barang">Laporan Data Barang</a></li>

<li><a href="?page=Laporan-Barang-per-Kategori">Laporan Barang per Kategori</a></li>

<li><a href="?page=Laporan-Barang-per-Supplier">Laporan Barang per Supplier</a></li>

</ul> </ul>

</ul>

9.

pelanggan_data.php

<?php

include_once "library/inc.seslogin.php";

# UNTUK PAGING (PEMBAGIAN HALAMAN) $row = 50;

$hal = isset($_GET['hal']) ? $_GET['hal'] : 0; $pageSql = "SELECT * FROM pelanggan";

$pageQry = mysql_query($pageSql, $koneksidb) or die ("error paging: ".mysql_error());

$jml = mysql_num_rows($pageQry);

$max = ceil($jml/$row);

?>

<table width="692" border="0" cellpadding="2" cellspacing="1" class="table-border">

<tr>

<td colspan="2" align="right"><h1><b>DATA PELELANG </b></h1></td> </tr>

<tr>

<td colspan="2"><a href="?page=Pelanggan-Add" target="_self"><img src="images/btn_add_data.png" height="30" border="0" /></a></td>

</tr> <tr>

<td colspan="2">&nbsp;</td> </tr>

<tr>

<td colspan="2">

<table class="table-list" width="100%" border="0" cellspacing="1" cellpadding="2">

<tr>

(12)

<th width="287"><strong>Nama Pelanggan </strong></th> <th width="258"><strong>Alamat</strong></th>

<td colspan="2" align="center" bgcolor="#CCCCCC"><strong>Tools</strong></td>

</tr> <?php

$mySql = "SELECT * FROM pelanggan ORDER BY kd_pelanggan ASC LIMIT $hal, $row";

$myQry = mysql_query($mySql, $koneksidb) or die ("Query salah : ".mysql_error());

$nomor = 0;

while ($myData = mysql_fetch_array($myQry)) { $nomor++;

$Kode = $myData['kd_pelanggan']; ?>

<tr>

<td align="center"><?php echo $nomor; ?></td> <td><?php echo $myData['nm_pelanggan']; ?></td>

<td><?php echo $myData['alamat']; ?></td>

<td width="24" align="center"><a href="?page=Pelanggan- Edit&Kode=<?php echo $Kode; ?>" target="_self" alt="Edit

Data">Edit</a></td>

<td width="62" align="center"><a href="?page=Pelanggan- Delete&Kode=<?php echo $Kode; ?>" target="_self" alt="Delete Data" onclick="return confirm('ANDA YAKIN AKAN MENGHAPUS DATA INI

?')">Delete</a></td> </tr>

<?php } ?> </table></td> </tr>

<tr class="selKecil">

<td width="401"><b>Jumlah Data :</b> <?php echo $jml; ?> </td> <td width="280" align="right"><b>Halaman ke :</b>

<?php

for ($h = 1; $h <= $max; $h++) { $list[$h] = $row * $h - $row;

echo " <a href='?page=Pelanggan-Data&hal=$list[$h]'>$h</a> "; }

?> </td> </tr>

</table>

10.

supplier_data.php

<?php

include_once "library/inc.seslogin.php";

# UNTUK PAGING (PEMBAGIAN HALAMAN) $row = 50;

$hal = isset($_GET['hal']) ? $_GET['hal'] : 0; $pageSql = "SELECT * FROM supplier";

$pageQry = mysql_query($pageSql, $koneksidb) or die ("error paging: ".mysql_error());

$jml = mysql_num_rows($pageQry);

$max = ceil($jml/$row);

(13)

<table width="800" border="0" cellpadding="2" cellspacing="1" class="table-border">

<tr>

<td colspan="2" align="right"><h1><b>DATA SUPPLIER </b></h1></td> </tr>

<tr>

<td colspan="2"><a href="?page=Supplier-Add" target="_self"><img src="images/btn_add_data.png" height="30" border="0" /></a></td>

</tr> <tr>

<td colspan="2">&nbsp;</td> </tr>

<tr>

<td colspan="2">

<table class="table-list" width="100%" border="0" cellspacing="1" cellpadding="2">

<tr>

<th width="30" align="center"><b>No</b></th> <th width="257"><b>Nama Supplier </b></th> <th width="393"><b>Alamat</b></th>

<td colspan="2" align="center" bgcolor="#CCCCCC"><b>Tools</b><b></b></td>

</tr> <?php

$mySql = "SELECT * FROM supplier ORDER BY kd_supplier ASC LIMIT $hal, $row";

$myQry = mysql_query($mySql, $koneksidb) or die ("Query salah : ".mysql_error());

$nomor = 0;

while ($myData = mysql_fetch_array($myQry)) { $nomor++;

$Kode = $myData['kd_supplier']; ?>

<tr>

<td align="center"><?php echo $nomor; ?></td> <td><?php echo $myData['nm_supplier']; ?></td> <td><?php echo $myData['alamat']; ?></td>

<td width="44" align="center"><a href="?page=Supplier- Edit&Kode=<?php echo $Kode; ?>" target="_self" alt="Edit

Data">Edit</a></td>

<td width="44" align="center"><a href="?page=Supplier- Delete&Kode=<?php echo $Kode; ?>" target="_self" alt="Delete Data" onclick="return confirm('ANDA YAKIN AKAN MENGHAPUS DATA SUPPLIER INI ... ?')">Delete</a></td>

</tr> <?php } ?> </table></td> </tr>

<tr class="selKecil">

<td><b>Jumlah Data :</b> <?php echo $jml; ?> </td> <td align="right"><b>Halaman ke :</b>

<?php

for ($h = 1; $h <= $max; $h++) { $list[$h] = $row * $h - $row;

echo " <a href='?page=Supplier-Data&hal=$list[$h]'>$h</a> ";

(14)

11.

user_data.php

<?php

include_once "library/inc.seslogin.php";

# UNTUK PAGING (PEMBAGIAN HALAMAN) $row = 20;

$hal = isset($_GET['hal']) ? $_GET['hal'] : 0; $pageSql = "SELECT * FROM user";

$pageQry = mysql_query($pageSql, $koneksidb) or die ("error paging: ".mysql_error());

$jml = mysql_num_rows($pageQry);

$max = ceil($jml/$row);

?>

<table width="800" border="0" cellpadding="2" cellspacing="1" class="table-border">

<tr>

<td colspan="2" align="right"><h1><b>DATA USER </b></h1></td> </tr>

<tr>

<td colspan="2"><a href="?page=User-Add" target="_self"><img src="images/btn_add_data.png" height="30" border="0" /></a></td>

</tr> <tr>

<td colspan="2">&nbsp;</td> </tr>

<tr>

<td colspan="2"><table class="table-list" width="100%" border="0" cellspacing="1" cellpadding="2">

<tr>

<th width="24"><b>No</b></th>

<th width="231"><b>Nama Lengkap </b></th> <th width="145"><b>No. Telepon </b></th> <th width="170"><b>Username</b></th> <th width="102"><b>Level</b></th> <td colspan="2" align="center" bgcolor="#CCCCCC"><b>Tools</b><b></b></td>

</tr> <?php

$mySql = "SELECT * FROM user ORDER BY kd_user ASC";

$myQry = mysql_query($mySql, $koneksidb) or die ("Query salah

: ".mysql_error()); $nomor = 0;

while ($myData = mysql_fetch_array($myQry)) { $nomor++;

$Kode = $myData['kd_user']; ?>

<tr>

<td><?php echo $nomor; ?></td>

<td><?php echo $myData['nm_user']; ?></td> <td><?php echo $myData['no_telepon']; ?></td> <td><?php echo $myData['username']; ?></td> <td><?php echo $myData['level']; ?></td>

<td width="41" align="center"><a href="?page=User- Edit&Kode=<?php echo $Kode; ?>" target="_self" alt="Edit Data">Edit</a></td>

<td width="45" align="center"><a href="?page=User-

Delete&Kode=<?php echo $Kode; ?>" target="_self" alt="Delete Data" onclick="return confirm('ANDA YAKIN AKAN MENGHAPUS DATA INI

(15)

<?php } ?> </table> </td> </tr>

<tr class="selKecil">

<td><b>Jumlah Data :</b> <?php echo $jml; ?> </td> <td align="right"><b>Halaman ke :</b>

<?php

for ($h = 1; $h <= $max; $h++) { $list[$h] = $row * $h - $row;

echo " <a href='?page=User-Data&hal=$list[$h]'>$h</a> "; }

?> </td>

</tr> </table>

12.

logout.php

<?php

session_unset(); session_destroy();

echo "<meta http-equiv='refresh' content='0; url=?page'>"; exit;

Referensi

Dokumen terkait

Tetapi dalam penelitian ini peneliti belum menemukan informan atau peziarah yang melakukan ritual ziarah karena sudah atau akan melakukanibadah haji

Community Based Tourism pada Masyarakat Pesisir: Dampaknya Terhadap Lingkungan dan Pemberdayaan.. Jurnal

Upacara tradisi lokal selalu dipastikan memiliki nilai sosial yang sangat. tinggi, begitupun dengan adanya tradisi syawalan

Merupakan jaringan ikat yang terdiri dari komponen sel-sel yang sedikit, serat-serat. dominan dan lebih banyak dibandingkan jaringan

This research was conducted in Silahisabungan Subdistrict of Dairi District and Pangururan Subdistrict of Samosir Regency of North Sumatera Province, This study

Peningkatan Keterampilan Menulis Karangan Narasi Melalui Model Pembelajaran Bamboo Dancing Berbantuan Media Komik Kelas V SD Negeri Margorejo 01 Pati.Program Studi

Berdasarkan perubahan harga yang terjadi pada setiap kelompok komoditi tersebut, masing-masing kelompok pengeluaran memberikan andil inflasi/inflasi sebagai berikut :

Sehingga pada dasarnya kepercayaan masyarakat Desa Nguwok Kecamatan Modo Kabupaten Lamongan mengenai kematian, penyakit, perceraian dan juga kesulitan ekonomi yang