This commit is contained in:
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'); include(__DIR__ . '/auth.php');
require_login(); require_login();
date_default_timezone_set('Asia/Kolkata'); date_default_timezone_set('Asia/Kolkata');
// Don't send ANY HTML or echo above this line
?> ?>
<style> <style>
.logo { .logo {
@@ -20,40 +18,49 @@ date_default_timezone_set('Asia/Kolkata');
display: flex; display: flex;
align-items: center; align-items: center;
} }
/* Mobile-specific styles */ /* Mobile-specific styles */
@media (max-width: 767px) { @media (max-width: 767px) {
.mobile-welcome { .mobile-welcome,
padding: 15px; .mobile-profile {
color: #FFF; display: inline-block;
line-height: 20px;
margin-left: 15px;
} }
.desktop-welcome { .desktop-welcome,
display: none; .desktop-profile,
.navbar-right {
display: none !important; /* hide right side in mobile */
} }
} }
/* Desktop styles */ /* Desktop styles */
@media (min-width: 768px) { @media (min-width: 768px) {
.mobile-welcome { .mobile-welcome,
display: none; .mobile-profile {
display: none !important; /* hide mobile items in desktop */
} }
.desktop-welcome { .desktop-welcome {
display: inline-block; display: inline-block;
} }
} }
</style> </style>
<!-- nav start --> <!-- nav start -->
<nav class="navbar navbar-default"> <nav class="navbar navbar-default">
<div class="container-fluid"> <div class="container-fluid">
<div class="navbar-header"> <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"> <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="sr-only">Toggle navigation</span>
<span class="icon-bar"></span> <span class="icon-bar"></span>
<span class="icon-bar"></span> <span class="icon-bar"></span>
<span class="icon-bar"></span> <span class="icon-bar"></span>
</button> </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> <span class="mobile-welcome">Welcome! <?php echo htmlspecialchars($_SESSION['name'] ?? ''); ?></span>
</div> </div>
@@ -63,7 +70,6 @@ date_default_timezone_set('Asia/Kolkata');
$userType = $_SESSION['type'] ?? ''; $userType = $_SESSION['type'] ?? '';
if ($userType === 'admin') { if ($userType === 'admin') {
// Admin gets everything
?> ?>
<li><a href="/Admin/Create_AC_Recurring">New Recurring</a></li> <li><a href="/Admin/Create_AC_Recurring">New Recurring</a></li>
<li><a href="/Admin/Create_AC_FD">New FD</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> <li><a href="/Admin/Settings_Agent">Agent Settings</a></li>
<?php <?php
} elseif ($userType === 'bm') { } elseif ($userType === 'bm') {
// Branch Manager menu
?> ?>
<li><a href="/Admin/Create_AC_Recurring">New Recurring</a></li> <li><a href="/Admin/Create_AC_Recurring">New Recurring</a></li>
<li><a href="/Admin/Create_AC_FD">New FD</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> <li><a href="/Admin/agent_View_report">Commission</a></li>
<?php <?php
} elseif ($userType === 'agent') { } elseif ($userType === 'agent') {
// Agent menu
?> ?>
<li><a href="/Admin/View_AC?Type=Recurring">View A/C</a></li> <li><a href="/Admin/View_AC?Type=Recurring">View A/C</a></li>
<li><a href="/Admin/Due">Deemand Sheet</a></li> <li><a href="/Admin/Due">Deemand Sheet</a></li>
@@ -100,8 +104,17 @@ date_default_timezone_set('Asia/Kolkata');
?> ?>
</ul> </ul>
<!-- Desktop right side -->
<ul class="nav navbar-nav navbar-right"> <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> <li><a href="/Admin/Signout">Signout</a></li>
</ul> </ul>
</div> </div>

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.1 KiB

View File

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