-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathindex.php
More file actions
35 lines (31 loc) · 855 Bytes
/
index.php
File metadata and controls
35 lines (31 loc) · 855 Bytes
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
<?php
require_once 'lib/user_session.php';
$user = new UserSession();
$is_login = false;
if (isset($_GET['action'])){
if ($_GET['action'] =='logout')
$user->logout();
}else{
$is_login = $user->is_login();
}
?>
<html xmlns:fb="http://www.facebook.com/2008/fbml">
<head>
<title>Facebook Index</title>
</head>
<body>
<?php if ($is_login){ ?>
<a href="index.php?action=logout">Logout</a>
<?php if ($user->oauth_provider =='facebook') { ?>
<p>You are using facebook account to login on this site</p>
<img src="https://graph.facebook.com/<?php echo $_SESSION['username']; ?>/picture">
<br />
<?php print_r($user->get_facebook_profile()); ?>
<?php }else { ?>
<p>You are using normal login user</p>
<?php } ?>
<?php } else {?>
<a href="login.php">Login</a>
<?php } ?>
</body>
</html>