<?php 
require_once(dirname(__FILE__)."/config.php");
require_once(dirname(__FILE__)."/inc/inc_catalog_options.php");
$aid = ereg_replace("[^0-9]","",$aid);
$channelid="5";
$dsql = new DedeSql(false);
//读取归档信息
//------------------------------
$arcQuery = "Select 
#@__channeltype.typename as channelname,
#@__arcrank.membername as rankname,
arc.* 
From #@__archives arc
left join #@__channeltype on #@__channeltype.ID=arc.channel 
left join #@__arcrank on #@__arcrank.rank=arc.arcrank
where arc.ID='$aid'";
$addQuery = "Select * From #@__addonproduct where aid='$aid'";

$dsql->SetQuery($arcQuery);
$arcRow = $dsql->GetOne($arcQuery);
if(!is_array($arcRow)){
	$dsql->Close();
	ShowMsg("读取档案基本信息出错!","-1");
	exit();
}

$addRow = $dsql->GetOne($addQuery);

if(!is_array($addRow))
{
	$addRow["assprice"] = '0';
	$addRow["bigpic"] = '';
	$addRow["model"] = '';
	$addRow["sptype"] = '';
	$addRow["cometime"] = '2008-01-01';
	$addRow["brand"] = '';
	$addRow["size"] = '';
	$addRow["stuff"] = '';
	$addRow["msg"] = '';
}

require_once(dirname(__FILE__)."/templets/product_edit.htm");

$dsql->Close();

?>