|
|
|
@ -70,7 +70,7 @@ function str2arr($str, $glue = ',')
|
|
|
|
|
* @return string
|
|
|
|
|
* @author 麦当苗儿 <zuojiazi@vip.qq.com>
|
|
|
|
|
*/
|
|
|
|
|
function arr2str($arr=[], $glue = ',')
|
|
|
|
|
function arr2str($arr = [], $glue = ',')
|
|
|
|
|
{
|
|
|
|
|
return implode($glue, $arr);
|
|
|
|
|
}
|
|
|
|
@ -1369,52 +1369,60 @@ function get_game_wxlogin_param($game_id)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function pp($val='', $isdie=true) {
|
|
|
|
|
var_dump($val);
|
|
|
|
|
if ($isdie) die();
|
|
|
|
|
function pp($val = '', $isdie = true)
|
|
|
|
|
{
|
|
|
|
|
var_dump($val);
|
|
|
|
|
if ($isdie) die();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function curl_post($url = '', $post_data = array()) {
|
|
|
|
|
if (empty($url) || empty($post_data)) {
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$requestString = http_build_query($post_data);
|
|
|
|
|
$postUrl = $url;
|
|
|
|
|
$curl = curl_init();//初始化curl
|
|
|
|
|
curl_setopt($curl, CURLOPT_URL, $postUrl); // 要访问的地址
|
|
|
|
|
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, 0); // 对认证证书来源的检查
|
|
|
|
|
curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, 1); // 从证书中检查SSL加密算法是否存在
|
|
|
|
|
curl_setopt($curl, CURLOPT_USERAGENT, $_SERVER['HTTP_USER_AGENT']); // 模拟用户使用的浏览器
|
|
|
|
|
curl_setopt($curl, CURLOPT_FOLLOWLOCATION, 1); // 使用自动跳转
|
|
|
|
|
curl_setopt($curl, CURLOPT_AUTOREFERER, 1); // 自动设置Referer
|
|
|
|
|
curl_setopt($curl, CURLOPT_POST, 1); // 发送一个常规的Post请求
|
|
|
|
|
curl_setopt($curl, CURLOPT_POSTFIELDS, $requestString); // Post提交的数据包
|
|
|
|
|
curl_setopt($curl, CURLOPT_TIMEOUT, 30); // 设置超时限制防止死循环
|
|
|
|
|
curl_setopt($curl, CURLOPT_HEADER, 0); // 显示返回的Header区域内容
|
|
|
|
|
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1); // 获取的信息以文件流的形式返回
|
|
|
|
|
$data = curl_exec($curl);//运行curl
|
|
|
|
|
curl_close($curl);
|
|
|
|
|
return $data;
|
|
|
|
|
function curl_post($url = '', $post_data = array())
|
|
|
|
|
{
|
|
|
|
|
if (empty($url) || empty($post_data)) {
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$requestString = http_build_query($post_data);
|
|
|
|
|
$postUrl = $url;
|
|
|
|
|
$curl = curl_init();//初始化curl
|
|
|
|
|
curl_setopt($curl, CURLOPT_URL, $postUrl); // 要访问的地址
|
|
|
|
|
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, 0); // 对认证证书来源的检查
|
|
|
|
|
curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, 1); // 从证书中检查SSL加密算法是否存在
|
|
|
|
|
curl_setopt($curl, CURLOPT_USERAGENT, $_SERVER['HTTP_USER_AGENT']); // 模拟用户使用的浏览器
|
|
|
|
|
curl_setopt($curl, CURLOPT_FOLLOWLOCATION, 1); // 使用自动跳转
|
|
|
|
|
curl_setopt($curl, CURLOPT_AUTOREFERER, 1); // 自动设置Referer
|
|
|
|
|
curl_setopt($curl, CURLOPT_POST, 1); // 发送一个常规的Post请求
|
|
|
|
|
curl_setopt($curl, CURLOPT_POSTFIELDS, $requestString); // Post提交的数据包
|
|
|
|
|
curl_setopt($curl, CURLOPT_TIMEOUT, 30); // 设置超时限制防止死循环
|
|
|
|
|
curl_setopt($curl, CURLOPT_HEADER, 0); // 显示返回的Header区域内容
|
|
|
|
|
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1); // 获取的信息以文件流的形式返回
|
|
|
|
|
$data = curl_exec($curl);//运行curl
|
|
|
|
|
curl_close($curl);
|
|
|
|
|
return $data;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if(!function_exists('dd')){
|
|
|
|
|
function dd($var){
|
|
|
|
|
if (!function_exists('dd')) {
|
|
|
|
|
function dd($var)
|
|
|
|
|
{
|
|
|
|
|
if (func_num_args() > 1) {
|
|
|
|
|
$var = func_get_args();
|
|
|
|
|
}
|
|
|
|
|
$debug = debug_backtrace();
|
|
|
|
|
echo '<pre class="yun-debug" style="background:#EAEAEA;padding:10px;">';
|
|
|
|
|
echo '<div class="file" style="color:#f00;">',$debug[0]['file'],' ',$debug[0]['line'],PHP_EOL,'</div>';
|
|
|
|
|
echo '<div class="file" style="color:#f00;">', $debug[0]['file'], ' ', $debug[0]['line'], PHP_EOL, '</div>';
|
|
|
|
|
if (is_object($var) || is_array($var)) {
|
|
|
|
|
$mode = 0;
|
|
|
|
|
} else {
|
|
|
|
|
$mode = 1;
|
|
|
|
|
}
|
|
|
|
|
switch($mode){
|
|
|
|
|
case 0: print_r($var); break;
|
|
|
|
|
case 1: var_dump($var); break;
|
|
|
|
|
default: print_r($var);
|
|
|
|
|
switch ($mode) {
|
|
|
|
|
case 0:
|
|
|
|
|
print_r($var);
|
|
|
|
|
break;
|
|
|
|
|
case 1:
|
|
|
|
|
var_dump($var);
|
|
|
|
|
break;
|
|
|
|
|
default:
|
|
|
|
|
print_r($var);
|
|
|
|
|
}
|
|
|
|
|
echo '</pre>';
|
|
|
|
|
exit;
|
|
|
|
@ -1422,7 +1430,7 @@ if(!function_exists('dd')){
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//获取推广员提现状态
|
|
|
|
|
function promoteWithdrawStatus()
|
|
|
|
|
function promoteWithdrawStatus($status = null)
|
|
|
|
|
{
|
|
|
|
|
$statusData = [
|
|
|
|
|
-1 => '审核未通过',
|
|
|
|
@ -1431,6 +1439,10 @@ function promoteWithdrawStatus()
|
|
|
|
|
2 => '已汇款',
|
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
if (isset($statusData[$status])) {
|
|
|
|
|
return $statusData[$status];
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return $statusData;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|