提交后重复两次
<!--#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('">name&"',">num&","&hotelbt&","&Hotelfenlei&",'"&Hotelxingji&"','">msj&"','">dj&"','">img&"','"&Hotelmeet&"','">info&"','">content&"','">keyword&"',"&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>
<input type="radio" name="Hotelfenlei" value="2" />三亚湾
</label>
<input type="radio" name="Hotelfenlei" value="3" />大东海
</label>
<input type="radio" name="Hotelfenlei" value="4" />市区
</label>
<input type="radio" name="Hotelfenlei" value="5" />海棠湾
</label>
<input type="radio" name="Hotelfenlei" value="6" />海口
</label>
<input type="radio" name="Hotelfenlei" value="7" />其他地区
</label> </td>
</tr>
<tr>
<td align="center" valign="middle">星级:</td>
<td align="left" valign="middle"><label>
<input type="radio" name="Hotelxingji" value="0" />家庭旅馆
</label>
<input type="radio" name="Hotelxingji" value="3" />三星级
</label>
<input type="radio" name="Hotelxingji" value="4" />四星级
</label>
<input type="radio" name="Hotelxingji" value="5" />五星级
</label> </td>
</tr>
<tr>
<td align="center" valign="middle">请选择添加类别:</td>
<td align="left" valign="middle"><label>
<input type="radio" name="hotelbt" value="1" />房间
</label>
<input type="radio" name="hotelbt" value="2" />套餐
</label>
</td>
</tr>
<tr>
<td align="center" valign="middle">是否有会场:</td>
<td align="left" valign="middle"><label>
<input type="radio" name="Hotelmeet" value="1" />有
</label>
<input type="radio" name="Hotelmeet" value="2" />没
</label>
</td>
</tr>
<tr>
<td align="center" valign="middle">价格:</td>
<td align="left" valign="middle"><input name="gtmsj" type="text" />
>>门市价
<input name="gtdj" type="text" />
>>优惠价</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"/>
(多个关键字请使用英文逗号“,”隔开)</td>
</tr>
<tr>
<td align="center" valign="middle"> </td>
<td align="left" valign="middle"><input type="submit" onclick="return check();" name="send" value="添加内容" /></td>
</tr>
</table>
</form>
</body>
</html>
<%
call close_conn
%>