v2
This commit is contained in:
@@ -2,8 +2,6 @@
|
||||
include(__DIR__ . '/auth.php');
|
||||
require_login();
|
||||
date_default_timezone_set('Asia/Kolkata');
|
||||
|
||||
// Don't send ANY HTML or echo above this line
|
||||
?>
|
||||
<style>
|
||||
.logo {
|
||||
@@ -20,40 +18,49 @@ date_default_timezone_set('Asia/Kolkata');
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
/* Mobile-specific styles */
|
||||
@media (max-width: 767px) {
|
||||
.mobile-welcome {
|
||||
padding: 15px;
|
||||
color: #FFF;
|
||||
line-height: 20px;
|
||||
margin-left: 15px;
|
||||
.mobile-welcome,
|
||||
.mobile-profile {
|
||||
display: inline-block;
|
||||
}
|
||||
.desktop-welcome {
|
||||
display: none;
|
||||
.desktop-welcome,
|
||||
.desktop-profile,
|
||||
.navbar-right {
|
||||
display: none !important; /* hide right side in mobile */
|
||||
}
|
||||
}
|
||||
|
||||
/* Desktop styles */
|
||||
@media (min-width: 768px) {
|
||||
.mobile-welcome {
|
||||
display: none;
|
||||
.mobile-welcome,
|
||||
.mobile-profile {
|
||||
display: none !important; /* hide mobile items in desktop */
|
||||
}
|
||||
.desktop-welcome {
|
||||
display: inline-block;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
<!-- nav start -->
|
||||
<nav class="navbar navbar-default">
|
||||
<div class="container-fluid">
|
||||
<div class="navbar-header">
|
||||
<a href="/Admin/"><img class="img-responsive logo" style="height:50px" src="/asset/images/new_logo2.jpg" alt=""></a>
|
||||
|
||||
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
|
||||
<span class="sr-only">Toggle navigation</span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
</button>
|
||||
|
||||
<!-- Mobile profile + welcome -->
|
||||
<img class="mobile-profile"
|
||||
src="/CONTENT/ROOT_URI/Admin/<?php echo htmlspecialchars($_SESSION['profile_pic'] ?? 'default.png'); ?>"
|
||||
width="40" height="40"
|
||||
style="border-radius:50%; object-fit:cover;"
|
||||
alt="Profile">
|
||||
<span class="mobile-welcome">Welcome! <?php echo htmlspecialchars($_SESSION['name'] ?? ''); ?></span>
|
||||
</div>
|
||||
|
||||
@@ -63,7 +70,6 @@ date_default_timezone_set('Asia/Kolkata');
|
||||
$userType = $_SESSION['type'] ?? '';
|
||||
|
||||
if ($userType === 'admin') {
|
||||
// Admin gets everything
|
||||
?>
|
||||
<li><a href="/Admin/Create_AC_Recurring">New Recurring</a></li>
|
||||
<li><a href="/Admin/Create_AC_FD">New FD</a></li>
|
||||
@@ -78,7 +84,6 @@ date_default_timezone_set('Asia/Kolkata');
|
||||
<li><a href="/Admin/Settings_Agent">Agent Settings</a></li>
|
||||
<?php
|
||||
} elseif ($userType === 'bm') {
|
||||
// Branch Manager menu
|
||||
?>
|
||||
<li><a href="/Admin/Create_AC_Recurring">New Recurring</a></li>
|
||||
<li><a href="/Admin/Create_AC_FD">New FD</a></li>
|
||||
@@ -89,7 +94,6 @@ date_default_timezone_set('Asia/Kolkata');
|
||||
<li><a href="/Admin/agent_View_report">Commission</a></li>
|
||||
<?php
|
||||
} elseif ($userType === 'agent') {
|
||||
// Agent menu
|
||||
?>
|
||||
<li><a href="/Admin/View_AC?Type=Recurring">View A/C</a></li>
|
||||
<li><a href="/Admin/Due">Deemand Sheet</a></li>
|
||||
@@ -100,8 +104,17 @@ date_default_timezone_set('Asia/Kolkata');
|
||||
?>
|
||||
</ul>
|
||||
|
||||
<!-- Desktop right side -->
|
||||
<ul class="nav navbar-nav navbar-right">
|
||||
<li class="desktop-welcome"><span class="welcome-text">Welcome! <?php echo htmlspecialchars($_SESSION['name'] ?? ''); ?></span></li>
|
||||
<li class="desktop-welcome">
|
||||
<span class="welcome-text">Welcome! <?php echo htmlspecialchars($_SESSION['name'] ?? ''); ?></span>
|
||||
</li>
|
||||
<li class="desktop-profile">
|
||||
<img src="/CONTENT/ROOT_URI/Admin/<?php echo htmlspecialchars($_SESSION['profile_pic'] ?? 'default.png'); ?>"
|
||||
width="40" height="40"
|
||||
style="border-radius:50%; object-fit:cover;"
|
||||
alt="Profile">
|
||||
</li>
|
||||
<li><a href="/Admin/Signout">Signout</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user