<!-- #include virtual = "/include/myopen.asp" -->
<%
	set RS = Server.CreateObject("ADODB.RecordSet")
	set RS1 = Server.CreateObject("ADODB.RecordSet")

IF REQUEST("ID") <> ""  THEN
		'计算随即   			
   			SQL = "SELECT TOP 1 * FROM qianbi where NO1 = '" & TRIM(REQUEST("ID")) & "'"
   			RS.Open SQL,CONN,adOpenKeyset ,adLockReadOnly
					IF RS.RecordCount >0 THEN
	
	tmpfile="\zippo\plate\detail.htm"	
		MNO = RS("No1")
		MLB = RS("Lb")
		MCLASS = RS("Zlb")
		MNAME= RS("Lb")
		MCZ = RS("Cz")
		MGG = RS("Gg")
		MCS = RS("Cs")
		MZJ = RS("Zj")
		MMZ = RS("Mz")
		MFXL = RS("Fxl")
		MJG = RS("BJg")
		MBJG = RS("Jg")
		MDW = RS("Dw")
		MFXSJ = RS("Fxsj")
		MDESC = RS("Bz")
		MTP = RS("Zmtp")
		MTA = RS("Zmta")
	
	'读取页面的膜版		
	Const ForReading = 1, ForWriting = 2
	Dim fso, f ,fw
	Set fso = CreateObject("Scripting.FileSystemObject")
	MyPath=Request.ServerVariables ("APPL_PHYSICAL_PATH")
	Set f = fso.OpenTextFile(MyPath & tmpfile, ForReading)
	ReadAllTextFile =  f.ReadAll

				ReadAllTextFile= Replace(ReadAllTextFile,"%IMG%",MTP)
				ReadAllTextFile= Replace(ReadAllTextFile,"%25IMG%25",MTP)
				ReadAllTextFile= Replace(ReadAllTextFile,"%NAME%",MNAME)
				ReadAllTextFile= Replace(ReadAllTextFile,"%CLASS%",MCLASS)
				ReadAllTextFile= Replace(ReadAllTextFile,"%LB%",MCLASS)
				ReadAllTextFile= Replace(ReadAllTextFile,"%MPRICE%",MBJG)
				ReadAllTextFile= Replace(ReadAllTextFile,"%PRICE%",MJG)
				ReadAllTextFile= Replace(ReadAllTextFile,"%NO%",MNO)
				ReadAllTextFile= Replace(ReadAllTextFile,"%UNIT%",MDW)
				ReadAllTextFile= Replace(ReadAllTextFile,"%DESC%",MDESC)
				
		'写文件
	
		'Set fw = fso.OpenTextFile(MyPath & "\news\default.htm", ForWriting, True)
		'fw.Write ReadAlltextFile
		'Response.Write ReadAlltextFile
	Response.Write ReadAlltextFile
	CONN.Close 
	Response.End 
	
	    					END IF
ELSE
Response.Redirect ("/")
END IF
%>
