<?php
/*
Array ( [id] => 1465437800 [idstr] => 1465437800 [class] => 1 [screen_name] => 162100网址导航 [name] => 162100网址导航 [province] => 21 [city] => 1 [location] => 辽宁 沈阳 [description] => [url] => [profile_image_url] => http://tp1.sinaimg.cn/1465437800/50/22847941916/1 [profile_url] => u/1465437800 [domain] => [weihao] => [gender] => m [followers_count] => 8 [friends_count] => 24 [statuses_count] => 0 [favourites_count] => 0 [created_at] => Sat Jul 06 16:52:39 +0800 2013 [following] => [allow_all_act_msg] => [geo_enabled] => 1 [verified] => [verified_type] => -1 [remark] => [allow_all_comment] => 1 [avatar_large] => http://tp1.sinaimg.cn/1465437800/180/22847941916/1 [avatar_hd] => [verified_reason] => [follow_me] => [online_status] => 0 [bi_followers_count] => 1 [lang] => zh-cn [star] => 0 [mbtype] => 0 [mbrank] => 0 [block_word] => 0 ) 
Array ( [token] => Array ( [access_token] => 2.00Y_pKbBPmZ3HB682ad06be10Z_N3V [remind_in] => 157679999 [expires_in] => 157679999 [uid] => 1465437800 ) ) 
Array ( [weibojs_1024947931] => access_token=2.00Y_pKbBPmZ3HB682ad06be10Z_N3V&remind_in=157679999&expires_in=157679999&uid=1465437800 [weathercity] => ���� [passpoint] => 1 [myNotepad] => [searchHot] => video唐朝好男人|index360网站安全 [regimcode] => 963683 [PHPSESSID] => ac7d380073845be8257f98718138f104 )
*/


//$key1 = $_SESSION['token']['access_token'];
$key1 = '';
$key2 = $_SESSION['token']['uid'];
//if (strlen($key1.$key2) == 10) {

include_once( 'login_key/weibo/config.php' );
include_once( 'login_key/weibo/saetv2.ex.class.php' );

$c = new SaeTClientV2( WB_AKEY , WB_SKEY , $_SESSION['token']['access_token'] );
$ms  = $c->home_timeline(); // done
//$uid_get = $c->get_uid();
//$uid = $uid_get['uid'];

$user_message = $c->show_user_by_id( $key2);//根据ID获取用户等基本信息

  if (!(is_array($user_message) && count($user_message) > 0)) {
    $err = '出错了！请稍后再试。';

  } else {


    $bar = 'weibo';
    @ require ('readonly/function/filter.php');
    $bar_name = filter1($user_message["name"], true);
    $bar_face = $user_message['profile_image_url'];

  }
//} else {
//  $err = '出错了！请稍后再试。';
//}

if (empty($err)) {

  echo '
<div class="note"><img src="'.$bar_face.'" /> '.$bar_name.'['.$user_message['location'].']，欢迎来自<img src="readonly/images/'.$bar.'.png" />的登录。</div>

        <a href="http://www.weibo.com/u/'.$user_message['id'].'"    target="_blank">进入我的新浪微博</a>		<br><br>

	<h2 align="left">发送新微博</h2>
	<form action="login_key/weibo/weibolist.php" >
<textarea name="text" rows="10" cols="30"></textarea><br />
		<button type="submit">发送</button>
	</form>
<br>
<br>

<center><a href="?get=file" target="_self">点此绑定/新建本站帐户</a></center>
';

} else {
  echo '<div class="output">'.$err.'</div>';
}

?>