?? ks.supplytype.asp
字號:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<%Option Explicit%>
<!--#include file="../Conn.asp"-->
<!--#include file="../KS_Cls/KS.PublicCls.asp"-->
<!--#include file="Include/Session.asp"-->
<%
Dim KSCls
Set KSCls = New GQType
KSCls.kesion()
Set KSCls = Nothing
Class GQType
Private KS
Private Sub Class_Initialize()
Set KS=New PublicCls
End Sub
Private Sub Class_Terminate()
Call CloseConn()
Set KS=Nothing
End Sub
Sub kesion()
Dim RS
Dim TypeID:TypeID=2 '影視服務器
With Response
.Write "<html>"
.Write"<head>"
.Write"<meta http-equiv=""Content-Type"" content=""text/html; charset=gb2312"">"
.Write"<link href=""Include/Admin_Style.CSS"" rel=""stylesheet"" type=""text/css"">"
.Write "<script src=""include/Common.js"" language=""JavaScript""></script>"
.Write"</head>"
.Write"<body leftmargin=""0"" topmargin=""0"" marginwidth=""0"" marginheight=""0"">"
.Write"<table width=""100%"" height=""25"" border=""0"" cellspacing=""0"" cellpadding=""0"">"
.Write " <tr>"
.Write" <td height=""25"" class=""sort"" align=""center""> "
.Write " <strong> 交易類別管理</strong>"
.Write " </td>"
.Write " </tr>"
.Write"</TABLE>"
End With
%>
<table width="90%" border="0" align="center" cellpadding="3" cellspacing="1" class="border" style="MARGIN-TOP: 3px">
<tr align="center" class="title">
<td width="87" height="25"><strong>編號</strong></td>
<td width="217"><strong>交易類別名稱</strong></td>
<td width="197"><strong>顏色</strong></td>
<td width="196"><strong>管理操作</strong></td>
</tr>
<%
set rs = conn.execute("select * from KS_GQType order by Typeid")
if rs.eof and rs.bof then
Response.Write "<tr><td colspan=""5"" height=""25"" align=""center"" class=""tdbg"">還沒有添加任何的交易類別!</td></tr>"
else
do while not rs.eof%>
<form name="form1" method="post" action="?x=a">
<tr class='tdbg' onMouseOver="this.className='tdbgmouseover'" onMouseOut="this.className='tdbg'">
<td width="87" height="25" align="center"><%=rs("typeid")%> <input name="typeid" type="hidden" id="typeid" value="<%=rs("typeid")%>"></td>
<td width="217" align="center"><input style="color:<%=rs("typecolor")%>" name="TypeName" type="text" class="textbox" id="TypeName" value="<%=rs("TypeName")%>" size="25"></td>
<td width="197" align="center"><input name="TypeColor" type="text" class="textbox" id="TypeColor" value="<%=rs("TypeColor")%>" size="25"></td>
<td align="center"><input name="Submit" class="button" type="submit"value=" 修改 "> <input onclick='if (confirm("確定刪除嗎?")==true){window.location="?x=c&typeid=<%=rs("typeid")%>";}' name="Submit2" type="button" class="button" value=" 刪除 "></td>
</tr>
</form>
<%rs.movenext
loop
End IF
rs.close%>
<form action="?x=b" method="post" name="myform" id="form">
<tr class="title" ><td height="25" colspan="5"><strong>>>新增交易類別</strong></td>
</tr>
<tr valign="middle" class="tdbg">
<td height="25"></td>
<td height="25" align="center"><input name="TypeName" type="text" class="textbox" id="TypeName" size="25"></td>
<td height="25" align="center"><input name="TypeColor1" type="text" class="textbox" id="TypeColor1" size="20">
<img border=0 id="ColorThumbsBorderShow" src="images/rect.gif" style="cursor:pointer;" onClick="Getcolor(this,'include/SelectColor.asp','TypeColor1');" title="選取顏色">
</td>
<td height="25" align="center"> <input name="Submit3" class="button" type="submit" value="OK,提交"></td>
</tr>
</form>
</table>
<% Select case request("x")
case "a"
conn.execute("Update KS_GQType set TypeName='" & KS.G("TypeName") & "',TypeColor='" & KS.G("TypeColor") & "' where Typeid="&KS.G("typeid")&"")
Response.Redirect "?"
case "b"
If KS.G("TypeName")="" Then Response.Write "<script>alert('請輸入類別名稱!');history.back();</script>":response.end
conn.execute("Insert into KS_GQType(TypeName,TypeColor)values('" & KS.G("TypeName") & "','" & KS.G("TypeColor1") & "')")
Response.Redirect "?"
case "c"
conn.execute("Delete from KS_GQType where Typeid="&KS.G("typeid")&"")
Response.Redirect "?"
End Select
%></body>
</html>
<%End Sub
End Class
%>
<%
'==================================================
'郵箱: zxzyw@126.com
'網站: www.zxzyw.cn
'==================================================
%>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -