?? classmodifybig.asp
字號:
<%@language=vbscript codepage=936 %>
<!--#include file="Admin.asp"-->
<!--#include file="Conndb.asp"-->
<!--#include file="Inc/Function.asp"-->
<%
dim BigClassID,Action,rs,NewBigClassName,OldBigClassName,FoundErr,ErrMsg
BigClassID=trim(Request("BigClassID"))
Action=trim(Request("Action"))
NewBigClassName=trim(Request("NewBigClassName"))
OldBigClassName=trim(Request("OldBigClassName"))
if BigClassID="" then
response.Redirect("ClassManage.asp")
end if
Set rs=Server.CreateObject("Adodb.RecordSet")
rs.Open "Select * from BigClass where BigClassID=" & CLng(BigClassID),conn,1,3
if rs.Bof and rs.EOF then
FoundErr=True
ErrMsg=ErrMsg & "<br><li>此產(chǎn)品大類不存在!</li>"
else
if Action="Modify" then
if NewBigClassName="" then
FoundErr=True
ErrMsg=ErrMsg & "<br><li>產(chǎn)品大類名不能為空!</li>"
end if
if FoundErr<>True then
rs("BigClassName")=NewBigClassName
rs("Admin")=Admin
rs.update
rs.Close
set rs=Nothing
if NewBigClassName<>OldBigClassName then
conn.execute "Update SmallClass set BigClassName='" & NewBigClassName & "' where BigClassName='" & OldBigClassName & "'"
conn.execute "Update Product set BigClassName='" & NewBigClassName & "' where BigClassName='" & OldBigClassName & "'"
end if
call CloseConn()
Response.Redirect "ClassManage.asp"
end if
end if
if FoundErr=True then
call WriteErrMsg()
else
%>
<script language="JavaScript" type="text/JavaScript">
function checkBig()
{
if (document.form1.BigClassName.value=="")
{
alert("大類名稱不能為空!");
document.form1.BigClassName.focus();
return false;
}
}
</script>
<html>
<head>
<title>管理</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="Admin_Style.css" rel="stylesheet" type="text/css">
</head>
<table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td align="center" valign="top">
<br>
<br>
<a href="Manage_Product1.asp"><strong>產(chǎn) 品 類 別 設(shè) 置</strong></a>
<br>
<form name="form1" method="post" action="ClassModifyBig.asp">
<table width="643" border="0" align="center" cellpadding="0" cellspacing="2" class="border">
<tr class="title">
<td height="25" colspan="2" align="center" bgcolor="#999999" style="background-image: url('../Images/topbg1.gif')"><strong>修改大類名稱</strong></td>
</tr>
<tr class="tdbg">
<td width="126"><strong>大類ID:</strong></td>
<td width="510"><%=rs("BigClassID")%>
<input name="BigClassID" type="hidden" id="BigClassID" value="<%=rs("BigClassID")%>">
<input name="OldBigClassName" type="hidden" id="OldBigClassName" value="<%=rs("BigClassName")%>"></td>
</tr>
<tr class="tdbg">
<td width="126"><strong>大類名稱:</strong></td>
<td>
<input name="NewBigClassName" type="text" id="NewBigClassName" value="<%=rs("BigClassName")%>" size="20" maxlength="30"></td>
</tr>
<tr class="tdbg">
<td align="center"> </td>
<td align="center">
<div align="left">
演示不開放操作按鈕,請聯(lián)系QQ 412771253
</div></td>
</tr>
</table>
</form>
</td>
</tr>
</table>
<%
end if
end if
rs.close
set rs=nothing
call CloseConn()
%>
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -