관리자: 페이징 기본 스타일 지정

This commit is contained in:
whitedot
2012-12-11 16:48:56 +09:00
parent 68c5e9130b
commit 2b0a48cce6
12 changed files with 23 additions and 17 deletions

View File

@ -137,7 +137,7 @@ $pagelist = get_paging($config[cf_write_pages], $page, $total_page, $_SERVER['PH
<div class="btn_list"><input type="button" value="선택삭제" onclick="btn_check(this.form, 'delete')"></div>
<div class="paginate">
<div class="pg">
<?=$pagelist?>
</div>

View File

@ -206,7 +206,7 @@ if ($i == 0)
<?
$pagelist = get_paging($config[cf_write_pages], $page, $total_page, $_SERVER['PHP_SELF'].'?'.$qstr.'&amp;page=');
?>
<div class="paginate">
<div class="pg">
<?=$pagelist?>
</div>

View File

@ -169,7 +169,7 @@ if ($i == 0)
<?
$pagelist = get_paging($config[cf_write_pages], $page, $total_page, $_SERVER['PHP_SELF'].'?'.$qstr.'&amp;page=');
?>
<div class="paginate">
<div class="pg">
<?=$pagelist?>
</div>

View File

@ -122,7 +122,7 @@ if ($i == 0)
<?
$pagelist = get_paging($config[cf_write_pages], $page, $total_page, "{$_SERVER['PHP_SELF']}?$qstr&amp;gr_id=$gr_id&page=");
if ($pagelist) {?>
<div class="paginate">
<div class="pg">
<?=$pagelist?>
</div>
<?}?>

View File

@ -241,7 +241,7 @@ if ($i == 0)
<?
$pagelist = get_paging($config[cf_write_pages], $page, $total_page, '?'.$qstr.'&amp;page=');
?>
<div class="paginate">
<div class="pg">
<?=$pagelist?>
</div>

View File

@ -177,7 +177,7 @@ if ($i == 0)
<?
$pagelist = get_paging($config[cf_write_pages], $page, $total_page, "$_SERVER[PHP_SELF]?$qstr&amp;page=");
?>
<div class="paginate">
<div class="pg">
<?=$pagelist?>
</div>

View File

@ -116,7 +116,7 @@ if ($i==0)
<?
$pagelist = get_paging($config[cf_write_pages], $page, $total_page, "$_SERVER[PHP_SELF]?$qstr&page=");
if ($pagelist) {?>
<div class="paginate">
<div class="pg">
<?=$pagelist?>
</div>
<?}?>

View File

@ -140,7 +140,7 @@ if ($i == 0)
<?
$pagelist = get_paging($config[cf_write_pages], $page, $total_page, "$_SERVER[PHP_SELF]?$qstr&amp;page=");
?>
<div class="paginate">
<div class="pg">
<?=$pagelist?>
</div>
</form>

View File

@ -97,7 +97,7 @@ if ($i == 0)
<?
$pagelist = get_paging($config[cf_write_pages], $page, $total_page, "$_SERVER[PHP_SELF]?$qstr&amp;page=");
?>
<div class="paginate">
<div class="pg">
<?=$pagelist?>
</div>

View File

@ -109,7 +109,7 @@ if ($i == 0)
$page = get_paging($config[cf_write_pages], $page, $total_page, "$_SERVER[PHP_SELF]?$qstr&amp;domain=$domain&amp;page=");
if ($page) {
?>
<div class="paginate">
<div class="pg">
<?=$page?>
</div>
<?

View File

@ -64,7 +64,7 @@ button {padding:3px;border:1px solid #ced9de;background:#f6f9fa;cursor:pointer}
.adm_field_explain {display:block;padding:0 0 5px;color:#768f99}
/* 테이블 */
table {margin-bottom:30px;width:100%;border:1px solid #d5dcdf;background:#fff}
table {margin-bottom:10px;width:100%;border:1px solid #d5dcdf;background:#fff}
caption {padding-bottom:15px;text-align:left;font-size:1em;font-weight:bold}
caption p {padding:0 0 5px;color:#6b8088;font:0.75em normal}
th, td {border-bottom:1px solid #e9ecee;font-size:0.75em}
@ -73,3 +73,9 @@ th a {color:#000}
th {padding:10px;background:#f1f6f7}
td {padding:10px}
.frm_tbl th {width:130px;text-align:left;font-weight:normal}
/* pagination */
.pg {margin-bottom:30px;font-size:0.875em;text-align:center}
.pg_page, .pg_current {display:inline-block;position:relative;margin-left:-6px;padding:0 10px;height:25px;border:1px solid #ddd;background:#fff;line-height:1.9em;vertical-align:middle}
.pg_page {text-decoration:none}
.pg_current {font-weight:normal}

View File

@ -20,7 +20,7 @@ function get_paging($write_pages, $cur_page, $total_page, $url, $add="")
{
$str = '';
if ($cur_page > 1) {
$str .= '<a href="'.$url.'1'.$add.'">처음</a>'.PHP_EOL;
$str .= '<a href="'.$url.'1'.$add.'" class="pg_page">처음</a>'.PHP_EOL;
}
$start_page = ( ( (int)( ($cur_page - 1 ) / $write_pages ) ) * $write_pages ) + 1;
@ -28,21 +28,21 @@ function get_paging($write_pages, $cur_page, $total_page, $url, $add="")
if ($end_page >= $total_page) $end_page = $total_page;
if ($start_page > 1) $str .= '<a href="'.$url.($start_page-1).'" '.$add.'>이전</a>'.PHP_EOL;
if ($start_page > 1) $str .= '<a href="'.$url.($start_page-1).$add.'" class="pg_page">이전</a>'.PHP_EOL;
if ($total_page > 1) {
for ($k=$start_page;$k<=$end_page;$k++) {
if ($cur_page != $k)
$str .= '<a href="'.$url.$k.$add.'">'.$k.'</a>'.PHP_EOL;
$str .= '<a href="'.$url.$k.$add.'" class="pg_page">'.$k.'</a>'.PHP_EOL;
else
$str .= '<strong>'.$k.'</strong>'.PHP_EOL;
$str .= '<strong class="pg_current">'.$k.'</strong>'.PHP_EOL;
}
}
if ($total_page > $end_page) $str .= '<a href="'.$url.($end_page+1).'" '.$add.'>다음</a>'.PHP_EOL;
if ($total_page > $end_page) $str .= '<a href="'.$url.($end_page+1).$add.'" class="pg_page">다음</a>'.PHP_EOL;
if ($cur_page < $total_page) {
$str .= '<a href="'.$url.$total_page.$add.'">맨끝</a>'.PHP_EOL;
$str .= '<a href="'.$url.$total_page.$add.'" class="pg_page">맨끝</a>'.PHP_EOL;
}
$str .= "";