viewcomment.php 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  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: recommend.php 34398 2014-04-14 07:11:22Z nemohou $
  7. */
  8. if (!defined('IN_MOBILE_API')) {
  9. exit('Access Denied');
  10. }
  11. $_GET['mod'] = 'misc';
  12. $_GET['action'] = 'commentmore';
  13. $_GET['inajax'] = 1;
  14. include_once 'forum.php';
  15. class mobile_api {
  16. function common() {
  17. }
  18. function output() {
  19. $comments = mobile_core::getvalues($GLOBALS['comments'], array('/^\d+$/'), array('id', 'tid', 'pid', 'author', 'authorid', 'dateline', 'comment', 'avatar'));
  20. foreach($GLOBALS['comments'] as $k => $c) {
  21. $comments[$k]['avatar'] = avatar($c['authorid'], 'small', true);
  22. }
  23. $variables = array(
  24. 'tid' => $_GET['tid'],
  25. 'pid' => $_GET['pid'],
  26. 'comments' => array($_GET['pid'] => $comments),
  27. 'totalcomment' => $GLOBALS['totalcomment'],
  28. 'count' => $GLOBALS['count'],
  29. );
  30. mobile_core::result(mobile_core::variable($variables));
  31. }
  32. }
  33. ?>