//-------------------------------------------------------------------------------
//ÇÁ·Î±×·¥¸í : RoomSolution ½ºÄð·ë free
//¹èÆ÷¹öÁ¯ : 2.0 free
//ÇÁ·Î±×·¥µî·Ï : 2002-01-26-2944 ELS K-TooL
//ƯÇãÃâ¿ø : 2002-0076246
//°³¹ß»ç : (ÁÖ)ÀÌ¿¤¿¡½º - ELS CO.,Ltd.
//Homepage : http://www.els.co.kr
//µ¥¸ð ¹× ¼ºñ½º : www.rsolution.com
//* º» ¼Ò½ºÄÚµå´Â ¼ÒÇÁÆ®¿þ¾î, ƯÇã, ÀúÀÛ±Ç µîÀÇ ¹ý·ü¿¡ ÀÇÇØ º¸È£¹Þ°í ÀÖ½À´Ï´Ù.
//-------------------------------------------------------------------------------
?>
include "../top.html"; ?>
include "../cdbcon.inc";
if (!$page) { $page=1;}
$pagesize=5;
$listsize=10; //ÇÏ´Ü ¸®½ºÆ® °¹¼ö
if ($searchKey!="" && $searchText!=""){
$query=mysql_query("select count(*) from $tname where $searchKey like '%$searchText%'");
}else{
if ($cate==""){
$query=mysql_query("select count(*) from $tname");
}else{
$query=mysql_query("select count(*) from $tname where cate='$cate'");
}
}
$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;
}
if ($searchKey!="" && $searchText!=""){
$query1=mysql_query("select * from $tname where $searchKey like '%$searchText%' order By num desc limit $lownumber,$pagesize");
}else{
if ($cate==""){
$query1=mysql_query("select * from $tname order By num desc limit $lownumber,$pagesize");
}else{
$query1=mysql_query("select * from $tname where cate='$cate' order By num desc limit $lownumber,$pagesize");
}
}
$query=mysql_query("select count(*) from $tname where cate='E'");
$row1=mysql_fetch_array($query);
$cate1=$row1[0];
$query=mysql_query("select count(*) from $tname where cate='C'");
$row2=mysql_fetch_array($query);
$cate2=$row2[0];
$query=mysql_query("select count(*) from $tname where cate='LE'");
$row3=mysql_fetch_array($query);
$cate3=$row3[0];
$query=mysql_query("select count(*) from $tname where cate='D'");
$row4=mysql_fetch_array($query);
$cate4=$row4[0];
$query=mysql_query("select count(*) from $tname where cate='HA'");
$row5=mysql_fetch_array($query);
$cate5=$row5[0];
$query=mysql_query("select count(*) from $tname where cate='M'");
$row6=mysql_fetch_array($query);
$cate6=$row6[0];
$query=mysql_query("select count(*) from $tname where cate='N'");
$row7=mysql_fetch_array($query);
$cate7=$row7[0];
$query=mysql_query("select count(*) from $tname where cate='NS'");
$row8=mysql_fetch_array($query);
$cate8=$row8[0];
$query=mysql_query("select count(*) from $tname where cate='P'");
$row9=mysql_fetch_array($query);
$cate9=$row9[0];
$query=mysql_query("select count(*) from $tname where cate='CH'");
$row10=mysql_fetch_array($query);
$cate10=$row10[0];
$query=mysql_query("select count(*) from $tname where cate='ET'");
$row11=mysql_fetch_array($query);
$cate11=$row11[0];
?>
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]);
$writeday=substr($row[writeday],0,10);
?>
=$total?>
|
if ($writeday==date('Y-m-d')){
print(" "); //NEW Ç¥½Ã
}
print(" $title $row[URL]"); //±ÛÁ¦¸ñ
?>
|
=$row[name]?>
|
=$writeday?>
|
$content=ereg_replace(chr(13)," ",$row[content]);
$content=stripslashes($content);
?>
=$content?>
|
|
 |
|
|
$total--;
}
?>
}?>
 |
}?>
 |
//ÆäÀÌÁö
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"; ?>