PHP MySQL Ecommerce Web Design Part 10
1. Buat file .PHP dengan nama clothingOrder_list.php di dalam folder admin
Buka Notepad++, pilih File, klik Open, cari file clothingOrder_list.php di dalam folder admin. Isikan sama seperti script warna biru di bawah lalu jangan lupa di-save :
<?php include_once("check_admin.php"); ?>
<?php
// Error Reporting
error_reporting(E_ALL);
ini_set('display_errors','1');
?>
<?php
// Delete item question to admin and delete product if choosen
if(isset($_GET['deleteid'])){
echo 'Do you really want to delete product with ID of'
.$_GET['deleteid'].
'?<a href="clothingOrder_list.php?yesdelete='.$_GET['deleteid'].'">
Yes</a> | <a href="clothingOrder_list.php">No</a>';
exit();
}
if(isset($_GET['yesdelete'])){
// remove item from system and delete its picture
// delete from database
$id_to_delete=$_GET['yesdelete'];
$sql=mysql_query("DELETE FROM clothingOrders
WHERE or_id='$id_to_delete' LIMIT 1") or die (mysql_error());
// unlink the image from server
if(file_exists($pictodelete)){
unlink($pictodelete);
}
// and reload page
header("location:clothingOrder_list.php");
exit();
} // closing if
?>
<?php
// This block grabs the whole list for viewing
$order_list="";
if(isset($_POST['submitDate'])){
$dateFrom=mysql_real_escape_string($_POST['dateFrom']);
$_SESSION['dateFrom']=$dateFrom;
$dateTo=mysql_real_escape_string($_POST['dateTo']);
$_SESSION['dateTo']=$dateTo;
$betweenDateOrder=mysql_real_escape_string($_POST['betweenDateOrder']);
$_SESSION['betweenDateOrder']=$betweenDateOrder;
$sql2=mysql_query("SELECT clothingOrders.or_id, customer.customer_name,
clothingOrders.date_added, clothingOrders.status, clothingOrders.date_shipped
FROM clothingOrders INNER JOIN customer ON clothingOrders.c_id=customer.c_id
AND clothingOrders.date_added BETWEEN '$dateFrom' and '$dateTo'
'$betweenDateOrder' ");
if(isset($_GET['pid'])){
$targetID=$_GET['pid'];
$sql2=mysql_query("SELECT clothingOrders.or_id, customer.customer_name,
clothingOrders.date_added, clothingOrders.status, clothingOrders.date_shipped
FROM clothingOrders INNER JOIN customer ON clothingOrders.c_id=customer.c_id
AND customer.c_id = '$targetID' AND clothingOrders.date_added
BETWEEN '$dateFrom' and '$dateTo' '$betweenDateOrder'");
} // closing if ...
}else{
$sql2=mysql_query("SELECT clothingOrders.or_id, customer.customer_name,
clothingOrders.date_added, clothingOrders.status, clothingOrders.date_shipped
FROM clothingOrders INNER JOIN customer ON clothingOrders.c_id=customer.c_id ");
} // closing if ...
if (!empty($sql2)){ // tambahan untuk hilangkan error saat tabel products kosong
$orderCount=mysql_num_rows($sql2); // count the output amount
if($orderCount>0){
while($row=mysql_fetch_array($sql2)){
$or_id=$row["or_id"];
$bill_name=$row["customer_name"];
$date_added=strftime("%d-%m-%Y", strtotime($row["date_added"]));
$status=$row["status"];
$date_shipped=strftime("%d-%m-%Y", strtotime($row["date_shipped"]));
$order_list.='<div id="orderlist2">';
$order_list.='<div id="orderlist_A1">'.$or_id.'</div>';
$order_list.='<div id="orderlist_B1">'.$bill_name.'</div>';
$order_list.='<div id="orderlist_C1">'.$date_added.'</div>';
$order_list.='<div id="orderlist_D1">'.$status.'</div>';
$order_list.='<div id="orderlist_E1">'.$date_shipped.'</div>';
$order_list.="<div id='orderlist_F1'>
<a href='clothing_printout.php?pid=$or_id'>
<button>View</button></a>
<a href='shipping_resi.php?pid=$or_id'>
<button>Shipped</button></a>
<a href='clothingOrder_list.php?deleteid=$or_id'>
<button>Delete</button></a>
</div>";
$order_list.='</div>';
} // closing while ...
}else{
$order_list="You have no customer order listed";
} // closing if ...
} else{
$order_list="You have no customer order listed";
} //END tambahan untuk hilangkan error saat products table kosong
// After done scripting close any mysql connection
mysql_close();
?>
<!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=utf-8" />
<title>Clothing Order List</title>
<!---------------------- LINK -------------------------->
<?php include_once("template_links_head2.php"); ?>
<!---------------------- END of LINK -------------------------->
</head>
<body>
<div id="wrapper">
<div id="contentOrder" style="font-size:14px; font-family:'Trebuchet MS',
Arial, Helvetica, sans-serif">
<div id="pagNumTopOL" align="left" style="font-family:'Trebuchet MS',
Arial, Helvetica, sans-serif; font-size:14px">
</div> <!--- END pagNum --->
<br />
<br />
<?php include("clothing_betweenDateO.php"); ?>
<br />
<center><h2>ORDER LIST</h2></center>
<a href="customer_list.php" style="text-decoration:none"><input name="home"
type="button" value="<- Customer List" style="font-size:15px;
font-family:'Trebuchet MS', Arial, Helvetica, sans-serif" /></a>
<a href="index.php" style="text-decoration:none"><input name="home"
type="button" value="<- Home" style="font-size:15px;
font-family:'Trebuchet MS', Arial, Helvetica, sans-serif" /></a>
<br />
<br />
<div id="orderlist" style="font-size:13px; font-family:'Trebuchet MS',
Arial, Helvetica, sans-serif">
<div id="orderlist_A">ID</div>
<div id="orderlist_B">Customer Name</div>
<div id="orderlist_C">Date Added</div>
<div id="orderlist_D">Status</div>
<div id="orderlist_E">Date Shipped</div>
<div id="orderlist_F">View/Shipped/Delete</div>
</div> <!--- END orderlist --->
<div id="orderlistWraper">
<?php echo $order_list; ?>
</div>
</div><!--- END contentOrder --->
</div><!--- END Wrapper --->
<?php include_once("../template_js_body.php"); ?>
</body>
</html>
2. Buat file .PHP dengan nama clothing_betweenDateO.php di dalam folder admin
Buka Notepad++, pilih File, klik Open, cari file clothing_betweenDateO.php di dalam folder admin. Isikan sama seperti script warna biru di bawah lalu jangan lupa di-save :
<div id="searchContainer">
<div align="left">
<form id="betweenDate" name="betweenDate" method="post"
action="clothingOrder_list.php" style="font-size:15px;
font-family:'Trebuchet MS', Arial, Helvetica, sans-serif">
<input name="dateFrom" type="text" id="datepicker"
size="15" placeholder="Dari Tanggal" style="font-size:15px;
font-family:'Trebuchet MS', Arial, Helvetica, sans-serif" />
<input name="dateTo" type="text" id="datepicker2"
size="15" placeholder="Sampai Tanggal" style="font-size:15px;
font-family:'Trebuchet MS', Arial, Helvetica, sans-serif" />
<select name="betweenDateOrder" id="betweenDateOrder"
style="font-size:15px; width: 100px; font-family:'Trebuchet MS',
Arial, Helvetica, sans-serif">
<option value="order by order.date_added desc">--order by--</option>
<option value="order by order.stock_id asc">ID</option>
<option value="order by customer.customer_name asc">Customer Name</option>
<option value="order by order.date_added desc">Date Added</option>
<input type="submit" name="submitDate" id="submitDate" value="Go"
style="font-size:15px; font-family:'Trebuchet MS',
Arial, Helvetica, sans-serif"/>
</form>
</div> <!--- END --->
</div><!--- END searchContainer --->
3. Buat file .PHP dengan nama clothing_printout.php di dalam folder admin
Buka Notepad++, pilih File, klik Open, cari file clothing_printout.php di dalam folder admin. Isikan sama seperti script warna biru di bawah lalu jangan lupa di-save :
<?php include_once("check_admin.php"); ?>
<?php
// Error Reporting
error_reporting(E_ALL);
ini_set('display_errors','1');
?>
<?php
if(isset($_GET['pid'])){
$targetID=$_GET['pid'];
$sqlR=mysql_query("SELECT * FROM resi WHERE or_id='$targetID'");
while($row=mysql_fetch_array($sqlR)){
$nomorresi=$row["nomor_resi"];
}
$sql=mysql_query("SELECT clothingOrders.or_id, clothingOrders.order_detail,
clothingOrders.ship_name, clothingOrders.ship_phone,
clothingOrders.ship_address, clothingOrders.ship_city,
clothingOrders.shipPrice, clothingOrders.date_added, clothingOrders.status,
customer.customer_name, customer.phone, customer.address, customer.city
FROM clothingOrders
INNER JOIN customer
ON clothingOrders.c_id=customer.c_id
");
$orderCount=mysql_num_rows($sql); // count the output amount
if($orderCount>0){
while($row=mysql_fetch_array($sql)){
$or_id=$row["or_id"];
if ($or_id===$targetID){
$order_d=$row["order_detail"];
$_SESSION["order_d"]=unserialize($row["order_detail"]);
$bill_name=$row["customer_name"];
$bill_phone=$row["phone"];
$bill_address=$row["address"];
$bill_city=$row["city"];
$ship_name=$row["ship_name"];
$ship_phone=$row["ship_phone"];
$ship_address=$row["ship_address"];
$ship_city=$row["ship_city"];
$shipPrice=$row["shipPrice"];
$date_added=strftime("%b %d, %y", strtotime($row["date_added"]));
$status=$row["status"];
} // closing if
} // closing while
}else{
$order_list="The order is not listed!";
exit();
} // closing if ...
} // closing if ...
?>
<!--------------------- for VIEWING ---------------->
<?php
include_once("clothing_if_order_d_printout.php");
?>
<?php
////// dipakai hanya untuk kombinasi nomor pesanan ///////
@$qtySum=$i_qty1+$i_qty2+$i_qty3+$i_qty4+$i_qty5;
//////////////////////////////////////////////////////////
@$cartTotal=$total_price1+$total_price2+$total_price3+$total_price4+
$total_price5;
$cartTotalF=number_format($cartTotal,0,',','.');
$shipPriceF=number_format($shipPrice,0,',','.');
@$totalBuy=$cartTotal+$shipPrice;
$totalBuyF=number_format($totalBuy,0,',','.');
?>
<!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=utf-8" />
<title>Clothing Printout</title>
<!---------------------- LINK -------------------------->
<?php include_once("template_links_head2.php"); ?>
<!---------------------- END of LINK -------------------------->
<script type="text/javascript" src="../js/swipebox/jquery.swipebox.js"></script>
</head>
<body>
<div id="wrapper">
<div id="contentPrintout">
<div id="contentBill">
<div id="headerP">
<?php include_once("template_logoP2.php");?>
</div><!--- END headerP --->
<div align="right" style="font-size:18px; margin-right:20px;
font-family:'Trebuchet MS', Arial, Helvetica, sans-serif">
Status:
<?php
if (!empty($_SESSION["order_d"])){
echo $status;
}else{
echo "";
}
?>
</div>
<br/>
<?php
// jika $status = SHIPPED maka:
if ($status==="SHIPPED"){
?>
<span style="font-size:18px; margin-left:35px;
font-family:'Trebuchet MS', Arial, Helvetica, sans-serif">
Nomor Resi:</span>
<?php echo $nomorresi; ?>
<?php
}else{ // jika tidak:
?>
<span style="font-size:18px; margin-left:35px;
font-family:'Trebuchet MS', Arial, Helvetica, sans-serif">
Nomor Pesanan:</span>
<?php echo $cartTotal; ?>
<?php echo "-"?>
<?php echo $qtySum; ?>
<?php echo "-"?>
<?php echo $or_id; ?>
<br />
<?php
}
?>
<div id="bill_to" align="left">
<div id="bill_to_left">
<span style="font-size:18px; margin-left:0px;
font-family:'Trebuchet MS', Arial, Helvetica, sans-serif">
Pesanan Atas Nama: </span>
<br />
<div style="font-size:15px; margin-left:0px;
font-family:'Trebuchet MS', Arial, Helvetica, sans-serif">
Name:
<font color='#0000FF' style='font-size:15px'>
<?php if (!empty($_SESSION["order_d"])){
echo $bill_name;
} else{
echo "";}
?>
</font>
<br />
Phone:
<font color='#0000FF' style='font-size:15px'>
<?php if (!empty($_SESSION["order_d"])){
echo $bill_phone;
} else{
echo "";}
?>
</font>
<br />
Address:
<font color='#0000FF' style='font-size:15px'>
<?php if (!empty($_SESSION["order_d"])){
echo $bill_address;
} else{
echo "";}
?>
</font>
<br />
City:
<font color='#0000FF' style='font-size:15px'>
<?php if (!empty($_SESSION["order_d"])){
echo $bill_city;
} else{
echo "";}
?>
</font>
<br />
</div>
</div> <!--- END bill_to_left --->
<div id="bill_to_right">
<span style="font-size:18px; margin-left:0px;
font-family:'Trebuchet MS', Arial, Helvetica, sans-serif">
Pesanan Dikirim Ke:</span>
<br />
<div style="font-size:15px; margin-left:0px;
font-family:'Trebuchet MS', Arial, Helvetica, sans-serif">
Name:
<font color='#0000FF' style='font-size:15px'>
<?php
if (!empty($_SESSION["order_d"])){
echo $ship_name;
} else{
echo "";}
?>
</font>
<br />
Phone:
<font color='#0000FF' style='font-size:15px'>
<?php if (!empty($_SESSION["order_d"])){
echo $ship_phone;
} else{
echo "";}
?>
</font>
<br />
Address:
<font color='#0000FF' style='font-size:15px'>
<?php if (!empty($_SESSION["order_d"])){
echo $ship_address;
} else{
echo "";}
?>
</font>
<br />
City:
<font color='#0000FF' style='font-size:15px'>
<?php if (!empty($_SESSION["order_d"])){
echo $ship_city;
} else{
echo "";}
?>
</font>
<br />
</div>
</div> <!--- END bill_to_right --->
</div> <!--- END bill_to --->
<div style="padding-left:35px">
<a href="clothingOrder_list.php" style="text-decoration:none">
<input name="back" type="button" value="<< Back"
style="font-size:15px; font-family:'Trebuchet MS',
Arial, Helvetica, sans-serif" /></a>
</div>
<div id="bill_cart" style="font-weight:bold">
<div id="bill_prod">Product</div>
<div id="bill_desc">Description</div>
<div id="bill_uprice">Unit Price</div>
<div id="bill_qty">Qty</div>
<div id="bill_price">Total Price</div>
</div><!--END bill_cart -->
<?php
include_once("clothing_viewOrder_printout.php");
?>
<!----------------------TOTAL ----------------------------------->
<div id="bill_tot" style="font-size:15px;
font-family:'Trebuchet MS', Arial, Helvetica, sans-serif">
<div id="bill_tot1">Sub Total Belanja : </div>
<div id="bill_tot2">
<?php
if (!empty($_SESSION["order_d"])){
echo 'Rp '.$cartTotalF;
}else{
echo "";
}
?>
</div>
<div id="bill_tot3">Discount : </div>
<div id="bill_tot4"> </div>
<div id="bill_tot7"> </div>
<div id="bill_tot8">
<?php
if (!empty($_SESSION["order_d"])){
echo 'Rp '.$totalBuyF;
}else{
echo "";
}
?>
</div>
<div id="bill_tot9">
<a href="clothingOrder_list.php" style="text-decoration:none">
<input name="back" type="button" value="<< Back"
style="font-size:15px; font-family:'Trebuchet MS',
Arial, Helvetica, sans-serif" />
</a>
<br />
<br />
</div>
<div id="bill_tot10" style="font-size:13px; color:blue;
font-family:'Trebuchet MS', Arial, Helvetica, sans-serif">
<?php
// jika $status = PAID/SHIPPED maka:
//if(!empty ($stock_amount)|| $stock_amount !=0 || $stock_amount>0 ) {
if ($status==="PAID" || $status==="SHIPPED" ) {
?>
<span style="font-size:18px; margin-left:35px;
font-family:'Trebuchet MS', Arial, Helvetica, sans-serif">
Slip :<br /></span>
<?php echo "<a href='../konfirmasi_images/" . $targetID . ".jpg' title='slip'
class='swipebox' rel='img_gallery'>
<img src='../konfirmasi_images/" . $targetID . ".jpg'
width='130' height='60' alt='x' class='one-edge-shadow'
style='border-color:blue; border-style:solid; border-width:0px' />
</a>
";
?>
<?php
}else{ // jika tidak:
?>
<?php
}
?>
</div>
</div>
<!----------------------END of TOTAL ----------------------------->
</div><!--- END contentBill --->
</div><!--- END contentPrintout --->
</div><!--- END Wrapper --->
<?php include_once("../template_js_body.php"); ?>
</body>
</html>
4. Buat file .PHP dengan nama clothing_if_order_d_printout.php di dalam folder admin
Buka Notepad++, pilih File, klik Open, cari file clothing_if_order_d_printout.php di dalam folder admin. Isikan sama seperti script warna biru di bawah lalu jangan lupa di-save :
<?php
if (isset($_SESSION["order_d"])){
$tmpA=$_SESSION["order_d"];
$sqlStock=mysql_query("SELECT*FROM clothingStock");
while($row=mysql_fetch_array($sqlStock)){
$stock_id=$row["stock_id"];
$product_name=$row["product_name"];
$color=$row["color"];
$size=$row["size"];
$sqlProd=mysql_query("SELECT*FROM clothing");
while($row=mysql_fetch_array($sqlProd)){
$product_price=$row["product_price"];
$product_priceF=number_format($product_price,0,',','.');
$product_brand=$row["product_brand"];
$category=$row["category"];
$subcategory=$row["subcategory"];
$bahan1=$row["bahan"];
$product_details=$row["product_details"];
///////////////////////// 1 ////////////////////////
if(array_key_exists(0, $tmpA)){
$i_qty1=$tmpA[0]['quantity'];
$i_id1=$tmpA[0]['item_id'];
if ($i_id1==$stock_id){
$product_name1=$row["product_name"];
$product_price1=$row["product_price"];
$product_price1F=number_format($product_price1,0,',','.');
$product_brand1=$row["product_brand"];
$category1=$row["category"];
$subcategory1=$row["subcategory"];
$bahan1=$row["bahan"];
$color1=$row["color"];
$size1=$row["size"];
$product_details1=$row["product_details"];
// total price ke-1
$total_price1=$product_price1*$i_qty1;
$total_price1F=number_format($total_price1,0,',','.');
}
}else{
echo "";
}
///////////////////////////// 2 ////////////////////////
if(array_key_exists(1, $tmpA)){
$i_qty2=$tmpA[1]['quantity'];
$i_id2=$tmpA[1]['item_id'];
if ($i_id2==$stock_id){
$product_name2=$row["product_name"];
$product_price2=$row["product_price"];
$product_price2F=number_format($product_price2,0,',','.');
$product_brand2=$row["product_brand"];
$category2=$row["category"];
$subcategory2=$row["subcategory"];
$bahan2=$row["bahan"];
$color2=$row["color"];
$size2=$row["size"];
$product_details2=$row["product_details"];
// total price ke-1
$total_price2=$product_price2*$i_qty2;
$total_price2F=number_format($total_price2,0,',','.');
}
}else{
echo "";
}
///////////////////////// 3 ///////////////////////////
if(array_key_exists(2, $tmpA)){
$i_qty3=$tmpA[2]['quantity'];
$i_id3=$tmpA[2]['item_id'];
if ($i_id3==$stock_id){
$product_name3=$row["product_name"];
$product_price3=$row["product_price"];
$product_price3F=number_format($product_price3,0,',','.');
$product_brand3=$row["product_brand"];
$category3=$row["category"];
$subcategory3=$row["subcategory"];
$bahan3=$row["bahan"];
$color3=$row["color"];
$size3=$row["size"];
$product_details3=$row["product_details"];
// total price ke-1
$total_price3=$product_price3*$i_qty3;
$total_price3F=number_format($total_price3,0,',','.');
}
}else{
echo "";
}
////////////////////// 4 ///////////////////////////////
if(array_key_exists(3, $tmpA)){
$i_qty4=$tmpA[3]['quantity'];
$i_id4=$tmpA[3]['item_id'];
if ($i_id4==$stock_id){
$product_name4=$row["product_name"];
$product_price4=$row["product_price"];
$product_price4F=number_format($product_price4,0,',','.');
$product_brand4=$row["product_brand"];
$category4=$row["category"];
$subcategory4=$row["subcategory"];
$bahan4=$row["bahan"];
$color4=$row["color"];
$size4=$row["size"];
$product_details4=$row["product_details"];
// total price ke-1
$total_price4=$product_price4*$i_qty4;
$total_price4F=number_format($total_price4,0,',','.');
}
}else{
echo "";
}
//////////////////// 5 ///////////////////////////////////
if(array_key_exists(4, $tmpA)){
$i_qty5=$tmpA[4]['quantity'];
$i_id5=$tmpA[4]['item_id'];
if ($i_id5==$stock_id){
$product_name5=$row["product_name"];
$product_price5=$row["product_price"];
$product_price5F=number_format($product_price5,0,',','.');
$product_brand5=$row["product_brand"];
$category5=$row["category"];
$subcategory5=$row["subcategory"];
$bahan5=$row["bahan"];
$color5=$row["color"];
$size5=$row["size"];
$product_details5=$row["product_details"];
// total price ke-1
$total_price5=$product_price5*$i_qty5;
$total_price5F=number_format($total_price5,0,',','.');
}
}else{
echo "";
}
} //closing while ...
} // closing while ...
} // closing if ...
?>
5. Buat file .PHP dengan nama clothing_viewOrder_printout.php di dalam folder admin
Buka Notepad++, pilih File, klik Open, cari file clothing_viewOrder_printout.php di dalam folder admin. Isikan sama seperti script warna biru di bawah lalu jangan lupa di-save :
<!----------------------------1------------------------------->
<?php
// jika tidak ada array maka bill_cart1 tidak terlihat
if(array_key_exists(0, $tmpA)){
?>
<div id="bill_cart1" >
<div id="bill_prod1">
<?php
if(array_key_exists(0, $tmpA)){
echo "<img class='goyang100'
src='../clothing_stock_images1/" . $i_id1 . ".jpg'
width='60' height='60' alt='x' class='one-edge-shadow'
style='border-color:blue; border-style:solid; border-width:0px' />";
echo $product_name1;
echo " ";
echo "<font color='#0000FF' style='font-size:13px'>";
echo "$product_brand1 $category1 $bahan1 $subcategory1";
echo "</font>";
}else{
echo "";
}
?>
</div>
<div id="bill_desc1">
<?php
if(array_key_exists(0, $tmpA)){
echo $color1.' • ';
echo $size1;
}else{
echo "";
}
?>
</div>
<div id="bill_uprice1">
<?php
if(array_key_exists(0, $tmpA)){
echo $product_price1F;
}else{
echo "";
}
?>
</div>
<div id="bill_qty1">
<?php
if(array_key_exists(0, $tmpA)){
echo $i_qty1;
}else{
echo "";
}
?>
</div>
<div id="bill_price1">
<?php
if(array_key_exists(0, $tmpA)){
echo $total_price1F;
}else{
echo "";
}
?>
</div>
</div><!-- END bill_cart1 -->
<?php
// END jika tidak ada array maka bill_cart1 tidak terlihat
}
?>
<!----------------------------2------------------------------->
<?php
// jika tidak ada array maka bill_cart1 tidak terlihat
if(array_key_exists(1, $tmpA)){
?>
<div id="bill_cart1" >
<div id="bill_prod1">
<?php
if(array_key_exists(1, $tmpA)){
echo "<img class='goyang100'
src='../clothing_stock_images1/" . $i_id2 . ".jpg'
width='60' height='60' alt='x' class='one-edge-shadow'
style='border-color:blue; border-style:solid; border-width:0px' />";
echo $product_name2;
echo " ";
echo "<font color='#0000FF' style='font-size:13px'>";
echo "$product_brand2 $category2 $bahan2 $subcategory2";
echo "</font>";
}else{
echo "";
}
?>
</div>
<div id="bill_desc1">
<?php
if(array_key_exists(1, $tmpA)){
echo $color2.' • ';
echo $size2;
}else{
echo "";
}
?>
</div>
<div id="bill_uprice1">
<?php
if(array_key_exists(1, $tmpA)){
echo $product_price2F;
}else{
echo "";
}
?>
</div>
<div id="bill_qty1">
<?php
if(array_key_exists(1, $tmpA)){
echo $i_qty2;
}else{
echo "";
}
?>
</div>
<div id="bill_price1">
<?php
if(array_key_exists(1, $tmpA)){
echo $total_price2F;
}else{
echo "";
}
?>
</div>
</div><!-- END bill_cart1 -->
<?php
// END jika tidak ada array maka bill_cart1 tidak terlihat
}
?>
<!----------------------------3------------------------------->
<?php
// jika tidak ada array maka bill_cart1 tidak terlihat
if(array_key_exists(2, $tmpA)){
?>
<div id="bill_cart1" >
<div id="bill_prod1">
<?php
if(array_key_exists(2, $tmpA)){
echo "<img class='goyang100'
src='../clothing_stock_images1/" . $i_id3 . ".jpg'
width='60' height='60' alt='x' class='one-edge-shadow'
style='border-color:blue; border-style:solid; border-width:0px' />";
echo $product_name3;
echo " ";
echo "<font color='#0000FF' style='font-size:13px'>";
echo "$product_brand3 $category3 $bahan3 $subcategory3";
echo "</font>";
}else{
echo "";
}
?>
</div>
<div id="bill_desc1">
<?php
if(array_key_exists(2, $tmpA)){
echo $color3.' • ';
echo $size3;
}else{
echo "";
}
?>
</div>
<div id="bill_uprice1">
<?php
if(array_key_exists(2, $tmpA)){
echo $product_price3F;
}else{
echo "";
}
?>
</div>
<div id="bill_qty1">
<?php
if(array_key_exists(2, $tmpA)){
echo $i_qty3;
}else{
echo "";
}
?>
</div>
<div id="bill_price1">
<?php
if(array_key_exists(2, $tmpA)){
echo $total_price3F;
}else{
echo "";
}
?>
</div>
</div><!-- END bill_cart1 -->
<?php
// END jika tidak ada array maka bill_cart1 tidak terlihat
}
?>
<!----------------------------4------------------------------->
<?php
// jika tidak ada array maka bill_cart1 tidak terlihat
if(array_key_exists(3, $tmpA)){
?>
<div id="bill_cart1" >
<div id="bill_prod1">
<?php
if(array_key_exists(3, $tmpA)){
echo "<img class='goyang100'
src='../clothing_stock_images1/" . $i_id4 . ".jpg'
width='60' height='60' alt='x' class='one-edge-shadow'
style='border-color:blue; border-style:solid; border-width:0px' />";
echo $product_name4;
echo " ";
echo "<font color='#0000FF' style='font-size:13px'>";
echo "$product_brand4 $category4 $bahan4 $subcategory4";
echo "</font>";
}else{
echo "";
}
?>
</div>
<div id="bill_desc1">
<?php
if(array_key_exists(3, $tmpA)){
echo $color4.' • ';
echo $size4;
}else{
echo "";
}
?>
</div>
<div id="bill_uprice1">
<?php
if(array_key_exists(3, $tmpA)){
echo $product_price4F;
}else{
echo "";
}
?>
</div>
<div id="bill_qty1">
<?php
if(array_key_exists(3, $tmpA)){
echo $i_qty4;
}else{
echo "";
}
?>
</div>
<div id="bill_price1">
<?php
if(array_key_exists(3, $tmpA)){
echo $total_price4F;
}else{
echo "";
}
?>
</div>
</div><!-- END bill_cart1 -->
<?php
// END jika tidak ada array maka bill_cart1 tidak terlihat
}
?>
<!----------------------------5------------------------------->
<?php
// jika tidak ada array maka bill_cart1 tidak terlihat
if(array_key_exists(4, $tmpA)){
?>
<div id="bill_cart1" >
<div id="bill_prod1">
<?php
if(array_key_exists(4, $tmpA)){
echo "<img class='goyang100'
src='../clothing_stock_images1/" . $i_id5 . ".jpg'
width='60' height='60' alt='x' class='one-edge-shadow'
style='border-color:blue; border-style:solid; border-width:0px' />";
echo $product_name5;
echo " ";
echo "<font color='#0000FF' style='font-size:13px'>";
echo "$product_brand5 $category5 $bahan5 $subcategory5";
echo "</font>";
}else{
echo "";
}
?>
</div>
<div id="bill_desc1">
<?php
if(array_key_exists(4, $tmpA)){
echo $color5.' • ';
echo $size5;
}else{
echo "";
}
?>
</div>
<div id="bill_uprice1">
<?php
if(array_key_exists(4, $tmpA)){
echo $product_price5F;
}else{
echo "";
}
?>
</div>
<div id="bill_qty1">
<?php
if(array_key_exists(4, $tmpA)){
echo $i_qty5;
}else{
echo "";
}
?>
</div>
<div id="bill_price1">
<?php
if(array_key_exists(4, $tmpA)){
echo $total_price5F;
}else{
echo "";
}
?>
</div>
</div><!-- END bill_cart1 -->
<?php
// END jika tidak ada array maka bill_cart1 tidak terlihat
}
?>
6. Buka Notepad++, pilih File, klik Open, cari file style.php di dalam folder styleCSS. Isikan sama seperti script warna biru di bawah lalu jangan lupa di-save :
/*--------------- order_list----------------- */
#contentOrder {
-moz-border-radius: 8px 8px 8px 8px; /* for Firefox */
-webkit-border-radius: 8px 8px 8px 8px; /* for Webkit-Browsers */
border-radius: 8px 8px 8px 8px; /* regular */
opacity: 0.8;
margin-right: auto;
margin-left: auto;
font-family: "Trebuchet MS", Arial, Helvetica, sans-serif;
overflow: hidden;
width: 798px;
position: relative;
display: block;
padding: 30px;
border: 1px solid #CCC;
background-color: #FFF;
}
#orderlist {
width: 800px;
height: 35px;
margin: 0px;
float: left;
position: relative;
}
#orderlist_A {
padding: 2px;
float: left;
height: 30px;
width: 80px;
text-align: center;
margin: 0px;
border-bottom-width: 1px;
border-bottom-style: solid;
border-bottom-color: #999;
background-color: #ecf0f1;
}
#orderlist_B {
margin: 0px;
float: left;
height: 30px;
width: 220px;
text-align: center;
padding: 2px;
border-bottom-width: 1px;
border-bottom-style: solid;
border-bottom-color: #999;
background-color: #ecf0f1;
}
#orderlist_C {
text-align: center;
margin: 0px;
padding: 2px;
float: left;
height: 30px;
width: 80px;
border-bottom-width: 1px;
border-bottom-style: solid;
border-bottom-color: #999;
background-color: #ecf0f1;
}
#orderlist_D {
text-align: center;
margin: 0px;
padding: 2px;
float: left;
height: 30px;
width: 80px;
border-bottom-width: 1px;
border-bottom-style: solid;
border-bottom-color: #999;
background-color: #ecf0f1;
}
#orderlist_E {
text-align: center;
margin: 0px;
padding: 2px;
float: left;
height: 30px;
width: 80px;
border-bottom-width: 1px;
border-bottom-style: solid;
border-bottom-color: #999;
background-color: #ecf0f1;
}
#orderlist_F {
text-align: center;
margin: 0px;
padding: 2px;
float: left;
height: 30px;
width: 220px;
border-bottom-width: 1px;
border-bottom-style: solid;
border-bottom-color: #999;
background-color: #ecf0f1;
}
#orderlistWraper {
width: 800px;
position: relative;
overflow: hidden;
padding-bottom: 10px;
}
#orderlist2 {
width: 800px;
height: 35px;
margin: 0px;
float: left;
position: relative;
}
#orderlist_A1 {
padding: 2px;
float: left;
height: 30px;
width: 80px;
text-align: center;
margin: 0px;
border-bottom-width: 1px;
border-bottom-style: solid;
border-bottom-color: #999;
}
#orderlist_B1 {
margin: 0px;
float: left;
height: 30px;
width: 220px;
text-align: center;
padding: 2px;
border-bottom-width: 1px;
border-bottom-style: solid;
border-bottom-color: #999;
}
#orderlist_C1 {
text-align: center;
margin: 0px;
padding: 2px;
float: left;
height: 30px;
width: 80px;
border-bottom-width: 1px;
border-bottom-style: solid;
border-bottom-color: #999;
}
#orderlist_D1 {
text-align: center;
margin: 0px;
padding: 2px;
float: left;
height: 30px;
width: 80px;
border-bottom-width: 1px;
border-bottom-style: solid;
border-bottom-color: #999;
}
#orderlist_E1 {
text-align: center;
margin: 0px;
padding: 2px;
float: left;
height: 30px;
width: 80px;
border-bottom-width: 1px;
border-bottom-style: solid;
border-bottom-color: #999;
}
#orderlist_F1 {
text-align: center;
margin: 0px;
padding: 2px;
float: left;
height: 30px;
width: 220px;
border-bottom-width: 1px;
border-bottom-style: solid;
border-bottom-color: #999;
}
7. Buat folder dengan nama smoothness di dalam folder js
8. Buka website jQuery UI
Pada bagian Widgets, pilih Datepicker
pilih Smoothness, lalu klik Download. Extract file-nya lalu buka foldernya
copy folder folder dengan nama images, jquery-ui.css dan jquery-ui.min.css, lalu pastekan di dalam folder smoothness
9. Buka Notepad++, pilih File, klik Open, cari file template_links_head2.php di dalam folder admin. tambahkan seperti di bawah lalu jangan lupa di-save :
<link href="../js/smoothness/jquery-ui.min.css" rel="stylesheet" type="text/css" />
10. Buka dengan browser 192.168.88.111, pada bagian bawah (footer) klik Admin, User Name: rian, Password: 654321, kemudian klik tombol Lihat Pesanan Clothing
Klik tombol Shipped hanya jika status = PAID (customer sudah melakukan pembayaran)
Klik View untuk membuka jendela clothing_printout.php
Comments
Post a Comment