//-------------------------------------------------------------------------------
//ÇÁ·Î±×·¥¸í : RoomSolution ½ºÄð·ë free Ãʵî
//¹èÆ÷¹öÁ¯ : 2.0 free Ãʵî
//ÇÁ·Î±×·¥µî·Ï : 2002-01-26-2944 ELS K-TooL
//ƯÇãÃâ¿ø : 2002-0076246
//°³¹ß»ç : (ÁÖ)ÀÌ¿¤¿¡½º - ELS CO.,Ltd.
//Homepage : http://free.rsolution.com
//µ¥¸ð ¹× ¼ºñ½º : school.rsolution.com
//* º» ¼Ò½ºÄÚµå´Â ¼ÒÇÁÆ®¿þ¾î, ƯÇã, ÀúÀÛ±Ç µîÀÇ ¹ý·ü¿¡ ÀÇÇØ º¸È£¹Þ°í ÀÖ½À´Ï´Ù.
//-------------------------------------------------------------------------------
?>
include "../top.html";?>
include "../cdbcon.inc";
if($sel != "" )
{
switch($sel)
{
case "1" :
$where = "where (title like '%$keywords%' or content like '%$keywords%' )";
break;
case "2" :
$where = "where title like '%$keywords%' ";
break;
case "4" :
$where = "where content like '%$keywords%' ";
break;
}
}
if (!$page) { $page=1;}
$pagesize=15;
$listsize=10; //ÇÏ´Ü ¸®½ºÆ® °¹¼ö
$query=mysql_query("select count(*) from $tname $where");
$ro=mysql_fetch_array($query);
$total=$ro[0];
$lownumber=(($page-1)*$pagesize);
$totalpage = ceil($total/$pagesize); //ÃÑÆäÀÌÁö¼ö
$totalblock = ceil($totalpage/$listsize); //ÃÑºí·°¼ö
$block=ceil($page/$listsize); //ÇöÀç ºí·°
$first_page=($block-1)*$listsize; //ÇöÀçºí·°¿¡¼ Ãâ·ÂµÉ ù¹øÂ° ÆäÀÌÁö
$last_page=$block*$listsize; //ÇöÀçºí·°¿¡¼ Ãâ·ÂµÉ ¸¶Áö¸· ÆäÀÌÁö
if($block>=$totalblock){
$last_page=$totalpage;
}
$query1=mysql_query("select * from $tname $where order By num desc limit $lownumber,$pagesize");
?>
include "../left.html";?>
|
 |
 |
|
 |
 |
Total: =$total?>
|
|
if($total==0){
?>
µ¥ÀÌŸ°¡ Á¸ÀçÇÏÁö ¾Ê½À´Ï´Ù. |
}else{?>
if ($page>=2){
$cha=$pagesize*($page-1);
$total=$total-$cha;
}
while($row=mysql_fetch_array($query1))
{
$title=stripslashes($row[title]);
$ttitle1=$title;
$ttitle1=ereg_replace("\"","'",$ttitle1);
$titleLen=38;
if (strLen($title) >= $titleLen){
$title=substr($title,0,$titleLen-3)."...";
}
$writeday=substr($row[writeday],0,10);
?>
=$total?> |
print("$title"); //±ÛÁ¦¸ñ
if ($writeday==date('Y-m-d')){
print(" "); //NEW Ç¥½Ã
}
?>
|
°ü¸®ÀÚ |
=$writeday?>
|
=$row[readnum]?>
|
|
$total--;
}
?>
}?>
 |
}else{?>
}?>
|
if($block>1){
$mypage=$first_page;
echo(" ");
}?>
for($i=$first_page+1;$i<=$last_page;$i++){
if($page==$i){
echo("$i ");
}else{
echo("$i ");
}
}
?>
if($block<$totalblock){
$mypage=$last_page+1;
echo(" ");
}
?>
|
|
|
 |
|
|
include "../bottom.html";?>