<%@ Language=VBScript %>
<!--#include virtual="/inc-freehost-function/FreeHostFunctionMain.asp"-->
<%
If session("admau")="" Then
	ef=True
	ec="授权非法，有可能是超时造成的。"
ElseIf Request.Form ("Othertype")="" or Instr(Request.Form ("Othertype"), "'")>1 Then
	ef=True
	ec="原来的产品名没填！"
ElseIf Request.Form ("newOthertype")="" or Instr(Request.Form ("newOthertype"), "'")>1 Then
	ef=True
	ec="新的产品名没填！"
elseIf session("cansetpro")="" Then
	ef=True
	ec="您没有此操作的权限。"
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 Othertype='"&trim(Request.Form ("Othertype"))&"'"
		ds.Open Sql,conn,1,3
if  ds.Eof then
	ef=True
	ec="没找到要修改的产品！"
end if
end if
%>
<%if not ef then


Set dsph = Server.CreateObject("ADODB.Recordset")	
Sql="Select * from FreeHost.FreeHost_Product_Other"
	dsph.Open Sql,conn,1,3
while not dsph.Eof
if dsph("Othertype")=ds("Othertype") then dsph("Othertype")=trim(Request.Form ("newOthertype"))
dsph.update
dsph.movenext
wend
dsph.close

ds("Othertype")=trim(Request.Form("newOthertype"))

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%>