View file template/func/mess_str.php

File size: 350B
<?
function mess_str($pref,$max_mess_str,$page)
{
	
	$mess = mysql_query("select * from `".$pref."`");
	$mess_col=mysql_num_rows($mess);
	$str_col=ceil($mess_col/$max_mess_str);
	for($i=1; $i<$str_col+1; $i++)
	{
		if(($page/$max_mess_str+1)==$i){echo $i;}else{echo'<a href="?page_'.$pref.'='.($i-1)*$max_mess_str.'">'.$i.'</a>';}
	}
}
?>