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

88 lines
3.1KB

  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 - 2020, DesDev, Inc.
  6. * @license http://help.dedecms.com/usersguide/license.html
  7. * @link http://www.dedecms.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. {
  17. $iscontrol = 'yes';
  18. if(!$cfg_ml->IsLogin())
  19. {
  20. include_once(dirname(__FILE__)."/templets/index-notlogin.htm");
  21. }
  22. else
  23. {
  24. $minfos = $dsql->GetOne("SELECT * FROM `#@__member_tj` WHERE mid='".$cfg_ml->M_ID."'; ");
  25. $minfos['totaluse'] = $cfg_ml->GetUserSpace();
  26. $minfos['totaluse'] = number_format($minfos['totaluse']/1024/1024,2);
  27. if($cfg_mb_max > 0) {
  28. $ddsize = ceil( ($minfos['totaluse']/$cfg_mb_max) * 100 );
  29. }
  30. else {
  31. $ddsize = 0;
  32. }
  33. require_once(DEDEINC.'/channelunit.func.php');
  34. /* 最新文档8条 */
  35. $archives = array();
  36. $sql = "SELECT arc.*, category.namerule, category.typedir, category.moresite, category.siteurl, category.sitepath, mem.userid
  37. FROM `#@__archives` arc
  38. LEFT JOIN `#@__arctype` category ON category.id=arc.typeid
  39. LEFT JOIN `#@__member` mem ON mem.mid=arc.mid
  40. WHERE arc.arcrank > -1
  41. ORDER BY arc.sortrank DESC LIMIT 8";
  42. $dsql->SetQuery($sql);
  43. $dsql->Execute();
  44. while ($row = $dsql->GetArray())
  45. {
  46. $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']);
  47. $archives[] = $row;
  48. }
  49. /** 调用访客记录 **/
  50. $_vars['mid'] = $cfg_ml->M_ID;
  51. if(empty($cfg_ml->fields['face']))
  52. {
  53. $cfg_ml->fields['face']=($cfg_ml->fields['sex']=='女')? 'templets/images/dfgirl.png' : 'templets/images/dfboy.png';
  54. }
  55. /** 我的收藏 **/
  56. $favorites = array();
  57. $dsql->Execute('fl',"SELECT * FROM `#@__member_stow` WHERE mid='{$cfg_ml->M_ID}' LIMIT 5");
  58. while($arr = $dsql->GetArray('fl'))
  59. {
  60. $favorites[] = $arr;
  61. }
  62. /** 欢迎新朋友 **/
  63. $sql = "SELECT * FROM `#@__member` ORDER BY mid DESC LIMIT 3";
  64. $newfriends = array();
  65. $dsql->SetQuery($sql);
  66. $dsql->Execute();
  67. while ($row = $dsql->GetArray()) {
  68. $newfriends[] = $row;
  69. }
  70. /** 有没新短信 **/
  71. $pms = $dsql->GetOne("SELECT COUNT(*) AS nums FROM `#@__member_pms` WHERE toid='{$cfg_ml->M_ID}' AND `hasview`=0 AND folder = 'inbox'");
  72. $dpl = new DedeTemplate();
  73. $tpl = dirname(__FILE__)."/templets/index.htm";
  74. $dpl->LoadTemplate($tpl);
  75. $dpl->display();
  76. }
  77. }