i need help to clean sytanx errors a little and to do a pagination for dinamic pages.i give a beer on paypall who helps me? at the finish here is my code
<?php require_once(‘./Connections/filminitaliano.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_listaFilm = 10;
$pageNum_listaFilm = 0;
if (isset($_GET[‘pageNum_listaFilm’])) {
$pageNum_listaFilm = $
}
$startRow_listaFilm = $pageNum_listaFilm * $maxRows_listaFilm;
$varCategoria_listaFilm = “0”;
if (isset($_GET[‘cat’]) && $_GET[‘cat’] : 0){
$varCategoria_listaFilm = $
}
else {
header(“Location: genere.php?cat=1/Azione”);
}
mysql_select_db($database_filminitaliano, $filminitaliano);
$query_listaFilm = sprintf(“SELECT * FROM filme WHERE filme.intCategoria = %s”, GetSQLValueString($varCategoria_listaFilm, “int”));
$query_limit_listaFilm = sprintf(“%s LIMIT %d, %d”, $query_listaFilm, $startRow_listaFilm, $maxRows_listaFilm);
$listaFilm = mysql_query($query_limit_listaFilm, $filminitaliano) or die(mysql_error());
$row_listaFilm = mysql_fetch_assoc($listaFilm);
if (isset($_GET[‘totalRows_listaFilm’])) {
$totalRows_listaFilm = $
} else {
$all_listaFilm = mysql_query($query_listaFilm);
$totalRows_listaFilm = mysql_num_rows($all_listaFilm);
}
$totalPages_listaFilm = ceil($totalRows_listaFilm/$maxRows_listaFilm)-1;
?>
<!DOCTYPE html>
<html lang=”en”>
<head>
<meta charset=”utf-8″>
<title>Site Setup</title>
<meta name=”viewport” content=”width=device-width”>
<!– Main stylesheet imports bootstrap css and adds custom –>
<link href=”css/style.css” rel=”stylesheet”>
<!– Modernizr for browser feature-checking
and HTML5shim (included) see modernizr.com –>
<script src=”js/modernizr-2.5.3.min.js”></script>
<!– Fav and touch icons –>
<!– OR remove these lines and place icons directly
in the site root folder mathiasbynens.be/notes/touch-icons –>
<link rel=”shortcut icon” href=”img/favicon.ico”>
<link rel=”apple-touch-icon” href=”img/apple-touch-icon.png”>
<link rel=”apple-touch-icon” sizes=”72×72″ href=”img/apple-touch-icon-72×72.png”>
<link rel=”apple-touch-icon” sizes=”114×114″ href=”img/apple-touch-icon-114×114.png”>
<link rel=”stylesheet” type=”text/css” href=”css/demo.css” />
<link rel=”stylesheet” type=”text/css” href=”css/elastislide.css” />
<link rel=”stylesheet” type=”text/css” href=”css/custom.css” />
<script src=”js/modernizr.custom.17475.js”></script>
</head>
<body>
<div class=”navbar navbar-fixed-top”>
<div class=”navbar-inner”>
<div class=”container”>
<a class=”btn btn-navbar” data-toggle=”collapse” data-target=”.nav-collapse”>
<span class=”icon-bar”></span>
<span class=”icon-bar”></span>
<span class=”icon-bar”></span>
</a>
<a class=”brand” href=”index.html” style=”font-family:’alba’; font-size:24px;”>Film in italiano.com</a>
<div class=”nav-collapse”>
<ul class=”nav”>
<li class=”active”><a href=”#”><i class=”icon-home icon-white”></i> Homepage</a></li>
<li><a href=”#”>In Cinema</a></li>
<li><a href=”#”>Articoli</a></li>
<li><a href=”#”>Accesso utenti</a></li>
<li class=”dropdown”>
<a href=”#” class=”dropdown-toggle” data-toggle=”dropdown”>Genere <b class=”caret”></b></a>
<ul class=”dropdown-menu”>
<?php include ‘inc/listacategoria.php’?>
</ul>
</li>
</ul>
<form class=”navbar-search pull-right” action=””>
<input type=”text” class=”search-query span2″ placeholder=”Search”>
</form>
</div><!– /.nav-collapse –>
</div><!– /.container –>
</div><!– /navbar-inner –>
</div><!– /navbar –>
<div class=”container”>
<p>ULTIMI FILM AGGIUNTI</p>
<div class=”container demo-1″>
<!– Codrops top bar –>
<!–/ Codrops top bar –>
<div class=”main”>
<header class=”clearfix”>
<nav class=”codrops-demos”>
</nav>
</header>
<!– Elastislide Carousel –>
</div>
</div>
<div>
</div>
<table width=”100%” border=”0″>
<tr>
<td><?php if ($totalRows_listaFilm > 0) { // Show if recordset not empty ?>
<?php do { ?>
<div id=”mainwrapper”>
<!– Image Caption 1 –>
<div id=”box-1″ class=”box”> <a href=”film.php?id=<?php echo mysql_real_escape_string($row_listaFilm[‘id’]); ?>/<?php echo $row_listaFilm[‘titolo_link’]; ?>”><img src=”copFilm/descrcare.jpg” width=”150″ height=”199″ id=”image-1″/></a>
<span class=”caption simple-caption”>
<div style=”width:150″><p style=”font-size:12px;”><?php echo $row_listaFilm[‘titolo’]; ?></p></div>
</span>
</div></div>
<?php } while ($row_listaFilm = mysql_fetch_assoc($listaFilm)); ?>
<?php } // Show if recordset not empty ?>
<?php if ($totalRows_listaFilm == 0) { // Show if recordset empty ?>
Nessun film in questa categoria
<?php } // Show if recordset empty ?></td>
</tr>
<tr>
<td>Space for pagination?</td>
</tr>
</table>
</div>
</div> <!– /container –>
<!– ==============================================
JavaScript below! –>
<!– jQuery via Google + local fallback, see h5bp.com –>
<script src=”//ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js”></script>
<script>window.jQuery || document.write(‘<script src=”js/jquery-1.7.1.min.js”></script>’)</script>
<!– Bootstrap JS –>
<script src=”js/bootstrap.min.js”></script>
<!– Prettify –>
<script src=”js/prettify/prettify.js”></script>
<!– Initialize Scripts –>
<script>
addEventListener(‘load’, prettyPrint, false);
$(document).ready(function(){
// Activate prettyprint
$(‘pre’).addClass(‘prettyprint’);
// Initialize tabs and pills
$(‘.note-tabs’).tab();
}); // end document.ready
</script>
<script type=”text/javascript” src=”http://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js”></script>
<script type=”text/javascript” src=”js/jquerypp.custom.js”></script>
<script type=”text/javascript” src=”js/jquery.elastislide.js”></script>
<script type=”text/javascript”>
$( ‘#carousel’ ).elastislide();
</script>
</body>
</html>