edit.asp
资源名称:shop2.rar [点击查看]
上传用户:btntkt
上传日期:2021-04-16
资源大小:5296k
文件大小:5k
源码类别:
WEB源码(ASP,PHP,...)
开发平台:
DOS
- <!--#include file="conn.asp"-->
- <%if session("admin")="" then
- response.Write "<script language='javascript'>alert('网络超时或您还没有登陆!');window.location.href='login.asp';</script>"
- response.End
- else
- end if
- %>
- <%
- NewsID=request("id")
- if NewsID<>"" then
- if not isnumeric(NewsID) then
- response.write"<script>alert(""非法访问!"");location.href=""../index.asp"";</script>"
- response.end
- end if
- end if
- if NewsID="" then
- %>
- <script language=javascript>
- history.back()
- alert("请输入您要修改的文章ID!")
- </script>
- <%
- Response.End
- end if
- set rs=server.CreateObject ("ADODB.RecordSet")
- rs.Source="select * FROM kind where anclassid=" & NewsID
- rs.Open rs.source,conn,1,1
- if rs.recordcount=0 then
- %>
- <script language=javascript>
- history.back()
- alert("非法文章ID,请确认NewsID不超出当前范围!")
- </script>
- <%
- Response.End
- end if
- %>
- <html>
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
- <link href="../images/css.css" rel="stylesheet" type="text/css">
- <script language="javascript">
- <!--
- function checkdata()
- {
- if (document.form1.title.value=="")
- {
- alert("对不起,请输入文章标题!")
- document.form1.title.focus()
- return false
- }
- if (document.form1.viewhtml.checked == true)
- {
- alert("对不起,请取消“查看HTML源代码”后再添加!")
- document.form1.viewhtml.focus()
- return false
- }
- if (document.form1.Content.value.length==0)
- {
- alert("对不起,请输入文章内容!")
- //document.form1.content.focus()
- return false
- }
- }
- function MM_goToURL() { //v3.0
- var i, args=MM_goToURL.arguments; document.MM_returnValue = false;
- for (i=0; i<(args.length-1); i+=2) eval(args[i]+".location='"+args[i+1]+"'");
- }
- function MM_openBrWindow(theURL,winName,features) { //v2.0
- window.open(theURL,winName,features);
- }
- //-->
- </script>
- <script language="JavaScript">
- <!-- Hide from older browsers...
- //Function to format text in the text box
- function FormatText(command, option){
- frames.message.document.execCommand(command, true, option);
- frames.message.focus();
- }
- //Function to add image
- function AddImage(){
- imagePath = prompt('请输入图片地址', 'http://');
- if ((imagePath != null) && (imagePath != "")){
- frames.message.document.execCommand('InsertImage', false, imagePath);
- frames.message.focus();
- }
- frames.message.focus();
- }
- //Function to clear form
- function ResetForm(){
- if (window.confirm('确认要清空对话框内容?')){
- frames.message.document.body.innerHTML = '';
- return true;
- }
- return false;
- }
- //Function to open pop up window
- function openWin(theURL,winName,features) {
- window.open(theURL,winName,features);
- }
- function setMode(newMode)
- {
- bTextMode = newMode;
- var cont;
- if (bTextMode) {
- cleanHtml();
- cleanHtml();
- cont=message.document.body.innerHTML;
- message.document.body.innerText=cont;
- } else {
- cont=message.document.body.innerText;
- message.document.body.innerHTML=cont;
- }
- message.focus();
- }
- function cleanHtml()
- {
- var fonts = message.document.body.all.tags("FONT");
- var curr;
- for (var i = fonts.length - 1; i >= 0; i--) {
- curr = fonts[i];
- if (curr.style.backgroundColor == "#ffffff") curr.outerHTML = curr.innerHTML;
- }
- }
- // -->
- </script>
- <script language="JavaScript">
- function help()
- {
- var helpmess;
- helpmess="---------------填写帮助---------------rnrn"+
- "1.请不要发表有危险性的脚本。rnrn"+
- "2.如果要书写源代码,请选中rnrn"+
- " 查看HTML源代码书写.rnrn"+
- "3.需要你自己运行,才能看效果.rnrn"+
- "4.如果书写js,尽量不要在这儿书写.rnrn";
- alert(helpmess);
- }
- </script>
- <script src="edit.js" type="text/javascript"></script>
- </head>
- <body>
- <form name="form1" method="post" action="edit_ok.asp" OnSubmit="return checkdata()" onReset="return ResetForm();">
- <table class="tableBorder" width="90%" border="0" align="center" cellpadding="3" cellspacing="1" bgcolor="#FFFFFF">
- <tr>
- <td colspan="4" align="center" background="../images/admin_bg_1.gif"><b><font color="#ffffff"><%=rs("anclass")%>--版块内容</font></b></td>
- </tr>
- <tr>
- <td align="right" valign="top" class="TableBody1"><%=rs("anclass")%>--版块内容:</td>
- <td class="forumRowHighlight" style="PADDING-LEFT: 10px"><textarea name="Contentt" style="display:none"><%=Server.HTMLEncode(rs("content"))%></textarea>
- <iframe ID="content" src="editubb/ewebeditor.asp?id=Contentt&style=standard" frameborder="0" scrolling="no" width="550" HEIGHT="350"></iframe>
- </td>
- </tr>
- <tr >
- <td height="30" class="TableBody"></td>
- <td class="TableBody2" bgcolor="<%=m_top%>"> <input type="submit" value=" 修 改 " name="Submit" class="unnamed5" OnClick="document.form1.Content.value = frames.message.document.body.innerHTML;">
- <input type="reset" value=" 清 除 " name="Reset" class="unnamed5">
- <input type="button" value=" 返 回 " onClick="javascript:history.go(-1)" class="unnamed5">
- <input type="hidden" name="Content" value=""> <input type="hidden" name="linkaddress" value="<%=request.servervariables("http_referer")%>">
- <input type="hidden" name="newsid" value="<%=NewsID%>"> </td>
- </tr>
- </table>
- </form>
- <!--#include file="foot.asp"-->
- </body>
- </html>
English
