📄 admin_addtype.asp
字号:
<!--#include file="conn.asp"-->
<!--#include file="Admin_Check.asp"-->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>blog</title>
<style type="text/css">
<!--
body {
margin-left: 0px;
margin-top: 0px;
margin-right: 0px;
margin-bottom: 0px;
}
-->
</style>
<link href="Style.css" rel="stylesheet" type="text/css">
<%
Dim Description
Dim Memo
Dim btn
btn = "添加"
if request("action") = "save" then
Dim TypeID
if request("typeID") = "" then
TypeID = -1
else
TypeID = request("typeID")
end if
call creaters(rs,"select * from type where typeID=" & Clng(TypeID))
if rs.eof then rs.addnew
rs("username") = request.Cookies("user")("username")
rs("memo") = request.Form("memo")
rs("description") = request.Form("description")
rs.update
call closers(rs)
call RedirToList()
elseif request("action") = "alter" then
call creaters(rs,"select * from type where typeid=" & request("typeid"))
Memo = rs("Memo")
Description = rs("Description")
call closers(rs)
btn = "修改"
end if
Sub RedirToList()
%>
<script language="javascript">
alert("操作成功!");
window.location = "Admin_TypeList.asp";
</script>
<%
End Sub
%>
</head>
<body>
<table width="613" border="0" cellpadding="0" cellspacing="0">
<!--DWLayoutTable-->
<tr>
<td width="613" height="29" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0">
<!--DWLayoutTable-->
<tr>
<td width="613" height="29" align="center" valign="middle"><div align="center"><strong>分类管理</strong></div></td>
</tr>
</table></td>
</tr>
<tr>
<td height="164" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0">
<!--DWLayoutTable-->
<tr>
<td width="38" height="8"></td>
<td width="534"></td>
<td width="41"></td>
</tr>
<tr>
<td height="156"></td>
<td valign="top">
<table width="100%" border="0" cellpadding="5" cellspacing="1" bgcolor="#C0E096">
<!--DWLayoutTable-->
<form name="frmUnit" action="Admin_AddType.asp?action=save&typeID=<%= request("typeid") %>" method="post">
<tr valign="middle" bgcolor="#F3F9EC">
<td width="154" height="23"><strong>分类名称:</strong></td>
<td width="380"><input name="Description" type="text" class="InputBox" id="Description" size="52" value="<%= Description %>"></td>
</tr>
<tr valign="middle" bgcolor="#FFFFFF">
<td height="23"><strong>分类描述:</strong></td>
<td height="23"><textarea name="Memo" cols="50" rows="6" class="InputBox" id="Memo"><%= Memo %></textarea></td>
</tr>
<tr valign="middle" bgcolor="#F3F9EC">
<td height="23" colspan="2"><div align="center">
<input name="btnSubmit" type="button" class="InputBox" id="btnSubmit" value="<%= btn %>">
<input name="Submit2" type="reset" class="InputBox" value="重置">
</div></td>
</tr>
</form>
</table></td>
<td></td>
</tr>
</table></td>
</tr>
<tr>
<td height="12"></td>
</tr>
</table>
</body>
</html>
<script language="vbscript">
sub btnSubmit_onclick()
if frmUnit.Description.value = "" then
Msgbox "分类名称不允许为空。",VbCritical,"分类名称"
exit sub
end if
frmUnit.submit
end sub
</script>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -