-
Notifications
You must be signed in to change notification settings - Fork 0
/
footer-menu.php
51 lines (46 loc) · 1.39 KB
/
footer-menu.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
<style type="text/css">
#noti-new {
background-color: #DC143C;
color:#FFFFFF;
border-radius: 50px;
height: 22px;
min-width: 0px !important;
padding-left: 6px;
padding-right: 6px;
}
</style>
<script type="text/javascript" src="scripts/jquery.js"></script>
<div id="footer-menu" class="footer-menu-3-icons footer-menu-style-2">
<a href="index.php"><i class="fa fa-home"></i><span>الرئسية</span></a>
<a href="notfcation.php"><label id="noti-new"></label><i class="fa fa-bell"></i><span>الاشعارات</span></a>
<a href="profile.php"><i class="fa fa-user"></i><span>الصفحة الشخصية</span></a>
<div class="clear"></div>
</div>
<script>
function newNotification(){
$.ajax({
url:"php/_getNotification.php",
success:function(res){
console.log(res);
if(res.unseen != 0){
$("#noti-new").text(res.unseen);
}else{
$("#noti-new").text("");
$("#noti-new").css('padding','0px');
}
},
error:function(e){
console.log(e,'it for noti');
}
});
}
newNotification();
var page = document.location.pathname.match(/[^\/]+$/)[0];
if(page == 'notfcation.php'){
$('[href="notfcation.php"]').addClass("active-nav");
}else if(page == 'profile.php'){
$('[href="profile.php"]').addClass("active-nav");
}else if(page == 'index.php'){
$('[href="index.php"]').addClass("active-nav");
}
</script>