MINI SHELL

Server : Apache/2.2.2 (Fedora)
System : Linux App1.pathumtani.go.th 2.6.20-1.2320.fc5smp #1 SMP Tue Jun 12 19:40:16 EDT 2007 i686
User : apache ( 48)
PHP Version : 5.2.9
Disable Function : NONE
Directory :  /var/www/html/pathumthani_eoffice/libary/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /var/www/html/pathumthani_eoffice/libary/devide_page.php
<? if($all >= 1) { ?>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr valign="top" class="normal" align="right">
	<td width="46%" align="left">&nbsp;
<?
$page_all = $all / 11 ;
$page_all = ceil($page_all);
//first Eleven Page
if($page <= 11){

	$max = $page;
	if($page <= 11 ){ 	
		if($all <= 11){ $max = $all ; }else{ $max = 11 ; }
		for($i=1;$i<=$max;$i++) 
		{
			if($i != $page){ echo "<a href=\"?page=$i$kwd\" style=\"text-decoration:none;\"><font class=\"normal\">$i</font></a>&nbsp;";  } else { echo "<font class=\"blue\">$i</font>&nbsp;";  }
		}
		if($all > 11){ 	echo "<a href=\"?page=12$kwd\" style=\"text-decoration:none;\"><font class=\"blue\">Next ></font></a>&nbsp;"; }
	}
	
} elseif($page >= 12) {

	$min = $page - 5;		
	$max = $page + 5;
	if($max >= $all){ $max = $all; $last_page = "y";} 
	$next = $max + 1; 
	$prev = $min - 1;	

	echo "<a href=\"?page=$prev$kwd\" style=\"text-decoration:none;\"><font class=\"blue\">< Prev</font></a>&nbsp;";
	for($i=$min;$i<=$max;$i++) 
	{
		if($i != $page){ echo "<a href=\"?page=$i$kwd\" style=\"text-decoration:none;\"><font class=\"normal\">$i</font></a>&nbsp;";  }
		else { echo "<font class=\"blue\">$i</font>&nbsp;";  }
	}
	if($last_page != "y"){
	echo "&nbsp;<a href=\"?page=$next$kwd\" style=\"text-decoration:none;\"><font class=\"blue\">Next ></font></a>";
	}
}

?>                  
	
	</td>
	<td width="24%">Record found : <font class="blue"><?=$totalpage?></font> Records</td>
	<td width="30%">Number of all page is :&nbsp;<font class="blue"><?=$all?></font>&nbsp;Pages&nbsp;</td>
</tr>
</table>
<? } ?>

Anon7 - 2021