This commit is contained in:
Suvodip
2024-05-07 18:54:29 +05:30
parent 13133d2d2a
commit 56fb4cb4fe
9 changed files with 935 additions and 72 deletions

View File

@@ -1,21 +1,39 @@
<?php
require_once('.hta_config/crm_config.php');
if($_SESSION['user_type']=='admin'){
$all_leads_url = '/admin/all-leads';
$all_leads_url = '/leads';
} else
$all_leads_url = '/cleads';{}
$all_leads_url = '/leads';
try {
$conn = new PDO("mysql:host=$mariaServer;dbname=$mariaDb", $mariaUser, $mariaPass);
$conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
$stmt = $conn->prepare("SELECT COUNT(*) AS count FROM appointment WHERE email = :email AND view_status = 0");
$stmt->bindParam(':email', $_SESSION['email']);
$stmt->execute();
$result = $stmt->fetch(PDO::FETCH_ASSOC);
$total_notice = $result['count'];
} catch (PDOException $e) {
echo "Error: " . $e->getMessage();
}
?>
<section class="bg-[#443780] py-1.5 px-4" style="position: fixed; width: 100%; z-index: 10;">
<section class="bg-[#443780] py-1.5 px-4" style="position: fixed; width: 100%; z-index: 999;">
<div class="container mx-auto flex flex-row place-content-between text-[#fff] ">
<div>
<p>CRM</p>
</div>
<div class="flex flex-row space-x-4 place-items-center">
<div class="flex flex-row space-x-4">
<a href="/notifications" class=""><i class="fa fa-bell">
<a href="/notifications" class="flex flex-row"><i class="fa fa-bell">
<?php
if($total_notice > 0){
echo '<span class="bg-[#FF0000] rounded-full px-1" style="margin-top: -10px;">'.$total_notice.'</span>';
}
?>
<!-- <span class="" style="background-color: #FF0000; padding-left: 4px; padding-right: 4px; border-radius: 50%; ">1</span> -->
</i></a>
<a href="/logout" class="bg-[#E4C1F9] text-[#443780] px-4 rounded-full"><i class="fa fa-sign-out">Logout</i></a>
</div>
<?php
@@ -33,7 +51,7 @@
$lastInitial = substr($nameParts[count($nameParts) - 1], 0, 1);
echo ' <div style="display: flex; flex-direction: row; place-items: center">
<p>Hi <span>'.$nameParts[0].'</span></p>&nbsp;
<p class="p-2" style="background: linear-gradient(180deg, #E4C1F9 0%, rgba(129, 126, 242, 0.91) 100%); border-radius: 50%; font-size: 20px; color: #fff; font-weight: bold;">'.$firstInitial.$lastInitial.'</p>
<p class="p-2 uppercase" style="background: linear-gradient(180deg, #E4C1F9 0%, rgba(129, 126, 242, 0.91) 100%); border-radius: 50%; font-size: 20px; color: #fff; font-weight: bold;">'.$firstInitial.$lastInitial.'</p>
</div>';
}
} catch (PDOException $e) {
@@ -44,7 +62,7 @@
</div>
</section>
<div style="display: flex; flex-direction: row;">
<div style="position: fixed; height: 100%; z-index: 999;">
<div style="position: fixed; height: 100%; z-index: 997;">
<nav class="main-menu">
<ul style="padding-top: 100px;">
<li>
@@ -70,7 +88,7 @@
$access_data_not_undescore = str_replace("_", " ", $access_data);
?>
<li>
<a href="/cleads/by-business-verticals/?bv=<?php echo $access_data; ?>">
<a href="/leads?bv=<?php echo $access_data; ?>">
<i class="fa fa-2x"><img src="/assets/bv.png" alt="" /></i>
<!-- <i class="fa fa-square fa-2x"></i> -->
<span class="nav-text" style="text-transform: capitalize;">
@@ -95,7 +113,7 @@
$num_rows = $stmt->rowCount();
foreach($bv_rows as $bv_row){ $access_data_not_undescore = str_replace("_", " ",$bv_row['bv']);?>
<li>
<a href="/cleads/by-business-verticals/?bv=<?php echo $bv_row['bv']; ?>">
<a href="/leads?bv=<?php echo $bv_row['bv']; ?>">
<i class="fa fa-2x"><img src="/assets/bv.png" alt="" /></i>
<!-- <i class="fa fa-square fa-2x"></i> -->
<span class="nav-text" style="text-transform: capitalize;">
@@ -112,6 +130,7 @@
}
?>
<li>
<?php if(isset($_SESSION['user_type']) && $_SESSION['user_type'] == 'user'){ ?>
<a href="/cleads/my-leads">
<i class="fa fa-2x"><img src="/assets/my-lead.png" alt="" /></i>
<!-- <i class="fa fa-square fa-2x"></i> -->
@@ -119,6 +138,7 @@
My Leads
</span>
</a>
<?php } ?>
</li>
<li>
<a href="/add-csv">
@@ -159,6 +179,14 @@
?>
</ul>
<ul class="logout">
<li>
<a href="/profile">
<i class="fa fa-user fa-2x"></i>
<span class="nav-text">
Profile
</span>
</a>
</li>
<li>
<a href="/logout">
<i class="fa fa-power-off fa-2x"></i>