• Tidak ada hasil yang ditemukan

Saran Untuk Pengembangan SPK Pendirian Usaha

BAB VI. KESIMPULAN DAN SARAN

Tambah artikel

V. 1. 1mplementasi Pembuatan Basis data

XV.2. Saran Untuk Pengembangan SPK Pendirian Usaha

Saran untuk pengembangan sistem ini adalah menambahkan metode-metode analisis usaha yang lain agar analisis dan kesimpulan yang didapat lebih akurat, form bantuan untuk mempermudah pengguna dalam memperkirakan data penjualan, dan juga user interface untuk mempermudah administrator dalam menambah jenis usaha.

118

DAFTAR PUSTAKA

[1]Garisson, R.H., Noreen, E.W., Brewer, P.C. (2006), Managerial Accounting , McGraw-Hill/Irwin, New York.

[2] Guidebook to Decision-Making Method, http://emi-web.inel.gov/../Guidebook_2002.pdf.

[3] Jeffrey L Whitten, Lonnie D Bentley, Victor M. Barlow (2004), System Analysis & Design Methods, Chapter 3, Sixth Edition, Irwin.

[4] Kadir, Abdul. (2008), Dasar Pemrograman Web Dinamis Menggunakan PHP, Andi, Yogyakarta.

[5] PERAN SEKTOR INFORMAL DI INDONESIA | Universitas Gajah Mada (2010), http://www.ugm.ac.id/index.php?page=rilis&artikel=322.

[6] Turban, Aronson, and Liang (2005), Decision Support Systems and Intelligent Systems, Edition, Prentice Hall.

119

LAMPIRAN

Listing program login dan informasi:

(halaman informasi dan peringatan yang lain hampir sama hanya berbeda pada pesan yang disampaikan).

... if(isset($_POST["login"])) { opendb(); $uname=$_POST['nama']; $password= $_POST['password']; if($uname == "" || $password == "" ) { echo ('<script>

window.alert("Login salah, silahkan ulangi lagi.") </script>');

} else {

$query=" select * from admin where username = '$uname' and password = '$password' ";

querydb($query); closedb(); $data = mysql_num_rows($result); if($data == 0) { echo ('<script>

window.alert("Login salah, silahkan ulangi lagi.") </script>'); } else { while ($data_admin=mysql_fetch_assoc($result)) { echo "<br><br><br>"; $_SESSION['id_admin']=$data_admin['id_admin'];

echo "<img src='images/loading.gif'>

<meta http-equiv = 'Refresh' content='1; URL = admin/home.php'>"; }

}

} }

120 Listing program halaman home administrator: ...

<?php require "header.html"; ?></td></tr> <tr valign="top"><td width="100%">&nbsp;</td> <tr valign="top"><td width="100%" height="137"> <table width="100%" border="0">

<tr> <td>

<?php $tanggal=date("d.m.Y"); echo "<p class='angka'>$tanggal</p>" ?>

<p class="j5 judul">Selamat datang dihalaman administrator</p> <table width="35%" border="0">

<tr>

<td width="5%">&nbsp;</td>

<td width="16%"><img src="../images/id.png" /></td> <td width="79%" colspan="2" vAlign='top'><br /> <?php

include "../koneksi/koneksi.inc"; $id_admin = $_SESSION['id_admin']; opendb();

$query= " SELECT * FROM admin WHERE id_admin='$id_admin'"; querydb($query);

while ($data_admin=mysql_fetch_assoc($result)) {

echo "<table width='100%' border='0' vAlign='center'>"; echo "<tr>";

echo "<td width='30%' class='huruf'>"; echo "No. ID";

echo "</td>";

echo "<td width='70%' class='huruf'>"; echo ": $data_admin[id_admin]"; echo "</td>"; echo "</tr>"; echo "<tr>"; echo "<td class='huruf'>"; echo "Nama"; echo "</td>"; echo "<td class='huruf'>"; echo ": $data_admin[username]"; echo "</td>"; echo "</tr>"; echo "</table>"; echo "</p>"; } closedb(); ?> </td> </tr> <tr> <td>&nbsp;</td> <td>&nbsp;</td>

121

<td colspan="2" class="link"><a href='#'

onClick=popUpWindow('gantipassword.php',100,100,350,380)> <b>Ganti password?</b></a></td> </tr> </table> <br /></td> </tr> </table></td> </tr> <tr><td width="100%"> <?php require ".../footer.html"; ?> ...

Listing program halaman artikel: ...

//script untuk membaca komponen dalam form bila dipilih semua //atau tidak dipilih semua.

<script type="text/javascript"> function pilihan()

{

// membaca jumlah komponen dalam form bernama 'myform' var jumKomponen = document.myform.length;

// jika checkbox 'Pilih Semua' dipilih if (document.myform[0].checked == true) {

// semua checkbox pada data akan terpilih for (i=1; i<=jumKomponen; i++)

{

if (document.myform[i].type == "checkbox") document.myform[i].checked = true;

} }

// jika checkbox 'Pilih Semua' tidak dipilih else if (document.myform[0].checked == false) {

// semua checkbox pada data tidak dipilih for (i=1; i<=jumKomponen; i++)

{ if (document.myform[i].type == "checkbox") document.myform[i].checked = false; } } } </script> ...

//listing program untuk menampilkan tabel attikel. <?php

include "../koneksi/koneksi.inc"; opendb();

122 $table = content; $hal = $_GET[hal]; if(!isset($_GET['hal'])) { $page = 1; } else { $page = $_GET['hal']; }

/* max item per halaman */ $max_results = 9;

/* halaman di kali MAX jumlah item per halaman dikurangi MAX jumlah item per halaman */

$from = (($page * $max_results) - $max_results); // bagian script untuk menghapus data

if ($_GET['action'] == "del") {

// membaca nilai n dari hidden value $n = $_POST['n'];

for ($i=0; $i<=$n-1; $i++) {

if (isset($_POST['id_artikel'.$i])) {

$id_artikel = $_POST['id_artikel'.$i]; $query = "DELETE FROM artikel

WHERE id_artikel = '$id_artikel'"; mysql_query($query);

} } }

$query = "SELECT * FROM artikel LIMIT $from, $max_results";; $hasil = mysql_query($query);

$warnaGenap = "#DCEAE7"; $warnaGanjil = "#FFFFFF"; $warnaHeading = "#CCDDE1";

// membuat form penghapusan data

echo "<form name='myform' method='post'

action='".$_SERVER['PHP_SELF']."?action=del'>";

echo "<table width='90%' border='0' align='center'>"; echo "<tr bgcolor='".$warnaHeading."' class='huruf2'> <td width=16% align='center'><input type='checkbox' name='pilih' onclick='pilihan()' />Pilih semua</td> <td width=54% align='center'>Judul</td>

<td width=30% align='center'>Nama Pengarang</td> </tr>";

$i = 0;

123 {

// cek apakah counternya ganjil atau genap if ($i % 2 == 0) $warna = $warnaGenap; else $warna = $warnaGanjil;

echo "<tr bgcolor='".$warna."' vAlign=top> <td align='center'>

<input type='checkbox' name='id_artikel".$i."' value='".$data['id_artikel']."'/></td> <td class='link'> <font size='4px'>".$data['judul_artikel']."... </font><a href='#' nClick=popUpWindow('selengkapnya.php?id=$data[id_artikel] ',100,100,500,500)>selengkapnya</a></td> <td class='isiLengkap'>".$data['nama_pengarang']." </td></tr>"; $i++; } echo "<tr> <td align='left' colspan='3'><br />

<input type='hidden' name='n' value='".$i."' /> <input type='submit' value='Hapus' name='submit'

onclick=\"return konfirmasi('".$data['id_berita']."')\"> <input type='reset' value='Batal' name='reset'></td> </tr>";

echo "</table>"; echo "</form>";

$total_results = mysql_result(mysql_query("SELECT COUNT(*) as Num FROM artikel"),0);

$total_pages = ceil($total_results / $max_results); echo "<center>";

/* link sebelumnya */ if($hal > 1)

{

$prev = ($page - 1);

echo "<a href='artikel.php?hal=$prev' on mouseout='MM_swapImgRestore();'

onmouseover='MM_swapImage('prev','','../images/prev.png',1); ' class='image2'>

<img name='prev' src='../images/prev.png' border='0' id='prev' alt='prev'></a>";

}

for($i = 1; $i <= $total_pages; $i++) { if(($hal) == $i) { echo "$i"; } else {

echo "<a href=artikel.php?hal=$i class='link'> $i</a> ";

} }

124 /* link berikutnya */

if($hal < $total_pages) {

$next = ($page + 1);

echo "<a href='artikel.php?hal=$next' onmouseout='MM_swapImgRestore();'

onmouseover='MM_swapImage('next','','../images/next.png', 1);' class='image2'>

<img name='next' src='../images/next.png' border='0' id='next' alt='next'></a>"; } echo "</center>"; echo '<br /><br />'; closedb(); ?> ...

Listing program halaman hitung user: ...

// Generating the verification code for the captcha image $_SESSION['code'] = strtoupper(md5(rand(00000,99999))); if(isset($_POST["kirim"])) { opendb(); $posted_captcha = stripslashes($_POST['captcha']); $validation = $_SESSION['validation']; if ($posted_captcha != $validation) {

echo "<font class='peringatan'>

Kode verifikasi salah, silahkan ulangi kembali.</font>"; }

else {

$_SESSION['captcha']=$posted_captcha; echo "<font class='info'>

Anda sudah dapat melakukan perhitungan.<br> Silahkan tekan </font>";

echo "<font class='link'> <a href='#' onClick=popUpWindow('form1/hitungpilih.php',100,200,600,6 00)> <b>hitung</b></a>.</font>"; } } ?> ...

125 Listing program pemilihan jenis usaha: ... $jenis_usaha = $_POST['jenis_usaha']; $umum = $_POST['umum']; $rental_komputer = $_POST['rental_komputer']; $vcd = $_POST['vcd']; $fotocopy = $_POST['fotocopy']; $laundry = $_POST['laundry']; $pulsa = $_POST['pulsa']; if ($jenis_usaha == "" ) { echo ('<script>

window.alert("Pilih jenis usaha yang akan dihitung.") </script>');

}

else if ($jenis_usaha == "umum") {

echo " <meta http-equiv = 'Refresh' content='1; URL =hitungan.php?id_user=$id_user'>";

}

else if ($jenis_usaha == "rental_komputer") {

echo " <meta http-equiv = 'Refresh' content='1;

URL =hitungan_rentalkomputer.php?id_user=$id_user'>"; }

else if ($jenis_usaha == "vcd") {

echo " <meta http-equiv = 'Refresh' content='1; URL =hitungan_rentalvcd.php?id_user=$id_user'>"; }

else if ($jenis_usaha == "fotocopy") {

echo " <meta http-equiv = 'Refresh' content='1; URL =hitungan_photocopy.php?id_user=$id_user'>"; }

else if ($jenis_usaha == "laundry") {

echo " <meta http-equiv = 'Refresh' content='1; URL =hitungan_laundry.php?id_user=$id_user'>"; }

else {

echo " <meta http-equiv = 'Refresh' content='1; URL =hitungan_pulsa.php?id_user=$id_user'>"; }

Dokumen terkait