-
Notifications
You must be signed in to change notification settings - Fork 0
/
indexTEST.php
169 lines (133 loc) · 5.32 KB
/
indexTEST.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
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
<?php
// include 'Mobile_Detect.php';
// $detect = new Mobile_Detect();
//
// if (!$detect->isMobile()) {
// // Any mobile device.
// header("Location: mobiletest/iphone.php?url=stanford.edu/~szheng0/cgi-bin/balancev3/mobile.php");
// }
//'session_check.php' checks if the session is active and if not
// redirects to the splash page
include("session_check.php");
?>
<!-- SESSION: ABOVE MUST BE PLACED AT VERY BEGINNING OF FILE BEFORE ANYTHING GET'S OUTPUTTED TO BROWSER -->
<!--=============This is our optimizeley test page ========================== -->
<!--=====================see also, 'challengeMeTEST.php for format changes================== -->
<!DOCTYPE html>
<html>
<?php
//'head.php' includes all header information for all of our pages
// ie. everything that lives within <head>...info..</head>
//include("head.php");
?>
<!--======================================= -->
<!-- REMOVE THIS AFTER THE OPTIMIZELY!!!!! and put the include above back in -->
<head>
<script src="//cdn.optimizely.com/js/141317990.js"></script>
<title>Balance</title>
<!--Favicon and touch icons-->
<!-- Deal with these later -->
<link rel="shortcut icon" href="img/favicon.ico">
<link rel="apple-touch-icon" href="img/appicon.png" />
<link rel="apple-touch-startup-image" href="img/startup.png">
<!-- Stuff for displaying on mobile-->
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<meta name="viewport" content="width=device-width, user-scalable=no" />
<!--Below line, from Rio's examples, ask him if we don't know what it is-->
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js"></script>
<!-- Our style sheet-->
<link href="css/style.css" rel="stylesheet">
<!-- Bootstrap stylesheets-->
<link href="css/bootstrap.css" rel="stylesheet">
<!--<link href="css/bootstrap-responsive.css" rel="stylesheet">-->
<!-- NOTE: there are more specific bootstrap css files we can get and js files too - ask Xan-->
</head>
<!--======================================= -->
<!--======================================= -->
<body>
<!-- Note,back button to the header... make invisible on homepage??? -->
<?php
//partial for the top banner of the page
$home='"active"';
$search='""';
$profile='""';
$settings='""';
include("banner.php");
?>
<!-- NOTE DIFF NAMES -->
<div class="container firstOffset">
<div class="btn-group menu" data-toggle="buttons-radio" id="btnTab" style="text-align: center;">
<a href="#trending" class="btn active">Trending</a>
<a href="#you" class="btn">For you</a>
<a href="#challenge" class="btn">Challenge me</a>
</div>
</div>
<div class="container">
<div id="myTabContent" class="tab-content">
<div class="tab-pane fade active in" id="trending">
<?php
//partial for the trending news results
include("trending.php");
?>
</div>
<div class="tab-pane fade" id="you">
<?php
//partial for the trending news results
include("recommended.php");
?>
</div>
<div class="tab-pane fade" id="challenge">
<?php
//partial for the trending news results
include("challengeMeTEST.php");
?>
</div>
</div>
</div>
<?php
//partial for the footer of the page
$story=false;
include("footer.php");
?>
<!-- The javascript
================================================== -->
<!-- Placed at the end of the document so the pages load faster -->
<script type="text/javascript">
$("a").click(function (event) {
event.preventDefault();
window.location = $(this).attr("href");
});
</script>
<!-- This does the js for the buttons just below the header-->
<!-- WOULD BE COOL IF YOU COULD SWIPE ACROSS TO change THESE too-->
<script type="text/javascript">
$('#btnTab a').click(function (e) {
e.preventDefault();
$(this).tab('show');
})
$('#btnTab a[href="#trending"]').tab('show'); // Select tab by name
$('#btnTab a:first').tab('show'); // Select first tab
$('#btnTab a:last').tab('show'); // Select last tab
$('#btnTab li:eq(2) a').tab('show'); // Select third tab (0-indexed)
</script>
<!-- Below java script from twitter bootstrap-->
<script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script>
<script src="js/bootstrap-button.js"></script>
<script src="js/jquery.js"></script>
<script src="js/bootstrap-transition.js"></script>
<script src="js/bootstrap-alert.js"></script>
<script src="js/bootstrap-modal.js"></script>
<script src="js/bootstrap-dropdown.js"></script>
<script src="js/bootstrap-scrollspy.js"></script>
<script src="js/bootstrap-tab.js"></script>
<script src="js/bootstrap-tooltip.js"></script>
<script src="js/bootstrap-popover.js"></script>
<script src="js/bootstrap-button.js"></script>
<script src="js/bootstrap-collapse.js"></script>
<script src="js/bootstrap-carousel.js"></script>
<script src="js/bootstrap-typeahead.js"></script>
<script src="js/bootstrap-affix.js"></script>
<script src="js/application.js"></script>
</body>
</html>