1 Star 0 Fork 43

shine/yuncart

forked from web3d/yuncart 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
index.php 1.07 KB
一键复制 编辑 原始数据 按行查看 历史
web3d 提交于 2017-03-18 19:40 . chg dir style
<?php
define("IN_CART", true);
define("SITEPATH", dirname(__FILE__));
$stage = "front";
require SITEPATH . "/init.php";
//获取model,action
$model = isset($_REQUEST['model']) ? trim($_REQUEST["model"]) : 'front';
$action = isset($_REQUEST['action']) ? trim($_REQUEST["action"]) : 'index';
if (!in_array($model, array("buy", "cart", "favor", "content", "front", "member", "item", "myservice", "myaddress", "mytrade", "order", "user", "listing", "search", "meal", "coupon", "mycoupon", "aftersale", "payment", "link"))) {
$model = "front";
$action = "index";
}
//商品短地址
if (!isset($_REQUEST['model']) && !empty($_GET)) {
$gets = $_GET;
if (count($gets) == 1 && is_numeric(key($gets))) {
$model = "item";
$action = "index";
$_GET["itemid"] = key($gets);
}
}
//执行程序
if (file_exists(STAGEPATH . "/{$model}.class.php")) {
$classname = ucfirst($model);
$class = new $classname($model, $action);
if (method_exists($class, $action)) {
$class->$action();
}
exit();
}
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
PHP
1
https://gitee.com/phperShine/yuncart.git
git@gitee.com:phperShine/yuncart.git
phperShine
yuncart
yuncart
master

搜索帮助