Ir para conteúdo
Fórum Script Brasil

usuarioxx77

Membros
  • Total de itens

    8
  • Registro em

  • Última visita

Tudo que usuarioxx77 postou

  1. li um tutorial em um site sobre flash e baseado nele fiz um sistema de notícias da forma que eu quero, o único problema é o espaço entre os parágrafos, como vocês podem ver nesse link http://www.humeletronico.com/noitibo/news/news.htm tem um espaço de 3 linhas entre cada parágrafo, mas se você olhar o texto direto pelo BD vai ver que só tem espaço de 1 linha entre cada parágrafo. existe alguma solução pra isso? alguém já teve esse problema?
  2. bom eu fiquei 3 dias tentando fazer isso, consegui fazer o script todo pelo dreamweaver mas não achei solução pra isso que eu perguntei, por isso escrevi aqui, não tentei uma vez e pronto...
  3. bom eu não sei programar não tenho como começar do zero com uma linha branca mas como já vi que você não pode ajudar muito obrigado...
  4. não quero aprender? eu disse que não sei, o que significa que eu preciso de mais detalhe... putz eu comprei um livro e estou pesquisando porque então? fala sério...
  5. o problema é que não sei programar : ) é isso que você falou que eu preciso mesmo, mas preciso de um código já feito, procurei na net mas não achei, acho que um if e else resolve mas não sei escrever, o script que eu tinha aqui gerava uma imagem vazia com o aviso que não tinha imagem para mostrar mas aí é pior ainda, eu simplesmente que desconsidere quando não houver foto no diretório para mostrar...
  6. não retorna erro algum, o script funciona perfeita mente, o que eu quero é que não apareça a foto quando eu não enviar foto entendeu? porque quando eu envio a a notícia sem a foto aparece como se eu tivesse mandado a foto junto, mas como não tem foto obviamente aparece um x vermelho porque não tem imagem no diretório pra aparecer. e como eu disse com o "show if" não funciona porque ele é pra linha de BD e não para coluna de bd... fui mais claro agora? ou enrolei mais?
  7. fiz um script notícias pelo dreamweaver que está funcionando perfeitamente, o problema é quando resolvo não postar uma imagem junto com a notícia. o que acontece é que ela aparece, quer dizer aparece um x vermelho porque ela não existe, tentei usar o "show if" mas ele só funciona com uma linha do bd e não com colunas. ----------------------------------------------------------------------------------- o escript pra enviar a notícia e a imagem é esse: "enviar.php" <?php require_once('Connections/news.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 tb_news (id, `data`, nome, noticia, foto) VALUES (%s, %s, %s, %s, '$foto_name')", GetSQLValueString($_POST['id'], "int"), GetSQLValueString($_POST['data'], "date"), GetSQLValueString($_POST['nome'], "text"), GetSQLValueString($_POST['noticia'], "text"), GetSQLValueString($_POST['foto'], "text")); copy ($foto,"img/".$foto_name) ; mysql_select_db($database_news, $news); $Result1 = mysql_query($insertSQL, $news) or die(mysql_error()); $insertGoTo = "enviar.php"; if (isset($_SERVER['QUERY_STRING'])) { $insertGoTo .= (strpos($insertGoTo, '?')) ? "&" : "?"; $insertGoTo .= $_SERVER['QUERY_STRING']; } header(sprintf("Location: %s", $insertGoTo)); } ?> <html> <head> <meta http-equiv=Content-Type" content="text/html; charset=iso-8859-1"> <title>Enviar Not&iacute;cias</title> </head> <body> <form action="<?php echo $editFormAction; ?>" method="post" enctype="multipart/form-data" name="form1"> <table align="center"> <tr valign="baseline"> <td nowrap align="right">Data:</td> <td><input name="data" type="text" value="<? echo date("d/m/Y - H:i"); ?>" size="32" readonly="true"></td> </tr> <tr valign="baseline"> <td nowrap align="right">Nome:</td> <td><input type="text" name="nome" value="" size="32"></td> </tr> <tr valign="baseline"> <td nowrap align="right" valign="top">Noticia:</td> <td><textarea name="noticia" cols="50" rows="5"></textarea> </td> </tr> <tr valign="baseline"> <td nowrap align="right">Foto:</td> <td><input name="foto" type="file"></td> </tr> <tr valign="baseline"> <td nowrap align="right">&nbsp;</td> <td><input type="submit" value="Insert record"></td> </tr> </table> <input type="hidden" name="id" value=""> <input type="hidden" name="MM_insert" value="form1"> </form> </body> </html> ---------------------------------------------------------------------------------------- e esse é o que mostra a notícia: "news.php" <?php require_once('Connections/news.php'); ?> <?php $maxRows_rs_news = 10; $pageNum_rs_news = 0; if (isset($_GET['pageNum_rs_news])) { $pageNum_rs_news = $_GET['pageNum_rs_news']; } $startRow_rs_news = $pageNum_rs_news * $maxRows_rs_news; mysql_select_db($database_news, $news); $query_rs_news = "SELECT * FROM tb_news ORDER BY id DESC"; $query_limit_rs_news = sprintf("%s LIMIT %d, %d", $query_rs_news, $startRow_rs_news, $maxRows_rs_news); $rs_news = mysql_query($query_limit_rs_news, $news) or die(mysql_error()); $row_rs_news = mysql_fetch_assoc($rs_news); if (isset($_GET['totalRows_rs_news'])) { $totalRows_rs_news = $_GET['totalRows_rs_news']; } else { $all_rs_news = mysql_query($query_rs_news); $totalRows_rs_news = mysql_num_rows($all_rs_news); } $totalPages_rs_news = ceil($totalRows_rs_news/$maxRows_rs_news)-1; ?> <html> <head> <meta http-equiv=Content-Type" content="text/html; charset=iso-8859-1"> <title>Untitled Document</title> <link href="css/estilo.css" rel="stylesheet" type="text/css"> </head> <body> <table width="400" border="0" cellspacing="0" cellpadding="0"> <tr> <td><span class="fontepreta02"><img src="../img/but_novidades.gif" width="112" height="16"></span></td> </tr> <?php do { ?> <tr> <td height="30" class="fontecinza01"><?php echo $row_rs_news['data]; ?></td> </tr> <tr> <td class="fontepreta02"> <div align="justify"> <img src="img/<?php echo $row_rs_news['foto']; ?>" align=left" class="bordafoto"> <?php echo htmlentities($row_rs_news['noticia]); ?><span class="fontevermelha01"> </span></div></td> </tr> <tr> <td height="30" class="fontevermelha01">postado por <?php echo $row_rs_news['nome']; ?> </td> </tr> <?php } while ($row_rs_news = mysql_fetch_assoc($rs_news)); ?> <tr> <td>&nbsp;</td> </tr> </table> </body> </html> <?php mysql_free_result($rs_news); ?> ---------------------------------------------------------------------------------- se alguém puder me ajudar eu agradeço muito...
×
×
  • Criar Novo...