/home/desid573/public_html/family
NameSizeModeActions
assets/-0755rm
eway-rapid-php-master/-0755rm
invoice/-0755rm
pdd/-0755rm
10.php19410644editdlrm
11.php11760644editdlrm
22.php91060644editdlrm
array.php21730644editdlrm
a_name_address.php9590644editdlrm
brisbaneInvoice.php118450644editdlrm
class.phpmailer.php800460644editdlrm
class.pop3.php103850644editdlrm
class.smtp.php245860644editdlrm
completedReport.php92860644editdlrm
confirmAll1.php5910644editdlrm
dispatch.php8770644editdlrm
driverInvoice.php121480644editdlrm
driverlocation.php145850644editdlrm
eCrypt.js684240644editdlrm
edit.php7800644editdlrm
error_log304781230644editdlrm
eway-rapid-php-master.zip572700644editdlrm
eWay.php426970644editdlrm
family-cab_small.jpg988530644editdlrm
fatigue.php22950644editdlrm
incident_report.php00644editdlrm
index.php2002040644editdlrm
index1apr2019.php928440644editdlrm
index3.php606770644editdlrm
index4.php915000644editdlrm
index15thMay.php926400644editdlrm
indexJune10.php930530644editdlrm
indextest.php913910644editdlrm
indexTraffic.php860400644editdlrm
index_preSydney.php603500644editdlrm
index_sydney.php741260644editdlrm
melbAuditReport.php104580644editdlrm
melbreport.php77580644editdlrm
monthly.php120460644editdlrm
new.php00644editdlrm
perthAuditReport.php349180644editdlrm
perthReport.php77570644editdlrm
postcodeArray.php10140644editdlrm
postcodeReport.php210150644editdlrm
pre-sydneyquote.php391580644editdlrm
promo.php7650644editdlrm
qldDriverReport.php85680644editdlrm
qldreport.php75800644editdlrm
quote.php523580644editdlrm
quote2.php388310644editdlrm
quote_sydney.php519120644editdlrm
report.php104470644editdlrm
search.php8540644editdlrm
serialize.php1570644editdlrm
style.json10140644editdlrm
summaryReport.php102120644editdlrm
sydneydispatch.php121770644editdlrm
sydneyreport.php77580644editdlrm
table.php50870644editdlrm
test.php38510644editdlrm
thankyou.php314980644editdlrm
tmrReport.php24310644editdlrm
tmr_trips.php112870644editdlrm
unserialize.php5710644editdlrm
Edit: /home/desid573/public_html/family/summaryReport.php (10212B)
setTimestamp($period); $periodString = date_format($dt, "jS M"); $dt = new DateTime(); $dt->setTimestamp($periodLower); $periodStringLower = date_format($dt, "jS M Y"); require_once('class.phpmailer.php'); require_once('class.smtp.php'); $dbhost = "localhost"; $dbuser = "desid573_famcab"; $dbpass = "C]+6wQySxov("; $dbname = "desid573_familycab"; $conn = new mysqli($dbhost, $dbuser, $dbpass, $dbname) or die($conn->connect_error); $qcon=mysqli_connect($dbhost, $dbuser, $dbpass, $dbname); date_default_timezone_set("Australia/Perth"); $yesterday = "Last ".$periodString." Days"; $lastDriver = ""; $lastDriverTotal = ""; $lastDriverTollTotal = ""; $query1 = "SELECT * FROM invoices ORDER BY driver"; $result = mysqli_query($conn, $query1); $count = array("sydney" => 0, "melbourne" => 0, "brisbane" => 0, "goldcoast" => 0, "sunshine" => 0, "perth" => 0); $value = array("sydney" => 0, "melbourne" => 0, "brisbane" => 0, "goldcoast" => 0, "sunshine" => 0, "perth" => 0); $tolls = 0; while($rowSQL = mysqli_fetch_assoc($result)){ if(strtotime($rowSQL['date_created']) > $period && strtotime($rowSQL['date_created']) < $periodLower) { $tolls = $tolls + $rowSQL["tollAmount"]; if($rowSQL["type"] == "SF") { $count["sydney"] = $count["sydney"] + 1; $value["sydney"] = $value["sydney"] + $rowSQL["amount"]; } else if ($rowSQL["type"] == "MF") { $count["melbourne"] = $count["melbourne"] + 1; $value["melbourne"] = $value["melbourne"] + $rowSQL["amount"]; } else if($rowSQL["type"] == "BF") { $count["brisbane"] = $count["brisbane"] + 1; $value["brisbane"] = $value["brisbane"] + $rowSQL["amount"]; } else if($rowSQL["type"] == "GC") { $count["goldcoast"] = $count["goldcoast"] + 1; $value["goldcoast"] = $value["goldcoast"] + $rowSQL["amount"]; } else if($rowSQL["type"] == "SC") { $count["sunshine"] = $count["sunshine"] + 1; $value["sunshine"] = $value["sunshine"] + $rowSQL["amount"]; } else if($rowSQL["type"] == "FC") { $count["perth"] = $count["perth"] + 1; $value["perth"] = $value["perth"] + $rowSQL["amount"]; } } } $dbhost = "localhost"; $dbuser = "desid573_fam_app"; $dbpass = "TW#7CCqKReDn"; $dbname = "desid573_famcab_api"; $conn = new mysqli($dbhost, $dbuser, $dbpass, $dbname) or die($conn->connect_error); $qcon=mysqli_connect($dbhost, $dbuser, $dbpass, $dbname); $query2 = "SELECT * FROM invoices ORDER BY driver"; $result2 = mysqli_query($conn, $query2); while($rowSQL = mysqli_fetch_assoc($result2)){ if(strtotime($rowSQL['date_created']) > $period && strtotime($rowSQL['date_created']) < $periodLower) { $tolls = $tolls + $rowSQL["tollAmount"]; if($rowSQL["type"] == "SA") { $count["sydney"] = $count["sydney"] + 1; $value["sydney"] = $value["sydney"] + $rowSQL["amount"]; } else if ($rowSQL["type"] == "MA") { $count["melbourne"] = $count["melbourne"] + 1; $value["melbourne"] = $value["melbourne"] + $rowSQL["amount"]; } else if($rowSQL["type"] == "BA") { $count["brisbane"] = $count["brisbane"] + 1; $value["brisbane"] = $value["brisbane"] + $rowSQL["amount"]; } else if($rowSQL["type"] == "GA") { $count["goldcoast"] = $count["goldcoast"] + 1; $value["goldcoast"] = $value["goldcoast"] + $rowSQL["amount"]; } else if($rowSQL["type"] == "YA") { $count["sunshine"] = $count["sunshine"] + 1; $value["sunshine"] = $value["sunshine"] + $rowSQL["amount"]; } else if($rowSQL["type"] == "FA") { $count["perth"] = $count["perth"] + 1; $value["perth"] = $value["perth"] + $rowSQL["amount"]; } } } $countTotal = $count["sydney"] + $count["melbourne"] + $count["brisbane"] + $count["goldcoast"] + $count["perth"]; $valueTotal = $value["sydney"] + $value["melbourne"] + $value["brisbane"] + $value["goldcoast"] + $value["perth"]; $lastDriver = ""; $quotetotal = 0; $acttotal = 0; $contEst = $valueTotal * 0.85 + $tolls; $message = " Week Report

Report for ".$periodString." to ".$periodStringLower."



Range:

No. JobsValue
Sydney".$count["sydney"]."".$value["sydney"]."
Melbourne".$count["melbourne"]."".$value["melbourne"]."
Brisbane".$count["brisbane"]."".$value["brisbane"]."
Gold Coast".$count["goldcoast"]."".$value["goldcoast"]."
Sunshine Coast".$count["sunshine"]."".$value["sunshine"]."
Perth".$count["perth"]."".$value["perth"]."
Total".$countTotal."".$valueTotal."
Tolls".$tolls."
Cont. Pay".$contEst."
"; //send_mail("lwscann@gmail.com", "reports@perthdesignateddrivers.com.au", "Report ".$yesterday, $message); echo $message; $mail = new PHPMailer; $mail->SMTPDebug = 3; $mail->isSMTP(); $mail->Host = "webcloud90.au.syrahost.com"; // specify main and backup server $mail->Port = 465; $mail->SMTPSecure = "ssl"; $mail->SMTPAuth = true; // turn on SMTP authentication $mail->Username = "lewis@perthdesignateddrivers.com.au"; // SMTP username $mail->Password = "Chunky11"; // SMTP password $mail->From = "lewis@perthdesignateddrivers.com.au"; $mail->FromName = "Reports"; $mail->AddAddress("lwscann@gmail.com"); $mail->IsHTML(true); // set email format to HTML $mail->Subject = 'Daily Report for'.$yesterday; $mail->Body = $message; // if(!$mail->Send()) //{ // echo "Message could not be sent. //"; // echo "Mailer Error: " . $mail->ErrorInfo; // exit; // //echo "Message has been sent"; ?>