<?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(!empty($_POST['sconfig']))
{	
	//---------------有无权限使用
	include_once("config/module_company_config.php");
	$config['shop_set']=$module_company_config['shop_setting_'.$_SESSION['IFPAY']];
	if(!$config['shop_set'])
		msg("main.php?action=msg&type=access_dine");
	//---------------
	$temp->update_shop_setting();
	$admin->msg('main.php?action=m&m=company&s=admin_shop_set');
}
if(file_exists($config['webroot']."/config/shop_config/shop_config_".$bcid.'.php'))
{
	include_once($config['webroot']."/config/shop_config/shop_config_".$bcid.'.php');
	$tpl->assign('have_set',1);			
}
else
{
	include_once("lang/".$config['language']."/admin_menu.inc.php");
	include_once("lang/".$config['language']."/shop_default_config.php");
}
$tpl->assign("shopconfig",$shopconfig);
//====================================================================
$tpl->assign("config",$config);
$tpl->assign("lang",$lang);
$output=tplfetch("admin_shop_setting.htm");
?>