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

37 lines
1.2KB

  1. <?php
  2. /**
  3. * 我的收藏夹
  4. *
  5. * @version $Id: mystow.php 1 8:38 2010年7月9日Z tianya $
  6. * @package DedeCMS.Member
  7. * @copyright Copyright (c) 2007 - 2019, DesDev, Inc.
  8. * @license http://help.dedecms.com/usersguide/license.html
  9. * @link http://www.dedecms.com
  10. */
  11. require_once(dirname(__FILE__)."/config.php");
  12. CheckRank(0,0);
  13. require_once(DEDEINC."/datalistcp.class.php");
  14. setcookie("ENV_GOBACK_URL",GetCurUrl(),time()+3600,"/");
  15. $type = empty($type)? "sys" : trim($type);
  16. $tpl = '';
  17. $menutype = 'mydede';
  18. $rank = empty($rank)? "" : $rank;
  19. if($rank == 'top'){
  20. $sql = "SELECT s.*,COUNT(s.aid) AS num,t.* from #@__member_stow AS s LEFT JOIN `#@__member_stowtype` AS t on t.stowname=s.type group by s.aid order by num desc";
  21. $tpl = 'stowtop';
  22. }else{
  23. $sql = "SELECT s.*,t.* FROM `#@__member_stow` AS s left join `#@__member_stowtype` AS t on t.stowname=s.type where s.mid='".$cfg_ml->M_ID."' order by s.id desc";
  24. $tpl = 'mystow';
  25. }
  26. $dsql->Execute('nn','SELECT indexname,stowname FROM `#@__member_stowtype`');
  27. while($row = $dsql->GetArray('nn'))
  28. {
  29. $rows[]=$row;
  30. }
  31. $dlist = new DataListCP();
  32. $dlist->pageSize = 20;
  33. $dlist->SetTemplate(DEDEMEMBER."/templets/$tpl.htm");
  34. $dlist->SetSource($sql);
  35. $dlist->Display();