Ir para conteúdo

Arquivado

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

mvca

O q esta errado nesse codigo???

Recommended Posts

Este codigo tava fi=uncionando direito quando eu estava usando ele na www.redehost.com.br!!! Mas agora ele na tafuncionando mais quando mudei o site pra www.dreamhost.com!!!

 

Alguem sabe o q pode ser???

 

Se, nao conseguirem descubrir, alguem poderia me mostrar outra forma de mandar meus e-mails????

 

segue o codigo:

 

<?php require_once('../../Connections/gc.php'); ?><?php//initialize the sessionif (!isset($_SESSION)) {  session_start();}// ** Logout the current user. **$logoutAction = $_SERVER['PHP_SELF']."?doLogout=true";if ((isset($_SERVER['QUERY_STRING'])) && ($_SERVER['QUERY_STRING'] != "")){  $logoutAction .="&". htmlentities($_SERVER['QUERY_STRING']);}if ((isset($_GET['doLogout'])) &&($_GET['doLogout']=="true")){  //to fully log out a visitor we need to clear the session varialbles  $_SESSION['MM_Username'] = NULL;  $_SESSION['MM_UserGroup'] = NULL;  $_SESSION['PrevUrl'] = NULL;  unset($_SESSION['MM_Username']);  unset($_SESSION['MM_UserGroup']);  unset($_SESSION['PrevUrl']);	  $logoutGoTo = "../index.php";  if ($logoutGoTo) {	header("Location: $logoutGoTo");	exit;  }}?><?phpif (!isset($_SESSION)) {  session_start();}$MM_authorizedUsers = "1";$MM_donotCheckaccess = "false";// *** Restrict Access To Page: Grant or deny access to this pagefunction isAuthorized($strUsers, $strGroups, $UserName, $UserGroup) {   // For security, start by assuming the visitor is NOT authorized.   $isValid = False;   // When a visitor has logged into this site, the Session variable MM_Username set equal to their username.   // Therefore, we know that a user is NOT logged in if that Session variable is blank.   if (!empty($UserName)) { 	// Besides being logged in, you may restrict access to only certain users based on an ID established when they login. 	// Parse the strings into arrays. 	$arrUsers = Explode(",", $strUsers); 	$arrGroups = Explode(",", $strGroups); 	if (in_array($UserName, $arrUsers)) { 	  $isValid = true; 	} 	// Or, you may restrict access to only certain users based on their username. 	if (in_array($UserGroup, $arrGroups)) { 	  $isValid = true; 	} 	if (($strUsers == "") && false) { 	  $isValid = true; 	}   }   return $isValid; }$MM_restrictGoTo = "../index.php";if (!((isset($_SESSION['MM_Username'])) && (isAuthorized("",$MM_authorizedUsers, $_SESSION['MM_Username'], $_SESSION['MM_UserGroup'])))) {     $MM_qsChar = "?";  $MM_referrer = $_SERVER['PHP_SELF'];  if (strpos($MM_restrictGoTo, "?")) $MM_qsChar = "&";  if (isset($QUERY_STRING) && strlen($QUERY_STRING) > 0)   $MM_referrer .= "?" . $QUERY_STRING;  $MM_restrictGoTo = $MM_restrictGoTo. $MM_qsChar . "accesscheck=" . urlencode($MM_referrer);  header("Location: ". $MM_restrictGoTo);   exit;}?><?phpif (!function_exists("GetSQLValueString")) {function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "") {  $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;}}$colname_newsletter = "-1";if (isset($_GET['id_newsletter_enviadas'])) {  $colname_newsletter = (get_magic_quotes_gpc()) ? $_GET['id_newsletter_enviadas'] : addslashes($_GET['id_newsletter_enviadas']);}mysql_select_db($database_gc, $gc);$query_newsletter = sprintf("SELECT * FROM newsletter_enviadas WHERE id_newsletter_enviadas = %s", GetSQLValueString($colname_newsletter, "int"));$newsletter = mysql_query($query_newsletter, $gc) or die(mysql_error());$row_newsletter = mysql_fetch_assoc($newsletter);$totalRows_newsletter = mysql_num_rows($newsletter);?><HTML><HEAD><TITLE>||| GERENCIADOR DE CONTEUDO ON-LINE |||</TITLE><META HTTP-EQUIV="CHARSET" CONTENT="ISO-8859-1"><META HTTP-EQUIV="CONTENT-LANGUAGE" CONTENT="Portuguese"><META HTTP-EQUIV="VW96.OBJECT TYPE" CONTENT="Homepage"><META NAME="RATING" CONTENT="General"><META NAME="ROBOTS" CONTENT="index,follow"><META NAME="REVISIT-AFTER" CONTENT="10 days"><LINK href="../imagens/css_principal.css" type=text/css rel=STYLESHEET><LINK href="../images/icon.gif" rel="SHORTCUT ICON"><META content="MSHTML 6.00.2800.1555" name=GENERATOR><style type="text/css"><!--body {	background-color: #000000;	margin-left: 0px;	margin-top: 0px;	margin-right: 0px;	margin-bottom: 0px;	background-image: url(../imagens/admin7.jpg);}a:link {	text-decoration: none;}a:visited {	text-decoration: none;}a:hover {	text-decoration: none;}a:active {	text-decoration: none;}.style5 {color: #F3F3F3;	font-family: Verdana, Arial, Helvetica, sans-serif;	font-size: 12px;}.style8 {	font-family: Verdana, Arial, Helvetica, sans-serif;	font-size: 10px;	color: #666666;	font-weight: bold;}--></style><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"><link href="../../includes/skins/mxkollection3.css" rel="stylesheet" type="text/css" media="all" /><script src="../../includes/common/js/base.js" type="text/javascript"></script><script src="../../includes/common/js/utility.js" type="text/javascript"></script><script src="../../includes/skins/style.js" type="text/javascript"></script><style type="text/css"><!--.style9 {	font-size: 12px;	font-family: Verdana, Arial, Helvetica, sans-serif;	font-weight: bold;	color: #666666;}--></style><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"></HEAD><BODY><CENTER><TABLE width=686 height="100%" border=0 align="left" cellPadding=0 cellSpacing=0>  <TBODY>	<TR>	  <TD width=740 vAlign=top bgColor=#FFFFFF><table width="740" border="0" align="center" cellpadding="0" cellspacing="0">		<tr>		  <td width="740" height="317" valign="top"><table width="686" border="0" cellpadding="0" cellspacing="0">			<tr>			  <td width="740" valign="top" background="../imagens/admin7.jpg"><table width="740" border="0" align="left" cellpadding="0" cellspacing="0">				<tr>				  <td valign="top"><table width="767" border="0" cellspacing="0" cellpadding="0">					<tr>					  <td width="179" valign="top" background="../imagens/admin13.jpg"><img src="../imagens/admin1.jpg" width="179" height="66" alt=""></td>					  <td width="538" valign="top" background="../imagens/admin13.jpg"><table width="630" border="0" cellspacing="0" cellpadding="0">						<tr>						  <td> </td>						</tr>						<tr>						  <td> </td>						</tr>						<tr>						  <td><table width="630" border="0" cellspacing="0" cellpadding="0">							  <tr>								<td width="20%"> </td>								<td width="20%"> </td>								<td width="20%"> </td>								<td width="20%"> </td>								<td width="20%"><div align="center"><a href="<?php echo $logoutAction ?>" class="style8">Sair do sistema</a> </div></td>							  </tr>						  </table></td>						</tr>					  </table></td>					  <td width="50" align="right" valign="top" background="../imagens/admin13.jpg"><img src="../imagens/admin14.jpg" width="50" height="66" alt=""></td>					</tr>				  </table></td>				</tr>				<tr>				  <td valign="top"><table width="857" border="0" cellspacing="0" cellpadding="0">					<tr>					  <td width="179" valign="top"><img src="../imagens/admin2.jpg" width="179" height="132" alt=""></td>					  <td width="628" valign="top"><div align="center"><img src="../imagens/admin11.jpg" width="457" height="132" alt=""></div></td>					  <td width="50" valign="top"><img src="../imagens/admin15.jpg" width="50" height="132" alt=""></td>					</tr>				  </table></td>				</tr>				<tr>				  <td valign="top"><table width="767" border="0" cellspacing="0" cellpadding="0">					<tr>					  <td width="178" valign="top" background="../imagens/admin5.jpg"><table width="178" border="0" cellspacing="0" cellpadding="0">						<tr>						  <td width="178" valign="top"><a href="../administrador.php"><img src="../imagens/menumodulos.jpg" width="178" height="27" border="0"></a></td>						</tr>						<tr>						  <td valign="top"><a href="../principal/index.php"><img src="../imagens/menupaginainicial.jpg" width="178" height="27" border="0"></a></td>						</tr>						<tr>						  <td valign="top"><a href="../conteudo/index.php"><img src="../imagens/menuconteudo.jpg" width="178" height="27" border="0"></a></td>						</tr>						<tr>						  <td valign="top"><a href="../projetos/index.php"><img src="../imagens/menuprojetos.jpg" width="178" height="27" border="0"></a></td>						</tr>						<tr>						  <td valign="top"><a href="../depoimentos/index.php"><img src="../imagens/menudepoimentos.jpg" width="178" height="27" border="0"></a></td>						</tr>						<tr>						  <td valign="top"><a href="../galerias/index.php"><img src="../imagens/menugalerias.jpg" width="178" height="27" border="0"></a></td>						</tr>						<tr>						  <td valign="top"><a href="../contato/index.php"><img src="../imagens/menucontato.jpg" width="178" height="27" border="0"></a></td>						</tr>						<tr>						  <td valign="top"><a href="../noticias/index.php"><img src="../imagens/menunoticias.jpg" width="178" height="27" border="0"></a></td>						</tr>						<tr>						  <td valign="top"><a href="index.php"><img src="../imagens/menunewsletter.jpg" width="178" height="27" border="0"></a></td>						</tr>						<tr>						  <td valign="top"><a href="cadastrar_emails_newsletter.php"><img src="../imagens/cadastraremailsnewsletter.jpg" width="178" height="28" border="0"></a></td>						</tr>						<tr>						  <td valign="top"><img src="../imagens/space.gif" width="1" height="1"></td>						</tr>						<tr>						  <td valign="top"><a href="exibir_emails_newsletter.php"><img src="../imagens/exibiremailsnewsletter.jpg" width="178" height="28" border="0"></a></td>						</tr>						<tr>						  <td valign="top"><img src="../imagens/space.gif" width="1" height="1"></td>						</tr>						<tr>						  <td valign="top"><a href="cadastrar_newsletter.php"><img src="../imagens/cadastrarnewsletter.jpg" width="178" height="28" border="0"></a></td>						</tr>						<tr>						  <td valign="top"><img src="../imagens/space.gif" width="1" height="1"></td>						</tr>						<tr>						  <td valign="top"><a href="exibir_newsletter.php"><img src="../imagens/exibirnewslleter.jpg" width="178" height="28" border="0"></a></td>						</tr>						<tr>						  <td valign="top"><a href="../usuarios/index.php"><img src="../imagens/menuusuarios.jpg" width="178" height="27" border="0"></a></td>						</tr>						<tr>						  <td valign="top"> </td>						</tr>						<tr>						  <td valign="top"> </td>						</tr>						<tr>						  <td valign="top"> </td>						</tr>						<tr>						  <td valign="top"> </td>						</tr>						<tr>						  <td valign="top"> </td>						</tr>					  </table></td>					  <td width="539" valign="top" background="../imagens/admin9.jpg"><table width="630" border="0" cellspacing="0" cellpadding="0">						<tr>						  <td valign="top"> </td>						</tr>						<tr>						  <td valign="top"><span class="style9">::: Enviar resposta ao contato selecionado :::</span></td>						</tr>						<tr>						  <td valign="top"><? if($entrar == 's') {?>							<form name="form1" method="post" action="<?echo $PHP_SELF;?>?mandar=s">							  <table width="620" align="center" cellpadding="2" cellspacing="0" class="KT_tngtable">								  <tr>									<td width="71" class="KT_th">Data:</td>									<td width="439">										<?php echo $row_newsletter['data_newsletter_enviadas']; ?>										<input name="data" type="hidden" id="data" value="<?php echo $row_newsletter['data_newsletter_enviadas']; ?>"></td>								  </tr>								  <tr>									<td class="KT_th">Assunto:</td>									<td>										<?php echo $row_newsletter['assunto_newsletter_enviadas']; ?>										<input name="assunto" type="hidden" id="assunto" value="<?php echo $row_newsletter['assunto_newsletter_enviadas']; ?>"></td>								  </tr>								  <tr>									<td colspan="2" class="KT_th">conteudo:</td>									</tr>								  <tr>									<td colspan="2"><?php echo $row_newsletter['conteudo_newsletter_enviadas']; ?>									  <input name="conteudo" type="hidden" id="conteudo" value="<?php echo $row_newsletter['conteudo_newsletter_enviadas']; ?>"></td>									</tr>								  <tr class="KT_buttons">									<td colspan="2"><input type="submit" name="KT_Update1" id="KT_Update1" value="Enviar" />									</td>								  </tr>								</table>							  </form>							<?  }  //fecha if entrar=s (fim do formulário)  if($mandar == 's') { //Rotina que envia o email conforme os parâmetros informados mysql_connect  ("servidormysql","login","senha");mysql_select_db("bancodedados");$sql = "select * from newsletter";$sql = mysql_query($sql);While($email = mysql_fetch_array($sql)){  $to = $email["email_newsletter"];  $subject = "$assunto";  $nome = $email["nome_newsletter"];  $remetente = "Webmaster";  $email = "webmaster@cedecom.org.br";  $html = "<html><body>Ola Sr(a) $nome <br><br>$data - $assunto <br><br>$conteudo</body></html>";  $headers = "Content-type: text/html; charset=iso-8859-1\r\n";  $headers .= "From: $remetente <$email>\r\n";  if (mail($to, $subject, $html, $headers))  {	  echo "<br>E-mail enviada para Sr(a). $nome - $to com Sucesso.<br>";  }  else  {	  echo "Ocorreu um erro durante o envio do email.";  }}}?></td>						</tr>					  </table></td>					  <td width="50" valign="top" background="../imagens/admin17.jpg"><table width="50" border="0" cellspacing="0" cellpadding="0">						<tr>						  <td valign="top"><img src="../imagens/admin16.jpg" width="50" height="20" alt=""></td>						</tr>						<tr>						  <td valign="top" background="../imagens/admin17.jpg"> </td>						</tr>					  </table></td>					</tr>				  </table></td>				</tr>				<tr>				  <td valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0">					<tr>					  <td width="178" valign="top" background="../imagens/admin8.jpg"><img src="../imagens/admin6.jpg" width="178" height="33" alt=""></td>					  <td width="539" valign="top" background="../imagens/admin8.jpg"><div align="center"><img src="../imagens/admin8.jpg" width="458" height="33" alt=""></div></td>					  <td width="50" align="right" valign="top" background="../imagens/admin8.jpg"><img src="../imagens/admin18.jpg" width="50" height="33" alt=""></td>					</tr>					<tr>					  <td valign="top"> </td>					  <td valign="middle"><div align="center" class="style5">Copyright © 2006 <a href="http://www.fvaadvocacia.com/mvca/" class="style5">MVCA</a> & <a href="http://www.jgtconsultoria.com" class="style5">JGT CONSULTORIA</a>, Todos os direitos reservados.</div></td>					  <td valign="top"> </td>					</tr>				  </table></td>				</tr>			  </table></td>			</tr>		  </table></td>		</tr>	  </table></TD>	</TR>  </TBODY></TABLE></CENTER></body></HTML><?phpmysql_free_result($newsletter);?>

Desde ja, ja agradeco a ajuda de todos!!!

 

Marcus

Compartilhar este post


Link para o post
Compartilhar em outros sites

Opa mvca... Tudo bem...

 

Dei uma limpada nesse teu código, pq o Dream suja e repete algumas coisas..

 

Não vi nada de errado...

 

Pergunta...

 

O BD mudou alguma coisa...???

 

<?php// http://forum.imasters.com.br/index.php?showtopic=211459 require_once('../../Connections/gc.php');//initialize the sessionif (!isset($_SESSION)){	session_start();}// ** Logout the current user. **$logoutAction = $_SERVER['PHP_SELF']."?doLogout=true";if ((isset($_SERVER['QUERY_STRING'])) && ($_SERVER['QUERY_STRING'] != "")){	$logoutAction .="&". htmlentities($_SERVER['QUERY_STRING']);}if ((isset($_GET['doLogout'])) &&($_GET['doLogout']=="true")){	//to fully log out a visitor we need to clear the session varialbles	$_SESSION['MM_Username'] = NULL;	$_SESSION['MM_UserGroup'] = NULL;	$_SESSION['PrevUrl'] = NULL;	unset($_SESSION['MM_Username']);	unset($_SESSION['MM_UserGroup']);	unset($_SESSION['PrevUrl']);	$logoutGoTo = "../index.php";	if ($logoutGoTo)	{		header("Location: $logoutGoTo");		exit;	}}$MM_authorizedUsers = "1";$MM_donotCheckaccess = "false";// *** Restrict Access To Page: Grant or deny access to this pagefunction isAuthorized($strUsers, $strGroups, $UserName, $UserGroup){ 	// For security, start by assuming the visitor is NOT authorized. 	$isValid = False; 	// When a visitor has logged into this site, the Session variable MM_Username set equal to their username. 	// Therefore, we know that a user is NOT logged in if that Session variable is blank. 	if (!empty($UserName))	{		// Besides being logged in, you may restrict access to only certain users based on an ID established when they login. 		// Parse the strings into arrays. 		$arrUsers = Explode(",", $strUsers); 		$arrGroups = Explode(",", $strGroups); 		if (in_array($UserName, $arrUsers))		{			$isValid = true; 		}		// Or, you may restrict access to only certain users based on their username. 		if (in_array($UserGroup, $arrGroups))		{			$isValid = true; 		}		if (($strUsers == "") && false)		{			$isValid = true; 		}}	return $isValid; }$MM_restrictGoTo = "../index.php";if (!((isset($_SESSION['MM_Username'])) && (isAuthorized("",$MM_authorizedUsers, $_SESSION['MM_Username'], $_SESSION['MM_UserGroup'])))){   	$MM_qsChar = "?";	$MM_referrer = $_SERVER['PHP_SELF'];	if (strpos($MM_restrictGoTo, "?"))	$MM_qsChar = "&";	if (isset($QUERY_STRING) && strlen($QUERY_STRING) > 0) 	$MM_referrer .= "?" . $QUERY_STRING;	$MM_restrictGoTo = $MM_restrictGoTo. $MM_qsChar . "accesscheck=" . urlencode($MM_referrer);	header("Location: ". $MM_restrictGoTo); 	exit;}if (!function_exists("GetSQLValueString")){	function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "") 	{		$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;	}}$colname_newsletter = "-1";if (isset($_GET['id_newsletter_enviadas'])){	$colname_newsletter = (get_magic_quotes_gpc()) ? $_GET['id_newsletter_enviadas'] : addslashes($_GET['id_newsletter_enviadas']);}mysql_select_db($database_gc, $gc);$query_newsletter = sprintf("SELECT * FROM newsletter_enviadas WHERE id_newsletter_enviadas = %s", GetSQLValueString($colname_newsletter, "int"));$newsletter = mysql_query($query_newsletter, $gc) or die(mysql_error());$row_newsletter = mysql_fetch_assoc($newsletter);$totalRows_newsletter = mysql_num_rows($newsletter);?><HTML><HEAD><TITLE>||| GERENCIADOR DE CONTEUDO ON-LINE |||</TITLE><META HTTP-EQUIV="CHARSET" CONTENT="ISO-8859-1"><META HTTP-EQUIV="CONTENT-LANGUAGE" CONTENT="Portuguese"><META HTTP-EQUIV="VW96.OBJECT TYPE" CONTENT="Homepage"><META NAME="RATING" CONTENT="General"><META NAME="ROBOTS" CONTENT="index,follow"><META NAME="REVISIT-AFTER" CONTENT="10 days"><LINK href="../imagens/css_principal.css" type=text/css rel=STYLESHEET><LINK href="../images/icon.gif" rel="SHORTCUT ICON"><META content="MSHTML 6.00.2800.1555" name=GENERATOR><style type="text/css"><!--body {	background-color: #000000;	margin-left: 0px;	margin-top: 0px;	margin-right: 0px;	margin-bottom: 0px;	background-image: url(../imagens/admin7.jpg);}a:link {	text-decoration: none;}a:visited {	text-decoration: none;}a:hover {	text-decoration: none;}a:active {	text-decoration: none;}.style5 {color: #F3F3F3;	font-family: Verdana, Arial, Helvetica, sans-serif;	font-size: 12px;}.style8 {	font-family: Verdana, Arial, Helvetica, sans-serif;	font-size: 10px;	color: #666666;	font-weight: bold;}--></style><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"><link href="../../includes/skins/mxkollection3.css" rel="stylesheet" type="text/css" media="all" /><script src="../../includes/common/js/base.js" type="text/javascript"></script><script src="../../includes/common/js/utility.js" type="text/javascript"></script><script src="../../includes/skins/style.js" type="text/javascript"></script><style type="text/css"><!--.style9 {	font-size: 12px;	font-family: Verdana, Arial, Helvetica, sans-serif;	font-weight: bold;	color: #666666;}--></style><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"></HEAD><BODY><CENTER><TABLE width=686 height="100%" border=0 align="left" cellPadding=0 cellSpacing=0><TBODY><TR><TD width=740 vAlign=top bgColor=#FFFFFF><table width="740" border="0" align="center" cellpadding="0" cellspacing="0"> <tr>		  <td width="740" height="317" valign="top"><table width="686" border="0" cellpadding="0" cellspacing="0">			<tr>			  <td width="740" valign="top" background="../imagens/admin7.jpg"><table width="740" border="0" align="left" cellpadding="0" cellspacing="0">				<tr>				  <td valign="top"><table width="767" border="0" cellspacing="0" cellpadding="0">					<tr>					  <td width="179" valign="top" background="../imagens/admin13.jpg"><img src="../imagens/admin1.jpg" width="179" height="66" alt=""></td>					  <td width="538" valign="top" background="../imagens/admin13.jpg"><table width="630" border="0" cellspacing="0" cellpadding="0">						<tr>						  <td> </td>						</tr>						<tr>						  <td> </td>						</tr>						<tr>						  <td><table width="630" border="0" cellspacing="0" cellpadding="0">							  <tr>								<td width="20%"> </td>								<td width="20%"> </td>								<td width="20%"> </td>								<td width="20%"> </td>								<td width="20%"><div align="center"><a href="<?php echo $logoutAction ?>" class="style8">Sair do sistema</a> </div></td>							  </tr>						  </table></td>						</tr>					  </table></td>					  <td width="50" align="right" valign="top" background="../imagens/admin13.jpg"><img src="../imagens/admin14.jpg" width="50" height="66" alt=""></td>					</tr>				  </table></td>				</tr>				<tr>				  <td valign="top"><table width="857" border="0" cellspacing="0" cellpadding="0">					<tr>					  <td width="179" valign="top"><img src="../imagens/admin2.jpg" width="179" height="132" alt=""></td>					  <td width="628" valign="top"><div align="center"><img src="../imagens/admin11.jpg" width="457" height="132" alt=""></div></td>					  <td width="50" valign="top"><img src="../imagens/admin15.jpg" width="50" height="132" alt=""></td>					</tr>				  </table></td>				</tr>				<tr>				  <td valign="top"><table width="767" border="0" cellspacing="0" cellpadding="0">					<tr>					  <td width="178" valign="top" background="../imagens/admin5.jpg"><table width="178" border="0" cellspacing="0" cellpadding="0">						<tr>						  <td width="178" valign="top"><a href="../administrador.php"><img src="../imagens/menumodulos.jpg" width="178" height="27" border="0"></a></td>						</tr>						<tr>						  <td valign="top"><a href="../principal/index.php"><img src="../imagens/menupaginainicial.jpg" width="178" height="27" border="0"></a></td>						</tr>						<tr>						  <td valign="top"><a href="../conteudo/index.php"><img src="../imagens/menuconteudo.jpg" width="178" height="27" border="0"></a></td>						</tr>						<tr>						  <td valign="top"><a href="../projetos/index.php"><img src="../imagens/menuprojetos.jpg" width="178" height="27" border="0"></a></td>						</tr>						<tr>						  <td valign="top"><a href="../depoimentos/index.php"><img src="../imagens/menudepoimentos.jpg" width="178" height="27" border="0"></a></td>						</tr>						<tr>						  <td valign="top"><a href="../galerias/index.php"><img src="../imagens/menugalerias.jpg" width="178" height="27" border="0"></a></td>						</tr>						<tr>						  <td valign="top"><a href="../contato/index.php"><img src="../imagens/menucontato.jpg" width="178" height="27" border="0"></a></td>						</tr>						<tr>						  <td valign="top"><a href="../noticias/index.php"><img src="../imagens/menunoticias.jpg" width="178" height="27" border="0"></a></td>						</tr>						<tr>						  <td valign="top"><a href="index.php"><img src="../imagens/menunewsletter.jpg" width="178" height="27" border="0"></a></td>						</tr>						<tr>						  <td valign="top"><a href="cadastrar_emails_newsletter.php"><img src="../imagens/cadastraremailsnewsletter.jpg" width="178" height="28" border="0"></a></td>						</tr>						<tr>						  <td valign="top"><img src="../imagens/space.gif" width="1" height="1"></td>						</tr>						<tr>						  <td valign="top"><a href="exibir_emails_newsletter.php"><img src="../imagens/exibiremailsnewsletter.jpg" width="178" height="28" border="0"></a></td>						</tr>						<tr>						  <td valign="top"><img src="../imagens/space.gif" width="1" height="1"></td>						</tr>						<tr>						  <td valign="top"><a href="cadastrar_newsletter.php"><img src="../imagens/cadastrarnewsletter.jpg" width="178" height="28" border="0"></a></td>						</tr>						<tr>						  <td valign="top"><img src="../imagens/space.gif" width="1" height="1"></td>						</tr>						<tr>						  <td valign="top"><a href="exibir_newsletter.php"><img src="../imagens/exibirnewslleter.jpg" width="178" height="28" border="0"></a></td>						</tr>						<tr>						  <td valign="top"><a href="../usuarios/index.php"><img src="../imagens/menuusuarios.jpg" width="178" height="27" border="0"></a></td>						</tr>						<tr>						  <td valign="top"> </td>						</tr>						<tr>						  <td valign="top"> </td>						</tr>						<tr>						  <td valign="top"> </td>						</tr>						<tr>						  <td valign="top"> </td>						</tr>						<tr>						  <td valign="top"> </td>						</tr>					  </table></td>					  <td width="539" valign="top" background="../imagens/admin9.jpg"><table width="630" border="0" cellspacing="0" cellpadding="0">						<tr>						  <td valign="top"> </td>						</tr>						<tr>						  <td valign="top"><span class="style9">::: Enviar resposta ao contato selecionado :::</span></td>						</tr>						<tr>						  <td valign="top"><? if($entrar == 's') {?>							<form name="form1" method="post" action="<?echo $PHP_SELF;?>?mandar=s">							  <table width="620" align="center" cellpadding="2" cellspacing="0" class="KT_tngtable">								  <tr>									<td width="71" class="KT_th">Data:</td>									<td width="439">										<?php echo $row_newsletter['data_newsletter_enviadas']; ?>										<input name="data" type="hidden" id="data" value="<?php echo $row_newsletter['data_newsletter_enviadas']; ?>"></td>								  </tr>								  <tr>									<td class="KT_th">Assunto:</td>									<td>										<?php echo $row_newsletter['assunto_newsletter_enviadas']; ?>										<input name="assunto" type="hidden" id="assunto" value="<?php echo $row_newsletter['assunto_newsletter_enviadas']; ?>"></td>								  </tr>								  <tr>									<td colspan="2" class="KT_th">conteudo:</td>									</tr>								  <tr>									<td colspan="2"><?php echo $row_newsletter['conteudo_newsletter_enviadas']; ?>									  <input name="conteudo" type="hidden" id="conteudo" value="<?php echo $row_newsletter['conteudo_newsletter_enviadas']; ?>"></td>									</tr>								  <tr class="KT_buttons">									<td colspan="2"><input type="submit" name="KT_Update1" id="KT_Update1" value="Enviar" />									</td>								  </tr>								</table>							  </form>							<?  }  //fecha if entrar=s (fim do formulário)  if($mandar == 's') { //Rotina que envia o email conforme os parâmetros informadosmysql_connect  ("servidormysql","login","senha");mysql_select_db("bancodedados");$sql = "select * from newsletter";$sql = mysql_query($sql);While($email = mysql_fetch_array($sql)){  $to = $email["email_newsletter"];  $subject = "$assunto";  $nome = $email["nome_newsletter"];  $remetente = "Webmaster";  $email = "webmaster@cedecom.org.br";  $html = "<html><body>Ola Sr(a) $nome <br><br>$data - $assunto <br><br>$conteudo</body></html>";  $headers = "Content-type: text/html; charset=iso-8859-1\r\n";  $headers .= "From: $remetente <$email>\r\n";  if (mail($to, $subject, $html, $headers))  {	  echo "<br>E-mail enviada para Sr(a). $nome - $to com Sucesso.<br>";  }  else  {	  echo "Ocorreu um erro durante o envio do email.";  }}}?></td>						</tr>					  </table></td>					  <td width="50" valign="top" background="../imagens/admin17.jpg"><table width="50" border="0" cellspacing="0" cellpadding="0">						<tr>						  <td valign="top"><img src="../imagens/admin16.jpg" width="50" height="20" alt=""></td>						</tr>						<tr>						  <td valign="top" background="../imagens/admin17.jpg"> </td>						</tr>					  </table></td>					</tr>				  </table></td>				</tr>				<tr>				  <td valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0">					<tr>					  <td width="178" valign="top" background="../imagens/admin8.jpg"><img src="../imagens/admin6.jpg" width="178" height="33" alt=""></td>					  <td width="539" valign="top" background="../imagens/admin8.jpg"><div align="center"><img src="../imagens/admin8.jpg" width="458" height="33" alt=""></div></td>					  <td width="50" align="right" valign="top" background="../imagens/admin8.jpg"><img src="../imagens/admin18.jpg" width="50" height="33" alt=""></td>					</tr>					<tr>					  <td valign="top"> </td>					  <td valign="middle"><div align="center" class="style5">Copyright © 2006 <a href="http://www.fvaadvocacia.com/mvca/" class="style5">MVCA</a> & <a href="http://www.jgtconsultoria.com" class="style5">JGT CONSULTORIA</a>, Todos os direitos reservados.</div></td>					  <td valign="top"> </td>					</tr>				  </table></td>				</tr>			  </table></td>			</tr>		  </table></td>		</tr>	  </table></TD>	</TR>  </TBODY></TABLE></CENTER></body></HTML><?phpmysql_free_result($newsletter);?>

 

T+

Compartilhar este post


Link para o post
Compartilhar em outros sites

Nao entendi a pergunta, você poderia ser mais claro????Sim a primeira coisa q acontece é q por causa desse if entrar = s, nao aparece o formulario, consequente mente nao consigo enviar o email, você pq isso ta acontecendo???desse <? if($entrar == 's') {?>nao ta aparecendo o formulario anates tava perfeito mesmo com isso

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.