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
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
<!DOCTYPE html>
<html lang="en" class="no-js">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="">
<meta name="author" content="Ryserg Tung">
<!--<link rel="icon" href="../../favicon.ico">-->
<title>Vòng đua kỳ thú</title>
<!-- Bootstrap core CSS -->
<link href="css/bootstrap.min.css" rel="stylesheet">
<!-- Custom styles for this website -->
<link href="css/font-awesome.min.css" rel="stylesheet">
<link href="css/style.css" rel="stylesheet">
<!-- Custom fonts for this website -->
<link href="https://fonts.googleapis.com/css?family=Roboto" rel="stylesheet">
</head>
<body>
<nav class="navbar navbar-default navbar-fixed-top header-nav" role="navigation">
<div class="container">
<!-- Brand and toggle get grouped for better mobile display -->
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<!-- Logo -->
<a style="padding-top:10px; padding-left:15px;" class="navbar-brand" href="http://nghemoigioi.vn/" title="Nghemoigioi.vn – Chia sẻ thông tin, chia sẻ lợi nhuận" rel="home">
<img src="http://nghemoigioi.vn/wp-content/uploads/2017/01/LOGO-NGHEMOIGIOI.png" alt="Nghemoigioi.vn – Chia sẻ thông tin, chia sẻ lợi nhuận">
</a>
</div>
<ul class="login-register">
<li class="snlogin">
<a href="#" onclick="fakeLogin()">Đăng nhập</a>
</li>
</ul>
<!-- Collect the nav links, forms, and other content for toggling -->
<div id="bs-example-navbar-collapse-1" class="collapse navbar-collapse">
<ul id="menu-menu-1" class="nav navbar-nav navbar-right">
<li id="menu-item-1584" class="menu-item menu-item-type-custom menu-item-object-custom menu-item-has-children menu-item-1584 dropdown"><a title="GIỚI THIỆU" href="#" data-toggle="dropdown" class="dropdown-toggle" aria-haspopup="true">GIỚI THIỆU <i class="fa fa-angle-down fa-lg"></i></a>
<ul role="menu" class=" dropdown-menu">
<li id="menu-item-1873" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-1873"><a title="Về chúng tôi" href="http://nghemoigioi.vn/ve-chung-toi/">Về chúng tôi</a></li>
<li id="menu-item-1587" class="menu-item menu-item-type-taxonomy menu-item-object-blog-category menu-item-1587"><a title="Tin tức" href="http://nghemoigioi.vn/blog-category/tin-tuc/">Tin tức</a></li>
</ul>
</li>
<li id="menu-item-641" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-641"><a title="Quyền lợi" href="http://nghemoigioi.vn/quyen-loi/">Quyền lợi</a></li>
<li id="menu-item-714" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-714"><a title="Kho dự án" href="http://nghemoigioi.vn/kho-du-an/">Kho dự án</a></li>
<li id="menu-item-3553" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-has-children menu-item-3553 dropdown"><a title="Đối tác" href="http://nghemoigioi.vn/chu-dau-tu/" data-toggle="dropdown" class="dropdown-toggle" aria-haspopup="true">Đối tác <i class="fa fa-angle-down fa-lg"></i></a>
<ul role="menu" class=" dropdown-menu">
<li id="menu-item-3554" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-3554"><a title="Chủ đầu tư" href="http://nghemoigioi.vn/chu-dau-tu/">Chủ đầu tư</a></li>
<li id="menu-item-3579" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-3579"><a title="Đại lý" href="http://nghemoigioi.vn/dai-ly/">Đại lý</a></li>
</ul>
</li>
<li id="menu-item-3605" class="menu-item menu-item-type-custom menu-item-object-custom menu-item-3605"><a title="Đào Tạo" href="http://nghemoigioi.vn/coming-soon-elearning-nghemoigioi-vn/">Đào Tạo</a></li>
<li id="menu-item-686" class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-686"><a title="Sự Kiện" href="http://nghemoigioi.vn/lich-mo-ban/">Sự Kiện</a></li>
</ul>
</div>
</div>
<!-- /.container-fluid -->
</nav>
<div class="main-content">
<div class="main-title">
<h1>Cách thức tham gia</h1>
</div>
<div class="container" style="padding-top: 50px;">
<div class="steps clearfix">
<div class="number col-lg-2 col-md-2 col-sm-12 col-xs-12">
<p style="padding-top: 10px;">
Bước
</p>
<p>
<img src="images/number1.png" />
</p>
</div>
<div class="desc col-lg-6 col-md-6 col-sm-12 col-xs-12">
<p>
Chụp ảnh Selfie cùng tôi và post ảnh lên facebook cùng “vongduakythu”
</p>
</div>
<div class="step-img col-lg-4 col-md-4 col-sm-12 col-xs-12">
<img src="images/mazda-green-1-widescreen-car-wallpaper.png" />
</div>
</div>
<div class="steps clearfix">
<div class="number col-lg-2 col-md-2 col-sm-12 col-xs-12">
<p style="padding-top: 10px;">
Bước
</p>
<p>
<img src="images/22.png" />
</p>
</div>
<div class="desc col-lg-6 col-md-6 col-sm-12 col-xs-12">
<p>
Giúp tôi chiến thắng mini game www.vongduakythu.vn
</p>
</div>
<div class="step-img col-lg-4 col-md-4 col-sm-12 col-xs-12">
<img src="images/ghep phoi canh.png" />
</div>
<div class="col-lg-offset-1 col-md-offset-1 col-lg-10 col-md-10 col-sm-12 col-xs-12">
<div id="gameContainer" class="games">
<div id="c2canvasdiv" class="c2canvasClass">
<canvas id="c2canvas" width="1280" height="768">
<!-- This text is displayed if the visitor's browser does not support HTML5.
You can change it, but it is a good idea to link to a description of a browser
and provide some links to download some popular HTML5-compatible browsers. -->
<h1>Your browser does not appear to support HTML5. Try upgrading your browser to the latest version. <a href="http://www.whatbrowser.org">What is a browser?</a>
<br/><br/><a href="http://www.microsoft.com/windows/internet-explorer/default.aspx">Microsoft Internet Explorer</a><br/>
<a href="http://www.mozilla.com/firefox/">Mozilla Firefox</a><br/>
<a href="http://www.google.com/chrome/">Google Chrome</a><br/>
<a href="http://www.apple.com/safari/download/">Apple Safari</a><br/>
<a href="http://www.google.com/chromeframe">Google Chrome Frame for Internet Explorer</a><br/></h1>
</canvas>
</div>
</div>
</div>
</div>
<div class="steps clearfix">
<div class="number col-lg-2 col-md-2 col-sm-12 col-xs-12">
<p style="padding-top: 10px;">
Bước
</p>
<p>
<img src="images/33.png" />
</p>
</div>
<div class="desc col-lg-6 col-md-6 col-sm-12 col-xs-12">
<p style="float: left;">
Rinh quà:
</p>
<ul>
<li>
- Nội dung giới thiệu cơ cấu giải thưởng 01
</li>
<li>
- Nội dung giới thiệu cơ cấu giải thưởng 02
</li>
<li>
- Nội dung giới thiệu cơ cấu giải thưởng 03
</li>
</ul>
</div>
<div class="step-img col-lg-4 col-md-4 col-sm-12 col-xs-12">
<img src="images/wpid-screenshot_2014-12-24-07-53-57-1.png" />
</div>
</div>
</div>
<div class="ads1">
<img src="images/Layer 6.png" />
</div>
<div class="ads2">
<img src="images/skyscraper-save-for-web.png" />
</div>
</div>
<div id="footer">
<div class="container">
<div class="row">
<div class="col-xs-12 col-sm-3 col-md-3 col-lg-3 class_center">
<div class="row">
<div class="col-xs-12 col-sm-12 col-md-12 col-lg-12">
<img class="logo_nghemoigioi" src="http://nghemoigioi.vn/wp-content/themes/larx/assets/img/custom/logo-footer.png" alt="">
</div>
</div>
<div class="row bottom_footer" style="display:none;">
<div class="col-xs-12 col-sm-6 col-md-6 col-lg-6 class_center">
<p class="copyright">
© 2016 Cenland
</p>
</div>
<div class="col-xs-12 col-sm-6 col-md-6 class_center" style="display:none;">
<!-- Social Icons -->
<ul class="footer-social">
<li><a target="_blank" href="#"><span class="fa-stack fa-lg"><i class="fa fa-circle fa-stack-2x"></i><i class="fa fa-facebook fa-stack-1x fa-inverse"></i></span></a></li>
<li><a target="_blank" href="#"><span class="fa-stack fa-lg"><i class="fa fa-circle fa-stack-2x"></i><i class="fa fa-twitter fa-stack-1x fa-inverse"></i></span></a></li>
</ul>
</div>
</div>
</div>
<div class="col-xs-12 col-sm-4 col-md-4 col-lg-4">
<section>
<h3>Công ty cổ phần dịch vụ Bất động sản <br>Ngôi Sao Toàn Cầu <br>(Thành viên của Cenland)</h3>
<div class="content_footer">
<p>
Số ĐKKD 0106887166 do Sở Kế hoạch và Đầu tư TP Hà Nội cấp ngày 24 tháng 06 năm 2015
</p>
</div>
</section>
</div>
<div class="col-xs-12 col-sm-5 col-md-5 col-lg-5">
<div class="row">
<div class="col-xs-12 col-sm-6 col-md-6 col-lg-6">
<section>
<h3>Giấy phép TMĐT</h3>
<div class="content_footer">
<a href="http://online.gov.vn/HomePage/CustomWebsiteDisplay.aspx?DocId=27572"><img style="width: 180px; height: 70px;" class="logo_nghemoigioi" src="http://nghemoigioi.vn/wp-content/uploads/2016/09/20150827110756-dathongbao.png" alt=""></a>
<p>
<a href="http://nghemoigioi.vn/chinh-sach-hoat-dong-nghemoigioi-vn/">Chính Sách Hoạt Động </a> </p>
</div>
</section>
</div>
<div class="col-xs-12 col-sm-6 col-md-6 col-lg-6">
<section>
<div class="content_footer">
<span><h3>Liên hệ</h3></span>
<p>
ĐT: <span>1900 60 88</span>
</p>
<p>
Email: <span>hotro@nghemoigioi.vn</span>
</p>
</div>
</section>
<div class="class_center" style="display:none;">
<!-- Social Icons -->
<ul class="footer-social">
<li><a target="_blank" href="#"><span class="fa-stack fa-lg"><i class="fa fa-circle fa-stack-2x"></i><i class="fa fa-facebook fa-stack-1x fa-inverse"></i></span></a></li>
<li><a target="_blank" href="#"><span class="fa-stack fa-lg"><i class="fa fa-circle fa-stack-2x"></i><i class="fa fa-twitter fa-stack-1x fa-inverse"></i></span></a></li>
</ul>
</div>
</div>
</div>
</div>
</div>
<!-- /row -->
<p class="copyright">
© 2016 Cenland
</p>
</div>
<!-- /container -->
</div>
<!-- Bootstrap core JavaScript
================================================== -->
<!-- Placed at the end of the document so the pages load faster -->
<script src="js/jquery-3.1.0.min.js"></script>
<script src="js/bootstrap.min.js"></script>
<script src="c2runtime.js"></script>
<script>
// Start the Construct 2 project running on window load.
jQuery(document).ready(function ()
{
BMGsetSize = true;
BMGsetW = document.getElementById("gameContainer").clientWidth;
BMGsetH = document.getElementById("gameContainer").clientHeight;
cr_createRuntime("c2canvas");
});
</script>
<script>
var _user = {
user_id : '',
fullname : '',
username : '',
email : '',
total_time : 0,
total_point : 0,
total_game : 0,
};
var time_start;
function timeFormat(){
var timestamp = 1293683278;
var date = new Date(timestamp*1000);
var iso = date.toISOString().match(/(\d{4}\-\d{2}\-\d{2})T(\d{2}:\d{2}:\d{2})/)
return (iso[1] + ' ' + iso[2]);
}
var sysAPI = {
api_key : "No9OIh0vOPBRzUYeRYHPuQoclfzx69MX",
getLogin : function(){
$.get( "http://localhost/mini_game/api/apiGame/getUpdateGame",
{
api_key: this.api_key,
},
function( response ) {
if (response.errorCode == 0){
_user.user_id = response['data'][0];
} else {
log(response.errorCode);
}
}
);
},
getUserInfo : function(){
$.get( "http://localhost/mini_game/api/apiGame/getUpdateGame",
{
api_key: this.api_key,
user_id:_user.user_id
},
function( response ) {
if (response.errorCode == 0){
_user.user_id = response['data'][0];
_user.fullname = response['data'][1];
_user.username = response['data'][2];
_user.email = response['data'][3];
_user.total_time = response['data'][4];
_user.total_point = response['data'][5];
_user.total_game = response['data'][6];
} else {
log(response.errorCode);
}
}
);
},
submit : function(){
$.get( "http://localhost/mini_game/api/apiGame/postUpdateGame",
{
api_key: this.api_key,
user_id:_user.user_id,
time : _user.total_time,
point : _user.total_point,
time_play_2 : time_start
},
function( response ) {
if (response.errorCode == 0){
log("complete");
} else {
log(response.errorCode);
}
}
);
}
};
function fakeLogin(){
FB.login(function(response) {
if ((response.status === 'connected') && (response.authResponse)) {
log('### FB login');
FB.api(
'/me',
'GET',
{"fields":"email,name,id"},
function(response) {
_user.user_id = response.id;
_user.fullname = _user.username = response.name;
_user.email = response.email;
}
);
} else {
}
}, {scope: 'public_profile,email',auth_type: 'rerequest'});
var _strVar = JSON.stringify(_user);
log(_strVar);
localStorage.setItem("user",_strVar);
log("Login success !");
log(_user);
}
var BMG = {
READY : function(){
sysAPI.getLogin();
sysAPI.getUserInfo();
},
START : function(){
time_start = timeFormat();
if (_user.user_id == ""){
// Should login first.
cr_setSuspended(true);
var r = confirm("Bạn phải đăng nhập trước");
if (r == true) {
location.reload();
}
}
},
FINISH : function(_score,_time,_abc){
_user.total_point = _score;
_user.total_time = _time;
sysAPI.submit();
},
CLOSE : function(){
shareFB();
}
};
function log(_str){
console.log(_str);
}
function shareFB(){
var _title = _user.username+" vừa đạt "+_user.total_point+"!";
var _img = "https://fb-img.mini-games.io/ugc-img/"+strIMG+".png";
FB.ui({
method: 'feed',
link: 'https://silverportal-7eefe.firebaseapp.com/',
name: _title,
caption: 'Vòng đua kỳ thú !',
description: 'Vừa qua chướng ngại vật và hoàn thành vòng đua trong thời gian ngắn nhất',
picture: _img,
message: 'Giúp tôi chiến thắng mini game #VongDuaKyThu ',
display: 'popup'
},
function(response) {
}
);
}
var strIMG;
function uploadIMG(){
strIMG = "";
var _name = "vd_"+_user.user_id+"_"+Date.now();
console.log("### POST TO SERVER ###");
console.log("### IMAGE UPLOAD READY ###");
var IMGData = KenCanvasData;
var tmpSTR = IMGData.split("base64,");
IMGData = tmpSTR[1];
$.ajax({
type: "POST",
url: "https://fb-img.mini-games.io/upload.php",
data: { img_data:IMGData, name:_name },
cache: false,
contentType: "application/x-www-form-urlencoded",
success: function (result) {
$.get("https://fb-img.mini-games.io/ugc_meta.php?data="+_name, function(data, status){
//if (status == "success")
strIMG = _name;
console.log("### UploadIMG COMPLETED :"+strIMG);
});
}
});
console.log("### POST TO SERVER ### END");
}
</script>
<script>
window.fbAsyncInit = function() {
FB.init({
appId : 733778786783938,
xfbml : true,
version : 'v2.1'
});
};
(function(d, s, id){
var js, fjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) {return;}
js = d.createElement(s); js.id = id;
js.src = "//connect.facebook.net/en_US/sdk.js";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));
</script>
</body>
</html>