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

73 lines
2.8KB

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