Usamos cookies para medir audiência e melhorar sua experiência. Você pode aceitar ou recusar a qualquer momento. Veja sobre o iMasters.
Olá
pessoal,
Coloquei no meu código esse recurso para editar parecido com esse do fórum só que é o htmlarea, na minha máquina está passando normal e consigo alterar os dados, mas quando coloco os arquivos no servidor fica dando esse erro:
Warning: Cannot modify header information - headers already sent by (output started at /home/redesind/public_html/sintalocas/_noticia_inserir.php:4) in /home/redesind/public_html/sintalocas/_noticia_inserir.php on line 90
A linha que possui o header é que parece estar com problemas. Parece que não pode ter nada já publicado no cabeçalho antes ou algo assim.
AGUARDO UMA AJUDA POIS JÁ TENTEI TUDO QUE PODIA
Ai está meu código se alguém tiver como dar uma olhada
<head>
<!-- SCRIPT DO HTMLAREA-->
<script language="Javascript1.2">
<!-- // load htmlarea
_editor_url = "htmlarea/"; // URL to htmlarea files
var win_ie_ver = parseFloat(navigator.appVersion.split("MSIE")[1]);
if (navigator.userAgent.indexOf('Mac') >= 0) { win_ie_ver = 0; }
if (navigator.userAgent.indexOf('Windows CE') >= 0) { win_ie_ver = 0; }
if (navigator.userAgent.indexOf('Opera') >= 0) { win_ie_ver = 0; }
if (win_ie_ver >= 5.5) {
document.write('<scr' + 'ipt src="' +_editor_url+ 'editor.js"');
document.write(' language="Javascript1.2"></scr' + 'ipt>');
} else { document.write('<scr'+'ipt>function editor_generate() { return false; }</scr'+'ipt>'); }
// -->
</script>
<!-- ESTILOS-->
<style type="text/css">
<!--
.style38 { color: #FFFFFF;
font-weight: bold;
font-size: 14;
}
<style type="text/css">
<!--
{
background-color: #EFEFEF;
}
.style22 {font-size: 10px}
.style25 {font-size: 12px; font-family: Tahoma; color: #555555; }
.style3 {font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 11px; }
.style39 {
font-size: 14px;
font-weight: bold;
}
-->
</style>
</head>
<?php require_once('Connections/conexao.php'); ?>
<?php
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
{
$theValue = (!get_magic_quotes_gpc()) ? addslashes($theValue) : $theValue;
switch ($theType) {
case "text":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "long":
case "int":
$theValue = ($theValue != "") ? intval($theValue) : "NULL";
break;
case "double":
$theValue = ($theValue != "") ? "'" . doubleval($theValue) . "'" : "NULL";
break;
case "date":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "defined":
$theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
break;
}
return $theValue;
}
$editFormAction = $_SERVER['PHP_SELF'];
if (isset($_SERVER['QUERY_STRING'])) {
$editFormAction .= "?" . htmlentities($_SERVER['QUERY_STRING']);
}
if ((isset($_POST["MM_insert"])) && ($_POST["MM_insert"] == "form1")) {
$insertSQL = sprintf("INSERT INTO a4 (tp1a4, tg1a4, seqa1) VALUES (%s, %s, 1)",
GetSQLValueString($_POST['tp1a4'], "text"),
GetSQLValueString($_POST['tg1a4'], "text"));
mysql_select_db($database_conexao, $conexao);
$Result1 = mysql_query($insertSQL, $conexao) or die(mysql_error());
$insertGoTo = "_noticia_inserido.php";
if (isset($_SERVER['QUERY_STRING'])) {
$insertGoTo .= (strpos($insertGoTo, '?')) ? "&" : "?";
$insertGoTo .= $_SERVER['QUERY_STRING'];
}
header(sprintf("Location: %s", $insertGoTo));
}
?>
<script language="JavaScript" type="text/JavaScript">
<!--
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*[n];*
* for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers**.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**);*
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+'\n'; }
} if (errors) alert('Campo de digitação obrigatória !\n');
document.MM_returnValue = (errors == '');
}// } if (errors) alert('Campo de digitação obrigatória !\n + erros');
//-->
</script>
<body>
<script language="JavaScript1.2" defer>
editor_generate('tg1a4');
</script>
*<table width="700" bgcolor="#FFFFFF" border="0" cellspacing="0" cellpadding="0">*
* <tr>*
* <td width="10" height="254" bgcolor="#FFFFFF"></td>*
* <td width="535" background="imagens/marca_dgua.jpg" class="style25"> <table width="59%" height="40" bgcolor="#FF0000">*
* <tr>*
* <td width="399"><span class="style38">[PAINEL DE CONTROLE] <br>*
* Você está incluindo uma notícias</span></td>*
* </tr>*
* </table>*
<P
align=center class=MsoNormal style13
style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: center; mso-layout-grid-align: none"> </P>
* <form action="<?php echo $editFormAction; ?>" method="POST" name="form1" onSubmit="MM_validateForm('tp1a4','','R','tg1a4','','R');return document.MM_returnValue">*
* <table align="center">*
* <tr valign="baseline" class="style3">*
* <td><label> Assunto:<br>*
* <input name="tp1a4" type="text" id="tp1a4" value="" size="32" maxlength="50">*
* </label></td>*
* </tr>*
* <tr valign="baseline" class="style3">*
* <td> Notícia:<br>*
* <textarea name="tg1a4" cols="60" rows="20" id="tg1a4"></textarea></td>*
* </tr>*
* <tr valign="baseline" class="style3">*
* <td><input type="submit" value="Incluir"></td>*
* </tr>*
* </table>*
* <input type="hidden" name="MM_insert" value="form1">*
* </form>*
* <p><br>*
* <span class="style39">Obs.: Para pular apenas uma linha tecle <enter> com <shift> pressionado.</span> <br>*
* <br>*
* </p>*
<P class=style22
*style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: justify; mso-layout-grid-align: none" style13> </P> </td>*
* </tr>*
*</table>*
</body>
Carregando comentários...