include '../board5_head.htm'?>
} else{?>
}?>
} else{?>
}?>
번호
제목
이름
조회수
등록일
//////////////// function substring($string,$position,$length=0) { $a=0;$b=0;$c=0;$startposition=0;$chk=true;$chkposition=false;$length_count=0; $cnt=strlen($string); $i=0; for($i=0;$i<$cnt;$i++) {//0,1 if(!$chkposition) { if(($a+$c)==$position) { if($chk)$startposition=$i; else $startposition=$i-1; $chkposition=true; $a=0;$b=0;$c=0; } } else { if(($a+$c)<$length) $length_count++; else break; } $ascii=ord($string[$i]); if($ascii<=127) $a++;//1, else { $b++;//1, $chk=false; if($b%2==0) { $c++; $chk=true; } } } return substr($string,$startposition,$length_count+1); } $search = ""; $nPage = ""; $period = ""; IF($_POST['search']!=""){$search = $_POST['search'];} ELSE IF($_GET['search']!=""){$search = $_GET['search'];} IF($_GET['nPage']!=""){$nPage = $_GET['nPage'];} IF($_GET['period']!=""){$period = $_GET['period'];} if($search) { if($select == "제목"){ $db->query("select * from board5 where c_title like '%$search%' order by ref DESC,re_step asc,c_date desc"); } } else $db->query("select * from board5 order by ref DESC,re_step asc,c_date desc "); $totalCount = $db->row_count(); $total = $db->row_count(); $recPg = 10; $totalPg = ceil($totalCount/$recPg); if(!$nPage) $nPage=1; $startP = ($nPage-1)*$recPg; $endP = $recPg; $total = $total-(($nPage*$recPg)-$recPg); $a=$total; // page include "../lib/pageskin.php"; //생성자 (URL, 데이터전체갯수, 라인줄수, 하단페이지이동갯수) $pageSkip = new pageSkip($_SERVER['PHP_SELF']."?search=$search&period=$period&nPage=", $totalCount, $recPg, 10); //////////////// if($search) { if($select == "제목"){ $db->query("select * from board5 where c_title like '%$search%' order by ref DESC,re_step asc,c_date desc limit $startP, $endP "); } } else $db->query("select * from board5 order by ref DESC,re_step asc,c_date desc limit $startP, $endP"); $b=1; ?>
while($row = $db->row()) { for($d=2;$d<=$b;$d++){ if($b == $d){ $color="#f7f7f7"; } else{ $color="#ffffff"; } $d++; } ?>
=$a?>
if($row->re_level > 0){ $wid=$row->re_level; for($i=0;$i<=$wid;$i++){ echo " "; } echo "└
c_idx."&t_i=".$i.">".$db_title=substring($row->c_title,0,30)."..
"; } else{ echo "
c_idx."&t_i".$i.">".$db_title=substring($row->c_title,0,30)."..
"; } ?> $today=date('Y-m-d'); if( $today == $row->c_date){ ?>
} ?>
=$row->c_name?>
=$row->c_hit?>
=$row->c_date?>
$b++; $a--; } ?>
[ =$pageSkip->printPage($nPage);?>]
제목
include '../board5_tail.htm'?>