From 39e42fce857260feef65dab71ef18b06c8581321 Mon Sep 17 00:00:00 2001 From: gnuboard Date: Wed, 6 Feb 2013 14:22:38 +0900 Subject: [PATCH 1/3] =?UTF-8?q?=EA=B8=B0=ED=83=80=20=EC=9D=98=EA=B2=AC?= =?UTF-8?q?=EC=9D=98=20=EA=B8=80=EC=93=B4=EC=9D=B4=20=EC=9D=B4=EB=A6=84?= =?UTF-8?q?=EC=97=90=20sideview=20=EB=A1=9C=20=EC=A0=81=EC=9A=A9=EB=90=9C?= =?UTF-8?q?=20name=20=EC=97=90=EC=84=9C=20pc=5Fname=20=EC=9C=BC=EB=A1=9C?= =?UTF-8?q?=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bbs/poll_result.php | 5 +++-- skin/poll/neo/poll_result.skin.php | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/bbs/poll_result.php b/bbs/poll_result.php index 273d1e9f1..d8a9a9525 100644 --- a/bbs/poll_result.php +++ b/bbs/poll_result.php @@ -53,8 +53,9 @@ $sql = " select a.*, b.mb_open where po_id = '{$po_id}' order by pc_id desc "; $result = sql_query($sql); for ($i=0; $row=sql_fetch_array($result); $i++) { - $list2[$i]['name'] = get_sideview($row['mb_id'], cut_str($row['pc_name'],10), '', '', $row['mb_open']); - $list2[$i]['idea'] = get_text(cut_str($row['pc_idea'], 255)); + $list2[$i]['pc_name'] = $row['pc_name']; + $list2[$i]['name'] = get_sideview($row['mb_id'], cut_str($row['pc_name'],10), '', '', $row['mb_open']); + $list2[$i]['idea'] = get_text(cut_str($row['pc_idea'], 255)); $list2[$i]['datetime'] = $row['pc_datetime']; $list2[$i]['del'] = ''; diff --git a/skin/poll/neo/poll_result.skin.php b/skin/poll/neo/poll_result.skin.php index 67c9e8c58..553db271a 100644 --- a/skin/poll/neo/poll_result.skin.php +++ b/skin/poll/neo/poll_result.skin.php @@ -37,7 +37,7 @@ if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가

님의 의견

- +

From e6d32bcaf4e3d1b9b2c95b2fc0889c5ccde7010b Mon Sep 17 00:00:00 2001 From: gnuboard Date: Wed, 6 Feb 2013 17:41:33 +0900 Subject: [PATCH 2/3] =?UTF-8?q?page=3D=20=EB=91=90=EB=B2=88=20=EB=82=98?= =?UTF-8?q?=EC=98=A4=EC=A7=80=20=EC=95=8A=EB=8F=84=EB=A1=9D=20=ED=95=B4?= =?UTF-8?q?=EA=B2=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- adm/admin.lib.php | 14 +++++++------- lib/common.lib.php | 12 ++++++++++-- test.php | 30 +++++++----------------------- 3 files changed, 24 insertions(+), 32 deletions(-) diff --git a/adm/admin.lib.php b/adm/admin.lib.php index a3ca32f19..d4bb2cb81 100644 --- a/adm/admin.lib.php +++ b/adm/admin.lib.php @@ -260,11 +260,11 @@ while ($entry = $tmp->read()) { } @ksort($amenu); -$qstr = ''; -if (isset($sst)) $qstr .= '&sst='.$sst; -if (isset($sod)) $qstr .= '&sod='.$sod; -if (isset($sfl)) $qstr .= '&sfl='.$sfl; -if (isset($stx)) $qstr .= '&stx='.$stx; -if (isset($page)) $qstr .= '&page='.$page; -//$qstr = 'sst=$sst&sod=$sod&sfl=$sfl&stx=$stx&page=$page'; +$arr_query = array(); +if (isset($sst)) $arr_query[] = 'sst='.$sst; +if (isset($sod)) $arr_query[] = 'sod='.$sod; +if (isset($sfl)) $arr_query[] = 'sfl='.$sfl; +if (isset($stx)) $arr_query[] = 'stx='.$stx; +if (isset($page)) $arr_query[] = 'page='.$page; +$qstr = implode("&", $arr_query); ?> \ No newline at end of file diff --git a/lib/common.lib.php b/lib/common.lib.php index 0351b0c95..65c195451 100644 --- a/lib/common.lib.php +++ b/lib/common.lib.php @@ -18,7 +18,7 @@ function get_microtime() // 현재페이지, 총페이지수, 한페이지에 보여줄 행, URL function get_paging($write_pages, $cur_page, $total_page, $url, $add="") { - $url = preg_replace('#(&|&)?page\=[0-9]+#', '', $url); + $url = preg_replace('#&page=[0-9]*(&page=)$#', '$1', $url); $str = ''; if ($cur_page > 1) { @@ -748,7 +748,15 @@ function subject_sort_link($col, $query_string='', $flag='asc') } } - return ''; + $arr_query = array(); + $arr_query[] = $q1; + $arr_query[] = $q2; + $arr_query[] = 'sfl='.$sfl; + $arr_query[] = 'stx='.$stx; + $arr_query[] = 'page='.$page; + $qstr = implode("&", $arr_query); + + return ""; } diff --git a/test.php b/test.php index c276d6d96..26cf6e554 100644 --- a/test.php +++ b/test.php @@ -1,24 +1,8 @@ - - - -title - - - - +이 문자열에서 부분을 치환합니다.

- -치환하기 - - - - - - \ No newline at end of file +echo preg_replace('#(&|&)?page\=[^&]*#', '', $qstr3); +?> \ No newline at end of file From fb8fc827f73dee204fd9c69e55e4d820b47f2234 Mon Sep 17 00:00:00 2001 From: gnuboard Date: Wed, 6 Feb 2013 20:08:39 +0900 Subject: [PATCH 3/3] =?UTF-8?q?select=20option=20=EC=97=90=20get=5Fselecte?= =?UTF-8?q?d=20=ED=95=A8=EC=88=98=EB=A1=9C=20=EC=A0=81=EC=9A=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- adm/shop_admin/categorylist.php | 6 +++--- lib/common.lib.php | 7 ++----- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/adm/shop_admin/categorylist.php b/adm/shop_admin/categorylist.php index cb81ffd38..e149fbeec 100644 --- a/adm/shop_admin/categorylist.php +++ b/adm/shop_admin/categorylist.php @@ -83,9 +83,9 @@ $qstr = "$qstr&sca=$sca&page=$page&save_stx=$stx"; 처음 document.flist.sfl.value = '$sfl';"; ?> diff --git a/lib/common.lib.php b/lib/common.lib.php index 65c195451..ffcede995 100644 --- a/lib/common.lib.php +++ b/lib/common.lib.php @@ -1657,12 +1657,9 @@ function abs_ip2long($ip='') } -function get_selected($field, $value, $first=false) +function get_selected($field, $value) { - $selected = ($field==$value) ? ' selected="selected"' : ''; - if ($first && !$selected) - $selected = ($field=="") ? ' selected="selected"' : ''; - return $selected; + return ($field==$value) ? ' selected="selected"' : ''; }