|
See++
Niyam's ground-breaking section on digital imagery and design.
More See++ Articles:
readfile("../links_articles.html"); ?>
For other columns in PCWorld, click here.
|
|
|
|
|
|
Chameleon Karma:
//going backwards
$last_page = $HTTP_SERVER_VARS['QUERY_STRING'];
if (is_numeric($last_page))
{
if($last_page > 1)
{
$last_page--;
echo "<< Back ";
}
elseif($last_page == 1)
echo "<< Back ";
}
// going forward
$next_page = $HTTP_SERVER_VARS['QUERY_STRING'];
if (is_numeric($next_page))
{
if($next_page < 10)
{
$next_page++;
echo " Next >>";
}
elseif($next_page == 10)
echo " Next >>";
}
?>
if(!$HTTP_SERVER_VARS['QUERY_STRING'])
{ readfile("1.html"); }
elseif ($HTTP_SERVER_VARS['QUERY_STRING'] == "1")
{ readfile ("1.html"); }
elseif ($HTTP_SERVER_VARS['QUERY_STRING'] == "2")
{ readfile ("2.html"); }
elseif ($HTTP_SERVER_VARS['QUERY_STRING'] == "3")
{ readfile ("3.html"); }
elseif ($HTTP_SERVER_VARS['QUERY_STRING'] == "4")
{ readfile ("4.html"); }
elseif ($HTTP_SERVER_VARS['QUERY_STRING'] == "5")
{ readfile ("5.html"); }
elseif ($HTTP_SERVER_VARS['QUERY_STRING'] == "6")
{ readfile ("6.html"); }
elseif ($HTTP_SERVER_VARS['QUERY_STRING'] == "7")
{ readfile ("7.html"); }
elseif ($HTTP_SERVER_VARS['QUERY_STRING'] == "8")
{ readfile ("8.html"); }
elseif ($HTTP_SERVER_VARS['QUERY_STRING'] == "9")
{ readfile ("9.html"); }
elseif ($HTTP_SERVER_VARS['QUERY_STRING'] == "10")
{ readfile ("10.html"); }
?>
$total_pages=10;
$page_count=1;
echo "\n[ ";
for($page_count==1;$page_count<=$total_pages;$page_count++)
{
if ($page_count==11)
echo "\n ]
[ ";
if ($page_count == $HTTP_SERVER_VARS['QUERY_STRING'])
echo("\n$page_count ");
else
echo("\n$page_count ");
}
echo "\n ]";
?>
//going backwards
$last_page = $HTTP_SERVER_VARS['QUERY_STRING'];
if (is_numeric($last_page))
{
if($last_page > 1)
{
$last_page--;
echo "<< Back ";
}
elseif($last_page == 1)
echo "<< Back ";
}
// going forward
$next_page = $HTTP_SERVER_VARS['QUERY_STRING'];
if (is_numeric($next_page))
{
if($next_page < 10)
{
$next_page++;
echo " Next >>";
}
elseif($next_page == 10)
echo " Next >>";
}
?>
|
|
|