You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

35 lines
1.1 KiB

3 years ago
  1. <?php
  2. namespace Home\Controller;
  3. use Think\Controller;
  4. class IndexController extends BaseController {
  5. public function index(){
  6. $tmp = @file_get_contents('./server/Application/Home/Conf/config.php');
  7. if (strstr($tmp, "showdoc not install")) {
  8. header("location:./install/index.php");
  9. exit();
  10. }
  11. //跳转到web目录
  12. header("location:./web/#/");
  13. exit();
  14. $this->checkLogin(false);
  15. $login_user = session("login_user");
  16. $this->assign("login_user" ,$login_user);
  17. if (LANG_SET == 'en-us') {
  18. $demo_url = "https://www.showdoc.cc/demo-en";
  19. $help_url = "https://www.showdoc.cc/help-en";
  20. $creator_url = "https://github.com/star7th";
  21. }
  22. else{
  23. $demo_url = "https://www.showdoc.cc/demo";
  24. $help_url = "https://www.showdoc.cc/help";
  25. $creator_url = "https://blog.star7th.com/";
  26. }
  27. $this->assign("demo_url" ,$demo_url);
  28. $this->assign("help_url" ,$help_url);
  29. $this->assign("creator_url" ,$creator_url);
  30. $this->display();
  31. }
  32. }