Manage.php 833 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. <?php
  2. namespace Score\Lib;
  3. use Dever;
  4. class Manage
  5. {
  6. /**
  7. * 显示用户信息
  8. *
  9. * @return mixed
  10. */
  11. public function showUserInfo($uid, $ldate = false)
  12. {
  13. if ($uid) {
  14. $user = Dever::load('passport/user.info', $uid);
  15. if ($user) {
  16. $table = array();
  17. $table['用户名'] = $user['username'];
  18. $table['手机号'] = $user['mobile'];
  19. $table['领取时间'] = date('Y-m-d H:i:s', $ldate);
  20. return Dever::table($table);
  21. }
  22. } else {
  23. return '';
  24. }
  25. }
  26. /**
  27. * 设置主积分
  28. *
  29. * @return mixed
  30. */
  31. public function config($id, $name, $param)
  32. {
  33. $type = Dever::param('type', $param);
  34. if ($type == 1) {
  35. Dever::db('score/config')->set(array('type' => 2));
  36. Dever::db('score/config')->update(array('where_id' => $id, 'type' => 1));
  37. }
  38. }
  39. }