-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlayout.php
68 lines (56 loc) · 2.34 KB
/
layout.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
<!DOCTYPE html>
<html lang="en">
<head>
<title>HNS</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link href="css/bootstrap.min.css" rel="stylesheet" media="screen">
<link href="css/bootstrap-responsive.min.css" rel="stylesheet" media="screen">
<link href="css/custom.css" rel="stylesheet" media="screen">
</head>
<body>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
<script src="js/bootstrap.min.js"></script>
<script src="js/custom.js"></script>
<div id="fb-root"></div>
<script>
var page = '<?php echo $page ?>';
var FBC = {callback: null};
window.fbAsyncInit = function() {
// init the FB JS SDK
FB.init({
appId : '<?php echo $appId ?>', // App ID from the App Dashboard
status : true, // check the login status upon init?
cookie : true, // set sessions cookies to allow your server to access the session?
xfbml : true // parse XFBML tags on this page?
});
// Additional initialization code such as adding Event Listeners goes here
if(FBC.callback)
FBC.callback();
};
// Load the SDK's source Asynchronously
(function(d, debug){
var js, id = 'facebook-jssdk', ref = d.getElementsByTagName('script')[0];
if (d.getElementById(id)) {return;}
js = d.createElement('script'); js.id = id; js.async = true;
js.src = "//connect.facebook.net/en_US/all" + (debug ? "/debug" : "") + ".js";
ref.parentNode.insertBefore(js, ref);
}(document, /*debug*/ false));
</script>
<div id="page">
<div class="navbar">
<div class="navbar-inner">
<a class="brand" href="./index.php">HNS</a>
<ul class="nav">
<li<?php if($page == 'news') echo ' class="active"'?>><a href="./index.php?page=news">News</a></li>
<!-- <li<?php if($page == 'newest') echo ' class="active"'?>><a href="./index.php?page=newest">Newest</a></li> -->
<li<?php if($page == 'mine') echo ' class="active"'?>><a href="./index.php?page=mine">My Stories</a></li>
</ul>
</div>
</div>
<div id="content">
<?php require_once($page.'.php'); ?>
</div>
</div>
</body>
</html>