Usamos cookies para medir audiência e melhorar sua experiência. Você pode aceitar ou recusar a qualquer momento. Veja sobre o iMasters.
Estou rodando um script de mural em php no meu site mas qdo aguem posta uma msg a data sai totalmente errada...
veja:
/applications/core/interface/imageproxy/imageproxy.php?img=http://www.nylon100.com.br/mural.JPG&key=9eda9a333f49682cbae40b7991415fb277ba05cbade838b81650690641c04256" alt="Imagem Postada" />
o codigo do arquivo php referente a data e esse:
****
<? }
else {
include("./mural.inc.php");
conecta();
$msg = addslashes(nl2br($msg));
$hoje = date("d-m-Y");
$hora = date("H:i");
$cons = "insert into $tab_mural values(null,'$remet','$dest','$msg','$avatar','$hoje','$hora','$REMOTE_ADDR','$destmail',0)";
?>
Me ajudem por favor????
Falows
Félix
>
Você não falou que é na hora de "mostrar" a data que está dando erro?
Então mande o código que mostra a data, e não o que insere. Falou?
Ve agora ai:
vou mandar o codigo inteiro:
**<link href="../estilo.css" rel="stylesheet" type="text/css"> <title>TEKNERA - O seu Som Está Aqui!</title><body bgcolor="#666666" text="#FFFFFF" link="#66FF00" vlink="#66FF00" alink="#66FF00" leftmargin="3" topmargin="3" marginwidth="1" marginheight="1">**
<div align="center"><iframe src="../banner/ad.php" width="468" height="60" frameBorder="0" scrolling="no"></iframe><br><br></div>
<table width="600" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="40" height="40" background="../img/cima-a-sep-40x40.gif"> </td>
<td width="520" background="../img/cima-b-sep-3x40.gif"><font face=Verdana, Arial, Helvetica, sans-serif size=3 color=#66FF00> </font></td>
<td width="40" height="40" background="../img/cima-c-sep-40x40.gif"> </td>
</tr>
<tr>
<td colspan="3"><table width="600" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="8" background="../img/meio-a-sep-8x3.gif"> </td>
<td width="584" bgcolor="#000000">
<table width="90%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="26%" rowspan="3"><div align="center"><img src="../img/logo-140x65.gif" width="140" height="65"></div></td>
<td width="74%"> </td>
</tr>
<tr>
<td><div align="left"><font face=Verdana, Arial, Helvetica, sans-serif size=6 color=#66FF00><b>MURAL
DE RECADOS</b></font></div></td>
</tr>
<tr>
<td> </td>
</tr>
</table>
<table width=400 align=center>
<tr>
<td align=center height=50><a href="./mural.php">
PARA ENVIAR SUA MENSAGEM, CLIQUE AQUI</a> </td>
</tr>
</table>
<?
include("./mural.inc.php");
$conexao = mysql_connect($dbhost,$dbuser,$dbpass) or die("Falha na conexão, favor tentar novamente");
mysql_select_db($dbname);
$max_links = 10; // máximo de links à serem exibidos
$nav = new navbar; // cria um novo objeto navbar
$nav->numcolunasporpagina = $num_msgs; // define o número máximo de colunas por página
$sql = "select * from $tab_mural where perm='0' order by id desc"; // faz o SELECT na tabela
$resultado = $nav->executar($sql, $conexao, "otimizada", "mysql"); // executa a parâmetro $sql
$rows = @mysql_num_rows($resultado); // conta o total de linhas do parâmetro $resultado
for ($y = 0; $y < $rows; $y++) {
$data = mysql_fetch_object($resultado); ?>
<table width="400" border="0" cellspacing="0" cellpadding="0" align=center>
<tr>
<td background="./mural-img/mural_top.gif" height=60>
<table width="400" border="0" cellspacing="0" cellpadding="0" height="60">
<tr>
<td height="24" width="152"> </td>
<td height="33" width="215"> </td>
<td height="3" width="33"> </td>
</tr>
<tr>
<td width="152"> </td>
<td width="215" align="right"><font size=2 color=gray face=verdana>Para:</font><font size=4 face=arial color=red><b> <? echo $data->dest ?></b></font></td>
<td width="33"> </td>
</tr>
</table>
</td>
</tr>
<tr>
<td background="./mural-img/mural_mid.gif">
<table width="400" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="34"> </td>
<td width="333"><br><img align="left" src="./mural-img/<? echo $data->avatar; ?>"> <font size=2 face=verdana color="#004080"><? echo stripslashes($data->mensagem) ?></font><br><br></td>
<td width="33"> </td>
</tr>
<tr>
<td width="34"> </td>
<td width="333"> <font size=2 color=gray face=verdana>Ass: </font><b><font size=2 color=brown face=verdana><? echo $data->remet ?></font></b></td>
<td width="33"> </td>
</tr>
</table>
</td>
</tr>
<tr>
<td background="./mural-img/mural_bot.gif" height=60>
<table width="400" border="0" cellspacing="0" cellpadding="0" height="60">
<tr height="40">
<td align=center>
<? $nova = novadata($data->data); ?>
<font size=1 color=gray face=verdana>Enviada em <? echo $nova.' - '.$data->hora; ?></font>
</td>
</tr>
<tr height="20">
<td> </td>
</tr>
</table>
</td>
</tr>
</table>
<? } ?>
<table width=400 align=center cellpadding=5>
<tr>
<td align=center style="font-family:verdana; font-size: 8pt; color: gray;">
<?
$todos_links = $nav->pegarlinks("todos", "ligado"); // pega todos os links e define que 'Próxima' e 'Anterior' serão exibidos como texto plano
$links_limitados = $nav->mostrarParte($todos_links, $coluna, $max_links); // cria a função para limitação de links
for ($n = 0; $n < count($links_limitados); $n++) { // para $n igual à 0 ou menor que número de links limitados, adicione mais $n
echo $links_limitados[$n] . " ";
}
?>
</td>
</tr>
<tr>
<td align=center><a href="./mural.php">
PARA ENVIAR SUA MENSAGEM, CLIQUE AQUI</a>
</td>
</tr>
</table>
</td>
<td width="8" background="../img/meio-c-sep-8x3.gif"> </td>
</tr>
</table></td>
</tr>
<tr>
<td width="40" height="40" background="../img/baixo-a-sep-40x40.gif"> </td>
<td width="520" background="../img/baixo-b-sep-3x40.gif"> </td>
<td width="40" height="40" background="../img/baixo-c-sep-40x40.gif"> </td>
</tr>
</table>
Você não falou que é na hora de "mostrar" a data que está dando erro?Então mande o código que mostra a data, e não o que insere. Falou?