By: Skrol29
Date: 2004-12-15
Time: 19:19
|
Re: navdel
Hello,
Here is an example.
HTML:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>TEST</title>
</head>
<body>
<p><strong>Test parameter 'navdel'</strong></p>
<br>
<a href="[var..script_name]?page_tot=10">Test with Number of Page = 10</a><br>
<a href="[var..script_name]?page_tot=3">Test with Number of Page = 3</a> <br>
<a href="[var..script_name]?page_tot=2">Test with Number of Page = 2</a> <br>
<a href="[var..script_name]?page_tot=1">Test with Number of Page = 1</a><br>
<br>
******
<br>
<table width="100" border="1" cellpadding="4" cellspacing="0" bordercolor="#0000FF">
<tr>
<td>first</td>
<td>prev</td>
<td bgcolor="#FFFF99">[nv.page;block=td;navdel=nv0]</td>
<td bgcolor="#FFCC99">[nv.page;block=td;currpage]</td>
<td>next</td>
<td>last [nv0;block=table] </td>
</tr>
</table>
******
<p>Note: if it is defined in the template, parameter 'navdel' must be in the
fist section of the block.</p>
</body>
</html>
|
PHP:
<?php
include_once('tbs_class.php');
$page_num = (isset($_GET['page_num'])) ? $_GET['page_num'] : 3;
$page_tot = (isset($_GET['page_tot'])) ? $_GET['page_tot'] : 10;
if ($page_num>$page_tot) $page_num = $page_tot;
$TBS = new clsTinyButStrong;
$TBS->LoadTemplate('test.htm');
$TBS->MergeNavigationBar('nv',$page_tot,$page_num);
$TBS->Show();
?>
|
|