<?php
include_once("module/company/includes/temp_class.php");
$temp=new temp();

//===================================================================
$re=$admin->check_shop_statu();
if($re=='close')
	;
elseif($re['user']<2||!$re['alluser']||!$re['biz']||$re['offernum']<5||$re['linknum']<3)
	msg('main.php?action=m&m=company&s=admin_openshop');
	
if(isset($_GET['select_tem']))
{
	$temp->update_user_tem($_GET['select_tem']);
	msg("main.php?action=m&m=company&s=admin_template");
}
else
{	
	include_once("module/company/includes/company_class.php");
	$user=new user();
	$re=$user->get_user_detail($buid);
	$tpl->assign("de",$re);

	include($config['webroot']."/config/usergroup.php");
	$usergroup=array();
	foreach($group as $v)
	{
		$g['group_id']=$v['group_id'];
		$g['name']=$v['name'];
		$usergroup[]=$g;
	}
	$tpl->assign("group",$usergroup);
	//--------------------------
	$tpl->assign("templist",$temp->user_temp_list());
}
//====================================================================
$tpl->assign("config",$config);
$tpl->assign("lang",$lang);
$output=tplfetch("admin_template.htm");
?>