myfavthread.php 987 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  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: myfavthread.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'] = 'favorite';
  13. $_GET['type'] = 'thread';
  14. include_once 'home.php';
  15. class mobile_api {
  16. function common() {
  17. }
  18. function output() {
  19. global $_G;
  20. $list = array_values($GLOBALS['list']);
  21. $tids = array();
  22. foreach($list as $key=>$value) {
  23. $tids[] = $value['id'];
  24. }
  25. if($tids) {
  26. $threadinfo = C::t('forum_thread')->fetch_all($tids);
  27. }
  28. foreach($list as $key=>$value) {
  29. $list[$key]['replies'] = $threadinfo[$value['id']]['replies'];
  30. $list[$key]['author'] = $threadinfo[$value['id']]['author'];
  31. }
  32. $variable = array(
  33. 'list' => $list,
  34. 'perpage' => $GLOBALS['perpage'],
  35. 'count' => $GLOBALS['count'],
  36. );
  37. mobile_core::result(mobile_core::variable($variable));
  38. }
  39. }
  40. ?>