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

42 lines
1.7KB

  1. <?php
  2. if (!defined('DEDEINC')) exit('dedebiz');
  3. /**
  4. * 会员信息标签
  5. *
  6. * @version $id:memberlist.lib.php 9:29 2010年7月6日 tianya $
  7. * @package DedeBIZ.Taglib
  8. * @copyright Copyright (c) 2022 DedeBIZ.COM
  9. * @license https://www.dedebiz.com/license
  10. * @link https://www.dedebiz.com
  11. */
  12. function lib_memberlist(&$ctag, &$refObj)
  13. {
  14. global $dsql, $sqlCt;
  15. $attlist = "row|6,iscommend|0,orderby|logintime,signlen|50";
  16. FillAttsDefault($ctag->CAttribute->Items, $attlist);
  17. extract($ctag->CAttribute->Items, EXTR_SKIP);
  18. $revalue = '';
  19. $innerText = trim($ctag->GetInnerText());
  20. if (empty($innerText)) $innerText = GetSysTemplets('memberlist.htm');
  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 LEFT JOIN `#@__member_space` ms ON ms.mid = mb.mid $wheresql ORDER BY mb.{$orderby} DESC LIMIT 0,$row ";
  24. $ctp = new DedeTagParse();
  25. $ctp->SetNameSpace('field', '[', ']');
  26. $ctp->LoadSource($innerText);
  27. $dsql->Execute('mb', $sql);
  28. while ($row = $dsql->GetArray('mb')) {
  29. $row['spaceurl'] = $GLOBALS['cfg_basehost'].'/user/index.php?uid='.$row['userid'];
  30. if (empty($row['face'])) {
  31. $row['face'] = ($row['sex'] == '女') ? $GLOBALS['cfg_memberurl'].'/templets/images/dfgirl.png' : $GLOBALS['cfg_memberurl'].'/templets/images/dfboy.png';
  32. }
  33. foreach ($ctp->CTags as $tagid => $ctag) {
  34. if (isset($row[$ctag->GetName()])) {
  35. $ctp->Assign($tagid, $row[$ctag->GetName()]);
  36. }
  37. }
  38. $revalue .= $ctp->GetResult();
  39. }
  40. return $revalue;
  41. }
  42. ?>