forked from GreggJuanEduardoPH/Instagram-clone
-
Notifications
You must be signed in to change notification settings - Fork 0
/
notifications.php
58 lines (47 loc) · 1.83 KB
/
notifications.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
52
53
54
55
56
57
58
<?php include 'config/declare.php'; ?>
<!-- a universal file that has all the classes included -->
<?php include 'config/classesGetter.php'; ?>
<!-- creating objects -->
<?php
$universal = new universal;
$avatar = new Avatar;
$follow = new follow_system;
$Post = new post;
$Time = new time;
$noti = new notifications;
$message = new message;
?>
<?php
if ($universal->isLoggedIn() == false) {
header('Location:'. DIR .'/welcome');
}
$session = $_SESSION['id'];
?>
<?php
$title = "Notifications • Instagram";
$keywords = "Instagram, Share and capture world's moments, share, capture, Notifications";
$desc = "Instagram lets you capture, follow, like and share world's moments in a better way and tell your story with photos, messages, posts and everything in between";
?>
<!-- including files for header of document -->
<?php include_once 'includes/header.php'; ?>
<?php include_once 'needs/heading.php'; ?>
<?php include_once 'needs/nav.php'; ?>
<div class="user_info" data-userid="<?php echo $session; ?>" data-sessionid="<?php echo $session; ?>" data-username="<?php echo $universal->getUsernameFromSession(); ?>"></div>
<!-- TO MARK NOTIFICATIONS AS READ -->
<?php $noti->markRead(); ?>
<div class="overlay"></div>
<div class="notify"><span></span></div>
<div class="badshah">
<?php include 'ajaxify/notifications/notifications.php'; ?>
</div>
<?php include_once 'needs/prompt.php'; ?>
<?php include_once 'needs/search.php'; ?>
<!-- including the footer of the document -->
<?php include_once 'includes/footer.php'; ?>
<script type="text/javascript">
$(function(){
LinkIndicator("notifications");
$('.notifications').children().filter('.m_n_new').text('');
$('.notification_span').html("<i class='material-icons'>notifications_none</i>");
});
</script>