| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 778 人关注过本帖
标题:想把ewebeditor换成新浪编辑器
只看楼主 加入收藏
jiazehua
Rank: 1
来 自:大连
等 级:新手上路
帖 子:77
专家分:0
注 册:2010-8-15
结帖率:58.82%
收藏
已结贴  问题点数:20 回复次数:3 
想把ewebeditor换成新浪编辑器
新浪编辑器调用方法:
<input type="hidden" name="content" id="c内容表单项id">
<iframe src="Edit/editor.htm?id=内容表单项id&ReadCookie=0" frameBorder="0" marginHeight="0" marginWidth="0" scrolling="No" width="700" height="460"></iframe>

所以我得删除掉eweb编辑器
可是却找不到他在哪……唯一用到它的编辑页面代码如下,请问在哪能删掉原编辑器
<!--#include File="../include/Class_Startup.asp" -->
<!--#include File="../include/CheckLogin.asp" -->
<!--#include File="../include/MD5.asp" -->
<!--#include File="../include/function.asp" -->
<!--#include file="config.asp"-->
<%
Response.Buffer = True
Response.ExpiresAbsolute = Now() - 1
Response.Expires = 0
Response.CacheControl = "no-cache"
Response.AddHeader "Pragma", "No-Cache"

Dim BackPath,Title,Field(10,7)
Dim i
Title="资讯管理"
FieldNum=10 '设置显示字段个数

i = 0

Field(i,1)="资讯类别"
Field(i,2)="CategoryID"
Field(i,3)="int"
Field(i,4)="select"

i = i + 1

Field(i,1)="标题"
Field(i,2)="Title"
Field(i,3)="char"
Field(i,4)="text"
Field(i,5)="150"

i = i + 1

Field(i,1)="关键词"
Field(i,2)="Keywords"
Field(i,3)="char"
Field(i,4)="text"
Field(i,7)="300"

i = i + 1

Field(i,1)="描述"
Field(i,2)="Description"
Field(i,3)="char"
Field(i,4)="textarea"

i = i + 1

Field(i,1)="作者"
Field(i,2)="Author"
Field(i,3)="char"
Field(i,4)="text"
Field(i,7)="150"

i = i + 1

Field(i,1)="来源"
Field(i,2)="Source"
Field(i,3)="char"
Field(i,4)="text"
Field(i,7)="150"

i = i + 1

Field(i,1)="详细内容"
Field(i,2)="Content"
Field(i,3)="mem"
Field(i,4)="textarea"

i = i + 1

Field(i,1)="点击次数"
Field(i,2)="Hits"
Field(i,3)="int"
Field(i,4)="text"
Field(i,7)="80"

i = i + 1

Field(i,1)="是否推荐"
Field(i,2)="Is_Rec"
Field(i,3)="bit"
Field(i,4)="radio"

i = i + 1

Field(i,1)="是否显示"
Field(i,2)="Is_Show"
Field(i,3)="bit"
Field(i,4)="radio"

'''''''''''''''
'======================================
'检查是否登录,或登录超时
'注意:一定要包含CheckLogin.asp组件
'======================================
Dim oLogin
Set oLogin = New Ixinde_CheckLogin
If Not oLogin.CheckLogin Then
    Set oLogin = Nothing
    Response.Write("<script>alert('登录已超时,请重新登录系统。');window.parent.location.href='../Login.asp';</script>")
    Response.End()
End If
Set oLogin = Nothing
'======================================

'======================================
'检查地址的有效性
'======================================
If Not SQLFormater() Then
    Response.Write("<script>alert('无效地址.');</script>")
    Response.End()
End If
'======================================

act = Request("act")
nID = Request.QueryString("ID")
nCatID = Request.QueryString("CatID")
nParentID = Request.QueryString("ParentID")

If Not IsNumeric(nID) Then
    nID = 0
End If

if nCatID="" or Isnull(nCatID) then
    nCatID=0
end If

if nParentID="" or Isnull(nParentID) then
    nParentID=0
end If

If act = "" Then
    act = "2"
End If

DBConnBegin(connstr)

If Request.ServerVariables("REQUEST_METHOD") = "POST" Then
    act = Request.Form("act")
    nID = Request.Form("txtID")   
    nCatID = Request.Form("txtCatID")
    nParentID = Request.Form("txtParentID")

    If Not IsNumeric(nID) Then nID = 0
    If Not IsNumeric(nCatID) Then nCatID = 0
    If Not IsNumeric(nParentID) Then nParentID = 0

'================================ 初化变量 form
    mmI=0
    do while mmI<FieldNum
   
        If Field(mmI,3)="char" or Field(mmI,3)="charonly" then
            if Field(mmI,5)="" then
            Field(mmI,0)=Request.form(Field(mmI,2))
            else
            Field(mmI,0)=left(Request.form(Field(mmI,2)),cint(Field(mmI,5)))
            end if
        ElseIf Field(mmI,3)="date" or Field(mmI,3)="password" or Field(mmI,3)="int" Then
            Field(mmI,0)=Request.form(Field(mmI,2))
            If Field(mmI,3)="int" and isNumeric(Field(mmI,0))=false Then
                Field(mmI,0)=0
            End If        
        ElseIf Field(mmI,3)="mem" Then
            Field(mmI,0)=Request.form(Field(mmI,2))
        End If

        if Field(mmI,3)="bit" then
            if Request.form(Field(mmI,2))="1" then Field(mmI,0)="1" end if
            if Request.form(Field(mmI,2))="0" then Field(mmI,0)="0" end if
            if Request.form(Field(mmI,2))="" then Field(mmI,0)="0" end if
        end if   
    mmI=mmI+1
    loop
'===============================

'=============================== 更新数据库记录
    sSql_Fields=""
    sSql_values=""
   
    set oRs=server.createobject("adodb.recordset")
    sSQL = "Select * From "&tableName1&" Where ID=" & nID
    oRs.open sSQL,conn,2,3
   
    If nID = 0 Then
       oRs.AddNew()  '如果nid为0,为添加操作
    Else
       strDateAndtime=oRs("Dateandtime")    '时间为文件保存文件夹位置
    End if

        mmI=0   
        do while mmI<FieldNum
            oRs(Field(mmI,2))=Field(mmI,0)
            mmI=mmI+1
        loop
        
    oRs.Update()
    oRs.Close()
   
    If catID=0 then
        catID=Field(0,0)
    End If
   
'-------------------------------------------以下为生成静态程序 By Fanter---------------------------
    If nID=0 Then
       set oRs=server.CreateObject("adodb.recordset")
       strSQL="select top 1 ID,Dateandtime from " & tableName1 & " order by ID desc"
       oRs.open strSQL,conn,1,1
       nID=oRs(0)
       strDateAndtime=oRs(1)
       oRs.close
    End if

    Dim strRedirect,strSourceUrl,strFolder,strTemplate

    strRedirectLast=Year(strDateAndtime) & "-" & Right("0" & Month(strDateAndtime),2)
            strRedirect=strFolder & "/" &  strRedirectLast        'strFolder为生成静态的文件保存的文件夹
            strSourceUrl="/" & strTemplate & "?ID=" & nID         '要生成的目标文件(即模板)strTemplate为模板文件
            strFileName=strFileName
            strFileName=nID & ".html"
            Write2file strRedirect,strSourceUrl,strFileName   '写入到文件
            strSQL1="update "&tableName1&" set FileName='" & strRedirectLast & "/" & strFileName & "' where ID=" & nID
            conn.execute(strSQL1)                                      '把文件名写入数据库
'-------------------------------------------------------------静态生成完成------------------------------------------------------        
    Response.Write("<script>alert('操作成功.');location.href='"&BackPath&"?CatID="&nCatID&"&ParentID="&nParentID&"';</script>")

   
'=================================
End If
'================================= 初化变量 null,   
If nID = 0 Then
    mmI=0
    do while mmI<FieldNum
        if Field(mmI,3)="bit" then
            Field(mmI,0)=False
        else
            Field(mmI,0)=""
        end if
    mmI=mmI+1
    loop
'==================================
Else
    'Dim sqlTemp
    'sqlTemp = ""
    'mmI=0
    'do while mmI<FieldNum
        'sqlTemp = sqlTemp & Field(mmI,2) & ","
        'mmI = mmI + 1
    'Loop
    'sqlTemp = left(sqlTemp, len(sqlTemp)-1)
    'sSQL = "Select "& sqlTemp &" From "&tableName1&" Where ID=" & nID
    sSQL = "Select * From "&tableName1&" Where ID=" & nID
    Set rs = conn.Execute(sSQL)
    If (rs.EOF And rs.BOF) Then
        Response.Write("<script>alert('没有找到指定记录,可能已经被删除。');history.back();</script>")
        Response.End()
    End If
'================================= 初化变量 recordset,   
    mmI=0
    do while mmI<FieldNum
        Field(mmI,0)=rs(Field(mmI,2))
    mmI=mmI+1
    loop
'================================
End If
%>
<html>
<head>
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title><%=Title%></title>
<link href="../css/style.css" rel="stylesheet" type="text/css">
<script language="javascript" src="../js/calendar.js"></script>
<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()
{            
    return true;
}
-->
</script>
</head>

<body leftmargin="0" topmargin="0" rightmargin="0" bottommargin="0" scroll="yes">
    <table cellSpacing="0" cellPadding="0" width="100%" 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="26"><IMG height="16" hspace="0" src="../images/xp38.gif" width="16" align="absMiddle"><span> <font color=#cc0000><b><%=title%></b></font></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='edit.asp?act=0&ID=0&CatID=<%=ncatID%>&ParentID=<%=nParentID%>';" 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">添加&nbsp;</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">删除&nbsp;</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>
        <tr>
            <td height="20">
            </td>
        </tr>
        <form action="edit.asp" method="POST" name="form1" 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="txtParentID" value="<%=nParentID%>">
        <tr>
            <td>
                <table width="99%" border="0" align="center" cellpadding="2" cellspacing="1" bgcolor="#C0C0C0">
                    <%
                    mmI=0
                    do while mmI<FieldNum
                    %>
                    <tr bgcolor="#FFFFFF">
                        <td id="td1<%=mmI%>" align="right" bgcolor="#E0E0E0" onMouseOver="javaScript:document.all.td1<%=mmI%>.bgColor='#E0EfEf';document.all.td2<%=mmI%>.bgColor='#E0EfEf';" onMouseOut="javascript:document.all.td1<%=mmI%>.bgColor='#E0E0E0';document.all.td2<%=mmI%>.bgColor='#ffffff';"><%=Field(mmI,1)%>:</td>
                      <td id="td2<%=mmI%>" bgcolor="#FFFFFF" onMouseOver="javaScript:document.all.td1<%=mmI%>.bgColor='#E0EfEf';document.all.td2<%=mmI%>.bgColor='#E0EfEf';" onMouseOut="javascript:document.all.td1<%=mmI%>.bgColor='#E0E0E0';document.all.td2<%=mmI%>.bgColor='#ffffff';"><%call listField(mmI)%>
                        </td>
                    </tr>
                    <%
                    mmI=mmI+1
                    loop
                    %>
                    <tr bgcolor="#FFFFFF">
                        <td width="15%" height="35" align="right" bgcolor="#E0E0E0">&nbsp;</td>
                      <td><input type="submit" name="btnOK" <%If nID<>0 Then%>value=" 修改 "<%Else%>value=" 添加 "<%End If%> class="button3">
                            &nbsp;
                      <input type="button" name="btnCancel" value=" 取消 " class="button3" onClick="javascript:location.href='<%=BackPath%>?CatID=<%=nCatID%>&ParentID=<%=nParentID%>'">                      </td>
                    </tr>
              </table>
            </td>
        </tr>
        </form>
        <tr>
            <td></td>
        </tr>
    </table>
    <br>
</body>
</html>
<%
Call DBConnEnd()
%>
 


 
搜索更多相关主题的帖子: 新浪 编辑器 ewebeditor 
2010-11-25 11:52
dzt0001
Rank: 13Rank: 13Rank: 13Rank: 13
等 级:蒙面侠
威 望:5
帖 子:1281
专家分:4998
注 册:2005-10-12
收藏
得分:20 
你的“内容表单项”的ID是什么?我找不着。

----我怎能在别人的苦难面前转过脸去----
2010-11-25 13:53
jiazehua
Rank: 1
来 自:大连
等 级:新手上路
帖 子:77
专家分:0
注 册:2010-8-15
收藏
得分:0 
回复 楼主 jiazehua
我也找不着……

巫术时代-个人博客-[url]www.[/url]
2010-11-25 14:40
jiazehua
Rank: 1
来 自:大连
等 级:新手上路
帖 子:77
专家分:0
注 册:2010-8-15
收藏
得分:0 
原来在另一个文件里,解决了

巫术时代-个人博客-[url]www.[/url]
2010-12-07 14:10
快速回复:想把ewebeditor换成新浪编辑器
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.020869 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved