⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 edittype.asp

📁 用户名、密码和权限存放在本案例数据库中的admin表
💻 ASP
字号:
<%
if session("longin")<>1 then  '判断是否登录
   response.Redirect("login.asp")  '转移到登录页面
end if
%>
<!--#include file="conn.asp"-->
<html>
<head>
<meta http-equiv="Content-Language" content="zh-cn">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" href="css.css" type="text/css">
<title>后台管理——编辑设计类型</title>
</head>
<script language="javascript">
<!--
// 
function submitcheck()
{
if(form1.typename.value == "")
         {window.alert ("请填写类型名称!");
	  form1.typename.focus();
	  return false;
         }
}
-->
</script>
<%
action=request("action")                            '获得操作命令
typeid=request("typeid")                            '获得操作纪录的ID号

if action="modifytypepost" then                     '判断操作命令的类型
Set rs=Server.CreateObject("ADODB.Recordset")
sql="select * from designtype where typeid="&typeid
rs.open sql,conn,3,3
rs("typename")=Server.Htmlencode(Request("typename"))
rs.update
rs.close
set rs=nothing
response.redirect "typecontrol.asp"                 '操作成功后转移到管理设计类型页面

else


Set rs = conn.Execute("select *from designtype where typeid="& cint(typeid))
%>
<table width="600" border="0" align="center" cellpadding="5" cellspacing="1" bgcolor="#CCCCCC">
  <form method="post" action="typecontrol.asp?action=modifytypepost&typeid=<%=typeid%>" name="form1"  onsubmit="return submitcheck()" >
    <tr> 
      <td width="155" bgcolor="#FFFFFF">类型名称</td>
      <td width="422" bgcolor="#FFFFFF"> <p> 
          <input type="text" name="typename" size="11" value="<%=rs("typename")%>">
          <br>
        </p></td>
    </tr>
    <tr> 
      <td bgcolor="#FFFFFF">&nbsp;</td>
      <td bgcolor="#FFFFFF"><input type="submit" name="Submit3" value="确认"> <input type="reset" name="Submit22" value="复位"></td>
    </tr>
  </form>
</table>
<%
    set rs=nothing
    set conn=nothing
end if
%>
</BODY>
</HTML>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -