File manager - Edit - /home/custbahd/scorisinternationaljunior.com/admin/events/index.php
Back
<?php session_start(); ?> <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>Admin | SIJSU ©</title> <link rel="icon" href="../../images/logo/ico4.png" type="image/x-icon"> <!--Boxicons--> <link href="boxicons/boxicon.min.css" rel="stylesheet"> <link rel="stylesheet" type="text/css" href="bootstrap/css/bootstrap.min.css"> <link rel="stylesheet" type="text/css" href="datatable/dataTable.bootstrap.min.css"> <style> .top-btns { padding: 20px; } .top-btns .dot { position: absolute; margin-top: -3px; margin-left: -9px; width: 6px; height: 6px; border-radius: 100px; background: white; } .bx { color: #253b70; } /*Industry*/ .industry-section { margin-top: 30px; } .industry-section h3 { text-transform: uppercase; font-weight: bold; font-size: 14px; color: #253b70; text-align: center; } .industry { width: 95%; margin-left: 10px; margin-bottom: 10px; border-radius: 10px; box-shadow: 0 0 4px 0 #253b70; } .industry a{ font-size: 20px; margin: 20px; } .industry a:nth-child(1) { color: #253b70; } .industry a:nth-child(2) { color: #253b70; } .industry h6{ font-weight: bold; font-size: 12px; text-transform: uppercase; text-align: center; color: #253b70; margin-top: 10px; } .industry .id{ margin: 5px; text-align: center; font-size: 12px; color: #FEFAFA; width: 25px; height: 25px; padding: 4px; border-radius: 50px; background: #253b70; box-shadow: 1px 1px 2px 0 rgba(0, 0, 0, 0.2); } .industry a.img{ margin: 0 !important; } .industry img{ width: 100%; height: 300px; margin: 0; margin-bottom: 10px; object-fit: cover; object-position: top; } .industry b { font-size: 10px; color: #e0f9fa; margin-left: 2px; padding: 5px 10px; border-radius: 30px; background: #253b70; } .industry b:nth-child(1) { border-top-right-radius: 0; border-bottom-right-radius: 0; } .industry b:nth-child(2) { border-top-left-radius: 0; border-bottom-left-radius: 0; } .industry .price { font-size: 14px; text-align: center; color: #253b70; padding: 10px; margin-top: 20px; margin-bottom: 20px; } /* If the screen size is 601px wide or more */ @media screen and (min-width: 601px) { .industry { float: left; width: 32%; margin-left: 13px; margin-bottom: 20px; } .industry h6 { font-size: 14px; margin-top: 10px; margin-bottom: 10px; } .industry b { font-size: 14px; } .industry img{ width: 100%; height: 400px; } .industry .price { font-size: 18px; } } .img-edit img{ border-radius: 10px; } .approve-links { margin: 30px 20px 0px 20px; color: white; border: none; border-radius: 5px; padding: 10px 20px; background: #2b3c6b; } .approve-links a { color: #ff7162 !important; } .approve-links span { font-size: 12px; } .count { text-align: center; font-weight: 700; color: #2b3c6b; font-size: 18px; text-align: center; text-transform: uppercase; text-decoration: underline; } </style> </head> <body> <div align="center"> <a href="../"><img src="../../images/logo/ico4.png" class="page-header text-center" width="150px"></a> </div> <?php if(isset($_SESSION['error'])){ echo " <div class='alert alert-danger text-center'> <button class='close'>×</button> ".$_SESSION['error']." </div> "; unset($_SESSION['error']); } if(isset($_SESSION['success'])){ echo " <div class='alert alert-success text-center'> <button class='close'>×</button> ".$_SESSION['success']." </div> "; unset($_SESSION['success']); } ?> <div class="top-btns"> <a href="deactive" class="btn btn-primary" style="background: #253b70;border: none;"><span class="bx bx-dot dot"></span> Deactive Events</a> <a href="../activities" class="btn btn-success pull-right" style="background: #253b70;border: none;"><span class="bx bx-category" style="color: white;"></span> Activities</a> </div> <div class="count"> <?php include_once('db/count_db.php'); // of college_data table $sql = "SELECT count(*) FROM events"; $result = $conn->query($sql); // Display data on web page while($row = mysqli_fetch_array($result)) { echo $row['count(*)']. " Events Registered!"; echo "<br />"; } // Close the connection $conn->close(); ?> </div> <?php include_once('db/connection.php'); $sql = "SELECT * FROM events"; //use for MySQLi-OOP $query = $conn->query($sql); while($row = $query->fetch_assoc()){ echo "<section class='industry-section'>"; echo "<div class='industry'>"; echo "<div class='id'>".$row['id']."</div>"; echo "<h3>".$row['title']."</h3>"; if ($row['image']) { echo "<a href=\"edit_image_modal.php?id=$row[id]\" class='img'><img src='images/".$row['image']."'></a>";} elseif ($row['image']=="") { echo "<a href=\"edit_image_modal.php?id=$row[id]\" class='img'><img src='images/default.png'></a>";} echo "<div class='price'>".$row['description']."</div>"; echo "<div align='center'>"; //Category echo "<b>".date("M jS, Y", strtotime($row['start']))."</b>"; //Type echo "<b>".date("M jS, Y", strtotime($row['endd']))."</b>"; echo "</div>"; echo "<hr>"; echo "<div align='center'>"; echo "<div class='approve-links'>"; if ($row['activate']=="") { echo "<a href=\"activate/1.php?id=$row[id]\" onClick=\"return confirm('Are you sure you want to activate this event?')\">Activate</a> | <a href=\"activate/2.php?id=$row[id]\" onClick=\"return confirm('Are you sure you want to deactivate this event?')\">Deactivate</a>"; } elseif ($row['activate']==1) { echo "<a><i class='bx bxs-check-circle' style='color: white;'></i> Activated</a> | <a href=\"activate/2.php?id=$row[id]\" onClick=\"return confirm('Are you sure you want to deactivate this event?')\">Deactivated</a>"; } elseif ($row['activate']==2) { echo "<a href=\"activate/1.php?id=$row[id]\" onClick=\"return confirm('Are you sure you want to activate this event?')\">Activate</a> | <a><i class='bx bxs-check-circle' style='color: white;'></i> Deactivated</a>"; } echo "</div>"; echo "<div class='approve-links'>"; if ($row['chosen']=="") { echo "<a href=\"choose/1.php?id=$row[id]\" onClick=\"return confirm('Are you sure you want to choose this event?')\">Choose <span>(Event not chosen!)</span></a>"; } elseif ($row['chosen']==1) { echo "<a><i class='bx bxs-check-circle' style='color: white;'></i> Chosen</a> | <a href=\"choose/2.php?id=$row[id]\" onClick=\"return confirm('Are you sure you want to unchoose this event?')\">Unchoose</a>"; } echo "</div>"; echo "<br>"; echo "<a href='#edit_".$row['id']."' data-toggle='modal'><i class='bx-fw bx bx-edit'></i></a>"; echo "</div>"; echo "<br>"; echo "</div>"; echo "</section>"; include('edit_delete_modal.php'); } ?> <!--endd Industry--> <?php include('add_modal.php') ?> <script src="jquery/jquery.min.js"></script> <script src="bootstrap/js/bootstrap.min.js"></script> <script src="datatable/jquery.dataTables.min.js"></script> <script src="datatable/dataTable.bootstrap.min.js"></script> <!-- generate datatable on our table --> <script> $(document).ready(function(){ //inialize datatable $('#myTable').DataTable(); //hide alert $(document).on('click', '.close', function(){ $('.alert').hide(); }) }); </script> </body> </html>
| ver. 1.4 |
Github
|
.
| PHP 8.1.33 | Generation time: 5.9 |
proxy
|
phpinfo
|
Settings