Server : LiteSpeed System : Linux nl-srv-web1396.main-hosting.eu 4.18.0-553.83.1.lve.el8.x86_64 #1 SMP Wed Nov 12 10:04:12 UTC 2025 x86_64 User : u107206879 ( 107206879) PHP Version : 7.2.34 Disable Function : NONE Directory : /home/u107206879/domains/escort46.de/public_html/admin/ |
<?php
$error = "";
$message = "";
include "db_connection.php";
include "sessioncheck.php";
$error = "";
$message = "";
if (!empty($_POST["Process"]) && trim($_POST["Process"]) == "AddNow") {
$plan = array();
$plan['plan'] = test_input($_POST['plan']);
$plan['plan_days'] = test_input($_POST['plan_days']);
$plan['plan_id'] = test_input($_POST['plan_id']);
$plan['sub_plan_id'] = test_input($_POST['sub_plan_id']);
$plan['amount'] = test_input($_POST['amount']);
$plan['currency'] = test_input($_POST['currency']);
$plan['payment_link'] = test_input($_POST['payment_link']);
$query = "INSERT INTO `plans` (`id`, `plan`, `plan_days`, `plan_id`, `sub_plan_id`, `amount`, `currency`, `payment_link`)
VALUES (NULL, '" . addslashes($plan['plan']) . "', '" . addslashes($plan['plan_days']) . "', '" . addslashes($plan['plan_id']) . "', '" . addslashes($plan['sub_plan_id']) . "', '" . addslashes($plan['amount']) . "', '" . addslashes($plan['currency']) . "', '" . addslashes($plan['payment_link']) . "')";
$result = mysqli_query($connection, $query);
header("Location:payment_plans_list");
}
?>
<!-- Header Start-->
<?php include("header.php"); ?>
<nav class=" navbar navbar-expand navbar-white navbar-light">
<ul class="navbar-nav">
<li class="nav-item">
<a class="nav-link" data-widget="pushmenu" href="#">
<i class="fa fa-bars" style="color:white;"></i>
</a>
</li>
</ul>
<div>
<ol class="breadcrumb float-sm-right">
<li class="breadcrumb-item ">Plans</li>
<li class="breadcrumb-item">Add Plan</li>
</ol>
</div>
</nav>
<!-- Header Ends-->
<!-- Content Start-->
<section class="content">
<div class="container-fluid">
<div class="row">
<div class="col-12">
<div class="card">
<div class="card-body">
<?php include_once 'notification.php'; ?>
<form action="" method="post" id="add-plan-form" enctype="multipart/form-data">
<div class="form-group">
<label for="plan">Plan</label>
<input type="text" class="form-control" id="plan" name="plan" placeholder="Enter Plan" value="<?php if (!empty($_POST["plan"])) {
echo $_POST["plan"];
} ?>" required>
</div>
<div class="form-group">
<label for="plan_days">Days</label>
<input type="text" class="form-control" id="plan_days" name="plan_days" placeholder="Enter Days" value="<?php if (!empty($_POST["plan_days"])) {
echo $_POST["plan_days"];
} ?>" required>
</div>
<div class="form-group">
<label for="plan_id">Plan Id</label>
<input type="text" class="form-control" id="plan_id" name="plan_id" placeholder="Enter Plan Id" value="<?php if (!empty($_POST["plan_id"])) {
echo $_POST["plan_id"];
} ?>" required>
</div>
<div class="form-group">
<label for="sub_plan_id">Sub Plan Id</label>
<input type="text" class="form-control" id="sub_plan_id" name="sub_plan_id" placeholder="Enter Sub Plan Id" value="<?php if (!empty($_POST["sub_plan_id"])) {
echo $_POST["sub_plan_id"];
} ?>" required>
</div>
<div class="form-group">
<label for="amount">Amount</label>
<input type="text" class="form-control" id="amount" name="amount" placeholder="Enter Amount" value="<?php if (!empty($_POST["amount"])) {
echo $_POST["amount"];
} ?>" required>
</div>
<div class="form-group">
<label for="currency">Currency</label>
<input type="text" class="form-control" id="currency" name="currency" placeholder="Enter Currency" value="<?php if (!empty($_POST["currency"])) {
echo $_POST["currency"];
} ?>" required>
</div>
<div class="form-group">
<label for="payment_link">Payment Link</label>
<input type="text" class="form-control" id="payment_link" name="payment_link" placeholder="Enter Payment Link" value="<?php if (!empty($_POST["payment_link"])) {
echo $_POST["payment_link"];
} ?>">
</div>
<button type="submit" class="btn btn-primary">Add</button>
<input type="hidden" name="Process" id="Process" value="AddNow" />
</form>
</div>
<!-- /.card-body -->
</div>
<!-- /.card -->
</div>
</div>
<!-- /.row (main row) -->
</div><!-- /.container-fluid -->
</section>
<!-- Content Ends-->
<!-- Footer Start-->
<?php include("footer.php"); ?>
<!-- Footer Ends-->