1 Star 0 Fork 10

dakj / PHPCMS V9.6.6 修改版

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
api.php 899 Bytes
一键复制 编辑 原始数据 按行查看 历史
zhaoxunzhiyin 提交于 2020-12-01 14:09 . 初始化仓库
<?php
/**
* index.php API 入口
*
* @copyright (C) 2005-2010
* @lastmodify 2010-7-26
*/
define('CMS_PATH', dirname(__FILE__).DIRECTORY_SEPARATOR);
include CMS_PATH.'cms/base.php';
$param = pc_base::load_sys_class('param');
$_userid = param::get_cookie('_userid');
if($_userid) {
$member_db = pc_base::load_model('member_model');
$_userid = intval($_userid);
$memberinfo = $member_db->get_one(array('userid'=>$_userid),'islock');
if($memberinfo['islock']) exit('<h1>Bad Request!</h1>');
}
$op = isset($_GET['op']) && trim($_GET['op']) ? trim($_GET['op']) : exit('Operation can not be empty');
if (isset($_GET['callback']) && !preg_match('/^[a-zA-Z_][a-zA-Z0-9_]+$/', $_GET['callback'])) unset($_GET['callback']);
if (!preg_match('/([^a-z_]+)/i',$op) && file_exists(CMS_PATH.'api/'.$op.'.php')) {
include CMS_PATH.'api/'.$op.'.php';
} else {
exit('API handler does not exist');
}
?>
PHP
1
https://gitee.com/dakj_0/phpcms.git
git@gitee.com:dakj_0/phpcms.git
dakj_0
phpcms
PHPCMS V9.6.6 修改版
master

搜索帮助