function totaobao()
{
//Load the selected product
$map['goods_id'] = array('in',$this->returnid());
$result = $this->showgoods($map);
//Write to CSV and save data
$header =iconv('UTF-8','GB2312',"Baby name, baby category, store category, new and old degree, province, city, sale method, baby price, price increase, baby quantity, validity period, freight burden, flat postage, EMS, express delivery, payment method, Alipay, invoice, warranty, automatic reissue, put into warehouse, window recommendation, start time, mood story, baby description, baby picture, baby attribute, group purchase price, minimum group purchase number, postage template ID, member discount, modification time, upload status, picture status, rebate ratio, new picture, video, sales attribute combination, user input ID string, user input name-value pair, merchant code, sales attribute alias, recharge type, baby number");
header("Content-type:text/csv");
header("Content-Disposition:attachment;filename=");
header('Cache-Control:must-revalidate,post-check=0,pre-check=0');
header('Expires:0');
header('Pragma:public');
echo "$header\n";
//Output data body
foreach($result as $value)
{
//Filter Description Field
$desc = csvdatafilter("",$value['goods_desc']);
//Seave the image file name
$img = msubstr($value['goods_thumb'],24,25);
//Escape
$body =iconv('UTF-8','GB2312',$value['goods_name'].",,0,Zhejiang,Jinhua,b,".$value['shop_price'].",0,".$value['goods_number'].",14,1,20,20,10,,0,0,1,0,1,,,",",".$desc.",,,0,0,,100,,0,".$img.":0:0:;,,,,,,,0,");
echo "$body\n";
}
}