• Tidak ada hasil yang ditemukan

BAB 4 PERANCANGAN SISTEM INFORMASI PEMASARAN BUKU

4.6 Listing program

72

<a id="smallScreen" data-target="#topMenu" data- toggle="collapse" class="btn btn-navbar">

<span class="icon-bar"></span>

<span class="icon-bar"></span>

<span class="icon-bar"></span>

</a>

<div class="navbar-inner">

<a class="brand" href="index.php"><img src="themes/images/logo.png"

alt="Bootsshop"/></a>

<ul id="topMenu" class="nav pull-left">

<li class=""><a

href="index.php">Home</a></li>

<li class=""><a href="?

page=buku">Buku</a></li>

<li class=""><a href="?page=info">Info Bayar</a></li>

<?php

$q=mysql_query("select * from pelanggan where username='$user'");

$row = mysql_num_rows($q);

if ($row == 1) { while($hasil=mysql_fetch_array($q)) {

?>

<li class="page_item page-item-4322">

<a href="?page=pesanans">Daftar Pesanan</a>

</li>

<?php } }

?>

<li class=""><a href="?page=tamu">Buku Tamu</a></li></ul>

<style>

#loguser a { line-height: 20px;

margin-top:2px;

}

</style>

<?php if ($row == 1) { ?><div id="loguser"

style="margin-top:11px;" class="btn-group pull- right">

<a class="btn btn-info"

href="#"><i class="icon-user icon-white"></i> <?php echo $user; ?></a>

<a class="btn btn-info dropdown-toggle" data-toggle="dropdown"

href="#"><span class="caret"></span></a>

<ul class="dropdown- menu">

<li><a href="index.php?page=profils"><i class="icon- pencil"></i> Profil</a></li>

href="logout.php"><i class="icon-trash"></i>

Logout</a></li>

</ul>

</div><?php } else {?>

<div id="loguser"

style="margin-top:11px;" class="btn-group pull- right">

<a class="btn btn-info"

href="#"><i class="icon-user icon-white"></i>

Login/Register</a>

<a class="btn btn-info dropdown-toggle" data-toggle="dropdown"

href="#"><span class="caret"></span></a>

<ul class="dropdown- menu">

<li><a href="index.php?page=daftar"><i class="icon- user"></i> Register</a></li>

<li><a

href="#login" role="button" data-toggle="modal"><i class="icon-user"></i> Login Pelanggan</a></li>

<li><a href="#logina" role="button" data-

toggle="modal"><i class="icon-user"></i> Login Admin</a></li>

</ul>

</div><?php }?>

<ul id="topMenu" class="nav pull-right">

<li>

<form style="margin-top:20px;"

class="form-inline navbar-search" method="post"

action="?page=produk" >

<input id="srchFld" class="srchTxt"

name="nama_pro" type="text" />

<button type="submit" id="submitButton" class="btn btn- primary">Cari</button>

</form>&nbsp;

</li>

<li class="">

<?php if ($row == 0) { ?>

<div id="login" class="modal hide fade in"

tabindex="-1" role="dialog" aria-labelledby="login"

aria-hidden="false" >

<div class="modal-header">

<button type="button"

class="close" data-dismiss="modal" aria- hidden="true">×</button>

74

<h3>Login Pelanggan</h3>

</div>

<div class="modal-body">

<form class="form- horizontal loginFrm" method="post"

action="proses_login.php">

<div class="control- group">

<input type="text" style="width:100%" id="inputEmail"

name="username" placeholder="Username">

</div>

<div class="control- group">

<input type="password" style="width:100%"

name="password" id="inputPassword"

placeholder="Password">

</div><hr>

<center>

<button type="submit"

class="btn btn-success">Login</button>

<button class="btn" data- dismiss="modal" aria-

hidden="true">Close</button></center>

</form>

</div>

</div>

<div id="logina" class="modal hide fade in" tabindex="-1" role="dialog" aria-

labelledby="login" aria-hidden="false" >

<div class="modal-header">

<button type="button"

class="close" data-dismiss="modal" aria- hidden="true">×</button>

<h3>Login Admin</h3>

</div>

<div class="modal-body">

<form class="form- horizontal loginFrm" method="post"

action="proses_login.php">

<div class="control- group">

<input type="text" style="width:100%" id="inputEmail"

name="username" placeholder="Username">

</div>

<div class="control- group">

<input type="password" style="width:100%"

name="password" id="inputPassword"

placeholder="Password">

</div><hr>

<center>

<button type="submit"

class="btn btn-success">Login</button>

<button class="btn" data- dismiss="modal" aria-

hidden="true">Close</button></center>

</form>

</div>

</div>

<?php } ?>

</li>

</ul>

</div>

</div>

</div>

</div>

<!-- Header

End========================================

============================== -->

<?php if(!isset($_REQUEST['page'])) { ?>

<div id="carouselBlk">

<div id="myCarousel" class="carousel slide">

<div class="carousel-inner">

<div class="item active">

<div class="container">

<a href="#"><img style="width:100%"

src="themes/images/carousel/1.png" alt="special offers"/></a>

<div class="carousel- caption">

</div>

</div>

</div>

<div class="item">

<div class="container">

<a href="#"><img style="width:100%"

src="themes/images/carousel/2.png" alt=""/></a>

<div class="carousel-caption">

</div>

</div>

<div class="item">

<div class="container">

<a href="#"><img src="themes/images/carousel/3.png" alt=""/></a>

<div class="carousel- caption">

</div>

</div>

</div>

</div>

<a class="left carousel-control"

href="#myCarousel" data-slide="prev">&lsaquo;</a>

<a class="right carousel-control"

href="#myCarousel" data-slide="next">&rsaquo;</a>

</div>

</div>

<?php } ?>

<div id="mainBody">

<div class="container">

<div class="row">

<!-- Sidebar

===========================================

======= -->

<div id="sidebar" class="span3">

<div class="well well- small">Kategori Buku</div>

<ul id="sideManu" class="nav nav- tabs nav-stacked">

<?php

$ace = mysql_query("select * from kategori");

while ($dam = mysql_fetch_array($ace)) { ?>

<li><a href="index.php?

page=buku&kat=<?php echo $dam['id_kategori'] ;?

>&kate=<?php echo $dam['kategori'] ;?>"><?php echo $dam['kategori'] ;?></a></li>

<?php } ?>

</ul>

<br/>

<div class="well well-small"> <p align="center">Selamat datang di CV. Hang Tuah

</p>

Sei Bengawan No. 86a Kecamatan Medan Sunggal Kelurahan Babura Medan. <br>

<ul>

<li>Telepon : <strong>085728750888</strong></li>

<strong><strong>085728750888</strong></strong><

/li>

</ul>

<iframe

src="https://www.google.com/maps/embed?pb=!

1m18!1m12!1m3!1d703.9308269397844!

2d98.64625963255016!3d3.5796416485360774!

2m3!1f0!2f0!3f0!3m2!1i1024!2i768!4f13.1!3m3!

1m2!1s0x30312fcd223e5a2f

%3A0xac5baab233f735cb!2sJl.%20Sei%20Bengawan

%20No.86%2C%20Babura%20Sunggal%2C%20Kec.

%20Medan%20Sunggal%2C%20Kota%20Medan%2C

%20Sumatera%20Utara%2020154!5e0!3m2!1sen!

2sid!4v1694527987591!5m2!1sen!2sid"

width="260" height="260" style="border:0;"

allowfullscreen="" loading="lazy" referrerpolicy="no- referrer-when-downgrade"></iframe></div>

</div>

<!-- Sidebar

end========================================

======= -->

<?php $hal = (isset($_GET['page']))?

$_GET['page']:"main";

switch($hal)

{ case"main":default:include("home.php");

break;

case"detail":include("detail.php");

break;

case"tamu":include("komentar.php");

break;

case"cara":include("cara_order.php");

break;

case"contact":include("contact.php");

break;

case"daftar":include("daftar.php");

break;

case"pesan":include("pesan.php");

break;

case"order":include("order.php");

break;

case"fasi":include("fasi.php");

break;

case"batal_pemesanan":include("batal_pemesanan.

php");

break;

case"not_login":include("not_login.php");

break;

case"login":include("login.php");

break;

case"form":include("form.php");

76

break;

case"keranjang":include("keranjang.php");

break;

case"upload":include("upload.php");

break;

case"buku":include("produk.php");

break;

case"selesai":include("selesai.php");

break;

case"pesanans":include("pesanans.php");

break;

case"info":include("info.php");

break;

case"profils":include("profils.php");

break;

}

?>

</div>

</div>

</div>

<!-- Footer

===========================================

======================= -->

<div id="footerSection">

<div class="container">

<p class="pull-right">&copy;2023 CV. Hang Tuah </p>

</div><!-- Container End -->

</div>

<?php if(isset($_REQUEST['page']) and

$_REQUEST['page'] == "pesanans") { } else { ?>

<!-- Placed at the end of the document so the pages load faster

===========================================

== -->

<script src="themes/js/jquery.js"

type="text/javascript"></script>

<script src="themes/js/bootstrap.min.js"

type="text/javascript"></script>

<script src="themes/js/google-code- prettify/prettify.js"></script>

<script

src="themes/js/bootshop.js"></script>

<script src="themes/js/jquery.lightbox- 0.5.js"></script>

<?php } ?>

<!-- Themes switcher section

===========================================

===========================================

======= -->

<span id="themesBtn"></span>

</body>

</html>

2. Buku (Buku.php)

<?php

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

$where = " and nm_produk like '%

$_POST[nama_pro]%'";

}

$ace = mysql_query("select * from produk where id_kategori like '%$_REQUEST[kat]%'

$where");

$aces = mysql_query("select * from produk where id_kategori like '%$_REQUEST[kat]%'

$where");

$count = mysql_num_rows($ace);

?>

<div class="span9">

<ul class="breadcrumb">

<li><a

href="index.php">Home</a> <span class="divider">/</span></li>

<li class="active">Buku </li>

</ul>

<h3> Buku - <?php if (isset($_REQUEST['kat'])) { echo

$_REQUEST['kate'] ;} else {echo "Semua Kategori";}; ?><small class="pull-right"> <?php echo $count; ?> buku tersedia </small></h3>

<hr class="soft"/>

<hr class="soft"/>

<div id="myTab" class="pull-right">

</div>

<br class="clr"/>

<div class="tab-content">

<div class="tab-pane active"

id="blockView">

<ul class="thumbnails">

<?php

while ($dams = mysql_fetch_array($aces)) {

?>

<li class="span3">

<div class="thumbnail">

page=detail&id=<?php echo $dams['kd_produk']

;?>"><img src="admin/uploads/<?php echo

$dams['gambar'] ;?>" alt="<?php echo

$dams['kd_produk'] ;?><?php echo

$dams['nm_produk'] ;?>"/></a>

<div class="caption">

<h5><?php echo $dams['nm_produk'] ;?></h5>

<p align="justify">

<?php //echo substr($dams['ket'], 0, 50) ;?>..

</p>

<h4 style="text- align:center"><a class="btn" href="?

page=detail&id=<?php echo $dams['kd_produk']

;?>"> <i class="icon-zoom-in"></i></a>

<a class="btn btn-primary" href="?page=detail&id=<?php echo $dams['kd_produk'] ;?>"><?php echo rupiah($dams['harga']) ;?></a></h4>

</div>

</div>

</li>

<?php } ?>

</ul>

<hr class="soft"/>

<div class="pagination">

</div>

<br class="clr"/>

</div>

</div>

</div>

3. Info bayar.php

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" <div class="span9">

<ul class="breadcrumb">

<li><a

href="index.php">Home</a> <span class="divider">/</span></li>

<li class="active">Info Bayar</li>

</ul>

<h3><strong>Info Pembayaran</strong></h3>

<hr>

<?php

$dams = mysql_fetch_array($ace)

?>

<?php echo $dams['info'] ;?>

<br><br><br>

</div>

4. Hubungi Kami (hubungi_kami.php)

<!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>

<link href="default.css" rel="stylesheet"

type="text/css" />

<link href="default.css" rel="stylesheet"

type="text/css" />

<style type="text/css">

<!-- .style4 {

font-weight: bold;

color: #000000;

font-style: italic;

}

.style15 {font-family: Tahoma; color: #FFFFFF;

font-weight: bold; } .style20 {

font-family: Tahoma;

font-size: 12px;

color: #FFFFFF;

}

.style21 {

font-family: Tahoma;

font-size: 12;

color: #000000;

}

.style22 {

font-size: 24px;

font-weight: bold;

}

.style23 {color: #CC00CC}

.style2 {font-family: Tahoma; font-size: 12px; } .style24 {color: #000000}

.style26 {font-size: 10px}

.style27 {font-size: 10}

.style29 {color: #000000; font-size: 12px; } .style30 {font-size: 12px}

.style5 {font-family: Tahoma; font-size: 12px; font- weight: bold; }

.style7 {font-family: Tahoma; font-size: 14px; } -->

78

</style>

</head>

<body>

<table width="531" border="0" align="center"

cellpadding="0" cellspacing="0">

<!--DWLayoutTable-->

<tr >

<td width="531" ><p align="justify"

class="style4">Hubungi Kami...! </p> </td>

</tr>

<tr >

<td><p align="justify"

class="style21">&nbsp;</p>

<p>Head office

</p></td>

</tr>

<tr >

<td><div align="center"></div></td>

</tr>

<tr >

<td><!--DWLayoutEmptyCell-->&nbsp;</td>

</tr>

</table>

</body>

</html>

5. Bukutamu (gb.php)

<?

$tabel='buku_tamu';

$page='gb';

$key='no';

$nama=$_POST['nama'];

$email=$_POST['email'];

$pesan=$_POST['pesan'];

if($_POST['save']=="Submit") {

if (!$nama||!$email||!$pesan) {

echo"<script>alert('Form belum terisi dengan

baik',document.location.href='javascript:hist ory.back(0)')</script>";

}

else{

$insert = "insert into $tabel values ('','$nama','$email','$pesan')";

$q= mysql_query($insert) or die(mysql_error());

if($q)

{

echo "<script>

window.alert('Buku tamu telah disimpan');

location.href='index.php?

page=$page'

</script>";

}else {

echo "<script>

window.alert('Buku tamu gagal disimpan');

location.href='index.php?

page=$page'

</script>";

}}}

?>

<style type="text/css">

<!--

.style2 {font-family: Tahoma; font-size:

12px; } -->

</style>

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

type="text/css" />

<style type="text/css">

<!--

.style7 {color: #000000;

font-family: Tahoma;

} .style8 {

color: #CC0000;

font-weight: bold;

font-family: Tahoma;

}

.style10 {

color: #0000FF;

font-weight: bold;

font-style: italic;

font-family: "Courier New", Courier, monospace;

} -->

</style>

<form id="form1" name="form1"

method="post" action="?page=<?=$page?

>">

<table width="514" border="0"

cellpadding="0" cellspacing="0">

<tr>

<td><table width="506" align="left"

onfocus="MM_validateForm('nid','','NisNu m');return document.MM_returnValue">

<tr>

<td>&nbsp;</td>

valign="top">&nbsp;</td>

</tr>

<tr>

<td>&nbsp;</td>

<td valign="top"><span

class="style8">Silahkan Anda mengisi buku tamu kami....^_^ </span></td>

</tr>

<tr>

<td>&nbsp;</td>

<td valign="top">&nbsp;</td>

</tr>

<tr>

<td width="150"><div align="left">Nama</div></td>

<td valign="top"><div align="left">:

<input name="nama" type="text"

class="whiteSubmit" id="nama"

size="40" />

</b></div></td>

</tr>

<tr>

<td>Email</td>

<td>:

<input name="email" type="text"

class="whiteSubmit" id="email"

size="40" /></td>

</tr>

<tr>

<td><div

align="left">Pesan</div></td>

<td><div align="left">:

<textarea name="pesan" cols="40"

rows="5" id="pesan">

</textarea>

</div></td>

</tr>

<tr>

<td>&nbsp;</td>

<td>&nbsp;</td>

</tr>

<tr>

<td>&nbsp;</td>

<td><? echo

"<INPUT TYPE=\"submit\" name=\"save\"

value=\"Submit\">";

?></td>

</tr>

</table></td>

</tr>

<tr>

<td>&nbsp;</td>

</tr>

<td><table width="484" border="0"

align="left" cellpadding="2"

cellspacing="0">

<tr >

<td height="24" colspan="2"

align="center">&nbsp;</td>

</tr>

<?

$qsel=mysql_query("select * from buku_tamu ")or die(mysql_error());

$no=0;

while($row = mysql_fetch_array($qsel))

{ $no++;

?>

<tr

onmouseover="this.style.backgroundColor='

#EAEAEA'"

onmouseout="this.style.backgroundColor=

&quot;&quot;" >

<td width="33" height="24"

align="center" ><span class="style2">

<?=$no?>

</span></td>

<?

?>

<td width="714" ><div align="left"

class="style2"> &nbsp;<b>

<?=$row[nm_pengirim]?>

</b>-- <font color="#FF0000">

<?=$row[email]?>

</font></div></td>

</tr>

<tr >

<td height="24"

align="center"></a>&nbsp;</td>

<td ><div align="justify"

class="style7">

<?=$row[isi_bukutamu]?

></div></td>

</tr>

<?

}?>

</table></td>

</tr>

<tr>

<td>&nbsp;</td>

Dokumen terkait