post_threadsorts.php 964 B

1234567891011121314151617181920212223242526272829303132333435363738
  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: post_threadsorts.php 23995 2011-08-18 09:41:27Z zhangguosheng $
  7. */
  8. if(!defined('IN_DISCUZ')) {
  9. exit('Access Denied');
  10. }
  11. require_once libfile('function/threadsort');
  12. threadsort_checkoption($sortid);
  13. $forum_optionlist = getsortedoptionlist();
  14. loadcache(array('threadsort_option_'.$sortid, 'threadsort_template_'.$sortid));
  15. $sqlarr = array();
  16. foreach($_G['cache']['threadsort_option_'.$sortid] AS $key => $val) {
  17. if($val['profile']) {
  18. $sqlarr[] = $val['profile'];
  19. }
  20. }
  21. if($sqlarr) {
  22. $member_profile = array();
  23. $_member_profile = C::t('common_member_profile')->fetch($_G['uid']);
  24. foreach($sqlarr as $val) {
  25. $member_profile[$val] = $_member_profile[$val];
  26. }
  27. unset($_member_profile);
  28. }
  29. threadsort_optiondata($pid, $sortid, $_G['cache']['threadsort_option_'.$sortid], $_G['cache']['threadsort_template_'.$sortid]);
  30. ?>