<?php
header("content-type:text/html;charset=utf-8");
require("foundation/asession.php");
require("configuration.php");
require("includes.php");
require("foundation/module_users.php");
require("foundation/fplugin.php");

//必须登录才能浏览该页面
require("foundation/auser_mustlogin.php");

//语言包引入
$u_langpackage=new userslp;
$mn_langpackage=new menulp;
$pu_langpackage=new publiclp;
$mp_langpackage=new mypalslp;
$s_langpackage=new sharelp;
$hi_langpackage=new hilp;
$l_langpackage=new loginlp;
$rp_langpackage=new reportlp;

$user_id=get_sess_userid();

$t_plugins=$tablePreStr."plugins";

$dbo = new dbex;
//读写分离定义函数
dbtarget('r',$dbServs);

if(is_null(get_sess_plugins()))$plugins="''";
	else $plugins=get_sess_plugins();
	$sql="select * from $t_plugins where plugin_id in('0','4','5','6','7') and valid=1 and name not in (".$plugins.")";
	$rows=$dbo->getRs($sql);
	$plugin_apps=array();
	$plugin_left=array();
	$plugin_search=array();
	$plugin_guest=array();
	$plugin_friends=array();
	foreach($rows as $row)
	{
		if($row['plugin_id']==0) $plugin_apps[]=$row;
		else if($row['plugin_id']==4) $plugin_left[]=$row;
		else if($row['plugin_id']==5) $plugin_search[]=$row;
		else if($row['plugin_id']==6) $plugin_guest[]=$row;
		else if($row['plugin_id']==7) $plugin_friends[]=$row;
	}
?>