Merge branch 'master' of github.com:gnuboard/g4s
This commit is contained in:
@ -3,10 +3,16 @@ if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
|
||||
|
||||
// 분류 사용 여부
|
||||
$is_category = false;
|
||||
$category_option = '';
|
||||
if ($board['bo_use_category']) {
|
||||
$is_category = true;
|
||||
$category_location = './board.php?bo_table='.$bo_table.'&sca=';
|
||||
$category_option = get_category_option($bo_table); // SELECT OPTION 태그로 넘겨받음
|
||||
|
||||
$categories = explode('|', $board['bo_category_list']); // 구분자가 , 로 되어 있음
|
||||
for ($i=0; $i<count($categories); $i++) {
|
||||
if (trim($categories[$i]))
|
||||
$category_option .= '<li>'.$categories[$i].'</li>';
|
||||
}
|
||||
}
|
||||
|
||||
$sop = strtolower($sop);
|
||||
|
||||
@ -47,14 +47,14 @@ if (!$board['bo_use_list_view']) {
|
||||
$prev_href = '';
|
||||
if (isset($prev['wr_id']) && $prev['wr_id']) {
|
||||
$prev_wr_subject = get_text(cut_str($prev['wr_subject'], 255));
|
||||
$prev_href = './board.php?bo_table='.$bo_table.'&wr_id='.$prev['wr_id'].'&page='.$page.$qstr;
|
||||
$prev_href = './board.php?bo_table='.$bo_table.'&wr_id='.$prev['wr_id'].$qstr;
|
||||
}
|
||||
|
||||
// 다음글 링크
|
||||
$next_href = '';
|
||||
if (isset($next['wr_id']) && $next['wr_id']) {
|
||||
$next_wr_subject = get_text(cut_str($next['wr_subject'], 255));
|
||||
$next_href = './board.php?bo_table='.$bo_table.'&wr_id='.$next['wr_id'].'&page='.$page.$qstr;
|
||||
$next_href = './board.php?bo_table='.$bo_table.'&wr_id='.$next['wr_id'].$qstr;
|
||||
}
|
||||
|
||||
// 쓰기 링크
|
||||
|
||||
@ -224,6 +224,7 @@ if ($is_guest || ($is_admin && $w == 'u' && $member['mb_id'] != $write['mb_id'])
|
||||
}
|
||||
|
||||
$is_category = false;
|
||||
$category_option = '';
|
||||
if ($board['bo_use_category']) {
|
||||
$ca_name = "";
|
||||
if (isset($write['ca_name']))
|
||||
|
||||
@ -113,7 +113,6 @@ fieldset button:focus, .fieldset_submit:focus {padding:0 15px;height:23px;border
|
||||
.td_num {width:60px;text-align:center}
|
||||
.td_bignum {width:120px;text-align:center}
|
||||
.td_mbid, .td_mbnick, .td_mbname {width:100px;text-align:left}
|
||||
.td_mbnick div, .td_mbname div {position:relative} /* 파이어폭스에서 사이드뷰 위치를 잡기 위함 */
|
||||
.td_time {width:150px;text-align:center}
|
||||
.td_boolean {width:50px;text-align:center}
|
||||
/* 인덱스 */
|
||||
@ -157,9 +156,9 @@ fieldset button:focus, .fieldset_submit:focus {padding:0 15px;height:23px;border
|
||||
/* 사이드뷰 */
|
||||
.sv {display:inline-block;position:relative;font-weight:normal}
|
||||
.sv .sv_wrap {display:none;margin-top:5px;border:1px solid #666;background:#484848}
|
||||
.sv_nojs .sv_wrap {display:block;width:100px !important}
|
||||
.sv .sv_wrap a {display:block;padding:3px;border-bottom:1px solid #555;color:#fff}
|
||||
.sv_on {z-index:1000;display:block !important;position:absolute;top:10px;left:20px;width:100px !important;height:auto !important;background:#ddd;overflow:auto}
|
||||
.sv_nojs .sv_wrap {display:block}
|
||||
.sv .sv_wrap a {display:inline-block;padding:3px;width:94px;border-bottom:1px solid #555;color:#fff}
|
||||
.sv_on {z-index:1000;display:block !important;position:absolute;top:10px;left:20px;width:auto;height:auto !important;background:#ddd}
|
||||
.sv_member,
|
||||
.sv_guest {font-weight:bold}
|
||||
|
||||
|
||||
@ -476,14 +476,14 @@ fieldset button {padding:0 15px;height:24px;border:0;background:#494949;color:#f
|
||||
#bo_vc_warea {clear:both;position:relative;margin:0 90px 10px 0}
|
||||
#bo_vc_warea textarea {padding:3px;width:100%;height:50px;border:1px solid #ddd;background:#fff;vertical-align:middle}
|
||||
#bo_vc_warea textarea:focus {padding:4px;border:0;background:#494949;color:#fff}
|
||||
#bo_vc_warea .bo_vc_submit {position:absolute;top:0;right:-90px !important;right:20px;width:75px;height:57px;border:1px solid #666;background:#494949;color:#fff;letter-spacing:-0.1em}
|
||||
#bo_vc_warea .bo_vc_submit {position:absolute;top:0;right:-90px !important;right:0;width:75px;height:57px;border:1px solid #666;background:#494949;color:#fff;letter-spacing:-0.1em}
|
||||
|
||||
/* 사이드뷰 */
|
||||
.sv {display:inline-block;position:relative;font-weight:normal}
|
||||
.sv .sv_wrap {display:none;margin-top:5px;border:1px solid #666;background:#484848}
|
||||
.sv_nojs .sv_wrap {display:block;width:100px !important}
|
||||
.sv .sv_wrap a {display:block;padding:3px;border-bottom:1px solid #555;color:#fff}
|
||||
.sv_on {z-index:1000;display:block !important;position:absolute;top:10px;left:20px;width:100px !important;height:auto !important;background:#ddd;overflow:auto}
|
||||
.sv .sv_wrap {z-index:1000;display:none;margin-top:5px;border:1px solid #666;background:#484848}
|
||||
.sv_nojs .sv_wrap {display:block}
|
||||
.sv .sv_wrap a {display:inline-block;padding:3px;width:94px;border-bottom:1px solid #555;color:#fff !important}
|
||||
.sv_on {display:block !important;position:absolute;top:10px;left:20px;width:auto;height:auto !important;background:#ddd}
|
||||
.sv_member,
|
||||
.sv_guest {font-weight:bold}
|
||||
|
||||
|
||||
@ -18,6 +18,8 @@ function get_microtime()
|
||||
// 현재페이지, 총페이지수, 한페이지에 보여줄 행, URL
|
||||
function get_paging($write_pages, $cur_page, $total_page, $url, $add="")
|
||||
{
|
||||
$url = preg_replace('#(&|&)?page\=[0-9]+#', '', $url);
|
||||
|
||||
$str = '';
|
||||
if ($cur_page > 1) {
|
||||
$str .= '<a href="'.$url.'1'.$add.'" class="pg_page pg_start">처음</a>'.PHP_EOL;
|
||||
@ -795,17 +797,17 @@ function get_category_option($bo_table='', $ca_name='')
|
||||
{
|
||||
global $g4, $board;
|
||||
|
||||
$arr = explode("|", $board['bo_category_list']); // 구분자가 , 로 되어 있음
|
||||
$categories = explode("|", $board['bo_category_list']); // 구분자가 , 로 되어 있음
|
||||
$str = "";
|
||||
for ($i=0; $i<count($arr); $i++) {
|
||||
$category = trim($arr[$i]);
|
||||
for ($i=0; $i<count($categories); $i++) {
|
||||
$category = trim($categories[$i]);
|
||||
if (!$category) continue;
|
||||
|
||||
$str .= "<option value=\"$arr[$i]\"";
|
||||
$str .= "<option value=\"$categories[$i]\"";
|
||||
if ($category == $ca_name) {
|
||||
$str .= ' selected="selected"';
|
||||
}
|
||||
$str .= ">$arr[$i]</option>\n";
|
||||
$str .= ">$categories[$i]</option>\n";
|
||||
}
|
||||
|
||||
return $str;
|
||||
|
||||
@ -15,10 +15,10 @@ if ($is_nogood) $colspan++;
|
||||
<div id="bo_cate">
|
||||
<? if ($is_category) { ?>
|
||||
<form id="fcategory" name="fcategory" method="get">
|
||||
<select name="sca" onchange="location='<?=$category_location?>'+<?=strtolower($g4['charset'])=='utf-8' ? "encodeURIComponent(this.value)" : "this.value"?>;">
|
||||
<option value=''>전체</option>
|
||||
<ul>
|
||||
<li>전체</li>
|
||||
<?=$category_option?>
|
||||
</select>
|
||||
</ul>
|
||||
</form>
|
||||
<? } ?>
|
||||
</div>
|
||||
@ -230,3 +230,19 @@ function select_copy(sw) {
|
||||
</script>
|
||||
<? } ?>
|
||||
<!-- 게시판 목록 끝 -->
|
||||
|
||||
<!-- ie6,7에서 사이드뷰가 아래 사이드뷰에서 가려지는 현상 수정 -->
|
||||
<!--[if lte IE 8]>
|
||||
<script>
|
||||
$(function() {
|
||||
var $td_name = $(".td_name");
|
||||
var count = $td_name.length;
|
||||
|
||||
$td_name.each(function() {
|
||||
$(this).css("z-index", count);
|
||||
$(this).css("position", "relative");
|
||||
count--;
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<![endif]-->
|
||||
@ -152,13 +152,12 @@ echo $option_hidden;
|
||||
// 관리자라면 분류 선택에 '공지' 옵션을 추가함
|
||||
if ($is_admin)
|
||||
{
|
||||
echo "
|
||||
if (typeof(document.fwrite.ca_name) != 'undefined')
|
||||
{
|
||||
document.fwrite.ca_name.options.length += 1;
|
||||
document.fwrite.ca_name.options[document.fwrite.ca_name.options.length-1].value = '공지';
|
||||
document.fwrite.ca_name.options[document.fwrite.ca_name.options.length-1].text = '공지';
|
||||
}";
|
||||
echo '
|
||||
if (ca_name_select = document.getElementById("ca_name")) {
|
||||
ca_name_select.options.length += 1;
|
||||
ca_name_select.options[ca_name_select.options.length-1].value = "공지";
|
||||
ca_name_select.options[ca_name_select.options.length-1].text = "공지";
|
||||
}';
|
||||
}
|
||||
?>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user