myfavforum.php 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  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: myfavforum.php 34236 2013-11-21 01:13:12Z nemohou $
  7. */
  8. if(!defined('IN_MOBILE_API')) {
  9. exit('Access Denied');
  10. }
  11. $_GET['mod'] = 'space';
  12. $_GET['do'] = 'favorite';
  13. $_GET['type'] = 'forum';
  14. include_once 'home.php';
  15. class mobile_api {
  16. function common() {
  17. }
  18. function output() {
  19. global $_G;
  20. $fids = array();
  21. foreach($GLOBALS['list'] as $_k => $_v) {
  22. $fids[$_v['id']] = $_k;
  23. }
  24. if($fids) {
  25. $favforumlist = C::t('forum_forum')->fetch_all(array_keys($fids));
  26. foreach($favforumlist as $_fid => $_v) {
  27. $GLOBALS['list'][$fids[$_fid]]['threads'] = $_v['threads'];
  28. $GLOBALS['list'][$fids[$_fid]]['posts'] = $_v['posts'];
  29. $GLOBALS['list'][$fids[$_fid]]['todayposts'] = $_v['todayposts'];
  30. $GLOBALS['list'][$fids[$_fid]]['yesterdayposts'] = $_v['yesterdayposts'];
  31. }
  32. }
  33. $variable = array(
  34. 'list' => array_values($GLOBALS['list']),
  35. 'perpage' => $GLOBALS['perpage'],
  36. 'count' => $GLOBALS['count'],
  37. );
  38. mobile_core::result(mobile_core::variable($variable));
  39. }
  40. }
  41. ?>