代码拉取完成,页面将自动刷新
同步操作将从 耀盟同城分类信息系统/耀盟同城分类信息Beta V3.0 uniapp+web端 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
<?php
/**
* YmCms 优盟多元化内容管理系统 v1 [ YMPHP framework ]
*
* @copyright Copyright (c) 2021 - 2023, You Meng, Inc.
* @License This is NOT a freeware, use is subject to license terms
* @link https://www.youmengcms.com
* @time $Id: api2.php 2023/08/11 14:52
* @Author Xiao Yao <790213952@qq.com>
*/
require_once './system/common.php';
$service = !empty($_GET['service']) ? $_GET['service'] : '';
$action = !empty($_GET['action']) ? $_GET['action'] : '';
$param = !empty($_GET['param']) ? $_GET['param'] : '';
if(empty($service)) {
$uniqid = uniqid('', true);
$eachArr = explode(".", $uniqid);
$backtraceid = $eachArr[0].$eachArr[1];
echo("<h1>403 Forbidden</h1><p>You don't have permission to access the URL on this server.</p><p>denied by UA ACL = not in whitelist</p><hr>Powered by YMTC <br>CDN Request Id: " .$backtraceid);
}else{
//声明以下均为接口类
$handler = true;
$param = array();
foreach ($_GET as $key => $value) {
$key = $key == 'description' ? $key : htmlspecialchars(RemoveXSS($key));
if($key != "service" && $key != "action" && $key != "callback" && $key != "_"){
if($key == 'page' || $key == 'pageSize'){
$param[$key] = (int)$value;
}
elseif($key == 'amount'){ // 金额强制转数字、防止表达式注入漏洞
$param[$key] = (float)$value;
}
elseif($key == 'id' && !strstr($value, ',')){ // ID强制转数字、防止表达式注入漏洞
$param[$key] = (int)$value;
}
elseif($_REQUEST['rsaEncrypt'] == 1 && (strlen($value) == 172 || strstr($value, '||rsa||'))){
$param[$key] = rsaDecrypt($value); //RSA解密
}
else{
$param[$key] = ((is_string($value) && strstr($value, '[{')) || is_array($value)) ? $value : RemoveXSS($value);
}
}
}
foreach ($_POST as $key => $value) {
$key = $key == 'description' ? $key : htmlspecialchars(RemoveXSS($key));
if($key != "service" && $key != "action" && $key != "callback" && $key != "_"){
if($key == 'page' || $key == 'pageSize'){
$param[$key] = (int)$value;
}
elseif($key == 'amount'){ // 金额强制转数字、防止表达式注入漏洞
$param[$key] = (float)$value;
}
elseif($key == 'id' && !strstr($value, ',')){ // ID强制转数字、防止表达式注入漏洞
$param[$key] = (int)$value;
}
elseif($_REQUEST['rsaEncrypt'] == 1 && (strlen($value) == 172 || strstr($value, '||rsa||'))){
$param[$key] = rsaDecrypt($value); //RSA解密
}
else{
$param[$key] = ((is_string($value) && strstr($value, '[{')) || is_array($value)) ? $value : RemoveXSS($value);
}
}
}
$callback = htmlspecialchars(RemoveXSS($callback));
$callback = str_replace(')', '', str_replace('(', '', $callback));
$handels = new handlers($service, $action);
$return = $handels->getHandle($param);
//输出到浏览器
if ($callback) {
if (isset($param['dataType'])) {
if ($param['dataType'] == 'html') {
echo $return['info'];
return;
}
}
echo $callback . "(" . json_encode($return, JSON_UNESCAPED_UNICODE) . ")";
} else {
if (isset($param['dataType'])) {
if ($param['dataType'] == 'html') {
echo $return['info'];
return;
}
}
echo json_encode($return, JSON_UNESCAPED_UNICODE);
}
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。