forked from watermark-hollywood/project-oslo
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.php
More file actions
372 lines (332 loc) · 13.7 KB
/
index.php
File metadata and controls
372 lines (332 loc) · 13.7 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
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
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
<?php
$allowed_hosts = array('local.project-oslo.com','project-oslo.com','www.project-oslo.com','osloideas.com','portal.osloideas.com','local.osloideas.com','www.osloideas.com','www.watermarkdigital.com');
if (!isset($_SERVER['HTTP_HOST']) || !in_array($_SERVER['HTTP_HOST'], $allowed_hosts)) {
header( "Location: portal/login.php" );
}
?>
<!doctype html>
<!--[if lte IE 9]> <html class="lte-ie9" lang="en"> <![endif]-->
<!--[if gt IE 9]><!--> <html lang="en"> <!--<![endif]-->
<head>
<meta charset="UTF-8">
<meta name="viewport" content="initial-scale=1.0,maximum-scale=1.0,user-scalable=no">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>Welcome to Project Oslo</title>
<!-- domo arigato mr roboto.. load this font -->
<link href='http://fonts.googleapis.com/css?family=Roboto:300,400,500|Montserrat:100,300,400,600' rel='stylesheet' type='text/css'>
<!-- BEGIN Load Styles for Plugins -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-alpha.6/css/bootstrap.min.css" integrity="sha384-rwoIResjU2yc3z8GV/NPeZWAv56rSmLldC3R/AZzGRnGxQQKnKkoFVhFQhNUwEyJ" crossorigin="anonymous">
<!-- page styles -->
<link rel="stylesheet" href="assets/plugins/platform/font-awesome-4.7.0/css/font-awesome.min.css" type="text/css" />
<link rel="stylesheet" href="assets/css/platform/platform.css" type="text/css" />
</head>
<body class="stretched">
<!-- Navigation Menu and Slider -->
<div id="mySidenav" class="sidenav">
<a class="navmenu-brand" href="http://<?= $_SERVER['HTTP_HOST'] ?>">
<img id="sidebar-logo" src="images/platform/Oslo_Logo-header-black.png" height="36" alt="Oslo" />
</a>
<ul id="sidebar-navbar-nav" class="nav navbar-nav">
<li class="hidden-md-up register-link"><a href="#">Register</a>
</li>
<li class="hidden-md-up"><hr></li>
<li><a href="#">My Dashboard</a>
</li>
<li><a href="#">New Order</a>
</li>
<li><a href="#">Open Orders</a>
</li>
<li><a href="#">Past Orders</a>
</li>
<li><a href="#">Account Settings</a>
</li>
</ul>
</div>
<!-- Document Wrapper -->
<div id="main" class="container-fluid">
<nav id="top-navbar" class="navbar">
<ul class="nav navmenu-nav">
<li class="nav-item">
<button class="btn btn-default" id="open-navbar-btn" type="button" aria-label="Toggle navigation">
<i class="fa fa-bars" aria-hidden="true"></i>
</button>
</li>
<li class="mr-auto">
<a href="index.php">
<img id="top-navbar-logo" src="images/platform/Oslo_Logo-header.png" alt="" />
</a>
</li>
<li>
<div class="hidden-sm hidden-xs" style="float:right;">
<button href="#" id="register-btn" class="btn btn-default register-link">Register</button>
</div>
</li>
</ul>
</nav>
<?php
include ('includes/platform/slider.php');
?>
<!-- Body Content -->
<section id="content">
<div class="content-wrap">
<!-- Load Content Sections -->
<?php
include ('includes/platform/content.php');
include ('includes/platform/pricing.php');
include ('includes/platform/connections.php');
include ('includes/platform/signup.php');
?>
</div><!-- end div class="content-wrap" -->
</section><!-- end section id="content" -->
<!-- Register Admin Modal -->
<div class="modal fade" id="page-modal">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title">Create an Oslo Portal</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
<form name="admin_register_form" id="admin_register_form" role="form" action="portal/user/register.php" method="post">
<div class="modal-body">
<div class="row">
<div class='col-6'>
<div class="form-group">
<label for="register_first">First Name</label>
<input type="text" class="form-control" id="register_first" name="register_first" required="true" >
</div>
</div>
<div class='col-6'>
<div class="form-group">
<label for="register_last">Last Name</label>
<input type="text" class="form-control" id="register_last" name="register_last" required="true" >
</div>
</div>
</div>
<div class="row">
<div class='col-12'>
<div class="alert alert-danger" role="alert" id="exists-alert">
<strong>A conflict exists</strong><br/> Either someone has registered with this email address, or your Desired Domain Prefix is in use. If you suspect the domain is in use, try visiting it and logging in or registering with that domain.
</div>
<div class="form-group">
<label for="register_email">Email address</label>
<input type="email" class="form-control" id="register_email" name="register_email" required="true" >
</div>
</div>
</div>
<div class="row">
<div class='col-12'>
<div class="alert alert-danger" role="alert" id="password-alert">
<strong>Password problem</strong><br/> Either your password was not 8 characters, or the fields did not match. Please fix them and try submitting again.
</div>
<div class="form-group">
<label for="register_password">Password</label>
<input type="password" class="form-control" id="register_password" name="register_password" required="true" >
<small class="form-text text-muted">Password must be at least 8 characters.</small>
</div>
</div>
</div>
<div class="row">
<div class='col-12'>
<div class="form-group">
<label for="register_password_repeat">Repeat Password</label>
<input type="password" class="form-control" id="register_password_repeat" name="register_password_repeat" required="true" >
<small class="form-text text-muted">Password fields must match.</small>
</div>
</div>
</div>
<div class="row">
<div class='col-12'>
<div class="form-group">
<label for="register_first">Desired Domain Prefix</label>
<input type="text" class="form-control" id="register_domain" name="register_domain" required="true" >
<small class="form-text text-muted">Portal domain will be prefix.project-oslo.com</small>
</div>
</div>
</div>
<div class="row">
<div class="col-12">
<a class="pull-right" href="#" id="login_help_show">Need help?</a>
</div>
</div>
</div>
<div class="modal-footer">
<div style="width:100%; text-align:center;">
<input type="hidden" id="register_type" name="register_type" value="16" >
<button type="submit" class="btn btn-primary" style="cursor: pointer;">Sign Up</button>
</div>
</div>
</form>
</div>
</div>
</div>
<!--Help Modal -->
<div class="modal fade bd-example-modal-sm" id="help-modal">
<div class="modal-dialog modal-sm" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title">Problems Registering?</h5>
<button type="button" class="close" data-dismiss="modal" id="help-close" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
<div class="modal-body">
<p>Thank you for your interest in Oslo. We want to help you set up your portal as quickly as possible. </p>
<p>If you are having problems please <a href="#" id="password_reset_show">contact support online</a>.</p>
<p>Or if you prefer to speak to a representative, call 1-800-555-1212.</p>
</div>
</div>
</div>
</div>
<div class="modal fade" id="success-modal" >
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title">Thank you for registering with Project Oslo</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
<div class="modal-body">
<p>An email is being sent to the address you provided with a verification link.</p>
<p>Click this link to verify your email address and begin configuring your Oslo portal.</p>
</div>
</div>
</div>
</div>
<!--Failure Modal -->
<div class="modal fade" id="dberr-modal">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title">Database Error</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
<div class="modal-body">
<p>There was a database error when trying to add this record to the system.</p>
<p>Please email <a href="mailto:customersupport@projectoslo.com">customer service</a> and inform them of this error.</p>
</div>
</div>
</div>
</div>
<!--Failure Modal -->
<div class="modal fade" id="mailerr-modal">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title">Email Error</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
<div class="modal-body">
<p>There was an error when trying to send your validation email.</p>
<p>Please email <a href="mailto:customersupport@projectoslo.com">customer service</a> and inform them of this error.</p>
</div>
</div>
</div>
</div>
</main>
<?php include('includes/platform/footer.php'); ?>
<!-- common functions -->
<script src="portal/assets/js/common.js"></script>
<script src="https://code.jquery.com/jquery-3.1.1.min.js" integrity="sha256-hVVnYaiADRTO2PzUGmuLJr8BLUSjGIZsDYGmIJLv2b8=" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/tether/1.4.0/js/tether.min.js" integrity="sha384-DztdAPBWPRXSA/3eYEEUWrWCy7G5KFbe8fFjk5JAIxUYHKkDx6Qin1DkWx51bBrb" crossorigin="anonymous"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-alpha.6/js/bootstrap.min.js" integrity="sha384-vBWWzlZJ8ea9aCX4pEW3rVHjgjt7zpkNpZk+02D9phzyeVkE+jo0ieGizqPLForn" crossorigin="anonymous"></script>
<!--<script type="text/javascript" src="assets/js/platform/jquery-2.2.4.min.js"></script>
<script type="text/javascript" src="assets/js/platform/bootstrap.min.js"></script> -->
<!--<script type="text/javascript" src="assets/js/platform/jasny-bootstrap.min.js"></script> -->
<script>
var $item = $('.carousel .carousel-item');
var $wHeight = $(window).height();
$item.eq(0).addClass('active');
$item.height($wHeight);
$item.addClass('full-screen');
$('.carousel img').each(function() {
var $src = $(this).attr('src');
var $color = $(this).attr('data-color');
$(this).parent().css({
'background-image' : 'url(' + $src + ')',
'background-color' : $color
});
$(this).remove();
});
$(window).on('resize', function (){
$wHeight = $(window).height();
$item.height($wHeight);
});
$('.carousel').carousel({
interval: 6000,
pause: "false"
});
$('#exists-alert').hide();
$('#password-alert').hide();
$('#admin_register_form').on('submit', function (e) {
e.preventDefault();
$.ajax({
type: 'post',
url: 'portal/user/register.php',
data: $('#admin_register_form').serialize(),
success: function (data) {
if(data == "exists"){
$('#exists-alert').show();
}
if(data == "pass"){
$('#password-alert').show();
}
if(data == "dberr"){
$('#page-modal').modal('hide');
$('#dberr-modal').modal('show');
}
if(data == "mailerr"){
$('#page-modal').modal('hide');
$('#mailerr-modal').modal('show');
}
if(data == "success"){
$('#page-modal').modal('hide');
$('#success-modal').modal('show');
$('#launch-button').hide();
}
},
error: function (data) {
var r = jQuery.parseJSON(data.responseText);
alert("Message: " + r.Message);
alert("StackTrace: " + r.StackTrace);
alert("ExceptionType: " + r.ExceptionType);
}
});
});
$('#login_help_show').click(function(event){
event.preventDefault();
$('#page-modal').modal('hide');
$('#help-modal').modal('show');
});
$('#launch-button').click(function(event){
$('#page-modal').modal('show');
});
$('.register-link').click(function(event){
event.preventDefault();
$('#page-modal').modal('show');
});
$('#help-close').click(function(event){
$('#page-modal').modal('show');
});
function open_navbar(){
$("#mySidenav").css("left", "0px");
$("#main").css("marginLeft", "250px");
$("#top-navbar-logo").css("visibility", "hidden");
$(this).one("click", close_navbar);
}
function close_navbar(){
$("#mySidenav").css("left", "-250px");
$("#main").css("marginLeft", "0px");
$("#top-navbar-logo").css("visibility", "visible");
$(this).one("click", open_navbar);
}
$('#open-navbar-btn').one("click", open_navbar);
</script>
</body>
</html>