forked from GreggJuanEduardoPH/Instagram-clone
-
Notifications
You must be signed in to change notification settings - Fork 0
/
explore.php
96 lines (79 loc) · 2.99 KB
/
explore.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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
<?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;
$post = new post;
$noti = new notifications;
$message = new message;
?>
<?php
if ($universal->isLoggedIn() == false) {
header('Location:'. DIR .'/welcome');
}
$session = $_SESSION['id'];
?>
<?php
$title = "{$noti->titleNoti()} Explore Instagram • Share and capture world's moments";
$keywords = "Instagram, Share and capture world's moments, share, capture, explore";
$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";
?>
<?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>
<div class="notify"><span></span></div>
<div class="overlay"></div>
<div class="badshah">
<div class="exp_nav">
<ul>
<li><a href="exp_people" data-hint="exp_people" data-src="ask" class="exp_nav_link">People</a></li>
<li><a href="exp_photos" data-hint="exp_photos" data-src="ask" class="exp_nav_link">Photos</a></li>
<li><a href="exp_videos" data-hint="exp_videos" data-src="ask" class="exp_nav_link">Videos</a></li>
<li><a href="exp_audios" data-hint="exp_audios" data-src="ask" class="exp_nav_link">Audios</a></li>
<li><a href="exp_groups" data-hint="exp_groups" data-src="ask" class="exp_nav_link">Groups</a></li>
</ul>
</div>
<div class="exp_hmm">
<div class="spinner">
<span></span><span></span><span></span>
</div>
</div>
<div class="exp_info">
<span>Click on tabs to refresh feeds</span>
</div>
</div>
<?php include_once 'needs/image_show.php'; ?>
<?php include_once 'needs/search.php'; ?>
<?php include_once 'includes/footer.php'; ?>
<script type="text/javascript">
$(function(){
function fetch(elem){
$.ajax({
url: DIR+"/ajaxify/explore/"+elem+".php",
method: "GET",
cache: false,
beforeSend: function(e){
$('.exp_hmm > .spinner').fadeIn('fast');
},
success: function(data){
var link = $('.exp_nav_link');
link.removeClass('exp_nav_active');
$(".exp_nav_link[href='"+ elem +"']").addClass('exp_nav_active');
$('.exp_hmm > .spinner').fadeOut('fast');
$('.exp_hmm').html(data).hide().fadeIn(100);
// $('html, body').animate({scrollTop: 380}, "slow");
}
});
}
var get = checkGET("ask");
if (get.has) {
fetch(get.value);
} else {
fetch("exp_people");
}
LinkIndicator('explore');
});
</script>