
29/08/2008, 02:31
|
| | Fecha de Ingreso: octubre-2007
Mensajes: 724
Antigüedad: 17 años, 5 meses Puntos: 4 | |
Respuesta: paginador no vincula foto !!??? sale del juego de registros creado por Dreamweaver:
Es esto lo que preguntas ??? espero que si...
<?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;
}
}
$currentPage = $_SERVER["PHP_SELF"];
$maxRows_fotospersonal = 1;
$pageNum_fotospersonal = 0;
if (isset($_GET['pageNum_fotospersonal'])) {
$pageNum_fotospersonal = $_GET['pageNum_fotospersonal'];
}
$startRow_fotospersonal = $pageNum_fotospersonal * $maxRows_fotospersonal;
mysql_select_db($database_mibase, $mibase);
$query_fotospersonal = "SELECT * FROM fotos";
$query_limit_fotospersonal = sprintf("%s LIMIT %d, %d", $query_fotospersonal, $startRow_fotospersonal, $maxRows_fotospersonal);
$fotospersonal = mysql_query($query_limit_fotospersonal, $mibase) or die(mysql_error());
$row_fotospersonal = mysql_fetch_assoc($fotospersonal);
if (isset($_GET['totalRows_fotospersonal'])) {
$totalRows_fotospersonal = $_GET['totalRows_fotospersonal'];
} else {
$all_fotospersonal = mysql_query($query_fotospersonal);
$totalRows_fotospersonal = mysql_num_rows($all_fotospersonal);
}
$totalPages_fotospersonal = ceil($totalRows_fotospersonal/$maxRows_fotospersonal)-1;
$queryString_fotospersonal = "";
if (!empty($_SERVER['QUERY_STRING'])) {
$params = explode("&", $_SERVER['QUERY_STRING']);
$newParams = array();
foreach ($params as $param) {
if (stristr($param, "pageNum_fotospersonal") == false &&
stristr($param, "totalRows_fotospersonal") == false) {
array_push($newParams, $param);
}
}
if (count($newParams) != 0) {
$queryString_fotospersonal = "&" . htmlentities(implode("&", $newParams));
}
}
$queryString_fotospersonal = sprintf("&totalRows_fotospersonal=%d%s", $totalRows_fotospersonal, $queryString_fotospersonal);
?> |