if($AD_no==5){
include("../../../conn/conn.php");
include("../../../func/func.php");
?>
");
}
F_Redirect("list.php");
}else{
##########################################
$wichi = "Àü±¹";
$encoded = urlencode($wichi);
$live = urlencode($live);
$blocksize = 10;
$pagesize = 200;
if(!$pageno){
$pageno = 1;
}
if(!$blockpage){
$blockpage = floor(($pageno-1)/$blocksize) * $blocksize +1;
}
if($search=="")
{
############## search °¡¾øÀ¸¸é ½ÇÇà ####################
############## Å×À̺íÀÇ ¸ðµç°ªÀ» °¡Á®¿À±â ################
if($key){
$qry = mysql_query("select count(*) from thanks where B_prc='$key'",$dbconn);
}else{
$qry = mysql_query("select count(*) from thanks",$dbconn);
}
if(!$qry){
error("QUERY_ERROR");
exit;
}
$col = mysql_fetch_row($qry);
################### ÆäÀÌÁö ³ª´©±â #####################
$recordcount = $col[0];
$pagecount = ceil($recordcount/$pagesize);
if($pageno==1){
$nono = 0;
}else{
$nono = $pagesize*$pageno-$pagesize;
}
If($pageno == $pagecount)
{
$pagesize = $recordcount - ( ( $pageno - 1 ) * $pagesize );
}
#################### Å×ÀÌºí¿¡ ÀÖ´Â ÀÚ·á »Ì¾Æ¿À±â ######################
if($key){
$qry1 = mysql_query("select B_no,B_title,B_prc,board from thanks where B_prc='$key' order by B_title asc limit $nono,$pagesize ",$dbconn);
}else{
$qry1 = mysql_query("select B_no,B_title,B_prc,board from thanks order by B_title asc limit $nono,$pagesize ",$dbconn);
}
###################################################################
}else{
####################### search °ªÀÌ ÀÖÀ¸¸é ½ÇÇà ######################
if($key){
$qry = mysql_query("select count(*) from thanks where B_prc='$key' and $search like '%$keyword%'",$dbconn);
}else{
$qry = mysql_query("select count(*) from thanks where $search like '%$keyword%'",$dbconn);
}
if(!$qry){
error("QUERY_ERROR");
exit;
}
$col = mysql_fetch_row($qry);
###################### ÆäÀÌÁö ó¸® ############################
$recordcount = $col[0];
$pagecount = ceil($recordcount/$pagesize);
if($pageno==1){
$nono = 0;
}else{
$nono = $pagesize*$pageno-$pagesize;
}
If($pageno == $pagecount)
{
$pagesize = $recordcount - ( ( $pageno - 1 ) * $pagesize );
}
#################### Å×ÀÌºí¿¡ ÀÕ´Â ÀÚ·á »Ì¾Æ¿À±â ######################
####################### ÀÚ·á »Ì¾Æ¿À±â #######################
if($key){
$qry1 = mysql_query("select B_no,B_title,B_prc,board from thanks where key='$B_prc' and $search like '%$keyword%' order by B_no desc limit $nono,$pagesize",$dbconn);
}else{
$qry1 = mysql_query("select B_no,B_title,B_prc,board from thanks where $search like '%$keyword%' order by B_no desc limit $nono,$pagesize",$dbconn);
}
}
if(!$qry1){
echo("µ¥ÀÌÅͺ£À̽º ¿¬°á¿¡ ½ÇÆÐÇß½À´Ï´Ù.
");
}
##################### ÀÎÄÚµùÇϱâ ############################
?>
if($recordcount==0 and $search!=""){
echo "";
}elseif($recordcount==0 and $search==""){
echo " µî·ÏµÈ »çÀºÇ°ÀÌ ¾ø½À´Ï´Ù"; echo " »çÀºÇ°µî·ÏÇϱâ"; echo " |