📄 admin_sight.asp
字号:
return false;
}
function Check(frm){
var CurrentMode = Editor.CurrentMode;
if (CurrentMode == 0){
frm.Content.value = Editor.HtmlEdit.document.body.innerHTML;
}else if(CurrentMode==1){
frm.Content.value = Editor.HtmlEdit.document.body.innerText;
}else{
alert('<%=EL_Channel.ItemName%>介绍处于预览状态不能保存');
Editor.HtmlEdit.focus();
return false;
}
CurrentMode = TravelHintEditor.CurrentMode;
if (CurrentMode == 0){
frm.TravelHint.value = TravelHintEditor.HtmlEdit.document.body.innerHTML;
}else if(CurrentMode==1){
frm.TravelHint.value = TravelHintEditor.HtmlEdit.document.body.innerText;
}else{
alert('旅游小贴士处于预览状态不能保存');
TravelHintEditor.HtmlEdit.focus();
return false;
}
if(frm.SightName.value.trim()==""){
alert("请输入<%=EL_Channel.ItemName%>名称");
frm.SightName.focus();
return false;
}
if(frm.Content.value.trim()==""){
alert("请输入<%=EL_Channel.ItemName%>介绍");
Editor.HtmlEdit.focus();
return false;
}
<%=EL_Common.ShowDefinedField_Js(EL_Channel.ChannelID, "frm")%>
SubmitOnce(frm);
return;
}
function initOption(o, df, source, pname, pvalue){
var e = getObject(o);
var sindex = 0;
var name, spell;
clearOption(o);
for(var i=0;i<source.length;i++){
name = source[i].name
spell = source[i].spell;
if(pname == ""){
e.options.add(new Option(spell.substring(0, 1).toUpperCase() +" - "+ name, name));
sindex++;
}else{
if(source[i][pname]==pvalue){
e.options.add(new Option(spell.substring(0, 1).toUpperCase() +" - "+ name, name));
sindex++;
}
}
if(name==df) e.selectedIndex = sindex;
}
}
function onProvinceChange(dfCity){
var o = getObject("sProvince");
if(o.value!=""){
initOption("sCity", dfCity, City, "province", o.value);
onCityChange("");
}else{
clearOption("sCity");
}
}
function onCityChange(dfArea){
var o = getObject("sCity");
if(o.value!=""){
initOption("sArea", dfArea, Area, "city", o.value);
}else{
clearOption("sArea");
}
}
function clearOption(o){
var e = getObject(o);
for(i=e.options.length-1;i>0;i--){
e.remove(i);
}
}
</script>
<form name="myform" action="Admin_Sight.asp" method="post" onSubmit="return Check(this)">
<table width="100%" border="0" cellpadding="0" cellspacing="1" class="Border">
<tr>
<td colspan="4" class="top_25"><strong>修改<%=EL_Channel.ItemName%></strong></td>
</tr>
<tr>
<td width="17%" class="td_ItemName"><strong>所属<%=EL_Channel.ClassItemName%></strong></td>
<td colspan="3" class="td_25">
<select name="sProvince" id="sProvince" onChange="onProvinceChange('')">
<option value="" selected>选择省份…</option>
</select>
<select name="sCity" id="select2" onChange="onCityChange('')">
<option value="" selected>选择城市…</option>
</select>
<select name="sArea" id="select3">
<option value="" selected>选择区域…</option>
</select>
<script>
initOption("sProvince", "<%=rsModify("Province")%>", Province, "", "");
onProvinceChange("<%=rsModify("City")%>");
onCityChange("<%=rsModify("Area")%>");
</script></td>
</tr>
<tr>
<td class="td_ItemName"><strong><%=EL_Channel.ItemName%>名称</strong></td>
<td colspan="3" class="td_25"><input name="SightName" type="text" class="RulerInput" id="SightName" value="<%=EL_Common.HTMLEncode(rsModify("SightName"))%>" size="65"></td>
</tr>
<tr>
<td class="td_ItemName"><strong>门市价</strong></td>
<td colspan="3" class="td_25"><input name="MarketPrice" type="text" id="MarketPrice" value="<%=rsModify("MarketPrice")%>" size="10"></td>
</tr>
<tr>
<td class="td_ItemName"><strong>预订价格</strong></td>
<td colspan="3" class="td_25"><input name="BookPrice" type="text" id="BookPrice" value="<%=rsModify("BookPrice")%>" size="10"></td>
</tr>
<tr>
<td class="td_ItemName"><strong>是否可以打折</strong></td>
<td colspan="3" class="td_25"><input name="IsDiscount" type="radio" class="nomargin" value="<%=EL_True%>" <%=EL_Common.SetObjectChecked("True", rsModify("IsDiscount"))%>>
是
<input name="IsDiscount" type="radio" class="nomargin" value="<%=EL_False%>" <%=EL_Common.SetObjectChecked("False", rsModify("IsDiscount"))%>>
否</td>
</tr>
<tr>
<td class="td_ItemName"><strong>开放时间</strong></td>
<td colspan="3" class="td_25"><input name="OpenTime" type="text" id="OpenTime" value="<%=rsModify("OpenTime")%>" size="40"></td>
</tr>
<tr>
<td class="td_ItemName"><strong>地理位置</strong></td>
<td colspan="3" class="td_25"><input name="Address" type="text" id="Address" value="<%=rsModify("Address")%>" size="70"></td>
</tr>
<tr>
<td class="td_ItemName"><strong>周围景观
<input name="AroundHotel" type="hidden" id="AroundHotel">
<input name="AroundSight" type="hidden" id="AroundSight">
</strong></td>
<td colspan="3" valign="top" class="td_25">
<fieldset style="padding:0px; height:100%; width:650px;" type="myfieldset">
<table width="100%" border="0" cellpadding="0" cellspacing="1" bgcolor="#FFFFFF">
<tr>
<td class="td_ItemName" width="325"><strong>·酒店列表</strong></td>
<td class="td_ItemName" width="325"><strong>·景点列表</strong></td>
</tr>
<tr>
<td valign="top" class="item_25">
<div id="HotelList" targetobject="AroundHotel"></div>
<div id="bAddHotel" class="bAdd" onClick="SelectItem('Hotel')">↑添加酒店</div>
<script>AddList("HotelList", "<%=EL_Common.HTMLEncode(rsModify("AroundHotel"))%>");getObject("AroundHotel").value="<%=EL_Common.HTMLEncode(rsModify("AroundHotel"))%>";</script> </td>
<td valign="top" class="item_25">
<div id="SightList" targetobject="AroundSight"></div>
<div id="bAddSight" class="bAdd" onClick="SelectItem('Sight')">↑添加景点</div>
<script>AddList("SightList", "<%=EL_Common.HTMLEncode(rsModify("AroundSight"))%>");getObject("AroundSight").value="<%=EL_Common.HTMLEncode(rsModify("AroundSight"))%>";</script> </td>
</tr>
</table>
</fieldset> </td>
</tr>
<tr>
<td class="td_ItemName"><strong>旅游小贴士</strong></td>
<td colspan="3" class="td_25"><textarea name='TravelHint' id="TravelHint" style='display:none'><%=EL_Common.ServerHTMLEncode(rsModify("TravelHint"))%></textarea>
<iframe id='TravelHintEditor' src='../editor.asp?ChannelID=<%=EL_Channel.ChannelID%>&ShowType=3&tContentid=TravelHint' frameborder='1' scrolling='no' width='650' height='170' ></iframe> </td>
</tr>
<tr>
<td class="td_ItemName"><strong><%=EL_Channel.ItemName%>介绍</strong>
<div style="height:50%">
<input name="IsSaveRemoteImages" type="checkbox" class="nomargin" id="IsSaveRemoteImages" value="<%=EL_True%>" checked>
<span class="BlueText">是否保存编辑器中包含的远程图片到本地文件,当远程图片较多时保存速度较慢</span><br>
<span class="redText">在使用此功能之前必须在网站基本信息配置中打开“自动保存远程图片”功能</span> </div>
<table width="100%" height="50%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td valign="bottom"><img src="<%=EL_Common.PictrueURL(rsModify("DefaultPictrue"), EL_Channel.FilePath)%>" name="PictruePreview" width="140" height="100" id="PictruePreview"></td>
</tr>
<tr>
<td height="10"> </td>
</tr>
</table></td>
<td colspan="3" class="td_25">
<textarea name='Content' id="Content" style='display:none'><%=EL_Common.ServerHTMLEncode(rsModify("Content"))%></textarea>
<iframe id='Editor' src='../editor.asp?ChannelID=<%=EL_Channel.ChannelID%>&ShowType=0&tContentid=Content' frameborder='1' scrolling='no' width='650' height='450' ></iframe></td>
</tr>
<tr>
<td class="td_ItemName"><strong>默认缩略图</strong></td>
<td colspan="3" class="td_25"><input name="DefaultPictrue" type="text" id="DefaultPictrue" onChange="PictruePreview.src=(this.value.trim()=='' || this.value.trim().toLowerCase=='http://')?'../images/nopic.gif':( (this.value.indexOf('http://')==0 || this.value.indexOf('/')==0)?this.value:'<%=EL_Channel.FilePath%>'+this.value);" value="<%=rsModify("DefaultPictrue")%>" size="50">
<select name='PictrueList' id='PictrueList' onChange="DefaultPictrue.value=this.value;PictruePreview.src=((this.value == '')?'../images/nopic.gif':'<%=EL_Channel.FilePath%>'+this.value);">
<option selected>----------------</option>
<%
Dim TempArrPictrue, k
TempArrPictrue = Split(rsModify("Uploadfiles"), "|")
For k = 0 To UBound(TempArrPictrue)
If EL_Common.CheckIsPictrue(TempArrPictrue(k)) = True Then
If TempArrPictrue(k) = rsModify("DefaultPictrue") Then
Response.Write "<option value='"& TempArrPictrue(k) &"' selected>"& TempArrPictrue(k) &"</option>"
Else
Response.Write "<option value='"& TempArrPictrue(k) &"'>"& TempArrPictrue(k) &"</option>"
End If
End If
Next
%>
</select>
<input name="Uploadfiles" type="hidden" id="Uploadfiles" value="<%=rsModify("Uploadfiles")%>"> </td>
</tr>
<tr>
<td class="td_ItemName"><strong>属性设置</strong></td>
<td width="20%" class="td_25"><input name="OnTop" type="checkbox" class="nomargin" id="OnTop" value="<%=EL_True%>" <%=EL_Common.SetObjectChecked("True", rsModify("OnTop"))%>>
固顶
<input name="Commended" type="checkbox" class="nomargin" id="Commended" value="<%=EL_True%>" <%=EL_Common.SetObjectChecked("True", rsModify("Commended"))%>>
推荐</td>
<td width="9%" class="td_ItemName"><strong>初始点击数</strong></td>
<td width="54%" class="td_25"><input name="Hits" type="text" id="Hits" value="<%=rsModify("Hits")%>" size="5"></td>
</tr>
<tr>
<td class="td_ItemName"><strong>配色风格</strong></td>
<td colspan="3" class="td_25"><select name="SkinID" id="SkinID">
<option value="0">使用系统默认</option>
<%=EL_Common.SkinList(rsModify("SkinID"))%>
</select></td>
</tr>
<tr>
<td class="td_ItemName"><strong>页面模板</strong></td>
<td colspan="3" class="td_25"><select name="TemplateID" id="TemplateID">
<option value="0">使用系统默认</option>
<%=EL_Common.TemplateList(EL_Channel.ChannelID, 3, rsModify("TemplateID"))%>
</select></td>
</tr>
<tr>
<td class="td_ItemName"><strong>更新日期</strong></td>
<td colspan="3" class="td_25"><input name="UpdateTime" type="text" id="UpdateTime" value="<%=rsModify("UpdateTime")%>">
<span class="BlueText"><= 【<span class="GreenText" onClick="getObject('UpdateTime').innerText=NowTime()" style="cursor:hand; ">现在时间</span>】</span></td>
</tr>
<tr>
<td class="td_ItemName"><strong>是否立即发布</strong></td>
<td colspan="3" class="td_25"><div style="float:left;">
<input name="Passed" type="radio" class="nomargin" value="<%=EL_True%>" <%=EL_Common.SetObjectChecked("True", rsModify("Passed"))%>>
是
<input name="Passed" type="radio" class="nomargin" value="<%=EL_False%>" <%=EL_Common.SetObjectChecked("False", rsModify("Passed"))%>>
否 </div> </td>
</tr>
<%=EL_Common.ShowDefinedField(EL_Channel.ChannelID, EL_Channel.ChannelModule, SightID, 3)%>
<tr>
<td class="td_ItemName"> </td>
<td colspan="3" class="td_50"><input type="submit" name="Submit" value="保存修改">
<input type="button" name="Submit2" value="返回上页" onClick="history.back()">
<input name="Action" type="hidden" id="Action" value="SaveModify">
<input name="ChannelID" type="hidden" id="ChannelID" value="<%=EL_Channel.ChannelID%>">
<input name="SightID" type="hidden" id="SightID" value="<%=SightID%>"></td>
</tr>
</table>
</form>
<%
Set rsModify = Nothing
Set ModifyCmd = Nothing
EL_Common.ShowScriptError()
End Sub
Sub ManageSight()
On Error Resume Next
Dim ManageCmd, rsManage, StrFields, StrCondition, TempString
Dim PageCounts, RowCount, TotalRowCount
TempString = ""
StrFields = "EL_Sight.SightID,EL_Sight.Province,EL_Sight.City,EL_Sight.Area,EL_Sight.SightName,EL_Sight.MarketPrice,EL_Sight.BookPrice,"
StrFields = StrFields &"EL_Sight.Hits,EL_Sight.OnTop,EL_Sight.Commended,"
StrFields = StrFields &"EL_Sight.Passed,EL_Sight.BookCount,EL_Sight.UpdateTime,EL_Sight.Inputer"
StrCondition = "EL_Sight.ChannelID="& EL_Channel.ChannelID &" "
If Province <> "" Then StrCondition = StrCondition &"And EL_Sight.Province='"& Province &"' "
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -