Fetch the repository succeeded.
This action will force synchronization from love/tvpanel, which will overwrite any changes that you have made since you forked the repository, and can not be recovered!!!
Synchronous operation will process in the background and will refresh the page when finishing processing. Please be patient.
<?php
header("Content-type: text/html; charset=utf-8");
define("PANEL_MD5_KEY","tvkey_"); //面板密码MD5加密秘钥
$db_host="localhost"; //数据库服务器
$db_user=""; //数据库帐号
$db_pwd=""; //数据库密码
$db_database=""; //数据库名称
$conn=mysqli_connect($db_host,$db_user,$db_pwd,$db_database) OR die ('无法登录MYSQL服务器!'); //连接数据库对象
global $conn;
mysqli_query($GLOBALS['conn'],"SET NAMES 'UTF8'");
function get_config($name){
$result=mysqli_query($GLOBALS['conn'],"SELECT value from chzb_config where name='$name'");
if($row=mysqli_fetch_array($result)){$return=$row['value'];}else{echo '<script>alert("数据库错误!");</script>';}
unset($row);
mysqli_free_result($result);
return $return;
}
function set_config($name,$value){
mysqli_query($GLOBALS['conn'],"UPDATE chzb_config set value='$value' where name='$name'");
}
function getuserip(){
$real_ip = $_SERVER['REMOTE_ADDR'];
if (isset($_SERVER['HTTP_CLIENT_IP']) && preg_match('/^([0-9]{1,3}\.){3}[0-9]{1,3}$/', $_SERVER['HTTP_CLIENT_IP'])) {
$real_ip = $_SERVER['HTTP_CLIENT_IP'];
} elseif(isset($_SERVER['HTTP_X_FORWARDED_FOR']) AND preg_match_all('#\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}#s', $_SERVER['HTTP_X_FORWARDED_FOR'], $matches)) {
foreach ($matches[0] AS $xip) {
if (!preg_match('#^(10|172\.16|192\.168)\.#', $xip)) {
$real_ip = $xip;
break;
}
}
}
return $real_ip;
}
?>
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。