-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathfriends.php
484 lines (460 loc) · 17.1 KB
/
friends.php
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
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
<?php
$openid = $_GET['openid'];
$fid = $_GET['fid'];
$mid = $_GET['mid'];
if ($mid == null || $mid == "") {
header("location:index.php");
exit();
}
if ($openid == '' || $openid == null) {
if ($_COOKIE['openid'] == null || $_COOKIE['openid'] == '') {
$sourceUrl = "http://www.wexue.top/games/cj/friends.php?fid=" . $fid . "&mid=" . $mid;
$sourceUrl = urlencode($sourceUrl);
header("location:https://open.weixin.qq.com/connect/oauth2/authorize?appid=wxef15e6f871323efd&redirect_uri=http%3a%2f%2fwww.wexue.top%2fwxAuth.php&response_type=code&scope=snsapi_base&state=" . $sourceUrl . "#wechat_redirect");
} else {
$openid = $_COOKIE['openid'];
}
} else {
setcookie('openid', $openid);
}
if($openid==$fid){
header("location:index.php");
exit();
}
$wxParams = curlGet("http://www.wexue.top/wfj-wxjs.php?url=" . urlencode('http://www.wexue.top' . $_SERVER["REQUEST_URI"]));
$user = curlGet("http://www.wexue.top:25000/spring/user?openid=" . $openid . "&avatar=&username=&type=1");
$friend = curlGet("http://www.wexue.top:25000/spring/friend?openid=" . $fid . "&friend=" . $openid);
function curlGet($url)
{
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "GET");
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, FALSE);
curl_setopt($ch, CURLOPT_USERAGENT, 'Mozilla/5.0 (compatible; MSIE 5.01; Windows NT 5.0)');
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($ch, CURLOPT_AUTOREFERER, 1);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$info = curl_exec($ch);
if (curl_errno($ch)) {
echo 'Errno' . curl_error($ch);
} else {
// echo 'success!!!';
curl_close($ch);
return $info;
}
}
?>
<!DOCTYPE html>
<html>
<head>
<title>过年了,我有话想对你说</title>
<link rel="stylesheet" href="css/index.css" type="text/css">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="msapplication-tap-highlight" content="no"/>
<meta name="viewport" content="width=480, target-densitydpi=device-dpi">
<script>
if (/Android (\d+\.\d+)/.test(navigator.userAgent)) {
var version = parseFloat(RegExp.$1);
if (version > 2.3) {
var phoneScale = parseInt(window.screen.width) / 480;
document.write('<meta name="viewport" content="width=480, minimum-scale = ' + phoneScale + ', maximum-scale = ' + phoneScale + ', target-densitydpi=device-dpi">');
} else {
document.write('<meta name="viewport" content="width=480, target-densitydpi=device-dpi">');
}
} else {
document.write('<meta name="viewport" content="width=480, user-scalable=no, target-densitydpi=device-dpi">');
}
var openid = "<?php echo $openid;?>";
var fid = "<?php echo $fid;?>";
var mid = "<?php echo $mid;?>";
</script>
<link href="css/weui.css" rel="stylesheet">
<link href="css/animate.css" rel="stylesheet">
<style>
img {
margin-left: auto;
margin-right: auto;
}
#city {
background-color: rgba(255, 255, 255, 1)
}
.city-item {
width: 100%;
text-align: center;
display: none;
}
.city-item img {
width: 80%;
margin-left: auto;
margin-right: auto;
}
.city-item span {
display: block;
margin-left: auto;
margin-right: auto;
color: #ffffff;
font-size: 20px;
}
.lunzi {
-webkit-animation: circle 1s infinite linear; /*匀速 循环*/
}
@-webkit-keyframes circle {
0% {
transform: rotate(0deg);
}
100% {
transform: rotate(-360deg);
}
}
@keyframes circle {
0% {
transform: rotate(0deg);
}
100% {
transform: rotate(-360deg);
}
}
</style>
</head>
<body ondragstart="return false;" ondrop="return false;"
style="background: url(sprites/f-bg.jpg);background-size: 100%;">
<?php if ($friend == 0) { ?>
<div id="header"
style="text-align:center;font-size:20px;position: absolute;top:0;right: 0;left: 0;height: 50px;line-height: 50px;background-color: rgba(255,0,0,.5);color: #ffffff;">
语音正在准备...
</div>
<div
style="z-index:-1;position: fixed; background-color: transparent; top: 0px; left: 0px; width: 100%; height: 100%"></div>
<audio id="audio" preload="preload">
您的浏览器不支持 audio 标签。
</audio>
<div style="width: 100%;text-align: center">
<img src="sprites/f-text-top.png" style="width: 70%;margin-top: 80px">
<br>
<img src="sprites/f-xingli.png" style="width: 60%;margin-top: 20px">
<br>
<img id="listen" src="sprites/f-btn-listen-1.png" style="width: 40%;margin-top: 60px;">
<br>
<img id="duijiang" src="sprites/f-btn-duhuan-1.png" style="width: 40%;margin-top: 20px">
<br>
<img id="play" src="sprites/f-btn-play-1.png" style="width: 40%;margin-top: 20px">
<br>
</div>
<div style="height: 50px;position: absolute;bottom: 20px;text-align: center;width:100%;">
<img src="sprites/logo.png" style="height:40px;margin-right: auto;margin-left: auto">
</div>
<div id="city" class="animated fadeInDownBig"
style="display:none;position: absolute;top:0;left: 0;right: 0;z-index: 99;background: url(sprites/f-bg.jpg);background-size: 100%">
<div style="font-size: 20px;padding: 30px;color: #b4252d">
关注公众号,点击"回家过年"菜单,有机会获得王府井集团提供的精美礼品一份,数量有限,先到先得
</div>
<hr style="background-color: #ffffff;margin-bottom: 20px">
<div class="weui-flex">
<a href="javascript:;" style="margin: 20px;background-color: #642f08" id="selectCity"
class="weui-btn weui-btn_primary weui-flex__item">
选择你所在的地区
</a>
<a href="javascript:;" id="close" style="margin: 20px;" class="weui-btn weui-btn_warn">
关闭
</a>
</div>
<div style="color: #b4252d;font-size: 30px;width: 100%;text-align: center">长按二维码关注</div>
<div id="beijing" class="city-item">
<div>
(北京)
</div>
<div>
<img src="qcode/3.jpg">
<span>北京市百货大楼</span>
</div>
<div>
<img src="qcode/8.jpg">
<span>大兴王府井百货</span>
</div>
<div>
<img src="qcode/9.jpg">
<span>东安市场</span>
</div>
<div>
<img src="qcode/21.jpg">
<span>双安商场</span>
</div>
<div>
<img src="qcode/29.jpg">
<span>长安商场</span>
</div>
<div>
<img src="qcode/35.jpg">
<span>北京赛特奥莱</span>
</div>
<div>
<img src="qcode/38.jpg">
<span>王府井购物中心右安门店</span>
</div>
</div>
<div id="baotou" class="city-item">
(包头)
<div>
<img src="qcode/1.jpg">
<span>包头王府井百货昆区店</span>
</div>
<div>
<img src="qcode/2.jpg">
<span>包头王府井百货青山店</span>
</div>
</div>
<div id="chongqing" class="city-item">
(重庆)
<div>
<img src="qcode/6.jpg">
<span>重庆王府井奥莱解放碑店</span>
</div>
<div>
<img src="qcode/7.jpg">
<span>重庆王府井百货沙坪坝店</span>
</div>
</div>
<div id="eerduosi" class="city-item">
(鄂尔多斯)
<div>
<img src="qcode/10.jpg">
<span>鄂尔多斯王府井百货</span>
</div>
</div>
<div id="fuzhou" class="city-item">
(福州)
<div>
<img src="qcode/11.jpg">
<span>福州王府井百货</span>
</div>
</div>
<div id="guangzhou" class="city-item">
(广州)
<div>
<img src="qcode/12.jpg">
<span>广州王府井百货</span>
</div>
</div>
<div id="huhehaote" class="city-item">
(呼和浩特)
<div>
<img src="qcode/13.jpg">
<span>呼和浩特王府井奥莱</span>
</div>
</div>
<div id="jiaozuo" class="city-item">
(焦作)
<div>
<img src="qcode/14.jpg">
<span>焦作王府井百货</span>
</div>
</div>
<div id="kunming" class="city-item">
(昆明)
<div>
<img src="qcode/15.jpg">
<span>昆明王府井百货</span>
</div>
</div>
<div id="leshan" class="city-item">
(乐山)
<div>
<img src="qcode/17.jpg">
<span>乐山王府井购物中心</span>
</div>
</div>
<div id="lanzhou" class="city-item">
(兰州)
<div>
<img src="qcode/16.jpg">
<span>兰州王府井百货</span>
</div>
</div>
<div id="luoyang" class="city-item">
(洛阳)
<div>
<img src="qcode/18.jpg">
<span>洛阳王府井百货</span>
</div>
<div>
<img src="qcode/19.jpg">
<span>洛阳王府井购物中心</span>
</div>
</div>
<div id="nanning" class="city-item">
(南宁)
<div>
<img src="qcode/20.jpg">
<span>南宁王府井奥莱</span>
</div>
</div>
<div id="taiyuan" class="city-item">
(太原)
<div>
<img src="qcode/22.jpg">
<span>太原王府井百货</span>
</div>
</div>
<div id="wulumuqi" class="city-item">
(乌鲁木齐)
<div>
<img src="qcode/23.jpg">
<span>乌鲁木齐王府井奥莱</span>
</div>
</div>
<div id="wuhan" class="city-item">
(武汉)
<div>
<img src="qcode/24.jpg">
<span>武汉王府井百货</span>
</div>
</div>
<div id="xian" class="city-item">
(西安)
<div>
<img src="qcode/25.jpg">
<span>西安王府井百货南门店</span>
</div>
<div>
<img src="qcode/40.jpg">
<span>西安王府井熙地港店</span>
</div>
</div>
<div id="xining" class="city-item">
(西宁)
<div>
<img src="qcode/26.jpg">
<span>西宁王府井百货新宁广场店</span>
</div>
<div>
<img src="qcode/27.jpg">
<span>西宁王府井百货中心广场店</span>
</div>
</div>
<div id="changsha" class="city-item">
(长沙)
<div>
<img src="qcode/30.jpg">
<span>长沙王府井百货</span>
</div>
<div>
<img src="qcode/31.jpg">
<span>长沙王府井FamilyPARK购物中心</span>
</div>
</div>
<div id="zhengzhou" class="city-item">
(郑州)
<div>
<img src="qcode/32.jpg">
<span>郑州王府井百货</span>
</div>
</div>
<div id="xiamen" class="city-item">
(厦门)
<div>
<img src="qcode/33.jpg">
<span>厦门巴黎春天百货嘉禾店</span>
</div>
<div>
<img src="qcode/34.jpg">
<span>厦门巴黎春天百货中山店</span>
</div>
</div>
<div id="shenyang" class="city-item">
(沈阳)
<div>
<img src="qcode/36.jpg">
<span>沈阳赛特奥莱</span>
</div>
</div>
<div id="nanning" class="city-item">
(南宁)
<div>
<img src="qcode/41.jpg">
<span>南宁王府井奥莱</span>
</div>
</div>
<div id="zhengzhou" class="city-item">
(郑州)
<div>
<img src="qcode/42.jpg">
<span>郑州王府井百货</span>
</div>
</div>
<div style="width: 100%;margin-bottom: 30px;margin-top:20px;text-align: center">
<img src="sprites/logo.png" style="height:40px;margin-right: auto;margin-left: auto">
</div>
</div>
<div id="playerDiv" class="animated bounceIn"
style="display:none;position: absolute;top: 0;left: 0;right: 0;z-index: 1000;text-align: center">
<img src="sprites/p5-record-down.png" id="stop" style="position: absolute;top:270px;left: 170px;height: 60px">
<img src="sprites/p5-lunzi.png" class="lunzi" style="position: absolute;top:130px;left: 135px;height: 80px">
<img src="sprites/p5-lunzi.png" class="lunzi" style="position: absolute;top:130px;right: 135px;height: 80px">
<img src="sprites/p5-player.png" style="width: 80%;margin-left: auto;margin-right: auto;margin-top: 50px">
</div>
<?php } else { ?>
<div class="page" style="margin-top: 100px">
<div class="weui-msg">
<div class="weui-msg__icon-area"><i class="weui-icon-warn weui-icon_msg"></i></div>
<div class="weui-msg__text-area">
<h2 class="weui-msg__title" style="font-size: 30px">超过次数限制</h2>
<p class="weui-msg__desc" style="color: #ffffff;font-size: 20px">每人只能分享给3个好友,已经超过限制了</p>
</div>
<div class="weui-msg__opr-area">
<p class="weui-btn-area">
<a href="index.php" class="weui-btn weui-btn_warn">玩游戏</a>
</p>
</div>
<div class="weui-msg__extra-area">
<div class="weui-footer">
<div style="width: 100%;margin-bottom: 30px;margin-top:20px;text-align: center">
<img src="sprites/logo.png" style="height:40px;margin-right: auto;margin-left: auto">
</div>
</div>
</div>
</div>
</div>
<?php } ?>
<script type="text/javascript" src="lib/jquery-2.0.3.min.js"></script>
<script type="text/javascript" src="jplayer/jquery.jplayer.min.js"></script>
<script type="text/javascript" src="lib/jweixin-1.0.0.js"></script>
<script type="text/javascript" src="http://int.dpool.sina.com.cn/iplookup/iplookup.php?format=js"></script>
<script type="text/javascript" src="lib/weui.min.js"></script>
<script type="text/javascript" src="js/friends.js?v=4"></script>
<script type="text/javascript" src="http://pingjs.qq.com/h5/stats.js" name="MTAH5" sid="500387182" ></script>
<script type="text/javascript">
wx.config(
<?php echo $wxParams;?>
);
wx.ready(function () {
wx.onMenuShareTimeline({
title: '过年了,等你回家', // 分享标题
link: 'http://www.wexue.top/games/cj/index.php', // 分享链接
imgUrl: 'http://www.wexue.top/games/cj/sprites/page1.png', // 分享图标
success: function () {
MtaH5.clickShare('timelineshare');
MtaH5.clickShare('timelineshare');
},
cancel: function () {
}
});
wx.onMenuShareAppMessage({
title: '过年了,等你回家', // 分享标题
desc: '过年了,你还不回家,在等什么?', // 分享描述
link: 'http://www.wexue.top/games/cj/index.php', // 分享链接
imgUrl: 'http://www.wexue.top/games/cj/sprites/page1.png', // 分享图标
type: 'link', // 分享类型,music、video或link,不填默认为link
dataUrl: '', // 如果type是music或video,则要提供数据链接,默认为空
success: function () {
MtaH5.clickShare('msgshare');
MtaH5.clickShare('msgshare');
},
cancel: function () {
// 用户取消分享后执行的回调函数
}
});
});
</script>
</body>
</html>