Merge branch 'master' of github.com:gnuboard/g4s
This commit is contained in:
@ -119,14 +119,13 @@ $pg_anchor = "<ul class=\"frm_list\">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="bo_use">사용여부</label></th>
|
||||
<th scope="row"><label for="bo_pc_mobile">접속기기</label></th>
|
||||
<td>
|
||||
<?=help("게시판그룹의 사용여부 설정이 게시판의 사용여부 설정보다 우선합니다.")?>
|
||||
<select id="bo_use_" name="bo_use">
|
||||
<option value="both" <?=get_selected($board['bo_use'], 'both', true);?>>PC와 모바일에서 모두 사용</option>
|
||||
<option value="pc" <?=get_selected($board['bo_use'], 'pc');?>>PC 전용</option>
|
||||
<option value="mobile" <?=get_selected($board['bo_use'], 'mobile');?>>모바일 전용</option>
|
||||
<option value="none" <?=get_selected($board['bo_use'], 'none');?>>사용하지 않음</option>
|
||||
<?=help("PC 와 모바일 사용을 구분합니다.")?>
|
||||
<select id="bo_pc_mobile" name="bo_pc_mobile">
|
||||
<option value="both" <?=get_selected($board['bo_pc_mobile'], 'both');?>>PC와 모바일에서 모두 사용</option>
|
||||
<option value="pc" <?=get_selected($board['bo_pc_mobile'], 'pc');?>>PC 전용</option>
|
||||
<option value="mobile" <?=get_selected($board['bo_pc_mobile'], 'mobile');?>>모바일 전용</option>
|
||||
</select>
|
||||
</td>
|
||||
<td class="group_setting">
|
||||
|
||||
@ -53,7 +53,7 @@ $bo_category_list = str_replace($src_char, $dst_char, $bo_category_list);
|
||||
|
||||
$sql_common = " gr_id = '{$_POST['gr_id']}',
|
||||
bo_subject = '{$_POST['bo_subject']}',
|
||||
bo_use = '{$_POST['bo_use']}',
|
||||
bo_pc_mobile = '{$_POST['bo_pc_mobile']}',
|
||||
bo_admin = '{$_POST['bo_admin']}',
|
||||
bo_list_level = '{$_POST['bo_list_level']}',
|
||||
bo_read_level = '{$_POST['bo_read_level']}',
|
||||
|
||||
@ -4,13 +4,13 @@ include_once('./_common.php');
|
||||
|
||||
auth_check($auth[$sub_menu], 'r');
|
||||
|
||||
if (!isset($board['bo_use'])) {
|
||||
if (!isset($board['bo_pc_mobile'])) {
|
||||
// 게시판 사용 필드 추가
|
||||
// both : pc, mobile 둘다 사용
|
||||
// pc : pc 전용 사용
|
||||
// mobile : mobile 전용 사용
|
||||
// none : 사용 안함
|
||||
sql_query(" ALTER TABLE `{$g4['board_table']}` ADD `bo_use` ENUM( 'both', 'pc', 'mobile', 'none' ) NOT NULL DEFAULT 'both' AFTER `bo_subject` ", false);
|
||||
sql_query(" ALTER TABLE `{$g4['board_table']}` ADD `bo_pc_mobile` ENUM( 'both', 'pc', 'mobile' ) NOT NULL DEFAULT 'both' AFTER `bo_subject` ", false);
|
||||
}
|
||||
|
||||
$sql_common = " from {$g4['board_table']} a ";
|
||||
@ -116,9 +116,9 @@ var list_delete_php = 'board_list_delete.php';
|
||||
<th scope="col">쓰기P<span class="sound_only">포인트</span></th>
|
||||
<th scope="col">댓글P<span class="sound_only">포인트</span></th>
|
||||
<th scope="col">다운P<span class="sound_only">포인트</span></th>
|
||||
<th scope="col">검색<br>사용</th>
|
||||
<th scope="col">검색<br>순서</th>
|
||||
<th scope="col">선택</th>
|
||||
<th scope="col"><?=subject_sort_link('bo_use_search')?>검색<br>사용</a></th>
|
||||
<th scope="col"><?=subject_sort_link('bo_order_search')?>검색<br>순서</a></th>
|
||||
<th scope="col">접속기기</th>
|
||||
<th scope="col">관리</th>
|
||||
</tr>
|
||||
</thead>
|
||||
@ -156,11 +156,10 @@ var list_delete_php = 'board_list_delete.php';
|
||||
<td><input type="text" id="bo_order_search_<?=$i?>" name="bo_order_search[<?=$i?>]" class="frm_input" value="<?=$row['bo_order_search']?>" size="2" title="검색순서"></td>
|
||||
</td>
|
||||
<td>
|
||||
<select id="bo_use_<?=$i?>" name="bo_use[<?=$i?>]">
|
||||
<option value="both" <?=get_selected($row['bo_use'], 'both', true);?>>양쪽</option>
|
||||
<option value="pc" <?=get_selected($row['bo_use'], 'pc');?>>PC</option>
|
||||
<option value="mobile" <?=get_selected($row['bo_use'], 'mobile');?>>모바일</option>
|
||||
<option value="none" <?=get_selected($row['bo_use'], 'none');?>>미사용</option>
|
||||
<select id="bo_pc_mobile_<?=$i?>" name="bo_pc_mobile[<?=$i?>]">
|
||||
<option value="both" <?=get_selected($row['bo_pc_mobile'], 'both', true);?>>양쪽</option>
|
||||
<option value="pc" <?=get_selected($row['bo_pc_mobile'], 'pc');?>>PC</option>
|
||||
<option value="mobile" <?=get_selected($row['bo_pc_mobile'], 'mobile');?>>모바일</option>
|
||||
</select>
|
||||
</td>
|
||||
<td><?=$one_update?> <?=$one_copy?></td>
|
||||
|
||||
@ -30,7 +30,7 @@ if ($_POST['btn_submit'] == "선택수정") {
|
||||
$sql = " update {$g4['board_table']}
|
||||
set gr_id = '{$_POST['gr_id'][$k]}',
|
||||
bo_subject = '{$_POST['bo_subject'][$k]}',
|
||||
bo_use = '{$_POST['bo_use'][$k]}',
|
||||
bo_pc_mobile = '{$_POST['bo_pc_mobile'][$k]}',
|
||||
bo_skin = '{$_POST['bo_skin'][$k]}',
|
||||
bo_read_point = '{$_POST['bo_read_point'][$k]}',
|
||||
bo_write_point = '{$_POST['bo_write_point'][$k]}',
|
||||
|
||||
@ -2,9 +2,11 @@
|
||||
include_once('./_common.php');
|
||||
|
||||
if (!$board['bo_table']) {
|
||||
alert('존재하지 않는 게시판입니다.', G4_PATH);
|
||||
alert('존재하지 않는 게시판입니다.', G4_URL);
|
||||
}
|
||||
|
||||
check_pc_mobile($board['bo_pc_mobile']);
|
||||
|
||||
if (isset($write['wr_is_comment']) && $write['wr_is_comment']) {
|
||||
goto_url('./board.php?bo_table='.$bo_table.'&wr_id='.$write['wr_parent'].'#c_'.$wr_id);
|
||||
}
|
||||
|
||||
@ -6,7 +6,6 @@ include_once(G4_GCAPTCHA_PATH.'/gcaptcha.lib.php');
|
||||
set_session('ss_bo_table', $bo_table);
|
||||
set_session('ss_wr_id', $wr_id);
|
||||
|
||||
// 090713
|
||||
if (!$board['bo_table']) {
|
||||
alert('존재하지 않는 게시판입니다.', G4_URL);
|
||||
}
|
||||
@ -15,6 +14,8 @@ if (!$bo_table) {
|
||||
alert("bo_table 값이 넘어오지 않았습니다.\\nwrite.php?bo_table=code 와 같은 방식으로 넘겨 주세요.", G4_URL);
|
||||
}
|
||||
|
||||
check_pc_mobile($board['bo_pc_mobile']);
|
||||
|
||||
@include_once (G4_PATH.'/skin/board/write.head.skin.php');
|
||||
@include_once ($board_skin_path.'/write.head.skin.php');
|
||||
|
||||
|
||||
@ -23,6 +23,7 @@ CREATE TABLE IF NOT EXISTS `g4s_board` (
|
||||
`bo_table` varchar(20) NOT NULL default '',
|
||||
`gr_id` varchar(255) NOT NULL default '',
|
||||
`bo_subject` varchar(255) NOT NULL default '',
|
||||
`bo_pc_mobile` enum('both','pc','mobile') NOT NULL DEFAULT 'both',
|
||||
`bo_admin` varchar(255) NOT NULL default '',
|
||||
`bo_list_level` tinyint(4) NOT NULL default '0',
|
||||
`bo_read_level` tinyint(4) NOT NULL default '0',
|
||||
|
||||
@ -1716,4 +1716,19 @@ function iconv_euckr($str)
|
||||
{
|
||||
return iconv('utf-8', 'euc-kr', $str);
|
||||
}
|
||||
|
||||
|
||||
// PC 또는 모바일 사용인지를 검사
|
||||
function check_pc_mobile($pc_mobile)
|
||||
{
|
||||
global $is_admin;
|
||||
|
||||
if ($is_admin) return;
|
||||
|
||||
if ($pc_mobile=='pc' && G4_IS_MOBILE) {
|
||||
alert('PC 전용 게시판입니다.', G4_URL);
|
||||
} else if ($pc_mobile=='mobile' && !G4_IS_MOBILE) {
|
||||
alert('모바일 전용 게시판입니다.', G4_URL);
|
||||
}
|
||||
}
|
||||
?>
|
||||
Reference in New Issue
Block a user