space.php 1.2 KB

12345678910111213141516171819202122232425262728293031
  1. <?php
  2. define('IN_SMT', true);
  3. define('IN_MYMPS', true);
  4. define('CURSCRIPT', 'space');
  5. require_once dirname(__FILE__) . '/include/global.php';
  6. require_once dirname(__FILE__) . '/data/config.php';
  7. require_once MYMPS_DATA . '/config.db.php';
  8. require_once MYMPS_INC . '/db.class.php';
  9. $user = isset($user) ? checkhtml($user) : '';
  10. $id = isset($id) ? intval($id) : '';
  11. ifsiteopen();
  12. $where = 'WHERE a.userid = \'' . $user . '\'';
  13. $space = $db->getRow('SELECT a.* FROM `' . $db_mymps . 'member` AS a LEFT JOIN `' . $db_mymps . 'area` AS b ON a.areaid = b.areaid ' . $where);
  14. if (!$space || empty($user)) {
  15. write_msg('您所指定的会员不存在,或者尚未通过审核');
  16. }
  17. $space['if_corp'] = $mymps_global['cfg_if_corp'] != 1 ? 0 : $space['if_corp'];
  18. $space['storeuri'] = $space['if_corp'] == 1 ? Rewrite('store', array('uid' => $space['id'])) : '';
  19. $space['uri'] = Rewrite('space', array('user' => $user, 'part' => 'index'));
  20. $space['prelogo'] = $space['prelogo'] ? $space['prelogo'] : $mymps_global[SiteUrl] . '/images/noavatar_small.gif';
  21. $loc = get_location('space', '', $user);
  22. $location = $loc['location'];
  23. $page_title = $loc['page_title'];
  24. globalassign();
  25. include mymps_tpl('index');
  26. is_object($db) && $db->Close();
  27. ?>