Ir para conteúdo

Arquivado

Este tópico foi arquivado e está fechado para novas respostas.

raposo

Fckeditor não grava no banco Access

Recommended Posts

Prezados(as)

 

Implantei o FCKeditor em minha aplicação e esta rodando tranquilamente, e até le as informações do banco. Porém se eu tento alterar alguma informação ou

adicionar quando clico no botão salvar o mesmo não grava os dados no banco e ainda zera as informações contidas no BD.

 

Alguém sabe o que possa estar ocorrendo?

 

Desde já agradeço.

Compartilhar este post


Link para o post
Compartilhar em outros sites

É exibida alguma mensagem de erro?

Compartilhar este post


Link para o post
Compartilhar em outros sites

Hargon Nehuma, segue o código:

 

<!--#include file="../conexao.asp" -->
<!--#INCLUDE FILE="funcao_login.asp" -->

<%
Call Verifica_Sessao()

if request("HTML")="" then
	HTML = "S"
Else
	HTML = "N"
End If

if request("str")="atu" then
	if request("publicar")="D" then
		conexao.execute("delete * from institucional_textos where ID="&request("ID")&"")%>
		<script language="javascript">
			alert("Parágrafo deletado com sucesso");
			window.location="adm_m3.asp?cod_pagina=<%=request("cod_pagina")%>"
		</script>
		<%response.end
	End If

	Set rsInc = server.createobject("ADODB.Recordset")
	rsInc.open "select * from institucional_textos where ID="&request("ID")&"", conexao, 3, 3

	If Ucase(request("area_restrita")) = "S" then
		GRUPO = "|"&replace(replace(request("grupo"),",","|")," ","")&"|"
		RESTRITO = "S"
	Else	
		GRUPO = ""
		RESTRITO = "N"
	End if

	rsInc("titulo")            =  request("titulo")
	rsInc("titulo_fonte")      =  request("titulo_fonte")
	rsInc("titulo_fonte_cor")  =  request("titulo_fonte_cor")
	rsInc("titulo_fonte_tam")  =  request("titulo_fonte_tam")
	rsInc("titulo_fonte_formatacao")  =  replace(replace(request("titulo_fonte_formatacao"),chr(44),"")," ","")
	rsInc("titulo_publicar")   =  request("titulo_publicar")
	rsInc("texto")             =  request("texto")
	rsInc("texto_fonte")       =  request("texto_fonte")
	rsInc("texto_fonte_cor")   =  request("texto_fonte_cor")
	rsInc("texto_fonte_tam")   =  request("texto_fonte_tam")
	rsInc("texto_fonte_formatacao")  =  replace(replace(request("texto_fonte_formatacao"),chr(44),"")," ","")
	rsInc("imagem_url")        =  request("arquivos")
	rsInc("imagem_align")      =  request("imagem_align")
	rsInc("Publicar")          =  request("Publicar")
	rsInc("cod_pagina")        =  request("cod_pagina")
	rsInc("cod_tabela")        =  request("cod_tabela")
	rsInc("cod_form")          =  request("cod_form")
	rsInc("form_reg")          =  request("form_reg")
	rsInc("cod_txt")           =  request("cod_txt")
	rsInc("cod_link")          =  request("cod_link")
	rsInc("link_string")       =  request("link_string")
	rsInc("cod_ThumbNail")     =  request("ThumbNail")	
	rsInc("area_restrita")     =  RESTRITO
	rsInc("grupo")       	   =  GRUPO
    
	rsInc.Update

	rsInc.Close
	set rsInc = nothing

	response.redirect "adm_m"&request("m")&".asp?cod_pagina=" & request("cod_pagina")
End If

'traz as pastas dos subdiretorios, é chamada na função lista_subdiretorio
Function sub_subdiretorio(nome_subdiretorio) 

	Set TheFolder=objFileSys.GetFolder(nome_subdiretorio)
	Set MyDrives = objFileSys.Drives
	set TheRootFolder = TheFolder
	set RootFolders = TheRootFolder.SubFolders

	'listar os subdiretórios
	For each SubFolder in RootFolders
		sub_novo = nome_subdiretorio & "\" & SubFolder.Name
		sub_subdiretorio(sub_novo)
			
		subdir = nome_subdiretorio & "\" & SubFolder.Name & "\"

		set TheFolder=objFileSys.GetFolder(subdir)
		Set TheFiles = TheFolder.files
		
		For each AFile in TheFiles
			if SubFolder.Name="destaques" then
				sub_destaques = sub_destaques & "<option value="&SubFolder.Name &"/"&AFile.Name&">" & SubFolder.Name &"/" & AFile.Name & "</option>"
			End If
			response.write "<option value="&replace(replace(subdir,dir&"\","")," ","%20") & replace(AFile.Name," ","%20")&" >" & replace(replace(subdir,dir&"\","")," ","%20") & replace(AFile.Name," ","%20")
		Next
	Next
End Function

Function lista_subdiretorio(nome_diretorio)

	Set TheFolder=objFileSys.GetFolder(nome_diretorio)
	Set MyDrives = objFileSys.Drives
	set TheRootFolder = TheFolder
	set RootFolders = TheRootFolder.SubFolders

	'listar os subdiretórios
	For each SubFolder in RootFolders
		sub_novo = nome_diretorio & "\" & SubFolder.Name
		sub_subdiretorio(sub_novo)
			
		subdir = nome_diretorio & "\" & SubFolder.Name & "\"

		set TheFolder=objFileSys.GetFolder(subdir)
		Set TheFiles = TheFolder.files
		
		For each AFile in TheFiles
			if SubFolder.Name="destaques" then
				sub_destaques = sub_destaques & "<option value="&SubFolder.Name &"/"&AFile.Name&">" & SubFolder.Name &"/" & AFile.Name & "</option>"
			End If
			response.write "<option value="&replace(replace(subdir,dir&"\","")," ","%20") & replace(AFile.Name," ","%20")&">" & replace(replace(subdir,dir&"\","")," ","%20") & replace(AFile.Name," ","%20")
		Next
	Next

	'trazer os arquivos da raiz
	
	set TheFolder=objFileSys.GetFolder(dir)
	Set TheFiles = TheFolder.files

	For each AFile in TheFiles
		response.write "<option value="& replace(AFile.Name," ","%20") & ">" & replace(AFile.Name," ","%20")
	Next
End Function

'ver todos diretorio da pasta /imagens --------------------------------------------
Set objFileSys = server.createobject("Scripting.FilesystemObject")
dir = server.mappath("../imagens/")

Set rsInstitu=conexao.execute("select * from institucional_textos where cod_pagina="&request("cod_pagina")&" and ID="&request("ID")&" ")
Set rsTitulo = conexao.execute("select titulo_item from menu_site where cod_pagina="&request("cod_pagina")&"")  
%>
<html>
<head>
<meta name="description" 	content="Raposo">
<meta name="copyright" 		content="Copyright ©2009 - Raposo">
<meta http-equiv="Author" 	name="Raposo" content="Programação:Raposo">
<meta http-equiv="Reply-to" 	content="raposo@raposo.com.br">
<link rel="stylesheet" href="teste.css" type="text/css">

<script language="javascript">
<!--
function getStyleObject(objectId) {
	// cross-browser function to get an object's style object given its id
	if(document.getElementById && document.getElementById(objectId)) {
		// W3C DOM
		return document.getElementById(objectId).style;
	}
	else if (document.all && document.all(objectId)) {
		// MSIE 4 DOM
		return document.all(objectId).style;
    }
    else if (document.layers && document.layers[objectId]) {
		// NN 4 DOM.. note: this won't find nested layers
		return document.layers[objectId];
    }
    else{
		return false;
    }
} // getStyleObject

function changeColor() {
	var menuTitle = getStyleObject('titulofontecor');
	// menuTitle.backgroundColor = '#ff2200';
	menuTitle.backgroundColor = document.form_inst.titulo_fonte_cor.value;
}


function changeTextColor() {
    var menuTitle = getStyleObject('textofontecor');
	//menuTitle.backgroundColor = '#ff2200';
    menuTitle.backgroundColor = document.form_inst.texto_fonte_cor.value;
}

function altera_img()
{
	if (form_inst.arquivos.value.length > 0)
	{
		document.imagem.src = "../imagens/" + document.form_inst.arquivos.value
	}
	else
	{
		document.imagem.src = "imagens/white.jpg"
	}
}

function poppalheta(campo)
{
	window.open('adm_palheta.asp?form=form_inst&focus=titulo&campo='+campo,'palheta','tollbars=no,width=350,height=260,left=1,top=1');
}

function MM_findObj(n, d) { //v4.0
	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 && document.getElementById) x=document.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') {
        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 (val<min || max<val) errors+='- '+nm+' must contain a number between '+min+' and '+max+'.\n';
    } } } else if (test.charAt(0) == 'R') errors += '- '+nm+' obrigatório.\n'; }
  } if (errors) alert('Erro:\n'+errors);
  document.MM_returnValue = (errors == '');
}

function Display( var1 )
{
  var obj = eval( "document.all.restrito");
  if ( var1 == "S" )
    obj.style.display = "block";
  else
    obj.style.display = "none";   
}


function MM_dragLayer(objName,x,hL,hT,hW,hH,toFront,dropBack,c*,cD,cL,cR,targL,targT,tol,dropJS,et,dragJS) { //v3.0
  //Copyright 1998 Macromedia, Inc. All rights reserved.
  var i,j,aLayer,retVal,curDrag=null,NS=(navigator.appName=='Netscape'), curLeft, curTop;
  if (!document.all && !document.layers) return false;
  retVal = true; if(!NS && event) event.returnValue = true;
  if (MM_dragLayer.arguments.length > 1) {
    curDrag = MM_findObj(objName); if (!curDrag) return false;
    if (!document.allLayers) { document.allLayers = new Array();
      with (document) if (NS) { for (i=0; i<layers.length; i++) allLayers[i]=layers[i];
        for (i=0; i<allLayers.length; i++) if (allLayers[i].document && allLayers[i].document.layers)
          with (allLayers[i].document) for (j=0; j<layers.length; j++) allLayers[allLayers.length]=layers[j];
      } else for (i=0;i<all.length;i++) if (all[i].style&&all[i].style.position) allLayers[allLayers.length]=all[i];}
    curDrag.MM_dragOk=true; curDrag.MM_targL=targL; curDrag.MM_targT=targT;
    curDrag.MM_tol=Math.pow(tol,2); curDrag.MM_hLeft=hL; curDrag.MM_hTop=hT;
    curDrag.MM_hWidth=hW; curDrag.MM_hHeight=hH; curDrag.MM_toFront=toFront;
    curDrag.MM_dropBack=dropBack; curDrag.MM_dropJS=dropJS;
    curDrag.MM_everyTime=et; curDrag.MM_dragJS=dragJS;
    curDrag.MM_oldZ = (NS)?curDrag.zIndex:curDrag.style.zIndex;
    curLeft= (NS)?curDrag.left:curDrag.style.pixelLeft; curDrag.MM_startL = curLeft;
    curTop = (NS)?curDrag.top:curDrag.style.pixelTop; curDrag.MM_startT = curTop;
    curDrag.MM_bL=(cL<0)?null:curLeft-cL; curDrag.MM_bT=(c*<0)?null:curTop -c*;
    curDrag.MM_bR=(cR<0)?null:curLeft+cR; curDrag.MM_bB=(cD<0)?null:curTop +cD;
    curDrag.MM_LEFTRIGHT=0; curDrag.MM_UPDOWN=0; curDrag.MM_SNAPPED=false; //use in your JS!
    document.onmousedown = MM_dragLayer; document.onmouseup = MM_dragLayer;
    if (NS) document.captureEvents(Event.MOUSEDOWN|Event.MOUSEUP);
  } else {
    var theEvent = ((NS)?objName.type:event.type);
    if (theEvent == 'mousedown') {
      var mouseX = (NS)?objName.pageX : event.clientX + document.body.scrollLeft;
      var mouseY = (NS)?objName.pageY : event.clientY + document.body.scrollTop;
      var maxDragZ=null; document.MM_maxZ = 0;
      for (i=0; i<document.allLayers.length; i++) { aLayer = document.allLayers[i];
        var aLayerZ = (NS)?aLayer.zIndex:aLayer.style.zIndex;
        if (aLayerZ > document.MM_maxZ) document.MM_maxZ = aLayerZ;
        var isVisible = (((NS)?aLayer.visibility:aLayer.style.visibility).indexOf('hid') == -1);
        if (aLayer.MM_dragOk != null && isVisible) with (aLayer) {
          var parentL=0; var parentT=0;
          if (!NS) { parentLayer = aLayer.parentElement;
            while (parentLayer != null && parentLayer.style.position) {
              parentL += parentLayer.offsetLeft; parentT += parentLayer.offsetTop;
              parentLayer = parentLayer.parentElement; } }
          var tmpX=mouseX-(((NS)?pageX:style.pixelLeft+parentL)+MM_hLeft);
          var tmpY=mouseY-(((NS)?pageY:style.pixelTop +parentT)+MM_hTop);
          var tmpW = MM_hWidth;  if (tmpW <= 0) tmpW += ((NS)?clip.width :offsetWidth);
          var tmpH = MM_hHeight; if (tmpH <= 0) tmpH += ((NS)?clip.height:offsetHeight);
          if ((0 <= tmpX && tmpX < tmpW && 0 <= tmpY && tmpY < tmpH) && (maxDragZ == null
              || maxDragZ <= aLayerZ)) { curDrag = aLayer; maxDragZ = aLayerZ; } } }
      if (curDrag) {
        document.onmousemove = MM_dragLayer; if (NS) document.captureEvents(Event.MOUSEMOVE);
        curLeft = (NS)?curDrag.left:curDrag.style.pixelLeft;
        curTop = (NS)?curDrag.top:curDrag.style.pixelTop;
        MM_oldX = mouseX - curLeft; MM_oldY = mouseY - curTop;
        document.MM_curDrag = curDrag;  curDrag.MM_SNAPPED=false;
        if(curDrag.MM_toFront) {
          eval('curDrag.'+((NS)?'':'style.')+'zIndex=document.MM_maxZ+1');
          if (!curDrag.MM_dropBack) document.MM_maxZ++; }
        retVal = false; if(!NS) event.returnValue = false;
    } } else if (theEvent == 'mousemove') {
      if (document.MM_curDrag) with (document.MM_curDrag) {
        var mouseX = (NS)?objName.pageX : event.clientX + document.body.scrollLeft;
        var mouseY = (NS)?objName.pageY : event.clientY + document.body.scrollTop;
        newLeft = mouseX-MM_oldX; newTop  = mouseY-MM_oldY;
        if (MM_bL!=null) newLeft = Math.max(newLeft,MM_bL);
        if (MM_bR!=null) newLeft = Math.min(newLeft,MM_bR);
        if (MM_bT!=null) newTop  = Math.max(newTop ,MM_bT);
        if (MM_bB!=null) newTop  = Math.min(newTop ,MM_bB);
        MM_LEFTRIGHT = newLeft-MM_startL; MM_UPDOWN = newTop-MM_startT;
        if (NS) {left = newLeft; top = newTop;}
        else {style.pixelLeft = newLeft; style.pixelTop = newTop;}
        if (MM_dragJS) eval(MM_dragJS);
        retVal = false; if(!NS) event.returnValue = false;
    } } else if (theEvent == 'mouseup') {
      document.onmousemove = null;
      if (NS) document.releaseEvents(Event.MOUSEMOVE);
      if (NS) document.captureEvents(Event.MOUSEDOWN); //for mac NS
      if (document.MM_curDrag) with (document.MM_curDrag) {
        if (typeof MM_targL =='number' && typeof MM_targT == 'number' &&
            (Math.pow(MM_targL-((NS)?left:style.pixelLeft),2)+
             Math.pow(MM_targT-((NS)?top:style.pixelTop),2))<=MM_tol) {
          if (NS) {left = MM_targL; top = MM_targT;}
          else {style.pixelLeft = MM_targL; style.pixelTop = MM_targT;}
          MM_SNAPPED = true; MM_LEFTRIGHT = MM_startL-MM_targL; MM_UPDOWN = MM_startT-MM_targT; }
        if (MM_everyTime || MM_SNAPPED) eval(MM_dropJS);
        if(MM_dropBack) {if (NS) zIndex = MM_oldZ; else style.zIndex = MM_oldZ;}
        retVal = false; if(!NS) event.returnValue = false; }
      document.MM_curDrag = null;
    }
    if (NS) document.routeEvent(objName);
  } return retVal;
}

//-->
</script>
<script language="JavaScript">
<!--

<!--
function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);
// -->
//-->
</script>

    <style type="text/css">
        .style1
        {
            height: 110px;
        }
        .style3
        {
            color: 000000;
            font-family: verdana, arial;
            font-size: 8pt;
            TEXT-DECORATION: none;
            width: 98%;
        }
        .style4
        {
            width: 521px;
        }
        .style5
        {
            width: 398px;
        }
        .style6
        {
            color: 000000;
            font-family: verdana, arial;
            font-size: 8pt;
            TEXT-DECORATION: none;
            width: 968px;
        }
        .style7
        {
            width: 100%;
        }
    </style>

</head>
<body topmargin=0 leftmargin=0 marginwidth=0 marginheight=0>
	<table border=0  cellspacing=0  cellpadding=0 height=100% class="style7">
		<tr>
			<td class="tdtools" colspan=3 height=26 valign=top><!--#include file="adm_menuadm.asp"--></td>
        </tr>
        <tr>
			<td class="tdtools2" width=50 valign=top><!--#include file="adm_menulat.asp"--></td>
			<td valign=top align=center class="style4">
				<table border=0 cellspacing=0 cellpadding=2 >
					<tr>
						<td valign=top class=style6>
							<!-- CONTEUDO DA PAGINA -->
							:: Páginas / <b>Editar Página(s)</b>
							<form name="form_inst" method="post" action="adm_institu_editar.asp?m=<%=request("m")%>&str=atu&cod_pagina=<%=request("cod_pagina")%>&ID=<%=request("ID")%>" <% IF HTML="N" then %>onSubmit="formwsubmit();"<%End If %>>
															<input type="hidden" name="texto" value="">
								<table width=70% border=1 cellspacing=0 cellpadding=0 background="CCCCCC" bordercolor="CCCCCC"> 
									<tr>
										<td align=center class="style5">
											<table border=0 cellspacing=2 cellpadding=0 background="CCCCCC" 
                                                bordercolor="CCCCCC" class=style3>
												<tr class=FCKeditor2> 
													<td colspan=2> Editar parágrafo da página 
														"<font color=red><%=rsTitulo("titulo_item")%></font>"</td>
												</tr>
												<tr class=FCKeditor>
													<td width="55%">  Titulo do Parágrafo:</td>
													<td width="45%"> 
														<input type="text" name="titulo" maxlength="150" size="30" onFocus="changeColor();" value="<%=rsInstitu("titulo")%>">
													</td>
												</tr>
												<tr class=FCKeditor> 
													<td>  Formatação da Fonte:</td>
													<td> 
														<select name="titulo_fonte">
															<option value="">Selecione</option>
															<option value="Arial" <%If rsInstitu("titulo_fonte")="Arial" then%>selected<%End If%>>Arial</option>
															<option value="Courier" <%If rsInstitu("titulo_fonte")="Courier" then%>selected<%End If%>>Courier</option>
															<option value="Impact" <%If rsInstitu("titulo_fonte")="Impact" then%>selected<%End If%>>Impact</option>
															<option value="MS Serif" <%If rsInstitu("titulo_fonte")="MS Serif" then%>selected<%End If%>>MS Serif</option>
															<option value="Tahoma" <%If rsInstitu("titulo_fonte")="Tahoma" then%>selected<%End If%>>Tahoma</option>
															<option value="Times New Roman" <%If rsInstitu("titulo_fonte")="Times New Roman" then%>selected<%End If%>>Times New Roman</option>
															<option value="Verdana"  <%If rsInstitu("titulo_fonte")="Verdana" then%>selected<%End If%>>Verdana</option>
														</select>
														<select name="titulo_fonte_tam">
															<option value="1" <%If rsInstitu("titulo_fonte_tam")="1" then%>selected<%End If%>>1</option>
															<option value="2" <%If rsInstitu("titulo_fonte_tam")="2" then%>selected<%End If%>>2</option>
															<option value="3" <%If rsInstitu("titulo_fonte_tam")="3" then%>selected<%End If%>>3</option>
															<option value="4" <%If rsInstitu("titulo_fonte_tam")="4" then%>selected<%End If%>>4</option>
															<option value="5" <%If rsInstitu("titulo_fonte_tam")="5" then%>selected<%End If%>>5</option>
															<option value="6" <%If rsInstitu("titulo_fonte_tam")="6" then%>selected<%End If%>>6</option>
														</select>
													</td>
												</tr>
												<tr class=FCKeditor>
													<td height=20>  <a class=red href="javascript:poppalheta('titulo_fonte_cor');">Cor 
														do Título</a>: 
														<input type="hidden" name="titulo_fonte_cor" value="<%=rsInstitu("titulo_fonte_cor")%>">
													</td>
													<td>
														<table width="25" border="1" cellspacing="0" cellpadding="0" bordercolor="#000000" height="25" >
															<tr> 
																<td id=titulofontecor background="imagens/fundocirc.gif" bgcolor="#<%=rsInstitu("titulo_fonte_cor")%>" onClick="javascript:poppalheta('titulo_fonte_cor');">
                                                                     </td>
															</tr>
														</table>
													</td>
												</tr>
												<tr class=FCKeditor> 
													<td valign=top>  Estilo do Título:</td>
													<td> 
														<input type="checkbox" name="titulo_fonte_formatacao" value="<b>" <%If Instr(1,rsInstitu("titulo_fonte_formatacao"),"<b>")>0 then%>checked<%End If%>>
														<b>Negrito</b> <br>
														<input type="checkbox" name="titulo_fonte_formatacao" value="<i>" <%If Instr(1,rsInstitu("titulo_fonte_formatacao"),"<i>")>0 then%>checked<%End If%>>
														<i>Italico</i> <br>
														<input type="checkbox" name="titulo_fonte_formatacao" value="<u>" <%If Instr(1,rsInstitu("titulo_fonte_formatacao"),"<u>")>0 then%>checked<%End If%>>
														<u>Sublinhado</u>
													</td>
												</tr>
												<tr class=FCKeditor> 
													<td>Área restrita</td>
													<td> <input type="radio" name="area_restrita" value="S" onClick="Display('S');" <%=iif(rsInstitu("area_restrita") = "S","checked","")%>>Sim  
                        								<input type="radio" name="area_restrita" value="N" onClick="Display('N');" <%=iif(rsInstitu("area_restrita") = "N","checked","")%>>Não
                        								<SPAN ID="restrito" style="display:none;">
                        									Selecione os grupos abaixo 
                        									<table width="90%" border="0">
                            									<tr> 
                              										<td>                               	      
																		<select name="grupo" size="3" multiple>                                	
																			<%Set rsL = conexao.execute("Select * from PERSITE_GRUPO ORDER BY GRUPO")
																			While not rsL.EOF%>
                                  												<option value="<%=rsL("COD_GRUPO")%>" <%=iif(inStr(1,rsInstitu("grupo"),"|"& rsL("COD_GRUPO") &"|")>0,"SELECTED","")%>><%=rsL("GRUPO")%></option>                                  	
                                  												<%rsL.MoveNext
                                  											Wend
                                  											rsL.Close
                                  											Set rsL = nothing%>
                                										</select>
                                										<script language="javascript">
                                											Display('<%=rsInstitu("area_restrita")%>');
                                										</script>
																	</td>
																</tr>
															</table>
														</span>
													</td>
												</tr>
												<tr class=FCKeditor> 
													<td colspan=2>  
														<input type="checkbox" name="titulo_publicar" value="S" <%If rsInstitu("titulo_publicar")="S" then%>checked<%End If%>>
														Publicar o Título na página
													</td>
												</tr>
												<tr class=FCKeditor> 
													<td colspan=2> </td>
												</tr>
												<% If HTML = "S" then %>
													<tr class=FCKeditor> 
														<td colspan=2> </td>
													</tr>
													<tr class=FCKeditor> 
														<td colspan=2> </td>
													</tr>
													<tr class=FCKeditor>
														<td colspan=2 align=center> 
															 </td>
													</tr>
													<tr class=FCKeditor> 
														<td width=40%> Formatação da Fonte:</td>
														<td> 
															<select name="texto_fonte">
																<option value="">Selecione</option>
																<option value="Arial" <%If rsInstitu("texto_fonte")="Arial" then%>selected<%End If%>>Arial</option>
																<option value="Courier" <%If rsInstitu("texto_fonte")="Courier" then%>selected<%End If%>>Courier</option>
																<option value="Impact" <%If rsInstitu("texto_fonte")="Impact" then%>selected<%End If%>>Impact</option>
																<option value="MS Serif" <%If rsInstitu("texto_fonte")="MS Serif" then%>selected<%End If%>>MS Serif</option>
																<option value="Tahoma" <%If rsInstitu("texto_fonte")="Tahoma" then%>selected<%End If%>>Tahoma</option>
																<option value="Times New Roman" <%If rsInstitu("texto_fonte")="Times New Roman" then%>selected<%End If%>>Times New Roman</option>
																<option value="Verdana" <%If rsInstitu("texto_fonte")="Verdana" then%>selected<%End If%>>Verdana</option>
															</select>
															<select name="texto_fonte_tam">
																<option value="1" <%If rsInstitu("texto_fonte_tam")="1" then%>selected<%End If%>>1</option>
																<option value="2" <%If rsInstitu("texto_fonte_tam")="2" then%>selected<%End If%>>2</option>
																<option value="3" <%If rsInstitu("texto_fonte_tam")="3" then%>selected<%End If%>>3</option>
																<option value="4" <%If rsInstitu("texto_fonte_tam")="4" then%>selected<%End If%>>4</option>
																<option value="5" <%If rsInstitu("texto_fonte_tam")="5" then%>selected<%End If%>>5</option>
																<option value="6" <%If rsInstitu("texto_fonte_tam")="6" then%>selected<%End If%>>6</option>
															</select>
														</td>
													</tr>
													<tr class=FCKeditor> 
														<td height=20> <a class=red href="javascript:poppalheta('texto_fonte_cor','<%=rsInstitu("texto_fonte_cor")%>');">Cor 
															da Fonte</a>: 
															<input type="hidden" name="texto_fonte_cor" size="1"  value="<%=rsInstitu("texto_fonte_cor")%>">
														</td>
														<td> 
															<table width="25" border="1" cellspacing="0" cellpadding="0" bordercolor="#000000" height="25" >
																<tr> 
																	<td id=textofontecor background="imagens/fundocirc.gif" bgcolor="#<%=rsInstitu("texto_fonte_cor")%>" onClick="javascript:poppalheta('texto_fonte_cor','<%=rsInstitu("texto_fonte_cor")%>');">
                                                                         </td>
																</tr>
															</table>
														</td>
													</tr>
													<tr class=FCKeditor> 
														<td valign=top> Estilo da Fonte:</td>
														<td> 
															<input type="checkbox" name="texto_fonte_formatacao" value="<b>" <%If Instr(1,rsInstitu("texto_fonte_formatacao"),"<u>")>0 then%>checked<%End If%>>
															<b>Negrito</b> <br>
															<input type="checkbox" name="texto_fonte_formatacao" value="<i>" <%If Instr(1,rsInstitu("texto_fonte_formatacao"),"<i>")>0 then%>checked<%End If%>>
															<i>Italico</i> <br>
															<input type="checkbox" name="texto_fonte_formatacao" value="<u>" <%If Instr(1,rsInstitu("texto_fonte_formatacao"),"<u>")>0 then%>checked<%End If%>>
															<u>Sublinhado</u>
														</td>
													</tr>
												<%ElseIf HTML="N" then %>
													<tr class=FCKeditor>
														<td colspan=2 align=center class="style1">
                                                         
                                                            <%
                                                        Dim oFCKeditor
                                                        Dim textarea
                                                        textarea= rsInstitu("texto")
                                                        Set oFCKeditor = New FCKeditor
                                                        oFCKeditor.BasePath = "/admin/" 
                                                        oFCKeditor.Value = textarea
                                                        oFCKeditor.Create "textarea"
                                                            %>		
														
														
														</td>
													</tr>
													<tr class=FCKeditor> 
														<td colspan=2 align=center><p>
															
													
															
															</p>
														</td>
													</tr>
												<% End If %> 
												<tr class=FCKeditor>
													<td>  Imagem:</td>
													<td> 
														<select name="arquivos" onChange="altera_img();">
															<option value="">Selecione</option>
															<% If rsInstitu("imagem_url")<>"" then%>
																<option value="<%=rsInstitu("imagem_url")%>" selected><%=rsInstitu("imagem_url")%></option>
															<% End If %>
															<%=lista_subdiretorio(dir)%> 
														</select>
													</td>
												</tr>
												<tr class=FCKeditor> 
													<td valign=top>  Alinhamento em relação ao texto:</td>
													<td> 
														<input type="radio" name="imagem_align" value="left" <%If rsInstitu("imagem_align")="left" then%>checked<%End if%>>À esquerda <br>
														<input type="radio" name="imagem_align" value="right" <%If rsInstitu("imagem_align")="right" then%>checked<%End if%>>À direita <br>
														<input type="radio" name="imagem_align" value="meio" <%If rsInstitu("imagem_align")="meio" then%>checked<%End if%>>Centralizado <br>
														<input type="radio" name="imagem_align" value="acima" <%If rsInstitu("imagem_align")="acima" then%>checked<%End if%>>Acima <br>
														<input type="radio" name="imagem_align" value="baixo" <%If rsInstitu("imagem_align")="baixo" then%>checked<%End if%>>Abaixo 
													</td>
												</tr>
												<tr class=FCKeditor> 
													<td colspan=2>  <img <% If rsInstitu("imagem_url")<>"" then%>src="../imagens/<%=rsInstitu("imagem_url")%>"<%Else%>src="imagens/white.jpg"<%End If %> name="imagem"></td>
												</tr>
												<tr class=FCKeditor> 
													<td colspan=2>  Deseja incluir uma tabela dinâmica 
													neste parágrafo?</td>
												</tr>
												<tr class=FCKeditor> 
													<td colspan=2>  
														<select name="cod_tabela">
															<option value="0">Sem tabela</option>
															<% Set rsTabelas = conexao.execute("select cod_tbl,tab_nome from tbl_propriedades WHERE flg_del <> 'S' order by tab_nome")
															while not rsTabelas.eof %>
																<option value="<%=rsTabelas("cod_tbl")%>" <%If rsInstitu("cod_tabela")=rsTabelas("cod_tbl") then%>selected<%End If%>><%=rsTabelas("tab_nome")%></option>
																<% rsTabelas.movenext
															WEND
															rsTabelas.Close
															Set rsTabelas=nothing %>
														</select>
													</td>
												</tr>
												<tr class=FCKeditor>
													<td colspan=2>  Deseja incluir formulário 
													dinâmico neste parágrafo?</td>
												</tr>
												<tr class=FCKeditor> 
													<td colspan=2>  
														<select name="cod_form">
															<option value="0">Sem Formulario</option>
															<% Set rsForm = conexao.execute("select cod_form,form_nome from tab_form_configuracao where flg_del <> 'S' order by form_nome")
															while not rsForm.eof %>
																<option value="<%=rsForm("cod_form")%>" <%If rsInstitu("cod_form")=rsForm("cod_form") then%>selected<%End If%>><%=rsForm("form_nome")%></option>
																<% rsForm.movenext
															WEND
															rsForm.Close
															Set rsForm=nothing %>
														</select>
													</td>
												</tr>
												<tr class=FCKeditor> 
													<td colspan=2>  Deseja incluir uma tabela de TXT neste parágrafo?</td>
												</tr>
												<tr class=FCKeditor> 
													<td colspan=2>  
														<select name="cod_txt">
															<option value="0">Sem Formulario</option>
															<% Set rsTXT = conexao.execute("select cod_form,form_nome from jet_form_configuracao order by form_nome")
															while not rsTXT.eof %>
																<option value="<%=rsTXT("cod_form")%>" <%If rsInstitu("cod_txt")=rsTXT("cod_form") then%>selected<%End If%>><%=rsTXT("form_nome")%></option>
																<% rsTXT.movenext
															WEND
															rsTXT.Close
															Set rsTXT=nothing %>
														</select>
													</td>
												</tr>
												<tr class=FCKeditor> 
													<td colspan=2>  Deseja incluir uma tabela com registro de algum formulario?</td>
												</tr>
												<tr class=FCKeditor>
													<td colspan=2> 
														<select name="form_reg">
															<option value="0">Sem Formulario</option>
															<% Set rsForm = conexao.execute("select cod_form,form_nome from tab_form_configuracao where flg_del <> 'S' order by form_nome")
															while not rsForm.eof %>
                            									<option value="<%=rsForm("cod_form")%>"  <%If trim(rsInstitu("form_reg")) = trim(rsForm("cod_form")) then%>selected<%End If%>><%=rsForm("form_nome")%></option>
																<% rsForm.movenext
   															WEND
   															rsForm.Close
   															Set rsForm=nothing %>
														</select>
													</td>
												</tr>
												<tr>
											 <td colspan=2 height="12">  Deseja incluir um ThumbNail 
												  neste parágrafo?</td>
											  </tr>
											  <tr class=FCKeditor> 
												<td colspan=2>  
												
												  <select name="ThumbNail">
													<option value="0">Sem ThumbNail</option>
													<% Set rsThumbNail = conexao.execute("select * from ext_ThumbNail order by titulo_ThumbNail") %>
													<% while not rsThumbNail.eof %>
													<option value="<%=rsThumbNail("cod_ThumbNail")%>" <%If rsInstitu("cod_ThumbNail")=rsThumbNail("cod_ThumbNail") then%>selected<%End If%>><%=rsThumbNail("titulo_ThumbNail")%></option>
													<% rsThumbNail.movenext
													   WEND
													   rsThumbNail.Close
													   Set rsThumbNail=nothing 
													%>
												  </select>				
						
												</td>
                      												
												</tr>
												<tr class=FCKeditor> 
													<td colspan=2>  Deseja incluir um Link Interno neste parágrafo?</td>
												</tr>
												<tr class=FCKeditor>
													<%
													'traz os "diretorios pai" que não tem conteúdo, só tem filho
													sqlm = "select distinct titulo_item,cod_pagina from menu_site where cod_pai=0 and modelo_padrao=0"
													Set rsMenuSub = conexao.execute(sqlm)

													'traz os itens do menu que são pai, sem filho
													Set rsPaginasRaiz = conexao.execute("select distinct titulo_item,cod_pagina,modelo_padrao from menu_site where cod_pai = 0 and modelo_padrao <> 0") 
													Set rsPaginasFilho = server.createobject("ADODB.Recordset") 
  
													while not rsMenuSub.eof
														rsPaginasFilho.open "select titulo_item,cod_pagina,modelo_padrao from menu_site where cod_pai="&rsMenuSub("cod_pagina")&" and modelo_padrao<>0", conexao, 3, 3
														while not rsPaginasFilho.eof
															combo_internas = combo_internas & "<option value="&rsPaginasFilho("cod_pagina")&">"&rsMenuSub("titulo_item")&"/"&rsPaginasFilho("titulo_item")&"</option>"
															rsPaginasFilho.movenext
														WEND
														rsPaginasFilho.Close
														rsMenuSub.movenext
													WEND
													rsMenuSub.Close
    												Set rsMenuSub=nothing

													while not rsPaginasRaiz.eof
														combo_internas = combo_internas & "<option value="&rsPaginasRaiz("cod_pagina")&">"&rsPaginasRaiz("titulo_item")&"</option>"
														rsPaginasRaiz.movenext
													WEND
													rsPaginasRaiz.Close
													Set rsPaginasRaiz=nothing%>
													<td>  Página: </td>
													<td>
														<select name="cod_link" style="background-color: #<%=bglinha%>; color: #000000; font-family: Verdana; font-size: 7pt">
															<option value="0">Sem Link Interno</option>
															<% IF rsInstitu("cod_link")<>0 then 
																sqlt = "select titulo_item from menu_site where cod_pagina="&rsInstitu("cod_link")
	  															Set rsTabNome=conexao.execute(sqlt) 
																if not rsTabNome.eof then%>
																	<option value="<%=rsInstitu("cod_link")%>" selected> - - <%=rsTabNome("titulo_item")%> - - </option>
																<%End If ' a tabela existe
																rsTabNome.close
																set rsTabNome=nothing
															End If 'o codigo do link eh maior que zero %>
															<%=combo_internas%> 
														</select>
													</td>
												</tr>
												<tr class=FCKeditor> 
													<td>  Descrição:</td>
													<td> 
														<input type="text" name="link_string" size="30" maxlength="50" style="background-color: #<%=bglinha%>; color: #000000; font-family: Verdana; font-size: 7pt" value="<%=rsInstitu("link_string")%>">
													</td>
												</tr>
												<tr class=FCKeditor> 
													<td colspan=2 align=center> 
														<input type="radio" name="Publicar" value="S" <%If rsInstitu("publicar")="S" then%>checked<%End if%>>Publicar   
														<input type="radio" name="Publicar" value="N" <%If rsInstitu("publicar")="N" then%>checked<%End if%>>Não Publicar   
														<input type="radio" name="Publicar" value="D" <%=PermDelPagButton()%>>Deletar Parágrafo <br>
														<br>
														<input type="submit" name="Submit" value="Salvar" <%=PermAltPag()%> onClick="MM_validateForm('titulo','','R');return document.MM_returnValue">
														
														
														<script language=javascript>

														    function contingut_html(nom_editor) {
														        var obj_ed = eval("document." + nom_editor);
														        var cont = obj_ed.DocumentHTML;
														        var texto = "" + cont
														        var complet = eval(nom_editor + '_doc_complet');
														        if (!complet) {
														            texto = strip_body(texto);
														        }
														        return texto
														    } 														   										    
														    
														    var tbCE_doc_complet = 1;
														    function tbCE_guardar() {
														        var cont = contingut_html('textarea');
														        //document.tbCE_doc_html.tbCE_contingut_html.value = cont; 
														        //salvar_html(cont); 
														         }   
														</SCRIPT> 
														<script language=javascript>
														    tbCE_timerID = setInterval("tbCE_inicial()", 100);
														    function tbCE_inicial() {
														        if (document["textarea"]) {
														            obj_editor = document.conteudo;
														            // REMOVIDO document.conteudo.DocumentHTML = document.form_inst.cod_fonte.value; 
														            clearInterval(tbCE_timerID);
														            }
														        return true;
														        }
														</SCRIPT>

														<%
														If rsInstitu("texto")<>"" then
															conteudo = replace(replace(rsInstitu("texto"),vbcrlf,""),chr(34),"'")
														Else
															textarea = "  "
														End If
														%>
														<input type="hidden" name="cod_fonte" value="<%=textarea%>">
														<input type="hidden" name="holdtext">
														
													</td>
												</tr>
											</table>
										</td>
									</tr>
								</table>
							</form>
							<!-- FINAL -->
						</td>
					</tr>
				</table>
			</td>
			<td></td>
		</tr>
	</table>
<%

Class FCKeditor

	private sBasePath
	private sInstanceName
	private sWidth
	private sHeight
	private sToolbarSet
	private sValue

	private oConfig

	Private Sub Class_Initialize()
		sBasePath		= "/admin/"
		sWidth			= "700"
		sHeight			= "350"
		sToolbarSet		= "Default"
		sValue			= ""

		Set oConfig = CreateObject("Scripting.Dictionary")
	End Sub

	Public Property Let BasePath( basePathValue )
		sBasePath = basePathValue
	End Property

	Public Property Let InstanceName( instanceNameValue )
		sInstanceName = instanceNameValue
	End Property

	Public Property Let Width( widthValue )
		sWidth = widthValue
	End Property

	Public Property Let Height( heightValue )
		sHeight = heightValue
	End Property

	Public Property Let ToolbarSet( toolbarSetValue )
		sToolbarSet = toolbarSetValue
	End Property

	Public Property Let Value( newValue )
		If ( IsNull( newValue ) OR IsEmpty( newValue ) ) Then
			sValue = ""
		Else
			sValue = newValue
		End If
	End Property

	Public Property Let Config( configKey, configValue )
		oConfig.Add configKey, configValue
	End Property

	' Generates the instace of the editor in the HTML output of the page.
	Public Sub Create( instanceName )
		response.write CreateHtml( instanceName )
	end Sub

	' Returns the html code that must be used to generate an instance of FCKeditor.
	Public Function CreateHtml( instanceName )
		dim html

		If IsCompatible() Then

			Dim sFile, sLink
			If Request.QueryString( "fcksource" ) = "true" Then
				sFile = "fckeditor.original.html"
			Else
				sFile = "fckeditor.html"
			End If

			sLink = sBasePath & "editor/" & sFile & "?InstanceName=" + instanceName

			If (sToolbarSet & "") <> "" Then
				sLink = sLink + "&Toolbar=" & sToolbarSet
			End If

			html = ""
			' Render the linked hidden field.
			html = html & "<input type=""hidden"" id=""" & instanceName & """ name=""" & instanceName & """ value=""" & Server.HTMLEncode( sValue ) & """ style=""display:none"" />"

			' Render the configurations hidden field.
			html = html & "<input type=""hidden"" id=""" & instanceName & "___Config"" value=""" & GetConfigFieldString() & """ style=""display:none"" />"

			' Render the editor IFRAME.
			html = html & "<iframe id=""" & instanceName & "___Frame"" src=""" & sLink & """ width=""" & sWidth & """ height=""" & sHeight & """ frameborder=""0"" scrolling=""no""></iframe>"

		Else

			Dim sWidthCSS, sHeightCSS

			If InStr( sWidth, "%" ) > 0  Then
				sWidthCSS = sWidth
			Else
				sWidthCSS = sWidth & "px"
			End If

			If InStr( sHeight, "%" ) > 0  Then
				sHeightCSS = sHeight
			Else
				sHeightCSS = sHeight & "px"
			End If

			html = "<textarea name=""" & instanceName & """ rows=""4"" cols=""40"" style=""width: " & sWidthCSS & "; height: " & sHeightCSS & """>" & Server.HTMLEncode( sValue ) & "</textarea>"

		End If

		CreateHtml = html

	End Function

	Private Function IsCompatible()

		IsCompatible = FCKeditor_IsCompatibleBrowser()

	End Function

	Private Function GetConfigFieldString()

		Dim sParams

		Dim bFirst
		bFirst = True

		Dim sKey
		For Each sKey in oConfig

			If bFirst = False Then
				sParams = sParams & "&"
			Else
				bFirst = False
			End If

			sParams = sParams & EncodeConfig( sKey ) & "=" & EncodeConfig( oConfig(sKey) )

		Next

		GetConfigFieldString = sParams

	End Function

	Private Function EncodeConfig( valueToEncode )
		' The locale of the asp server makes the conversion of a boolean to string different to "true" or "false"
		' so we must do it manually
    If vartype(valueToEncode) = vbBoolean then
			If valueToEncode=True Then
				EncodeConfig="True"
			Else
				EncodeConfig="False"
			End If
		Else
			EncodeConfig = Replace( valueToEncode, "&", "%26" )
			EncodeConfig = Replace( EncodeConfig , "=", "%3D" )
			EncodeConfig = Replace( EncodeConfig , """", "%22" )
		End if

	End Function

End Class



' A function that can be used to check if the current browser is compatible with FCKeditor
' without the need to create an instance of the class.
Function FCKeditor_IsCompatibleBrowser()


	Dim sAgent
	sAgent = Request.ServerVariables("HTTP_USER_AGENT")

	Dim iVersion
	Dim re, Matches

	If InStr(sAgent, "MSIE") > 0 AND InStr(sAgent, "mac") <= 0  AND InStr(sAgent, "Opera") <= 0 Then
		iVersion = CInt( FCKeditor_ToNumericFormat( Mid(sAgent, InStr(sAgent, "MSIE") + 5, 3) ) )
		FCKeditor_IsCompatibleBrowser = ( iVersion >= 5.5 )
	ElseIf InStr(sAgent, "Gecko/") > 0 Then
		iVersion = CLng( Mid( sAgent, InStr( sAgent, "Gecko/" ) + 6, 8 ) )
		FCKeditor_IsCompatibleBrowser = ( iVersion >= 20030210 )
	ElseIf InStr(sAgent, "Opera/") > 0 Then
		iVersion = CSng( FCKeditor_ToNumericFormat( Mid( sAgent, InStr( sAgent, "Opera/" ) + 6, 4 ) ) )
		FCKeditor_IsCompatibleBrowser = ( iVersion >= 9.5 )
	ElseIf InStr(sAgent, "AppleWebKit/") > 0 Then
		Set re = new RegExp
		re.IgnoreCase = true
		re.global = false
		re.Pattern = "AppleWebKit/(\d+)"
		Set Matches = re.Execute(sAgent)
		FCKeditor_IsCompatibleBrowser = ( re.Replace(Matches.Item(0).Value, "$1") >= 522 )
	Else
		FCKeditor_IsCompatibleBrowser = False
	End If

End Function


' By Agrotic
' On ASP, when converting string to numbers, the number decimal separator is localized
' so 5.5 will not work on systems were the separator is "," and vice versa.
Private Function FCKeditor_ToNumericFormat( numberStr )

	If IsNumeric( "5.5" ) Then
		FCKeditor_ToNumericFormat = Replace( numberStr, ",", ".")
	Else
		FCKeditor_ToNumericFormat = Replace( numberStr, ".", ",")
	End If

End Function

 %>
</body>
</html>








<%
set rsPaginasFilho=nothing

rsInstitu.Close
Set rsInstitu=nothing

rsTitulo.close
set rsTitulo=nothing

conexao.close
Set conexao=nothing
%>


Compartilhar este post


Link para o post
Compartilhar em outros sites

Prezados(as)

 

Alguém sabe algum fórum em português especifíco sobre o Fck?

 

Obrigado

Compartilhar este post


Link para o post
Compartilhar em outros sites

Dê uma pesquisada aqui mesmo no fórum, há um tópico específico com duvidas e pequenas alterações no FCK.

Compartilhar este post


Link para o post
Compartilhar em outros sites

×

Informação importante

Ao usar o fórum, você concorda com nossos Termos e condições.