<title>酒店信息维护</title>
<link href="../css/style.css" rel="stylesheet" type="text/css">
<script language="javascript" src="../js/WindowFunctions.js"></script>
<script language="javascript">
<!--
function fCheckOnOff(obj)
{
obj.value = (obj.checked?1:0);
//alert(obj.value);
}
function fCheckOnOffForLabel(obj)
{
obj.checked = !obj.checked;
obj.value = (obj.checked?1:0);
//alert(obj.value);
}
function fCheckForm()
{
if (!trim(document.frmProduct.Name.value))
{
alert('验证错误,名称为空,请输入。');
document.frmProduct.Name.focus();
return false;
}
/*if (!isNumeric(document.frmProduct.txtPrice.value))
{
alert('验证错误,产品价格为空或格式不符,请重新输入。');
document.frmProduct.txtPrice.focus();
return false;
}
if (!isNumeric(document.frmProduct.txtMemberPrice.value))
{
alert('验证错误,产品会员价格为空或格式不符,请重新输入。');
document.frmProduct.txtMemberPrice.focus();
return false;
}
if (!isNumeric(document.frmProduct.txtDiscount.value))
{
alert('验证错误,产品折扣为空或格式不符,请重新输入。');
document.frmProduct.txtDiscount.focus();
return false;
}
*/
if (!isDigit(document.frmProduct.txtSortIndex.value))
{
alert('验证错误,排序编号为空或格式不符,请重新输入。');
document.frmProduct.txtSortIndex.focus();
return false;
}
if (!trim(document.frmProduct.txtPictureBig.value) || !trim(document.frmProduct.txtPictureSmall.value))
{
if (!window.confirm('您还没有选择产品图片,确定不上传产品图片吗?\n\n按“确定”不传,\n按“取消”重新选择。'))
{
document.frmProduct.txtPictureBig.focus();
return false;
}
}
return true;
}
-->
</script>
<%
Dim sql, rs, count
sql = "select *,(select name from HotelCategory where ID=H.ParentID) as Pname from HotelCategory H where ParentID <> 0 order by SortIndex,id"
set rs=server.createobject("ADODB.Recordset")
rs.open sql,oConn,1,1
%>
<script language = "JavaScript">
var onecount;
onecount=0;
subcat = new Array();
<%count = 0
do while not rs.eof%>
subcat[<%=count%>] = new Array("<%= trim(rs("Name"))%>","<%= trim(rs("Pname"))%>","<%= trim(rs("Name"))%>");
<%count = count + 1
rs.movenext
loop
rs.close
set rs=nothing%>
onecount=<%=count%>;
function changelocation(ypxxone)
{
document.frmProduct.city.length = 0;
//var ypxxone_id=city;
var i;
document.frmProduct.city.options[0] = new Option('请选择小类','');
for (i=0;i < onecount; i++)
{
if (subcat[i][1] == ypxxone)
{
document.frmProduct.city.options[document.frmProduct.city.length] = new Option(subcat[i][0], subcat[i][2]);
}
}
}
</script>
</head>
<body leftmargin="0" topmargin="0" rightmargin="0" bottommargin="0" scroll="yes">
<table cellSpacing="0" cellPadding="0" width="78%" border="0">
<tr>
<td width="100%" valign="top">
<table class="up" cellSpacing="0" cellPadding="3" width="100%" border="0">
<tr>
<td class="title" noWrap background="../images/title_back.gif" height="22"><IMG height="16" hspace="0" src="../images/xp38.gif" width="16" align="absMiddle"><span>酒店信息维护</span></td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="100%" valign="top">
<table class="up" borderColor="#efefef" bgcolor="#F0F0EC" cellSpacing="0" cellPadding="0" width="100%" border="1">
<tr>
<td vAlign="middle" noWrap width="0" height="25"><IMG height="22" src="../images/t_header.gif" width="6" align="absMiddle">
<td onMouseUp="this.className='up';location.reload();" onMouseDown="this.className='down';"
onmouseover="this.className='up'" title="刷新" style="CURSOR: default" onMouseOut="this.className=''"
width="0%"><IMG height="16" hspace="5" src="../images/refresh.gif" width="16" align="absMiddle"></td>
<td width="0%"><IMG height="22" src="../images/split.gif" width="6" align="absMiddle"></td>
<td onMouseUp="this.className='up';"
onmousedown="this.className='down';location.href='ProductEdit.asp?act=0&ID=0&CatID=<%=nCatID%>';" onMouseOver="this.className='up'" title="添加"
style="CURSOR: default" onMouseOut="this.className=''" noWrap width="0%"><img height="16" hspace="5" src="../images/add.gif" width="16" align="absMiddle"><font style="FONT-SIZE: 12px">添加 </font></td>
<td width="0%"><IMG height="22" src="../images/split.gif" width="6" align="absMiddle"></td>
<td onMouseUp="this.className='up';"
onmousedown="this.className='down';" onMouseOver="this.className='up'" title="删除"
style="CURSOR: default" onMouseOut="this.className=''" noWrap width="0%"><img height="16" hspace="5" src="../images/delete.gif" width="16" align="absMiddle"><font style="FONT-SIZE: 12px">删除 </font></td>
<td width="0%"><IMG height="22" src="../images/split.gif" width="6" align="absMiddle"></td>
<td vAlign="middle" noWrap width="100%" height="25"></td>
</tr>
</table>
</td>
</tr>
<form action="ProductEdit.asp" method="POST" enctype="multipart/form-data" name="frmProduct" onSubmit="javascript:return fCheckForm();">
<input type="hidden" name="act" value="<%=act%>">
<input type="hidden" name="txtID" value="<%=nID%>">
<input type="hidden" name="txtCatID" value="<%=nCatID%>">
<input type="hidden" name="txtURL" value="<%=Request.ServerVariables("HTTP_REFERER")%>">
<tr>
<td>
<table width="650" border="0" align="center" cellpadding="2" cellspacing="1" bgcolor="#C0C0C0">
<tr bgcolor="#FFFFFF">
<td width="120" height="24" align="right" bgcolor="#E0E0E0">酒店名称:</td>
<td width="530" height="24" bgcolor="#FFFFFF"><input name="Name" type="text" id="Name" size="40" maxlength="50" value="<%=Name%>">
</td>
</tr>
<tr bgcolor="#FFFFFF">
<td width="120" height="24" align="right" bgcolor="#E0E0E0">英文名称:</td>
<td width="530" height="24" bgcolor="#FFFFFF"><input name="Ename" type="text" id="Ename" size="40" maxlength="50" value="<%=Ename%>">
</td>
</tr>
<tr bgcolor="#FFFFFF">
<td width="120" height="24" align="right" bgcolor="#E0E0E0">关键字:</td>
<td width="530" height="24" bgcolor="#FFFFFF"><input name="keyword" type="text" id="keyword" size="40" maxlength="50" value="<%=keyword%>">
</td>
</tr>
<tr bgcolor="#FFFFFF">
<td width="120" height="24" align="right" bgcolor="#E0E0E0">酒店电话:</td>
<td width="530" height="24" bgcolor="#FFFFFF"><input name="telephone" type="text" id="telephone" size="40" maxlength="50" value="<%=telephone%>">
</td>
</tr>
<tr bgcolor="#FFFFFF">
<td width="120" height="24" align="right" bgcolor="#E0E0E0">酒店传真:</td>
<td width="530" height="24" bgcolor="#FFFFFF"><input name="fax" type="text" id="fax" size="40" maxlength="50" value="<%=fax%>">
</td>
</tr>
<tr bgcolor="#FFFFFF">
<td width="120" height="24" align="right" bgcolor="#E0E0E0">酒店地址:</td>
<td width="530" height="24" bgcolor="#FFFFFF"><input name="address" type="text" id="address" size="40" maxlength="50" value="<%=address%>">
</td>
</tr>
<tr bgcolor="#FFFFFF">
<td width="120" height="24" align="right" bgcolor="#E0E0E0">酒店星级:</td>
<td width="530" height="24" bgcolor="#FFFFFF"><select name="starNo">
<option value="9" <% if starNo = 9 then %>selected<% end if %>>五星</option>
<option value="8" <% if starNo = 8 then %>selected<% end if %>>准五星</option>
<option value="7" <% if starNo = 7 then %>selected<% end if %>>四星</option>
<option value="6" <% if starNo = 6 then %>selected<% end if %>>准四星</option>
<option value="5" <% if starNo = 5 then %>selected<% end if %>>三星</option>
<option value="4" <% if starNo = 4 then %>selected<% end if %>>准三星</option>
<option value="3" <% if starNo = 3 then %>selected<% end if %>>二星</option>
<option value="2" <% if starNo = 2 then %>selected<% end if %>>准二星</option>
<option value="1" <% if starNo = 1 then %>selected<% end if %>>一星</option>
</select></td>
</tr>
<tr bgcolor="#E0E0E0">
<td width="120" height="24" align="right" bgcolor="#E0E0E0">所属地区:</td>
<td width="530" height="24" bgcolor="#FFFFFF"><%=province%> >> <%=city%><br><select name="province" onChange="changelocation(document.frmProduct.province.options[document.frmProduct.province.selectedIndex].value)">
<option value="" <% if province = "" then %>selected<% end if %>>请选择大类</option>
<%
sql="select *
from HotelCategory where ParentID = 0 and isdelete=false order by SortIndex,id"
set rs=server.createobject("ADODB.Recordset")
rs.open sql,oConn,1,1
while not rs.eof%>
<option value="<%=rs("Name")%>" <% if Cstr(province) = Cstr(rs("Name")) then %>selected<% end if %>><%=rs("Name")%></option>
<%rs.movenext
wend
rs.Close()
%>
</select>
<select name="city">
<option <% if city = "" then %>selected<% end if %> value="">请选择小类</option>
</select>
</td>
</tr>
<tr bgcolor="#E0E0E0">
<td width="120" height="24" align="right" bgcolor="#E0E0E0">标签列表:</td>
<td height="24" bgcolor="#FFFFFF">
<%
Dim nPage,n,i,nPageCount,nRecordcount
set rs=server.createobject("adodb.recordset")
sSQL="select * from HotelCategory2 where parentID=" & iLable & " and isdelete=0 Order By Name desc"
rs.open sSQL,oConn,1,1
rs.PageSize = 800000
nPageCount = rs.PageCount
nRecordcount = rs.recordcount
If Request.QueryString("Page") = "" then
nPage = 1
Else
nPage = Int(Request.QueryString("Page"))
End if
If nPage < 1 Then
nPage = 1
End If
If nPageCount=0 then
response.write "<DIV align=center><br>暂无相关信息!</div>"
Else
rs.AbsolutePage = nPage
n = 1
Do While not rs.eof and n<=400000
%>
<table width="94%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<%
For i=1 to 2
If Not rs.EOF then
%>
<td width="50%"><table width="97%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="5%" height="24"><input name="liebiao" type="checkbox" value="<%=rs(1)%>" <% If instr(liebiao,rs(1)) Then Response.Write("checked") %>></td>
<td width="95%" class="text1"><A href="jiudian.asp?id=<%=rs(0)%>" title="<%=rs(1)%>" target="_blank"><%=rs(1)%></A></td>
</tr>
<tr>
<td></td>
<td background="images/xian1.jpg"><img src="images/xian1.jpg" width="3" height="1"></td>
</tr>
</table></td>
<%
rs.movenext
Else
If i = 2 And rs.Eof Then
Response.Write("<td> </td>")
End If
exit for
End If
Next
n = n + 1
%>
</tr>
</table>
<%
Loop
End If
rs.close
set rs = nothing
%>
</td>
</tr>
<tr bgcolor="#E0E0E0">
<td width="120" height="24" align="right" bgcolor="#E0E0E0">酒店形象图:</td>
<td width="530" height="24" bgcolor="#FFFFFF"><input name="txtPictureBig" type="file" size="40"></td>
</tr>
<tr bgcolor="#E0E0E0">
<td width="120" height="24" align="right" bgcolor="#E0E0E0">酒店介绍图1:</td>
<td width="530" height="24" bgcolor="#FFFFFF"><input name="pic1" type="file" size="40"></td>
</tr>
<tr bgcolor="#E0E0E0">
<td width="120" height="24" align="right" bgcolor="#E0E0E0">酒店介绍图2:</td>
<td width="530" height="24" bgcolor="#FFFFFF"><input name="pic2" type="file" size="40"></td>
</tr>
<tr bgcolor="#E0E0E0">
<td width="120" height="24" align="right" bgcolor="#E0E0E0">酒店介绍图3:</td>
<td width="530" height="24" bgcolor="#FFFFFF"><input name="pic3" type="file" size="40"></td>
</tr>
<tr bgcolor="#E0E0E0">
<td width="120" height="24" align="right" bgcolor="#E0E0E0">酒店地图:</td>
<td width="530" height="24" bgcolor="#FFFFFF"><input name="mappic" type="file" size="40"></td>
</tr>
<tr bgcolor="#E0E0E0">
<td width="120" height="24" align="right" bgcolor="#E0E0E0">参考价:</td>
<td width="530" height="24" bgcolor="#FFFFFF"><input name="price" type="text" id="price" size="20" maxlength="50" value="<%=price%>">
<label>
<input name="money" type="radio" value="RM" <% if money = "RM" or money = "" then %>checked<% end if %>>
RMB</label>
<label>
<input type="radio" name="money" value="HK" <% if money = "HK" then %>checked<% end if %>>
HKD</label>
</td>
</tr>
<!--tr bgcolor="#FFFFFF">
<td width="120" height="24" align="right" bgcolor="#E0E0E0">娱乐与健身设施:</td>
<td width="530" height="24" bgcolor="#FFFFFF"><textarea name="entertainment" cols="60" rows="6"><%=entertainment%></textarea>
</td>
</tr-->
<tr bgcolor="#E0E0E0">
<td width="120" height="24" align="right" bgcolor="#E0E0E0">酒店简介:</td>
<td width="530" height="24" bgcolor="#FFFFFF"><table width="94%"
border="0" cellspacing="0" cellpadding="0">
<tr>
<td><INPUT type="hidden" name="Info" value="<%=Server.HtmlEncode(Info)%>"> <IFRAME ID="eWebEditor1" src="../eWebEditor/ewebeditor.asp?id=Info" frameborder="0" scrolling="no"
width="530" height="300"></IFRAME>
<span class="style3">*</span></td>
</tr>
</table></td>
</tr>
<tr bgcolor="#FFFFFF">
<td width="120" height="24" align="right" bgcolor="#E0E0E0">酒店设施:</td>
<td width="530" height="24" bgcolor="#FFFFFF"><textarea name="service" cols="60" rows="6"><%=service%></textarea>
</td>
</tr>
<tr bgcolor="#FFFFFF">
<td width="120" height="24" align="right" bgcolor="#E0E0E0">酒店地图:</td>
<td width="530" height="24" bgcolor="#FFFFFF"><textarea name="traffic" cols="60" rows="6"><%=traffic%></textarea>
</td>
</tr>
<tr bgcolor="#FFFFFF">
<td width="120" height="24" align="right" bgcolor="#E0E0E0">酒店备注 :</td>
<td width="530" height="24" bgcolor="#FFFFFF"><textarea name="OtherInfo" cols="60" rows="6"><%=OtherInfo%></textarea>
</td>
</tr>
<tr bgcolor="#FFFFFF">
<td width="120" height="24" align="right" bgcolor="#E0E0E0"></td>
<td width="530" height="24" bgcolor="#FFFFFF"> <input name="chkSpecial" type="checkbox" id="chkSpecial" value="<%If IsSpecial Then Response.Write "1" Else Response.Write "0" End If%>" <%If IsSpecial Then Response.Write "checked"%> onClick="javascript:fCheckOnOff(this);">
<label id="lblSpecial" onClick="javascript:fCheckOnOffForLabel(document.all['chkSpecial']);">特价推荐</label>
<input name="chkNew" type="checkbox" id="chkNew" value="<%If IsNew Then Response.Write "1" Else Response.Write "0" End If%>" <%If IsNew Then Response.Write "checked"%> onClick="javascript:fCheckOnOff(this);">
<label id="lblNew" onClick="javascript:fCheckOnOffForLabel(document.all['chkNew']);">首页推荐</label>
</td>
</tr>
<tr bgcolor="#E0E0E0">
<td width="120" height="24" align="right" bgcolor="#E0E0E0">排序编号:</td>
<td width="530" height="24" bgcolor="#FFFFFF"><input name="txtSortIndex" type="text" id="txtSortIndex" size="5" maxlength="10" value="<%=SortIndex%>">
(数字越小越靠前)</td>
</tr>
<tr bgcolor="#E0E0E0">
<td width="120" height="24" align="right" bgcolor="#E0E0E0">房型信息:</td>
<td width="530" height="24" bgcolor="#FFFFFF"><input name="button" type="button" id="button" value="添加房型" style="width:200px;height:22px;background-color:#f0f0f0;border-left: 0 solid #000000;border-right: 0 solid #000000;border-top: 0 solid #000000;border-bottom: 0 solid #000000;" onClick="AddInput()"><br>
<span id="AnswerAll">
<%
Dim x
x = 1
Dim rsTemp
Set rsTemp = oConn.Execute("Select * From Hotelfang Where ParentID = " & nID)
If rsTemp.Eof Then
%>
<label style="width:55px"></label>客房种类<%=x%>:<input name="txtAnswer_<%=x%>" type="text" id="txtAnswer_<%=x%>" size="10" maxlength="10" value="">参考价:<input name="price_can_<%=x%>" type="text" id="price_can_<%=x%>" size="10" maxlength="10" value="0" <% if x=1 then %>onBlur="javascript:document.frmProduct.price.value=document.frmProduct.price_can_1.value"<% end if %>>优惠价:<input name="price_te_<%=x%>" type="text" id="price_te_<%=x%>" size="10" maxlength="10" value="0"><br>备注:<textarea name="content_<%=x%>" cols="50" rows="4"></textarea><br>
<%
x = x + 1
else
While Not rsTemp.Eof
%>
<label style="width:55px"></label>客房种类<%=x%>:<input name="txtAnswer_<%=x%>" type="text" id="txtAnswer_<%=x%>" size="10" maxlength="10" value="<%=Trim(rsTemp("Answer"))%>">参考价:<input name="price_can_<%=x%>" type="text" id="price_can_<%=x%>" size="10" maxlength="10" value="<%=rsTemp("price_can")%>" <% if x=1 then %>onBlur="javascript:document.frmProduct.price.value=document.frmProduct.price_can_1.value"<% end if %>>优惠价:<input name="price_te_<%=x%>" type="text" id="price_te_<%=x%>" size="10" maxlength="10" value="<%=rsTemp("price_te")%>"><br>备注:<textarea name="content_<%=x%>" cols="50" rows="4"><%=rsTemp("content")%></textarea><br>
<%
rsTemp.MoveNext
x = x + 1
Wend
End If
%>
</span>
</td>
</tr>
<tr bgcolor="#FFFFFF">
<td height="30" align="right" bgcolor="#E0E0E0">Title:</td>
<td height="30"><input name="txtTitle" type="text" id="txtTitle" value="<%=strTitle%>" size="80"></td>
</tr>
<tr bgcolor="#FFFFFF">
<td height="30" align="right" bgcolor="#E0E0E0">Keywords:</td>
<td height="30"><input name="txtKeywords" type="text" id="txtKeywords" value="<%=strKeywords%>" size="80"></td>
</tr>
<tr bgcolor="#FFFFFF">
<td height="30" align="right" bgcolor="#E0E0E0">Description:</td>
<td height="30"><TEXTAREA NAME="txtDescription" ROWS="5" COLS="80"><%=strDescription%></TEXTAREA></td>
</tr>
<tr bgcolor="#FFFFFF">
<td height="30" align="right" bgcolor="#E0E0E0">文件名:</td>
<td height="30"><input name="txtFileName" type="text" id="txtFileName" value="<%=strFileName%>" size="80"></td>
</tr>
<tr bgcolor="#FFFFFF">
<td width="120" height="30" align="right" bgcolor="#E0E0E0"> </td>
<td width="530" height="30"><input type="submit" name="btnOK" value=" 确定 " class="button3">
<input type="button" name="btnCancel" value=" 取消 " class="button3" onClick="javascript:location.href='Info.asp'"></td>
</tr>
</table>
<input type="hidden" name="Acount" value="<%=x%>">
<br>
<table width="600" border="0" align="center" cellpadding="2" cellspacing="1" bgcolor="#C0C0C0">
<%
If imgSource <> "" Then
%>
<tr bgcolor="#FFFFFF">
<td width="600" height="20">酒店形象图</td>
</tr>
<tr bgcolor="#FFFFFF">
<td width="600" align="center">
<img src="<%=imgSource%>" border="0" align="absmiddle">
</td>
</tr>
<%
End If
%>
<%
If pic1 <> "" Then
%>
<tr bgcolor="#FFFFFF">
<td width="600" height="20">酒店介绍图1</td>
</tr>
<tr bgcolor="#FFFFFF">
<td width="600" align="center">
<img src="<%=pic1%>" border="0" align="absmiddle">
</td>
</tr>
<%
End If
%>
<%
If pic2 <> "" Then
%>
<tr bgcolor="#FFFFFF">
<td width="600" height="20">酒店介绍图2</td>
</tr>
<tr bgcolor="#FFFFFF">
<td width="600" align="center">
<img src="<%=pic2%>" border="0" align="absmiddle">
</td>
</tr>
<%
End If
%>
<%
If pic3 <> "" Then
%>
<tr bgcolor="#FFFFFF">
<td width="600" height="20">酒店介绍图3</td>
</tr>
<tr bgcolor="#FFFFFF">
<td width="600" align="center">
<img src="<%=pic3%>" border="0" align="absmiddle">
</td>
</tr>
<%
End If
%>
<%
If mappic <> "" Then
%>
<tr bgcolor="#FFFFFF">
<td width="600" height="20">酒店地图</td>
</tr>
<tr bgcolor="#FFFFFF">
<td width="600" align="center">
<img src="<%=mappic%>" border="0" align="absmiddle">
</td>
</tr>
<%
End If
%>
</table>
</td>
</tr>
</form>
<tr>
<td></td>
</tr>
</table>
<script language="javascript">
changelocation(document.frmProduct.province.options[document.frmProduct.province.selectedIndex].value);
document.frmProduct.city.value = "<%=city%>";
</script>
<script>
function AddInput()
{
var thisObject = document.frmProduct;
var TempAcount = thisObject.Acount.value;
var AnswerAll = document.all("AnswerAll").innerHTML;
var TbInfo;
//alert(TempAcount++)
TbInfo = "<label style='width:55px'></label>客房种类"+thisObject.Acount.value+":<input name='txtAnswer_"+thisObject.Acount.value+"' type='text' id='txtAnswer_"+thisObject.Acount.value+"' size='10' maxlength='10' value=''>参考价:<input name='price_can_"+thisObject.Acount.value+"' type='text' id='price_can_"+thisObject.Acount.value+"' size='10' maxlength='10' value='0'>优惠价:<input name='price_te_"+thisObject.Acount.value+"' type='text' id='price_te_"+thisObject.Acount.value+"' size='10' maxlength='10' value='0'><br>备注:<textarea name='content_"+thisObject.Acount.value+"' cols='50' rows='4'></textarea><br>"
document.all("AnswerAll").innerHTML = AnswerAll + TbInfo;
thisObject.Acount.value = ++TempAcount;
//alert(document.all("AnswerAll").innerText)
}
</script>
</body>
</HTML>
<%
Call DBConnEnd()
%>