<?php
/******用户首页********/
if(!is_user_logged_in()) { 
	wp_redirect(site_url()."/wp-login.php");
	exit;
}

global $wpdb,$wp_rewrite,$wp_query;
if( isset($wp_query->query_vars['my_second_page']) && $wp_query->query_vars['my_second_page']!='' )
$current_page = $wp_query->query_vars['my_second_page'];
else
$current_page = "home";

global $current_user;
get_currentuserinfo(); 
$uid = $current_user->ID;
//==============================================
get_header();
?>
<section>
<div class="container">
<div class="left_main" id="left_side">
	<div class="content_out">
	<div class="content">
<?php
user_get_users_links();
switch ($current_page)
{
case "home":
include('pages/home-page.php'); //个人信息
break;

case "my-settings":
include('pages/my-setting.php'); //编辑资料
break;

case "my-posts":
include('pages/my-posts.php'); //我的文章
break;

case "edit":
include('pages/edit-post.php');//编辑文章
break;

case "delete":
include('pages/delete-item.php');//删除文章
break;

case "my-comments":
include('pages/my-comments.php'); //我的评论
break;

case "my-collects":
include('pages/my-collects.php'); //我的收藏
break;

default:
break;
}
?>
</div>
</div>
</div>
<?php get_sidebar();?>
<div class="clear"></div>
</div>
</section>
<?php get_footer();?>