国内流行的内容管理系统(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.

39 lines
1.4KB

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