📁 File Manager
Editing:
/home/wvl7mof7402e/public_html/india/admin/top.php
<?php session_start(); // Ensure session_start is at the top require("../dbconnect.php"); if(!isset($_SESSION['ADMIN_LOGIN']) || $_SESSION['ADMIN_LOGIN']!='yes'){ header("location: index.php"); exit; } ?> <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <script src="../../js1/jquery.js"></script> <script src="../../js1/script.js"></script> <link rel="stylesheet" href="css/style.css"> <link rel="stylesheet" href="../css1/bootstrap.css"> <link rel="stylesheet" href="../css1/font-awesome.min.css"> <title>Admin Dashboard</title> <style> body { font-family: 'Arial', sans-serif; margin: 0; padding: 0; background-color: #f4f4f9; } /* Navbar Styling */ #navbar { background: linear-gradient(to right, #28a745, #0066cc); color: white; padding: 15px; display: flex; align-items: center; } #navbar #logo { display: flex; justify-content: center; align-items: center; width: 100%; } #navbar #logo img { width: 120px; height: auto; } .fa-bars { font-size: 28px; color: white; cursor: pointer; margin-left: auto; } .manage { float: right; margin-right: 20px; position: relative; } .manage a { color: white; font-size: 18px; text-decoration: none; display: block; padding: 5px; } /* Sub-item (Logout) Style */ .sub-item { display: none; background-color: #003366; position: absolute; padding: 10px; border-radius: 5px; top: 30px; right: 0; min-width: 120px; } .sub-item a { color: white; text-decoration: none; font-size: 16px; } .sub-item a:hover { background-color: #0288d1; border-radius: 5px; } /* Sidebar Styling */ #side_bar { background: linear-gradient(to right, #003366, #0288d1); color: white; height: 100vh; padding-top: 30px; position: fixed; top: 0; left: 0; width: 220px; border-right: 2px solid #0288d1; overflow-y: auto; } #side_bar h4 { color: #ffcc00; text-align: center; font-size: 24px; } .menu { list-style: none; padding-left: 0; } .menu li { margin: 15px 0; padding-left: 10px; background: #343a40; border-radius: 5px; } .menu li a { color: white; text-decoration: none; font-size: 18px; display: block; padding: 10px; } .menu li a:hover { background-color: #28a745; font-weight: bold; padding-left: 15px; border-radius: 5px; } /* Mobile Responsiveness */ @media (max-width: 768px) { #navbar { padding: 10px; } .fa-bars { font-size: 30px; } #side_bar { width: 100%; position: relative; height: auto; } .manage { float: none; text-align: center; margin-top: 10px; } .menu li { text-align: center; margin: 10px 0; } .sub-item { position: static; width: 100%; } .sub-item a { padding: 10px; display: block; text-align: center; } } /* Hover dropdown for "Welcome Admin" */ .manage:hover .sub-item { display: block; } </style> </head> <body> <!-- Navbar --> <div class="row header" id="navbar"> <div class="col-sm-3"> <!-- Placeholder for additional content --> </div> <div class="col-sm-9 my-auto"> <div class="d-inline"> <span class="fa fa-bars" id="hide"></span> </div> <img src="../img/payn.png" alt="logo" class="img-fluid" style="width:400px;height:70px;" /> <div class="manage"> <li><a href="logout.php" class="logout"><i class="fa fa-power-off" aria-hidden="true"></i> Logout</a></li> <!--<ul class="sub-item" id="orders">--> <!-- <li><a href="logout.php" class="logout"><i class="fa fa-power-off"></i> Logout</a></li>--> <!--</ul>--> </div> </div> </div> <!-- Sidebar --> <div class="row mr-0"> <div class="col-sm-3" id="side_bar"> <h4 class="mt-3 ml-3">MENU</h4> <ul class="menu"> <li class="nav-item"> <a class="nav-link" href="gallery.php">Gallery</a> </li> </ul> </div> </div> <script> // Optional JavaScript for menu toggle on small screens document.getElementById("hide").addEventListener("click", function() { var sidebar = document.getElementById("side_bar"); if (sidebar.style.display === "none" || sidebar.style.display === "") { sidebar.style.display = "block"; // Show sidebar } else { sidebar.style.display = "none"; // Hide sidebar } }); </script> </body> </html>
Save
Cancel