📄 data_edit_ad.asp
字号:
<!--#include file="conn.asp"-->
<!--#include file="data.asp"-->
<!--#include file="char.asp"-->
<!--#include file="header.inc"-->
<script language="JavaScript">
<!-- Hide from older browsers...
function CheckForm () {
frmAddMessage.Submit.disabled=true;
return true;
}
// -->
</script>
<script language="JavaScript" src="Script/Html_Edit.js" type="text/javascript"></script>
<script language="JavaScript" src="Script/IE_Message.JS" type="text/javascript"></script>
</head>
<%
dim strSubject,priority,ID,pinglunX,rID,jid
Dim TitleX_1,ContentsX_1,PingLun_1
if session("status")="login" then
If request.form("submit") <> "" Then
jid = Request.Form("jID")
set rs=conn.execute("select ID from newsdata where id="&jID&"")
if rs.bof and rs.bof then
errorstr="该主题不存在"
errorbox(errorstr)
End If
rs.close
set rs=nothing
PingLun_1 = Request.Form("priority")
ContentsX_1 = Request.Form("Message")
TitleX_1 = Request.Form("Subject")
If ContentsX_1="" OR PingLun_1="" OR TitleX_1="" Then
errorstr="标题 或者 内容为空是系统所不能允许的"
errorbox(errorstr)
End If
PingLun_1 = CLng(PingLun_1)
ContentsX_1 = checkHTML(ContentsX_1)
TitleX_1 = checkStr(TitleX_1)
TitleX_1 = HTMLEncode(TitleX_1)
ContentsX_1 = checkStr(ContentsX_1)
ContentsX_1 = ContentsX_1 & "<br><I><B>最后修改时间"&Now()&"</B></I>"
conn.execute("update newsdata set TitleX='"&TitleX_1&"',ContentsX='"&ContentsX_1&"',PingLun='"&PingLun_1&"' where id="&jid&"")
Successstr="您所修改的内容已经成功存储入"
Successbox(Successstr)
Else
id=request("id")
set rs=conn.execute("select ID,TitleX,PingLun from newsdata where id="&id&"")
if not rs.bof and not rs.eof then
rID=rs("ID")
strSubject=rs("TitleX")
priority=rs("PingLun")
ELse
errorstr="该主题不存在"
errorbox(errorstr)
End If
rs.close
set rs=nothing
if priority = 1 Then
pinglunX="<select name=""priority""><option value=""1"" selected>开启评论</option><option value=""0"">关闭评论</option></select>"
Else
pinglunX="<select name=""priority""><option value=""1"">开启评论</option><option value=""0"" selected>关闭评论</option></select>"
End If
%>
<form method="post" name="frmAddMessage" action="data_edit_ad.asp" onReset="return ResetForm();">
<table width="570" border="0" cellspacing="0" cellpadding="0" height="230" align="center">
<tr><td>
<table width="100%" border="0" cellspacing="0" cellpadding="0" align="center" bgcolor="#EFEFEF" background="" height="201">
<tr><td>
<table width="100%" border="0" align="center" height="233" cellpadding="2" cellspacing="0">
<tr><th colspan="2" height="25" align="left">*代表必须填写</th></tr>
<tr><td height="25" align="right" Class="TableTitle2">主题*:</td><td width="70%" Class="TableTitle2">
<input type="text" name="subject" maxlength="100" value="<%=strSubject%>" size="50">
<INPUT TYPE="hidden" name="jid" value="<%=rID%>">
</td></tr>
<tr><td height="25" align="right">
<span class="text">状态*:</td><td width="70%">
<%=pinglunX%></span></td></tr>
<tr><td valign="bottom" align="right" width="15%"> </td>
<td width="70%" valign="bottom">
<table width="100%" border="0" cellspacing="0" cellpadding="0"><tr><td>
<table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td>
<select name="selectFont" onChange="FormatText('fontname', selectFont.options[selectFont.selectedIndex].value);document.frmAddMessage.selectFont.options[0].selected = true;" >
<option selected>-- 字体 --</option>
<option value="Arial, Helvetica, sans-serif">Arial</option>
<option value="Courier New, Courier, mono">Courier New</option>
<option value="Times New Roman, Times, serif">Times New Roman</option>
<option value="Verdana, Arial, Helvetica, sans-serif">Verdana</option>
</select>
<select name="selectSize" onChange="FormatText('fontsize', selectSize.options[selectSize.selectedIndex].value);document.frmAddMessage.selectSize.options[0].selected = true;" >
<option selected>-- 大小 --</option>
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
<option value="5">5</option>
<option value="6">6</option>
</select>
<select name="selectColour" onChange="FormatText('ForeColor', selectColour.options[selectColour.selectedIndex].value);document.frmAddMessage.selectColour.options[0].selected = true;" >
<option value="0" selected>-- 颜色 --</option>
<option value="black">黑色</option>
<option value="white">白色</option>
<option value="blue">蓝色</option>
<option value="red">红色</option>
<option value="green">绿色</option>
<option value="yellow">黄色</option>
<option value="orange">橘色</option>
<option value="brown">褐色</option>
<option value="magenta">粉色</option>
<option value="cyan">浅蓝色</option>
<option value="limegreen">嫩草绿</option>
</select></td></tr>
<tr><td>
<img src="Edit/post_button_cut.gif" align="absmiddle" onClick="FormatText('cut')" style="cursor: hand;" alt="剪切">
<img src="Edit/post_button_copy.gif" align="absmiddle" onClick="FormatText('copy')" style="cursor: hand;" alt="复制">
<img src="Edit/post_button_paste.gif" align="absmiddle" onClick="FormatText('paste')" style="cursor: hand;" alt="粘贴">
<img src="Edit/post_button_bold.gif" align="absmiddle" alt="粗体" onClick="FormatText('bold', '')" style="cursor: hand;">
<img src="Edit/post_button_italic.gif" align="absmiddle" alt="斜体" onClick="FormatText('italic', '')" style="cursor: hand;">
<img src="Edit/post_button_underline.gif" align="absmiddle" alt="底线" onClick="FormatText('underline', '')" style="cursor: hand;">
<img src="Edit/post_button_left_just.gif" align="absmiddle" onClick="FormatText('JustifyLeft', '')" style="cursor: hand;" alt="置左">
<img src="Edit/post_button_centre.gif" align="absmiddle" border="0" alt="置中" onClick="FormatText('JustifyCenter', '')" style="cursor: hand;">
<img src="Edit/post_button_right_just.gif" align="absmiddle" onClick="FormatText('JustifyRight', '')" style="cursor: hand;" alt="置右">
<img src="Edit/post_button_list.gif" align="absmiddle" border="0" alt="序列" onClick="FormatText('InsertUnorderedList', '')" style="cursor: hand;">
<img src="Edit/post_button_outdent.gif" align="absmiddle" onClick="FormatText('Outdent', '')" style="cursor: hand;" alt="右对齐">
<img src="Edit/post_button_indent.gif" align="absmiddle" border="0" alt="左对齐" onClick="FormatText('indent', '')" style="cursor: hand;">
<img src="Edit/post_button_hyperlink.gif" align="absmiddle" border="0" alt="添加连接" onClick="FormatText('createLink')" style="cursor: hand;">
<img src="Edit/post_button_image.gif" align="absmiddle" border="0" alt="添加图片" onClick="pic()">
<img src="Edit/table.gif" LANGUAGE="javascript" align="absmiddle" border="0" alt="插入表格" onClick="InsertTable()" style="cursor: hand;">
<img src="Edit/help.gif" LANGUAGE="javascript" align="absmiddle" border="0" alt="查看帮助" onClick="help()" style="cursor: hand;">
</td></tr></table></td></tr></table></td></tr>
<tr>
<td valign="top" align="right" height="61" width="15%" class="text">内容*: </td>
<td height="61" width="70%" valign="top">
<script language="javascript">
//Create an iframe and turn on the design mode
document.write ('<iframe src="IE_textbox.asp?id=<%=ID%>" id="message" width="490" height="200"></iframe>')
frames.message.document.designMode = "On";
</script>
<!-- Display a message for IE users with JavaScript turned off -->
<noscript><span class="bold"><br /><br/>
</span>
</noscript></td>
</tr>
<td>
<input type="hidden" name="message" value="">
<input type="hidden" name="mode" value="editTopic" />
<input type="hidden" name="FID" value="9" />
<input type="hidden" name="TID" value="18" />
<input type="hidden" name="PID" value="54" />
<input type="hidden" name="TPN" value="1" />
<input type="hidden" name="browser" value="IE" />
<input type="hidden" name="sessionID" value="121911188" />
</td>
<td height="2" width="70%" align="left"><input type="submit" name="Submit" value="修改" OnClick="document.frmAddMessage.message.value = frames.message.document.body.innerHTML;" tabindex="30" />
<input type="reset" name="Reset" value="清空" /><BR></td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</form>
</div>
</body>
</html>
<!--#include file="footer.inc"-->
<%
End If
Else
response.redirect "login.asp"
end if
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -