Ir para conteúdo
Fórum Script Brasil
  • 0

Erro ao configurar o FCKEditor


maktub

Pergunta

Estou fazendo a configuração para incluir o FCKEditor ao código que eu uso para inclusão de notícias, mas não estou conseguindo, preciso de ajuda:

Meu código esta na pasta "Admin", dentro dela tem a pasta do "FCKEditor"

As conexões do meu formulário esta abaixo, note que inclui o include FCKEditor no topo:

[b]<!--#include file="fckeditor/fckeditor.asp" -->[/b]

<!--#include file="../Connections/connHAportal.asp" -->
<!--#include file="inc_restriction.asp" -->
<!--#include file="../ScriptLibrary/incResizeAddOn.asp" -->
<!--#include file="../ScriptLibrary/incPureUpload.asp" -->

<%
'*** Pure ASP File Upload 2.1.3
Dim GP_uploadAction,UploadQueryString
PureUploadSetup
If (CStr(Request.QueryString("GP_upload")) <> "") Then
  Dim pau_thePath,pau_Extensions,pau_Form,pau_Redirect,pau_storeType,pau_sizeLimit,pau_nameConflict,pau_requireUpload,pau_minWidth,pau_minHeight,pau_maxWidth,pau_maxHeight,pau_saveWidth,pau_saveHeight,pau_timeout,pau_progressBar,pau_progressWidth,pau_progressHeight
  pau_thePath = """../pictures"""
  pau_Extensions = "GIF,JPG,JPEG,BMP,PNG"
  pau_Form = "add_data"
  pau_Redirect = ""
  pau_storeType = "file"
  pau_sizeLimit = ""
  pau_nameConflict = "uniq"
  pau_requireUpload = "false"
  pau_minWidth = ""
  pau_minHeight = "" 
  pau_maxWidth = ""
  pau_maxHeight = ""
  pau_saveWidth = ""
  pau_saveHeight = ""
  pau_timeout = "600"
  pau_progressBar = ""
  pau_progressWidth = "300"
  pau_progressHeight = "100"
  
  Dim RequestBin, UploadRequest
  CheckPureUploadVersion 2.13
  ProcessUpload pau_thePath,pau_Extensions,pau_Redirect,pau_storeType,pau_sizeLimit,pau_nameConflict,pau_requireUpload,pau_minWidth,pau_minHeight,pau_maxWidth,pau_maxHeight,pau_saveWidth,pau_saveHeight,pau_timeout
end if
%>
<%
' *** Smart Image Processor 1.1.2
If (CStr(Request.QueryString("GP_upload")) <> "") Then
  Dim RUF_Component, RUF_DotNetResize, RUF_ResizeImages, RUF_AspectImages, RUF_maxWidth, RUF_maxHeight, RUF_Quality, RUF_MakeThumb, RUF_AspectThumb, RUF_Suffix, RUF_maxWidthThumb, RUF_maxHeightThumb, RUF_QualityThumb, RUF_RedirectURL
  RUF_Component = "AUTO"
  RUF_DotNetResize = "../ScriptLibrary/ResizeImage.aspx"
  RUF_ResizeImages = true
  RUF_AspectImages = true
  RUF_maxWidth = "400"
  RUF_maxHeight = "400"  
  RUF_Quality = "80"
  RUF_MakeThumb = true
  RUF_AspectThumb = true
  RUF_Suffix = "_small"
  RUF_maxWidthThumb = "130"
  RUF_maxHeightThumb = "130"
  RUF_QualityThumb = "70"
  RUF_RedirectURL = ""
  if RUF_ResizeImages then
    ResizeUploadedFiles RUF_Component, RUF_DotNetResize, pau_thePath, "", RUF_maxWidth, RUF_maxHeight, RUF_Quality, true, pau_saveWidth, pau_saveHeight, RUF_AspectImages, pau_nameConflict, ""
  end if
  if RUF_MakeThumb then
    ResizeUploadedFiles RUF_Component, RUF_DotNetResize, pau_thePath, RUF_Suffix, RUF_maxWidthThumb, RUF_maxHeightThumb, RUF_QualityThumb, false, pau_saveWidth, pau_saveHeight, RUF_AspectThumb, pau_nameConflict, ""
  end if
  if RUF_RedirectURL <> "" then
    Response.Redirect RUF_RedirectURL
  end if
end if
%>

<%
' *** Edit Operations: (Modified for File Upload) declare variables

Dim MM_editAction
Dim MM_abortEdit
Dim MM_editQuery
Dim MM_editCmd

Dim MM_editConnection
Dim MM_editTable
Dim MM_editRedirectUrl
Dim MM_editColumn
Dim MM_recordId

Dim MM_fieldsStr
Dim MM_columnsStr
Dim MM_fields
Dim MM_columns
Dim MM_typeArray
Dim MM_formVal
Dim MM_delim
Dim MM_altVal
Dim MM_emptyVal
Dim MM_i

MM_editAction = CStr(Request.ServerVariables("SCRIPT_NAME"))
If (UploadQueryString <> "") Then
  MM_editAction = MM_editAction & "?" & UploadQueryString
End If

' boolean to abort record edit
MM_abortEdit = false

' query string to execute
MM_editQuery = ""
%>

<%
' *** Insert Record: (Modified for File Upload) set variables

If (CStr(UploadFormRequest("MM_insert")) = "add_data") Then

  MM_editConnection = MM_connDUportal_STRING
  MM_editTable = "DATAS"
  If Request.QueryString("nChannel") = "Polls" Then
  MM_editRedirectUrl = "pollsAnswers.asp"
  Else
  MM_editRedirectUrl = "datas.asp"
  End If
  MM_fieldsStr  = "TYPE|value|NAME|value|URL|value|PICTURE|value|LOCATION|value|BRAND|value|NUMBER|value|DATED|value|EXPIRED|value|QUANTITY|value|PRICE|value|SHIP|value|DESCRIPTION|value|USER|value|APPROVED|value"
  MM_columnsStr = "DAT_CATEGORY|none,none,NULL|DAT_NAME|',none,''|DAT_URL|',none,''|DAT_PICTURE|',none,''|DAT_LOCATION|',none,''|DAT_BRAND|',none,''|DAT_SKU|',none,''|DAT_DATED|',none,NULL|DAT_EXPIRED|',none,NULL|DAT_QUANTITY|none,none,NULL|DAT_PRICE|none,none,NULL|DAT_SHIP|none,none,NULL|DAT_DESCRIPTION|',none,''|DAT_USER|',none,''|DAT_APPROVED|none,none,NULL"

  ' create the MM_fields and MM_columns arrays
  MM_fields = Split(MM_fieldsStr, "|")
  MM_columns = Split(MM_columnsStr, "|")
  
  ' set the form values
  For MM_i = LBound(MM_fields) To UBound(MM_fields) Step 2
    MM_fields(MM_i+1) = CStr(UploadFormRequest(MM_fields(MM_i)))
  Next

  ' append the query string to the redirect URL
  If (MM_editRedirectUrl <> "" And UploadQueryString <> "") Then
    If (InStr(1, MM_editRedirectUrl, "?", vbTextCompare) = 0 And UploadQueryString <> "") Then
      MM_editRedirectUrl = MM_editRedirectUrl & "?" & UploadQueryString
    Else
      MM_editRedirectUrl = MM_editRedirectUrl & "&" & UploadQueryString
    End If
  End If

End If
%>
<%
' *** Insert Record: (Modified for File Upload) construct a sql insert statement and execute it

Dim MM_tableValues
Dim MM_dbValues

If (CStr(UploadFormRequest("MM_insert")) <> "") Then

  ' create the sql insert statement
  MM_tableValues = ""
  MM_dbValues = ""
  For MM_i = LBound(MM_fields) To UBound(MM_fields) Step 2
    MM_formVal = MM_fields(MM_i+1)
    MM_typeArray = Split(MM_columns(MM_i+1),",")
    MM_delim = MM_typeArray(0)
    If (MM_delim = "none") Then MM_delim = ""
    MM_altVal = MM_typeArray(1)
    If (MM_altVal = "none") Then MM_altVal = ""
    MM_emptyVal = MM_typeArray(2)
    If (MM_emptyVal = "none") Then MM_emptyVal = ""
    If (MM_formVal = "") Then
      MM_formVal = MM_emptyVal
    Else
      If (MM_altVal <> "") Then
        MM_formVal = MM_altVal
      ElseIf (MM_delim = "'") Then  ' escape quotes
        MM_formVal = "'" & Replace(MM_formVal,"'","''") & "'"
      Else
        MM_formVal = MM_delim + MM_formVal + MM_delim
      End If
    End If
    If (MM_i <> LBound(MM_fields)) Then
      MM_tableValues = MM_tableValues & ","
      MM_dbValues = MM_dbValues & ","
    End If
    MM_tableValues = MM_tableValues & MM_columns(MM_i)
    MM_dbValues = MM_dbValues & MM_formVal
  Next
  MM_editQuery = "insert into " & MM_editTable & " (" & MM_tableValues & ") values (" & MM_dbValues & ")"

  If (Not MM_abortEdit) Then
    ' execute the insert
    Set MM_editCmd = Server.CreateObject("ADODB.Command")
    MM_editCmd.ActiveConnection = MM_editConnection
    MM_editCmd.CommandText = MM_editQuery
    MM_editCmd.Execute
    MM_editCmd.ActiveConnection.Close

    If (MM_editRedirectUrl <> "") Then
      Response.Redirect(MM_editRedirectUrl)
    End If
  End If

End If
%>

<%
Dim rsTypeListing__MMColParam
rsTypeListing__MMColParam = "0"
If (Request.QueryString("iChannel") <> "") Then 
  rsTypeListing__MMColParam = Request.QueryString("iChannel")
End If
%>
<%
Dim rsTypeListing
Dim rsTypeListing_numRows

Set rsTypeListing = Server.CreateObject("ADODB.Recordset")
rsTypeListing.ActiveConnection = MM_connDUportal_STRING
rsTypeListing.Source = "SELECT * FROM CATEGORIES, CHANNELS WHERE CAT_CHANNEL = CHA_ID AND CAT_CHANNEL = " + Replace(rsTypeListing__MMColParam, "'", "''") + " ORDER BY CAT_NAME ASC"
rsTypeListing.CursorType = 0
rsTypeListing.CursorLocation = 2
rsTypeListing.LockType = 1
rsTypeListing.Open()

rsTypeListing_numRows = 0
%>
<%
Dim rsChannelListing
Dim rsChannelListing_numRows

Set rsChannelListing = Server.CreateObject("ADODB.Recordset")
rsChannelListing.ActiveConnection = MM_connDUportal_STRING
rsChannelListing.Source = "SELECT * FROM CHANNELS ORDER BY CHA_MENU ASC"
rsChannelListing.CursorType = 0
rsChannelListing.CursorLocation = 2
rsChannelListing.LockType = 1
rsChannelListing.Open()

rsChannelListing_numRows = 0
%>
No campo textarea substitui o atual:
<td> 
<textarea name="DESCRIÇÃO" cols="60" rows="15" class="form"></textarea>
</td>
Por:
<td> 
<%Dim sBasePath
sBasePath = Request.ServerVariables("PATH_INFO")
sBasePath = Left( sBasePath, InStrRev( sBasePath, "/_samples" ) )
Dim oFCKeditor
Set oFCKeditor = New FCKeditor
oFCKeditor.BasePath = sBasePath
If Request.QueryString("Skin") <> "" Then
oFCKeditor.Config("SkinPath") = sBasePath + "editor/skins/" & Server.HTMLEncode( Request.QueryString("Skin") ) + "/"
End If
oFCKeditor.Value = " "
oFCKeditor.Create "DESCRIÇÃO"
%>
</td>

Bom, o problema é que ao rodar o arquivo, a mensagem de erro"página não pode ser exibida" aparece.

Outra dúvida é: só preciso fazer a alteração nesta página ou precisa alterar a que exibe o tópico incluído na base de dados?

Por favor me ajudem!

Link para o comentário
Compartilhar em outros sites

6 respostass a esta questão

Posts Recomendados

  • 0

Este erro não diz grande coisa... você já desabilitou as mensagens amigáveis do seu navegador:

http://scriptbrasil.com.br/forum/index.php?showtopic=68614

Outra coisa que é bem comun quando se usa esse tipo de editores e que muitas vezes acontece é a tag form não esta com enctype multi/part...

assim:

<form method="POST" enctype="multipart/form-data" action="upload.asp">

o seu form está assim?

[]'s Rafael Spilki

Link para o comentário
Compartilhar em outros sites

  • 0

Tinha visto isso mas não é.

Coloquei a pasta FCKeditor dentro da pasta ADMIN na pasta admin tenho um formulário chamado "Inc_Admin.asp" onde configurei da seguinte forma:

No "Inc_Admin.asp" inclui o include no topo: <!--#include file="fckeditor/fckeditor.asp" --> e alterei o campo:

<td>
<textarea name="DESCRIPTION" cols="60" rows="15" class="form"></textarea>
</td>
e substitui por:
<td> 
<%
Dim sBasePath
sBasePath = Request.ServerVariables("PATH_INFO")
sBasePath = Left( sBasePath, InStrRev( sBasePath, "/_samples" ) )

Dim oFCKeditor
Set oFCKeditor = New FCKeditor
oFCKeditor.BasePath    = sBasePath
oFCKeditor.Value    = "This is some <strong>sample text</strong>. You are using <a href=""http://www.fckeditor.net/"">FCKeditor</a>."
oFCKeditor.Create "DESCRIPTION"
%>
</td>
Realizei todas as configurações deste tutorial: http://forum.imasters.uol.com.br/index.php?showtopic=247439 , mas quando eu rodo o "Inc_Admin.asp" no campo onde deveria chamar o fckeditor.html que esta dentro do FCKeditor.asp mostra uma mensagem que a página não foi localizada ??? Abaixo esta o código completo do "Inc_Admin.asp
<!--#include file="fckeditor/fckeditor.asp" -->
<!--#include file="../Connections/connHAportal.asp" -->
<!--#include file="inc_restriction.asp" -->
<!--#include file="../ScriptLibrary/incResizeAddOn.asp" -->
<!--#include file="../ScriptLibrary/incPureUpload.asp" -->
<%
'*** Pure ASP File Upload 2.1.3
Dim GP_uploadAction,UploadQueryString
PureUploadSetup
If (CStr(Request.QueryString("GP_upload")) <> "") Then
  Dim pau_thePath,pau_Extensions,pau_Form,pau_Redirect,pau_storeType,pau_sizeLimit,pau
_nameConflict,pau_requireUpload,pau_minWidth,pau_minHeight,pau_maxWidth,pau_maxHe
ight,pau_saveWidth,pau_saveHeight,pau_timeout,pau_progressBar,pau_progressWidth,p
au_progressHeight
  pau_thePath = """../pictures"""
  pau_Extensions = "GIF,JPG,JPEG,BMP,PNG"
  pau_Form = "add_data"
  pau_Redirect = ""
  pau_storeType = "file"
  pau_sizeLimit = ""
  pau_nameConflict = "uniq"
  pau_requireUpload = "false"
  pau_minWidth = ""
  pau_minHeight = "" 
  pau_maxWidth = ""
  pau_maxHeight = ""
  pau_saveWidth = ""
  pau_saveHeight = ""
  pau_timeout = "600"
  pau_progressBar = ""
  pau_progressWidth = "300"
  pau_progressHeight = "100"
  
  Dim RequestBin, UploadRequest
  CheckPureUploadVersion 2.13
  ProcessUpload pau_thePath,pau_Extensions,pau_Redirect,pau_storeType,pau_sizeLimit,pau_nameConf
lict,pau_requireUpload,pau_minWidth,pau_minHeight,pau_maxWidth,pau_maxHeight,pau_
saveWidth,pau_saveHeight,pau_timeout
end if
%>
<%
' *** Smart Image Processor 1.1.2
If (CStr(Request.QueryString("GP_upload")) <> "") Then
  Dim RUF_Component, RUF_DotNetResize, RUF_ResizeImages, RUF_AspectImages, RUF_maxWidth, RUF_maxHeight, RUF_Quality, RUF_MakeThumb, RUF_AspectThumb, RUF_Suffix, RUF_maxWidthThumb, RUF_maxHeightThumb, RUF_QualityThumb, RUF_RedirectURL
  RUF_Component = "AUTO"
  RUF_DotNetResize = "../ScriptLibrary/ResizeImage.aspx"
  RUF_ResizeImages = true
  RUF_AspectImages = true
  RUF_maxWidth = "400"
  RUF_maxHeight = "400"  
  RUF_Quality = "80"
  RUF_MakeThumb = true
  RUF_AspectThumb = true
  RUF_Suffix = "_small"
  RUF_maxWidthThumb = "130"
  RUF_maxHeightThumb = "130"
  RUF_QualityThumb = "70"
  RUF_RedirectURL = ""
  if RUF_ResizeImages then
    ResizeUploadedFiles RUF_Component, RUF_DotNetResize, pau_thePath, "", RUF_maxWidth, RUF_maxHeight, RUF_Quality, true, pau_saveWidth, pau_saveHeight, RUF_AspectImages, pau_nameConflict, ""
  end if
  if RUF_MakeThumb then
    ResizeUploadedFiles RUF_Component, RUF_DotNetResize, pau_thePath, RUF_Suffix, RUF_maxWidthThumb, RUF_maxHeightThumb, RUF_QualityThumb, false, pau_saveWidth, pau_saveHeight, RUF_AspectThumb, pau_nameConflict, ""
  end if
  if RUF_RedirectURL <> "" then
    Response.Redirect RUF_RedirectURL
  end if
end if
%>




<%
' *** Edit Operations: (Modified for File Upload) declare variables

Dim MM_editAction
Dim MM_abortEdit
Dim MM_editQuery
Dim MM_editCmd

Dim MM_editConnection
Dim MM_editTable
Dim MM_editRedirectUrl
Dim MM_editColumn
Dim MM_recordId

Dim MM_fieldsStr
Dim MM_columnsStr
Dim MM_fields
Dim MM_columns
Dim MM_typeArray
Dim MM_formVal
Dim MM_delim
Dim MM_altVal
Dim MM_emptyVal
Dim MM_i

MM_editAction = CStr(Request.ServerVariables("SCRIPT_NAME"))
If (UploadQueryString <> "") Then
  MM_editAction = MM_editAction & "?" & UploadQueryString
End If

' boolean to abort record edit
MM_abortEdit = false

' query string to execute
MM_editQuery = ""
%>

<%
' *** Insert Record: (Modified for File Upload) set variables

If (CStr(UploadFormRequest("MM_insert")) = "add_data") Then

  MM_editConnection = MM_connDUportal_STRING
  MM_editTable = "DATAS"
  If Request.QueryString("nChannel") = "Polls" Then
  MM_editRedirectUrl = "pollsAnswers.asp"
  Else
  MM_editRedirectUrl = "datas.asp"
  End If
  MM_fieldsStr  = "TYPE|value|NAME|value|URL|value|PICTURE|value|LOCATION|value|BRAND|value|NUM
BER|value|DATED|value|EXPIRED|value|QUANTITY|value|PRICE|value|SHIP|value|DESCRIP
TION|value|USER|value|APPROVED|value"
  MM_columnsStr = "DAT_CATEGORY|none,none,NULL|DAT_NAME|',none,''|DAT_URL|',none,''|DAT_PICTURE|',none,''|DAT_LOCATION|',none,''|DAT_BRAND|',none,''|DAT_SKU|',none,''|DAT_DATED|',none,NULL|DAT_EXPIRED|',none,NULL|DAT_QUANTITY|none,none,NULL|DAT_PRICE|none,none,NULL|DAT_SHIP|non
e,none,NULL|DAT_DESCRIPTION|',none,''|DAT_USER|',none,''|DAT_APPROVED|none,none,NULL"

  ' create the MM_fields and MM_columns arrays
  MM_fields = Split(MM_fieldsStr, "|")
  MM_columns = Split(MM_columnsStr, "|")
  
  ' set the form values
  For MM_i = LBound(MM_fields) To UBound(MM_fields) Step 2
    MM_fields(MM_i+1) = CStr(UploadFormRequest(MM_fields(MM_i)))
  Next

  ' append the query string to the redirect URL
  If (MM_editRedirectUrl <> "" And UploadQueryString <> "") Then
    If (InStr(1, MM_editRedirectUrl, "?", vbTextCompare) = 0 And UploadQueryString <> "") Then
      MM_editRedirectUrl = MM_editRedirectUrl & "?" & UploadQueryString
    Else
      MM_editRedirectUrl = MM_editRedirectUrl & "&" & UploadQueryString
    End If
  End If

End If
%>
<%
' *** Insert Record: (Modified for File Upload) construct a sql insert statement and execute it

Dim MM_tableValues
Dim MM_dbValues

If (CStr(UploadFormRequest("MM_insert")) <> "") Then

  ' create the sql insert statement
  MM_tableValues = ""
  MM_dbValues = ""
  For MM_i = LBound(MM_fields) To UBound(MM_fields) Step 2
    MM_formVal = MM_fields(MM_i+1)
    MM_typeArray = Split(MM_columns(MM_i+1),",")
    MM_delim = MM_typeArray(0)
    If (MM_delim = "none") Then MM_delim = ""
    MM_altVal = MM_typeArray(1)
    If (MM_altVal = "none") Then MM_altVal = ""
    MM_emptyVal = MM_typeArray(2)
    If (MM_emptyVal = "none") Then MM_emptyVal = ""
    If (MM_formVal = "") Then
      MM_formVal = MM_emptyVal
    Else
      If (MM_altVal <> "") Then
        MM_formVal = MM_altVal
      ElseIf (MM_delim = "'") Then  ' escape quotes
        MM_formVal = "'" & Replace(MM_formVal,"'","''") & "'"
      Else
        MM_formVal = MM_delim + MM_formVal + MM_delim
      End If
    End If
    If (MM_i <> LBound(MM_fields)) Then
      MM_tableValues = MM_tableValues & ","
      MM_dbValues = MM_dbValues & ","
    End If
    MM_tableValues = MM_tableValues & MM_columns(MM_i)
    MM_dbValues = MM_dbValues & MM_formVal
  Next
  MM_editQuery = "insert into " & MM_editTable & " (" & MM_tableValues & ") values (" & MM_dbValues & ")"

  If (Not MM_abortEdit) Then
    ' execute the insert
    Set MM_editCmd = Server.CreateObject("ADODB.Command")
    MM_editCmd.ActiveConnection = MM_editConnection
    MM_editCmd.CommandText = MM_editQuery
    MM_editCmd.Execute
    MM_editCmd.ActiveConnection.Close

    If (MM_editRedirectUrl <> "") Then
      Response.Redirect(MM_editRedirectUrl)
    End If
  End If

End If
%>

<%
Dim rsTypeListing__MMColParam
rsTypeListing__MMColParam = "0"
If (Request.QueryString("iChannel") <> "") Then 
  rsTypeListing__MMColParam = Request.QueryString("iChannel")
End If
%>
<%
Dim rsTypeListing
Dim rsTypeListing_numRows

Set rsTypeListing = Server.CreateObject("ADODB.Recordset")
rsTypeListing.ActiveConnection = MM_connDUportal_STRING
rsTypeListing.Source = "SELECT * FROM CATEGORIES, CHANNELS WHERE CAT_CHANNEL = CHA_ID AND CAT_CHANNEL = " + Replace(rsTypeListing__MMColParam, "'", "''") + " ORDER BY CAT_NAME ASC"
rsTypeListing.CursorType = 0
rsTypeListing.CursorLocation = 2
rsTypeListing.LockType = 1
rsTypeListing.Open()

rsTypeListing_numRows = 0
%>
<%
Dim rsChannelListing
Dim rsChannelListing_numRows

Set rsChannelListing = Server.CreateObject("ADODB.Recordset")
rsChannelListing.ActiveConnection = MM_connDUportal_STRING
rsChannelListing.Source = "SELECT * FROM CHANNELS ORDER BY CHA_MENU ASC"
rsChannelListing.CursorType = 0
rsChannelListing.CursorLocation = 2
rsChannelListing.LockType = 1
rsChannelListing.Open()

rsChannelListing_numRows = 0
%>
&lt;script language="JavaScript" type="text/JavaScript">
<!--
function MM_jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_validateForm() { //v4.0
  var i,p,q,nm,test,num,min,max,errors='',args=MM_validateForm.arguments;
  for (i=0; i<(args.length-2); i+=3) { test=args[i+2]; val=MM_findObj(args[i]);
    if (val) { nm=val.name; if ((val=val.value)!="") {
      if (test.indexOf('isEmail')!=-1) { p=val.indexOf('@');
        if (p<1 || p==(val.length-1)) errors+='- '+nm+' must contain an e-mail address.\n';
      } else if (test!='R') { num = parseFloat(val);
        if (isNaN(val)) errors+='- '+nm+' must contain a number.\n';
        if (test.indexOf('inRange') != -1) { p=test.indexOf(':');
          min=test.substring(8,p); max=test.substring(p+1);
          if (num<min || max<num) errors+='- '+nm+' must contain a number between '+min+' and '+max+'.\n';
    } } } else if (test.charAt(0) == 'R') errors += '- '+nm+' is required.\n'; }
  } if (errors) alert('The following error(s) occurred:\n'+errors);
  document.MM_returnValue = (errors == '');
}

//-->
</script>
 <link href="../assets/HAportal.css" rel="stylesheet" type="text/css">
&lt;script language="javascript" src="../ScriptLibrary/incPureUpload.js"></script>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td align="left" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0">
        <tr> 
          <td align="left" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0">
              <tr> 
                <td align="left" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0" background="../assets/bg_header.gif">
                    <tr> 
                      <td width="10"><img src="../assets/header_end_left.gif"></td>
                      <td align="left" valign="middle" class="textBoldColor">ADICIONAR 
                        NOVO</td>
                      <td width="28" align="right" valign="middle"><img src="../assets/header_end_right.gif"></td>
                    </tr>
                  </table></td>
              </tr>
            </table></td>
        </tr>
        <tr> 
          <td align="left" valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0">
              <tr> 
                <td width="1" class="bgTableBorder"><img src="../assets/_spacer.gif"></td>
                <td align="left" valign="top" class="bgTable"><table width="100%" border="0" cellspacing="0" cellpadding="0">
                    <tr> 
                      <td align="left" valign="top">
                      
                      
                      
                      
                      <table width="100%" border="0" cellspacing="2" cellpadding="2">
                          <tr>
                            <form action="<%=MM_editAction%>" method="post" enctype="multipart/form-data" name="add_data" id="add_data" onSubmit="checkFileUpload(this,'GIF,JPG,JPEG,BMP,PNG',false,'','','','','','','');return document.MM_returnValue">
                              <td width="100%" align="left" valign="top"> <table align="center" cellpadding="3" cellspacing="3" class="textBold">
                                  <tr valign="middle"> 
                                    <td align="right" nowrap>CANAL:</td>
                                    <td><select name="iChannel" class="form" id="iChannel" onChange="MM_jumpMenu('parent',this,0)">
                                        <%
While (NOT rsChannelListing.EOF)
%>
                                        <option value="submit.asp?iChannel=<%=(rsChannelListing.Fields.Item("CHA_ID").Value)%>&nChannel=<%=(rsChannelListing.Fields.Item("CHA_NAME").Value)%>" <%if (CStr(rsChannelListing.Fields.Item("CHA_ID").Value) = CStr(Request.QueryString("iChannel"))) then Response.Write("SELECTED") : Response.Write("")%>><%=(rsChannelListing.Fields.Item("CHA_MENU").Value)%></option>
                                        <%
  rsChannelListing.MoveNext()
Wend
If (rsChannelListing.CursorType > 0) Then
  rsChannelListing.MoveFirst
Else
  rsChannelListing.Requery
End If
%>
                                      </select> </td>
                                  </tr>
                                  <% If Not rsTypeListing.EOF Or Not rsTypeListing.BOF Then %>
                                  <tr valign="middle"> 
                                    <td align="right" nowrap>CATEGORIA:</td>
                                    <td> 
                                      <select name="TYPE" class="form" id="TYPE">
                                        <%
While (NOT rsTypeListing.EOF)
%>
                                        <option value="<%=(rsTypeListing.Fields.Item("CAT_ID").Value)%>"><%=(rsTypeListing.Fields.Item("CAT_NAME").Value)%></option>
                                        <%
  rsTypeListing.MoveNext()
Wend
If (rsTypeListing.CursorType > 0) Then
  rsTypeListing.MoveFirst
Else
  rsTypeListing.Requery
End If
%>
                                      </select> </td>
                                  </tr>
                                  <tr valign="middle"> 
                                    <td align="right" nowrap>NOME/TÍTULO:</td>
                                    <td> 
                                      <input name="NAME" type="text" class="form" value="" size="60"> 
                                    </td>
                                  </tr>
                                <% If Request.QueryString("nChannel") <> "Fotos" And Request.QueryString("nChannel") <> "Tópicos" And Request.QueryString("nChannel") <> "Polls" Then %>
                                  <tr valign="middle"> 
                                    <td align="right" nowrap>URL:</td>
                                    <td> 
                                      <input name="URL" type="text" class="form" value="http://" size="60"> 
                                    </td>
                                  </tr>
                                   <% Else %>
                                  <input name="URL" type="hidden" value="0">
                                  <% End If %>
                                   <% If Request.QueryString("nChannel") <> "Tópicos" And Request.QueryString("nChannel") <> "Polls" Then %>
                                  <tr valign="middle"> 
                                    <td align="right" nowrap>IMAGEM:</td>
                                    <td> 
                                      <input name="PICTURE" type="file" class="form" id="PICTURE" onChange="checkOneFileUpload(this,'GIF,JPG,JPEG,BMP,PNG',false,'','','','','','','')" size="50"></td>
                                  </tr>
                                   <% Else %>
                                  <input name="PICTURE" type="hidden" value="">
                                  <% End If %>
                                  <% If Request.QueryString("nChannel") = "Eventos" Or Request.QueryString("nChannel") = "Negócios" Or  Request.QueryString("nChannel") = "Anúncios" Then %>
                                  <tr valign="middle"> 
                                    <td align="right" nowrap>LOCALIZAÇÃO:</td>
                                    <td> 
                                      <input name="LOCATION" type="text" class="form" value="" size="60"> 
                                    </td>
                                  </tr>
                                  <% Else %>
                                   <input name="LOCATION" type="hidden" value="0"> 
                                  <% End If %>
                                  <% If Request.QueryString("nChannel") = "Produtos" Then %>
                                  <tr valign="middle"> 
                                    <td align="right" nowrap>TIPO DO PRODUTO:</td>
                                    <td> 
                                      <input name="BRAND" type="text" class="form" value="" size="60"> 
                                    </td>
                                  </tr>
                                  <tr valign="middle"> 
                                    <td align="right" nowrap>NÚMERO DO PRODUTO:</td>
                                    <td> 
                                      <input name="NUMBER" type="text" class="form" id="NUMBER" value="" size="20"> 
                                    </td>
                                  </tr>
                                   <% Else %>
                                   <input name="NUMBER" type="hidden" value="0"> 
                                  <% End If %>
                                  
                                  
                                  <tr valign="middle"> 
                                    <td align="right" nowrap> 
                                      DATA:</td>
                                    <td> 
                                      <input name="DATED" type="text" class="form" value="<%= DATE() %>" size="15"> 
                                    </td>
                                  </tr>
                                  <% If Request.QueryString("nChannel") = "Produtos" OR Request.QueryString("nChannel") = "Anúncios" Then %>
                                  <tr valign="middle"> 
                                    <td align="right" nowrap>DATA FINAL:</td>
                                    <td> 
                                      <select name="EXPIRED" class="form" id="EXPIRED">
                                        <option value="1/1/5000" selected>Never</option>
                                        <option value="<%= DATE() + 15 %>">15 
                                        Days</option>
                                        <option value="<%= DATE() + 30 %>">30 
                                        Days</option>
                                        <option value="<%= DATE() + 90 %>">90 
                                        Days</option>
                                        <option value="<%= DATE() + 120 %>">120 
                                        Days</option>
                                        <option value="<%= DATE() + 365 %>">365 
                                        Days</option>
                                      </select> </td>
                                  </tr>
                                   <% Else %>
                                  <input name="EXPIRED" type="hidden" value="1/1/3000">
                                  <% End If %>
                                  <% If Request.QueryString("nChannel") = "Produtos" OR Request.QueryString("nChannel") = "Anúncios"Then %>
                                  <tr valign="middle"> 
                                    <td align="right" nowrap>QUANTIDADE:</td>
                                    <td> 
                                      <input name="QUANTITY" type="text" class="form" id="QUANTITY" value="" size="5"> 
                                    </td>
                                  </tr>
                                   <% Else %>
                                   <input name="QUANTITY" type="hidden" value="0"> 
                                  <% End If %>
                                  
                                  <% If Request.QueryString("nChannel") = "Produtos" OR Request.QueryString("nChannel") = "Anúncios"Then %>
                                                                  
                                  <tr valign="middle"> 
                                    <td align="right" nowrap>PREÇO:</td>
                                    <td> 
                                      <input name="PRICE" type="text" class="form" value="" size="30"> 
                                    </td>
                                  </tr>
                                  <tr valign="middle"> 
                                    <td align="right" nowrap>CUSTO DE TRANSPORTE:</td>
                                    <td> 
                                      <input name="SHIP" type="text" class="form" value="" size="30"> 
                                    </td>
                                  </tr>
                                   <% Else %>
                                   <input name="PRICE" type="hidden" value="0"> 
                                   <input name="SHIP" type="hidden" value="0"> 
                                  <% End If %>
                                  <tr valign="middle"> 
                                    <td align="right" valign="top" nowrap>DESCRIÇÃO:</td>
<td> 
<%
Dim sBasePath
sBasePath = Request.ServerVariables("PATH_INFO")
sBasePath = Left( sBasePath, InStrRev( sBasePath, "/_samples" ) )

Dim oFCKeditor
Set oFCKeditor = New FCKeditor
oFCKeditor.BasePath    = sBasePath
oFCKeditor.Value    = "This is some <strong>sample text</strong>. You are using <a href=""http://www.fckeditor.net/"">FCKeditor</a>."
oFCKeditor.Create "DESCRIPTION"
%>

</td>
</tr>
<tr valign="middle"> 
<td align="right" nowrap> 
<input type="hidden" name="USER" value="admin"> 
<input type="hidden" name="APPROVED" value="1"> 
<input type="hidden" name="CHANNEL" value="<%= Request.QueryString("nChannel") %>"> 
<input type="hidden" name="MM_insert" value="add_data"> 
</td>
<td> 
<input name="Add" type="submit" class="button" id="Add" onClick="MM_validateForm('NAME','','R','URL','','R','LOCATION','','R','BRAND','','R','NUMBER','','R','DATED','','R','QUANTITY','','RisNum','PRICE','','RisNum','SHIP','','RisNum','DESCRIPTION','','R');return document.MM_returnValue" value="Adicionar"> 
</td>
</tr>
<% End If ' end Not rsTypeListing.EOF Or NOT rsTypeListing.BOF %>
</table></td>
</form>
</tr>
</table>
</td>
</tr>
</table></td>
<td width="1" class="bgTableBorder"><img src="../assets/_spacer.gif"></td>
</tr>
</table></td>
</tr>
<tr> 
<td align="center" valign="top" background="../assets/bg_header_bottom.gif"></td>
</tr>
</table></td>
</tr>
<tr>
<td height="7" align="left" valign="top"><img src="../assets/_spacer.gif" width="1" height="1"></td>
</tr>
</table>

<%
rsTypeListing.Close()
Set rsTypeListing = Nothing
%>
<%
rsChannelListing.Close()
Set rsChannelListing = Nothing
%>

Editado por maktub
Link para o comentário
Compartilhar em outros sites

  • 0

funfou???

se não verifique o local do arquivo

<%Dim sBasePath

sBasePath = Request.ServerVariables("PATH_INFO")

sBasePath = Left( sBasePath, InStrRev( sBasePath, "/_samples" ) )

Dim oFCKeditor

Set oFCKeditor = New FCKeditor

oFCKeditor.BasePath = sBasePath

If Request.QueryString("Skin") <> "" Then

oFCKeditor.Config("SkinPath") = sBasePath + "editor/skins/" & Server.HTMLEncode( Request.QueryString("Skin") ) + "/"

End If

oFCKeditor.Value = " "

oFCKeditor.Create "DESCRIÇÃO"

%>

Link para o comentário
Compartilhar em outros sites

  • 0

Me faz uma gentileza, nesta página onde aparece a mensagem de erro que a página não pode ser exibida... cope e cole o link da barra de endereços do navegador aqui, por gentileza?

Cara... tem que ser algum detalhezinho... algo pequeno que estamos nos passando... Essa mensagem de erro é bastante específica e na esmagadora maioria das vezes é porque a página não existe mesmo!!!

você tem certeza que desabilitou as mensagens de erro amigáveis do seu navegador? isso tá rodando local ou web?

[]'s Rafael Spilki

Link para o comentário
Compartilhar em outros sites

  • 0

esse ´eo q tenho em uso aqui

sBasePath = Request.ServerVariables("PATH_INFO")
sBasePath = replace(sBasePath,"artigos_novo.asp","FCKeditor/")


Set oFCKeditor = New FCKeditor

oFCKeditor.BasePath    = sBasePath
oFCKeditor.Height="400"
oFCKeditor.Value    =conteudo
oFCKeditor.Create "conteudo"

Link para o comentário
Compartilhar em outros sites

Participe da discussão

Você pode postar agora e se registrar depois. Se você já tem uma conta, acesse agora para postar com sua conta.

Visitante
Responder esta pergunta...

×   Você colou conteúdo com formatação.   Remover formatação

  Apenas 75 emoticons são permitidos.

×   Seu link foi incorporado automaticamente.   Exibir como um link em vez disso

×   Seu conteúdo anterior foi restaurado.   Limpar Editor

×   Você não pode colar imagens diretamente. Carregar ou inserir imagens do URL.



  • Estatísticas dos Fóruns

    • Tópicos
      152,2k
    • Posts
      651,9k
×
×
  • Criar Novo...