-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
executable file
·236 lines (202 loc) · 8.48 KB
/
index.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
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
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>Body of Christ, Login</title>
<meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
<link rel="stylesheet" href="styles/bootstrap.css">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.4.0/css/font-awesome.min.css">
<link href='https://fonts.googleapis.com/css?family=Open+Sans:400,300,700' rel='stylesheet' type='text/css'>
<link rel="stylesheet" href="https://www.thebodyofchrist.us/static/css/AdminLTE.min.css">
</head>
<body class="hold-transition login-page" style="background-color:transparent;">
<style>
html {
background-image: url('img/BG.png');
background-size: cover;
}
@keyframes animateOpacity {
0% {
opacity: 1;
}
50% {
opacity: 0;
}
100% {
opacity: 1;
}
}
@keyframes animateOpacity2 {
0% {
opacity: 0;
}
50% {
opacity: 1;
}
100% {
opacity: 0;
}
}
#Gradient1 {
animation: animateOpacity 10s infinite;
}
#Blue {
animation: animateOpacity2 10s infinite;
}
.login-box {
position: absolute;
border-radius: 20px;
width:90%;
margin-left:5%;
}
.login-box-body {
border-radius: 20px;
background: rgba(255, 255, 255, 0.9);
}
</style>
<div id="Gradient1" class="animateOpacity" style="
position:absolute;
top:0;
background:linear-gradient(to right, rgba(243, 156, 18, .35) 0%,rgba(0, 115, 183, .3) 50%,rgba(221, 75, 57, .3) 100%);
height:100%;
width:100%;
"></div>
<div id="Blue" class="animateOpactiy" style="
position:absolute;
top:0;
opacity:0;
background:linear-gradient(to right, rgba(11, 100, 152, 0.3) 0%,rgba(18, 108, 202, 0.41) 50%,rgba(20, 32, 152, 0.3) 100%);
height:100%;
width:100%;
"></div>
<div class="login-box">
<div class="login-logo">
<img width="350px" src="https://www.thebodyofchrist.us/static/images/BodyOfChrist.svg">
</div>
<!-- /.login-logo -->
<div class="login-box-body">
<p class="login-box-msg">Sign in to start your session</p>
<div class="social-auth-links text-center" style="margin-top:-10px;">
<span style="font-family:'Open Sans';white-space:nowrap;font-size:;">Indexing Sermons|Fulfilling Needs|Discipleship</span>
<input id="username" type="text" style="width:100%;margin-top:10px;height:30px;background-color:white;border: solid #767772 1px; border-radius:0px;margin-bottom:7px;font-style:'Open Sans';font-weight:300;"placeholder="Username:">
</input>
<input id="password" type="password" style="width:100%;margin-top:00px;height:30px;background-color:white;border: solid #767772 1px; border-radius:0px;margin-bottom:7px;font-style:'Open Sans';font-weight:300;"placeholder="Super Secret Password:">
</input>
<button onclick="login();" style="width:100%;margin-bottom:10px;border:solid #767772 1px;background-color:rgba(255, 255, 255, 0.91);">Sign In</button>
<a href="#" onclick="facebookLogin();" class="btn btn-block btn-social btn-facebook btn-flat"><i class="fa fa-facebook"></i> Sign in using
Facebook</a>
<!--<center>We don't automatically publish on your profile.</center>-->
<a href="#" onclick="googleLogin();" class="btn btn-block btn-social btn-google btn-flat"><i class="fa fa-google-plus"></i> Sign in using
Google+</a>
</div>
</div>
<!-- /.login-box-body -->
</div>
<script src="scripts/jquery.js"></script>
<script type="text/javascript" src="cordova.js"></script>
<script>
window.app = document.URL.indexOf('http://') === -1 && document.URL.indexOf('https://') === -1;
if (window.app) {
localStorage.setItem('platform','mobilePhone');
}
else{
localStorage.setItem('platform','browserOrChrome');
}
function facebookLogin() {
var ua = navigator.userAgent.toLowerCase();
var isAndroid = ua.indexOf("android") > -1; //&& ua.indexOf("mobile");
if(isAndroid) {
window.win = window.open("https://www.thebodyofchrist.us/login/facebook/?platform=phonegap" , "_blank",
"EnableViewPortScale=yes");
}
else if (window.app){
window.win = window.open("https://www.thebodyofchrist.us/login/facebook/?platform=phonegap" , "_blank",
"EnableViewPortScale=yes");
}
else{
window.win = window.open("https://www.thebodyofchrist.us/login/facebook/?platform=chromeExtension" , "_self",
"EnableViewPortScale=yes");
}
// Once the InAppBrowser finishes loading
window.win.addEventListener("loadstop", function() {
// Clear out the name in localStorage for subsequent opens.
//win.executeScript({ code: "localStorage.setItem( 'userID', '' );" });
// Start an interval
var loop = setInterval(function() {
// Execute JavaScript to check for the existence of a name in the
// child browser's localStorage.
window.win.executeScript({
code: "userID"
},
function(values) {
var userID = values[0];
// If a name was set, clear the interval and close the InAppBrowser.
if (userID) {
clearInterval(loop);
window.win.close();
localStorage.setItem("userID", userID);
//alert(userID);
window.location = "app.html";
}
}
);
});
});
}
function googleLogin() {
window.win = window.open("https://www.thebodyofchrist.us/login/google-oauth2/", "_blank",
"EnableViewPortScale=yes");
// Once the InAppBrowser finishes loading
window.win.addEventListener("loadstop", function() {
// Clear out the name in localStorage for subsequent opens.
window.win.executeScript({
code: "localStorage.setItem( 'userID', '' );"
});
// Start an interval
var loop = setInterval(function() {
// Execute JavaScript to check for the existence of a name in the
// child browser's localStorage.
window.win.executeScript({
code: "userID"
},
function(values) {
var userID = values[0];
// If a name was set, clear the interval and close the InAppBrowser.
if (userID) {
clearInterval(loop);
window.win.close();
localStorage.setItem("userID", userID);
//alert('Welcome!');
window.location = "app.html";
}
}
);
});
});
}
</script>
<script>
function login() {
var username = $.trim($('#username').val());
var pwd = $.trim($('#password').val());
var stayloggedin = 'True';
$.ajax({
url : "https://www.thebodyofchrist.us/service/login/",
type : "get",
data : {
username: username,
pwd : pwd,
stayloggedin : stayloggedin
}
}).done(function(data) {
if (data > 0) {
localStorage.setItem('userID',data)
window.location = 'app.html';
}
console.log(data);
});
}
</script>
</body>
</html>