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

📄 admin_addshouming.asp

📁 直接解压即可 都是asp源码 超经典的啊
💻 ASP
字号:
<!--#include file="conn.asp"-->
<% 
id=session("userid")
username=session("username")
if id="" or username="" then
response.Redirect("adminloginerror.asp")
end if
Set rs = Server.CreateObject("ADODB.Recordset")
sql="select * from adminuser where username='"& username &"' and id=" & id &""
rs.open sql,conn,3,3
if rs.eof then
response.Redirect("adminloginerror.asp")
else
%>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" href="style.css" type="text/css">

<body bgcolor="#FFFFFF" text="#000000" style="background-color: #D6DFF7">
<%
if request.querystring("cmd")="add" then
hostshouming=server.htmlencode(request.form("hostshouming"))
hostid=server.htmlencode(request.form("hostid"))
Set rs = Server.CreateObject("ADODB.Recordset")
sql="select * from hostshouming"
rs.open sql,conn,3,3
rs.addnew
rs("hostshouming")=hostshouming
rs("hostid")=hostid
rs.update
response.redirect"admin_addshouming.asp"
end if
%>
<div align="center">
  <center>
<table width="98%" border="1" cellpadding="5" cellspacing="0" bordercolor="#6687BA" style="border-collapse: collapse">
  <tr> 
    <td height="17" bgcolor="#EAF1FB" background="images/admin/admin_bg_1.gif"> 
      <div align="center" class="f1" >全 部 主 机 类 型 </div>
    </td>
  </tr>
  <tr>
    <td height="17" bordercolor="#FFFFFF">
<font color="#FF0000">
<%
set rs=server.createobject("adodb.recordset")
sql="select * from hosttyp order by id desc"
rs.open sql,conn,3,3
if rs.eof then 
response.write"<tr><td><div align=center> 暂 时 没 有 主 机 类 型</div></td></tr>"
else
response.Write"<table width=100% border=0 cellspacing=0 cellpadding=0>"
response.Write"<tr>"
do while not rs.eof
response.Write"<td align=center height=20>"
response.Write"<a href=admin_add_hostshouming.asp?typid="& rs("id") &"&hosttyp="& rs("hosttyp") &">"& rs("hosttyp") &"</a>"         
response.Write"</td>"
a=a+1
if a=4 then
response.Write"</tr><tr>"
a=0
end if
rs.movenext
   loop
response.Write"</table>"
end if
%> 
	  </font> 
	  </td>
  </tr> 
</table> 
  </center>
</div>
<div align="center"><br>
    
  	<table width="98%" border="1" cellpadding="5" cellspacing="0" bordercolor="#6687BA" style="border-collapse: collapse">
<form name="form1" method="post" action="admin_addshouming.asp?cmd=add&typid=<%=typid%>">
      <tr> 
        <td background="images/admin/admin_bg_1.gif"><div align="center" class="f1">主 机 说 明 添 加</div></td>
      </tr>
      <tr> 
        <td>
		<div align="center">
			<table width="98%"><tr><td align="center">
            <input name="hostshouming" type="text" id="hostshouming" size="47" value="请在这里输入你想添加的主机说明"><br>
			(注:如有多条说明请重复添加)</td></tr>
      <tr> 
        <td width="98%" height="34" align="center"><div align="center">相关主机名称: 
            <select name="hostid" id="hostid">
              <%
		set rs=server.createobject("adodb.recordset")
sql="select * from hostcontent order by id desc"
rs.open sql,conn,3,3
if rs.eof then %>
              <option value=""></option>
              <% else 
do while not rs.eof %>
              <option value="<%=rs("id")%>" selected><%=rs("hostname")%></option>
              <% rs.movenext
        loop
		end if
		%>
            </select>
          </td>
      </tr></table></div>
		</td></tr>
      <tr>
        <td><div align="center">
            <input type="submit" name="Submit" value="提交">
          </div></td>
      </tr>
    </form>
  </table>
</div>
</body>
<% rs.close
set rs=nothing
set conn=nothing
%>
<% end if %>

⌨️ 快捷键说明

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