-
Notifications
You must be signed in to change notification settings - Fork 0
/
learningcenter.phtml
executable file
·194 lines (185 loc) · 8.82 KB
/
learningcenter.phtml
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
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
<?php
$title = "FlexScore Learning Center";
$detail = "FlexScore gives you total financial clarity wrapped up in a single score. It's fast, free, and even a little fun.";
$linkImage = "https://www.flexscore.com/ui/images/home_laptop.png";
$linkVideo = "";
$paramsLocal = file_exists('service/config/params-local.php') ? require('service/config/params-local.php') : array();
require_once(realpath(dirname(__FILE__) . '/service/helpers/Articles.php'));
$url = full_url();
$baseurl = $paramsLocal['applicationUrl'];
$isSearch = strpos($url, "/search/");
$isCategory = strpos($url, "/category/");
$isGlossary = strpos($url, "/glossary/");
$isLearningCenter = endsWith($url, "/learningcenter") || endsWith($url, "/learningcenter/");
$isPost = strpos($url, "/learningcenter/");
if ($isPost !== false && $isLearningCenter === false) {
$slug = substr($url, $isPost + 16);
$post = getArticle($slug);
if (!empty($post)) {
$title = $post["post_title"];
$detail = $post["post_excerpt"];
switch ($post["post_mime_type"]) {
case "image/jpeg":
case "image/gif":
case "image/png":
$linkImage = $post["guid"];
break;
case "video/x-flv":
$pathTokens = explode('/', $post["guid"]);
$linkImage = "https://img.youtube.com/vi/" . $pathTokens[4] . "/maxresdefault.jpg";
$linkVideo = "http://www.youtube.com/v/" . $pathTokens[4];
break;
}
}
}
if ($isSearch !== false) {
$title = $title . " - Search";
}
if ($isGlossary !== false) {
$title = $title . " - Financial Glossary";
}
if ($isCategory !== false) {
$slug = substr($url, $isCategory + 10);
$categories = getCategory($slug);
if (!empty($categories)) {
$title = $title . " - " . $categories["categoryName"];
$detail = $categories["categoryDescription"];
}
}
function endsWith($haystack, $needle) {
return $needle === "" || substr($haystack, -strlen($needle)) === $needle;
}
function domain_url() {
$s = empty($_SERVER["HTTPS"]) ? '' : ($_SERVER["HTTPS"] == "on") ? "s" : "";
$sp = strtolower($_SERVER["SERVER_PROTOCOL"]);
$protocol = substr($sp, 0, strpos($sp, "/")) . $s;
$url = $protocol . "://" . $_SERVER['SERVER_NAME'];
$uri = $_SERVER['PHP_SELF'];
return $url . substr($uri, 0, strrpos($uri, "/"));
}
function full_url() {
$s = empty($_SERVER["HTTPS"]) ? '' : ($_SERVER["HTTPS"] == "on") ? "s" : "";
$sp = strtolower($_SERVER["SERVER_PROTOCOL"]);
$protocol = substr($sp, 0, strpos($sp, "/")) . $s;
return $protocol . "://" . $_SERVER['SERVER_NAME'] . $_SERVER['REQUEST_URI'];
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
<base href="<?php echo $baseurl ?>">
<meta charset="utf-8">
<title><?php echo $title ?></title>
<meta name="viewport" content="width=device-width,initial-scale=1.0,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
<meta name="description" content="<?php echo $detail ?>">
<meta name="author" content="FlexScore">
<meta name="apple-itunes-app" content="app-id=916633885">
<meta property="og:title" content="<?php echo $title ?>">
<meta property="og:url" content="<?php echo $url ?>">
<meta property="og:locale" content="en_US">
<meta property="og:description" content="<?php echo $detail ?>">
<meta property="og:image" content="<?php echo $linkImage ?>">
<?php if ($linkVideo) { ?>
<meta property="og:video" content="<?php echo $linkVideo ?>">
<meta property="og:video:height" content="720">
<meta property="og:video:width" content="1280">
<meta property="og:video:type" content="application/x-shockwave-flash">
<?php } ?>
<meta content="u3kX0jqV2_YEhCCIzKks2-P3Ws45R2ESrSsLQkRCiaQ" name="google-site-verification">
<meta content="xZIdeyYAE_R97c0H6OGvkHeVWEI" name="alexaVerifyID">
<meta name="msvalidate.01" content="1967933DCC3E8DF336994671EAAE77FD" />
<!-- styles -->
<script type="text/javascript" src="<?php echo $baseurl ?>uiconf.js"></script>
<link href="<?php echo $baseurl ?>ui/css/bootstrap/bootstrap.css" rel="stylesheet" />
<style type="text/css">body {padding-top: 60px;padding-bottom: 40px;}
</style>
<link rel="stylesheet" href="<?php echo $baseurl ?>ui/css/jquery.bxslider2.css?v=1" type="text/css" media="screen" />
<link href="<?php echo $baseurl ?>ui/css/bootstrap/bootstrap-responsive.css" rel="stylesheet" />
<link rel="stylesheet" href="<?php echo $baseurl ?>ui/css/fonts.css" type="text/css" />
<link rel="stylesheet" href="<?php echo $baseurl ?>ui/css/bootstrap/flexscore.css?v=2" type="text/css" media="screen" />
<link rel="stylesheet" href="<?php echo $baseurl ?>ui/css/bootstrap/bootstrap-buttons-ls.css" type="text/css" />
<link href="<?php echo $baseurl ?>ui/css/bootstrap/bootstrap-multiselect.css" rel="stylesheet" />
<link href="<?php echo $baseurl ?>ui/css/multiselectDropdown.css" rel="stylesheet" />
<!-- HTML5 shim, for IE6-8 support of HTML5 elements -->
<!--[if lt IE 9]>
<script src="https://html5shim.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<!-- Fav and touch icons -->
<link rel="apple-touch-icon-precomposed" sizes="144x144" href="ico/apple-touch-icon-144-precomposed.png" />
<link rel="apple-touch-icon-precomposed" sizes="114x114" href="ico/apple-touch-icon-114-precomposed.png" />
<link rel="apple-touch-icon-precomposed" sizes="72x72" href="ico/apple-touch-icon-72-precomposed.png" />
<link rel="apple-touch-icon-precomposed" href="ico/apple-touch-icon-57-precomposed.png" />
<link rel="shortcut icon" href="<?php echo $baseurl ?>ui/images/favicon.png" />
</head>
<body id="body" class="white" style="display:none">
<div class="textureBackgroundWrap">
<div id="mainHeader">
</div>
<div id="navSpacer" class="visible-phone">
</div>
<div id="navSpacerShort" class="hidden-phone">
</div>
<div id="mainBody">
</div>
<div class="vSpace hidden-phone">
</div>
</div>
<br>
<div class="container">
<div id="darkBackground" class="hdn"></div>
<div id="comparisonBox" class="hdn">
</div>
<div id="comparisonBoxHome" class="hdn homeComparison">
<!-- TABBED CONTENT -->
<div id="signIn" class="row-fluid hdn dialogContent">
<!-- tabs -->
<ul class="nav nav-tabs">
<li id="signupLink" class="active">
<a id="signuptab" data-toggle="tab" href="#signupUser"> Sign Up</a>
</li>
<li id="signinLink">
<a id="signintab" data-toggle="tab" href="#loginUser">Sign In</a>
</li>
<li id="signupAdvisorLink">
<a id="signupadvisortab" data-toggle="tab" href="#advisorSignup">For Advisor</a>
</li>
</ul>
<div class="content tab-content">
<!-- SIGN UP TAB -->
<div class="tab-pane fade active in" id="signupUser">
</div>
<!-- SIGN IN TAB -->
<div class="tab-pane fade" id="loginUser">
</div>
<!--Advisor sign in and sign up tab-->
<div class="tab-pane fade" id="advisorSignup">
</div>
</div>
<div class="clearEverything">
</div>
</div>
</div>
<div id="profileBox" class="hdn">
<div id="profileContents">
</div>
</div>
<div id="notificationBox" class="hdn">
<div id="notificationContents">
</div>
<div class="profileBottomRow roundBottom">
<div class="clearEverything"> </div>
<div class="clearEverything"> </div>
</div>
</div>
<div id="myAdvisorBox" class="hdn">
<div id="myAdvisorContents">
</div>
</div>
<div class="visible-phone tenpx"></div>
<div id="mainFooter">
</div>
</div>
<!-- Placed at the end of the document so the pages load faster -->
<script data-main="<?php echo $baseurl ?>ui/js/mlearningcenter" src="<?php echo $baseurl ?>ui/js/require-jquery.js"></script>
</body>
</html>