<?php
//---------------------------------------------------
$sql="select rec_pro from ".SHOPSETTING." where company_id='$_GET[uid]'";
$db->query($sql);
$ids=$db->fetchField('rec_pro');
if($ids)
	$sql="select * from ".INFO." where company_id='$_GET[uid]' and id in ($ids)";
else
	$sql="select * from ".INFO." where company_id='$_GET[uid]' limit 0,8";
$db->query($sql);
$res=$db->getRows();
if(!$res)
{
	$sql="select * from ".INFO." where company_id='$_GET[uid]' limit 0,8";
	$db->query($sql);
	$res=$db->getRows();
}
$tpl->assign("rec_pro",$res);
//-------------------------------------------
$company_detail=$shop->get_user_detail($_GET['uid']);
if(is_array($company_detail))
	$company=array_merge($company_detail, $company);
//-------------------------------------------------------------------
$shopconfig["hometitle"]=$lang['company'].'-'.$shopconfig["hometitle"];
$shopconfig["homedes"]=$lang['company'].','.$shopconfig["homedes"];
$shopconfig["homekeyword"]=$lang['company'].','.$shopconfig["homekeyword"];
//====================================================================
$tpl->assign("lang",$lang);
$tpl->assign("config",$config);
$tpl->assign("com",$company);
$output=tplfetch("space_index.htm");
?>