MobileController.class.php 694 B

123456789101112131415161718192021222324252627
  1. <?php
  2. namespace Mobile\Controller;
  3. class MobileController extends \Think\Controller
  4. {
  5. protected function _initialize()
  6. {
  7. $allow_controller=array("Ajax","Ajaxtrade","Api","Article","Chart","Finance","Index","Login","Pay","Queue","Trade","User","Issue", "Morefind","Financing","Exchange","Orepool","Contract","Levertade");
  8. if(!in_array(CONTROLLER_NAME,$allow_controller)){
  9. $this->error("非法操作");
  10. }
  11. $clist = M("config")->where(array('id'=>1))->field("webname")->find();
  12. $webname = $clist['webname'];
  13. $this->assign("webname",$webname);
  14. if (!session('userId')) {
  15. session('userId', 0);
  16. } else if (CONTROLLER_NAME != 'Login') {
  17. }
  18. }
  19. }
  20. ?>