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

74 lines
2.8KB

  1. <?php
  2. /**
  3. * @version $Id: index.php 1 8:24 2010年7月9日Z tianya $
  4. * @package DedeCMS.Member
  5. * @copyright Copyright (c) 2007 - 2018, DesDev, Inc.
  6. * @copyright Copyright (c) 2020, DedeBIZ.COM
  7. * @license https://www.dedebiz.com/license/v6
  8. * @link https://www.dedebiz.com
  9. */
  10. require_once(dirname(__FILE__) . "/config.php");
  11. $uid = empty($uid) ? "" : RemoveXSS($uid);
  12. if (empty($action)) $action = '';
  13. if (empty($aid)) $aid = '';
  14. $menutype = 'mydede';
  15. //会员后台
  16. if ($uid == '') {
  17. $iscontrol = 'yes';
  18. if (!$cfg_ml->IsLogin()) {
  19. include_once(dirname(__FILE__) . "/templets/index-notlogin.htm");
  20. } else {
  21. $minfos = $dsql->GetOne("SELECT * FROM `#@__member_tj` WHERE mid='" . $cfg_ml->M_ID . "'; ");
  22. $minfos['totaluse'] = $cfg_ml->GetUserSpace();
  23. $minfos['totaluse'] = number_format($minfos['totaluse'] / 1024 / 1024, 2);
  24. if ($cfg_mb_max > 0) {
  25. $ddsize = ceil(($minfos['totaluse'] / $cfg_mb_max) * 100);
  26. } else {
  27. $ddsize = 0;
  28. }
  29. require_once(DEDEINC . '/channelunit.func.php');
  30. /* 最新文档8条 */
  31. $archives = array();
  32. $sql = "SELECT arc.*, category.namerule, category.typedir, category.moresite, category.siteurl, category.sitepath, mem.userid
  33. FROM `#@__archives` arc
  34. LEFT JOIN `#@__arctype` category ON category.id=arc.typeid
  35. LEFT JOIN `#@__member` mem ON mem.mid=arc.mid
  36. WHERE arc.arcrank > -1
  37. ORDER BY arc.sortrank DESC LIMIT 8";
  38. $dsql->SetQuery($sql);
  39. $dsql->Execute();
  40. while ($row = $dsql->GetArray()) {
  41. $row['htmlurl'] = GetFileUrl($row['id'], $row['typeid'], $row['senddate'], $row['title'], $row['ismake'], $row['arcrank'], $row['namerule'], $row['typedir'], $row['money'], $row['filename'], $row['moresite'], $row['siteurl'], $row['sitepath']);
  42. $archives[] = $row;
  43. }
  44. /** 调用访客记录 **/
  45. $_vars['mid'] = $cfg_ml->M_ID;
  46. if (empty($cfg_ml->fields['face'])) {
  47. $cfg_ml->fields['face'] = ($cfg_ml->fields['sex'] == '女') ? 'templets/images/dfgirl.png' : 'templets/images/dfboy.png';
  48. }
  49. /** 我的收藏 **/
  50. $favorites = array();
  51. $dsql->Execute('fl', "SELECT * FROM `#@__member_stow` WHERE mid='{$cfg_ml->M_ID}' LIMIT 5");
  52. while ($arr = $dsql->GetArray('fl')) {
  53. $favorites[] = $arr;
  54. }
  55. /** 有没新短信 **/
  56. $pms = $dsql->GetOne("SELECT COUNT(*) AS nums FROM `#@__member_pms` WHERE toid='{$cfg_ml->M_ID}' AND `hasview`=0 AND folder = 'inbox'");
  57. $dpl = new DedeTemplate();
  58. $tpl = dirname(__FILE__) . "/templets/index.htm";
  59. $dpl->LoadTemplate($tpl);
  60. $dpl->display();
  61. }
  62. }