📄 editad_news.asp
字号:
<table width="166" border="0" cellspacing="0" cellpadding="0" height="5">
<tr>
<td></td>
</tr>
</table>
<font style="font-size:14px" color="<%if rs("color")<>"" then%><%=rs("color")%><%else%>#000000<%end if%>"><b>原来的标题和背景颜色</b></font></td>
</tr>
</table>
<table width="166" border="0" cellspacing="0" cellpadding="0" height="2">
<tr>
<td></td>
</tr>
</table>
<table width="182" height="24" border="0" cellpadding="0" cellspacing="1" bgcolor="#CAE2F8">
<tr>
<td align="center" <%if rs("bgcolor1")<>"" then%>bgcolor="<%=rs("bgcolor1")%>"<%else%>bgcolor="#EFF7FE"<%end if%>>
<div id="colorBox1" style="width: 180px;height: 24px">
<table width="166" border="0" cellspacing="0" cellpadding="0" height="5">
<tr>
<td></td>
</tr>
</table>
<font style="font-size:14px" color="<%if rs("color")<>"" then%><%=rs("color")%><%else%>#000000<%end if%>">
<div id="colorBox"><b>修改后标题和背景颜色</b></div>
</font> </div>
</td>
</tr>
</table>
</div>
</td>
</tr>
<tr bgcolor="#FFFFFF">
<td align="right">标题背景:</td>
<td height="26">
<input name="dbgcolor1" type="text" id="dbgcolor1" onchange="changeColor1(this);" value="<%=rs("bgcolor1")%>" size="8" />
<input type="button" name="Submit" value="选择颜色" onclick="window.open('../colorpicker1.html', 'colorPicker', 'width=200, height=160');" />
</td>
</tr>
<tr bgcolor="#FFFFFF">
<td height="26" align="right">选择城市:</td>
<td height="26" colspan="2">
<%
set rsi=conn.execute("select * from china_city where id>0 and twoid>0 and threeid=0")
%>
<script language = "JavaScript">
var onecount;
onecount=0;
subcat = new Array();
<%
dim count:count = 0
do while not rsi.eof
%>
subcat[<%=count%>] = new Array("<%=rsi("city")%>","<%=rsi("id")%>","<%=rsi("twoid")%>");
<%
count = count + 1
rsi.movenext
loop
rsi.close
set rsi=nothing
%>
onecount=<%=count%>;
</script>
<%
set rsi=conn.execute("select * from china_city where id>0 and twoid>0 and threeid>0")
%>
<script language = "JavaScript">
var onecount4;
onecount4=0;
subcat4 = new Array();
<%
dim count4:count4 = 0
do while not rsi.eof
%>
subcat4[<%=count4%>] = new Array("<%=rsi("city")%>","<%=rsi("id")%>","<%=rsi("twoid")%>","<%=rsi("threeid")%>");
<%
count4 = count4 + 1
rsi.movenext
loop
rsi.close
set rsi = nothing
%>
onecount4=<%=count4%>;
function changelocation(locationid)
{
document.postart.city_two.length = 0;
document.postart.city_two.options[0] = new Option('选择城市','');
document.postart.city_three.length = 0;
document.postart.city_three.options[0] = new Option('选择城市','');
var locationid=locationid;
var i;
for (i=0;i < onecount; i++)
{
if (subcat[i][1] == locationid)
{
document.postart.city_two.options[document.postart.city_two.length] = new Option(subcat[i][0], subcat[i][2]);
}
}
}
function changelocation4(locationid,locationid1)
{
document.postart.city_three.length = 0;
document.postart.city_three.options[0] = new Option('选择城市','');
var locationid=locationid;
var locationid1=locationid1;
var i;
for (i=0;i < onecount4; i++)
{
if (subcat4[i][2] == locationid)
{
if (subcat4[i][1] == locationid1)
{
document.postart.city_three.options[document.postart.city_three.length] = new Option(subcat4[i][0], subcat4[i][3]);
}
}
}
}
</script>
<select name="city_one" size="1" id="select2" onChange="changelocation(document.postart.city_one.options[document.postart.city_one.selectedIndex].value)">
<option value="" selected>选择城市</option>
<% set rsi=conn.execute("select * from china_city where id>0 and twoid=0 and threeid=0")
if rsi.eof or rsi.bof then
response.write "<option value=''>没有分类</option>"
else
do until rsi.eof%>
<option value="<%=rsi("id")%>" <%if rsi("id")=rs("city_oneid") then%>selected<%end if%>><%=rsi("city")%></option>
<%rsi.movenext
loop
%>
<%end if
rsi.close
set rsi = nothing
%>
</select>
<select name="city_two" id="city_two" onChange="changelocation4(document.postart.city_two.options[document.postart.city_two.selectedIndex].value,document.postart.city_one.options[document.postart.city_one.selectedIndex].value)">
<option value="" selected>选择城市</option>
<%
set rsi=conn.execute("select * from china_city where id="&rs("city_oneid")&" and twoid>0 and threeid=0")
if rsi.eof and rsi.bof then
response.write "<option value=''>没有分类</option>"
else
do until rsi.eof%>
<option value="<%=rsi("twoid")%>" <%if rsi("twoid")=rs("city_twoid") then%>selected<%end if%>><%=rsi("city")%></option>
<%rsi.movenext
loop
%>
<%end if
rsi.close
set rsi = nothing
%>
</select>
<select name="city_three" id="city_three">
<option value="" selected>选择城市</option>
<%
set rsi=conn.execute("select * from china_city where id="&rs("city_oneid")&" and twoid="&rs("city_twoid")&" and threeid<>0")
if rsi.eof and rsi.bof then
response.write "<option value=''>没有分类</option>"
else
do until rsi.eof%>
<option value="<%=rsi("threeid")%>" <%if rsi("threeid")=rs("city_threeid") then%>selected<%end if%>><%=rsi("city")%></option>
<% rsi.movenext
loop
%>
<%end if
rsi.close
set rsi = nothing
%>
</select>
<font color="#FF0000">*</font> </td>
</tr>
<tr bgcolor="#FFFFFF">
<td height="26" align="right">新闻类别:</td>
<td height="26" colspan="2">
<select name="dlei" size="1">
<%set rs_lei = server.createobject("adodb.recordset")
sql = "select * from news_type"
rs_lei.open sql,conn,1,1
do while not rs_lei.eof%>
<option value="<%=rs_lei("name")%>" <%if rs_lei("name")=rs("type") then%>selected<%end if%>><%=rs_lei("name")%></option>
<%rs_lei.movenext
loop
rs_lei.close
set rs_lei = nothing%>
</select>
</td>
</tr>
<tr bgcolor="#FFFFFF">
<td height="26" align="right">图片路径:</td>
<td height="26" colspan="2">
<script language="Javascript">
function openScript(url, width, height){
var Win = window.open(url,"openScript",'width=' + width + ',height=' + height + ',resizable=1,scrollbars=no,menubar=no,frameborder=0,status=yes' );
}
function openem()
{
openScript('../upad.htm',400,100);
}
</script>
<input type="text" name="dpic" size="30" value="<%=rs("pic")%>">
<iframe style="top:2px" ID="UploadFiles" src="../upload_Photo.asp?PhotoUrlID=0" frameborder=0 scrolling=no width="320" height="25"></iframe><br>
<%if pic<>"" then%>
<a href="<%if lcase(left(rs("pic"),7))<>"http://" then%>../adpic/<%end if%><%=rs("pic")%>" target="_blank"><img src="<%if lcase(left(rs("pic"),7))<>"http://" then%>../adpic/<%end if%><%=rs("pic")%>" border="0" width="180" height="123"></a>
<%else%>
暂无图片
<%end if%>
</td>
</tr>
<tr bgcolor="#FFFFFF">
<td height="26" align="right" valign="top">新闻内容:</td>
<td colspan="2">
<textarea rows="14" name="dtext" cols="60" onKeyDown="checkMaxInput(this.form)" onKeyUp="checkMaxInput(this.form)"><%if rs("text")<>"" then%><%=replace(rs("text"),"<br>",vbcrlf)%><%end if%>
</textarea>
<font color="#FF0000">* </font> <font color="#FF0000"><br>
目前还可写
<input readonly type=text name=remLen size=4 maxlength=4 style="border: 1 solid #888888">
个字!</font> </td>
</tr>
<tr bgcolor="#FFFFFF">
<td height="26" align="right">生效日期:</td>
<td height="26" colspan="2">
<input name="time" size="15" maxlength="50" value="<%=rs("time")%>">
<font color="#FF0000">(格式如:2004-10-1)</font></td>
</tr>
<tr bgcolor="#FFFFFF">
<td height="26" align="right">有效期至:</td>
<td height="26" colspan="2">
<input name="dstop" size="15" maxlength="50" value="<%=rs("stop")%>">
<font color="#FF0000">(格式如:2004-10-1)</font></td>
</tr>
<tr bgcolor="#FFFFFF">
<td height="26" align="right">是否固顶:</td>
<td height="26" colspan="2">
<input type="radio" value="0" name="dtop" <%if rs("top")="0" then%>checked<%end if%>>
否
<input type="radio" value="1" name="dtop" <%if rs("top")="1" then%>checked<%end if%>>
是</td>
</tr>
<tr bgcolor="#FFFFFF">
<td height="30" align="right"> </td>
<td height="30" colspan="2" align="right">
<p align="left">
<input type="submit" value="修改" name="submit">
<input type="reset" value="取消" name="reset">
<input type="button" value="返回" name="back" onclick="javascript:history.back()">
</td>
</tr>
</table>
</form>
<br> </td>
</tr>
</table>
</div>
<br>
</body>
</html>
<%rs.close
set rs=nothing
conn.close
set conn=nothing%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -