Documente Academic
Documente Profesional
Documente Cultură
LISTING PROGRAM
1.Coding Index.php
<!--
Shoes Template
http://www.templatemo.com/preview/templatemo_367_shoes
-->
<?php
include("class/BoedyNet.php");
//$_SESSION['IdOperator']=1001;
//unset($_SESSION['IdOperator']);
//echo $_SESSION['IdTransaksi'];
if(!isset($_SESSION['IdTransaksi'])){
$_SESSION['IdTransaksi']=$crud->GetAutoID("i_transaksi","IdTransaksi");
SetTransaksi(false);
function SetTransaksi($statusedit){
global $crud;
$row['IdTransaksi']=$_SESSION['IdTransaksi'];
$row['Tanggal']=date('Y-m-d',getdate()[0]);
$row['Waktu']=date('h:i:s',getdate()[0]);
if(isset($_SESSION['IdCustomer'])) {
$row['IdCustomer']=$_SESSION['IdCustomer'];
}else{
$row['IdCustomer']=1001;
$row['Status']="Proses";
$row['Catatan']="Register";
$row['StatusPembayaran']="Belum Terbayar";
// $row['BiayaPengiriman']=0;
$idtransaksi=$_SESSION['IdTransaksi'];
if($statusedit==true){
$crud->UpdateRecrod($row,"i_transaksi","IdTransaksi='$idtransaksi'");
}else{
$crud->InsertRecord($row,"i_transaksi");
function AddItems($idproduct,$qty,$harga,$diskon){
global $crud;
$idtransaksi=$_SESSION['IdTransaksi'];
$row['IdTransaksi']=$idtransaksi;
$row['IdProduct']=$idproduct;
$row['Harga']=$harga;
// $row['Diskon']=$diskon;
if($crud->GetRowCount($sql)>0){
$qtylama=$crud->GetQuerySQL($sql)[0]['Qty'];
$row['Qty']=$qtylama+$qty;
$crud->UpdateRecrod($row,"i_transaksi_detail","idtransaksi='$idtransaksi' and
IdProduct='$idproduct'");
}else{
$row['Qty']=$qty;
$crud->InsertRecord($row,"i_transaksi_detail");
?>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
/***********************************************
* Smooth Navigational Menu- (c) Dynamic Drive DHTML code library (www.dynamicdrive.com)
</script>
<script src="js/ckeditor/ckeditor.js"></script>
<script type="text/javascript">
ddsmoothmenu.init({
})
</script>
</head>
<body>
<div id="templatemo_body_wrapper">
<div id="templatemo_wrapper">
<div id="templatemo_header">
<div id="header_right">
<p>
<?php
if(isset($_SESSION['IdCustomer'])){
?>
<a href="?pg=pages/register/register.php">My Account</a> | <a
href="?pg=pages/cart/daftar-transaksi.php">My Wishlist</a>
<?php
?>
<?php
if(isset($_SESSION['IdOperator'])){
?>
<?php
}else{
if(!isset($_SESSION['IdCustomer'])){
?>
<?php
}else{
?>
<?php
?></p>
<p>
Shopping Cart: <strong><?php
$idtransaksi=$_SESSION['IdTransaksi'];
$count=$crud->GetRowCount($sql);
echo $count;
</p>
</div>
<div class="cleaner"></div>
<div id="templatemo_menubar">
<ul>
<li><a href="index.php">Home</a></li>
<li><a href="?pg=pages/product-list.php">Products</a></li>
<?php
if(isset($_SESSION['IdOperator'])){
?>
<li><a href="#">Management</a>
<ul>
<li><a href="?pg=pages/profile/forms.php">Profile</a></li>
</ul>
</li>
<li><a href="#">Rekapitulasi</a>
<ul>
</ul>
</li>
<?php
?>
<li><a href="?pg=pages/profile/views.php">Profile</a></li>
<?php
if(isset($_SESSION['IdCustomer'])){
?>
<li><a href="?pg=pages/chackout.php">Checkout</a></li>
<?php
?>
</ul>
</form>
</div>
<div id="templatemo_main">
<h3>Categories</h3>
<div class="content">
<ul class="sidebar_list">
<?php
foreach($crud->GetQuerySQL($sql) as $infoKategori){
$kategori=$infoKategori['Kategori'];
?>
<?php
?>
</ul>
</div>
</div>
<div class="content">
<?php
foreach($crud->GetQuerySQL($sql) as $infoProduct){
?>
<div class="bs_box">
<a href="?pg=pages/product-
detail.php&Kategori=<?=$infoProduct['Kategori']?>&IdProduct=<?=$infoProduct['IdProduct']?>"><img
src="pictures/product/<?=$infoProduct['Picture']?>" width="58" height="58" alt="image" /></a>
<h4><a href="?pg=pages/product-
detail.php&Kategori=<?=$infoProduct['Kategori']?>&IdProduct=<?=$infoProduct['IdProduct']?>"><?=$in
foProduct['NamaProduct']?></a></h4>
<p class="price"><?=number_format($infoProduct['Harga'],0)?></p>
<div class="cleaner"></div>
</div>
<?php
?>
</div>
</div>
</div>
<?php
$pg=$_REQUEST['pg'];
if($pg){
include("$pg");
}else{
?>
<?php
include("pages/slide-view.php");
include("pages/product-gallery.php");
?>
<?php
?>
<div class="cleaner"></div>
</div>
<div id="templatemo_footer">
</p>
</body>
</html>
2. Templatemo.php
/* Credit: http://www.templatemo.com */
/*
Shoes Template
http://www.templatemo.com/preview/templatemo_367_shoes
*/
body {
margin: 0;
padding: 0;
color: #999;
font-size: 12px;
line-height: 1.4em;
background-color: #665f5f;
background-repeat: repeat;
background-image: url(images/templatemo_body.jpg)
a.addtocart{ display: inline-block; width: 80px; height: 21px; line-height: 21px; text-align: center; font-
size: 10px; font-weight: bold; color: #333; background: url(images/templatemo_addtocart.png) }
a.detail{ display: inline-block; width: 64px; height: 20px; line-height: 20px; text-align: center; font-size:
10px; font-weight: bold; color: #333; background: url(images/templatemo_detail.png) }
blockquote { border: 1px solid #039fb1; border-left: 5px solid #000; padding: 19px; margin: 20px 0 0 0}
cite a, cite a:link, cite a:visited { font-size: 12px; text-decoration: none; font-style: normal }
cite span { font-weight: 400; color: #333; }
#templatemo_body_wrapper {
width: 100%;
#templatemo_wrapper {
width: 980px;
margin: 0 auto;
#templatemo_header {
width: 960px;
height: 70px;
#templatemo_menubar {
width: 980px;
height: 60px;
#templatemo_main {
width: 940px;
#templatemo_footer {
width: 960px;
text-align: center;
background: url(images/templatemo_footer.png) no-repeat top
#site_title h1 a { display: block; width: 300px; height: 40px; padding-top: 30px; font-size: 25px; letter-
spacing: 4px; color: #2f2f2f; text-align: left; background: url(images/templatemo_logo.pnga) no-repeat
top left }
#templatemo_search { float: right; margin: 10px 30px 0; width: 220px; height: 34px; background:
url(images/templatemo_search_bg.png) }
#templatemo_search form {
margin: 0;
padding: 0;
#templatemo_search .txt_field {
float: left;
display: block;
height: 22px;
line-height: 22px;
width: 170px;
color: #999;
font-size: 12px;
padding: 5px;
font-variant: normal;
border: none;
background: none;
#templatemo_search .sub_btn {
float: right;
display: block;
color: #fff;
height: 33px;
width: 40px;
font-size: 11px;
font-weight: 700;
line-height: 26px;
cursor: pointer;
border: none;
background: none;
.sidebar_box {
position: relative;
background: #f0f0f0;
margin-bottom: 36px;
.sidebar_box h3 { font-size: 14px; font-weight: 700; padding: 0 10px 0 35px; margin: 0; width: 185px;
height: 33px; line-height: 33px; margin-bottom: 0; background:
url(images/templatemo_sidebar_header.png) no-repeat; color: #2f2f2f }
#sidebar .sidebar_list li { display: block; margin: 0; padding: 5px 0; border-top: 1px solid #fff; border-
bottom: 1px solid #d3d3d3 }
.bs_box img { float: left; margin-right: 10px; border: 4px solid #fff }
.bs_box h4 { margin-bottom: 0 }
.product_box {
float: left;
width: 220px;
text-align: center;
padding-bottom: 20px;
.product_box img {
margin-bottom: 5px;
.product_box h3 {
font-size: 11px;
color: #000;
font-weight: 700;
margin-bottom: 10px;
.product_box .product_price {
color: #11bdd1;
font-size: 14px;
font-weight: 700;
margin-bottom: 20px;
.product_box .addtocart {
float: left;
display: block;
.product_box .detail {
float: right;
display: block;
width: 270px;
padding: 5px;
color: #808b98;
background: #fff;
#contact_form form label { display: block; width: 100px; margin-right: 12px; font-size: 11px }
width: 270px;
height: 200px;
padding: 5px;
color: #808b98;
background: #fff;
display: block;
text-align: center;
text-decoration: none;
font-weight: bold;
background-color: #000;
color: #fff;
font-size:11px;
cursor: pointer;
}
#templatemo_footer {
color: #999
#templatemo_footer a {
color: #fff;
/*============================*/
/*============================*/
#slider-wrapper {
float: left;
width: 680px;
height: 300px;
margin-right: 20px;
margin-bottom: 60px;
#slider {
position:relative;
width: 620px;
height: 300px;
background:url(images/loading.gif) no-repeat 50% 50%;
#slider img {
position:absolute;
top:0px;
left:0px;
display:none;
#slider a {
border:0;
display:block;
.nivo-controlNav {
position:absolute;
right: 10px;
bottom: -30px;
.nivo-controlNav a {
display:block;
width:14px;
height:18px;
background:url(images/bullets.png) no-repeat;
text-indent:-9999px;
border:0;
margin-right:3px;
float:left;
.nivo-controlNav a.active {
background-position:0 -18px;
.nivo-directionNav a {
display:block;
width:30px;
height:30px;
background:url(images/arrows.png) no-repeat;
text-indent:-9999px;
border:0;
a.nivo-nextNav {
background-position:-30px 0;
right:15px;
a.nivo-prevNav {
left:15px;
.nivo-caption {
text-shadow:none;
.nivo-caption a {
color:#efe9d1;
text-decoration:underline;
3. Forms.php
<style>
#input-style{
width: 100%;
width: 95%;
padding: 5px;
</style>
<?php
include_once("../../class/BoedyNet.php");
$info=$crud->GetQuerySQL($sql)[0];
?>
<h2>PENDATAAN PROFILE</h2>
<hr>
<div class="checkout">
<tr>
<td width="140">Alamat</td>
</tr>
<tr>
<td width="140">Telpon</td>
</tr>
<tr>
<td width="140">Email</td>
</tr>
<tr>
<td width="140">Fax</td>
</tr>
<tr>
<td>
</td>
</tr>
<tr>
<td width="140"></td>
<td>
<button type="button"
onclick="window.location.href='?pg=pages/profile/views.php'">View Operator</button>
</td>
</tr>
</table>
</div>
</form>
<i id="info"></i>
</div>
<div class="cleaner"></div>
<script src="../../js/jquery.min.js"></script>
<script>
$(function (){
$("#send").submit(function (eve) {
$.ajax({
url:"pages/profile/ajax.php",
type:"POST",
data:new FormData(this),
contentType:false,
processData:false,
$("#info").html(data);
}
});
eve.preventDefault();
});
})
</script>
4.ajax.php
<?php
include_once("../../class/BoedyNet.php");
if(isset($_POST['kirim'])){
$row['Deskripsi']=$_POST['Deskripsi'];
$row['Alamat']=$_POST['Alamat'];
$row['Telpon']=$_POST['Telpon'];
$row['Email']=$_POST['Email'];
$row['Fax']=$_POST['Fax'];
$id=$_POST['IdProfile'];
$crud->UpdateRecrod($row,"i_profile","IdProfile='$id'",false);
5. Contact.php
<!--
Shoes Template
http://www.templatemo.com/preview/templatemo_367_shoes
-->
<head>
/***********************************************
* Smooth Navigational Menu- (c) Dynamic Drive DHTML code library (www.dynamicdrive.com)
***********************************************/
</script>
<script type="text/javascript">
ddsmoothmenu.init({
})
</script>
</head>
<body>
<div id="templatemo_body_wrapper">
<div id="templatemo_wrapper">
<div id="templatemo_header">
<div id="header_right">
<p>
<p>
</p>
</div>
<div class="cleaner"></div>
<div id="templatemo_menubar">
<ul>
<li><a href="index.php">Home</a></li>
<li><a href="products.html">Products</a>
<ul>
</ul>
</li>
<li><a href="about.html">About</a>
<ul>
</ul>
</li>
<li><a href="faqs.html">FAQs</a></li>
<li><a href="checkout.html">Checkout</a></li>
</ul>
<div id="templatemo_search">
</form>
</div>
<div id="templatemo_main">
<div id="sidebar" class="float_l">
<h3>Categories</h3>
<div class="content">
<ul class="sidebar_list">
</ul>
</div>
</div>
<h3>Bestsellers </h3>
<div class="content">
<div class="bs_box">
<p class="price">$10</p>
<div class="cleaner"></div>
</div>
<div class="bs_box">
<p class="price">$12</p>
<div class="cleaner"></div>
</div>
<div class="bs_box">
<p class="price">$20</p>
<div class="cleaner"></div>
</div>
<div class="bs_box">
<p class="price">$8</p>
<div class="cleaner"></div>
</div>
</div>
</div>
</div>
<h1>Contact Us</h1>
<p>Etiam eget leo nisl. Morbi magna enim, lobortis vitae condimentum eu, ultrices a lacus.</p>
<div id="contact_form">
</form>
</div>
</div>
<h5>Primary Office</h5>
660-110 Quisque diam at ligula, <br />
Email: <a
href="mailto:info@yourcompany.com">info@yourcompany.com</a><br/>
<h5>Secondary Office</h5>
Email: <a
href="mailto:contact@yourcompany.com">contact@yourcompany.com</a><br/>
<br />
</div>
</div>
<div class="cleaner"></div>
<div id="templatemo_footer">
<p><a href="#">Home</a> | <a href="#">Products</a> | <a href="#">About</a> | <a
href="#">FAQs</a> | <a href="#">Checkout</a> | <a href="#">Contact Us</a>
</p>
</body>
</html>
6. db_butikshop.php
# ------------------------------------------------------
UNLOCK TABLES;
#
DROP TABLE IF EXISTS `i_customer`;
UNLOCK TABLES;
UNLOCK TABLES;
#
INSERT INTO `i_product` VALUES (38,'Batik Standar','Umum Tak',120000,'Batik dibuat dan di bangun
khas kepulauan lombok','Lombok','5.jpg',1001,5);
UNLOCK TABLES;
UNLOCK TABLES;
UNLOCK TABLES;
UNLOCK TABLES;
#
ALTER TABLE `i_transaksi`