index.php 1.0 KB

123456789101112131415161718192021222324252627282930313233
  1. <?php
  2. // by 请勿倒卖,已申请软著,否则追究法律责任
  3. namespace app\index;
  4. class index extends Base
  5. {
  6. function index()
  7. {
  8. if (!defined("IN_ROOT")) {
  9. exit("Access denied");
  10. }
  11. if (IN_DOMAIN) {
  12. $host = str_replace("www.", "", $_SERVER["HTTP_HOST"]);
  13. $domain = str_replace("www.", "", IN_DOMAIN);
  14. if ($host != $domain) {
  15. exit("访问地址不正确!");
  16. }
  17. }
  18. $array = "";
  19. for ($i = 0; $i < strlen($_SERVER["HTTP_HOST"]); $i++) {
  20. $str = substr($_SERVER["HTTP_HOST"], $i, 1);
  21. $arr[] = "\"" . $str . "\"";
  22. $array .= $str == "." ? "<i class=\"icon-comma trans\"></i>" : "<i class=\"icon-\" style=\"font-style:normal;font-size:100px;font-weight:bold\">" . $str . "</i>";
  23. }
  24. $letter_doodle = implode(",", $arr);
  25. if (checkmobile() || strpos($_SERVER["HTTP_USER_AGENT"], "MicroMessenger")) {
  26. include "source/template/mobile/moban" . (IN_TEMPLATAWA ? IN_TEMPLATAWA : "") . "/index.php";
  27. } else {
  28. include "source/template/pc/moban" . (IN_TEMPLATAPC ? IN_TEMPLATAPC : "") . "/index.php";
  29. }
  30. }
  31. }