thread_reward.php 775 B

123456789101112131415161718192021222324252627282930313233
  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: thread_reward.php 24359 2011-09-14 07:54:47Z svn_project_zhangjie $
  7. */
  8. if(!defined('IN_DISCUZ')) {
  9. exit('Access Denied');
  10. }
  11. $bapid = 0;
  12. $rewardprice = abs($_G['forum_thread']['price']);
  13. $dateline = $_G['forum_thread']['dateline'] + 1;
  14. $bestpost = array();
  15. if($_G['forum_thread']['price'] < 0 && $page == 1) {
  16. foreach($postlist as $key => $post) {
  17. if($post['dbdateline'] == $dateline) {
  18. $bapid = $key;
  19. break;
  20. }
  21. }
  22. }
  23. if($bapid) {
  24. $bestpost = C::t('forum_post')->fetch($posttableid, $bapid);
  25. $bestpost['message'] = messagecutstr($bestpost['message'], 400);
  26. $bestpost['avatar'] = avatar($bestpost['authorid'], 'small');
  27. }
  28. ?>