Webscan.php 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. <?php
  2. /**
  3. * 系统安全检测相关代码
  4. */
  5. namespace app\admin\controller;
  6. use think\facade\Lang;
  7. use think\facade\Db;
  8. /**
  9. * ============================================================================
  10. *
  11. * ============================================================================
  12. *
  13. * ----------------------------------------------------------------------------
  14. *
  15. * ============================================================================
  16. * 控制器
  17. */
  18. class Webscan extends AdminControl
  19. {
  20. public function initialize()
  21. {
  22. parent::initialize();
  23. $this->_prefix = config('database.connections.mysql.prefix');
  24. Lang::load(base_path() . 'admin/lang/' . config('lang.default_lang') . '/webscan.lang.php');
  25. }
  26. public function index()
  27. {
  28. $this->scan_member();
  29. }
  30. public function scan_member()
  31. {
  32. $output = array();
  33. //检测Member数据表中是否有重复的 用户名 邮箱 手机号
  34. $result = Db::query("select member_name,count(*) as count from {$this->_prefix}member group by member_name having count>1;");
  35. }
  36. }