代码拉取完成,页面将自动刷新
同步操作将从 love/tvpanel 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
<?php
include_once"aes.php";
include_once "config.php";
mysqli_query($GLOBALS['conn'],"SET NAMES 'UTF8'");
$channelNumber=1;
function echoJSON($category,$alisname,$psw){
global $channelNumber;
$sql = "SELECT name,url FROM chzb_channels where category='$category' order by id";
$result = mysqli_query($GLOBALS['conn'],$sql);
$nameArray = array();
while($row = mysqli_fetch_array($result)) {
if(!in_array($row['name'],$nameArray)){
$nameArray[]=$row['name'];
}
$sourceArray[$row['name']][]=$row['url'];
}
mysqli_free_result($result);
$objCategory=(Object)null;
$objChannel=(Object)null;
$channelArray=array();
for($i=0;$i<count($nameArray);$i++) {
$objChannel=(Object)null;
$objChannel->num=$channelNumber;
$objChannel->name=$nameArray[$i];
$objChannel->source=$sourceArray[$nameArray[$i]];
$channelArray[]=$objChannel;
$channelNumber++;
}
$objCategory->name=$alisname;
$objCategory->psw=$psw;
$objCategory->data=$channelArray;
unset($nameArray,$sourceArray,$objChannel);
return $objCategory;
}
if(isset($_POST['data'])){
$obj=json_decode($_POST['data']);
$region=$obj->region;
$mac=$obj->mac;
$androidid=$obj->androidid;
$model=$obj->model;
$nettype=$obj->nettype;
$appname=$obj->appname;
$randkey=$obj->rand;
$sql = "SELECT isvip FROM chzb_users where deviceid='$androidid'";
$result = mysqli_query($GLOBALS['conn'], $sql);
if ($row = mysqli_fetch_array($result)) {
$isvip = $row['isvip'];
}else{
$isvip = '0';
}
$contents[]= echoJSON('',"我的收藏",'');
//添加默认频道
$sql = "SELECT name,id,psw FROM chzb_category where enable=1 and type='default' order by id";
$result = mysqli_query($GLOBALS['conn'],$sql);
while($row = mysqli_fetch_array($result)) {
$pdname=$row['name'];
$psw=$row['psw'];
$contents[]= echoJSON($pdname,$pdname,$psw);
}
unset($row);
mysqli_free_result($result);
//添加会员频道
if ($isvip == '1') {
$sql = "SELECT name,id,psw FROM chzb_category where enable=1 and type='vip' order by id";
$result = mysqli_query($GLOBALS['conn'],$sql);
while($row = mysqli_fetch_array($result)) {
$pdname=$row['name'];
$psw=$row['psw'];
$contents[]= echoJSON($pdname,$pdname,$psw);
}
unset($row);
mysqli_free_result($result);
}
$str=json_encode($contents,JSON_UNESCAPED_UNICODE);
$str=stripslashes($str);
$str=base64_encode(gzcompress($str));
$result=mysqli_query($GLOBALS['conn'],"select dataver from chzb_appdata");
$ver=3;
if($row=mysqli_fetch_array($result)){
$ver=$row[0];
}
$key=md5($key.$randkey);
$key=substr($key,7,16);
$aes = new Aes($key);
$encrypted =$aes->encrypt($str);
$encrypted=str_replace("f", "&", $encrypted);
$encrypted=str_replace("b", "f", $encrypted);
$encrypted=str_replace("&", "b", $encrypted);
$encrypted=str_replace("t", "#", $encrypted);
$encrypted=str_replace("y", "t", $encrypted);
$encrypted=str_replace("#", "y", $encrypted);
$coded=substr($encrypted,44,128);
$coded=strrev($coded);
$str=$coded.$encrypted;
echo $str;
unset($row);
mysqli_free_result($result);
mysqli_close($GLOBALS['conn']);
}else{
mysqli_close($GLOBALS['conn']);
exit();
}
?>
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。