<?php
require "../e/class/connect.php";
require "../e/class/db_sql.php";
require "../e/member/class/user.php";
$link=db_connect();
$empire=new mysqlquery;
require "class/fun.php";
$userid=(int)$_GET[id];
if(!$userid){
$user=user_returnlogin();
$userid=$user[userid];
}
$ur=getuserinfo($userid);

$nickname=getnickname($userid);
$user=getuserinfoadd($userid);
$lastlogintime=date('Y-m-d H:i:s',$user[lasttime]);
$regtime=date('Y-m-d H:i:s',$ur[registertime]);
	$favanum=$empire->gettotal("select count(*) as total from {$dbtbpre}movie_fava where userid='$userid'");
	$remindnum=$empire->gettotal("select count(*) as total from {$dbtbpre}movie_remind where userid='$userid'");
	$playlognum=$empire->gettotal("select count(*) as total from {$dbtbpre}movie_playlog where userid='$userid'");
	
	
	$sex='未填写';
	if($user[sex]==1){$sex='男';} elseif($user[sex]==2){ $sex='女';}
	if($user[year]&&$user[moon]&&$user[day]){ $bday=$user[year].'-'.$user[moon].'-'.$user[day]; }
	else{ $bday='未填写';}
	if($user[city]&&$user[prov]){
		$adress=$user[prov].' '.$user[city];
	}
	else{
		$adress='未填写';
	}

?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title><?=$nickname?>的个人主页 - <?=$public_r[sitename]?> - 最新电视剧，好看的电影和电视剧免费在线观看</title>
<meta name="generator" content="editplus" />
<meta name="author" content="Fay" />
<meta name="keywords" content="最新电视剧，免费电视剧，<?=$public_r[sitename]?>，<?=$public_r[sitename]?>，快播电影，快播qovd" />
<meta name="description" content="<?=$public_r[sitename]?>提供最全的最新电视剧，韩国电视剧、香港TVB电视剧、韩剧、日剧、美剧、综艺的在线观看和剧集交流场所，在线观看分为普通视频模式和快播Qvod、百度影音等播放高清播放模式，每天第一时间更新快播电影，放送最新好看的高清免费电视剧" />
<script language="javascript"><!-- 
	window.onerror=function(){return true;} 
// --></script>
<script language="javascript">
	var Root='';
	var Sid='';
	var Cid='';
			var Id='';</script>
<script>
	uid="<?=$userid?>";
</script>
<link href="temp/css/base.css" type="text/css" rel="stylesheet" />
<link href="temp/css/i.css" type="text/css" rel="stylesheet" />
<script src="temp/css/jq171.js" type="text/javascript"></script>
<script src="temp/css/jqbase.js" type="text/javascript"></script>
<link href="temp/css/box.css" type="text/css" rel="stylesheet" />
<script src="temp/css/formValidator-4.0.1.js" type="text/javascript"></script>
<script src="temp/css/formValidatorRegex.js" type="text/javascript"></script>
<script language="javascript" src="temp/css/DateTimeMask.js" type="text/javascript"></script>    
</head>
<body>
<div id="header">

  <div id="headbar">
    <div class="layout fn-clear">
      <div id="logo"><a href=""><img src="images/logo.png" alt="<?=$public_r[sitename]?>" /></a></div>
      <!-- // logo end -->
      <div id="personal-nav">
        <ul>
          <li class="current"><a href="javascript:Tabpage.showvod('<?=$public_r[newsurl]?>user/class/iajax.php?action=getmyfava&uid=<?=$userid?>')"  idx="0" rel="nofollow">Ta的收藏</a></li>
          <li><a href="javascript:Tabpage.showvod('<?=$public_r[newsurl]?>user/class/iajax.php?action=getmyremind&uid=<?=$userid?>')"  idx="1" rel="nofollow">Ta的订阅</a></li>
          <li><a href="javascript:Tabpage.showvod('<?=$public_r[newsurl]?>user/class/iajax.php?action=getmyplaylog&uid=<?=$userid?>')"  idx="2" rel="nofollow">Ta的记录</a></li>
        </ul>
      </div>
      <!-- // personal-nav end -->
      <a class="show-login-dialog fn-hide" href="#login-dialog" >登录</a></div>
    <!-- // layout end -->
  </div>
  <!-- // headbar end -->
</div>
<!-- // header end -->
<div class="layout fn-clear" id="ui-personal">
  <div id="personal-bar">
    <div class="personal-info"><img class="avatar" src="<?=getuserpic($userid)?>" alt="<?=$nickname?>" />
      <ul>
        <li><a href="javascript:Tabpage.showvod('<?=$public_r[newsurl]?>user/class/iajax.php?action=getmyfava&uid=<?=$userid?>')" idx="0" rel="nofollow"><?=$favanum?></a>
          <p>收藏</p>
        </li>
        <li class="line"></li>
        <li><a href="javascript:Tabpage.showvod('<?=$public_r[newsurl]?>user/class/iajax.php?action=getmyremind&uid=<?=$userid?>')" idx="1" rel="nofollow"><?=$remindnum?></a>
          <p>订阅</p>
        </li>
        <li class="line"></li>
        <li><a href="javascript:Tabpage.showvod('<?=$public_r[newsurl]?>user/class/iajax.php?action=getmyplaylog&uid=<?=$userid?>')" idx="2" rel="nofollow"><?=$playlognum?></a>
          <p>记录</p>
        </li>
      </ul>
    </div>
  </div>
  <!-- // personal-bar end -->
  <div id="personal-box">
    <div class="personal-intro">
      <h5><span><a class="promsg-btn" href="javascript:;">给我私信</a></span><?=$nickname?><a href="/user/i.php?id=<?=$userid?>"><?=$public_r[newsurl]?>user/i.php?id=<?=$userid?></a>
        <p><a href="javascript:" val="<?=$userid?>" class="focus" id='jiaguanzhu'>+关注</a></p>
      </h5>
      <ul>
        <li><span class="sex">
          <label>性别：</label>
          <?=$sex?> </span><span class="birthday">
          <label>生日：</label>
          <?=$bday?></span><span class="address">
          <label>地区：</label>
          <?=$adress?></span></li>
        <li><span class="regtime">
          <label>注册时间：</label>
         <?=$regtime?></span><span class="lastlogin">
          <label>最后登录：</label>
         <?=$lastlogintime?></span></li>
      </ul>
    </div>
    <h2 id="Tab_title">Ta的收藏</h2>
    <div class="personal-cnt fn-clear"  id="user-comment-cnt">
      <ul  id="commbox" class="user-comment fn-clear">
        <li class="kong">当前没有收藏</li>
      </ul>
      <!-- // i-list End -->
      <div class="ui-pages fn-clear commpage"  id="pageboxx"></div>
    </div>
    <!-- // ui-comment-box End -->
  </div>
  <!-- // personal-box End -->
</div>
<!-- // ui-personal End -->
<? include_once "temp/footer.php";?>
<div style="display:none" id="hidcommform">
  <div class="cmt-replay">
    <div class="cmt-replay-arrow"></div>
    <div class="cmt-replay-cnt">
      <form action="#" method="post" id="mcommform">
        <div class="ui-form-field ui-form-area">
          <textarea class="ui-input ui-textarea" id="commtxt" name="recomm_txt" ></textarea>
        </div>
        <div class="ui-link-cnt fn-clear">
          <p>请勿提交非法信息和广告，违反者查封ID，甚至永久删除！谢谢合作~</p>
          <input type="hidden" id="comm_id" value="0" name="comm_id"/>
          <a class="ui-link sub">提交</a></div>
        <input type="hidden" name="__hash__" id="__hash__" value="6c01231fb47c0aecc5d586c85178adbc" />
      </form>
    </div>
  </div>
  <!-- // cmt-replay End -->
</div>
<!-- // hidcommform End -->

<script type="text/javascript" src="temp/css/colorbox.js"></script>
<div style="display:none">
  <div id="promsg-dialog">
    <div class="ui-dialog-cnt">
      <div class="ui-promsg-dialog fn-clear">
        <div class="ui-form">
          <form action="#" method="post" id="sendmsg">
            <div class="ui-form-title">
              <h3>写私信</h3>
            </div>
            <div class="ui-form-item fn-clear">
              <label for="msgtitle" class="ui-label w50">标题：</label>
              <input type="text" id="msgtitle" name="msgtitle" class="ui-input w360" value="" />
            </div>
            <div class="ui-form-item fn-clear">
              <label for="msgtxt" class="ui-label w50">内容：</label>
              <input type="hidden" value="<?=$userid?>" id="touid" name="touid"/>
              <textarea class="ui-input ui-textarea w360" id="msgtxt" name="msgtxt" ></textarea>
            </div>
            <div class="ui-form-item ui-form-button fn-clear">
              <label class="ui-label w50"></label>
              <input type="button" id="msgbt" class="ui-button w150" value="发 送" />
            </div>
          </form>
        </div>
        <!-- // ui-form End -->
      </div>
      <!-- // ui-login-dialog End -->
    </div>
  </div>
</div>
<!-- // promsg end -->
<script type="text/javascript">$(document).ready(function(){
	$(".promsg-btn").click(function (){ 

	$.colorbox({
		inline:true, 
		opacity: 0.6,
		width: "500px",
		href:"#promsg-dialog"
	});
	});
	$("#personal-nav a,.personal-info a").click(
	function (){
	idx=$(this).attr('idx');
	var tab_txt=new Array('Ta的收藏','Ta的订阅','Ta的记录');
	$("#Tab_title").html(tab_txt[idx]);
    $("#personal-nav ul li").removeClass('current');
	 $("#personal-nav ul li:eq("+idx+")").addClass('current');
	//Tabpage.showvod($(this).attr('data'));
	}
	);
	$("#msgbt").click(
	function (){
	 if($("#msgtitle").val()==''){
			$.showfloatdiv({txt:'请输入短信标题'});
			$("#msgtitle").focus();
			$.hidediv({});}else if($("#msgtxt").val()==''){
			$.showfloatdiv({txt:'请输入短信内容'});
			$("#msgtxt").focus();
			$.hidediv({});}else{
	$("#sendmsg").qiresub({
									curobj : $(".msgbt"),
									txt : '数据提交中,请稍后...',
									onsucc : function(result) {
										$.hidediv(result);		
										if(parseInt(result['rcode'])>0){
										$("#msgtitle").val('');
										$("#msgtxt").val('');
										$("#cboxClose").trigger('click');
										}
									}
								}).post({
									url : 'class/iajax.php?action=sendmsg'
			});
				}
	}
	);

});

 var $uid=213710;

function dVisit(url)
{
  $.ajax({
    url:url,
	type:'post',
	data:'vid='+$uid,
	success:function(){
	},dataType:'json',
	timeout:20000,
	error:function(){
	 } });
}
var Tabpage={
'showcomm':function(url){
$("#commbox").removeClass('img-list').addClass('user-comment');
  pagegoo(url);
},
'showvod':function(url){
$.ajax({
		url : url,
		success : function(data) {
		$("#commbox").html(data.ajaxtxt);
		$("#commbox").removeClass('user-comment').addClass('img-list');
		$("#pageboxx").html(data.pages);
		$(".commpage a").click(function(e) {
				var pagegourl=$(this).attr('href');
				pagegourl=pagegourl.replace('http://','').replace(window.location.host,'');
				Tabpage.showvod(pagegourl);
				return false;
			});
		},
		dataType : 'json'
		}
		);
}
}
Tabpage.showvod('<?=$public_r[newsurl]?>user/class/iajax.php?action=getmyfava&uid=<?=$userid?>');
// dVisit('user-Visit-doVisit');


focusids=new Array();
function getfocusuid() {
	$url='class/iajax.php?action=getlook&uid=';
	//$url=(typeof(uid)=='undefined')?$url:$url+uid;
	if(navigator.userAgent.indexOf('MSIE 6.0')>0||navigator.userAgent.indexOf('MSIE 9.0')>0){
				$url=$url+"-"+Math.random();
		   }
	$.ajax({url:$url,success:function(r){
	focusids=new Array();
	for(var i in r){
	focusids.push(r[i]['focus_uid']);
	}
	if(typeof(uid)!='undefined'){
		if(findexist(parseInt(uid),focusids)){
		$(".personal-intro .focus").html('已关注').attr('data','class/iajax.php?action=dellook&lookid='+uid);
		}else{
		$(".personal-intro .focus").html('+关注').attr('data','class/iajax.php?action=addlook&lookid='+uid);
		}
	}
	},dataType:'json'});
}
$(".visit_box li,.i-row-box li").hover(
function (e){
$obj=$(this).find('.guanzhu a');
if(!findexist(parseInt($obj.attr('val')),focusids))
{
$obj.removeClass('ated').addClass('focus').html('+关注').attr('data','class/iajax.php?action=addlook&lookid='+$obj.attr('val'));
}else{
$obj.removeClass('focus').addClass('ated').html('已关注').attr('data','class/iajax.php?action=dellook&lookid='+$obj.attr('val'));
}
$(this).find('.guanzhu').show();
},function(){
			$(this).find('.guanzhu').hide();
		}
);
getfocusuid();
function findexist($id,$arr){
	    var count=$arr.length;
		if(count>0){
		 for(var i=0;i<count;i++){
		   if($arr[i]==$id)
		   {
			 return $arr[i];
		   }
		 }
		}
		return  false;		
	}




</script>
</body>
</html>