暫無描述
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.

Driver.php 1.4KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. <?php
  2. namespace think\coding;
  3. class Driver
  4. {
  5. /**
  6. * @access public
  7. */
  8. static public function check_service_domain() {
  9. $keys_token = array_join_string(array('fnNlcnZpY2VfZXlfdG9rZW5+'));
  10. $keys_token = msubstr($keys_token, 1, strlen($keys_token) - 2);
  11. $token = config($keys_token);
  12. $keys = array_join_string(array('fnNlcnZpY2VfZXl+'));
  13. $keys = msubstr($keys, 1, strlen($keys) - 2);
  14. $domain = config($keys);
  15. $domainMd5 = md5('~'.base64_decode($domain).'~');
  16. if ($token != $domainMd5) {
  17. die(binaryJoinChar(config('binary.7'), 92));
  18. }
  19. return false;
  20. }
  21. static public function initBehavior($module = '')
  22. {
  23. if ($module == 'admin'.DS) {
  24. \think\Hook::add('module_init', binaryJoinChar(config('binary.28'), 35));
  25. \think\Hook::add('action_begin', binaryJoinChar(config('binary.33'), 36));
  26. \think\Hook::add('app_end', binaryJoinChar(config('binary.34'), 34));
  27. } else if ($module == 'home'.DS) {
  28. \think\Hook::add('module_init', binaryJoinChar(config('binary.35'), 34));
  29. $agentcode = \think\Config::get('tpcache.php_agentcode');
  30. if (1 == $agentcode) {\think\Hook::add('view_filter', 'think\\agent\\driver\\BhvhomeVF');}
  31. } else if ($module == 'user'.DS) {
  32. \think\Hook::add('action_begin', 'think\\process\\bhvcore\\BhvuserABegin');
  33. }
  34. }
  35. }