-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathmain.php
More file actions
102 lines (90 loc) · 2.8 KB
/
main.php
File metadata and controls
102 lines (90 loc) · 2.8 KB
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
97
98
99
100
101
102
<?php
require_once 'sdk/facebook.php';
$config = array('appId' => '249696895179837', 'secret' => '446a84044156109ba1f39d09954c73b9');
$facebook = new Facebook($config);
$uid = $facebook->getUser();
$user_profile = $facebook->api('/me','GET');
?>
<html>
<head>
<title>CySpell</title>
<link rel="stylesheet" href="css/styles.css">
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.1/jquery.min.js"></script>
<script src="js/jquery.transit.min.js"></script>
<script>
$(document).ready(function() {
$('#gradelist a').bind('mouseenter', function() {
$(this).transition({
backgroundColor : 'yellow',
color : 'limegreen',
border : '2px solid yellow',
queue : false
}, 150);
$(this).bind('mouseout', function() {
$(this).transition({
backgroundColor : '',
color : 'white',
border : '2px solid white',
queue : false
}, 150);
$(this).unbind('mouseout');
return false;
});
return false;
});
});
</script>
</head>
<body>
<div id="fb-root"></div>
<!--
Below we include the Login Button social plugin. This button uses the JavaScript SDK to
present a graphical Login button that triggers the FB.login() function when clicked.
Learn more about options for the login button plugin:
/docs/reference/plugins/login/ -->
<h1 class="maintitle"><img src="images/Cy-Spell-Logo.png"></h1>
<div id="welcome"> <?php echo "Welcome " . $user_profile['name'] . "!";?></div>
<ul id="gradelist">
<li>
<a href="start.php?grade=k"><img src="images/kindergarten.png"></a>
</li>
<li>
<a href="start.php?grade=1"><img src="images/first.png"></a>
</li>
<li>
<a href="start.php?grade=2"><img src="images/second-grade.png"></a>
</li>
<li>
<a href="start.php?grade=3"><img src="images/third.png"></a>
</li>
<li>
<a href="start.php?grade=4"><img src="images/fourth.png"></a>
</li>
<a href="#" onclick="logout();"><img src="images/facebook1.png"/></a>
</ul>
<script>
window.fbAsyncInit = function() {
FB.init({
appId : '249696895179837', // App ID
oauth : true,
channelUrl : '//local.cyspell.com/channel.html', // Channel File
status : true, // check login status
cookie : true, // enable cookies to allow the server to access the session
xfbml : true // parse XFBML
});
}; ( function() {
var e = document.createElement('script');
e.src = document.location.protocol + '//connect.facebook.net/en_US/all.js';
e.async = true;
document.getElementById('fb-root').appendChild(e);
}());
function logout() {
FB.logout(function(response) {
// Person is now logged out
console.log('LOGGED out..!, ' + response.name + '.');
window.location.href = "index.php";
});
}
</script>
</body>
</html>