国内流行的内容管理系统(CMS)多端全媒体解决方案 https://www.dedebiz.com
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

40 lines
1.4KB

  1. <?php
  2. if (!defined('DEDEINC')) exit('dedebiz');
  3. //orderby = logintime(login new) or mid(register new)
  4. /**
  5. * 动态模板memberlist标签
  6. *
  7. * @version $Id: plus_memberlist.php 1 13:58 2010年7月5日Z tianya $
  8. * @package DedeBIZ.Tpllib
  9. * @copyright Copyright (c) 2022, DedeBIZ.COM
  10. * @license https://www.dedebiz.com/license
  11. * @link https://www.dedebiz.com
  12. */
  13. function plus_memberlist(&$atts, &$refObj, &$fields)
  14. {
  15. global $dsql, $_vars;
  16. $attlist = "row=6,iscommend=0,orderby=logintime,signlen=50";
  17. FillAtts($atts, $attlist);
  18. FillFields($atts, $fields, $refObj);
  19. extract($atts, EXTR_OVERWRITE);
  20. $rearray = array();
  21. $wheresql = ' WHERE mb.spacesta > -1 AND mb.matt != 10';
  22. if ($iscommend > 0) $wheresql .= " AND mb.matt='$iscommend' ";
  23. $sql = "SELECT mb.*,ms.spacename,ms.sign FROM `#@__member` mb
  24. LEFT JOIN `#@__member_space` ms ON ms.mid = mb.mid $wheresql ORDER BY mb.{$orderby} DESC LIMIT 0,$row ";
  25. $dsql->Execute('mb', $sql);
  26. while ($row = $dsql->GetArray('mb')) {
  27. $row['spaceurl'] = $GLOBALS['cfg_basehost'].'/member/index.php?uid='.$row['userid'];
  28. if (empty($row['face'])) {
  29. $row['face'] = ($row['sex'] == '?') ? $GLOBALS['cfg_memberurl'].'/templets/images/dfgirl.png' : $GLOBALS['cfg_memberurl'].'/templets/images/dfboy.png';
  30. }
  31. $rearray[] = $row;
  32. }
  33. return $rearray;
  34. }