<%Option Explicit%> <% '********************************************************************************** ' Version 4.50 Automatic Extended Description ' shopexd.asp?id=xx ' xx = catalogid ' The template to be used is is xproducttemplate of a specific template for ' the product in the database ' April 29, 2002 22 add customer prices '********************************************************************************* Dim CatalogId dim ccode Dim tmpRS Dim template dim dbc dim rc setSess "CurrentURL","shopexd.asp" Catalogid=request("id") ccode=request("ccode") if catalogId="" and ccode="" then catalogid=getsess("shopexdid") if catalogid="" then Serror=LangNoCatalogId HandleError end if end if Setsess "shopexdid",catalogid ShopOpendatabase dbc OpenRecordSet tmpRS GetTemplate If Template="" then Serror=LangExdNoTemplate HandleError end if ShopTemplateWrite template, tmpRS, rc tmpRS.close set tmpRS=nothing Shopclosedatabase dbc 'Finished Sub HandleError on error resume next tmpRS.close set tmpRS=nothing Shopclosedatabase dbc Response.Redirect "shoperror.asp?msg=" & Server.URLEncode (sError) end sub ' Sub OpenRecordSet (RS) If catalogid<>"" then Sql="select * from products where catalogid=" & catalogid else sql="select * from products where ccode='" & ccode & "'" end if Set rs=dbc.execute(sql) If rs.eof then Serror = SError & LangReadFail & " " & catalogid HandleError end if end sub ' Sub GetTemplate on error resume next Template="" template=request("template") if template<>"" then exit sub Template=getconfig("xProductTemplate") If isNull(tmpRS("template")) then Template=getconfig("xProductTemplate") else template=tmprs("template") end if End sub %>