bueno me encargue de medio desarrollar el codigo... me gustaria lo checaran pues me da error y no hace el llamado a la funcion =(
ficha_producto.php
Código PHP:
<?php require_once('Connections/listproduc.php'); ?>
<?php
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_Recordset1 = "-1";
if (isset($_GET['PKID'])) {
$colname_Recordset1 = $_GET['PKID'];
}
mysql_select_db($database_listproduc, $listproduc);
$query_Recordset1 = sprintf("SELECT * FROM producto WHERE PKID = %s", GetSQLValueString($colname_Recordset1, "int"));
$Recordset1 = mysql_query($query_Recordset1, $listproduc) or die(mysql_error());
$row_Recordset1 = mysql_fetch_assoc($Recordset1);
$totalRows_Recordset1 = mysql_num_rows($Recordset1);
function imagengrande()
{
window.open("verimagen.php?imagen=/iamges2/<?=$imagen;?>", "", "width=400,height=400");
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!-- saved from url=(0014)about:internet -->
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>.. // O C E A N P L A S T // ..</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<style type="text/css">
td img {display: block;}body {
background-color: #010101;
}
.style1 { font-family: Tahoma;
font-size: 10px;
color: #B9CBD9;
}
.style2 {color: #FAFAF8}
</style>
<!--Fireworks CS3 Dreamweaver CS3 target. Created Mon Sep 17 15:30:44 GMT-0400 2007-->
<script src="Scripts/AC_RunActiveContent.js" type="text/javascript"></script>
<link href="css/estilos.css" rel="stylesheet" type="text/css" />
<style type="text/css">
<!--
.style3 {font-size: 11px}
-->
</style>
</head>
<body>
<table width="760" border="0" align="center" cellpadding="0" cellspacing="0">
<!-- fwtable fwsrc="layout2.png" fwpage="quienes somos" fwbase="quienes.jpg" fwstyle="Dreamweaver" fwdocid = "857149810" fwnested="0" -->
<tr>
<td><img src="images/spacer.gif" width="112" height="1" border="0" alt="" /></td>
<td><img src="images/spacer.gif" width="113" height="1" border="0" alt="" /></td>
<td><img src="images/spacer.gif" width="9" height="1" border="0" alt="" /></td>
<td><img src="images/spacer.gif" width="88" height="1" border="0" alt="" /></td>
<td><img src="images/spacer.gif" width="26" height="1" border="0" alt="" /></td>
<td><img src="images/spacer.gif" width="79" height="1" border="0" alt="" /></td>
<td><img src="images/spacer.gif" width="13" height="1" border="0" alt="" /></td>
<td><img src="images/spacer.gif" width="101" height="1" border="0" alt="" /></td>
<td><img src="images/spacer.gif" width="10" height="1" border="0" alt="" /></td>
<td><img src="images/spacer.gif" width="96" height="1" border="0" alt="" /></td>
<td><img src="images/spacer.gif" width="113" height="1" border="0" alt="" /></td>
<td><img src="images/spacer.gif" width="1" height="1" border="0" alt="" /></td>
</tr>
<tr>
<td colspan="11" rowspan="3" align="left" valign="top"><table width="760" border="0" cellspacing="0" cellpadding="0">
<tr>
<td bgcolor="#FFFFFF"><table width="760" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="167" valign="top" background="images/bg.gif" bgcolor="#000000"><script type="text/javascript">
AC_FL_RunContent( 'codebase','http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0','width','167','height','388','src','menu','quality','high','pluginspage','http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash','movie','menu' ); //end AC code
</script>
<noscript><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0" width="167" height="388">
<param name="movie" value="menu.swf" />
<param name="quality" value="high" />
<embed src="menu.swf" quality="high" pluginspage="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="167" height="388"></embed>
</object></noscript></td>
<td width="593" rowspan="2" align="left" valign="top" background="images/bg2.gif"><table width="593" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="593" height="103" align="left" valign="top"><table width="593" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="317" height="103" rowspan="2"><img src="images/producto.jpg" width="317" height="103" /></td>
<td width="276" align="left" valign="top"><img src="images/productoinicio.jpg" width="276" height="30" /></td>
</tr>
<tr>
<td align="left" valign="top"><img src="images/productofon1.jpg" width="276" height="73" /></td>
</tr>
</table></td>
</tr>
<tr>
<td align="left" valign="top" bgcolor="#000000"><table width="586" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><img src="images/productoinfoA.jpg" width="586" height="20" /></td>
</tr>
<tr>
<td><img src="images/productoinfoB.jpg" width="586" height="9" /></td>
</tr>
<tr>
<td><table width="586" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="30" height="194" background="images/productointe1.jpg"> </td>
<td bgcolor="#D7E2E6"><table width="94%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="40%" valign="top"><table width="126%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="tituloPROD"><br />
<?php echo $row_Recordset1['nombre']; ?></td>
</tr>
</table>
<table width="124%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td><font class="descPROD"><br />
<?php echo $row_Recordset1['descripcion']; ?></font></td>
</tr>
<tr>
<td> </td>
</tr>
<tr>
<td><div align="right"><a href="productos.php" class="textoINDEX">< Volver</a></div></td>
</tr>
</table></td>
<td width="60%"><div align="center"><br />
<a href="javascript:imagengrande()"><img src="images2/<?php echo $row_Recordset1['imagen']; ?>" width="200" height="200" border="1" />
verimagen.php
Código PHP:
<?php
include_once "Connections/listproduc.php";
$sql = "SELECT * FROM producto WHERE imagen = '$_REQUEST[imagen]'";
$query = mysql_query($sql) or die(mysql_error());
if ($contar == 0)
{
}
else
{
while ($fila = mysql_fetch_array($query))
{
$imagen= $fila['imagen'];
}
?>
<p><img src="images2/<?=$imagen;?>" border="0">
<?php
}
?>
</p>