16/10/2008, 11:22
|
| | | Fecha de Ingreso: agosto-2007 Ubicación: Quito - Ecuador
Mensajes: 1.720
Antigüedad: 16 años, 8 meses Puntos: 28 | |
Respuesta: SOS - Parse error uy... miren lo q paso http://indexa.com.ve/multisillas/ficha_prod.php?id=8
codigo Código PHP: <?php require_once('Connections/multisillas.php'); include('redimensionar.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['id'])) { $colname_Recordset1 = $_GET['id']; } mysql_select_db($database_multisillas, $multisillas); $query_Recordset1 = sprintf("SELECT * FROM productos WHERE id = %s", GetSQLValueString($colname_Recordset1, "int")); $Recordset1 = mysql_query($query_Recordset1, $multisillas) or die(mysql_error()); $row_Recordset1 = mysql_fetch_assoc($Recordset1); $totalRows_Recordset1 = mysql_num_rows($Recordset1); $producto_ID = $_GET['id']; $sqlQuery = mysql_query("SELECT * FROM productos WHERE id = '$producto_ID'") or die(mysql_error()); $row = mysql_fetch_array($sqlQuery); if(!empty($producto_ID)){ $ip = $_SERVER['REMOTE_ADDR']; $hitProductoID = $row['id']; $hitIP = ip2long($ip); $date = date("F j, Y, g:i a"); $sqlInsert = mysql_query("INSERT INTO hits (hitIP, date, hitProductoID) VALUES ('$hitIP', '$date', '$hitProductoID')") or die(mysql_error()); } $sqlHitsQuery = mysql_query("SELECT * FROM hits WHERE hitProductoID = '$producto_ID'") or die(mysql_error()); $hits = mysql_num_rows($sqlHitsQuery); $comprobarIP = "SELECT hitIP FROM hits where hitIP = '$hitIP'" ; $res = mysql_query($comprobarIP) or die(mysql_error()); if (mysql_num_rows($res) == 0) { $suma = (hitTotal + 1); mysql_query("UPDATE hits SET hitTotal = '$suma'") or die(mysql_error()); } ; $miarchivo = $row_Recordset1['imagen'] ; $mysock = getimagesize("imgprod/$miarchivo"); ?> <link href="css/estilo.css" rel="stylesheet" type="text/css"> <script type="text/javascript" src="js/prototype.js"></script> <script type="text/javascript" src="js/scriptaculous.js?load=effects"></script> <script type="text/javascript" src="js/lightbox.js"></script> <link href="lightbox.css" rel="stylesheet" type="text/css"> <table width="400" border="0" align="center" cellpadding="0" cellspacing="3"> <tr class="textoResNot"> <td height="10" colspan="2" valign="top"><?php echo "Producto visto"; ?><span class="textotitResNot"> <?php echo "$hits"; ?></span> <?php echo "veces";?></td> </tr> <tr> <td height="10" colspan="2" valign="top"> </td> </tr> <tr> <td height="10" colspan="2" valign="top"><span class="textoMulti4"><?php echo $row_Recordset1['nombre']; ?></span></td> </tr> <tr> <td width="291" valign="top" class="textoMulti4"><table width="100%" border="0" cellspacing="3" cellpadding="0"> <tr> <td><span class="textoRequeridos"><span class="textoMulti2">Código:</span> <span class="textoMulti5"><?php echo $row_Recordset1['codigo']; ?></span></span></td> </tr> <tr> <td><p class="textotitResNot">Características del producto: </p> <div align="justify"><span class="textoMulti2"><?php echo $row_Recordset1['descripcion']; ?></span> </div></td> </tr> </table></td> <td width="200" valign="top"><div align="center"><a href="imgprod/<?php echo $row_Recordset1['imagen']; ?>" rel="lightbox[roadtrip]"><img src="imgprod/<?php echo $row_Recordset1['imagen']; ?>" <?php imageResize($mysock[0], $mysock[1], 150); ?> border="0"/><br /> <br /> </a><span class="textoMulti2">Para ampliar haga click en la foto.</span><a href="imgprod/<?php echo $row_Recordset1['imagen']; ?>" <?php imageResize($mysock[0], $mysock[1], 150); ?> rel="lightbox[roadtrip]"><br /> </a></div></td> </tr> </table> <?php mysql_free_result($Recordset1); ?>
__________________ Diseño gráfico, Web, imagen corporativa, publicidad ... |