main
parent
e143ac4d9a
commit
fdf623e84d
|
@ -2,6 +2,8 @@
|
|||
include(__DIR__ . '/auth.php');
|
||||
require_login();
|
||||
date_default_timezone_set('Asia/Kolkata');
|
||||
|
||||
// Don't send ANY HTML or echo above this line
|
||||
?>
|
||||
<style>
|
||||
.logo {
|
||||
|
@ -18,116 +20,66 @@ date_default_timezone_set('Asia/Kolkata');
|
|||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
/* Mobile-specific styles */
|
||||
@media (max-width: 767px) {
|
||||
.mobile-welcome,
|
||||
.mobile-profile {
|
||||
display: inline-block;
|
||||
.mobile-welcome {
|
||||
padding: 15px;
|
||||
color: #FFF;
|
||||
line-height: 20px;
|
||||
margin-left: 15px;
|
||||
}
|
||||
.desktop-welcome,
|
||||
.desktop-profile,
|
||||
.navbar-right {
|
||||
display: none !important; /* hide right side in mobile */
|
||||
.desktop-welcome {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
/* Desktop styles */
|
||||
@media (min-width: 768px) {
|
||||
.mobile-welcome,
|
||||
.mobile-profile {
|
||||
display: none !important; /* hide mobile items in desktop */
|
||||
.mobile-welcome {
|
||||
display: none;
|
||||
}
|
||||
.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 -->
|
||||
|
||||
<?php
|
||||
$imagePath = '';
|
||||
if(isset($_SESSION['profile_pic']) && !empty($_SESSION['profile_pic'])){
|
||||
$imagePath = "/CONTENT/ROOT_URI/Admin/".$_SESSION['profile_pic'];
|
||||
}else{
|
||||
$imagePath = "/CONTENT/ROOT_URI/Admin/default.svg";
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
<img class="mobile-profile"
|
||||
src="<?php echo $imagePath; ?>"
|
||||
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>
|
||||
|
||||
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
|
||||
<ul class="nav navbar-nav">
|
||||
<?php
|
||||
$userType = $_SESSION['type'] ?? '';
|
||||
|
||||
if ($userType === 'admin') {
|
||||
?>
|
||||
<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_Loan">New Loan</a></li>
|
||||
<li><a href="/Admin/Add_group">Add New Group</a></li>
|
||||
<li><a href="/Admin/Trans_New">Transaction</a></li>
|
||||
<li><a href="/Admin/agent-targets">Agent Targets</a></li>
|
||||
<!-- <li><a href="/Admin/agent_View_report">Commission</a></li> -->
|
||||
<li><a href="/Admin/View_AC?Type=Recurring">View A/C</a></li>
|
||||
<li><a href="/Admin/Report">Report</a></li>
|
||||
<li><a href="/Admin/Due">Deemand Sheet</a></li>
|
||||
<li><a href="/Admin/Settings_Agent">Agent Settings</a></li>
|
||||
<?php
|
||||
} elseif ($userType === 'bm') {
|
||||
?>
|
||||
<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_Loan">New Loan</a></li>
|
||||
<li><a href="/Admin/Add_group">Add New Group</a></li>
|
||||
<li><a href="/Admin/Trans_New">Transaction</a></li>
|
||||
<li><a href="/Admin/agent-targets">Agent Targets</a></li>
|
||||
<li><a href="/Admin/agent_View_report">Commission</a></li>
|
||||
<?php
|
||||
} elseif ($userType === 'agent') {
|
||||
?>
|
||||
<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/Report">Report</a></li>
|
||||
<!-- <li><a href="/Admin/agent_View_report">Commission</a></li> -->
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
<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_Loan">New Loan</a></li>
|
||||
<li><a href="/Admin/Add_group">Add New Group</a></li>
|
||||
<li><a href="/Admin/View_AC?Type=Recurring">View A/C</a></li>
|
||||
<li><a href="/Admin/Trans_New">Transaction</a></li>
|
||||
<li><a href="/Admin/Due">Deemand Sheet</a></li>
|
||||
<li><a href="/Admin/Report">Report</a></li>
|
||||
<!-- <li><a href="/Admin/Revert">Revert</a></li> -->
|
||||
<?php
|
||||
if($_SESSION['type'] === 'admin'){ ?>
|
||||
<li><a href="/Admin/agent_View_report">Commission</a></li>
|
||||
<li><a href="/Admin/agent-targets">Agent Targets</a></li>
|
||||
<li><a href="/Admin/Settings_Agent">Agent Settings</a></li>
|
||||
<?php } ?>
|
||||
</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-profile">
|
||||
<img src="<?php echo $imagePath; ?>"
|
||||
width="40" height="40"
|
||||
style="border-radius:50%; object-fit:cover;"
|
||||
alt="Profile">
|
||||
</li>
|
||||
<li class="desktop-welcome"><span class="welcome-text">Welcome! <?php echo htmlspecialchars($_SESSION['name'] ?? ''); ?></span></li>
|
||||
<li><a href="/Admin/Signout">Signout</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
</nav>
|
|
@ -0,0 +1,133 @@
|
|||
<?php
|
||||
include(__DIR__ . '/auth.php');
|
||||
require_login();
|
||||
date_default_timezone_set('Asia/Kolkata');
|
||||
?>
|
||||
<style>
|
||||
.logo {
|
||||
display: inline-block;
|
||||
margin: auto;
|
||||
vertical-align: middle;
|
||||
}
|
||||
.welcome-text {
|
||||
padding: 15px;
|
||||
color: #FFF;
|
||||
display: inline-block;
|
||||
}
|
||||
.navbar-right {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
/* Mobile-specific styles */
|
||||
@media (max-width: 767px) {
|
||||
.mobile-welcome,
|
||||
.mobile-profile {
|
||||
display: inline-block;
|
||||
}
|
||||
.desktop-welcome,
|
||||
.desktop-profile,
|
||||
.navbar-right {
|
||||
display: none !important; /* hide right side in mobile */
|
||||
}
|
||||
}
|
||||
|
||||
/* Desktop styles */
|
||||
@media (min-width: 768px) {
|
||||
.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">
|
||||
<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 -->
|
||||
|
||||
<?php
|
||||
$imagePath = '';
|
||||
if(isset($_SESSION['profile_pic']) && !empty($_SESSION['profile_pic'])){
|
||||
$imagePath = "/CONTENT/ROOT_URI/Admin/".$_SESSION['profile_pic'];
|
||||
}else{
|
||||
$imagePath = "/CONTENT/ROOT_URI/Admin/default.svg";
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
<img class="mobile-profile"
|
||||
src="<?php echo $imagePath; ?>"
|
||||
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>
|
||||
|
||||
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
|
||||
<ul class="nav navbar-nav">
|
||||
<?php
|
||||
$userType = $_SESSION['type'] ?? '';
|
||||
|
||||
if ($userType === 'admin') {
|
||||
?>
|
||||
<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_Loan">New Loan</a></li>
|
||||
<li><a href="/Admin/Add_group">Add New Group</a></li>
|
||||
<li><a href="/Admin/Trans_New">Transaction</a></li>
|
||||
<li><a href="/Admin/agent-targets">Agent Targets</a></li>
|
||||
<!-- <li><a href="/Admin/agent_View_report">Commission</a></li> -->
|
||||
<li><a href="/Admin/View_AC?Type=Recurring">View A/C</a></li>
|
||||
<li><a href="/Admin/Report">Report</a></li>
|
||||
<li><a href="/Admin/Due">Deemand Sheet</a></li>
|
||||
<li><a href="/Admin/Settings_Agent">Agent Settings</a></li>
|
||||
<?php
|
||||
} elseif ($userType === 'bm') {
|
||||
?>
|
||||
<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_Loan">New Loan</a></li>
|
||||
<li><a href="/Admin/Add_group">Add New Group</a></li>
|
||||
<li><a href="/Admin/Trans_New">Transaction</a></li>
|
||||
<li><a href="/Admin/agent-targets">Agent Targets</a></li>
|
||||
<li><a href="/Admin/agent_View_report">Commission</a></li>
|
||||
<?php
|
||||
} elseif ($userType === 'agent') {
|
||||
?>
|
||||
<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/Report">Report</a></li>
|
||||
<!-- <li><a href="/Admin/agent_View_report">Commission</a></li> -->
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</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-profile">
|
||||
<img src="<?php echo $imagePath; ?>"
|
||||
width="40" height="40"
|
||||
style="border-radius:50%; object-fit:cover;"
|
||||
alt="Profile">
|
||||
</li>
|
||||
<li><a href="/Admin/Signout">Signout</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
Loading…
Reference in New Issue