0) : $p_st = 0; $show_result .= ''; else : $show_result .= ''; endif; */ if( $st+1 > $sc*$pg_sc) : $pre_st = $st - $sc*$pg_sc ; $show_result .= ' '; else : // $show_result .= ' '; // $show_result .= ' 이전'; $show_result .= ' '; endif; $i=1; for($vj=0; $vj < $pg_sc ; $vj++) : $ln = ($pg * $pg_sc + $vj)*$sc ; $vk = $pg * $pg_sc + $vj+1 ; if($ln<$total) : if($ln!=$st) : $show_result .= ' '.$vk.' '; else : $show_result .= ' '.$vk.' '; endif; $i++; endif; endfor; if($total > (($pg+1)*$sc*$pg_sc)) : $next_st=($pg+1)*$sc*$pg_sc ; $show_result .= ''; else : // $show_result .= ''; // $show_result .= '다음'; $show_result .= ' '; endif; /* if($total > $st+$sc) : $n_st = $total - ($total%$sc); if($n_st == $total) $n_st -= $sc; $show_result .= ' '; else : $show_result .= ' '; endif; */ return $show_result; } $sc = 5; $pg_sc = 10; if(!$st){ $st = 0; } $pg = floor($st/($sc*$pg_sc)) ; $sh_val = addslashes($sh_val); if($sh_val) : $add_sql = "AND ( rp_title like '%".$sh_val."%' or rp_summary like '%".$sh_val."%' or rp_order like '%".$sh_val."%' or rp_keyword like '%".$sh_val."%' )"; endif; $sql = "SELECT COUNT(rp_id) FROM cms_hope_report WHERE 1 AND state_service = 1 ".$add_sql.""; $qcount = dbResult($sql); $sql = "SELECT * FROM cms_hope_report WHERE 1 AND state_service = 1 ".$add_sql." ORDER BY rp_id DESC LIMIT $st,$sc"; $qry = dbQuery($sql); $url = $PHP_SELF."?"; $url .= "sh_val=".$sh_val; $page_div = page_divide_support($qcount, $st, $sc, $pg, $pg_sc, $url); ?> 희망제작소 - 21세기 대한민국 희망엔진

Hope Report - 희망리포트는 희망제작소가 그동안 펼쳤던 다양한 실험들을 시민 여러분과 공유하기 위한 보고서입니다.(희망리포트는 매월 둘째, 넷째 수요일 발행됩니다.)