File:cn/goods2.htm
Method:query(*table,*app,*connect)
default
对像不存在
cn/xmls/goodsss.xmls
...==$empty){
@tablecom=['<tr><div style="color:red;font-size:12px;height:45px;line-height:45px;text-align:center;">对不起,暂无产品评价!</div></tr>'];
}
$return(@tablecom);
}
//产品点评
$ajax comment(Id){
$if(@Id<>$null){
@queryc=$query(comment,goods);
@queryc[UserId]=$session[UserId];
@queryc[GoodsId]=@Id;
@ind=@queryc.scalar(['count(*)'],['{*UserId =} and {*GoodsId =}']);
$if(@ind>0){
$write(isNo);
$end();
}
$else{
$write(OK);
$end();
}
}
$return($empty);
}
//查询产品SDS
$sub SelectSDS(){
@TableDownload=$query(msds,download);
@TableDownload[GoodsCode]=@GoodsCode;
@FileName=@TableDownload.scalar(FileName,['{*GoodsCode =} and AreaId=1']);
$if(@FileName){
@texten=$file.readText($file.getMapPath(@FileName));
$return(@texten);
}
$write($empty);
}
//查询产品en SDS
$sub SelectEnSDS(){
@TableDownload=$query(msds,download);
@TableDownload[GoodsCode]=@GoodsCode;
@FileName=@TableDownload.scalar(FileName,['{*GoodsCode =} and AreaId=2']);
$write.out(@FileName,1);
$if(@File...