Jump to content


testeplay

Member Since 18/07/2009
Offline Last Active 25/02/2010, 01:07
-----

Topics I've Started

[Dúvida]Sistema De Envio De Foto,Descrição,Link,Categoria

21/02/2010, 21:20

seguinte estou tentando desenvolver um sistema que faça o seguinte

envie uma imagem, escreva a categoria, em seguida a descrição e um link
depois na hora de exibir exibisse só a img a categoria e a descrição, o link ficasse dentro da img

fiz no banco a seguinte tabela

clientes

com 3 campos

endereco (text) aonde vai ser guardado o endereco da img

descricao (text) aonde fica guardado a descricao da foto

categoria (text) aonde fica guardado a categoria

link (text) o link que sera embutido na imagem

Fiz a pagina envia.php

<?php require_once('Connections/t1.php'); ?>
<?php
// Load the common classes
require_once('includes/common/KT_common.php');

// Load the tNG classes
require_once('includes/tng/tNG.inc.php');

// Make a transaction dispatcher instance
$tNGs = new tNG_dispatcher("");

// Make unified connection variable
$conn_t1 = new KT_connection($t1, $database_t1);

// Start trigger
$formValidation = new tNG_FormValidation();
$tNGs->prepareValidation($formValidation);
// End trigger

// Make an insert transaction instance
$ins_clientes = new tNG_insert($conn_t1);
$tNGs->addTransaction($ins_clientes);
// Register triggers
$ins_clientes->registerTrigger("STARTER", "Trigger_Default_Starter", 1, "POST", "KT_Insert1");
$ins_clientes->registerTrigger("BEFORE", "Trigger_Default_FormValidation", 10, $formValidation);
// Add columns
$ins_clientes->setTable("clientes");
$ins_clientes->addColumn("endereco", "STRING_TYPE", "FILES", "endereco");
$ins_clientes->addColumn("link", "STRING_TYPE", "POST", "link");
$ins_clientes->addColumn("categoria", "STRING_TYPE", "POST", "categoria");
$ins_clientes->addColumn("descricao", "STRING_TYPE", "POST", "descricao");
$ins_clientes->setPrimaryKey("id", "NUMERIC_TYPE");

// Execute all the registered transactions
$tNGs->executeTransactions();

// Get the transaction recordset
$rsclientes = $tNGs->getRecordset("clientes");
$row_rsclientes = mysql_fetch_assoc($rsclientes);
$totalRows_rsclientes = mysql_num_rows($rsclientes);
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<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>
<?php echo $tNGs->displayValidationRules();?>
</head>

<body>
<?php
	echo $tNGs->getErrorMsg();
?>
<form method="post" id="form1" action="<?php echo KT_escapeAttribute(KT_getFullUri()); ?>" enctype="multipart/form-data">
  <table cellpadding="2" cellspacing="0" class="KT_tngtable">
    <tr>
      <td class="KT_th"><label for="endereco">Endereco:</label></td>
      <td><input type="file" name="endereco" id="endereco" size="32" />
        <?php echo $tNGs->displayFieldError("clientes", "endereco"); ?></td>
    </tr>
    <tr>
      <td class="KT_th"><label for="link">Link:</label></td>
      <td><input type="text" name="link" id="link" value="<?php echo KT_escapeAttribute($row_rsclientes['link']); ?>" size="32" />
        <?php echo $tNGs->displayFieldHint("link");?> <?php echo $tNGs->displayFieldError("clientes", "link"); ?></td>
    </tr>
    <tr>
      <td class="KT_th"><label for="categoria">Categoria:</label></td>
      <td><input type="text" name="categoria" id="categoria" value="<?php echo KT_escapeAttribute($row_rsclientes['categoria']); ?>" size="32" />
        <?php echo $tNGs->displayFieldHint("categoria");?> <?php echo $tNGs->displayFieldError("clientes", "categoria"); ?></td>
    </tr>
    <tr>
      <td class="KT_th"><label for="descricao">Descricao:</label></td>
      <td><textarea name="descricao" id="descricao" cols="50" rows="5"><?php echo KT_escapeAttribute($row_rsclientes['descricao']); ?></textarea>
        <?php echo $tNGs->displayFieldHint("descricao");?> <?php echo $tNGs->displayFieldError("clientes", "descricao"); ?></td>
    </tr>
    <tr class="KT_buttons">
      <td colspan="2"><input type="submit" name="KT_Insert1" id="KT_Insert1" value="Insert record" /></td>
    </tr>
  </table>
</form>
<p>&nbsp;</p>
</body>
</html>

duvidas:
a imagem nao esta aparecendo, aparece somente aonde ela esta

pagina que ira exibir

<?php require_once('Connections/t1.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;
}
}

mysql_select_db($database_t1, $t1);
$query_Recordset1 = "SELECT * FROM clientes";
$Recordset1 = mysql_query($query_Recordset1, $t1) or die(mysql_error());
$row_Recordset1 = mysql_fetch_assoc($Recordset1);
$totalRows_Recordset1 = mysql_num_rows($Recordset1);
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
</head>

<body>
<table border="1">
  <tr>
    <td>id</td>
    <td>endereco</td>
    <td>link</td>
    <td>categoria</td>
    <td>descricao</td>
  </tr>
  <?php do { ?>
    <tr>
      <td><?php echo $row_Recordset1['id']; ?></td>
      <td><?php echo $row_Recordset1['endereco']; ?></td>
      <td><?php echo $row_Recordset1['link']; ?></td>
      <td><?php echo $row_Recordset1['categoria']; ?></td>
      <td><?php echo $row_Recordset1['descricao']; ?></td>
    </tr>
    <?php } while ($row_Recordset1 = mysql_fetch_assoc($Recordset1)); ?>
</table>
</body>
</html>
<?php
mysql_free_result($Recordset1);
?>

[Pedido] Sistema De Cadastro De Imagem Com Descrição E Link Embutido S

05/02/2010, 18:28

seguinte

estou na duvida de como criar um sistema de cadastro de imagens com link embutido na foto redirecionando para o site da imagem
separado em categorias

agradeço desde ja pela ajuda.

Estou Em Duvida Sobre Um Sistema De Envio E Exibiçao De Videos

04/09/2009, 17:51

seguinte
estou precisando fazer um sistema de videos
sou novo no php

mas ja consigo fazer com que o usuario envie o video e esse video fique guardado em um link no banco de dados
fico em duvida no resto
ou seja na exibiçao
grato desde ja pela ajuda

Duvida Em Php

11/08/2009, 13:24

tenho no meu site
um textfield de varias linhas e um botao de enviar
minha meta seria que quando o cara digitasse a mensagem ela fosse salva no banco de dados
e depois apareceria na tela inicial tipo um sistema de noticias

abaixo a parte que comecei a fazer

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
</head>

<body>
<p>Sistema de envio de Noticias</p>
<form id="form1" name="form1" method="post" action="">
  <p>
	<textarea name="textarea" id="textarea" cols="45" rows="5"></textarea>
  </p>
  <p>
	<input type="submit" name="button" id="button" value="Enviar noticia" />
  </p>
</form>
<p>&nbsp;</p>
</body>
</html>
agradeço a ajuda
e posso fornecer video aulas que tenho sobre envio multiplo de arquivos com efeito lightbox
sistema de login com paginas restritas
agredeço desde ja a atençao
meu email
é

danielpaz92@hotmail.com

Podem Me Ajudar Em Um Codigo Urgente

18/07/2009, 19:54

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR...nsitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>produtos</title>
<link rel="stylesheet" type="text/css" href="../style-projects-jquery.css" />

<!-- Arquivos utilizados pelo jQuery lightBox plugin -->
<script type="text/javascript" src="js/jquery.js"></script>
<script type="text/javascript" src="js/jquery.lightbox-0.5.js"></script>
<link rel="stylesheet" type="text/css" href="css/jquery.lightbox-0.5.css" media="screen" />
<!-- / fim dos arquivos utilizados pelo jQuery lightBox plugin -->

<!-- Ativando o jQuery lightBox plugin -->
<script type="text/javascript">
$(function() {
$('#gallery a').lightBox();
});
</script>
<style type="text/css">
/* jQuery lightBox plugin - Gallery style */
#gallery {
background-color: #444;
padding: 10px;
width: 480;
}
#gallery ul { list-style: none; }
#gallery ul li { display: inline; }
#gallery ul img {
border: 5px solid #3e3e3e;
border-width: 5px 5px 20px;
}
#gallery ul a:hover img {
border: 5px solid #fff;
border-width: 5px 5px 20px;
color: #fff;
}
#gallery ul a:hover { color: #fff; }
</style>
</head>
<div id="gallery">
<?php $pasta = $_GET['id']; ?>
<?php
foreach (glob("fotos/$pasta/*.jpg*") as $filename) {
echo "<a href='$filename' target='_blank'><img src='$filename' width='200' height='200'> </a> ";
}
?>
</div>
</body>
</html>


o erro esta aqui mas nao consegui descobrir ainda

<div id="gallery">
<?php $pasta = $_GET['id']; ?>
<?php
foreach (glob("fotos/$pasta/*.jpg*") as $filename) {
echo "<a href='$filename' target='_blank'><img src='$filename' width='200' height='200'> </a> ";
}
?>
</div>

site online

http://www.downhillbikeandstreet.com

na parte de produtos clica na categoria e deveria aparecer as fotos

IPB Skin By Virteq