• Tidak ada hasil yang ditemukan

BAB V PENUTUP

5.2 Saran

Beberapa saran yang dapat disampaikan untuk pengembangan lebih lanjut hasil penelitian ini adalah sebagai berikut :

1. Tampilan User Interface masih apa adanya, dan masih butuh banyak perbaikan dari segi tampilan.

2. Aplikasi kurang fleksibel karena masih berbasis web, dan hanya bisa diakses pada pengangkat komputer / laptop. Penggunaan aplikasi melalui OS android akan lebih fleksibel dan UI yang dihasilkan juga akan lebih bagus.

3. Sistem yang dihasilkan masih bisa dikembangkan lebih lanjut dengan fitur yang belum tersedia sehingga bisa ditambah sesuai kebutuhan seperti import dan eksport dataset, perhitungan prediksi secara otomatis berdasarkan dataset yang ada, sehingga sistem ini bisa diaplikasikan pada semua kasus tidak hanya pada JST Cell.

LAMPIRAN

SOURCES CODE PREDIKSI PRODUK TERLARIS

1. Sources Code Koneksi.php <?php

$host = "localhost"; $user = "root"; $pass = "";

$name = "db_dataset_penjualan";

$koneksi = mysql_connect($host, $user, $pass) or die("Koneksi ke database gagal!");

mysql_select_db($name, $koneksi) or die("Tidak ada database yang dipilih!"); ?>

2. Sources Code Login.php <!DOCTYPE html>

<html > <head>

<meta charset="UTF-8"> <title>LogIn</title>

<link rel="stylesheet" href="css/style.css"> </head>

<body> <body>

<section id="content">

<form action="login_proses.php" method="post"> <h1>LogIn</h1>

<div>

<input type="text" placeholder="Username" required="" id="username"name="username" />

</div> <div>

<input type="password" placeholder="Password" required="" id="password" name="password" />

</div> <div>

<input type="submit" name ="login" value="Login" /> </div> </form><!-- form --> </section><!-- content --> </div><!-- container --> </body> <script src="js/index.js"></script> </body> </html>

3. Sources Code Login-proses.php <?php

if (isset($_POST['login'])) {

$username=$_POST['username']; $password=$_POST['password'];

if (($username=='admin') && ($password=='admin')) { echo 'Sign In sukses untuk melanjutkan silahkan '; echo '<a href="index.php">Klik disini</a>'; }else{

echo "<h2>username dan password tidak sesuai..</h2>"; echo "<a href=login.html> coba login lagi</a>";

} }

?>

4. Sources Code index.php <!DOCTYPE html>

<html> <head>

<title>Prediksi</title>

<link href="tombol.css" rel="stylesheet" type="text/css" media="all" /> <style type="text/css">

<!--

.style5 {font-size: 24px; font-family: Georgia, "Times New Roman", Times, serif; }

-->

</head> <body> <?php

echo date('l, d-m-Y '); ?>

<div class="header">

<div class="cssmenu2"><a class="tombol" href="login.html">LogOut</a></div>

<div class="cssmenu"><h2 class="style5">JST CELL </h2></div> <h2 class="style5">PREDIKSI PRODUK TERLARIS </h2> <p><a class = "tombol" href="index.php">Beranda</a>

<a class = "tombol" href="dataset.php">Dataset</a> <a class = "tombol" href="tambah.php">Tambah Data</a> <a class = "tombol" href="prediksi.php">Prediksi</a>

<a class = "tombol" href="tentang_saya.php">Tentang Saya</a> </p> </div>

<table width="1147" border="0"> <tr>

<td width="303" height="305"><img src="gambar\logojst.png" width="303" height="301"></td>

<td width="12">&nbsp;</td> <td width="754">

<p><strong>SELAMAT DATANG DI WEBSITE PREDIKSI PRODUK TERLARIS

<p>Website ini merupakan website prediksi untuk menentukan produk mana yang kurang laris, normal, laris , dan sangat laris. Dengan menggunakan algoritma desicion tree sebagai dasar perhitungan prediksi. diharapkan website ini dapat berguna bagi pemakainya untuk dapat mengelola modal usaha dengan baik. </p> </td> </tr> </table> <div class="footer"> <div class="copy">

<p class="w3-link">© All Rights Reserved | Design by&nbsp; <a>Sidik Azis Purwadi</a></p>

</div>

<div class="f_nav"> <ul>

<li><a class ="tombol" href="http://skype.com">Skype</a></li>

<li><a class ="tombol" href="http://gmail.com">gmail</a></li>

<li><a class ="tombol" href="http://twitter.com">Twitter</a></li>

<li><a class ="tombol" href="http://facebook.com">Facebook</a></li>

</ul> </div>

<div class="clear"></div> </div>

</body> </html>

5. Sources Code Dataset.php <!DOCTYPE html>

<html> <head>

<title>Prediksi</title>

<link href="tombol.css" rel="stylesheet" type="text/css" media="all" /> <style type="text/css">

<!--

.style5 {font-size: 24px; font-family: Georgia, "Times New Roman", Times, serif; } --> </style> </head> <body> <?php

echo date('l, d-m-Y '); ?>

<div class="header">

<div class="cssmenu2"><a class="tombol" href="login.html">LogOut</a></div>

<div class="cssmenu"><h2 class="style5">JST CELL </h2></div> <h2 class="style5">PREDIKSI PRODUK TERLARIS </h2> <a class = "tombol" href="index.php">Beranda</a>

<a class = "tombol" href="dataset.php">Dataset</a> <a class = "tombol" href="tambah.php">Tambah Data</a> <a class = "tombol" href="prediksi.php">Prediksi</a>

<a class = "tombol" href="tentang_saya.php">Tentang Saya</a> </div>

<table width="1148" cellpadding="1" cellspacing="0" border="1"> <tr class="tombol"> <th width="auto">NO</th> <th width="auto">PRODUK</th> <th width="auto">MEREK</th> <th width="auto">JENIS PRODUK</th> <th width="auto">HARGA</th> <th width="auto">AKSI</th> </tr> <?php include('koneksi.php');

$query = mysql_query("SELECT * FROM penjualan") or die(mysql_error());

if(mysql_num_rows($query) == 0){

echo '<tr><td colspan="6">Tidak ada data!</td></tr>';

}else{

while($data = mysql_fetch_assoc($query)){ echo '<tr>'; echo '<td>'.$no.'</td>'; echo '<td>'.$data['produk'].'</td>'; echo '<td>'.$data['merek'].'</td>'; echo '<td>'.$data['jenis_produk'].'</td>'; echo '<td>'.$data['harga'].'</td>'; echo '<td> <a href="edit.php?id='.$data['no'].'">Edit</a> / <a href="hapus.php?id='.$data['no'].'" onclick="return confirm(\'Yakin?\')">Hapus</a></td>'; echo '</tr>'; $no++; } } ?> </table> <div class="footer"> <div class="copy">

<p class="w3-link">© All Rights Reserved | Design by&nbsp; <a>Sidik Azis Purwadi</a></p>

</div>

<ul>

<li><a class ="tombol" href="http://skype.com">Skype</a></li>

<li><a class ="tombol" href="http://gmail.com">gmail</a></li>

<li><a class ="tombol" href="http://twitter.com">Twitter</a></li>

<li><a class ="tombol" href="http://facebook.com">Facebook</a></li> </ul> </div> <div class="clear"></div> </div> </body> </html>

6. Sources Code Edit.php <!DOCTYPE html>

<html> <head>

<title>Prediksi</title>

<link href="tombol.css" rel="stylesheet" type="text/css" media="all" /> </head>

<body>

<h2>PREDIKSI PRODUK TERLARIS JST CELL</h2> <a class = "tombol" href="index.php">Beranda</a> <a class = "tombol" href="dataset.php">Dataset</a>

<a class = "tombol" href="tambah.php">Tambah Data</a> <a class = "tombol" href="prediksi.php">Prediksi</a>

<a class = "tombol" href="tentang_saya.php">Tentang Saya</a> </a>

<h3>Edit Data Penjualan</h3>

<?php

include('koneksi.php'); $id = $_GET['id'];

$show = mysql_query("SELECT * FROM penjualan WHERE no='$id'"); if(mysql_num_rows($show) == 0){ echo '<script>window.history.back()</script>'; }else{ $data = mysql_fetch_assoc($show); } ?>

<form action="edit-proses.php" method="post">

<input type="hidden" name="id" value="<?php echo $id; ?>"> <table cellpadding="3" cellspacing="0">

<tr>

<td>PRODUK</td> <td>:</td>

<td><input type="text" name="produk" value="<?php echo $data['produk']; ?>" required></td>

</tr> <tr>

<td>MEREK</td> <td>:</td>

<td><input type="text" name="merek" value="<?php echo $data['merek']; ?>" required></td>

</tr> <tr>

<td>JENIS PRODUK</td> <td>:</td>

<td><input type="text" name="jenis_produk" value="<?php echo $data['jenis_produk']; ?>" required></td>

</tr> <tr>

<td>HARGA</td> <td>:</td>

<td><input type="text" name="harga" value="<?php echo $data['harga']; ?>" required></td>

</tr> <tr>

<td>&nbsp;</td> <td></td>

<td><input class="tombol" type="submit" name="update" value="Update"></td>

</tr> </table>

</form> </body>

</html>

7. Sources Code Edit-proses.php <?php if(isset($_POST['update'])){ include('koneksi.php'); $id = $_POST['id']; $produk = $_POST['produk']; $merek = $_POST['merek']; $jenis_produk = $_POST['jenis_produk']; $harga = $_POST['harga'];

$update = mysql_query("UPDATE penjualan SET

produk='$produk',merek='$merek',jenis_produk='$jenis_produk',harga='$harga' WHERE no='$id'") or die(mysql_error());

if($update){

echo 'Data berhasil di update! ';

echo '<a href="dataset.php">Kembali</a>'; }else{

echo 'Gagal menyimpan data! ';

echo '<a href="dataset.php">Kembali</a>'; }

}else{

echo '<script>window.history.back()</script>'; }

8. Sources Code Hapus.php <?php

if(isset($_GET['id'])){

include('koneksi.php'); $id = $_GET['id'];

$cek = mysql_query("SELECT no FROM penjualan WHERE no='$id'") or die(mysql_error());

if(mysql_num_rows($cek) == 0){

echo '<script>window.history.back()</script>'; }else{

$del = mysql_query("DELETE FROM penjualan WHERE no='$id'");

if($del){

echo 'Data penjualan berhasil di hapus! '; echo '<a href="dataset.php">Kembali</a>'; }else{

echo 'Gagal menghapus data! ';

echo '<a href="dataset.php">Kembali</a>'; } } }else{ echo '<script>window.history.back()</script>'; } ?>

9. Sources Code Tambah.php <!DOCTYPE html>

<html> <head>

<title>Prediksi</title>

<link href="tombol.css" rel="stylesheet" type="text/css" media="all" /> </head>

<body>

<h2>PREDIKSI PRODUK TERLARIS JST CELL</h2>

<a class = "tombol" href="index.php">Beranda</a> <a class = "tombol" href="dataset.php">Dataset</a> <a class = "tombol" href="tambah.php">Tambah Data</a> <a class = "tombol" href="prediksi.php">Prediksi</a>

<a class = "tombol" href="tentang_saya.php">Tentang Saya</a> </a>

<h3>Tambah Dataset Penjualan</h3>

<form action="tambah-proses.php" method="post"> <table cellpadding="3" cellspacing="0">

<tr>

<td>PRODUK</td> <td>:</td>

<td><input type="text" name="produk" size="30" required></td>

</tr> <tr>

<td>MEREK</td> <td>:</td>

<td><input type="text" name="merek" size="30" required></td>

</tr> <tr>

<td>JENIS_PRODUK</td> <td>:</td>

<td><input type="text" name="jenis_produk" size="30" required></td>

</tr> <tr>

<td>HARGA</td> <td>:</td>

<td><input type="text" name="harga" size="30" required></td>

</tr>

<tr>

<td>&nbsp;</td> <td></td>

<td><input class ="tombol" type="submit" name="tambah" value="Tambah"></td>

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

</body> </html>

10. Sources Code Tambah-proses.php <?php if(isset($_POST['tambah'])){ include('koneksi.php'); $produk = $_POST['produk']; $merek = $_POST['merek']; $jenis_produk = $_POST['jenis_produk']; $harga = $_POST['harga'];

$input = mysql_query("INSERT INTO penjualan VALUES

(NULL,'$produk', '$merek','$jenis_produk','$harga')")or die(mysql_error()); if($input){

echo 'Data berhasil di tambah! ';

echo '<a href="dataset.php">Kembali</a>'; }else{

echo 'Gagal menambahkan data! ';

echo '<a href="dataset.php">Kembali</a>'; }

}else{

echo '<script>window.history.back()</script>'; }

?>

11. Sources Code Prediksi.php <!DOCTYPE html>

<html> <head>

<title>Prediksi</title>

<link href="tombol.css" rel="stylesheet" type="text/css" media="all" /> <style type="text/css">

<!--

.style5 {font-size: 24px; font-family: Georgia, "Times New Roman", Times, serif; } --> </style> </head> <body> <?php

echo date('l, d-m-Y '); ?>

<div class="header">

<div class="cssmenu2"><a class="tombol" href="login.html">LogOut</a></div>

<div class="cssmenu"><h2 class="style5">JST CELL </h2></div> <h2 class="style5">PREDIKSI PRODUK TERLARIS </h2> <p><a class = "tombol" href="index.php">Beranda</a>

<a class = "tombol" href="dataset.php">Dataset</a> <a class = "tombol" href="tambah.php">Tambah Data</a> <a class = "tombol" href="prediksi.php">Prediksi</a>

<a class = "tombol" href="tentang_saya.php">Tentang Saya</a></p> </div>

<table width="1091" border="0"> <form action="" method="post"> <tr>

<td height="26">

<label>Pilih Produk</label>

<select name="produk" style ="width:750px;height:30px">

<option value = "" selected = "selected">pilih produk</option> <?php

include('koneksi.php');

$query="SELECT * FROM penjualan"; $hasil=mysql_query($query);

while ($data = mysql_fetch_array($hasil)) { echo "<option value='".$data['produk']."'>".$data['produk']."</option>";} ?> </select></td> <td width="305" rowspan="5"> <label>Hasil Prediksi</label>

<textarea name="" class="style5" style="width:387px;height:270px"> <?php if(isset($_POST['prediksi'])){ include('koneksi.php'); if ($_POST['produk']=="Charger") {echo "LARIS";} else

if ($_POST['produk']=="Flashdisk" && $_POST['merek'] == "Toshiba") {echo "NORMAL";}

else

if ($_POST['produk']=="Flashdisk" && $_POST['merek'] == "Samsung" && $_POST['jenis_produk'] =="KSK" && $_POST['harga'] == "HPR")

{echo "NORMAL";} else

if ($_POST['produk']=="Flashdisk" && $_POST['merek'] == "Sandisk") {echo "LARIS";} else if ($_POST['produk']=="HandPhone") {echo "NORMAL";} else if ($_POST['produk']=="Hard Case") {echo "LARIS";} else if ($_POST['produk']=="HeadSeat") {echo "LARIS";} else if ($_POST['produk']=="Kabel Data") {echo "KURANG LARIS";}

else

if ($_POST['produk']=="Micro SD" && $_POST['merek'] == "V-Gent") {echo "SANGAT LARIS";}

if ($_POST['produk']=="Micro SD" && $_POST['merek'] == "Sandisk" && $_POST['jenis_produk'] =="KSK" && $_POST['harga'] == "HPR")

{echo "LARIS";} else

if ($_POST['produk']=="Perdana Simpati") {echo "LARIS";}

else

if ($_POST['produk']=="Perdana XL" && $_POST['merek'] == "XL Axiata" && $_POST['jenis_produk'] =="KK" && $_POST['harga'] == "HPR")

{echo "KURANG LARIS";} else

if ($_POST['produk']=="Soft Case") {echo "KURANG LARIS";}

else

if ($_POST['produk']=="Tempered Glass") {echo "KURANG LARIS";}

else

if ($_POST['produk']=="Voucher Indosat") {echo "KURANG LARIS";}

else

if ($_POST['produk']=="Voucher Smartfren") {echo "KURANG LARIS";}

else

if ($_POST['produk']=="Voucher Telkomsel") {echo "KURANG LARIS";}

if ($_POST['produk']=="Voucher Three" && $_POST['merek'] == "three" && $_POST['jenis_produk'] =="KSK" && $_POST['harga'] == "HPR")

{echo "LARIS";} else

{echo "Algoritma Tidak Ditemukan";} } ?> </textarea></td> </tr> <tr> <td height="21">

<label >Pilih Merek</label>

<select name="merek" style ="width:750px;height:30px"> <option value = "" selected = "selected">pilih merek</option> <?php

include('koneksi.php');

$query="SELECT * FROM penjualan"; $hasil=mysql_query($query);

while ($data = mysql_fetch_array($hasil))

{ echo "<option value='".$data['merek']."'>".$data['merek']."</option>";} ?>

</select></td> </tr>

<tr>

<label>Pilih Jenis Produk</label>

<select name="jenis_produk" style ="width:750px;height:30px"> <option value = "" selected = "selected">pilih jenis produk</option> <?php

include('koneksi.php');

$query="SELECT * FROM penjualan"; $hasil=mysql_query($query);

while ($data = mysql_fetch_array($hasil)) { echo "<option value='".$data['jenis_produk']."'>".$data['jenis_produk']."</option>";} ?> </select></td> </tr> <tr> <td height="21">

<label for="select">Pilih Harga</label>

<select name="harga" style ="width:750px;height:30px"> <option value = "" selected = "selected">pilih harga</option> <?php

include('koneksi.php');

$query="SELECT * FROM penjualan"; $hasil=mysql_query($query);

while ($data = mysql_fetch_array($hasil))

{ echo "<option value='".$data['harga']."'>".$data['harga']."</option>";} ?>

</select></td> </tr>

<tr>

<td width="776" height="21"><input class ="tombol" type="submit" name="prediksi" value="Prediksi"/> <p>&nbsp;</p></td> </tr> </form> </table> <div class="footer"> <div class="copy">

<p class="w3-link">© All Rights Reserved | Design by&nbsp; <a>Sidik Azis Purwadi</a></p>

</div>

<div class="f_nav"> <ul>

<li><a class ="tombol" href="http://skype.com">Skype</a></li>

<li><a class ="tombol" href="http://gmail.com">gmail</a></li>

<li><a class ="tombol" href="http://twitter.com">Twitter</a></li>

<li><a class ="tombol" href="http://facebook.com">Facebook</a></li>

</ul> </div>

</div> </body> </html>

12. Sources Code Tentang_Saya.php <!DOCTYPE html>

<html> <head>

<title>Prediksi</title>

<link href="tombol.css" rel="stylesheet" type="text/css" media="all" /> <style type="text/css">

<!--

.style5 {font-size: 24px; font-family: Georgia, "Times New Roman", Times, serif; } --> </style> </head> <body> <?php

echo date('l, d-m-Y '); ?>

<div class="header">

<div class="cssmenu2"><a class="tombol"

Dokumen terkait