<%@ Language=VBScript %>
<!--#include virtual="/inc-freehost-function/FreeHostFunction.asp"-->
<!--#include virtual="/inc-freehost-function/FreeHostFunctionMain.asp"-->
<%
If session("agentusername")="" Then
	ef=True
	ec="授权非法，有可能是超时造成的。"
ElseIf lcase(Request.Form ("Othertype"))="" Then
	ef=True
	ec="产品名没填！"
ElseIf Instr(1, lcase(Request.Form ("Othertype")), "'", 1)>0 then
	ef=True
	ec="非法产品ID！"
ElseIf not IsNumeric(Request.Form ("id"))  Then
	ef=True
	ec="ID应该是数字！"
ElseIf not IsNumeric(Request.Form ("ServerlistID"))  Then
	ef=True
	ec="服务器ID应该是数字！"
ElseIf checkscript(Request.Form ("Othertype")) Then
	ef=True
	ec="名字有非法字符！如<>script"
elseIf checkscript(Request.Form ("info")) Then
	ef=True
	ec="简要说明有非法字符！如<>script"
elseIf checkscript(Request.Form ("infomore")) Then
	ef=True
	ec="详细说明有非法字符！如<>script"
end if
if not ef then
Set conn=Server.CreateObject("ADODB.Connection")
	conn.Open Application("FreeHostDBlink")
	Set ds = Server.CreateObject("ADODB.Recordset")	
		Sql="Select * from FreeHost.FreeHost_OtherProductlist where id='"&Request.Form ("id")&"'"
				if Instr(1,sql, ";", 1)>0 or Instr(1,sql, "--", 1)>0 then
Response.Write "非法字符！"
Response.End
end if
		ds.Open Sql,conn,1,1
if ds.Eof then
	ef=True
	ec="没找到要修改的产品！"
end if
end if

if not ef then
	Set ds = Server.CreateObject("ADODB.Recordset")	
Sql="Select * from FreeHost.FreeHost_OtherProductlist_AGN where agent1='"&session("agentusername")&"' and id='"&Request.Form ("id")&"'"
		if Instr(1,sql, ";", 1)>0 or Instr(1,sql, "--", 1)>0 then
Response.Write "非法字符！"
Response.End
end if
		ds.Open Sql,conn,1,3

if ds.Eof then
ds.addnew
ds("agent1")=session("agentusername")
end if
ds("id")=Request.Form("id")
ds("Othertype")=Request.Form("Othertype")
ds("info")=Request.Form("info")
ds("infomore")=Request.Form("infomore")
ds("ServerlistID")=Request.Form("ServerlistID")
ds("remindinfo")=Request.Form("remindinfo")
ds.Update

ds.Close
set ds=nothing
conn.Close 
set conn=nothing
Response.Redirect "product-Other.asp"
end if

if ef then
Response.Redirect "e.asp?e="&ec
end if%>