SkidSec WebShell

Server Address : 2a02:4780:a:760:0:37cc:13e2:3

Web Server : LiteSpeed

Uname : Linux uk-fast-web660.main-hosting.eu 5.14.0-570.55.1.el9_6.x86_64 #1 SMP PREEMPT_DYNAMIC Tue Oct 21 05:27:51 EDT 2025 x86_64

PHP Version : 7.4.33



Current Path : /home/u936121314/public_html/ec/



Current File : /home/u936121314/public_html/ec/order_pdf.php
<?php
include('vendor/autoload.php');
require('connection.inc.php');
require('functions.inc.php');

if(!$_SESSION['ADMIN_LOGIN']){
	if(!isset($_SESSION['USER_ID'])){
		die();
	}
}

$order_id=get_safe_value($conn,$_GET['id']);

// $coupon_details=mysqli_fetch_assoc(mysqli_query($con,"select coupon_value from `order` where id='$order_id'"));
// $coupon_value=$coupon_details['coupon_value'];

$css=file_get_contents('css/bootstrap.min.css');
$css.=file_get_contents('style.css');
$css.=file_get_contents('css/shortcode/default.css');
$css.=file_get_contents('css/shortcode/shortcode.css');
$css.=file_get_contents('css/custom.css');
$css.=file_get_contents('css/core.css');
$css.=file_get_contents('css/responsive.css');

$html='
<body>
<div class="wrapper">
<div class="wishlist-area ptb--100 bg__white">
    <div class="container">
        <div class="row">
            <div class="col-md-12 col-sm-12 col-xs-12">
                <div class="wishlist-content">
                    <form action="#">
                        <div class="wishlist-table table-responsive">
                        <table>
                            <thead>
                                <tr>
                                    <th class="product-thumbnail">Image</th>
                                    <th class="product-name"><span class="nobr">Product Name</span></th>
                                    <th class="product-price"><span class="nobr"> Unit Price </span></th>
                                    <th class="product-price"><span class="nobr"> Qty </span></th>
                                    <th class="product-price"><span class="nobr"> Total Price </span></th>
                                </tr>
                            </thead>
                            <tbody>';
		
		if(isset($_SESSION['ADMIN_LOGIN'])){
			$res=mysqli_query($conn,"select distinct(order_detail.id) ,order_detail.*,product.name,product.image from order_detail,product ,`order` where order_detail.order_id='$order_id' and order_detail.product_id=product.id");
		}else{
			$uid=$_SESSION['USER_ID'];
			$res=mysqli_query($conn,"select distinct(order_detail.id) ,order_detail.*,product.name,product.image from order_detail,product ,`order` where order_detail.order_id='$order_id' and `order`.user_id='$uid' and order_detail.product_id=product.id");
		}
        $cart_subtotal=0;
        $tax=0.12;
		$total_price=0;
		if(mysqli_num_rows($res)==0){
			die();
		}
		while($row=mysqli_fetch_assoc($res)){
        $cart_subtotal=$cart_subtotal+($row['price']*$row['qty']);
		 $pp=$row['qty']*$row['price'];
         $html.='<tr>
            <td class="product-thumbnail" width="150px"> <img style="max-width:150px" src="'.PRODUCT_IMAGE_SITE_PATH.$row['image'].'"></td>
            <td class="product-name">'.$row['name'].'</td>
            <td class="product-price">'.$row['qty'].'</td>
            <td class="product-price">&#8377;'.$row['price'].'</td>
            <td class="product-price">&#8377;'.$pp.'</td>
         </tr>';
         }
         
        $taxAmt=$tax*$cart_subtotal;
        $cart_total=$cart_subtotal+$taxAmt;
		 
		// if($coupon_value!=''){								
		// 	$html.='<tr>
		// 		<td colspan="3"></td>
		// 		<td class="product-name">Coupon Value</td>
		// 		<td class="product-name">'.$coupon_value.'</td>
				
		// 	</tr>';
		// }
		 
		//  $total_price=$total_price-$coupon_value;
         $html.='
        <tr>
            <td colspan="3" rowspan="3" class="product-name"></td>
            <td class="product-name">Sub Total</td>
            <td class="product-price"><span class="amount">&#8377;'.$cart_subtotal.'</span></td>
        </tr>
        <tr>
            <td class="product-name">GST@12%</td>
            <td class="product-price"><span class="amount">&#8377;'.$taxAmt.'</span></td>
        </tr>
        <tr>
            <td class="product-name">Total</td>
            <td class="product-price"><span class="amount">&#8377;'.$cart_total.'</span></td>
        </tr>
         ';
		 
      $html.='
                                </tbody>
                            </table>
                        </div>
                    </form>
                </div>
            </div>
        </div>
    </div>
</div>
</div>
<body>
';
$mpdf=new \Mpdf\Mpdf();
$mpdf->WriteHTML($css,1);
$mpdf->WriteHTML($html,2);
$file=time().'.pdf';
$mpdf->Output($file,'D');
?>