One Hat Cyber Team
Your IP :
216.73.216.186
Server IP :
84.32.84.250
Server :
Linux in-mum-web1837.main-hosting.eu 5.14.0-503.34.1.el9_5.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Mar 27 06:00:50 EDT 2025 x86_64
Server Software :
LiteSpeed
PHP Version :
8.2.28
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
home
/
u322583024
/
domains
/
jimmy2chs.in
/
public_html
/
View File Name :
pmc.php
<?php // Include your database connection file here include('connection.inc.php'); // replace with your actual connection file // Check if the user is logged in and get the user ID if(isset($_SESSION['USER_LOGIN'])) { $u_id = $_SESSION['USER_ID']; } else { $u_id = 0; } // Prepare the stored procedure call $stmt = $con->prepare("CALL GetUnreadResourcesCount(?)"); $stmt->bind_param("i", $u_id); if ($u_id > 0) { $sql = "SELECT name, email,img FROM `members` WHERE id = '$u_id'"; $res = mysqli_query($con, $sql); if ($res) { // Fetch the user data $row = mysqli_fetch_assoc($res); } else { echo "Error fetching user details."; $row = ['name' => 'Guest', 'email' => '']; // Fallback if the query fails } } else { $row = ['name' => 'Guest', 'email' => '']; // Set to 'Guest' if the user is not logged in } // Execute the stored procedure $stmt->execute(); // Fetch the result $result = $stmt->get_result(); $data = $result->fetch_assoc(); // Get the unread notices count $unread_count = $data['unread_count']; // Close the statement $stmt->close(); ?> <!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> <meta http-equiv="x-ua-compatible" content="ie=edge"> <title></title> <link rel="shortcut icon" href="assets/images/favicon.png"> <!-- fraimwork - css include --> <link rel="stylesheet" type="text/css" href="assets/css/bootstrap.min.css"> <!-- icon css include --> <link rel="stylesheet" type="text/css" href="assets/css/fontawesome-all.css"> <link rel="stylesheet" type="text/css" href="assets/css/flaticon.css"> <!-- carousel css include --> <link rel="stylesheet" type="text/css" href="assets/css/slick.css"> <link rel="stylesheet" type="text/css" href="assets/css/slick-theme.css"> <link rel="stylesheet" type="text/css" href="assets/css/animate.css"> <link rel="stylesheet" type="text/css" href="assets/css/owl.carousel.min.css"> <link rel="stylesheet" type="text/css" href="assets/css/owl.theme.default.min.css"> <!-- others css include --> <link rel="stylesheet" type="text/css" href="assets/css/magnific-popup.css"> <link rel="stylesheet" type="text/css" href="assets/css/jquery.mCustomScrollbar.min.css"> <link rel="stylesheet" type="text/css" href="assets/css/calendar.css"> <!-- custom css include --> <link rel="stylesheet" type="text/css" href="assets/css/style.css"> <link rel="stylesheet" href="https://cdn.datatables.net/2.0.8/css/dataTables.dataTables.css" /> <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script> <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css"> <script src="js/jquery.dataTables.min.js"></script> <script src="js/dataTables.bootstrap.min.js"></script> <link rel="stylesheet" href="css/dataTables.bootstrap.min.css" /> <script src="js/general.js"></script> <script src="js/tickets.js"></script> <style> .fade { opacity: 1; -webkit-transition: opacity .15s linear; -o-transition: opacity .15s linear; transition: opacity .15s linear; } .form-inline { display: block; flex-flow: row wrap; align-items: center; } /* Show the dropdown when hovering over the nav-item */ .nav-item.dropdown:hover .dropdown-menu { display: block; } /* Prevents dropdown from disappearing on mouseout */ .nav-item.dropdown .dropdown-menu { display: none; margin-top: 0; } </style> </head> <body class="homepage2"> <?php include('header.php'); if(isset($_SESSION['USER_LOGIN'])) { $loggedin= true; $u_id = $_SESSION['USER_ID']; $u_name = $_SESSION['USER_NAME']; $u_email = $_SESSION['USER_EMAIL']; $u_contact = $_SESSION['USER_CONTACT']; } else{ $loggedin = false; $u_id = '0'; ?> <script> window.location.href = "index.php#main-carousel2"; </script> <?php } ?> <!-- breadcrumb-section - start ================================================== --> <section id="breadcrumb-section" class="breadcrumb-section clearfix"> <div class="jarallax" style="background-image: url(assets/images/slider/slider.webp);"> <div class="overlay-black"> <div class="container"> <div class="row justify-content-center"> <div class="col-lg-6 col-md-12 col-sm-12"> <!-- breadcrumb-title - start --> <div class="breadcrumb-title text-center mt-10"> <span class="sub-title">all you need to know</span> <h2 class="big-title">Resources</h2> </div> <!-- breadcrumb-title - end --> </div> </div> </div> </div> </div> </section> <!-- breadcrumb-section - end ================================================== --> <?php $sql="SELECT * FROM `resources`" ; $res=mysqli_query($con,$sql); { ?> <section class="user-dashboard-section mb-10 mt-10"> <div class="container"> <div class="row"> <div class="col-sm-3"> <div class="dashboard-left-sidebar"> <div class="close-button d-flex d-lg-none"> <button class="close-sidebar"> <i class="fa-solid fa-xmark"></i> </button> </div> <div class="profile-box"> <div class="cover-image"> <img src="assets/images/cover-img.jpg" class="img-fluid blur-up lazyloaded" alt=""> </div> <div class="profile-contain"> <div class="profile-image"> <form id="imageForm" enctype="multipart/form-data"> <div class="position-relative"> <img id="profileImage" src="assets/images/user/<?php echo $row['img']?>" class="blur-up update_img lazyloaded" alt=""> <div class="cover-icon" bis_skin_checked="1"> <label for="imageUpload"> <i class="fa fa-pen"></i> <input type="file" id="imageUpload" name="image" onchange="readURL(this, 0)"> </label> </div> </div> <button type="button" class="custom-btn mt-5" onclick="uploadImage()">Upload Image</button> </form> </div> <div class="profile-name"> <h3><?php echo $row['name']?></h3> <h6 class="text-content"><?php echo $row['email']?> </h6> </div> </div> </div> <ul class="nav nav-pills user-nav-pills" id="pills-tab" role="tablist"> <li class="nav-item" role="presentation"> <a href="dashboard.php"> <button class="nav-link active" id="pills-dashboard-tab" data-bs-toggle="pill" data-bs-target="#pills-dashboard" type="button" role="tab" aria-controls="pills-dashboard" aria-selected="true"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-home"> <path d="M3 9l9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z"></path> <polyline points="9 22 9 12 15 12 15 22"></polyline> </svg> Go TO DashBoard</button> </a> </li> <li class="nav-item" role="presentation"> <a href="all_event.php"> <button class="nav-link" id="pills-event-tab" data-bs-toggle="pill" data-bs-target="#pills-event" type="button" role="tab" aria-controls="pills-event" aria-selected="true"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-home"> <path d="M3 9l9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z"></path> <polyline points="9 22 9 12 15 12 15 22"></polyline> </svg> Event</button> </a> </li> <li class="nav-item dropdown" role="presentation"> <!-- Direct the link to all_notice.php and keep the dropdown-toggle class --> <a href="all_notice.php" class="nav-link dropdown-toggle" id="noticeDropdown" data-bs-toggle="dropdown" aria-expanded="false"> <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-home"> <path d="M3 9l9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z"></path> <polyline points="9 22 9 12 15 12 15 22"></polyline> </svg> Notice </a> <ul class="dropdown-menu" aria-labelledby="noticeDropdown"> <li><a class="dropdown-item" href="sgm_notice.php">SGM</a></li> <li><a class="dropdown-item" href="agm_notice.php">AGM</a></li> <li><a class="dropdown-item" href="audit.php">Audited financial reports</a></li> <li><a class="dropdown-item" href="othernotice.php">Others</a></li> </ul> </li> <!-- Split dropend button --> <li class="nav-item dropdown" role="presentation"> <a class="nav-link dropdown-toggle" id="pills-resources-tab" data-bs-toggle="dropdown" href="all_resources.php" role="button" aria-expanded="false"> <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-home"> <path d="M3 9l9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z"></path> <polyline points="9 22 9 12 15 12 15 22"></polyline> </svg> Resources </a> <ul class="dropdown-menu dropdown-scrollable" aria-labelledby="pills-resources-tab"> <!-- Resource Type 1 with Subtypes --> <li class="dropdown-submenu"> <a class="dropdown-item dropdown-toggle" href="#">Society Redevelopment Documents</a> <ul class="dropdown-menu"> <li><a class="dropdown-item" href="progress.php">Progress Documents</a></li> <li><a class="dropdown-item" href="maharera.php">MahaRera Documents</a></li> <li><a class="dropdown-item" href="finanacial.php">Financial Statements</a></li> <li><a class="dropdown-item" href="tender.php">Tender Documents</a></li> <li><a class="dropdown-item" href="mc.php">MC Minutes</a></li> <li><a class="dropdown-item" href="pmc.php">PMC Documents</a></li> <li><a class="dropdown-item" href="developer.php">Developer Documents</a></li> <li><a class="dropdown-item" href="legal.php">Legal Documents</a></li> </ul> </li> <!-- Resource Type 2 with Subtypes --> <li><a class="dropdown-item" href="society.php">Society Handbook of Rules</a></li> <li><a class="dropdown-item" href="other.php">Other Resources</a></li> <li class="dropdown-submenu"> <a class="dropdown-item dropdown-toggle" href="#">Society Bye-Laws</a> <ul class="dropdown-menu"> <li><a class="dropdown-item" href="formation.php">Bye-Laws at Society Formation</a></li> <li><a class="dropdown-item" href="adopted.php">Bye-Laws 2014 Adopted</a></li> </ul> </li> </ul> </li> <!-- <li class="nav-item " role="presentation" >--> <!-- <button class="nav-link" id="pills-order-tab" data-bs-toggle="pill" style="margin-left: 6%;"--> <!-- data-bs-target="#pills-order" type="button" role="tab" aria-controls="pills-order"--> <!-- aria-selected="false"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24"--> <!-- viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"--> <!-- stroke-linecap="round" stroke-linejoin="round"--> <!-- class="feather feather-shopping-bag">--> <!-- <path d="M6 2L3 6v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V6l-3-4z"></path>--> <!-- <line x1="3" y1="6" x2="21" y2="6"></line>--> <!-- <path d="M16 10a4 4 0 0 1-8 0"></path>--> <!-- </svg>Support</button>--> <!--</li>--> <li class="nav-item"> <a class="nav-link" href="logout.php"><svg xmlns="http://www.w3.org/2000/svg" style="margin-left: 8%;" fill="#4e596b" width="24" height="24" viewBox="0 0 512 512"> <!--!Font Awesome Free 6.5.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2024 Fonticons, Inc.--> <path d="M497 273L329 441c-15 15-41 4.5-41-17v-96H152c-13.3 0-24-10.7-24-24v-96c0-13.3 10.7-24 24-24h136V88c0-21.4 25.9-32 41-17l168 168c9.3 9.4 9.3 24.6 0 34zM192 436v-40c0-6.6-5.4-12-12-12H96c-17.7 0-32-14.3-32-32V160c0-17.7 14.3-32 32-32h84c6.6 0 12-5.4 12-12V76c0-6.6-5.4-12-12-12H96c-53 0-96 43-96 96v192c0 53 43 96 96 96h84c6.6 0 12-5.4 12-12z" /> </svg>Logout</a> </li> </ul> </div> </div> <div class="col-sm-9"> <button class="btn left-dashboard-show btn-animation btn-md fw-bold d-block mb-4 d-lg-none">Show Menu <i class="fa fa-bars"></i></button> <div class="dashboard-right-sidebar"> <div class="tab-content" id="pills-tabContent"> <div class="tab-pane fade active show" id="pills-event" role="tabpanel" aria-labelledby="pills-event-tab"> <div class="dashboard-home"> <div class="title"> <h2>Resourcecs</h2> </div> <div class="total-box"> <div class="row g-sm-4 g-3"> <div class="col-xxl-4 col-lg-6 col-md-4 col-sm-6"> <div class="totle-contain"> <img src="assets/images/svg/order.svg" class="img-1 blur-up lazyloaded" alt=""> <img src="assets/images/svg/order.svg" class="blur-up lazyloaded" alt=""> <div class="totle-detail"> <h5>Unread Resources</h5> <h3><?php echo $unread_count; ?></h3> </div> </div> </div> </div> </div> <div class="profile-about dashboard-bg-box"> <div class="row"> <div class="col-md-12 mb-3"> <div class="card text-left"> <div class="card-body"> <div class="table-responsive"> <?php // Updated SQL query to filter by resourcesubtype "progress documents" $sql = "SELECT count(*) as total FROM `resources` WHERE resourcesubtype = 'PMC Documents'"; $result = mysqli_query($con, $sql); $data = mysqli_fetch_assoc($result); ?> <table class="table table-bordered" id="myTable" class="display"> <thead> <tr> <th scope="col">ID</th> <th scope="col">Name</th> <th scope="col">Documents</th> <th scope="col">Action</th> </tr> </thead> <tbody> <?php // Updated SQL query to select only resources with resourcesubtype "progress documents" $sql = "SELECT * FROM `resources` WHERE resourcesubtype = 'PMC Documents'"; $res = mysqli_query($con, $sql); while($row = mysqli_fetch_assoc($res)){ $id = $row['id']; ?> <tr> <th scope="row"><?php echo $row['id']?></th> <th scope="row"><?php echo $row['name']?></th> <td> <?php $file = $row['img']; $file_extension = strtolower(pathinfo($file, PATHINFO_EXTENSION)); // Base path for files $file_path = 'assets/images/resources/' . $file; // Check if the file is an image if (in_array($file_extension, ['png', 'jpg', 'jpeg', 'gif'])) { // Wrap image with a link to open in a new tab echo '<a href="' . $file_path . '" target="_blank">'; echo '<img src="' . $file_path . '" width="50" height="50" alt="Event Image">'; echo '</a>'; } else { // For non-image files, provide a link to open in a new tab echo '<a href="' . $file_path . '" target="_blank">View File</a>'; } ?> </td> <td> <!-- Check if the notice has been read --> <?php $resource_id = $row['id']; $check_sql = "SELECT * FROM user_resource_read WHERE resource_id = '$resource_id' AND user_id = '$u_id'"; $check_res = mysqli_query($con, $check_sql); if(mysqli_num_rows($check_res) > 0) { // The resource has been read echo "Read"; } else { // The resource has not been read ?> <!-- Form for the "Read" button (Insert Query) --> <form action='insert_resource_data.php' method='post'> <input type='hidden' name='resource_id' value='<?php echo $row['id']; ?>'> <button type='submit' class='btn btn-success read'>Unread</button> </form> <?php } ?> </td> </tr> <?php } ?> </tbody> </table> </div> </div> </div> </div> </div> </div> </div> </div> </div> </div> </div> </section> <?php } ?> <?php include('footer.php')?> <!-- carousel jquery include --> <script src="assets/js/slick.min.js"></script> <script src="assets/js/owl.carousel.min.js"></script> <!-- map jquery include --> <script src="assets/js/gmap3.min.js"></script> <script src="http://maps.google.com/maps/api/js?key=AIzaSyC61_QVqt9LAhwFdlQmsNwi5aUJy9B2SyA"></script> <!-- calendar jquery include --> <script src="assets/js/atc.min.js"></script> <!-- others jquery include --> <script src="assets/js/jquery.magnific-popup.min.js"></script> <script src="assets/js/isotope.pkgd.min.js"></script> <script src="assets/js/jarallax.min.js"></script> <script src="assets/js/jquery.mCustomScrollbar.concat.min.js"></script> <!-- gallery img loaded - jqury include --> <script src="assets/js/imagesloaded.pkgd.min.js"></script> <!-- multy count down - jqury include --> <script src="assets/js/jquery.countdown.js"></script> <!-- custom jquery include --> <script src="assets/js/custom.js"></script> <script> function readURL(input, imgId) { if (input.files && input.files[0]) { var reader = new FileReader(); reader.onload = function(e) { $('#profileImage').attr('src', e.target.result); } reader.readAsDataURL(input.files[0]); // Convert image to Data URL } } function uploadImage() { var formData = new FormData($('#imageForm')[0]); $.ajax({ url: 'upload_image.php', // Specify the URL of the server-side script to handle the upload type: 'POST', data: formData, processData: false, contentType: false, success: function(response) { // Handle the response from the server alert('Image uploaded successfully!'); }, error: function(xhr, status, error) { // Handle errors console.error(xhr.responseText); } }); } </script> <!-- Bootstrap js--> <script src="https://themes.pixelstrap.com/fastkart/assets/js/bootstrap/bootstrap.bundle.min.js"></script> <script src="https://themes.pixelstrap.com/fastkart/assets/js/bootstrap/bootstrap-notify.min.js"></script> <script src="https://themes.pixelstrap.com/fastkart/assets/js/bootstrap/popper.min.js"></script> <script src="admin/assets/js/common-bundle-script.js"></script> <script src="admin/assets/js/vendor/echarts.min.js"></script> <script src="admin/assets/js/es5/echart.options.min.js"></script> <script src="admin/assets/js/es5/dashboard.v1.script.js"></script> <script src="admin/assets/js/script.js"></script> <script src="admin/assets/js/sidebar.large.script.js"></script> <script src="admin/assets/js/customizer.script.js"></script> <!-- Nav & tab upside js --> <script src="https://themes.pixelstrap.com/fastkart/assets/js/nav-tab.js"></script> <!-- script js --> <script src="https://themes.pixelstrap.com/fastkart/assets/js/script.js"></script> <!-- theme setting js --> <script src="https://themes.pixelstrap.com/fastkart/assets/js/theme-setting.js"></script> <script src="https://cdn.datatables.net/2.0.8/js/dataTables.js"></script> <script> $(document).ready(function() { $('#myTable').DataTable(); }); </script> <script> // Ensure that the default behavior for clicking "Notice" still works document.getElementById('noticeDropdown').addEventListener('click', function(event) { window.location.href = 'all_notice.php'; }); </script> <style> /* Main Dropdown (display above Resources) */ .dropdown-menu { top: auto; bottom: 100%; /* Display above the Resources button */ } /* Submenu positioning */ .dropdown-submenu { position: relative; } /* Position submenu directly above the parent item and make it scrollable */ .dropdown-submenu .dropdown-menu { bottom: 100%; /* Position submenu above parent */ left: 0; /* Align submenu with parent */ display: none; position: absolute; min-width: 200px; /* Ensure submenu is the same width */ z-index: 1; /* Prevent overlap */ max-height: 300px; /* Set max-height for scrollability */ overflow-y: auto; /* Enable vertical scrolling */ } /* Show submenu on hover */ .dropdown-submenu:hover .dropdown-menu { display: block; } /* Ensure the submenu does not overlap the parent menu */ .dropdown-submenu:hover ~ li { margin-top: 0; /* Prevent shifting of the main menu */ } /* Customize the scrollbar in the submenu */ .dropdown-submenu .dropdown-menu::-webkit-scrollbar { width: 5px; } .dropdown-submenu .dropdown-menu::-webkit-scrollbar-thumb { background-color: rgba(0, 0, 0, 0.2); border-radius: 5px; } </style> <script> // Ensure dropdown opens on hover for main menu document.querySelectorAll('.dropdown').forEach(function (dropdown) { dropdown.addEventListener('mouseenter', function () { let dropdownMenu = this.querySelector('.dropdown-menu'); if (dropdownMenu) { dropdownMenu.classList.add('show'); } }); dropdown.addEventListener('mouseleave', function () { let dropdownMenu = this.querySelector('.dropdown-menu'); if (dropdownMenu) { dropdownMenu.classList.remove('show'); } }); }); // Ensure submenu opens on hover document.querySelectorAll('.dropdown-submenu').forEach(function (submenu) { submenu.addEventListener('mouseenter', function () { let submenuMenu = this.querySelector('.dropdown-menu'); if (submenuMenu) { submenuMenu.style.display = 'block'; } }); submenu.addEventListener('mouseleave', function () { let submenuMenu = this.querySelector('.dropdown-menu'); if (submenuMenu) { submenuMenu.style.display = 'none'; } }); }); </script> </body> </html>