Usamos cookies para medir audiência e melhorar sua experiência. Você pode aceitar ou recusar a qualquer momento. Veja sobre o iMasters.
Bom dia pessoal,
Me ajudaaaaaaaaaa, a coisa ta feia...., tudo que faço da errado.
Seguinte sei que ja é um erro conhecido tanto que achei bastante coisa no forum a respeito o famozo
Cannot modify header information
Warning: Cannot modify header information - headers already sent by (output started at /home/httpd/vhosts/obraprimaguia.com.br/httpdocs/define.php:3) in /home/httpd/vhosts/obraprimaguia.com.br/httpdocs/login.php on line 74
Warning: Cannot modify header information - headers already sent by (output started at /home/httpd/vhosts/obraprimaguia.com.br/httpdocs/define.php:3) in /home/httpd/vhosts/obraprimaguia.com.br/httpdocs/top.php on line 75
porem não consigo resolver... fiz de tudo que tinha no forum e nada veja se alguem consegue pq meus cabelos ja cairam todos e o restante eu to rancando com a unha
define.php
<?php
session_start();
ob_start();
session_destroy();
header("Content-Type: text/html; charset=UTF-8",true);
?>
<?php
define("DEBUG",0);
function __autoload($class){
$arquivo = "./inc/class/".$class.".class.php";
if (file_exists($arquivo)) include_once($arquivo);
}
$conn = new Conexao();
$flash = new Flash();
$menu = new Menu();
include_once("./inc/mail/class.phpmailer.php");
$mail = new PHPMailer();
//$mail = AddBcc("webmaster@itecnetwork.com.br");
$pgExec = basename($_SERVER["PHP_SELF"]);
$url = basename($_SERVER['REQUEST_URI']);
//materia
if($pgExec="materia.php"){
if(is_numeric($_GET["id"])){
$sql = "SELECT PASSOS.PASSO, PASSOS.TITULO AS SECAO, MATERIA.TITULO, MATERIA.CODIGO, MATERIA.RESUMO, MATERIA.DESCRICAO, IMAGEM.IMAGEM FROM PASSOS ";
$sql = "INNER JOIN MATERIA ON PASSOS.PASSO=MATERIA.PASSO ";
$sql = "INNER JOIN IMAGEM ON MATERIA.CODIGO=IMAGEM.CODIGO_VINCULADO AND IMAGEM.TABELA_VINCULADA='MATERIA' ";
$sql = "WHERE IMAGEM.PRINCIPAL='Sim' AND MATERIA.CODIGO=".$_GET["id"];
$materia = $conn = execute($sql); $materia = array_shift($materia);
$passo = $materia["PASSO"];
if($passo==1) $passoCor = "#b1c800";
elseif($passo==2) $passoCor = "#f6a800";
elseif($passo==3) $passoCor = "#009ee0";
elseif($passo==4) $passoCor = "#a5027d"; header("Location:index.php");
}
}
//Arquitetos
$arqs = array(
array("alvarocortes/", "Álvaro Cortes - Mavsa Spa e Resort", "R.R. Ruffino", "Álvaro Cortes",""),
array("farinazzo/", "Fernando Farinazzo - Projeto Residencial", "Jefferson Ohara", "Fernando Farinazzo",""),
array("farinazzo1/", "Fernando Farinazzo - Projeto Residencial 1", "Jefferson Ohara", "Fernando Farinazzo",""),
array("farinazzo2/", "Fernando Farinazzo - Projeto Residencial 2", "Jefferson Ohara", "Fernando Farinazzo",""),
array("farinazzo3/", "Fernando Farinazzo - Projeto Residencial 3", "Jefferson Ohara", "Fernando Farinazzo",""),
array("farinazzo4/", "Fernando Farinazzo - Projeto Residencial 4", "Fábio Pitrez", "Fernando Farinazzo",""),
array("farinazzo5/", "Fernando Farinazzo - Projeto Residencial 5", "Fábio Pitrez", "Fernando Farinazzo",""),
array("gl/", "Géssica Lourenço", "", "Géssica Lourenço",""),
array("lucianadematte1/", "Luciana Dematté - Residencial Imbuias", "Jefferson Ohara", "Luciana Dematté",""),
array("lucianadematte2/", "Luciana Dematté - Royal Golf", "Jefferson Ohara", "Luciana Dematté",""),
array("omk/", "OMK Arquitetura - Conforto e Integração", "Jackson Yonegura", "OMK Arquitetura",""),
array("ophicina/", "Ophicina Arquitetura - Projeto Comercia", "Turkinho", "Ophicina Arquitetura",""),
array("ophicinac1/", "Ophicina Arquitetura - Projeto Comercia 1", "Turkinho", "Ophicina Arquitetura",""),
array("ophicinac2/", "Ophicina Arquitetura - Projeto Comercia 2", "Turkinho", "Ophicina Arquitetura",""),
array("ophicinac3/", "Ophicina Arquitetura - Projeto Comercial 3", "Turkinho", "Ophicina Arquitetura",""),
array("ophicinac4/", "Ophicina Arquitetura - Projeto Comercial 4", "Turkinho", "Ophicina Arquitetura",""),
array("ophicinac5/", "Ophicina Arquitetura - Projeto Comercial 5", "Turkinho", "Ophicina Arquitetura",""),
array("ophicinar1/", "Ophicina Arquitetura - Projeto Residencial 1", "Turkinho", "Ophicina Arquitetura",""),
array("ophicinar2/", "Ophicina Arquitetura - Projeto Residencial 2", "Turkinho", "Ophicina Arquitetura",""),
array("vivianemartinez/", "Viviane Martinez - Ambiente Clássico", "Jefferson Ohara", "Viviane Martinez",""));
$tot = count($arqs);
$iarq = (strstr($url,"?arq")) ?$_GET["arq"]: mt_rand(0,20);
$arq = $arqs[$iarq];
$dir = "images/arquitetos/".$arq[0];
$dir2 = $dir; $dir = opendir($dir);$total = count($arquivos);
$foto = $arquivos[mt_rand(0,($total-1))];
if($pgExec=="index.php") include_once "xml.php";
?>
login.php
<?php require_once('Connections/conexao.php'); ?>
<?php require_once('define.php'); ?>
<?php
if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
{
if (PHP_VERSION < 6) {
$theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
}
$theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($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;
}
}
?>
<?php
// *** Validate request to login to this site.
if (!isset($_SESSION)) {
session_start();
}
$loginFormAction = $_SERVER['PHP_SELF'];
if (isset($_GET['accesscheck'])) {
$_SESSION['PrevUrl'] = $_GET['accesscheck'];
}
if (isset($_POST['usoEmail'])) {
$loginUsername=$_POST['usoEmail'];
$password=$_POST['usoSenha'];
$MM_fldUserAuthorization = "";
$MM_redirectLoginSuccess = "revista.php";
$MM_redirectLoginFailed = "login.php?erroLogin=true";
$MM_redirecttoReferrer = false;
mysql_select_db($database_conexao, $conexao);
$LoginRS__query=sprintf("SELECT usoEmail, usoSenha FROM `user` WHERE usoEmail=%s AND usoSenha=%s",
GetSQLValueString($loginUsername, "text"), GetSQLValueString($password, "text"));
$LoginRS = mysql_query($LoginRS__query, $conexao) or die(mysql_error());
$loginFoundUser = mysql_num_rows($LoginRS);
if ($loginFoundUser) {
$loginStrGroup = "";
if (PHP_VERSION >= 5.1) {session_regenerate_id(true);} else {session_regenerate_id();}
//declare two session variables and assign them
$_SESSION['MM_Username'] = $loginUsername;
$_SESSION['MM_UserGroup'] = $loginStrGroup;
if (isset($_SESSION['PrevUrl']) && false) {
$MM_redirectLoginSuccess = $_SESSION['PrevUrl'];
}
header("Location: " . $MM_redirectLoginSuccess );
}
else {
header("Location: ". $MM_redirectLoginFailed );
}
}
?>
<?php include_once "top.php";?>
<link rel="stylesheet" type="text/css" href="css/default.css"/>
<div id="home">
<div id="corpo"><br/>
<div id="titulo">Área de acesso exclusivo para assinantes</div><br/><br/>
<div>
<div id="fundassine1">
<div id="clique">
<a href="cadastro.php"><img src="images/assine/clique.png"/></a></div>
<div id="logando">
<div id="campoemail2">
<div id="assinemail">
<form id="form1" name="form1" method="POST" action="<?php echo $loginFormAction; ?>">
<label for="usoEmail"></label>
<input type="text" name="usoEmail" id="usoEmail" />
<div id="assinesenha">
<label for="usoSenha"></label>
<input type="password" name="usoSenha" id="usoSenha" />
<input type="submit" name="button" value="Entrar" /></div>
</form>
</div>
<br/>
<a href="recupera-senha.php"><br />
<div align="left">
Esqueceu sua senha?</div></a>
</form>
<table cellpadding="0" cellspacing="0">
<td width="250">
<tr>
<td>
<br/>
<?php if(isset($_GET['erroLogin'])):?><div align="left">
O usuário ou senha informados não estão corretos, por favor verifique as informações digitadas e tente novamente.</div>
<?php endif; ?>
<tr>
</table>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<br />
<br />
<br />
<?php include_once "bottom.php";?>
top.php
<?php require_once('Connections/conexao.php'); ?>
<?php require_once('define.php'); ?>
<?php
if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
{
if (PHP_VERSION < 6) {
$theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
}
$theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($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;
}
}
?>
<?php
// *** Validate request to login to this site.
if (!isset($_SESSION)) {
session_start();
}
$loginFormAction = $_SERVER['PHP_SELF'];
if (isset($_GET['accesscheck'])) {
$_SESSION['PrevUrl'] = $_GET['accesscheck'];
}
if (isset($_POST['usoEmail'])) {
$loginUsername=$_POST['usoEmail'];
$password=$_POST['usoSenha'];
$MM_fldUserAuthorization = "";
$MM_redirectLoginSuccess = "revista.php";
$MM_redirectLoginFailed = "login.php?erroLogin=true";
$MM_redirecttoReferrer = false;
mysql_select_db($database_conexao, $conexao);
$LoginRS__query=sprintf("SELECT usoEmail, usoSenha FROM `user` WHERE usoEmail=%s AND usoSenha=%s",
GetSQLValueString($loginUsername, "text"), GetSQLValueString($password, "text"));
$LoginRS = mysql_query($LoginRS__query, $conexao) or die(mysql_error());
$loginFoundUser = mysql_num_rows($LoginRS);
if ($loginFoundUser) {
$loginStrGroup = "";
if (PHP_VERSION >= 5.1) {session_regenerate_id(true);} else {session_regenerate_id();}
//declare two session variables and assign them
$_SESSION['MM_Username'] = $loginUsername;
$_SESSION['MM_UserGroup'] = $loginStrGroup;
if (isset($_SESSION['PrevUrl']) && false) {
$MM_redirectLoginSuccess = $_SESSION['PrevUrl'];
}
header("Location: " . $MM_redirectLoginSuccess );
}
else {
header("Location: ". $MM_redirectLoginFailed );
}
}
?>
<?php include_once "top.php";?>
<link rel="stylesheet" type="text/css" href="css/default.css"/>
<div id="home">
<div id="corpo"><br/>
<div id="titulo">Área de acesso exclusivo para assinantes</div><br/><br/>
<div>
<div id="fundassine1">
<div id="clique">
<a href="cadastro.php"><img src="images/assine/clique.png"/></a></div>
<div id="logando">
<div id="campoemail2">
<div id="assinemail">
<form id="form1" name="form1" method="POST" action="<?php echo $loginFormAction; ?>">
<label for="usoEmail"></label>
<input type="text" name="usoEmail" id="usoEmail" />
<div id="assinesenha">
<label for="usoSenha"></label>
<input type="password" name="usoSenha" id="usoSenha" />
<input type="submit" name="button" value="Entrar" /></div>
</form>
</div>
<br/>
<a href="recupera-senha.php"><br />
<div align="left">
Esqueceu sua senha?</div></a>
</form>
<table cellpadding="0" cellspacing="0">
<td width="250">
<tr>
<td>
<br/>
<?php if(isset($_GET['erroLogin'])):?><div align="left">
O usuário ou senha informados não estão corretos, por favor verifique as informações digitadas e tente novamente.</div>
<?php endif; ?>
<tr>
</table>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<br />
<br />
<br />
<?php include_once "bottom.php";?>
basicamente é onde esta meu sistema de login.... no top e no login
Alguem se habilita?
Carregando comentários...