}
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 ass where c_title like '%$search%' order by c_idx DESC");
//}
//}
else
$db->query("select * from ass order by c_idx 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 ass where c_title like '%$search%' order by c_idx DESC limit $startP, $endP ");
//}
//}
else
$db->query("select * from ass order by c_idx DESC limit $startP, $endP");
$a=$total;
?>
$b=1;
while($row = $db->row()) {
for($d=2;$d<=$b;$d++){
if($b == $d){
$color="#f7f7f7";
}
else{
$color="#ffffff";
}
$d++;
}
?>
| =$a?> |
=$db_title=substring($row->c_title,0,30)."..";?>
$today=date('Y-m-d');
if( $today == $row->c_date){
?>
}
?>
|
°ü¸®ÀÚ |
=$row->c_hit?> |
=$row->c_date?> |
|
$b++;
$a--;
}
?>
|
| [ =$pageSkip->printPage($nPage);?>]
|
|
|
|
|
}else{
?>
}?>
|
|
include '../ass_tail.htm'?>