1 ) { $tpage = $num_per_page*( $page - 1 ); } else { $tpage = $page - 1 ; } if(!eregi("[^[:space:]]+",$key)) { $query = "select count(*) from board_faq"; } else { $enc_key = urlencode($key); $query = "select count(*) from board_faq where $keyfield like '%$key%'"; } $result = mysql_query($query); $total_count = mysql_result($result,0,0); mysql_free_result($result); $total_page = ceil($total_count/$num_per_page); if($total_count == 0) { $first = 1; $last = 0; } else { $first = $num_per_page*($page-1); $last = $num_per_page*$page; } ?>

No | Subject | Name | Date | Hit
45) { $dot = "....."; } else { $dot = ""; } $subject = stripslashes($row[subject]); $uid = $row[uid]; $fid = $row[fid]; $title = substr($subject,0,45) . $dot; $today = time(); $regdate = $row[reg_date]; $reg_date = date("y-m-d",$regdate); $ref = $row[ref]; $thread = $row[thread]; ?>
| "; } else if (strlen($thread) == 3) { echo " "; } else if (strlen($thread) == 4) { echo " "; } else if (strlen($thread) == 5) { echo " "; } else if (strlen($thread) == 6) { echo " "; } else { echo ""; } ?> |  |  |

1) { $my_page = $first_page; echo(""); } else { echo ""; } echo " "; for($direct_page = $first_page+1; $direct_page <= $last_page; $direct_page++) { if($page == $direct_page) { echo(" $direct_page /"); } else { echo(" $direct_page /"); } } echo " "; if($block < $total_block) { $my_page = $last_page+1; echo(""); } else { echo ""; } ?>