profile.php 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. <?php
  2. /**
  3. * [Discuz!] (C)2001-2099 Comsenz Inc.
  4. * This is NOT a freeware, use is subject to license terms
  5. *
  6. * $Id: profile.php 34314 2014-02-20 01:04:24Z nemohou $
  7. */
  8. if(!defined('IN_MOBILE_API')) {
  9. exit('Access Denied');
  10. }
  11. $_GET['mod'] = 'space';
  12. $_GET['do'] = 'profile';
  13. include_once 'home.php';
  14. class mobile_api {
  15. function common() {
  16. }
  17. function output() {
  18. global $_G;
  19. $data = $GLOBALS['space'];
  20. $data['groupiconid'] = mobile_core::usergroupIconId($data['groupid']);
  21. if($data['group']['type'] == 'member' && $data['group']['groupcreditslower'] != 999999999) {
  22. $data['upgradecredit'] = $data['group']['creditslower'] - $data['credits'];
  23. $data['upgradeprogress'] = 100 - ceil($data['upgradecredit'] / ($data['group']['creditslower'] - $data['group']['creditshigher']) * 100);
  24. $data['upgradeprogress'] = max($data['upgradeprogress'], 2);
  25. }
  26. unset($data['password'], $data['email'], $data['regip'], $data['lastip'], $data['regip_loc'], $data['lastip_loc']);
  27. $variable = array(
  28. 'space' => $data,
  29. 'extcredits' => $_G['setting']['extcredits'],
  30. 'wsq' => array('wsq_apicredit' => getuserprofile('extcredits'.$_G['wechat']['setting']['wsq_apicredit'])),
  31. );
  32. mobile_core::result(mobile_core::variable($variable));
  33. }
  34. }
  35. ?>