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



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

ds("Sqltype")=trim(Request.Form("newSqltype"))

ds.Update
ds.Close
set ds=nothing
conn.Close 
set conn=nothing
Response.Redirect "product-Sql.asp"
%>
<%end if
if ef then
Response.Redirect "e.asp?e="&ec
end if%>
