人人商城

site.php 1.2KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. <?php
  2. if (!(defined('IN_IA'))) {
  3. exit('Access Denied');
  4. }
  5. if (!(function_exists('getIsSecureConnection'))) {
  6. function getIsSecureConnection()
  7. {
  8. if (isset($_SERVER['HTTPS']) && (('1' == $_SERVER['HTTPS']) || ('on' == strtolower($_SERVER['HTTPS'])))) {
  9. return true;
  10. }
  11. if (isset($_SERVER['SERVER_PORT']) && ('443' == $_SERVER['SERVER_PORT'])) {
  12. return true;
  13. }
  14. return false;
  15. }
  16. }
  17. if (function_exists('getIsSecureConnection')) {
  18. $secure = getIsSecureConnection();
  19. $http = (($secure ? 'https' : 'http'));
  20. $_W['siteroot'] = ((strexists($_W['siteroot'], 'https://') ? $_W['siteroot'] : str_replace('http', $http, $_W['siteroot'])));
  21. }
  22. require_once IA_ROOT . '/addons/ewei_shopv2/version.php';
  23. require_once IA_ROOT . '/addons/ewei_shopv2/defines.php';
  24. require_once EWEI_SHOPV2_INC . 'functions.php';
  25. class Ewei_shopv2ModuleSite extends WeModuleSite
  26. {
  27. public function getMenus()
  28. {
  29. global $_W;
  30. return array(
  31. array('title' => '管理后台', 'icon' => 'fa fa-shopping-cart', 'url' => webUrl())
  32. );
  33. }
  34. public function doWebWeb()
  35. {
  36. m('route')->run();
  37. }
  38. public function doMobileMobile()
  39. {
  40. m('route')->run(false);
  41. }
  42. public function payResult($params)
  43. {
  44. return m('order')->payResult($params);
  45. }
  46. }
  47. ?>