| Server IP : 104.21.37.246 / Your IP : 104.23.243.33 [ Web Server : Apache System : Linux cpanel01wh.bkk1.cloud.z.com 2.6.32-954.3.5.lve1.4.59.el6.x86_64 #1 SMP Thu Dec 6 05:11:00 EST 2018 x86_64 User : cp648411 ( 1354) PHP Version : 7.2.34 Disable Function : NONE Domains : 0 Domains MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /home2/cp648411/public_html/kainumber.com/cart/ |
Upload File : |
<?php include('../include/header.php')?>
<?php $menu = 'cart';?>
<?php
$g_id = base64_decode($_GET['id']);
$order_id = (int)$g_id;
$Oid_id = $order_id;
?>
<?php
if(!is_numeric($Oid_id))
{
?><meta http-equiv="refresh" content="0;URL=../home/index.php"><?php
exit;
}
?>
<?php include('../theme/menu.php')?>
<?php //include('../banner/index.php')?>
<?php include('../theme/category.php')?>
<!-- /.body -->
<div class="container" style="padding-top:25px;">
<div class="row">
<div class="col-md-3"><?php //include('../theme/tab_left.php');?></div>
<div class="col-md-12">
<!-- /.cart -->
<div style="margin-bottom:15px;">
<div class="head_bg_right"> รายการสสั่งซื้อสินค้า</div>
<div class="row" style="padding-top:10px;margin-bottom:10px;">
<div class="col-md-12">
<br>
<link href="../include/Fullscreen-Loading/src/css/HoldOn.css" rel="stylesheet" type="text/css">
<script src="../include/Fullscreen-Loading/jquery-1.11.3.min.js"></script>
<script src="../include/Fullscreen-Loading/src/js/HoldOn.js"></script>
<script>
function testHoldon(themeName){
HoldOn.open({
theme:themeName,
message:"<h4> กำลังโหลดข้อมูล </h4>"
});
/* setTimeout(function(){
HoldOn.close();
},5000);*/
}
function testHoldon_cl(themeName){
/*HoldOn.open({
theme:themeName,
//message:"<h4> กำลังโหลดข้อมูล </h4>"
});*/
setTimeout(function(){
HoldOn.close();
},0);
}
</script>
<script>
function checkform_pm(var_id)
{
testHoldon('sk-circle');
//var str = document.querySelector('input[name=payment]:checked').value;
//alert(str);
var xmlhttp = new XMLHttpRequest();
xmlhttp.onreadystatechange = function() {
if (xmlhttp.readyState == 4 && xmlhttp.status == 200) {
testHoldon_cl('sk-circle');
window.location.href = xmlhttp.responseText;
//document.getElementById("txtHint").innerHTML = xmlhttp.responseText;
}
}
xmlhttp.open("GET", "order_credit_s.php?q="+var_id, true);
xmlhttp.send();
}
</script>
<script type="text/javascript">
function PrintElem(elem)
{
Popup($(elem).html());
}
function Popup(data)
{
var mywindow = window.open('', 'ใบสั่งซื้อสินค้า - kainumber', 'height=500,width=600');
mywindow.document.write('<html><head><title>ใบสั่งซื้อสินค้า - kainumber</title>');
/*optional stylesheet*/ //mywindow.document.write('<link rel="stylesheet" href="main.css" type="text/css" />');
mywindow.document.write('</head><body >');
mywindow.document.write(data);
mywindow.document.write('</body></html>');
mywindow.document.close(); // necessary for IE >= 10
mywindow.focus(); // necessary for IE >= 10
mywindow.print();
mywindow.close();
return true;
}
</script>
<form class="form-horizontal" method="POST" name="from_pm">
<?php
$sql = array('table'=>'orders','where'=>"id = '". $Oid_id."'");
$view_sql = $view_db->view($sql);
$row = $view_db->q($view_sql);
?>
<div id="orders">
<table width="100%" border="0" class="tb_receipt">
<tr>
<td align="right"><img src="../image/text_logotop.png" width="200" class="img-responsive"></td>
</tr>
<tr>
<td>เลขที่ใบสั่งซื้อ : #<?php printf("%06d", $Oid_id);?></td>
</tr>
<tr>
<td>วันที่สั่งสินค้า : <?php echo $util_class->day_m_th_re($row['date_time']); ?></td>
</tr>
</table>
<div style="border:1px solid #FFF;margin-top:15px;padding:5px;">
<table width="100%" border="0" class="tb_receipt">
<tr>
<td>ที่อยู่สำหรับจัดส่งสินค้า</td>
</tr>
<tr>
<td><?php echo $row['name'] .' '. $row['lastname'];?></td>
</tr>
<tr>
<td><?php echo $row['address'] .' '. $row['province'] .' '. $row['zipcode']?></td>
</tr>
<tr>
<td>โทรศัพท์ <?php echo $Phone_class->phonenumber($row['phone']);?></td>
</tr>
</table>
</div>
<br><br>
<table width="100%" border="1" class="table table-default table-bordered">
<thead>
<tr>
<th style="width:60%">สินค้า</th>
<th>เครือข่าย</th>
<th>รวม</th>
</tr>
</thead>
<?php
$discount = '00';
$list2 = array('table'=>'order_detail','where'=>'id_order = "'.$row['id'].'"','order'=> "ORDER BY id DESC");
$view2 = $view_db->view($list2);
$result2 = $view_db->q_re($view2);
while($row2 = $view_db->q_ro($result2))
{
$sql3 = array('table'=>'phonenumber','where'=>"id = '". $row2["id_pho"]."'");
$view3 = $view_db->view($sql3);
$row3 = $view_db->q($view3);
?>
<tr>
<td>
-
<?php echo $Phone_class->phonenumber($row3['phonenumber']); ?></td>
<?php
$sql_type = array('table'=>'mobilenetwork','where'=>"id = '". $row3['mobilenetwork']."'");
$view_type = $view_db->view($sql_type);
$row_type = $view_db->q($view_type);
?>
<td><img src="../redbag/mobilenetwork/<?php echo $row_type['image'];?>" width="30"></td>
<td align="right">
<?php
$price = str_replace("," , "" ,$row3['price']);
echo number_format($price, 2, '.', ',');?>
</td>
</tr>
<?php
$p_price = str_replace("," , "" ,$row3['price']);
$sum_price = $sum_price + $p_price;
//$sumprice = $sumprice + $row2['price'];
}
?>
<tr>
<td></td>
<td>รวม</td>
<td align="right"><?php echo number_format($sum_price, 2, '.', ',');?></td>
</tr>
<?php
//$day_to = date('Y-m-d');
$sql_ds = array('table'=>'code','where'=>"code = '".$row['discount_c']."'");
$view_ds = $view_db->view($sql_ds);
$row_ds = $view_db->q($view_ds);
if($row_ds['id'] > 0)
{
if($row_ds['type'] == 1)
{
$discount_t = $row_ds['money'].' ฿';
$total = $total - $row_ds['money'];
}
if($row_ds['type'] == 2)
{
$discount_t = $row_ds['money'].' %';
$money = $total * $row_ds['money']/100;
$total = $total - $money;
}
?>
<tr>
<td></td>
<td>ส่วนลด</td>
<td align="right"><?php echo $discount_t;?></td>
</tr>
<?php
}
?>
<tr>
<td></td>
<td>ค่าจัดส่ง</td>
<td align="right"><?php echo number_format($row['delivery'], 2, '.', ',');?></td>
</tr>
<tr>
<td></td>
<td style="font-size:16px;font-weight:bold;">ราคารวม</td>
<?php $total = $sum_price + $row['delivery'];?>
<td style="font-size:16px;font-weight:bold;" align="right"><?php echo number_format($total, 2, '.', ','); ?></td>
</tr>
</table>
</div>
<div class="form-group">
<div class="col-sm-5">
<input class="btn btn-default corner_cancel bt_login" type="button" onClick="PrintElem('#orders')" value=" พิมพ์ใบสั่งซื้อ" style="color:#FFF;">
</div>
<div class="col-sm-7" align="right">
<?php
$_SESSION['total'] = $total;
$_SESSION['order_id'] = $id_order;
?>
<input class="btn btn-default corner_cancel bt_login" type="button" value=" ยินยันการชำระเงิน" onClick="checkform_pm(<?php echo $Oid_id?>);" style="color:#FFF;">
<br>
<span style="color:#F00">*ถ้าหากมีการยกเลิกการชำระสินค้า ผ่านบัครเครดิต / เดบิต โดยที่บริษัทไม่ได้เป็นฝ่ายผิดลูกค้าจะต้องเป็นฝ่ายรับผิดชอบ ค่าธรรมเนียม3%+vat</span>
</div>
</div>
<div class="form-group">
<div class="col-sm-12" align="right">
</div>
</div>
</form>
<div id="txtHint"></div>
</div>
</div>
</div>
<!-- /.cart -->
</div>
</div>
</div>
<!-- /.body -->
<?php include('../include/footer.php')?>
<?php include('../include/footer_js.php')?>