ns77@siliconpin.com 2025-09-03 15:38:53 +00:00
parent 6d59aeb66f
commit 1d736c99c8
3 changed files with 56 additions and 32 deletions

View File

@ -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>

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.1 KiB

View File

@ -1,5 +1,8 @@
<?php
date_default_timezone_set('Asia/Kolkata');
$profile_pic = !empty($_SESSION['profile_pic'])
? "/CONTENT/ROOT_URI/Agent/" . htmlspecialchars($_SESSION['profile_pic'])
: "/CONTENT/ROOT_URI/Agent/default.png"; // placeholder image
?>
<style>
.agent-body {
@ -14,7 +17,7 @@
.agent-header {
background: #e95420;
color: #fff;
padding: 30px 15px 12px 15px;
padding: 15px 15px;
display: flex;
justify-content: space-between;
align-items: center;
@ -28,6 +31,16 @@
}
.agent-header-title {
margin: 0;
display: flex;
align-items: center;
gap: 10px;
}
.agent-header-title img {
width: 40px;
height: 40px;
border-radius: 50%;
object-fit: cover;
border: 2px solid #fff;
}
.agent-header-logout {
background: transparent;
@ -55,13 +68,13 @@
.agent-bottom-nav::after {
content: "";
position: fixed; /* fixed দিতে হবে */
bottom: 0; /* একদম স্ক্রিনের নিচে বসবে */
position: fixed;
bottom: 0;
left: 0;
right: 0;
height: 50px; /* margin-bottom এর সমান */
background: black; /* এখানে কালো রঙ */
z-index: -1; /* nav-এর পেছনে যাবে */
height: 50px;
background: black;
z-index: -1;
}
.agent-bottom-link {
color: #fff;
@ -86,14 +99,17 @@
<!-- Top Header -->
<div class="agent-header">
<div class="agent-header-title">Agent Panel</div>
<div class="agent-header-title">
<img src="<?php echo $profile_pic; ?>" alt="Profile">
<span>Agent Panel</span>
</div>
<?php if(isset($_SESSION) && !empty($_SESSION['user_id'])){ ?>
<button onclick="window.location.href='/Agent/logout'" class="agent-header-logout">Logout</button>
<?php } ?>
</div>
<!-- Some content -->
<div style="margin-top:20px; padding:15px;">
<div style="margin-top:80px; padding:15px;">
<!-- Dashboard Content -->
</div>
@ -108,7 +124,7 @@
<i class="fa-solid fa-chart-line"></i>
Reports
</a>
<a href="/Agent/Receive" class="agent-bottom-link" style="">
<a href="/Agent/Receive" class="agent-bottom-link">
<i class="fa-solid fa-plus"></i>
Payment
</a>
@ -116,12 +132,7 @@
<i class="fa-solid fa-money-check-dollar"></i>
Transaction
</a>
<!-- <a href="javascript:void(0)" onclick="window.location.reload();" class="agent-bottom-link">
<i class="fa-solid fa-rotate-right"></i>
Reload
</a> -->
</div>
<?php } ?>
</div>
</div>