 |
|
|  |
ÆäÀÌ¡ ³×À̹ö ½ºÅ¸ÀÏ µû¶óÇϱâ |
|
|
 |
13³â Àü |
 ±×´©º¸µå ±âÁØ
1. ¼Ò½ºÃß°¡
../lib/common.lib.php ¿¡ ¾Æ·¡ ÇÔ¼ö Ãß°¡
// ÇöÀçÆäÀÌÁö, ÃÑÆäÀÌÁö¼ö, ÇÑÆäÀÌÁö¿¡ º¸¿©ÁÙ Çà, URL
function get_jy_paginate($write_pages, $cur_page, $total_page, $url, $add="") {
$str = "";
if ($cur_page < 2) $str .= "<div class=\"jy_paginate center\"><span class=\"pre\">¸Ç¾Õ</span>";
else if ($cur_page > 1) $str .= "<div class=\"jy_paginate center\"><a href='".$url.($start_page)."' class=\"pre\">¸Ç¾Õ</a>";
$start_page = ( ( (int)( ($cur_page - 1 ) / $write_pages ) ) * $write_pages ) + 1;
$end_page = $start_page + $write_pages - 1;
if ($end_page >= $total_page) $end_page = $total_page;
if ($start_page > 1) $str .= "<a href='".$url.($start_page-1)."{$add}' class=\"pre\">ÀÌÀü</a>";
else if ($start_page = 1) $str .= "<span class=\"pre\">ÀÌÀü</span>";
if ($total_page > 1)
{
for ($k=$start_page;$k<=$end_page;$k++)
{
if ($cur_page != $k)
$str .= "<a href='$url$k{$add}'><span>$k</span></a>";
else
$str .= "<strong>$k</strong> ";
}
}
if ($total_page > $end_page) $str .= "<a href='".$url.($end_page+1)."{$add}' class=\"next\">´ÙÀ½</a>";
else $str .= "<span class=\"next\">´ÙÀ½</span>";
if ($cur_page < $total_page) $str .= "<a href='$url".($total_page)."' class=\"next\">¸ÇµÚ</a></div>";
else $str .= "<span class=\"next\">¸ÇµÚ</span></div>";
$str .= "";
return $str;
}
2. css Ãß°¡
../style.css ¿¡ ¾Æ·¡ ÇÔ¼ö Ãß°¡
.jy_paginate { padding:10px 0; }
.jy_paginate a,
.jy_paginate strong { position:relative; display:inline-block; margin-right:1px; padding:2px 4px 3px 4px; color:#000; text-decoration:none; border:1px solid #ffffff; font:bold 11px/normal Verdana; _width :17px; }
.jy_paginate strong { color:#f23219 !important; border:1px solid #e9e9e9; }
.jy_paginate .pre { margin-right:6px; padding:4px 6px 2px 14px; _padding-bottom:1px; background:url(http://µµ¸ÞÀÎ/img/bg_page_left_off.gif) no-repeat 6px 6px !important; letter-spacing:-1px; }
.jy_paginate .next { margin-left:4px; padding:4px 14px 2px 6px; _padding-bottom:1px; background:url(http://µµ¸ÞÀÎ/img/bg_page_right_off.gif) no-repeat 38px 6px !important; letter-spacing:-1px; }
.jy_paginate a.pre { background:url(http://µµ¸ÞÀÎ/img/bg_page_left_on.gif) no-repeat 6px 6px !important; }
.jy_paginate a.next { background:url(http://µµ¸ÞÀÎ/img/bg_page_right_on.gif) no-repeat 38px 6px !important; }
.jy_paginate .pre,
.jy_paginate .next { display:inline-block; color:#ccc; border:1px solid #e9e9e9; position:relative; top:0; _top:-2px; font:11px/normal µ¸¿ò, Dotum; width:30px; _width :50px; }
.jy_paginate a.pre,
.jy_paginate a.next { color:#565656; }
.jy_paginate a:hover { background-color:#f7f7f7 !important; border:1px solid #e9e9e9; }
3. À̹ÌÁö(÷ºÎ) ¾÷·Îµå
../img Æú´õ¿¡ ¾÷·Îµå |
|
̵̧ : 637 |
̵̧
¸ñ·Ï
|
|
|  |
|