s1
This commit is contained in:
@@ -13,6 +13,17 @@
|
||||
} catch (PDOException $e) {
|
||||
echo "Error: " . $e->getMessage();
|
||||
}
|
||||
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 cleads WHERE user = :user AND date IS NOT NULL AND date >= CURRENT_DATE");
|
||||
$stmt->bindParam(':user', $_SESSION['email']);
|
||||
$stmt->execute();
|
||||
$result = $stmt->fetch(PDO::FETCH_ASSOC);
|
||||
$follow_date_count = $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: 999;">
|
||||
<div class="container mx-auto flex flex-row place-content-between text-[#fff] ">
|
||||
@@ -21,16 +32,26 @@
|
||||
<p class="font-bold">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="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>';
|
||||
}
|
||||
?>
|
||||
<a href="/notifications" class="inline-flex">
|
||||
<svg height="23px" width="23px" version="1.1" id="_x32_" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 512 512" xml:space="preserve" fill="#ffffff"><g id="SVGRepo_bgCarrier" stroke-width="0"></g><g id="SVGRepo_tracerCarrier" stroke-linecap="round" stroke-linejoin="round"></g><g id="SVGRepo_iconCarrier"> <style type="text/css"> .st0{fill:#ffffff;} </style> <g> <path class="st0" d="M448.282,367.411H63.712c-19.812,0-35.928,16.114-35.928,35.924c0,19.814,16.116,35.932,35.928,35.932h384.57 c19.814,0,35.934-16.118,35.934-35.932C484.216,383.526,468.096,367.411,448.282,367.411z"></path> <path class="st0" d="M425.958,340.707c-8.653-14.375-13.226-30.765-13.226-47.396v-78.824c0-78.145-57.706-144.27-134.748-155.09 c5.693-6.534,8.793-14.759,8.793-23.474c0-19.81-16.12-35.924-35.934-35.924c-19.808,0-35.924,16.114-35.924,35.924 c0,9.324,3.729,18.272,10.326,24.996C152.058,75.478,99.269,139.562,99.269,214.488v78.824c0,16.627-4.573,33.016-13.224,47.396 l-1.45,2.41h342.813L425.958,340.707z"></path> <path class="st0" d="M201.956,470.773C206.051,494.663,226.61,512,250.84,512c24.235,0,44.8-17.337,48.896-41.227l0.32-1.86h-98.42 L201.956,470.773z"></path> </g> </g></svg>
|
||||
<?php if($total_notice > 0){ ?>
|
||||
<div class="bg-[#FF0000] rounded-full h-[18px] w-[18px] flex justify-center place-items-center -mt-[8px] -ml-[10px]">
|
||||
<p class="text-center"><?php echo $total_notice; ?></p>
|
||||
</div>
|
||||
<?php } ?>
|
||||
</a>
|
||||
|
||||
|
||||
<!-- <span class="" style="background-color: #FF0000; padding-left: 4px; padding-right: 4px; border-radius: 50%; ">1</span> -->
|
||||
</i></a>
|
||||
<div class="flex flex-row space-x-4">
|
||||
<a href="/notifications" class="flex flex-row">
|
||||
<?php
|
||||
// if($total_notice > 0){
|
||||
// echo ' <div class="bg-[#FF0000] rounded-full h-[18px] w-[18px] flex justify-center place-items-center -mt-[8px] -ml-[10px]">
|
||||
// <p class="text-center">'.$total_notice.'</p>
|
||||
// </div>';
|
||||
// }
|
||||
?>
|
||||
</a>
|
||||
<a href="/logout" class="bg-[#E4C1F9] text-[#443780] px-4 rounded-full"><i class="fa fa-sign-out">Logout</i></a>
|
||||
</div>
|
||||
<?php
|
||||
|
||||
Reference in New Issue
Block a user