Merge branch 'master' of github.com:gnuboard/g4s
This commit is contained in:
@ -119,13 +119,13 @@ $pg_anchor = "<ul class=\"frm_list\">
|
|||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="row"><label for="bo_pc_mobile">접속기기</label></th>
|
<th scope="row"><label for="bo_device">접속기기</label></th>
|
||||||
<td>
|
<td>
|
||||||
<?=help("PC 와 모바일 사용을 구분합니다.")?>
|
<?=help("PC 와 모바일 사용을 구분합니다.")?>
|
||||||
<select id="bo_pc_mobile" name="bo_pc_mobile">
|
<select id="bo_device" name="bo_device">
|
||||||
<option value="both" <?=get_selected($board['bo_pc_mobile'], 'both');?>>PC와 모바일에서 모두 사용</option>
|
<option value="both" <?=get_selected($board['bo_device'], 'both');?>>PC와 모바일에서 모두 사용</option>
|
||||||
<option value="pc" <?=get_selected($board['bo_pc_mobile'], 'pc');?>>PC 전용</option>
|
<option value="pc" <?=get_selected($board['bo_device'], 'pc');?>>PC 전용</option>
|
||||||
<option value="mobile" <?=get_selected($board['bo_pc_mobile'], 'mobile');?>>모바일 전용</option>
|
<option value="mobile" <?=get_selected($board['bo_device'], 'mobile');?>>모바일 전용</option>
|
||||||
</select>
|
</select>
|
||||||
</td>
|
</td>
|
||||||
<td class="group_setting">
|
<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']}',
|
$sql_common = " gr_id = '{$_POST['gr_id']}',
|
||||||
bo_subject = '{$_POST['bo_subject']}',
|
bo_subject = '{$_POST['bo_subject']}',
|
||||||
bo_pc_mobile = '{$_POST['bo_pc_mobile']}',
|
bo_device = '{$_POST['bo_device']}',
|
||||||
bo_admin = '{$_POST['bo_admin']}',
|
bo_admin = '{$_POST['bo_admin']}',
|
||||||
bo_list_level = '{$_POST['bo_list_level']}',
|
bo_list_level = '{$_POST['bo_list_level']}',
|
||||||
bo_read_level = '{$_POST['bo_read_level']}',
|
bo_read_level = '{$_POST['bo_read_level']}',
|
||||||
|
|||||||
@ -4,13 +4,13 @@ include_once('./_common.php');
|
|||||||
|
|
||||||
auth_check($auth[$sub_menu], 'r');
|
auth_check($auth[$sub_menu], 'r');
|
||||||
|
|
||||||
if (!isset($board['bo_pc_mobile'])) {
|
if (!isset($board['bo_device'])) {
|
||||||
// 게시판 사용 필드 추가
|
// 게시판 사용 필드 추가
|
||||||
// both : pc, mobile 둘다 사용
|
// both : pc, mobile 둘다 사용
|
||||||
// pc : pc 전용 사용
|
// pc : pc 전용 사용
|
||||||
// mobile : mobile 전용 사용
|
// mobile : mobile 전용 사용
|
||||||
// none : 사용 안함
|
// none : 사용 안함
|
||||||
sql_query(" ALTER TABLE `{$g4['board_table']}` ADD `bo_pc_mobile` ENUM( 'both', 'pc', 'mobile' ) NOT NULL DEFAULT 'both' AFTER `bo_subject` ", false);
|
sql_query(" ALTER TABLE `{$g4['board_table']}` ADD `bo_device` ENUM( 'both', 'pc', 'mobile' ) NOT NULL DEFAULT 'both' AFTER `bo_subject` ", false);
|
||||||
}
|
}
|
||||||
|
|
||||||
$sql_common = " from {$g4['board_table']} a ";
|
$sql_common = " from {$g4['board_table']} a ";
|
||||||
@ -151,10 +151,10 @@ $colspan = 8;
|
|||||||
<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><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>
|
||||||
<td>
|
<td>
|
||||||
<select id="bo_pc_mobile_<?=$i?>" name="bo_pc_mobile[<?=$i?>]">
|
<select id="bo_device_<?=$i?>" name="bo_device[<?=$i?>]">
|
||||||
<option value="both" <?=get_selected($row['bo_pc_mobile'], 'both', true);?>>양쪽</option>
|
<option value="both" <?=get_selected($row['bo_device'], 'both', true);?>>모두</option>
|
||||||
<option value="pc" <?=get_selected($row['bo_pc_mobile'], 'pc');?>>PC</option>
|
<option value="pc" <?=get_selected($row['bo_device'], 'pc');?>>PC</option>
|
||||||
<option value="mobile" <?=get_selected($row['bo_pc_mobile'], 'mobile');?>>모바일</option>
|
<option value="mobile" <?=get_selected($row['bo_device'], 'mobile');?>>모바일</option>
|
||||||
</select>
|
</select>
|
||||||
</td>
|
</td>
|
||||||
<td><?=$one_update?> <?=$one_copy?></td>
|
<td><?=$one_update?> <?=$one_copy?></td>
|
||||||
@ -168,9 +168,17 @@ $colspan = 8;
|
|||||||
</table>
|
</table>
|
||||||
|
|
||||||
<div class="btn_list">
|
<div class="btn_list">
|
||||||
|
<<<<<<< HEAD
|
||||||
|
<input type="submit" name="btn_submit" onclick="document.pressed=this.value" value="선택수정">
|
||||||
|
<!-- <input type="submit" name="act_button" value="선택수정"> -->
|
||||||
|
<?if ($is_admin == 'super') {?>
|
||||||
|
<input type="submit" name="btn_submit" onclick="document.pressed=this.value" value="선택삭제">
|
||||||
|
<!-- <input type="submit" name="act_button" value="선택삭제"> -->
|
||||||
|
=======
|
||||||
<input type="submit" name="act_button" onclick="document.pressed=this.value" value="선택수정">
|
<input type="submit" name="act_button" onclick="document.pressed=this.value" value="선택수정">
|
||||||
<?if ($is_admin == 'super') {?>
|
<?if ($is_admin == 'super') {?>
|
||||||
<input type="submit" name="act_button" onclick="document.pressed=this.value" value="선택삭제">
|
<input type="submit" name="act_button" onclick="document.pressed=this.value" value="선택삭제">
|
||||||
|
>>>>>>> 3312cd2377e2b47707196bdb3df5cdab13720d51
|
||||||
<a href="./board_form.php">게시판추가</a>
|
<a href="./board_form.php">게시판추가</a>
|
||||||
<?}?>
|
<?}?>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -2,6 +2,9 @@
|
|||||||
$sub_menu = "300100";
|
$sub_menu = "300100";
|
||||||
include_once('./_common.php');
|
include_once('./_common.php');
|
||||||
|
|
||||||
|
print_r2($_POST); exit;
|
||||||
|
|
||||||
|
|
||||||
check_demo();
|
check_demo();
|
||||||
|
|
||||||
if (!count($_POST['chk'])) {
|
if (!count($_POST['chk'])) {
|
||||||
@ -30,7 +33,7 @@ if ($_POST['act_button'] == "선택수정") {
|
|||||||
$sql = " update {$g4['board_table']}
|
$sql = " update {$g4['board_table']}
|
||||||
set gr_id = '{$_POST['gr_id'][$k]}',
|
set gr_id = '{$_POST['gr_id'][$k]}',
|
||||||
bo_subject = '{$_POST['bo_subject'][$k]}',
|
bo_subject = '{$_POST['bo_subject'][$k]}',
|
||||||
bo_pc_mobile = '{$_POST['bo_pc_mobile'][$k]}',
|
bo_device = '{$_POST['bo_device'][$k]}',
|
||||||
bo_skin = '{$_POST['bo_skin'][$k]}',
|
bo_skin = '{$_POST['bo_skin'][$k]}',
|
||||||
bo_read_point = '{$_POST['bo_read_point'][$k]}',
|
bo_read_point = '{$_POST['bo_read_point'][$k]}',
|
||||||
bo_write_point = '{$_POST['bo_write_point'][$k]}',
|
bo_write_point = '{$_POST['bo_write_point'][$k]}',
|
||||||
|
|||||||
@ -58,14 +58,13 @@ include_once('./admin.head.php');
|
|||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="row"><label for="gr_use">사용여부</label></th>
|
<th scope="row"><label for="gr_device">접속기기</label></th>
|
||||||
<td>
|
<td>
|
||||||
<?=help("게시판그룹의 사용여부 설정이 게시판의 사용여부 설정보다 우선합니다.")?>
|
<?=help("PC 와 모바일 사용을 구분합니다.")?>
|
||||||
<select id="gr_use_" name="gr_use">
|
<select id="gr_device_" name="gr_device">
|
||||||
<option value="both" <?=get_selected($group['gr_use'], 'both', true);?>>PC와 모바일에서 모두 사용</option>
|
<option value="both" <?=get_selected($group['gr_device'], 'both', true);?>>PC와 모바일에서 모두 사용</option>
|
||||||
<option value="pc" <?=get_selected($group['gr_use'], 'pc');?>>PC 전용</option>
|
<option value="pc" <?=get_selected($group['gr_device'], 'pc');?>>PC 전용</option>
|
||||||
<option value="mobile" <?=get_selected($group['gr_use'], 'mobile');?>>모바일 전용</option>
|
<option value="mobile" <?=get_selected($group['gr_device'], 'mobile');?>>모바일 전용</option>
|
||||||
<option value="none" <?=get_selected($group['gr_use'], 'none');?>>사용하지 않음</option>
|
|
||||||
</select>
|
</select>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|||||||
@ -15,6 +15,7 @@ if (!preg_match("/^([A-Za-z0-9_]{1,10})$/", $_POST['gr_id']))
|
|||||||
if (!$gr_subject) alert('그룹 제목을 입력하세요.');
|
if (!$gr_subject) alert('그룹 제목을 입력하세요.');
|
||||||
|
|
||||||
$sql_common = " gr_subject = '{$_POST['gr_subject']}',
|
$sql_common = " gr_subject = '{$_POST['gr_subject']}',
|
||||||
|
gr_device = '{$_POST['gr_device']}',
|
||||||
gr_admin = '{$_POST['gr_admin']}',
|
gr_admin = '{$_POST['gr_admin']}',
|
||||||
gr_1_subj = '{$_POST['gr_1_subj']}',
|
gr_1_subj = '{$_POST['gr_1_subj']}',
|
||||||
gr_2_subj = '{$_POST['gr_2_subj']}',
|
gr_2_subj = '{$_POST['gr_2_subj']}',
|
||||||
|
|||||||
@ -4,13 +4,13 @@ include_once('./_common.php');
|
|||||||
|
|
||||||
auth_check($auth[$sub_menu], 'r');
|
auth_check($auth[$sub_menu], 'r');
|
||||||
|
|
||||||
if (!isset($group['gr_use'])) {
|
if (!isset($group['gr_device'])) {
|
||||||
// 게시판 그룹 사용 필드 추가
|
// 게시판 그룹 사용 필드 추가
|
||||||
// both : pc, mobile 둘다 사용
|
// both : pc, mobile 둘다 사용
|
||||||
// pc : pc 전용 사용
|
// pc : pc 전용 사용
|
||||||
// mobile : mobile 전용 사용
|
// mobile : mobile 전용 사용
|
||||||
// none : 사용 안함
|
// none : 사용 안함
|
||||||
sql_query(" ALTER TABLE `{$g4['board_group_table']}` ADD `gr_use` ENUM( 'both', 'pc', 'mobile', 'none' ) NOT NULL DEFAULT 'both' AFTER `gr_subject` ", false);
|
sql_query(" ALTER TABLE `{$g4['board_group_table']}` ADD `gr_device` ENUM( 'both', 'pc', 'mobile' ) NOT NULL DEFAULT 'both' AFTER `gr_subject` ", false);
|
||||||
}
|
}
|
||||||
|
|
||||||
$sql_common = " from {$g4['group_table']} ";
|
$sql_common = " from {$g4['group_table']} ";
|
||||||
@ -60,10 +60,6 @@ include_once('./admin.head.php');
|
|||||||
$colspan = 8;
|
$colspan = 8;
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<script>
|
|
||||||
var list_update_php = "./boardgroup_list_update.php";
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<form id="fsearch" name="fsearch" method="get">
|
<form id="fsearch" name="fsearch" method="get">
|
||||||
<fieldset>
|
<fieldset>
|
||||||
<legend>그룹 검색</legend>
|
<legend>그룹 검색</legend>
|
||||||
@ -94,7 +90,7 @@ var list_update_php = "./boardgroup_list_update.php";
|
|||||||
</div>
|
</div>
|
||||||
<?}?>
|
<?}?>
|
||||||
|
|
||||||
<form id="fboardgrouplist" name="fboardgrouplist" method="post" action="./boardgroup_list_update.php">
|
<form id="fboardgrouplist" name="fboardgrouplist" method="post" action="./boardgroup_list_update.php" onsubmit="return fboardgrouplist_submit(this);">
|
||||||
<input type="hidden" name="sst" value="<?=$sst?>">
|
<input type="hidden" name="sst" value="<?=$sst?>">
|
||||||
<input type="hidden" name="sod" value="<?=$sod?>">
|
<input type="hidden" name="sod" value="<?=$sod?>">
|
||||||
<input type="hidden" name="sfl" value="<?=$sfl?>">
|
<input type="hidden" name="sfl" value="<?=$sfl?>">
|
||||||
@ -112,7 +108,7 @@ var list_update_php = "./boardgroup_list_update.php";
|
|||||||
<th scope="col">게시판</th>
|
<th scope="col">게시판</th>
|
||||||
<th scope="col">접근사용</th>
|
<th scope="col">접근사용</th>
|
||||||
<th scope="col">접근회원수</th>
|
<th scope="col">접근회원수</th>
|
||||||
<th scope="col"><?=subject_sort_link('gr_use')?>사용여부</a></th>
|
<th scope="col">접속기기</th>
|
||||||
<th scope="col">관리</th>
|
<th scope="col">관리</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
@ -129,15 +125,12 @@ var list_update_php = "./boardgroup_list_update.php";
|
|||||||
$row2 = sql_fetch($sql2);
|
$row2 = sql_fetch($sql2);
|
||||||
|
|
||||||
$s_upd = '<a href="./boardgroup_form.php?$qstr&w=u&gr_id='.$row['gr_id'].'">수정</a>';
|
$s_upd = '<a href="./boardgroup_form.php?$qstr&w=u&gr_id='.$row['gr_id'].'">수정</a>';
|
||||||
/*$s_del = '';
|
|
||||||
if ($is_admin == 'super') {
|
|
||||||
$s_del = '<a href="javascript:post_delete(\'boardgroup_delete.php\', \''.$row['gr_id'].'\');">삭제</a>';
|
|
||||||
}*/
|
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td class="td_chk">
|
<td class="td_chk">
|
||||||
<input type="checkbox" id="chk_<?=$i?>" name="chk[]" value="<?=$row['gr_id']?>" title="<?=$row['gr_subject']?> 그룹선택">
|
<input type="checkbox" id="chk_<?=$i?>" name="chk[]" value="<?=$i?>" title="<?=$row['gr_subject']?> 그룹선택">
|
||||||
|
<input type="hidden" name="group_id[<?=$i?>]" value="<?=$row['gr_id']?>">
|
||||||
</td>
|
</td>
|
||||||
<td class="td_mbid"><a href="<?=$g4['bbs_path']?>/group.php?gr_id=<?=$row['gr_id']?>"><?=$row['gr_id']?></a></td>
|
<td class="td_mbid"><a href="<?=$g4['bbs_path']?>/group.php?gr_id=<?=$row['gr_id']?>"><?=$row['gr_id']?></a></td>
|
||||||
<td>
|
<td>
|
||||||
@ -154,11 +147,10 @@ var list_update_php = "./boardgroup_list_update.php";
|
|||||||
<td><input type="checkbox" id="gr_use_access" name="gr_use_access[<?=$i?>]" <?=$row['gr_use_access']?'checked':''?> value="1" title="선택 시 접근회원 사용"></td>
|
<td><input type="checkbox" id="gr_use_access" name="gr_use_access[<?=$i?>]" <?=$row['gr_use_access']?'checked':''?> value="1" title="선택 시 접근회원 사용"></td>
|
||||||
<td><a href="./boardgroupmember_list.php?gr_id=<?=$row['gr_id']?>"><?=$row1['cnt']?></a></td>
|
<td><a href="./boardgroupmember_list.php?gr_id=<?=$row['gr_id']?>"><?=$row1['cnt']?></a></td>
|
||||||
<td>
|
<td>
|
||||||
<select id="gr_use_<?=$i?>" name="gr_use[<?=$i?>]">
|
<select id="gr_device_<?=$i?>" name="gr_device[<?=$i?>]">
|
||||||
<option value="both" <?=get_selected($row['gr_use'], 'both', true);?>>양쪽</option>
|
<option value="both" <?=get_selected($row['gr_device'], 'both');?>>모두</option>
|
||||||
<option value="pc" <?=get_selected($row['gr_use'], 'pc');?>>PC</option>
|
<option value="pc" <?=get_selected($row['gr_device'], 'pc');?>>PC</option>
|
||||||
<option value="mobile" <?=get_selected($row['gr_use'], 'mobile');?>>모바일</option>
|
<option value="mobile" <?=get_selected($row['gr_device'], 'mobile');?>>모바일</option>
|
||||||
<option value="none" <?=get_selected($row['gr_use'], 'none');?>>미사용</option>
|
|
||||||
</select>
|
</select>
|
||||||
</td>
|
</td>
|
||||||
<td class="td_mng"><?=$s_upd?></td>
|
<td class="td_mng"><?=$s_upd?></td>
|
||||||
@ -172,8 +164,8 @@ var list_update_php = "./boardgroup_list_update.php";
|
|||||||
</table>
|
</table>
|
||||||
|
|
||||||
<div class="btn_list">
|
<div class="btn_list">
|
||||||
<input type="submit" name="act_button" value="선택수정">
|
<input type="submit" name="act_button" onclick="document.pressed=this.value" value="선택수정">
|
||||||
<input type="submit" name="act_button" value="선택삭제">
|
<input type="submit" name="act_button" onclick="document.pressed=this.value" value="선택삭제">
|
||||||
<a href="./boardgroup_form.php">게시판그룹 추가</a>
|
<a href="./boardgroup_form.php">게시판그룹 추가</a>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
@ -185,30 +177,15 @@ echo $pagelist;
|
|||||||
?>
|
?>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
$(function() {
|
function fboardgrouplist_submit(f)
|
||||||
$('input[name=act_button]').click(function(e) {
|
{
|
||||||
e.preventDefault();
|
if (!is_checked("chk[]")) {
|
||||||
|
alert(document.pressed+" 하실 항목을 하나 이상 선택하세요.");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
var act = $(this).val();
|
return true;
|
||||||
var cnt = $('input[name^=chk]:checked').length;
|
}
|
||||||
|
|
||||||
if(act == "선택삭제") {
|
|
||||||
if(confirm("한번 삭제한 자료는 복구할 방법이 없습니다.\n\n정말 삭제하시겠습니까?")) {
|
|
||||||
if(cnt < 1) {
|
|
||||||
alert(act+'할 게시판그룹을 1개 이상 선택해 주세요.');
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} else if(act == "선택수정") {
|
|
||||||
if(cnt < 1) {
|
|
||||||
alert(act+'할 게시판그룹을 1개 이상 선택해 주세요.');
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
$('#fboardgrouplist').submit();
|
|
||||||
});
|
|
||||||
});
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<?
|
<?
|
||||||
|
|||||||
@ -2,6 +2,8 @@
|
|||||||
$sub_menu = "300200";
|
$sub_menu = "300200";
|
||||||
include_once('./_common.php');
|
include_once('./_common.php');
|
||||||
|
|
||||||
|
//print_r2($_POST); exit;
|
||||||
|
|
||||||
check_demo();
|
check_demo();
|
||||||
|
|
||||||
auth_check($auth[$sub_menu], 'w');
|
auth_check($auth[$sub_menu], 'w');
|
||||||
@ -13,15 +15,16 @@ if(!$count)
|
|||||||
|
|
||||||
for ($i=0; $i<$count; $i++)
|
for ($i=0; $i<$count; $i++)
|
||||||
{
|
{
|
||||||
$gr_id = $_POST['chk'][$i];
|
$k = $_POST['chk'][$i];
|
||||||
|
$gr_id = $_POST['group_id'][$k];
|
||||||
|
|
||||||
if($_POST['act_button'] == '선택수정') {
|
if($_POST['act_button'] == '선택수정') {
|
||||||
$sql = " update {$g4['group_table']}
|
$sql = " update {$g4['group_table']}
|
||||||
set gr_subject = '{$_POST['gr_subject'][$k]}',
|
set gr_subject = '{$_POST['gr_subject'][$k]}',
|
||||||
gr_use = '{$_POST['gr_use'][$k]}',
|
gr_device = '{$_POST['gr_device'][$k]}',
|
||||||
gr_admin = '{$_POST['gr_admin'][$k]}',
|
gr_admin = '{$_POST['gr_admin'][$k]}',
|
||||||
gr_use_access = '{$_POST['gr_use_access'][$k]}'
|
gr_use_access = '{$_POST['gr_use_access'][$k]}'
|
||||||
where gr_id = '{$_POST['gr_id'][$k]}' ";
|
where gr_id = '{$gr_id}' ";
|
||||||
if ($is_admin != 'super')
|
if ($is_admin != 'super')
|
||||||
$sql .= " and gr_admin = '{$_POST['gr_admin'][$k]}' ";
|
$sql .= " and gr_admin = '{$_POST['gr_admin'][$k]}' ";
|
||||||
sql_query($sql);
|
sql_query($sql);
|
||||||
|
|||||||
@ -122,10 +122,9 @@ $pg_anchor = "
|
|||||||
<?
|
<?
|
||||||
$arr = get_skin_dir('new');
|
$arr = get_skin_dir('new');
|
||||||
for ($i=0; $i<count($arr); $i++) {
|
for ($i=0; $i<count($arr); $i++) {
|
||||||
echo '<option value="'.$arr[$i].'">'.$arr[$i].'</option>'.PHP_EOL;
|
echo '<option '.get_selected($config['cf_new_skin'], $arr[$i]).' value="'.$arr[$i].'">'.$arr[$i].'</option>'.PHP_EOL;
|
||||||
}
|
}
|
||||||
?></select>
|
?></select>
|
||||||
<script> document.getElementById('cf_new_skin').value="<?=$config['cf_new_skin']?>";</script>
|
|
||||||
</td>
|
</td>
|
||||||
<th scope="row"><label for="cf_new_rows">최근게시물 라인수</label></th>
|
<th scope="row"><label for="cf_new_rows">최근게시물 라인수</label></th>
|
||||||
<td>
|
<td>
|
||||||
|
|||||||
@ -5,7 +5,7 @@ if (!$board['bo_table']) {
|
|||||||
alert('존재하지 않는 게시판입니다.', G4_URL);
|
alert('존재하지 않는 게시판입니다.', G4_URL);
|
||||||
}
|
}
|
||||||
|
|
||||||
check_pc_mobile($board['bo_pc_mobile']);
|
check_device($board['bo_device']);
|
||||||
|
|
||||||
if (isset($write['wr_is_comment']) && $write['wr_is_comment']) {
|
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);
|
goto_url('./board.php?bo_table='.$bo_table.'&wr_id='.$write['wr_parent'].'#c_'.$wr_id);
|
||||||
|
|||||||
@ -14,7 +14,7 @@ if (!$bo_table) {
|
|||||||
alert("bo_table 값이 넘어오지 않았습니다.\\nwrite.php?bo_table=code 와 같은 방식으로 넘겨 주세요.", G4_URL);
|
alert("bo_table 값이 넘어오지 않았습니다.\\nwrite.php?bo_table=code 와 같은 방식으로 넘겨 주세요.", G4_URL);
|
||||||
}
|
}
|
||||||
|
|
||||||
check_pc_mobile($board['bo_pc_mobile']);
|
check_device($board['bo_device']);
|
||||||
|
|
||||||
@include_once (G4_PATH.'/skin/board/write.head.skin.php');
|
@include_once (G4_PATH.'/skin/board/write.head.skin.php');
|
||||||
@include_once ($board_skin_path.'/write.head.skin.php');
|
@include_once ($board_skin_path.'/write.head.skin.php');
|
||||||
|
|||||||
@ -23,7 +23,7 @@ CREATE TABLE IF NOT EXISTS `g4s_board` (
|
|||||||
`bo_table` varchar(20) NOT NULL default '',
|
`bo_table` varchar(20) NOT NULL default '',
|
||||||
`gr_id` varchar(255) NOT NULL default '',
|
`gr_id` varchar(255) NOT NULL default '',
|
||||||
`bo_subject` varchar(255) NOT NULL default '',
|
`bo_subject` varchar(255) NOT NULL default '',
|
||||||
`bo_pc_mobile` enum('both','pc','mobile') NOT NULL DEFAULT 'both',
|
`bo_device` enum('both','pc','mobile') NOT NULL DEFAULT 'both',
|
||||||
`bo_admin` varchar(255) NOT NULL default '',
|
`bo_admin` varchar(255) NOT NULL default '',
|
||||||
`bo_list_level` tinyint(4) NOT NULL default '0',
|
`bo_list_level` tinyint(4) NOT NULL default '0',
|
||||||
`bo_read_level` tinyint(4) NOT NULL default '0',
|
`bo_read_level` tinyint(4) NOT NULL default '0',
|
||||||
|
|||||||
@ -1637,7 +1637,8 @@ function convert_charset($from_charset, $to_charset, $str)
|
|||||||
// mysql_real_escape_string 의 alias 기능을 한다.
|
// mysql_real_escape_string 의 alias 기능을 한다.
|
||||||
function escape_trim($field)
|
function escape_trim($field)
|
||||||
{
|
{
|
||||||
return mysql_real_escape_string(trim($field));
|
if ($field)
|
||||||
|
return mysql_real_escape_string(trim($field));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -1719,15 +1720,15 @@ function iconv_euckr($str)
|
|||||||
|
|
||||||
|
|
||||||
// PC 또는 모바일 사용인지를 검사
|
// PC 또는 모바일 사용인지를 검사
|
||||||
function check_pc_mobile($pc_mobile)
|
function check_device($device)
|
||||||
{
|
{
|
||||||
global $is_admin;
|
global $is_admin;
|
||||||
|
|
||||||
if ($is_admin) return;
|
if ($is_admin) return;
|
||||||
|
|
||||||
if ($pc_mobile=='pc' && G4_IS_MOBILE) {
|
if ($device=='pc' && G4_IS_MOBILE) {
|
||||||
alert('PC 전용 게시판입니다.', G4_URL);
|
alert('PC 전용 게시판입니다.', G4_URL);
|
||||||
} else if ($pc_mobile=='mobile' && !G4_IS_MOBILE) {
|
} else if ($device=='mobile' && !G4_IS_MOBILE) {
|
||||||
alert('모바일 전용 게시판입니다.', G4_URL);
|
alert('모바일 전용 게시판입니다.', G4_URL);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user