Ver Mensaje Individual
  #1 (permalink)  
Antiguo 23/02/2014, 16:42
blackmel25
 
Fecha de Ingreso: enero-2010
Mensajes: 59
Antigüedad: 14 años, 2 meses
Puntos: 0
paginar juego de registro manualmente en dreamweaver cs5, posible?

hola

paso a explicarmen, estoy desarrollando una web de noticas de cine en dreamweaver cs5, cuando intento hacer una paginacion (con la opcion automatica que te facilita DW) me sale un error, estoy cansado de buscar la solucion de ese problema y e decidido intentar hacer la paginacion de manera manual pero el problema es que se me complica debido a que no tengo el conocimiento necesario.

necesito hacer una paginacion del juego de registro, agradeceria mucho que alguien me ayudara hay, mas abajo pondre el codigo...

Código PHP:
<?php require_once('Connections/conexionpeli.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;
}
}

$maxRows_DatosPeliculaEnIndex 40;
$pageNum_DatosPeliculaEnIndex 0;
if (isset(
$_GET['pageNum_DatosPeliculaEnIndex'])) {
  
$pageNum_DatosPeliculaEnIndex $_GET['pageNum_DatosPeliculaEnIndex'];
}
$startRow_DatosPeliculaEnIndex $pageNum_DatosPeliculaEnIndex $maxRows_DatosPeliculaEnIndex;

mysql_select_db($database_conexionpeli$conexionpeli);
$query_DatosPeliculaEnIndex "SELECT * FROM tbpelicula ORDER BY tbpelicula.id_pelicula DESC";
$query_limit_DatosPeliculaEnIndex sprintf("%s LIMIT %d, %d"$query_DatosPeliculaEnIndex$startRow_DatosPeliculaEnIndex$maxRows_DatosPeliculaEnIndex);
$DatosPeliculaEnIndex mysql_query($query_limit_DatosPeliculaEnIndex$conexionpeli) or die(mysql_error());
$row_DatosPeliculaEnIndex mysql_fetch_assoc($DatosPeliculaEnIndex);

if (isset(
$_GET['totalRows_DatosPeliculaEnIndex'])) {
  
$totalRows_DatosPeliculaEnIndex $_GET['totalRows_DatosPeliculaEnIndex'];
} else {
  
$all_DatosPeliculaEnIndex mysql_query($query_DatosPeliculaEnIndex);
  
$totalRows_DatosPeliculaEnIndex mysql_num_rows($all_DatosPeliculaEnIndex);
}
$totalPages_DatosPeliculaEnIndex ceil($totalRows_DatosPeliculaEnIndex/$maxRows_DatosPeliculaEnIndex)-1;
?>
Código HTML:
 <?php do { ?>
    <!--peliculas--> 
  <div id="cartelera">
    <div class="imagen-cart"><a href="ver.php?recordID=<?php echo $row_DatosPeliculaEnIndex['id_pelicula']; ?>">
      <img src="img/cartelera/<?php echo $row_DatosPeliculaEnIndex['cartelera']; ?>" width="150" height="200"/>
      <h3><?php echo $row_DatosPeliculaEnIndex['name_latino']; ?></h3></a>
      </div>
  </div>
    <!--fin peliculas-->
    <?php } while ($row_DatosPeliculaEnIndex = mysql_fetch_assoc($DatosPeliculaEnIndex)); ?> 
espero las respuesto :D