File manager - Edit - /home/justdoit/greenpasscapital.com/admin/sendMoneyRequest.php
Back
<?php session_start(); require_once 'db.php'; if($_SESSION['user_id']==null) { header("Location:index.php"); } ?> <!doctype html> <html lang="en"> <meta http-equiv="content-type" content="text/html;charset=UTF-8" /> <head> <title>Send Money </title> <meta charset="utf-8"> <!-- Meta --> <meta name="keywords" content="" /> <meta name="author" content=""> <meta name="robots" content="" /> <meta name="description" content="" /> <!-- this styles only adds some repairs on idevices --> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <!-- Favicon --> <link rel="shortcut icon" href="images/favicon.html"> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css"> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script> <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script> </head> <body> <?php $date=date("Y-m-d H:i:s"); $type=$_POST['type']; $amount=$_POST['amount']; $amount2=$_POST['amount2']; $ref=$_POST['Refence']; $user_name=$_POST['username']; #sql statement here $SQL="INSERT INTO transaction(username,date,type,ref)VALUES('$user_name','$date','$type','$ref');"; $result=mysqli_query($conn,$SQL); if(!$result){ // "Error in mysql statement " . mysqli_connect_error(); }else{ // echo "Query successeful"; } $update="UPDATE `users` SET `Amount` ='$amount' WHERE `users`.`email`='$user_name';"; $update2="UPDATE `users` SET `Balance` ='$amount2' WHERE `users`.`email`='$user_name';"; $exe=mysqli_query($conn,$update); //write mail here $subject = "Money deposited into your account. – SpringPass Capital Bank"; $message = ' <html> <head> <meta charset="UTF-8"> <title>SpringPass Capital – Transfer / Bill Payment</title> <style> body { background-color: #f4f4f7; font-family: "Segoe UI", Arial, sans-serif; color: #333333; margin: 0; padding: 0; } .header { background: linear-gradient(135deg, #7b1733, #a32645); padding: 25px 0; text-align: center; color: #ffffff; } .header img { max-width: 320px; margin-bottom: 20px; } .header h1 { margin: 0; font-size: 24px; letter-spacing: 1px; font-weight: 600; } .container { background-color: #ffffff; width: 90%; max-width: 620px; margin: 30px auto; border-radius: 12px; box-shadow: 0 3px 15px rgba(0,0,0,0.1); overflow: hidden; } .content { padding: 40px 30px; } h2 { color: #7b1733; font-size: 22px; text-align: center; margin-bottom: 25px; } p { font-size: 15px; line-height: 1.7; margin-bottom: 15px; } .highlight { background-color: #f9f0f3; border-left: 4px solid #7b1733; padding: 10px 15px; border-radius: 6px; font-size: 14px; } .footer { background-color: #fafafa; border-top: 1px solid #eaeaea; padding: 20px; text-align: center; color: #888888; font-size: 12px; line-height: 1.5; } .footer a { color: #7b1733; text-decoration: none; font-weight: 500; } </style> </head> <body> <div class="container"> <div class="header"> <img src="https://greenpasscapital.com/LOGO1.png" alt="SpringPass Capital Logo"> </div> <div class="content"> <h2>Transaction Details</h2> <p>Dear Customer,</p> <p>We’re pleased to inform you that a deposit of $'. htmlspecialchars($amount) .' has been successfully credited to your account.</p> <div class="highlight"> <p><strong>Transaction Type:Deposit</strong> <br> <strong>Bank:</strong> ' . htmlspecialchars($ref) . '<br> <strong>Amount:</strong> $' . htmlspecialchars($amount) . '<br> <strong>Date/Time:</strong> ' . htmlspecialchars($date). '<br> <strong>Status:Completed</strong> </div> <p> <strong>+32 (46)-024-2988</strong> or email <strong>customercare@greenpasscapital.com</strong>.</p> <p>Thank you for banking with <strong>SpringPass Capital</strong> — your trusted financial partner.</p> </div> <div class="footer"> © ' . date("Y") . ' SpringPass Capital. All Rights Reserved.<br> <a href="https://greenpasscapital.com">Visit Our Website</a> | <a href="mailto:support@greenpasscapital.com">Contact Support</a> </div> </div> </body> </html>'; $headers = "MIME-Version: 1.0\r\n"; $headers .= "Content-type:text/html;charset=UTF-8\r\n"; $headers .= "From: no-reply@greenpasscapital.com\r\n"; // Send the email mail($user_name, $subject, $message, $headers); if(!$exe){ echo "<h3>Error </h3>"; }else{ // echo "<h2>Done</h2>"; } mysqli_query($conn,$update2); ?> <!-- Modal --> <div class="modal fade" id="myModal" role="dialog"> <div class="modal-dialog"> <!-- Modal content--> <div class="modal-content"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal">×</button> <h4 class="modal-title" style="color:lightgreen">Money Sent</h4> </div> <div class="modal-body"> <p>Date <?php echo $date;?></p> <p>Type <?php echo $type;?></p> <p>Amount <?php echo $amount;?></p> <p>Ref <?php echo $ref ;?></p> <p>User <?php echo $user_name;?></p> </div> <div class="modal-footer"> <button type="button" class="btn btn-default" data-dismiss="modal" onclick="javascript:window.location.assign('users.php');">Home</button> </div> </div> <script type="text/javascript"> $(window).on('load',function(){ $('#myModal').modal('show'); }); </script> <script src="js/jquery-2.2.2.min.js" type="text/javascript"></script> <script src="js/bootstrap/bootstrap.min.js" type="text/javascript"></script> <script src="js/mainmenu/customeUI.js"></script> <script src="js/mainmenu/jquery.sticky.js"></script> <script src="js/scrolltotop/totop.js"></script> <script src="js/custom-scrollbar/jquery.mCustomScrollbar.concat.min.js"></script> <script type="text/javascript" src="js/cubeportfolio/main.js"></script> <script src="js/custom-scrollbar/jquery.mCustomScrollbar.concat.min.js"></script> <script src="js/style-swicher/style-swicher.js"></script> <script src="js/style-swicher/custom.js"></script> </body> </html> <?php //close db connection mysqli_close($conn); //connection close ?>
| ver. 1.4 |
Github
|
.
| PHP 7.0.33 | Generation time: 2.99 |
proxy
|
phpinfo
|
Settings