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

📄 addinf.asp

📁 实现让客户上网就可以挑选自己所想要的装饰物
💻 ASP
字号:
<!--#include file="cn.asp"-->
<% 
if session("admin")=""  or request.cookies("timesshop")("admin")="" then 
response.Write "<script language='javascript'>alert('请先登录!');window.location.replace('login.asp');</script>"
response.End
end if%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
<style type="text/css">
<!--
body,td,th {
	font-size: 12px;
}
-->
</style></head>
<%shu=request.QueryString("shu")
select case shu
case 1
%>
<body>
<table width="650" border="0" cellpadding="0" cellspacing="0" align="center">
  <!--DWLayoutTable-->
  <tr>
    <td width="650" height="27" align="center" valign="bottom">常识信息添加</td>
  </tr>
  <tr>
    <td height="51" valign="top">
	<form id="form2" name="form2" method="post" action="addinf.asp?shuy=1">
	<table width="650" border="0">
      <!--DWLayoutTable-->
      <tr>
        <td width="162" height="20" align="right" valign="top">信息标题:</td>
        <td width="478" valign="top">
          <input name="title" type="text" id="title" />        </td>
      </tr>
      <tr>
        <%
		set rs=server.CreateObject("adodb.recordset")
sql="select * from inftyp"
rs.open sql,cn,1,1
		%>
		<td height="21" align="right" valign="top">类别:</td>
        <td valign="top"><select name="lei" id="lei">
          <option value="">选择类</option>
		  <%for i=1 to rs.recordcount
		  %>
		  
		  <option value="<%=rs("name")%>"><%=i%>.<%=rs("name")%></option>
          <%rs.movenext
		  if rs.eof then exit for
		  next
		  rs.close
		  set rs=nothing
				  %>
       
		</select>
        </td>
      </tr>
      <tr>
        <td height="15" colspan="2" align="center" valign="top">新闻内容:</td>
        </tr>
      <tr>
        <td height="354" colspan="2" valign="top"><input name="inf" type="hidden" id="inf" /><iframe id="detail" src="htmledit/ewebeditor.asp?id=inf&style=standard" frameborder="0" scrolling="no" width="550" height="350"></iframe>          </td>
        </tr>
      <tr>
        <td height="25" colspan="2" align="center" valign="top"><input type="submit" name="Submit" value="发布" />
          <input type="reset" name="Submit2" value="重置" /></td>
        </tr>
    </table>  
	</form>
        </td>
  </tr>
</table>
</body>
<%case 2
%>
<body>
<table width="650" border="0" cellpadding="0" cellspacing="0" align="center">
  <!--DWLayoutTable-->
  <tr>
    <td width="650" height="27" align="center" valign="bottom">选购常识添加</td>
  </tr>
  <tr>
    <td height="51" valign="top">
	<form id="form2" name="form2" method="post" action="addinf.asp?shuy=2">
	<table width="650" border="0">
      <!--DWLayoutTable-->
      <tr>
        <td width="162" height="20" align="right" valign="top">信息标题:</td>
        <td width="478" valign="top">
          <input name="title" type="text" id="title" />        </td>
      </tr>
      <tr>
        <%
		set rs=server.CreateObject("adodb.recordset")
sql="select * from inf1typ"
rs.open sql,cn,1,1
		%>
		<td height="21" align="right" valign="top">类别:</td>
        <td valign="top"><select name="lei" id="lei">
          <option value="">选择类</option>
		 	  
		  <option value="设计指南">设计指南</option>
		  <option value="采购指南">采购指南</option>
                
		</select>
        </td>
      </tr>
      <tr>
        <td height="15" colspan="2" align="center" valign="top">新闻内容:</td>
        </tr>
      <tr>
        <td height="354" colspan="2" valign="top"><input name="inf" type="hidden" id="inf" /><iframe id="detail" src="htmledit/ewebeditor.asp?id=inf&style=standard" frameborder="0" scrolling="no" width="550" height="350"></iframe>          </td>
        </tr>
      <tr>
        <td height="25" colspan="2" align="center" valign="top"><input type="submit" name="Submit" value="发布" />
          <input type="reset" name="Submit2" value="重置" /></td>
        </tr>
    </table>  
	</form>
        </td>
  </tr>
</table>
</body>
<%end select%>
</html>
<%title=trim(request.form("title"))
lei=trim(request.form("lei"))
inf=trim(Request.Form("inf"))
shu=trim(Request("shuy"))
if title<>""and  inf<>"" then
set rs=server.CreateObject("adodb.recordset")
rs.open "select * from inf",cn,1,3
rs.addnew
rs("title")=title
rs("lei")=lei
rs("inf")=inf
rs("shu")=shu
rs.update
response.Write "<script language='javascript'>alert('添加成功!');window.location.replace('index.asp');</script>"
rs.close
set rs=nothing
cn.close
set cn=nothing
end if
%>

⌨️ 快捷键说明

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