<?php

if (!defined('IN_HANFOX')) exit('Access Denied');



$pagename = '会员主页';

$pageurl = '?mod=home';

$tempfile = 'home.html';

$mode = 'home';

$table = $DB->table('users');




$user_id = isset($_GET['wid']) ? $_GET['wid'] : '';

$cache_id = $user_id;


	

if (!$smarty->isCached($tempfile, $cache_id)) {

	

	$where = "user_id=$user_id";

	$user = get_one_user($where);

	if (!$user) {

		unset($user);

		redirect('./?mod=index');

	}
	
    $art_tags = get_format_tags($art['art_tags']);

	$smarty->assign('art_tags', $art_tags);
	
    $smarty->assign('site_title', $user['nick_name'].'的'.$pagename.' - '.$options['site_name']);
	$smarty->assign('site_keywords', $user['nick_name'].'的个人主页,'. $user['nick_name'].'的自媒体主页');
	$smarty->assign('site_description', $user['nick_name'].'的个人主页汇集网站百科，货源大全，商品信息，微信导航，自媒体投稿等。');
	$smarty->assign('site_path', get_sitepath().' &raquo; '.$pagename);
	$smarty->assign('site_rss', get_rssfeed());
	$smarty->assign('user', $user);
	$smarty->assign('mode', $mode);
	$homestat = array();
	
	$homestat['article'] = $DB->get_count($DB->table('articles'), array('user_id' => $user['user_id']));
	$smarty->assign('homestat', $homestat);

}


		

smarty_output($tempfile, $cache_id);


?>