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

95 lines
3.4KB

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