标题:提交后重复两次
只看楼主
Teeyo
Rank: 1
等 级:新手上路
帖 子:24
专家分:6
注 册:2010-11-28
结帖率:80%
 问题点数:0 回复次数:0 
提交后重复两次
<!--#include file="../inclub/function.asp" -->
<%
    dim sid
    sid = request.querystring("sid")
    response.Write sid
%>
<!--#include file="../conn.asp" -->
<%
    if request.form("send") = "添加内容" then
        dim rs,sql,gtname,gtnum,hotelbt,Hotelfenlei,Hotelxingji,gtmsj,gtdj,gtimg,Hotelmeet,gtinfo,gtcontent,gtkeyword
        gtname = request.form("gtname")
        gtnum = request.form("gtnum")
        hotelbt = clng(request.form("hotelbt"))
        Hotelfenlei = clng(request.form("Hotelfenlei"))
        Hotelxingji = request.form("Hotelxingji")
        gtmsj = request.form("gtmsj")
        gtdj = request.form("gtdj")
        gtimg = request.form("gtimg")
        Hotelmeet = request.form("Hotelmeet")
        gtinfo = request.form("gtinfo")
        gtcontent = request.form("gtcontent")
        gtkeyword = request.form("gtkeyword")
        id = request.form("ID")
        sid = clng(request.Form("sid"))

    set rs = server.createobject("adodb.recordset")
        sql="insert into gt(gtname,gtnum,hotelbt,Hotelfenlei,Hotelxingji,gtmsj,gtdj,gtimg,Hotelmeet,gtinfo,gtcontent,gtkeyword,HotelSid)values('"&gtname&"',"&gtnum&","&hotelbt&","&Hotelfenlei&",'"&Hotelxingji&"','"&gtmsj&"','"&gtdj&"','"&gtimg&"','"&Hotelmeet&"','"&gtinfo&"','"&gtcontent&"','"&gtkeyword&"',"&sid&")"
        rs.open sql,conn,1,1   '1,1表示只读,1,3表示可写

        conn.execute(sql)
        call sussLoctionHref("内容新增成功","admin_hotel.asp")
        end if
        
        

%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.

transitional.dtd">
<html xmlns="http://www.
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>房间/套餐添加页面</title>
<style type="text/css">
<!--
body,td,th {
    font-size: 12px;
}
-->
</style>
<script language="javascript">
// 参数说明
// s_Type : 文件类型,可用值为"image","flash","media","file"
// s_Link : 文件上传后,用于接收上传文件路径文件名的表单名
// s_Thumbnail : 文件上传后,用于接收上传图片时所产生的缩略图文件的路径文件名的表单名,当未生成缩略图时,返回空值,原图用s_Link参数接收,此参数专用于缩略图
function showUploadDialog(s_Type, s_Link, s_Thumbnail){
    //以下style=coolblue,值可以依据实际需要修改为您的样式名,通过此样式的后台设置来达到控制允许上传文件类型及文件大小
    var arr = showModalDialog("../ewebeditor/dialog/i_upload.htm?style=coolblue&type="+s_Type+"&link="+s_Link+"&thumbnail="+s_Thumbnail, window, "dialogWidth:0px;dialogHeight:0px;help:no;scroll:no;status:no");
}
</script>
</head>

<body>



<form action="admin_hotel_tj.asp" method="post" name="add">
<input type="text" value="<%=sid%>" name="sid" />
<table width="90%" border="0" align="center" cellpadding="5" cellspacing="0">
  
       <tr>
    <td width="14%" align="center" valign="middle">类别:</td>
    <td width="86%" align="left" valign="middle">
    <select name="gtnum">

          <option value="1" name="gtnum">酒店</option>
          <option value="2" name="gtnum">度假</option>
          <option value="3" name="gtnum">会展</option>
          <option value="4" name="gtnum">美食</option>
          <option value="5" name="gtnum">商家</option>
          <option value="6" name="gtnum">机票</option>
          <option value="7" name="gtnum">租车</option>
          <option value="8" name="gtnum">婚纱</option>
          <option value="9" name="gtnum" selected="selected">高尔夫</option>
          <option value="10" name="gtnum">景点</option>
      </select>    </td>
      </tr>


  <tr>
    <td width="14%" align="center" valign="middle">名称:</td>
    <td width="86%" align="left" valign="middle">
    <input name="gtname" type="text" /></td>
  </tr>
  <tr>
    <td align="center" valign="middle">区域划分:</td>
    <td align="left" valign="middle"><label>
    <input type="radio" name="Hotelfenlei" value="1" />亚龙湾
    </label>&nbsp;&nbsp;
    <input type="radio" name="Hotelfenlei" value="2" />三亚湾
    </label>&nbsp;&nbsp;
    <input type="radio" name="Hotelfenlei" value="3" />大东海
    </label>&nbsp;&nbsp;
    <input type="radio" name="Hotelfenlei" value="4" />市区
    </label>&nbsp;&nbsp;
    <input type="radio" name="Hotelfenlei" value="5" />海棠湾
    </label>&nbsp;&nbsp;
    <input type="radio" name="Hotelfenlei" value="6" />海口
    </label>&nbsp;&nbsp;
    <input type="radio" name="Hotelfenlei" value="7" />其他地区

    </label>&nbsp;&nbsp;    </td>
  </tr>
  <tr>
    <td align="center" valign="middle">星级:</td>
    <td align="left" valign="middle"><label>
      <input type="radio" name="Hotelxingji" value="0" />家庭旅馆
    </label>&nbsp;&nbsp;
     <input type="radio" name="Hotelxingji" value="3" />三星级
    </label>&nbsp;&nbsp;
     <input type="radio" name="Hotelxingji" value="4" />四星级
    </label>&nbsp;&nbsp;
     <input type="radio" name="Hotelxingji" value="5" />五星级
    </label>&nbsp;&nbsp;    </td>
  </tr>
<tr>
    <td align="center" valign="middle">请选择添加类别:</td>
    <td align="left" valign="middle"><label>
      <input type="radio" name="hotelbt" value="1" />房间
    </label>&nbsp;&nbsp;
     <input type="radio" name="hotelbt" value="2" />套餐
    </label>&nbsp;&nbsp;
  </td>
  </tr>
  <tr>
    <td align="center" valign="middle">是否有会场:</td>
    <td align="left" valign="middle"><label>
      <input type="radio" name="Hotelmeet" value="1" />有
    </label>&nbsp;&nbsp;
     <input type="radio" name="Hotelmeet" value="2" />没
    </label>&nbsp;&nbsp;
  </td>
  </tr>
  <tr>
    <td align="center" valign="middle">价格:</td>
    <td align="left" valign="middle"><input name="gtmsj" type="text" />
      &gt;&gt;门市价&nbsp;&nbsp;&nbsp;&nbsp;
      <input name="gtdj" type="text" />
      &gt;&gt;优惠价</td>
  </tr>
  <tr>
    <td align="center" valign="middle">图片:</td>
    <td align="left" valign="middle"><input type=text name=gtimg size=50> <input type=button value="上传图片..." onClick="showUploadDialog('image', 'add.gtimg', '')">    </td>
  </tr>
  <tr>
    <td align="center" valign="middle">简介:</td>
    <td align="left" valign="middle">
    <textarea cols="50" rows="5" name="gtinfo" ></textarea>    </td>
  </tr>
  <tr>
    <td align="center" valign="middle">内容:</td>
   <td align="left" valign="middle">
    <input type="hidden" name="gtcontent" value=""  />
<IFRAME ID="eWebEditor1" SRC="../ewebeditor/ewebeditor.htm?id=gtcontent&style=standard650" FRAMEBORDER="0" SCROLLING="no" WIDTH="650" HEIGHT="350"></IFRAME>  </tr>
    <tr>
    <td align="center" valign="middle">关键字</td>
    <td align="left" valign="middle"><input type="text" name="gtkeyword"/>
      (多个关键字请使用英文逗号&ldquo;,&rdquo;隔开)</td>
  </tr>
  <tr>
    <td align="center" valign="middle">&nbsp;</td>
    <td align="left" valign="middle"><input type="submit" onclick="return check();" name="send" value="添加内容" /></td>
  </tr>
</table>

</form>


</body>
</html>
<%

    call close_conn
%>
搜索更多相关主题的帖子: sql include file 
2010-12-02 22:35



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-327725-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.150467 second(s), 7 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved