weiguang.asp

来自「1.理解Winsock编程模型; 2.掌握Winsock编程的基本方法」· ASP 代码 · 共 72 行

ASP
72
字号
<!--#include file="conn.asp"-->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>石家庄经济学院信息工程学院!</title>
</head>

<body border="0" cellpadding="2" cellspacing="5" style="border-collapse: collapse" bordercolor="#222222">


<%
if request("aa")="提交" then
 hw_pic=request("hw_pic")
 hw2=request("hw2")
 online=request("online")
 if hw_pic="" then
  %>
<script language="javascript">
				if 	(confirm("请您选择图片的正确路径!"))
				  location.href="weiguang.asp";			
				</script>
<%
end if
  Set rs=Server.CreateObject("ADODB.Recordset")
	sql="select * from hw where hw_name='"&request("hw_pic")&"'"
	rs.open sql,conn,3,2
	if rs.eof then
		 rs.addnew
		 rs("hw_name")=hw_pic
		 rs("PubDate")=now()
		 rs("weizhi")=hw2
	if online="1" then
		 rs("online")=true
		 end if
		 rs.update		 
		 end if
		
		 %>
<script language="javascript">
				if 	(confirm("图片信息添加成功!"))
				  location.href="weiguang.asp";			
				</script>
				 
<%
end if
%>
<form name="form" method="post" action="weiguang.asp?action=加图片">
  <table width="100%" border="0" cellpadding="2" cellspacing="5" style="border-collapse: collapse" bordercolor="#222222">
    <tr> 
      <td colspan="2"> <font color="#FF0000">商品图片</font> 
                  <input type="text" name="hw_pic" value size="46" class=input>
        首页摆放位置:        
        <select name="hw2" id="hw2">
          <option>居上</option>
          <option>居中</option>
          <option>居下</option>
        </select><br>
        是否在线:是
        <input type="radio" name="online" value="1">
        <input name="online" type="radio" value="0" checked></td>
              </tr>
              <tr> 
                <td colspan="2"><IFRAME src="wangrui.asp" frameBorder=0 width="100%" height="30" scrolling=no height=21></IFRAME></td>
              </tr>
            </table>
			
  <input type="submit" name="aa" value="提交">
</form>
</body>
</html>

⌨️ 快捷键说明

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