XIM Posted November 2, 2012 Report Share Posted November 2, 2012 (edited) bom dia!!!,Amigos estou com outro problema aqui,tenho este script,consegui colocar pra ele listar lado a lado,mas gostaria de de coloca-los tipolado a lado com 4 produtos e embaixo também,assim sucessivamente até chegar 3 linhas.ficarei muito agradecido se puderem me ajudar,tentei montar a tabela,mas continua lado a lado e listando os 6 produtos.<?php require_once('Connections/conexao.php'); ?><?php$currentPage = $_SERVER["PHP_SELF"];$maxRows_Recordset1 = 3;$pageNum_Recordset1 = 0;if (isset($_GET['pageNum_Recordset1'])) {$pageNum_Recordset1 = $_GET['pageNum_Recordset1'];}$startRow_Recordset1 = $pageNum_Recordset1 * $maxRows_Recordset1;$colname_Recordset1 = "1";if (isset($_GET['cod_cat'])) {$colname_Recordset1 = (get_magic_quotes_gpc()) ? $_GET['cod_cat'] : addslashes($_GET['cod_cat']);}mysql_select_db($database_conexao, $conexao);$query_Recordset1 = sprintf("SELECT * FROM produtos WHERE cod_cat = %s", $colname_Recordset1);$query_limit_Recordset1 = sprintf("%s LIMIT %d, %d", $query_Recordset1, $startRow_Recordset1, $maxRows_Recordset1);$Recordset1 = mysql_query($query_limit_Recordset1, $conexao) or die(mysql_error());$row_Recordset1 = mysql_fetch_assoc($Recordset1);if (isset($_GET['totalRows_Recordset1'])) { $totalRows_Recordset1 = $_GET['totalRows_Recordset1'];} else { $all_Recordset1 = mysql_query($query_Recordset1); $totalRows_Recordset1 = mysql_num_rows($all_Recordset1);}$totalPages_Recordset1 = ceil($totalRows_Recordset1/$maxRows_Recordset1)-1;$queryString_Recordset1 = "";if (!empty($_SERVER['QUERY_STRING'])) { $params = explode("&", $_SERVER['QUERY_STRING']); $newParams = array(); foreach ($params as $param) { if (stristr($param, "pageNum_Recordset1") == false && stristr($param, "totalRows_Recordset1") == false) { array_push($newParams, $param); } } if (count($newParams) != 0) { $queryString_Recordset1 = "&" . implode("&", $newParams); }}$queryString_Recordset1 = sprintf("&totalRows_Recordset1=%d%s", $totalRows_Recordset1, $queryString_Recordset1);?><table cellspacing=0 cellpadding=0 width=88%"align="center" border=0 > <tr> <?php if ($totalRows_Recordset1 == 0) { // Show if recordset empty ?>No momento não dispomos de nenhum produto para essa categoria.<?php } // Show if recordset empty ?><?php $i = 0; do { ?><?php if ($i == 5){echo "</tr>";} ?><td><div align="center"><img src="<?php echo $row_Recordset1['fot_peq];?>" width='120' height='120' alt="" onMouseOver="aumenta(this)" onMouseOut="diminui(this)"></div> <FONT FACE="ARIAL" COLOR="BLUE"><font size="2"> <div align="center"><strong><?php echo $row_Recordset1['nome_prod']; ?></strong></div> <div align=center"><FONT COLOR="#F8F8FF"><?php echo $row_Recordset1['descricao]; ?></div> </FONT FACE="script mt bold" COLOR="BLUE"></font size="2"></FONT COLOR="#F8F8FF"> <div align="center"><FONT FACE="ARIAL" COLOR="BLUE"><font size="2">Por : R$ <?php echo $row_Recordset1['valor']; ?></div> <center><img src="comprar.JPG" alt="" title="" /></center></FONT FACE="ARIAL" COLOR="BLUE"><font size="2"> <p> Registros <?php echo ($startRow_Recordset1 + 1) ?> a <?php echo min($startRow_Recordset1 + $maxRows_Recordset1, $totalRows_Recordset1) ?> de <?php echo $totalRows_Recordset1 ?> <td> <br> <?php } while ($row_Recordset1 = mysql_fetch_assoc($Recordset1));mysql_free_result($Recordset1);?> <table border="0" width="50%" align="center"> <tr> <td width="23%" align="center"> <?php if ($pageNum_Recordset1 > 0) { // Show if not first page ?> <a href="<?php printf("%s?pageNum_Recordset1=%d%s", $currentPage, 0, $queryString_Recordset1); ?>"><FONT FACE="script mt bold" COLOR="BLUE"><font size="3">Primeiro</a> <?php } // Show if not first page ?> </td> <td width="31%" align="center"> <?php if ($pageNum_Recordset1 > 0) { // Show if not first page ?> <a href="<?php printf("%s?pageNum_Recordset1=%d%s", $currentPage, max(0, $pageNum_Recordset1 - 1), $queryString_Recordset1); ?>"><FONT FACE="script mt bold" COLOR="BLUE"><font size="3">Retornar</a> <?php } // Show if not first page ?> </td> <td width="23%" align="center"> <?php if ($pageNum_Recordset1 < $totalPages_Recordset1) { // Show if not last page ?> <a href="<?php printf("%s?pageNum_Recordset1=%d%s", $currentPage, min($totalPages_Recordset1, $pageNum_Recordset1 + 1), $queryString_Recordset1); ?>"><FONT FACE="script mt bold" COLOR="BLUE"><font size="3">Avançar</a> <?php } // Show if not last page ?> </td> <td width="23%" align="center"> <?php if ($pageNum_Recordset1 < $totalPages_Recordset1) { // Show if not last page ?> <a href="<?php printf("%s?pageNum_Recordset1=%d%s", $currentPage, $totalPages_Recordset1, $queryString_Recordset1); ?>"><FONT FACE="script mt bold" COLOR="BLUE"><font size="3">Último</a> <?php } // Show if not last page ?> </td> </tr> </table></p> </div> Edited November 7, 2012 by XIM Quote Link to comment Share on other sites More sharing options...
0 ESerra Posted November 2, 2012 Report Share Posted November 2, 2012 Exemplo de 3x3:http://scriptbrasil.com.br/forum/index.php...1836&hl=3x3 Quote Link to comment Share on other sites More sharing options...
0 XIM Posted November 2, 2012 Author Report Share Posted November 2, 2012 bom dia!!!,Amigos estou com outro problema aqui,tenho este script,consegui colocar pra ele listar lado a lado,mas gostaria de de coloca-los tipolado a lado com 4 produtos e embaixo também,assim sucessivamente até chegar 3 linhas.ficarei muito agradecido se puderem me ajudar,tentei montar a tabela,mas continua lado a lado e listando os 6 produtos.<?php require_once('Connections/conexao.php'); ?><?php$currentPage = $_SERVER["PHP_SELF"];$maxRows_Recordset1 = 3;$pageNum_Recordset1 = 0;if (isset($_GET['pageNum_Recordset1'])) {$pageNum_Recordset1 = $_GET['pageNum_Recordset1'];}$startRow_Recordset1 = $pageNum_Recordset1 * $maxRows_Recordset1;$colname_Recordset1 = "1";if (isset($_GET['cod_cat'])) {$colname_Recordset1 = (get_magic_quotes_gpc()) ? $_GET['cod_cat'] : addslashes($_GET['cod_cat']);}mysql_select_db($database_conexao, $conexao);$query_Recordset1 = sprintf("SELECT * FROM produtos WHERE cod_cat = %s", $colname_Recordset1);$query_limit_Recordset1 = sprintf("%s LIMIT %d, %d", $query_Recordset1, $startRow_Recordset1, $maxRows_Recordset1);$Recordset1 = mysql_query($query_limit_Recordset1, $conexao) or die(mysql_error());$row_Recordset1 = mysql_fetch_assoc($Recordset1);if (isset($_GET['totalRows_Recordset1'])) { $totalRows_Recordset1 = $_GET['totalRows_Recordset1'];} else { $all_Recordset1 = mysql_query($query_Recordset1); $totalRows_Recordset1 = mysql_num_rows($all_Recordset1);}$totalPages_Recordset1 = ceil($totalRows_Recordset1/$maxRows_Recordset1)-1;$queryString_Recordset1 = "";if (!empty($_SERVER['QUERY_STRING'])) { $params = explode("&", $_SERVER['QUERY_STRING']); $newParams = array(); foreach ($params as $param) { if (stristr($param, "pageNum_Recordset1") == false && stristr($param, "totalRows_Recordset1") == false) { array_push($newParams, $param); } } if (count($newParams) != 0) { $queryString_Recordset1 = "&" . implode("&", $newParams); }}$queryString_Recordset1 = sprintf("&totalRows_Recordset1=%d%s", $totalRows_Recordset1, $queryString_Recordset1);?><table cellspacing=0 cellpadding=0 width=88%"align="center" border=0 > <tr> <?php if ($totalRows_Recordset1 == 0) { // Show if recordset empty ?>No momento não dispomos de nenhum produto para essa categoria.<?php } // Show if recordset empty ?><?php $i = 0; do { ?><?php if ($i == 5){echo "</tr>";} ?><td><div align="center"><img src="<?php echo $row_Recordset1['fot_peq];?>" width='120' height='120' alt="" onMouseOver="aumenta(this)" onMouseOut="diminui(this)"></div> <FONT FACE="ARIAL" COLOR="BLUE"><font size="2"> <div align="center"><strong><?php echo $row_Recordset1['nome_prod']; ?></strong></div> <div align=center"><FONT COLOR="#F8F8FF"><?php echo $row_Recordset1['descricao]; ?></div> </FONT FACE="script mt bold" COLOR="BLUE"></font size="2"></FONT COLOR="#F8F8FF"> <div align="center"><FONT FACE="ARIAL" COLOR="BLUE"><font size="2">Por : R$ <?php echo $row_Recordset1['valor']; ?></div> <center><img src="comprar.JPG" alt="" title="" /></center></FONT FACE="ARIAL" COLOR="BLUE"><font size="2"> <p> Registros <?php echo ($startRow_Recordset1 + 1) ?> a <?php echo min($startRow_Recordset1 + $maxRows_Recordset1, $totalRows_Recordset1) ?> de <?php echo $totalRows_Recordset1 ?> <td> <br> <?php } while ($row_Recordset1 = mysql_fetch_assoc($Recordset1));mysql_free_result($Recordset1);?> <table border="0" width="50%" align="center"> <tr> <td width="23%" align="center"> <?php if ($pageNum_Recordset1 > 0) { // Show if not first page ?> <a href="<?php printf("%s?pageNum_Recordset1=%d%s", $currentPage, 0, $queryString_Recordset1); ?>"><FONT FACE="script mt bold" COLOR="BLUE"><font size="3">Primeiro</a> <?php } // Show if not first page ?> </td> <td width="31%" align="center"> <?php if ($pageNum_Recordset1 > 0) { // Show if not first page ?> <a href="<?php printf("%s?pageNum_Recordset1=%d%s", $currentPage, max(0, $pageNum_Recordset1 - 1), $queryString_Recordset1); ?>"><FONT FACE="script mt bold" COLOR="BLUE"><font size="3">Retornar</a> <?php } // Show if not first page ?> </td> <td width="23%" align="center"> <?php if ($pageNum_Recordset1 < $totalPages_Recordset1) { // Show if not last page ?> <a href="<?php printf("%s?pageNum_Recordset1=%d%s", $currentPage, min($totalPages_Recordset1, $pageNum_Recordset1 + 1), $queryString_Recordset1); ?>"><FONT FACE="script mt bold" COLOR="BLUE"><font size="3">Avançar</a> <?php } // Show if not last page ?> </td> <td width="23%" align="center"> <?php if ($pageNum_Recordset1 < $totalPages_Recordset1) { // Show if not last page ?> <a href="<?php printf("%s?pageNum_Recordset1=%d%s", $currentPage, $totalPages_Recordset1, $queryString_Recordset1); ?>"><FONT FACE="script mt bold" COLOR="BLUE"><font size="3">Último</a> <?php } // Show if not last page ?> </td> </tr> </table></p> </div>antes de postar,já tinha passado por este link,mas darei outra analizada pra ve se consigo,obrigado. Quote Link to comment Share on other sites More sharing options...
0 XIM Posted November 3, 2012 Author Report Share Posted November 3, 2012 bom dia!!!,Amigos estou com outro problema aqui,tenho este script,consegui colocar pra ele listar lado a lado,mas gostaria de de coloca-los tipolado a lado com 4 produtos e embaixo também,assim sucessivamente até chegar 3 linhas.ficarei muito agradecido se puderem me ajudar,tentei montar a tabela,mas continua lado a lado e listando os 6 produtos.<?php require_once('Connections/conexao.php'); ?><?php$currentPage = $_SERVER["PHP_SELF"];$maxRows_Recordset1 = 3;$pageNum_Recordset1 = 0;if (isset($_GET['pageNum_Recordset1'])) {$pageNum_Recordset1 = $_GET['pageNum_Recordset1'];}$startRow_Recordset1 = $pageNum_Recordset1 * $maxRows_Recordset1;$colname_Recordset1 = "1";if (isset($_GET['cod_cat'])) {$colname_Recordset1 = (get_magic_quotes_gpc()) ? $_GET['cod_cat'] : addslashes($_GET['cod_cat']);}mysql_select_db($database_conexao, $conexao);$query_Recordset1 = sprintf("SELECT * FROM produtos WHERE cod_cat = %s", $colname_Recordset1);$query_limit_Recordset1 = sprintf("%s LIMIT %d, %d", $query_Recordset1, $startRow_Recordset1, $maxRows_Recordset1);$Recordset1 = mysql_query($query_limit_Recordset1, $conexao) or die(mysql_error());$row_Recordset1 = mysql_fetch_assoc($Recordset1);if (isset($_GET['totalRows_Recordset1'])) { $totalRows_Recordset1 = $_GET['totalRows_Recordset1'];} else { $all_Recordset1 = mysql_query($query_Recordset1); $totalRows_Recordset1 = mysql_num_rows($all_Recordset1);}$totalPages_Recordset1 = ceil($totalRows_Recordset1/$maxRows_Recordset1)-1;$queryString_Recordset1 = "";if (!empty($_SERVER['QUERY_STRING'])) { $params = explode("&", $_SERVER['QUERY_STRING']); $newParams = array(); foreach ($params as $param) { if (stristr($param, "pageNum_Recordset1") == false && stristr($param, "totalRows_Recordset1") == false) { array_push($newParams, $param); } } if (count($newParams) != 0) { $queryString_Recordset1 = "&" . implode("&", $newParams); }}$queryString_Recordset1 = sprintf("&totalRows_Recordset1=%d%s", $totalRows_Recordset1, $queryString_Recordset1);?><table cellspacing=0 cellpadding=0 width=88%"align="center" border=0 > <tr> <?php if ($totalRows_Recordset1 == 0) { // Show if recordset empty ?>No momento não dispomos de nenhum produto para essa categoria.<?php } // Show if recordset empty ?><?php $i = 0; do { ?><?php if ($i == 5){echo "</tr>";} ?><td><div align="center"><img src="<?php echo $row_Recordset1['fot_peq];?>" width='120' height='120' alt="" onMouseOver="aumenta(this)" onMouseOut="diminui(this)"></div> <FONT FACE="ARIAL" COLOR="BLUE"><font size="2"> <div align="center"><strong><?php echo $row_Recordset1['nome_prod']; ?></strong></div> <div align=center"><FONT COLOR="#F8F8FF"><?php echo $row_Recordset1['descricao]; ?></div> </FONT FACE="script mt bold" COLOR="BLUE"></font size="2"></FONT COLOR="#F8F8FF"> <div align="center"><FONT FACE="ARIAL" COLOR="BLUE"><font size="2">Por : R$ <?php echo $row_Recordset1['valor']; ?></div> <center><img src="comprar.JPG" alt="" title="" /></center></FONT FACE="ARIAL" COLOR="BLUE"><font size="2"> <p> Registros <?php echo ($startRow_Recordset1 + 1) ?> a <?php echo min($startRow_Recordset1 + $maxRows_Recordset1, $totalRows_Recordset1) ?> de <?php echo $totalRows_Recordset1 ?> <td> <br> <?php } while ($row_Recordset1 = mysql_fetch_assoc($Recordset1));mysql_free_result($Recordset1);?> <table border="0" width="50%" align="center"> <tr> <td width="23%" align="center"> <?php if ($pageNum_Recordset1 > 0) { // Show if not first page ?> <a href="<?php printf("%s?pageNum_Recordset1=%d%s", $currentPage, 0, $queryString_Recordset1); ?>"><FONT FACE="script mt bold" COLOR="BLUE"><font size="3">Primeiro</a> <?php } // Show if not first page ?> </td> <td width="31%" align="center"> <?php if ($pageNum_Recordset1 > 0) { // Show if not first page ?> <a href="<?php printf("%s?pageNum_Recordset1=%d%s", $currentPage, max(0, $pageNum_Recordset1 - 1), $queryString_Recordset1); ?>"><FONT FACE="script mt bold" COLOR="BLUE"><font size="3">Retornar</a> <?php } // Show if not first page ?> </td> <td width="23%" align="center"> <?php if ($pageNum_Recordset1 < $totalPages_Recordset1) { // Show if not last page ?> <a href="<?php printf("%s?pageNum_Recordset1=%d%s", $currentPage, min($totalPages_Recordset1, $pageNum_Recordset1 + 1), $queryString_Recordset1); ?>"><FONT FACE="script mt bold" COLOR="BLUE"><font size="3">Avançar</a> <?php } // Show if not last page ?> </td> <td width="23%" align="center"> <?php if ($pageNum_Recordset1 < $totalPages_Recordset1) { // Show if not last page ?> <a href="<?php printf("%s?pageNum_Recordset1=%d%s", $currentPage, $totalPages_Recordset1, $queryString_Recordset1); ?>"><FONT FACE="script mt bold" COLOR="BLUE"><font size="3">Último</a> <?php } // Show if not last page ?> </td> </tr> </table></p> </div>antes de postar,já tinha passado por este link,mas darei outra analizada pra ve se consigo,obrigado.ainda nada,mas continuo a pesquisar e ver onde estou errando Quote Link to comment Share on other sites More sharing options...
0 XIM Posted November 4, 2012 Author Report Share Posted November 4, 2012 Exemplo de 3x3:http://scriptbrasil.com.br/forum/index.php...1836&hl=3x3Obrigado amigo ESERRA,consegui,mas agora surgiu outro porem,se você puder me ajudar,ficarei muito agradecido.resolvi assim a minha duvida:<?php$cont = "0"; echo "<table width=\"88%\" height=\"10\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\"><tr>"; while($row_Recordset1 = mysql_fetch_assoc($Recordset1)){ if($cont == "3"){ echo "</tr><tr>"; $cont = "0";}echo "<td align=center ><img src='".$row_Recordset1['fot_peq']."' width=150' height='150' border='0'><br>";echo $row_Recordset1['nome_prod]."<br></td>"; $cont++; }echo "</tr></table>"; ?>minha duvida é o seguinte que tentei e não consegui,como colocar este outroecho $row_Recordset1['descricao'];abaixo do echo $row_Recordset1['nome_prod']."<br> , tentei colocar mas não consegui,outra coisa como faço pra linkar toda esta tabela pra categoria.Obrigado pela força. Quote Link to comment Share on other sites More sharing options...
0 XIM Posted November 5, 2012 Author Report Share Posted November 5, 2012 Exemplo de 3x3:http://scriptbrasil.com.br/forum/index.php...1836&hl=3x3Boa noite !!!!! amigo ESERRA,analizando do link que mandaste consegui resolver mas agora estou mais esta deste mesmo script ,que me mostra os produtos de uma determinada categoria :1- gostaria de linka cada um deste produtos para a pagina(detalhes.php).(acredito que deva ser uma só pra todas)2- oque coloco na pagina (detalhes.php) para receber dados vindo do link deste script.eis o script:<?php$cont = "0";echo "<table width=\"88%\" height=\"10\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\"><tr>"; while($row_Recordset1 = mysql_fetch_assoc($Recordset1)){ if($cont == "3"){ echo "</tr><tr>";$cont = "0";}echo "<td align=center ><img src='".$row_Recordset1['fot_peq']."' width=150' height='150' border='0'><br>";echo $row_Recordset1['cod_prod]."<br>";echo $row_Recordset1['nome_prod']."<br>";echo $row_Recordset1['descricao']."<br></td>"; //$cont++;}echo "</tr></table>"; ?>ficarei muito agradecido se puder me ajudardesde já a agradeço.Denicio(Xim) Quote Link to comment Share on other sites More sharing options...
Question
XIM
bom dia!!!,Amigos estou com outro problema aqui,tenho este script,consegui colocar pra ele listar lado a lado,mas gostaria de de coloca-los tipo
lado a lado com 4 produtos e embaixo também,assim sucessivamente até chegar 3 linhas.
ficarei muito agradecido se puderem me ajudar,tentei montar a tabela,mas continua lado a lado e listando os 6 produtos.
<?php require_once('Connections/conexao.php'); ?>
<?php
$currentPage = $_SERVER["PHP_SELF"];
$maxRows_Recordset1 = 3;
$pageNum_Recordset1 = 0;
if (isset($_GET['pageNum_Recordset1'])) {
$pageNum_Recordset1 = $_GET['pageNum_Recordset1'];
}
$startRow_Recordset1 = $pageNum_Recordset1 * $maxRows_Recordset1;
$colname_Recordset1 = "1";
if (isset($_GET['cod_cat'])) {
$colname_Recordset1 = (get_magic_quotes_gpc()) ? $_GET['cod_cat'] : addslashes($_GET['cod_cat']);
}
mysql_select_db($database_conexao, $conexao);
$query_Recordset1 = sprintf("SELECT * FROM produtos WHERE cod_cat = %s", $colname_Recordset1);
$query_limit_Recordset1 = sprintf("%s LIMIT %d, %d", $query_Recordset1, $startRow_Recordset1, $maxRows_Recordset1);
$Recordset1 = mysql_query($query_limit_Recordset1, $conexao) or die(mysql_error());
$row_Recordset1 = mysql_fetch_assoc($Recordset1);
if (isset($_GET['totalRows_Recordset1'])) {
$totalRows_Recordset1 = $_GET['totalRows_Recordset1'];
} else {
$all_Recordset1 = mysql_query($query_Recordset1);
$totalRows_Recordset1 = mysql_num_rows($all_Recordset1);
}
$totalPages_Recordset1 = ceil($totalRows_Recordset1/$maxRows_Recordset1)-1;
$queryString_Recordset1 = "";
if (!empty($_SERVER['QUERY_STRING'])) {
$params = explode("&", $_SERVER['QUERY_STRING']);
$newParams = array();
foreach ($params as $param) {
if (stristr($param, "pageNum_Recordset1") == false &&
stristr($param, "totalRows_Recordset1") == false) {
array_push($newParams, $param);
}
}
if (count($newParams) != 0) {
$queryString_Recordset1 = "&" . implode("&", $newParams);
}
}
$queryString_Recordset1 = sprintf("&totalRows_Recordset1=%d%s", $totalRows_Recordset1, $queryString_Recordset1);
?>
<table cellspacing=0 cellpadding=0 width=88%"align="center" border=0 >
<tr>
<?php if ($totalRows_Recordset1 == 0) { // Show if recordset empty ?>
No momento não dispomos de nenhum produto para essa categoria.
<?php } // Show if recordset empty ?>
<?php $i = 0; do { ?>
<?php if ($i == 5)
{
echo "</tr>";
} ?>
<td><div align="center"><img src="<?php echo $row_Recordset1['fot_peq];?>" width='120' height='120' alt="" onMouseOver="aumenta(this)" onMouseOut="diminui(this)"></div>
<FONT FACE="ARIAL" COLOR="BLUE"><font size="2">
<div align="center"><strong><?php echo $row_Recordset1['nome_prod']; ?></strong></div>
<div align=center"><FONT COLOR="#F8F8FF"><?php echo $row_Recordset1['descricao]; ?></div>
</FONT FACE="script mt bold" COLOR="BLUE"></font size="2"></FONT COLOR="#F8F8FF">
<div align="center"><FONT FACE="ARIAL" COLOR="BLUE"><font size="2">Por : R$ <?php echo $row_Recordset1['valor']; ?></div>
<center><img src="comprar.JPG" alt="" title="" /></center></FONT FACE="ARIAL" COLOR="BLUE"><font size="2">
<p> Registros <?php echo ($startRow_Recordset1 + 1) ?> a <?php echo min($startRow_Recordset1 + $maxRows_Recordset1, $totalRows_Recordset1) ?> de <?php echo $totalRows_Recordset1 ?>
<td>
<br>
<?php } while ($row_Recordset1 = mysql_fetch_assoc($Recordset1));
mysql_free_result($Recordset1);
?>
<table border="0" width="50%" align="center">
<tr>
<td width="23%" align="center"> <?php if ($pageNum_Recordset1 > 0) { // Show if not first page ?>
<a href="<?php printf("%s?pageNum_Recordset1=%d%s", $currentPage, 0, $queryString_Recordset1); ?>"><FONT FACE="script mt bold" COLOR="BLUE"><font size="3">Primeiro</a>
<?php } // Show if not first page ?> </td>
<td width="31%" align="center"> <?php if ($pageNum_Recordset1 > 0) { // Show if not first page ?>
<a href="<?php printf("%s?pageNum_Recordset1=%d%s", $currentPage, max(0, $pageNum_Recordset1 - 1), $queryString_Recordset1); ?>"><FONT FACE="script mt bold" COLOR="BLUE"><font size="3">Retornar</a>
<?php } // Show if not first page ?> </td>
<td width="23%" align="center"> <?php if ($pageNum_Recordset1 < $totalPages_Recordset1) { // Show if not last page ?>
<a href="<?php printf("%s?pageNum_Recordset1=%d%s", $currentPage, min($totalPages_Recordset1, $pageNum_Recordset1 + 1), $queryString_Recordset1); ?>"><FONT FACE="script mt bold" COLOR="BLUE"><font size="3">Avançar</a>
<?php } // Show if not last page ?> </td>
<td width="23%" align="center"> <?php if ($pageNum_Recordset1 < $totalPages_Recordset1) { // Show if not last page ?>
<a href="<?php printf("%s?pageNum_Recordset1=%d%s", $currentPage, $totalPages_Recordset1, $queryString_Recordset1); ?>"><FONT FACE="script mt bold" COLOR="BLUE"><font size="3">Último</a>
<?php } // Show if not last page ?> </td>
</tr>
</table></p>
</div>
Edited by XIMLink to comment
Share on other sites
5 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.