forked from jsyzjhj/kkcms
-
Notifications
You must be signed in to change notification settings - Fork 0
/
mplay.php
executable file
·163 lines (160 loc) · 6.32 KB
/
mplay.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
<?php
include ('data/cxini.php');
include ('system/inc.php');
error_reporting(0);
$zhan = $zwcx["zhanwai"];
$url = $_SERVER["HTTP_HOST"];
$jiejie = substr($url, 0 - 7, 7);
$jia0 = base64_encode($jiejie);
$jia = md5($jia0);
$b = strpos($jia, "a");
$c = strpos($jia, "z");
$ye = substr($jia, $b, $b - $c - 1);
$jia1 = md5($jia);
$d = strpos($jia1, "s");
$e = strpos($jia1, "0");
$ye1 = substr($jia1, $d, $d - $e - 3);
$jia3 = base64_encode($ye1);
$jia2 = md5($jia3);
$f = strpos($jia2, "W");
$g = strpos($jia2, "5");
$ye2 = substr($jia2, $f, $f - $g - 5);
$jiami0 = $ye1 . $ye2 . $ye;
$jiami = base64_encode($jiami0);
if ($_GET["url"]) {
$link = base64_decode($_GET["url"]);
$idd = $_GET["id"];
$timu = $_GET["name"];
if ($idd == 2) {
$fang = $link;
} else {
if ($idd == 1) {
$play = $link;
$fang = "/jx.php?url=" . $play;
} else {
$mso = substr(strrchr($link, "=") , 1);
$link = file_get_contents($zhan . "index.php/play/index/" . $mso);
$name = "#<h3> (.*?)</h3>#";
$jishu = "#<li><a id=\"(.*?)\" href=\"/index.php/play/index/(.*?)\">(.*?)</a></li>#";
$bobo = "#<iframe8899 src=\"(.*?)\" marginwidth=\"0\" marginheight=\"0\" border=\"0\" scrolling=\"no\" frameborder=\"0\" topmargin=\"0\" width=\"100%\" height=\"100%\"></iframe>#";
preg_match_all($name, $link, $nmarr);
preg_match_all($jishu, $link, $jjarr);
preg_match_all($bobo, $link, $bfarr);
$timu = $nmarr[1][0];
$iidd = $jjarr[1];
$ljie = $jjarr[2];
$jjshu = $jjarr[3];
$bofang = $bfarr[1][0];
$b = strpos($bofang, "/y");
$c = strpos($bofang, "e/");
$ye = substr($bofang, $b + 2, $c - 1);
if ($ye == "unparse") {
$fang = $zhan . $bofang;
} else {
$fang = $bofang;
}
}
}
} else {
$mso = $_GET["mso"];
$link = file_get_contents($zhan . "index.php/play/index/" . $mso);
$name = "#<h3> (.*?)</h3>#";
$jishu = "#<li><a id=\"(.*?)\" href=\"/index.php/play/index/(.*?)\">(.*?)</a></li>#";
$bobo = "#<iframe8899 src=\"(.*?)\" marginwidth=\"0\" marginheight=\"0\" border=\"0\" scrolling=\"no\" frameborder=\"0\" topmargin=\"0\" width=\"100%\" height=\"100%\"></iframe>#";
preg_match_all($name, $link, $nmarr);
preg_match_all($jishu, $link, $jjarr);
preg_match_all($bobo, $link, $bfarr);
$timu = $nmarr[1][0];
$iidd = $jjarr[1];
$ljie = $jjarr[2];
$jjshu = $jjarr[3];
$bofang = $bfarr[1][0];
$b = strpos($bofang, "/y");
$c = strpos($bofang, "e/");
$ye = substr($bofang, $b + 2, $c - 1);
if ($ye == "unparse") {
$fang = $zhan . $bofang;
} else {
$fang = $bofang;
}
}
$result1 = mysql_query('select * from xtcms_vod_class where c_id=' . $d_parent . ' order by c_id asc');
while ($row1 = mysql_fetch_array($result1)) {
$c_hide = $row1['c_hide'];
}
$d_scontent = explode(',', $xtcms_shoufei);
for ($i = 0; $i < count($d_scontent); $i++) {
if ($timu == $d_scontent[$i]) {
//提示错误值
alert_href('对不起,您的观看的视频已经下架,请到官网观看.谢谢!', '' . $xtcms_domain . '');
}
}
if ($c_hide > 0) {
if (!isset($_SESSION['user_name'])) {
alert_href('请注册会员登录后观看', '' . $xtcms_domain . 'ucenter');
};
$result = mysql_query('select * from xtcms_user where u_name="' . $_SESSION['user_name'] . '"'); //查询会员积分
if ($row = mysql_fetch_array($result)) {
$u_group = $row['u_group']; //到期时间
}
if ($u_group <= 1) { //如果会员组
alert_href('对不起,您不能观看会员视频,请升级会员!', '' . $xtcms_domain . 'ucenter/mingxi.php');
}
}
include ('system/shoufei.php');
if ($d_jifen > 0) { //积分大于0,普通会员收费
if (!isset($_SESSION['user_name'])) {
alert_href('请注册会员登录后观看', '' . $xtcms_domain . 'ucenter');
};
$result = mysql_query('select * from xtcms_user where u_name="' . $_SESSION['user_name'] . '"'); //查询会员积分
if ($row = mysql_fetch_array($result)) {
$u_points = $row['u_points']; //会员积分
$u_plays = $row['u_plays']; //会员观看记录
$u_end = $row['u_end']; //到期时间
$u_group = $row['u_group']; //到期时间
}
if ($u_group <= 1) { //如果会员组
if ($d_jifen > $u_points) {
alert_href('对不起,您的积分不够,无法观看收费数据,请推荐本站给您的好友、赚取更多积分', '' . $xtcms_domain . 'ucenter/yaoqing.php');
} else {
if (strpos("," . $u_plays, $d_id) > 0) {
}
//有观看记录不扣点
else {
$uplays = "," . $u_plays . $d_id;
$uplays = str_replace(",,", ",", $uplays);
$_data['u_points'] = $u_points - $d_jifen;
$_data['u_plays'] = $uplays;
$sql = 'update xtcms_user set ' . arrtoupdate($_data) . ' where u_name="' . $_SESSION['user_name'] . '"';
if (mysql_query($sql)) {
alert_href('您成功支付' . $d_jifen . '积分,请重新打开视频观看!', '' . $xtcms_domain . 'bplay.php?play=' . $d_id . '');
}
}
}
}
}
if ($d_user > 0) {
if (!isset($_SESSION['user_name'])) {
alert_href('请注册会员登录后观看', '' . $xtcms_domain . 'ucenter');
};
$result = mysql_query('select * from xtcms_user where u_name="' . $_SESSION['user_name'] . '"'); //查询会员积分
if ($row = mysql_fetch_array($result)) {
$u_points = $row['u_points']; //会员积分
$u_plays = $row['u_plays']; //会员观看记录
$u_end = $row['u_end']; //到期时间
$u_group = $row['u_group']; //到期时间
}
if ($u_group < $d_user) {
alert_href('您的会员组不支持观看此视频!', '' . $xtcms_domain . 'ucenter/mingxi.php');
}
}
function get_play($t0) {
$result = mysql_query('select * from xtcms_player where id =' . $t0 . '');
if (!!$row = mysql_fetch_array($result)) {
return $row['n_url'];
} else {
return $t0;
};
}
include ('template/' . $xtcms_bdyun . '/mplay.php');
?>