<?php
include(dirname(__file__)."/../includes.php");

//好友圈基础api函数
function pals_sort($uid=''){
	$uid=intval($uid);
	if($uid==0){
		$uid=get_sess_userid();
	}
	global $tablePreStr;
	$t_pals_sort=$tablePreStr."pals_sort";
	$plugin_rs=array();
	$dbo=new dbex;
  dbplugin('r');
  $sql=" select * from $t_pals_sort where user_id=$uid ";
	$key="pals_sort_".$uid;
	$key_mt="pals_sort_mt_".$uid;
	$plugin_rs=model_cache($key,$key_mt,$dbo,$sql);
	if(empty($plugin_rs)){
		$plugin_rs=$dbo->getALL($sql);
	}
	return $plugin_rs;
}

?>