Merge branch 'master' of github.com:gnuboard/g5

This commit is contained in:
whitedot
2014-03-14 17:31:19 +09:00
29 changed files with 521 additions and 170 deletions

View File

@ -88,7 +88,6 @@ $sql = " insert into {$g5['board_table']}
bo_upload_size = '{$board[bo_upload_size]}',
bo_reply_order = '{$board[bo_reply_order]}',
bo_use_search = '{$board[bo_use_search]}',
bo_show_menu = '{$board[bo_show_menu]}',
bo_order = '{$board[bo_order]}',
bo_notice = '{$board['bo_notice']}',
bo_upload_count = '{$board[bo_upload_count]}',

View File

@ -21,10 +21,6 @@ if (!isset($board['bo_device'])) {
sql_query(" ALTER TABLE `{$g5['board_table']}` ADD `bo_device` ENUM( 'both', 'pc', 'mobile' ) NOT NULL DEFAULT 'both' AFTER `bo_subject` ", false);
}
if (!isset($board['bo_show_menu'])) {
sql_query(" ALTER TABLE `{$g5['board_table']}` ADD `bo_show_menu` TINYINT NOT NULL DEFAULT '0' AFTER `bo_use_search`, ADD `bo_order` INT NOT NULL DEFAULT '0' AFTER `bo_show_menu` ", false);
}
if (!isset($board['bo_mobile_skin'])) {
sql_query(" ALTER TABLE `{$g5['board_table']}` ADD `bo_mobile_skin` VARCHAR(255) NOT NULL DEFAULT '' AFTER `bo_skin` ", false);
}
@ -120,7 +116,6 @@ if ($w == '') {
$board['bo_use_secret'] = 0;
$board['bo_include_head'] = '_head.php';
$board['bo_include_tail'] = '_tail.php';
$board['bo_show_menu'] = true;
} else if ($w == 'u') {
@ -769,20 +764,6 @@ $frm_submit .= '</div>';
<label for="chk_all_use_search">전체적용</label>
</td>
</tr>
<tr>
<th scope="row"><label for="bo_show_menu">메뉴보이기</label></th>
<td>
<?php echo help("사용에 체크하시면 게시판 제목을 메뉴에 출력합니다.") ?>
<input type="checkbox" name="bo_show_menu" value="1" id="bo_show_menu" <?php echo $board['bo_show_menu']?'checked':''; ?>>
사용
</td>
<td class="td_grpset">
<input type="checkbox" name="chk_grp_show_menu" value="1" id="chk_grp_show_menu">
<label for="chk_grp_show_menu">그룹적용</label>
<input type="checkbox" name="chk_all_show_menu" value="1" id="chk_all_show_menu">
<label for="chk_all_show_menu">전체적용</label>
</td>
</tr>
<tr>
<th scope="row"><label for="bo_order">출력 순서</label></th>
<td>

View File

@ -107,7 +107,6 @@ $sql_common = " gr_id = '{$_POST['gr_id']}',
bo_reply_order = '{$_POST['bo_reply_order']}',
bo_use_search = '{$_POST['bo_use_search']}',
bo_order = '{$_POST['bo_order']}',
bo_show_menu = '{$_POST['bo_show_menu']}',
bo_write_min = '{$_POST['bo_write_min']}',
bo_write_max = '{$_POST['bo_write_max']}',
bo_comment_min = '{$_POST['bo_comment_min']}',
@ -290,7 +289,6 @@ if (is_checked('chk_grp_mobile_content_tail')) $grp_fields .= " , bo_mob
if (is_checked('chk_grp_insert_content')) $grp_fields .= " , bo_insert_content = '{$bo_insert_content}' ";
if (is_checked('chk_grp_use_search')) $grp_fields .= " , bo_use_search = '{$bo_use_search}' ";
if (is_checked('chk_grp_order')) $grp_fields .= " , bo_order = '{$bo_order}' ";
if (is_checked('chk_grp_show_menu')) $grp_fields .= " , bo_show_menu = '{$bo_show_menu}' ";
for ($i=1; $i<=10; $i++) {
if (is_checked('chk_grp_'.$i)) {
$grp_fields .= " , bo_{$i}_subj = '".$_POST['bo_'.$i.'_subj']."' ";
@ -374,7 +372,6 @@ if (is_checked('chk_all_mobile_content_tail')) $all_fields .= " , bo_mob
if (is_checked('chk_all_insert_content')) $all_fields .= " , bo_insert_content = '{$bo_insert_content}' ";
if (is_checked('chk_all_use_search')) $all_fields .= " , bo_use_search = '{$bo_use_search}' ";
if (is_checked('chk_all_order')) $all_fields .= " , bo_order = '{$bo_order}' ";
if (is_checked('chk_all_show_menu')) $all_fields .= " , bo_show_menu = '{$bo_show_menu}' ";
for ($i=1; $i<=10; $i++) {
if (is_checked('chk_all_'.$i)) {
$all_fields .= " , bo_{$i}_subj = '".$_POST['bo_'.$i.'_subj']."' ";

View File

@ -51,7 +51,7 @@ $listall = '<a href="'.$_SERVER['PHP_SELF'].'" class="ov_listall">전체목록</
$g5['title'] = '게시판관리';
include_once('./admin.head.php');
$colspan = 16;
$colspan = 15;
?>
<div class="local_ov01 local_ov">
@ -107,7 +107,6 @@ $colspan = 16;
<th scope="col">다운P<span class="sound_only">포인트</span></th>
<th scope="col"><?php echo subject_sort_link('bo_use_sns') ?>SNS<br>사용</a></th>
<th scope="col"><?php echo subject_sort_link('bo_use_search') ?>검색<br>사용</a></th>
<th scope="col"><?php echo subject_sort_link('bo_show_menu') ?>메뉴<br>보임</a></th>
<th scope="col"><?php echo subject_sort_link('bo_order') ?>출력<br>순서</a></th>
<th scope="col">접속기기</th>
<th scope="col">관리</th>
@ -174,10 +173,6 @@ $colspan = 16;
<label for="bo_use_search_<?php echo $i; ?>" class="sound_only">검색 사용</label>
<input type="checkbox" name="bo_use_search[<?php echo $i ?>]" value="1" id="bo_use_search_<?php echo $i ?>" <?php echo $row['bo_use_search']?"checked":"" ?>>
</td>
<td class="td_chk">
<label for="bo_show_menu_<?php echo $i; ?>" class="sound_only">메인메뉴 보이기</label>
<input type="checkbox" name="bo_show_menu[<?php echo $i ?>]" value="1" id="bo_show_menu_<?php echo $i ?>" <?php echo $row['bo_show_menu']?"checked":"" ?>>
</td>
<td class="td_chk">
<label for="bo_order_<?php echo $i; ?>" class="sound_only">출력 순서</label>
<input type="text" name="bo_order[<?php echo $i ?>]" value="<?php echo $row['bo_order'] ?>" id="bo_order_<?php echo $i ?>" class="frm_input" size="2">

View File

@ -39,7 +39,6 @@ if ($_POST['act_button'] == "선택수정") {
bo_download_point = '{$_POST['bo_download_point'][$k]}',
bo_use_search = '{$_POST['bo_use_search'][$k]}',
bo_use_sns = '{$_POST['bo_use_sns'][$k]}',
bo_show_menu = '{$_POST['bo_show_menu'][$k]}',
bo_order = '{$_POST['bo_order'][$k]}'
where bo_table = '{$_POST['board_table'][$k]}' ";
sql_query($sql);

View File

@ -26,9 +26,6 @@ if (!isset($group['gr_device'])) {
sql_query(" ALTER TABLE `{$g5['group_table']}` ADD `gr_device` ENUM('both','pc','mobile') NOT NULL DEFAULT 'both' AFTER `gr_subject` ", false);
}
if (!isset($group['gr_show_menu'])) {
sql_query(" ALTER TABLE `{$g5['group_table']}` ADD `gr_show_menu` TINYINT NOT NULL DEFAULT '0' AFTER `gr_use_access`, ADD `gr_order` INT NOT NULL DEFAULT '0' AFTER `gr_show_menu` ", false);
}
$g5['title'] = $html_title;
include_once('./admin.head.php');
@ -52,11 +49,11 @@ include_once('./admin.head.php');
<tbody>
<tr>
<th scope="row"><label for="gr_id">그룹 ID<?php echo $sound_only ?></label></th>
<td><input type="text" name="gr_id" value="<?php echo $group['gr_id'] ?>" id="gr_id" <?php echo $gr_id_attr; ?> class="<?php echo $gr_id_attr; ?> alnum_ frm_input" maxlength="10">
<?php
<td><input type="text" name="gr_id" value="<?php echo $group['gr_id'] ?>" id="gr_id" <?php echo $gr_id_attr; ?> class="<?php echo $gr_id_attr; ?> alnum_ frm_input" maxlength="10">
<?php
if ($w=='')
echo '영문자, 숫자, _ 만 가능 (공백없이)';
else
else
echo '<a href="'.G5_BBS_URL.'/group.php?gr_id='.$group['gr_id'].'" class="btn_frmline">게시판그룹 바로가기</a>';
?>
</td>
@ -112,14 +109,6 @@ include_once('./admin.head.php');
?>
</td>
</tr>
<tr>
<th scope="row"><label for="gr_show_menu">메뉴보이기</label></th>
<td>
<?php echo help("사용에 체크하시면 게시판그룹 제목을 메뉴에 출력합니다.") ?>
<input type="checkbox" name="gr_show_menu" value="1" id="gr_show_menu" <?php echo $gr['gr_show_menu']?'checked':''; ?>>
사용
</td>
</tr>
<?php for ($i=1;$i<=10;$i++) { ?>
<tr>
<th scope="row">여분필드<?php echo $i ?></th>

View File

@ -17,7 +17,6 @@ if (!$gr_subject) alert('그룹 제목을 입력하세요.');
$sql_common = " gr_subject = '{$_POST['gr_subject']}',
gr_device = '{$_POST['gr_device']}',
gr_admin = '{$_POST['gr_admin']}',
gr_show_menu = '{$_POST['gr_show_menu']}',
gr_1_subj = '{$_POST['gr_1_subj']}',
gr_2_subj = '{$_POST['gr_2_subj']}',
gr_3_subj = '{$_POST['gr_3_subj']}',
@ -38,7 +37,7 @@ $sql_common = " gr_subject = '{$_POST['gr_subject']}',
gr_8 = '{$_POST['gr_8']}',
gr_9 = '{$_POST['gr_9']}',
gr_10 = '{$_POST['gr_10']}' ";
if (isset($_POST['gr_use_access']))
if (isset($_POST['gr_use_access']))
$sql_common .= ", gr_use_access = '{$_POST['gr_use_access']}' ";
else
$sql_common .= ", gr_use_access = '' ";

View File

@ -55,7 +55,7 @@ $listall = '<a href="'.$_SERVER['PHP_SELF'].'" class="ov_listall">처음</a>';
$g5['title'] = '게시판그룹설정';
include_once('./admin.head.php');
$colspan = 11;
$colspan = 10;
?>
<div class="local_ov01 local_ov">
@ -105,7 +105,6 @@ $colspan = 11;
<th scope="col">게시판</th>
<th scope="col">접근<br>사용</th>
<th scope="col">접근<br>회원수</th>
<th scope="col">메뉴<br>보임</th>
<th scope="col"><?php echo subject_sort_link('gr_order') ?>출력<br>순서</a></th>
<th scope="col">접속기기</th>
<th scope="col">관리</th>
@ -153,10 +152,6 @@ $colspan = 11;
<input type="checkbox" name="gr_use_access[<?php echo $i ?>]" <?php echo $row['gr_use_access']?'checked':'' ?> value="1" id="gr_use_access_<?php echo $i ?>">
</td>
<td class="td_numsmall"><a href="./boardgroupmember_list.php?gr_id=<?php echo $row['gr_id'] ?>"><?php echo $row1['cnt'] ?></a></td>
<td class="td_chk">
<label for="gr_show_menu_<?php echo $i; ?>" class="sound_only">메인메뉴에 보이기</label>
<input type="checkbox" name="gr_show_menu[<?php echo $i ?>]" <?php echo $row['gr_show_menu']?'checked':'' ?> value="1" id="gr_show_menu_<?php echo $i ?>">
</td>
<td class="td_chk">
<label for="gr_order_<?php echo $i; ?>" class="sound_only">메인메뉴 출력순서</label>
<input type="text" name="gr_order[<?php echo $i ?>]" value="<?php echo $row['gr_order'] ?>" id="gr_order_<?php echo $i ?>" class="frm_input" size="2">

View File

@ -17,14 +17,13 @@ for ($i=0; $i<$count; $i++)
{
$k = $_POST['chk'][$i];
$gr_id = $_POST['group_id'][$k];
if($_POST['act_button'] == '선택수정') {
$sql = " update {$g5['group_table']}
set gr_subject = '{$_POST['gr_subject'][$k]}',
gr_device = '{$_POST['gr_device'][$k]}',
gr_admin = '{$_POST['gr_admin'][$k]}',
gr_use_access = '{$_POST['gr_use_access'][$k]}',
gr_show_menu = '{$_POST['gr_show_menu'][$k]}',
gr_order = '{$_POST['gr_order'][$k]}'
where gr_id = '{$gr_id}' ";
if ($is_admin != 'super')

View File

@ -134,6 +134,15 @@ if(!isset($config['cf_sms_use'])) {
ADD `cf_icode_server_port` varchar(255) NOT NULL DEFAULT '' AFTER `cf_icode_server_ip` ", true);
}
if(!isset($config['cf_faq_skin'])) {
sql_query(" ALTER TABLE `{$g5['config_table']}`
ADD `cf_faq_skin` varchar(255) NOT NULL DEFAULT '' AFTER `cf_connect_skin`,
ADD `cf_mobile_faq_skin` varchar(255) NOT NULL DEFAULT '' AFTER `cf_mobile_connect_skin` ", true);
}
if(!$config['cf_faq_skin']) $config['cf_faq_skin'] = "basic";
if(!$config['cf_mobile_faq_skin']) $config['cf_mobile_faq_skin'] = "basic";
$g5['title'] = '환경설정';
include_once ('./admin.head.php');
@ -360,6 +369,32 @@ if ($config['cf_icode_id'] && $config['cf_icode_pw']) {
</select>
</td>
</tr>
<tr>
<th scope="row"><label for="cf_faq_skin">FAQ 스킨<strong class="sound_only">필수</strong></label></th>
<td>
<select name="cf_faq_skin" id="cf_faq_skin" required class="required">
<?php
$arr = get_skin_dir('faq');
for ($i=0; $i<count($arr); $i++) {
if ($i == 0) echo "<option value=\"\">선택</option>";
echo "<option value=\"".$arr[$i]."\"".get_selected($config['cf_faq_skin'], $arr[$i]).">".$arr[$i]."</option>\n";
}
?>
</select>
</td>
<th scope="row"><label for="cf_mobile_faq_skin">모바일 FAQ 스킨<strong class="sound_only">필수</strong></label></th>
<td>
<select name="cf_mobile_faq_skin" id="cf_mobile_faq_skin" required class="required">
<?php
$arr = get_skin_dir('faq', G5_MOBILE_PATH.'/'.G5_SKIN_DIR);
for ($i=0; $i<count($arr); $i++) {
if ($i == 0) echo "<option value=\"\">선택</option>";
echo "<option value=\"".$arr[$i]."\"".get_selected($config['cf_mobile_faq_skin'], $arr[$i]).">".$arr[$i]."</option>\n";
}
?>
</select>
</td>
</tr>
<tr>
<th scope="row"><label for="cf_editor">에디터 선택</label></th>
<td colspan="3">

View File

@ -39,6 +39,7 @@ $sql = " update {$g5['config_table']}
cf_new_rows = '{$_POST['cf_new_rows']}',
cf_search_skin = '{$_POST['cf_search_skin']}',
cf_connect_skin = '{$_POST['cf_connect_skin']}',
cf_faq_skin = '{$_POST['cf_faq_skin']}',
cf_read_point = '{$_POST['cf_read_point']}',
cf_write_point = '{$_POST['cf_write_point']}',
cf_comment_point = '{$_POST['cf_comment_point']}',
@ -107,6 +108,7 @@ $sql = " update {$g5['config_table']}
cf_mobile_new_skin = '{$_POST['cf_mobile_new_skin']}',
cf_mobile_search_skin = '{$_POST['cf_mobile_search_skin']}',
cf_mobile_connect_skin = '{$_POST['cf_mobile_connect_skin']}',
cf_mobile_faq_skin = '{$_POST['cf_mobile_faq_skin']}',
cf_mobile_member_skin = '{$_POST['cf_mobile_member_skin']}',
cf_captcha_mp3 = '{$_POST['cf_captcha_mp3']}',
cf_editor = '{$_POST['cf_editor']}',

View File

@ -22,6 +22,13 @@ else
$html_title .= ' 입력';
}
// 모바일 상하단 내용 필드추가
if(!sql_query(" select fm_mobile_head_html from {$g5['faq_master_table']} limit 1 ", false)) {
sql_query(" ALTER TABLE `{$g5['faq_master_table']}`
ADD `fm_mobile_head_html` text NOT NULL AFTER `fm_tail_html`,
ADD `fm_mobile_tail_html` text NOT NULL AFTER `fm_mobile_head_html` ", true);
}
include_once (G5_ADMIN_PATH.'/admin.head.php');
?>
@ -37,6 +44,13 @@ include_once (G5_ADMIN_PATH.'/admin.head.php');
<col>
</colgroup>
<tbody>
<tr>
<th scope="row"><label for="fm_order">출력순서</label></th>
<td>
<?php echo help('숫자가 작을수록 FAQ 분류에서 먼저 출력됩니다.'); ?>
<input type="text" name="fm_order" value="<?php echo $fm['fm_order']; ?>" id="fm_order" class="frm_input" maxlength="10" size="10">
</td>
</tr>
<tr>
<th scope="row"><label for="fm_subject">제목</label></th>
<td>
@ -107,6 +121,18 @@ include_once (G5_ADMIN_PATH.'/admin.head.php');
<?php echo editor_html('fm_tail_html', $fm['fm_tail_html']); ?>
</td>
</tr>
<tr>
<th scope="row">모바일상단 내용</th>
<td>
<?php echo editor_html('fm_mobile_head_html', $fm['fm_mobile_head_html']); ?>
</td>
</tr>
<tr>
<th scope="row">모바일하단 내용</th>
<td>
<?php echo editor_html('fm_mobile_tail_html', $fm['fm_mobile_tail_html']); ?>
</td>
</tr>
</tbody>
</table>
</div>
@ -123,6 +149,8 @@ function frmfaqmasterform_check(f)
{
<?php echo get_editor_js('fm_head_html'); ?>
<?php echo get_editor_js('fm_tail_html'); ?>
<?php echo get_editor_js('fm_mobile_head_html'); ?>
<?php echo get_editor_js('fm_mobile_tail_html'); ?>
}
// document.frmfaqmasterform.fm_subject.focus();

View File

@ -18,7 +18,10 @@ if ($fm_timg_del) @unlink(G5_DATA_PATH."/faq/{$fm_id}_t");
$sql_common = " set fm_subject = '$fm_subject',
fm_head_html = '$fm_head_html',
fm_tail_html = '$fm_tail_html' ";
fm_tail_html = '$fm_tail_html',
fm_mobile_head_html = '$fm_mobile_head_html',
fm_mobile_tail_html = '$fm_mobile_tail_html',
fm_order = '$fm_order' ";
if ($w == "")
{

View File

@ -59,7 +59,7 @@ $total_page = ceil($total_count / $rows); // 전체 페이지 계산
if ($page == "") { $page = 1; } // 페이지가 없으면 첫 페이지 (1 페이지)
$from_record = ($page - 1) * $rows; // 시작 열을 구함
$sql = "select * $sql_common order by fm_id desc limit $from_record, {$config['cf_page_rows']} ";
$sql = "select * $sql_common order by fm_order, fm_id limit $from_record, {$config['cf_page_rows']} ";
$result = sql_query($sql);
?>
@ -88,6 +88,7 @@ $result = sql_query($sql);
<th scope="col">ID</th>
<th scope="col">제목</th>
<th scope="col">FAQ수</th>
<th scope="col">순서</th>
<th scope="col">관리</th>
</tr>
</thead>
@ -102,6 +103,7 @@ $result = sql_query($sql);
<td class="td_num"><?php echo $row['fm_id']; ?></td>
<td><a href="./faqlist.php?fm_id=<?php echo $row['fm_id']; ?>&amp;fm_subject=<?php echo $row['fm_subject']; ?>"><?php echo stripslashes($row['fm_subject']); ?></a></td>
<td class="td_num"><?php echo $cnt; ?></td>
<td class="td_num"><?php echo $row['fm_order']?></td>
<td class="td_mng">
<a href="<?php echo G5_BBS_URL; ?>/faq.php?fm_id=<?php echo $row['fm_id']; ?>"><span class="sound_only"><?php echo stripslashes($row['fm_subject']); ?> </span>보기</a>
<a href="./faqmasterform.php?w=u&amp;fm_id=<?php echo $row['fm_id']; ?>"><span class="sound_only"><?php echo stripslashes($row['fm_subject']); ?> </span>수정</a>