$start = ($_GET['start']=='') ? 0 : $_GET['start'];
$scale = ($_GET['limitCnt']) ? $_GET['limitCnt'] : 20;
$page_scale = 20;
$page = floor($start / ($scale * $page_scale));
$tmp = mysql_fetch_row(mysql_query("SELECT COUNT(*) FROM member A , ".$zTb['mem']." B ".$opt, $connect));
$total = $tmp[0];
$sql = "SELECT * FROM member limit ".$start.",".$scale;
$rs = mysql_query($sql, $connect);
while($row = mysql_fetch_assoc($rs))
{
}
if($total > $scale){ // 검색 결과가 페이지당 출력수 보다 크면
if($start+1 > $scale*$page_scale){
$pre_start = $page * $page_scale * $scale - $scale;
echo "<td><a href='".$_SERVER['PHP_SELF']."?p=".$_GET['p']."&start=".$pre_start.$optStr."' onfocus=this.blur() class=xyz><img src=ListSrc/005.gif width=14 height=11></a></td>";
}
echo "<td style='padding:3px 4px 0 4px;'>";
for($vj=0; $vj < $page_scale ; $vj++){
$ln = ($page * $page_scale + $vj)*$scale;
$vk = $page * $page_scale + $vj + 1;
if($ln<$total) {
if($ln!=$start) {
echo " <a href='".$_SERVER['PHP_SELF']."?p=".$_GET['p']."&start=".$ln.$optStr."' onfocus=this.blur() class=xyz> ".$vk." </a>";
} else {
echo " <span style='color:#990000;font-weight:bold;'> ".$vk." </span>";
}
}
}
echo "</td>";
if($total > (($page+1)*$scale*$page_scale) ) {
$n_start=($page+1)*$scale*$page_scale;
echo "<td><a href='".$_SERVER['PHP_SELF']."?p=".$_GET['p']."&start=".$n_start.$optStr."' onfocus=this.blur() class=xyZ><img src=ListSrc/006.gif width=14 height=11></a></td>";
}
}