144 lines
3.6 KiB
PHP
144 lines
3.6 KiB
PHP
<?php
|
|
/*
|
|
* 人人商城
|
|
*
|
|
* 青岛易联互动网络科技有限公司
|
|
* http://www.we7shop.cn
|
|
* TEL: 4000097827/18661772381/15865546761
|
|
*/
|
|
|
|
if (!defined("IN_IA")) {
|
|
exit("Access Denied");
|
|
}
|
|
if (!function_exists("getIsSecureConnection")) {
|
|
function getIsSecureConnection()
|
|
{
|
|
if (isset($_SERVER["HTTPS"]) && ("1" == $_SERVER["HTTPS"] || "on" == strtolower($_SERVER["HTTPS"]))) {
|
|
return true;
|
|
}
|
|
if (isset($_SERVER["SERVER_PORT"]) && "443" == $_SERVER["SERVER_PORT"]) {
|
|
return true;
|
|
}
|
|
return false;
|
|
}
|
|
}
|
|
if (function_exists("getIsSecureConnection")) {
|
|
$secure = getIsSecureConnection();
|
|
$http = $secure ? "https" : "http";
|
|
$_W["siteroot"] = strexists($_W["siteroot"], "https://") ? $_W["siteroot"] : str_replace("http", $http, $_W["siteroot"]);
|
|
}
|
|
if (!defined("EWEI_SHOP_V2_MODULE_NAME")) {
|
|
$dirPath = __DIR__;
|
|
if (strstr($dirPath, "/") != false) {
|
|
$dir = explode("/", $dirPath);
|
|
} else {
|
|
$dir = explode("\\", $dirPath);
|
|
}
|
|
$module = array_pop($dir);
|
|
define("EWEI_SHOP_V2_MODULE_NAME", $module);
|
|
}
|
|
require_once IA_ROOT . "/addons/" . EWEI_SHOP_V2_MODULE_NAME . "/version.php";
|
|
require_once IA_ROOT . "/addons/" . EWEI_SHOP_V2_MODULE_NAME . "/defines.php";
|
|
require_once EWEI_SHOPV2_INC . "functions.php";
|
|
class Ewei_shopv2ModuleSite extends WeModuleSite
|
|
{
|
|
public function getMenus()
|
|
{
|
|
global $_W;
|
|
return array(array("title" => "管理后台", "icon" => "fa fa-shopping-cart", "url" => webUrl()));
|
|
}
|
|
public function doWebWeb()
|
|
{
|
|
m("route")->run();
|
|
}
|
|
public function doMobileMobile()
|
|
{
|
|
m("route")->run(false);
|
|
}
|
|
public function payResult($params)
|
|
{
|
|
return m("order")->payResult($params);
|
|
}
|
|
}
|
|
class Ewei_shopv2_bizModuleSite extends WeModuleSite
|
|
{
|
|
public function getMenus()
|
|
{
|
|
global $_W;
|
|
return array(array("title" => "管理后台", "icon" => "fa fa-shopping-cart", "url" => webUrl()));
|
|
}
|
|
public function doWebWeb()
|
|
{
|
|
m("route")->run();
|
|
}
|
|
public function doMobileMobile()
|
|
{
|
|
m("route")->run(false);
|
|
}
|
|
public function payResult($params)
|
|
{
|
|
return m("order")->payResult($params);
|
|
}
|
|
}
|
|
class Ewei_shopv2_merchModuleSite extends WeModuleSite
|
|
{
|
|
public function getMenus()
|
|
{
|
|
global $_W;
|
|
return array(array("title" => "管理后台", "icon" => "fa fa-shopping-cart", "url" => webUrl()));
|
|
}
|
|
public function doWebWeb()
|
|
{
|
|
m("route")->run();
|
|
}
|
|
public function doMobileMobile()
|
|
{
|
|
m("route")->run(false);
|
|
}
|
|
public function payResult($params)
|
|
{
|
|
return m("order")->payResult($params);
|
|
}
|
|
}
|
|
class Ewei_shopv2_vipModuleSite extends WeModuleSite
|
|
{
|
|
public function getMenus()
|
|
{
|
|
global $_W;
|
|
return array(array("title" => "管理后台", "icon" => "fa fa-shopping-cart", "url" => webUrl()));
|
|
}
|
|
public function doWebWeb()
|
|
{
|
|
m("route")->run();
|
|
}
|
|
public function doMobileMobile()
|
|
{
|
|
m("route")->run(false);
|
|
}
|
|
public function payResult($params)
|
|
{
|
|
return m("order")->payResult($params);
|
|
}
|
|
}
|
|
class Ewei_shopv2_svipModuleSite extends WeModuleSite
|
|
{
|
|
public function getMenus()
|
|
{
|
|
global $_W;
|
|
return array(array("title" => "管理后台", "icon" => "fa fa-shopping-cart", "url" => webUrl()));
|
|
}
|
|
public function doWebWeb()
|
|
{
|
|
m("route")->run();
|
|
}
|
|
public function doMobileMobile()
|
|
{
|
|
m("route")->run(false);
|
|
}
|
|
public function payResult($params)
|
|
{
|
|
return m("order")->payResult($params);
|
|
}
|
|
}
|
|
|
|
?>
|