<?php
  //引入公共模块
  require("foundation/fpages_bar.php");
	require("foundation/module_users.php");
	require("foundation/module_blog.php");
	require("foundation/fcontent_format.php");
	require("foundation/module_mypals.php");
	
  //语言包引入
  $b_langpackage=new bloglp;
  
  //变量区
	$url_uid= short_check(get_argg('user_id'));
	$ses_uid=get_sess_userid();
	$sort_name=get_argg('sort_name')?urldecode(get_argg('sort_name')):"-1";

  //数据表定义
  $t_blog=$tablePreStr."blog";
  $t_users=$tablePreStr."users";
  $t_mypals=$tablePreStr."pals_mine";
  
	dbtarget('r',$dbServs);
	$dbo=new dbex;	
	$page_num=trim(get_argg('page'));
	$is_friend='';
	$no_data_text=$b_langpackage->b_no_fri_blog;
	$button_show_mine="";
	$button_show_his="content_none";	
	
  //引入模块公共权限过程文件
	$is_self_mode='partLimit';
	$is_login_mode='';
	require("foundation/auser_validate.php");
	$url_userid='';
	$cols=" user_id='$userid' ";
	if(get_argg('sort_id')!=NULL){
		$sort_id=short_check(get_argg('sort_id'));
		$cols.=" and log_sort='$sort_id' ";
		if(get_argg('sort_id')==0){
			$sort_name=0;
		}
	}
	 if($is_self=='Y'){
	 	  $str_title=$b_langpackage->b_blog;
		  $ml_class="nowbutl";$mr_class="nowbutr";$l_class="";$r_class="";
		  $no_data_text=$b_langpackage->b_none;
	 }else{
			$holder_name=get_hodler_name($dbo,$t_users,$url_uid);
			$str_title=str_replace("{holder}",$holder_name,$b_langpackage->b_his_blog);
			$url_userid="&user_id=".$userid;
			$button_show_mine="content_none";
			$button_show_his="";
			$holder_pals=getHodlerpals($dbo,$t_mypals,$url_uid);
			if(strstr($holder_pals,",".$ses_uid.",") && $ses_uid!=''){
				$cols.=" and blog_limit <=1 ";
			}else{
				$cols.=" and blog_limit = 0 ";
			}
	 }
	 if(get_argg('is_friend')==1){
		 	$is_friend='&is_friend=1';
			$button_show_mine="content_none";
			$button_show_his="";
			$cols.=" and blog_limit <=1 ";
	 }
	 $blog_rs=array();
   //数据模型及缓存功能区
	 require($webRoot.$baseLibsPath."model/blog_list.model.cache.php");
	//控制数据显示
	$content_data_none="content_none";
	$content_data_set="";
	$isNull=0;
	if(empty($blog_rs)){
		$isNull=1;
		$content_data_none="";
		$content_data_set="content_none";
	}
	?>