-
Notifications
You must be signed in to change notification settings - Fork 37
/
setup.html
108 lines (83 loc) · 2.99 KB
/
setup.html
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
<!DOCTYPE html>
<html lang="en">
<head class="html5">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="Expires" content="-1">
<title>FrameTrail</title>
<link rel="stylesheet" type="text/css" href="_lib/html5reset/html5.reset.css">
<link rel="stylesheet" type="text/css" href="_lib/jquery.ui/jquery-ui.min.css">
<link rel="shortcut icon" href="favico.png">
<script type="text/javascript" src="_lib/jquery/jquery-3.1.1.min.js"></script>
<script type="text/javascript" src="_lib/jquery.ui/jquery-ui.min.js"></script>
<script type="text/javascript" src="_lib/jquery.form/jquery.form.min.js"></script>
<!--
[if lt IE 9]>
<script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]
-->
<link rel="stylesheet" type="text/css" href="_shared/styles/variables.css">
<link rel="stylesheet" type="text/css" href="_shared/styles/frametrail-webfont.css">
<link rel="stylesheet" type="text/css" href="_shared/styles/generic.css">
<script type="text/javascript">
$(document).ready( function() {
var title = $('.boxTitle'),
message = $('#message'),
content = $('#content');
//TODO
$("#initSetup").ajaxForm({
url: "_server/ajaxServer.php",
type: "POST",
data: {"a": "setupInit"},
dataType: "json",
success: function (ret) {
if (ret["code"] != 1) {
$("#returnFromSetup").show().append(ret["string"] + "<br>");
} else {
location.reload();
}
}
});
if (!!document.location.host) {
$.ajax({
"type": "POST",
url: "_server/ajaxServer.php",
data: {"a":"setupCheck"},
dataType: "json",
success: function(ret) {
if (ret["code"] != "1") {
$("#setupForm").show();
} else {
var playerUrl = window.location.href.replace('setup.html', '');
window.location.replace(playerUrl);
}
}
})
} else {
title.html('No Webserver').show();
message.addClass('error').html('This application needs to run on a webserver. You can also use a local server environment like <a href="https://www.apachefriends.org/index.html">XAMPP</a> (Windows, Linux, OS X) or <a href="https://www.mamp.info/">MAMP</a> (Windows, OS X).').show();
}
});
</script>
</head>
<body class="frametrail-body">
<div class="ui-blocking-overlay">
<div class="ui-overlay-box">
<div class="boxTitle" style="display: none;"></div>
<div id="message" class="message"></div>
<div id="content">
<div id="setupForm" style="display: none">
<form id="initSetup">
<input name="mail" placeholder="Admin Mail-Address (login name)" type="text">
<input name="name" placeholder="Admin Username" type="text">
<input name="passwd" placeholder="Admin Password" type="password">
<button type="submit" id="submitBtn">OK</button>
<div id="returnFromSetup" class="message error" style="margin-top: 10px;">
</div>
</form>
</div>
</div>
</div>
</div>
</body>
</html>