PHP - ¿­ÀÏ°ö°³¯ (1213) °Ô½ÃÆÇ - °Ë»öÁ¶È¸ list.html - Ãß°¡¼Ò½º ±Û¾²±â

***ÆÄÀϸí: search.html
"; echo "search --- $search
"; $query="select * from board1 ";//°ø¹é " $endquery=" order by num desc";//" °ø¹é if($choice == "name"){ $fullquery=$query . "where name='$search'" . $endquery; }else if($choice == "subject") { $fullquery=$query . "where subject like '%$search%'" . $endquery; }else if($choice == "content") { $fullquery=$query . "where content like '%$search%'" . $endquery; } include "connect.php"; $result=mysql_query($fullquery); ?> °Ë»öµÈ °Ô½Ã¹° "; } ?>
¹øÈ£ À̸§ Á¦¸ñ µî·Ï³¯Â¥ Á¶È¸¼ö
$row[num] $row[name] $row[subject] $row[reg_date] $row[cnt]
::::::::::::::::::::::::::::::::::::: New Document
MyBoard ver 1.0
"; $article_number--;// $atricle_number=$article_number-1; } ?>
¹ø È£ Á¦ ¸ñ ÀÌ ¸§ µî·Ï³¯Â¥ Á¶È¸¼ö
$article_number $subject $row[name] $row[reg_date] $row[cnt]

$i]"; } */ ?> // $num_per_block=5; //ºí·°³ª´©±â*** $total_block=ceil($total_page/$num_per_block); //ÅäÅ»ÆäÀÌÁö $block=ceil($page/$num_per_block); //ÇöÀçºí·° // 23/10=2.3 ->3 $first_page=$num_per_block *($block-1);//ù ³¡ÆäÀÌÁö°ª±¸ÇÔ $last_page=$num_per_block * $block; //¸¶Áö¸·ÆäÀÌÁö if($block>=$total_block){ $last_page=$total_page; } //echo "block --- $block
"; //echo "total_block --- $total_block
"; //echo "total_page --- $total_page
"; if($block>=$total_block){ $prev=$first_page; echo "[óÀ½]"; echo "[ÀÌÀü]"; } for($go_page=$first_page+1;$go_page<=$last_page;$go_page++){ echo "[$go_page]"; } if($block<$total_block){ $next=$last_page+1; echo "[´ÙÀ½]"; echo "[¸¶Áö¸·]"; } ?> ±Û¾²±â

::::::::::::::::::::::::::::::::::::::::::::::::: list.html---------------------------- New Document
MyBoard ver 1.0
"; $article_number--;// $atricle_number=$article_number-1; } ?>
¹ø È£ Á¦ ¸ñ ÀÌ ¸§ µî·Ï³¯Â¥ Á¶È¸¼ö
$article_number $subject $row[name] $row[reg_date] $row[cnt]

$i]"; } */ ?> // $num_per_block=5; //ºí·°³ª´©±â*** $total_block=ceil($total_page/$num_per_block); //ÅäÅ»ÆäÀÌÁö $block=ceil($page/$num_per_block); //ÇöÀçºí·° // 23/10=2.3 ->3 $first_page=$num_per_block *($block-1);//ù ³¡ÆäÀÌÁö°ª±¸ÇÔ $last_page=$num_per_block * $block; //¸¶Áö¸·ÆäÀÌÁö if($block>=$total_block){ $last_page=$total_page; } //echo "block --- $block
"; //echo "total_block --- $total_block
"; //echo "total_page --- $total_page
"; if($block>=$total_block){ $prev=$first_page; echo "[óÀ½]"; echo "[ÀÌÀü]"; } for($go_page=$first_page+1;$go_page<=$last_page;$go_page++){ echo "[$go_page]"; } if($block<$total_block){ $next=$last_page+1; echo "[´ÙÀ½]"; echo "[¸¶Áö¸·]"; } ?> ±Û¾²±â

::::::::::::::::::::::::::::::::::::::::::::::::: ***search.html---------------------------- New Document
"; echo "search --- $search
"; $query="select * from board1 ";//°ø¹é " $endquery=" order by num desc";//" °ø¹é if($choice == "name"){ $fullquery=$query . "where name='$search'" . $endquery; }else if($choice == "subject") { $fullquery=$query . "where subject like '%$search%'" . $endquery; }else if($choice == "content") { $fullquery=$query . "where content like '%$search%'" . $endquery; } include "connect.php"; $result=mysql_query($fullquery); $article_num=mysql_num_rows($result);//°Ë»ö½Ã ¼ø¼­¸¦ 1¹øºÎÅÍ Ãâ·Â echo "°Ë»öµÈ °Ô½Ã¹° °¹¼ö --- $article_num
";//°Ë»ö½Ã Ãâ·ÂµÈ°¹¼öÆÄ¾Ç ?> °Ë»öµÈ °Ô½Ã¹° "; $article_num--; } ?>
°¹¼ö ¹øÈ£ À̸§ Á¦¸ñ µî·Ï³¯Â¥ Á¶È¸¼ö
$article_num $row[num] $row[name] $row[subject] $row[reg_date] $row[cnt]