| 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
if($_GET['action']=='cancel')
{
session_unregister("cart");
session_unregister("num_cart");
}
?>
<?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-9">
<!-- /.cart -->
<div style="margin-bottom:15px;">
<div class="head_bg_right"> ตะกร้าสินค้า</div>
<div class="row" style="padding-top:10px;margin-bottom:10px;">
<style>
.tb_cart td{ padding:10px;}
</style>
<div class="col-md-12">
<form action="Del_phone.php" method="post" >
<button type="submit" class="btn btn-warning">ลบเบอร์</button><br><br>
<table width="100%" border="1" align="center" class="tb_cart table">
<tr align="center">
<td>#</td>
<td>หมายเลข</td>
<td>เครือข่าย</td>
<td>หมวด</td>
<td>ผลรวม</td>
<td>ราคา</td>
<td>สถานะ</td>
</tr>
<?php
$array_cart = array_unique($_SESSION["cart"]);
foreach( $array_cart as $id_number )
{
$sql = array('table'=>'phonenumber','where'=>"id = '". $id_number."'");
$view_sql = $view_db->view($sql);
$row = $view_db->q($view_sql);
?>
<tr align="center">
<td><input type="checkbox" name="del[]" value="<?php echo $row['phonenumber'];?>"></td>
<td><?php echo $Phone_class->phonenumber($row['phonenumber']); ?></td>
<?php
$sql_type = array('table'=>'mobilenetwork','where'=>"id = '". $row['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="38" height="19"></td>
<td>-</td>
<td><?php echo $Phone_class->phonenumber_total($row['phonenumber'])?></td>
<td><?php echo $row['price'];//number_format($row['price'], 2, '.', ',');?></td>
<td>-</td>
</tr>
<?php
$p_price = str_replace("," , "" ,$row['price']);
$sum_price = $sum_price + $p_price;
}
?>
<tr align="center" style="font-size:16px;font-weight:bold;">
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td>รวมเป็นเงิน</td>
<td><?php echo number_format($sum_price);?> บาท</td>
</tr>
</table>
<div class="row">
<div class="col-md-4"></div>
<div class="col-md-3 col-md-offset-5">
<div class="form-group" align="right">
<label for="exampleInputEmail1">รหัสส่วนลด</label>
<input type="text" class="form-control" name="code" id="code" placeholder="">
</div>
</div>
</div>
<div style="padding:10px 0;" align="right">
<a href="../home/index.php" type="button" class="btn btn-link" style="margin-top:13px;" >เลือกซื้อสินค้าต่อ</a>
<a href="index.php?action=cancel" type="button" class="btn btn-danger" style="margin-top:13px;" >ยกเลิกการสั่งซื้อ </a>
<button type="button" class="btn btn-success btn-lg" onClick="checkout_1()">ยืนยันการสั่งซื้อ</button>
</div>
</form>
</div>
<form name="checkout1" id="checkout1" action="checkout.php" method="post">
<input type="hidden" name="confirm" value="cm1">
<input type="hidden" class="form-control" name="discount" id="discount" placeholder="">
</form>
<script>
function checkout_1()
{
document.getElementById('discount').value = document.getElementById('code').value;
document.getElementById("checkout1").submit();
}
</script>
</div>
</div>
<!-- /.cart -->
</div>
</div>
</div>
<!-- /.body -->
<?php include('../include/footer.php')?>
<?php include('../include/footer_js.php')?>