sublist.php 1003 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  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: sublist.php 34398 2014-04-14 07:11:22Z nemohou $
  7. */
  8. if (!defined('IN_MOBILE_API')) {
  9. exit('Access Denied');
  10. }
  11. $_GET['mod'] = 'forumdisplay';
  12. include_once 'forum.php';
  13. class mobile_api {
  14. function common() {
  15. }
  16. function output() {
  17. global $_G;
  18. foreach ($GLOBALS['sublist'] as $k => $sublist) {
  19. if ($sublist['icon']) {
  20. $icon = preg_match('/src="(.+?)"/', $sublist['icon'], $r) ? $r[1] : '';
  21. if (!preg_match('/^http:\//', $icon)) {
  22. $icon = $_G['siteurl'] . $icon;
  23. }
  24. $GLOBALS['sublist'][$k]['icon'] = $icon;
  25. }
  26. }
  27. $variable = array(
  28. 'sublist' => mobile_core::getvalues($GLOBALS['sublist'], array('/^\d+$/'), array('fid', 'name', 'threads', 'todayposts', 'posts', 'icon')),
  29. );
  30. $variable['forum']['password'] = $variable['forum']['password'] ? '1' : '0';
  31. mobile_core::result(mobile_core::variable($variable));
  32. }
  33. }
  34. ?>