can't deal wit it

  •  01-12-2005, 3:30 PM

    can't deal wit it

    Hi.
    It has been 3 days that i read the forum & try anything, but still:
    1- Can't see an existing values from my DB
    2- Can't insert anything.

    I install the cute editor in a sub folder from my root:   (root > zbres > cuteEditor ) .
    I build an upload dir in my root.

    My editor file(edit_article) is locate in:
    root > zbres > admin > edit_article.asp

    here is my code, what's wrong?

    <!-- #include virtual = "zbres/CuteEditor/include_CuteEditor.asp" -->
    <%
    Response.Buffer = True
     If Request.Cookies("admin") <> "Ok" Then
      Response.Redirect "entry.html"
     End If
     
     Set con = Server.CreateObject("ADODB.connection")
     con.Open "Provider=Microsoft.Jet.OleDB.4.0; data source=" & Server.MapPath("../mainDB/admin.mdb")
     Set rs = Server.CreateObject("ADODB.recordset")
     sSQL = "select * from articles where article_id=" & cInt(Request.QueryString("id")) & ";"
     rs.Open sSQL,con,3,3
    %>
    <HTML>
    <HEAD>
    <title>UPDATE</title>
    <meta http-equiv="content-type" content="text/html;charset=windows-1255">
    <meta name="author" content="ZZZ">
    </HEAD>

    <form action="" method="post" id="form1" name="form1" onsubmit="return formCheck()">
     <tr>
      <td align="right">
       <input type="text" id="aTitle" name="aTitle" size=77 dir="rtl" value="<%=rs("title")%>" tabindex=1>
      </td>
      <td dir="rtl"><b>TITLE</b></td>
     </tr>
     <tr>
      <td align=right>
    <%
       Dim editor
       Set editor = New CuteEditor  'Create a new editor class
     
        article = Request.Form("Editor1_HTMLContent") &"<FONT size=2 color=#2f4f4f>   Type here...   </FONT>"
       editor.ID = "Editor1" 'Set the ID of this editor class
       editor.Text = article 'Set the initial HTML value of editor control
       editor.FilesPath = "../CuteEditor/CuteEditor_Files"
       editor.ImageGalleryPath = "/Uploads"
       editor.MaxImageSize = 50
       editor.AutoConfigure = "enableall"
       editor.DisableItemList = "Save"
       editor.ShowLogo = false
       editor.Width = 440
       editor.Height = 200                                                                                                     
       
       editor.Draw()
     %>       
      </td>
      <td dir="rtl" valign="top"><b>CONTENT</b></td>
     </tr>
     <tr>
      <td colspan=2 align="center">
       <input type="submit" value="?????" id="editArticle" name="editArticle" tabindex=10 style="font-weight:bold;cursor:hand"  onfocus="save(Editor1)">
      </td>
     </tr>
    </form>
    <%
     If Request("editArticle") <> "" Then
        rs("title") = setData(Request("aTitle")) 
       rs("article") =   Request.Form("Editor1_HTMLContent") 
       rs.Update
      rs.Close
      Response.Redirect "edit_article.asp?id=" & Request.QueryString("id") & "
     End If
    %>
    </BODY>
    </HTML>


    thank you.
    Zbres
View Complete Thread