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

This commit is contained in:
chicpro
2013-01-10 09:09:42 +09:00
40 changed files with 541 additions and 544 deletions

View File

@ -8,8 +8,8 @@ $menu['menu100'] = array (
array('100500', 'phpinfo()', ''.$g4['admin_path'].'/phpinfo.php', 'cf_phpinfo'),
//array('100600', '업그레이드', ''.$g4['admin_path'].'/upgrade.php', 'cf_upgrade'),
//array('100700', '복구/최적화', ''.$g4['admin_path'].'/repair.php', 'cf_repair'),
//array('100800', '세션 삭제', ''.$g4['admin_path'].'/session_delete.php', 'cf_delete'),
array('100900','캐쉬삭제','#', 'cf_cache'),
array('', 'phpMyAdmin', ''.$g4['path'].'/'.$g4['phpmyadmin_dir'].'', 'cf_phpmyadmin')
array('100800', '세션파일 일괄삭제', ''.$g4['admin_path'].'/session_delete.php', 'cf_delete'),
array('100900','캐쉬파일 일괄삭제','#', 'cf_cache'),
//array('', 'phpMyAdmin', ''.$g4['path'].'/'.$g4['phpmyadmin_dir'].'', 'cf_phpmyadmin')
);
?>

View File

@ -1,12 +1,10 @@
<?
$sub_menu = "300100";
//define('_EDITOR_', true);
include_once('./_common.php');
include_once ($g4['path'].'/lib/cheditor4.lib.php');
auth_check($auth[$sub_menu], 'w');
$token = get_token();
function b_draw($pos, $color='red') {
return "border-{$pos}-width:1px; border-{$pos}-color:{$color}; border-{$pos}-style:solid; ";
}
@ -17,24 +15,19 @@ if (!$row['cnt'])
alert('게시판그룹이 한개 이상 생성되어야 합니다.', './boardgroup_form.php');
$html_title = '게시판';
if ($w == '') {
$html_title .= ' 생성';
$bo_table_attr = 'class="required alnum_"';
$board['bo_count_delete'] = 1;
$board['bo_count_modify'] = 1;
<<<<<<< HEAD
$board['bo_read_point'] = $config[cf_read_point];
$board['bo_write_point'] = $config[cf_write_point];
$board['bo_comment_point'] = $config[cf_comment_point];
$board['bo_download_point'] = $config[cf_download_point];
=======
$board['bo_read_point'] = $config['cf_read_point'];
$board['bo_write_point'] = $config['cf_write_point'];
$board['bo_comment_point'] = $config['cf_comment_point'];
$board['bo_download_point'] = $config['cf_download_point'];
>>>>>>> 2b5c471bdb62542fc9cb8b6740a934c34e5de04b
$board['bo_gallery_cols'] = 4;
$board['bo_table_width'] = 97;
@ -49,9 +42,10 @@ if ($w == '') {
$board['bo_use_search'] = 1;
$board['bo_skin'] = 'basic';
$board['gr_id'] = $gr_id;
$board['bo_disable_tags'] = 'script|iframe';
$board['bo_use_secret'] = 0;
} else if ($w == 'u') {
$html_title .= ' 수정';
if (!$board['bo_table'])
@ -63,6 +57,7 @@ if ($w == '') {
}
$bo_table_attr = 'readonly';
}
if ($is_admin != 'super') {
@ -74,10 +69,6 @@ $g4['title'] = $html_title;
include_once ('./admin.head.php');
?>
<script src="<?=$g4['cheditor4_path']?>/cheditor.js"></script>
<?=cheditor1('bo_content_head', '100%', '200');?>
<?=cheditor1('bo_content_tail', '100%', '200');?>
<ul class="frm_list">
<li><a href="#frm_basic">기본 설정</a></li>
<li><a href="#frm_auth">권한 설정</a></li>
@ -94,7 +85,6 @@ include_once ('./admin.head.php');
<input type="hidden" name="sst" value="<?=$sst?>">
<input type="hidden" name="sod" value="<?=$sod?>">
<input type="hidden" name="page" value="<?=$page?>">
<input type="hidden" name="token" value="<?=$token?>">
<table id="frm_basic" class="frm_tbl">
<caption>게시판 기본 설정</caption>
@ -545,26 +535,6 @@ if (!preg_match("/([m|M])$/", $upload_max_filesize)) {
<label for="chk_skin">동일그룹 모두 적용</label>
</td>
</tr>
<tr>
<th scope="row"><label for="bo_image_head">상단 이미지</label></th>
<td colspan="2">
<input type="file" id="bo_image_head" name="bo_image_head">
<?
if ($board['bo_image_head'])
echo '<div><a href="'.$g4['path'].'/data/file/'.$board['bo_table'].'/'.$board['bo_image_head'].'" target="_blank">'.$board['bo_image_head'].'</a> <input type="checkbox" id="bo_image_head_del" name="bo_image_head_del" value="'.$board['bo_image_head'].'"> <label for="bo_image_head_del">삭제</label></div>';
?>
</td>
</tr>
<tr>
<th scope="row"><label for="bo_image_tail">하단 이미지</label></th>
<td colspan="2">
<input type="file" id="bo_image_tail" name="bo_image_tail">
<?
if ($board['bo_image_tail'])
echo '<div><a href="'.$g4['path'].'/data/file/'.$board['bo_table'].'/'.$board['bo_image_tail'].'" target="_blank">'.$board['bo_image_tail'].'</a> <input type="checkbox" id="bo_image_tail_del" name="bo_image_tail_del" value="'.$board['bo_image_tail'].'"> 삭제</div>';
?>
</td>
</tr>
<tr>
<th scope="row"><label for="bo_include_head">상단 파일 경로</label></th>
<td>
@ -588,7 +558,7 @@ if (!preg_match("/([m|M])$/", $upload_max_filesize)) {
<tr>
<th scope="row"><label for="tx_bo_content_head">상단 내용</label></th>
<td>
<?=cheditor2('bo_content_head', $board['bo_content_head']);?>
<?=editor_textarea("bo_content_head", $board['bo_content_head']);?>
</td>
<td class="group_setting">
<input type="checkbox" id="chk_content_head" name="chk_content_head" value="1">
@ -598,7 +568,7 @@ if (!preg_match("/([m|M])$/", $upload_max_filesize)) {
<tr>
<th scope="row"><label for="tx_bo_content_tail">하단 내용</label></th>
<td>
<?=cheditor2('bo_content_tail', $board['bo_content_tail']);?>
<?=editor_textarea("bo_content_tail", $board['bo_content_tail']);?>
</td>
<td class="group_setting">
<input type="checkbox" id="chk_content_tail" name="chk_content_tail" value="1">
@ -739,15 +709,6 @@ if (!preg_match("/([m|M])$/", $upload_max_filesize)) {
</tbody>
</table>
<?/* 이것은 무엇일까?????????????????????? ?>
<tr>
<td><input type="checkbox" id="chk_disable_tags" name="chk_disable_tags" value="1"></td>
<td>사용금지 태그</td>
<td><input type="text" id="bo_disable_tags" name="bo_disable_tags" value="<?=get_text($board['bo_disable_tags'])?>">
<?=help('태그와 태그 사이는 | 로 구분하세요. (예: <b>script</b>|<b>iframe</b>) HTML 사용시 금지할 태그를 입력하는곳 입니다.')?></td>
</tr>
<?*/?>
<table id="frm_point" class="frm_tbl">
<caption>게시판 포인트 설정</caption>
<tbody>
@ -856,27 +817,10 @@ function set_point(f) {
}
}
function fboardform_submit(f) {
var tmp_title;
var tmp_image;
tmp_title = "상단";
tmp_image = f.bo_image_head;
if (tmp_image.value) {
if (!tmp_image.value.toLowerCase().match(/.(gif|jpg|png)$/i)) {
alert(tmp_title + "이미지가 gif, jpg, png 파일이 아닙니다.");
return false;
}
}
tmp_title = "하단";
tmp_image = f.bo_image_tail;
if (tmp_image.value) {
if (!tmp_image.value.toLowerCase().match(/.(gif|jpg|png)$/i)) {
alert(tmp_title + "이미지가 gif, jpg, png 파일이 아닙니다.");
return false;
}
}
function fboardform_submit(f)
{
<?=editor_getdata("bo_content_head");?>
<?=editor_getdata("bo_content_tail");?>
if (parseInt(f.bo_count_modify.value) < 1) {
alert("원글 수정 불가 댓글수는 1 이상 입력하셔야 합니다.");
@ -890,9 +834,6 @@ function fboardform_submit(f) {
return false;
}
<?=cheditor3('bo_content_head')."\n";?>
<?=cheditor3('bo_content_tail')."\n";?>
f.action = './board_form_update.php';
return true;
}

View File

@ -16,32 +16,18 @@ if (!$bo_table) { alert('게시판 TABLE명은 반드시 입력하세요.'); }
if (!preg_match("/^([A-Za-z0-9_]{1,20})$/", $bo_table)) { alert('게시판 TABLE명은 공백없이 영문자, 숫자, _ 만 사용 가능합니다. (20자 이내)'); }
if (!$_POST['bo_subject']) { alert('게시판 제목을 입력하세요.'); }
if ($img = $_FILES['bo_image_head']['name']) {
if (!preg_match("/\.(gif|jpg|png)$/i", $img)) {
alert('상단 이미지가 gif, jpg, png 파일이 아닙니다.');
}
}
if ($img = $_FILES['bo_image_tail']['name']) {
if (!preg_match("/\.(gif|jpg|png)$/i", $img)) {
alert('하단 이미지가 gif, jpg, png 파일이 아닙니다.');
}
}
if ($file = $_POST['bo_include_head']) {
if (!preg_match("/\.(php|htm[l]?)$/i", $file)) {
if (!preg_match("/\.(php|htm['l']?)$/i", $file)) {
alert('상단 파일 경로가 php, html 파일이 아닙니다.');
}
}
if ($file = $_POST['bo_include_tail']) {
if (!preg_match("/\.(php|htm[l]?)$/i", $file)) {
if (!preg_match("/\.(php|htm['l']?)$/i", $file)) {
alert('하단 파일 경로가 php, html 파일이 아닙니다.');
}
}
check_token();
$board_path = $g4['path'].'/data/file/'.$bo_table;
// 게시판 디렉토리 생성
@ -61,106 +47,86 @@ $dst_char = array('', '〓');
$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_admin = '{$_POST['bo_admin']}',
bo_list_level = '{$_POST[bo_list_level]}',
bo_read_level = '{$_POST[bo_read_level]}',
bo_write_level = '{$_POST[bo_write_level]}',
bo_reply_level = '{$_POST[bo_reply_level]}',
bo_comment_level = '{$_POST[bo_comment_level]}',
bo_html_level = '{$_POST[bo_html_level]}',
bo_link_level = '{$_POST[bo_link_level]}',
bo_count_modify = '{$_POST[bo_count_modify]}',
bo_count_delete = '{$_POST[bo_count_delete]}',
bo_upload_level = '{$_POST[bo_upload_level]}',
bo_download_level = '{$_POST[bo_download_level]}',
bo_read_point = '{$_POST[bo_read_point]}',
bo_write_point = '{$_POST[bo_write_point]}',
bo_comment_point = '{$_POST[bo_comment_point]}',
bo_download_point = '{$_POST[bo_download_point]}',
bo_use_category = '{$_POST[bo_use_category]}',
bo_category_list = '{$_POST['bo_category_list']}',
bo_disable_tags = '{$_POST['bo_disable_tags']}',
bo_use_sideview = '{$_POST[bo_use_sideview]}',
bo_use_file_content = '{$_POST[bo_use_file_content]}',
bo_use_secret = '{$_POST[bo_use_secret]}',
bo_use_dhtml_editor = '{$_POST[bo_use_dhtml_editor]}',
bo_use_rss_view = '{$_POST[bo_use_rss_view]}',
bo_use_good = '{$_POST[bo_use_good]}',
bo_use_nogood = '{$_POST[bo_use_nogood]}',
bo_use_name = '{$_POST[bo_use_name]}',
bo_use_signature = '{$_POST[bo_use_signature]}',
bo_use_ip_view = '{$_POST[bo_use_ip_view]}',
bo_use_list_view = '{$_POST[bo_use_list_view]}',
bo_use_list_content = '{$_POST[bo_use_list_content]}',
bo_use_email = '{$_POST[bo_use_email]}',
bo_table_width = '{$_POST[bo_table_width]}',
bo_subject_len = '{$_POST[bo_subject_len]}',
bo_page_rows = '{$_POST[bo_page_rows]}',
bo_new = '{$_POST[bo_new]}',
bo_hot = '{$_POST[bo_hot]}',
bo_image_width = '{$_POST[bo_image_width]}',
bo_skin = '{$_POST['bo_skin']}',
bo_include_head = '{$_POST['bo_include_head']}',
bo_include_tail = '{$_POST['bo_include_tail']}',
bo_content_head = '{$_POST['bo_content_head']}',
bo_content_tail = '{$_POST['bo_content_tail']}',
bo_insert_content = '{$_POST['bo_insert_content']}',
bo_gallery_cols = '{$_POST[bo_gallery_cols]}',
bo_upload_count = '{$_POST[bo_upload_count]}',
bo_upload_size = '{$_POST[bo_upload_size]}',
bo_reply_order = '{$_POST[bo_reply_order]}',
bo_use_search = '{$_POST[bo_use_search]}',
bo_order_search = '{$_POST[bo_order_search]}',
bo_write_min = '{$_POST[bo_write_min]}',
bo_write_max = '{$_POST[bo_write_max]}',
bo_comment_min = '{$_POST[bo_comment_min]}',
bo_comment_max = '{$_POST[bo_comment_max]}',
bo_sort_field = '{$_POST['bo_sort_field']}',
bo_1_subj = '{$_POST['bo_1_subj']}',
bo_2_subj = '{$_POST['bo_2_subj']}',
bo_3_subj = '{$_POST['bo_3_subj']}',
bo_4_subj = '{$_POST['bo_4_subj']}',
bo_5_subj = '{$_POST['bo_5_subj']}',
bo_6_subj = '{$_POST['bo_6_subj']}',
bo_7_subj = '{$_POST['bo_7_subj']}',
bo_8_subj = '{$_POST['bo_8_subj']}',
bo_9_subj = '{$_POST['bo_9_subj']}',
bo_10_subj = '{$_POST['bo_10_subj']}',
bo_1 = '{$_POST['bo_1']}',
bo_2 = '{$_POST['bo_2']}',
bo_3 = '{$_POST['bo_3']}',
bo_4 = '{$_POST['bo_4']}',
bo_5 = '{$_POST['bo_5']}',
bo_6 = '{$_POST['bo_6']}',
bo_7 = '{$_POST['bo_7']}',
bo_8 = '{$_POST['bo_8']}',
bo_9 = '{$_POST['bo_9']}',
bo_10 = '{$_POST['bo_10']}' ";
bo_subject = '{$_POST['bo_subject']}',
bo_admin = '{$_POST['bo_admin']}',
bo_list_level = '{$_POST['bo_list_level']}',
bo_read_level = '{$_POST['bo_read_level']}',
bo_write_level = '{$_POST['bo_write_level']}',
bo_reply_level = '{$_POST['bo_reply_level']}',
bo_comment_level = '{$_POST['bo_comment_level']}',
bo_html_level = '{$_POST['bo_html_level']}',
bo_link_level = '{$_POST['bo_link_level']}',
bo_count_modify = '{$_POST['bo_count_modify']}',
bo_count_delete = '{$_POST['bo_count_delete']}',
bo_upload_level = '{$_POST['bo_upload_level']}',
bo_download_level = '{$_POST['bo_download_level']}',
bo_read_point = '{$_POST['bo_read_point']}',
bo_write_point = '{$_POST['bo_write_point']}',
bo_comment_point = '{$_POST['bo_comment_point']}',
bo_download_point = '{$_POST['bo_download_point']}',
bo_use_category = '{$_POST['bo_use_category']}',
bo_category_list = '{$_POST['bo_category_list']}',
bo_use_sideview = '{$_POST['bo_use_sideview']}',
bo_use_file_content = '{$_POST['bo_use_file_content']}',
bo_use_secret = '{$_POST['bo_use_secret']}',
bo_use_dhtml_editor = '{$_POST['bo_use_dhtml_editor']}',
bo_use_rss_view = '{$_POST['bo_use_rss_view']}',
bo_use_good = '{$_POST['bo_use_good']}',
bo_use_nogood = '{$_POST['bo_use_nogood']}',
bo_use_name = '{$_POST['bo_use_name']}',
bo_use_signature = '{$_POST['bo_use_signature']}',
bo_use_ip_view = '{$_POST['bo_use_ip_view']}',
bo_use_list_view = '{$_POST['bo_use_list_view']}',
bo_use_list_content = '{$_POST['bo_use_list_content']}',
bo_table_width = '{$_POST['bo_table_width']}',
bo_subject_len = '{$_POST['bo_subject_len']}',
bo_page_rows = '{$_POST['bo_page_rows']}',
bo_new = '{$_POST['bo_new']}',
bo_hot = '{$_POST['bo_hot']}',
bo_image_width = '{$_POST['bo_image_width']}',
bo_skin = '{$_POST['bo_skin']}',
bo_include_head = '{$_POST['bo_include_head']}',
bo_include_tail = '{$_POST['bo_include_tail']}',
bo_content_head = '{$_POST['bo_content_head']}',
bo_content_tail = '{$_POST['bo_content_tail']}',
bo_insert_content = '{$_POST['bo_insert_content']}',
bo_gallery_cols = '{$_POST['bo_gallery_cols']}',
bo_upload_count = '{$_POST['bo_upload_count']}',
bo_upload_size = '{$_POST['bo_upload_size']}',
bo_reply_order = '{$_POST['bo_reply_order']}',
bo_use_search = '{$_POST['bo_use_search']}',
bo_order_search = '{$_POST['bo_order_search']}',
bo_write_min = '{$_POST['bo_write_min']}',
bo_write_max = '{$_POST['bo_write_max']}',
bo_comment_min = '{$_POST['bo_comment_min']}',
bo_comment_max = '{$_POST['bo_comment_max']}',
bo_sort_field = '{$_POST['bo_sort_field']}',
bo_1_subj = '{$_POST['bo_1_subj']}',
bo_2_subj = '{$_POST['bo_2_subj']}',
bo_3_subj = '{$_POST['bo_3_subj']}',
bo_4_subj = '{$_POST['bo_4_subj']}',
bo_5_subj = '{$_POST['bo_5_subj']}',
bo_6_subj = '{$_POST['bo_6_subj']}',
bo_7_subj = '{$_POST['bo_7_subj']}',
bo_8_subj = '{$_POST['bo_8_subj']}',
bo_9_subj = '{$_POST['bo_9_subj']}',
bo_10_subj = '{$_POST['bo_10_subj']}',
bo_1 = '{$_POST['bo_1']}',
bo_2 = '{$_POST['bo_2']}',
bo_3 = '{$_POST['bo_3']}',
bo_4 = '{$_POST['bo_4']}',
bo_5 = '{$_POST['bo_5']}',
bo_6 = '{$_POST['bo_6']}',
bo_7 = '{$_POST['bo_7']}',
bo_8 = '{$_POST['bo_8']}',
bo_9 = '{$_POST['bo_9']}',
bo_10 = '{$_POST['bo_10']}' ";
if ($bo_image_head_del) {
@unlink($board_path.'/'.$bo_image_head_del);
$sql_common .= " , bo_image_head = '' ";
}
if ($bo_image_tail_del) {
@unlink($board_path.'/'.$bo_image_tail_del);
$sql_common .= " , bo_image_tail = '' ";
}
if ($_FILES['bo_image_head']['name']) {
//$bo_image_head_urlencode = urlencode($_FILES['bo_image_head']['name']);
$bo_image_head_urlencode = $bo_table.'_head_'.time();
$sql_common .= " , bo_image_head = '{$bo_image_head_urlencode}' ";
}
if ($_FILES['bo_image_tail']['name']) {
//$bo_image_tail_urlencode = urlencode($_FILES['bo_image_tail']['name']);
$bo_image_tail_urlencode = $bo_table.'_tail_'.time();
$sql_common .= " , bo_image_tail = '{$bo_image_tail_urlencode}' ";
}
if (isset($_POST['bo_use_email']))
$sql_common .= ", bo_use_email = '{$_POST['bo_use_email']}'";
if ($w == '') {
$row = sql_fetch(" select count(*) as cnt from {$g4['board_table']} where bo_table = '{$bo_table}' ");
if ($row['cnt'])
alert($bo_table.' 은(는) 이미 존재하는 TABLE 입니다.');
@ -183,7 +149,9 @@ if ($w == '') {
$target = array($create_table, '');
$sql = preg_replace($source, $target, $sql);
sql_query($sql, FALSE);
} else if ($w == 'u') {
// 게시판의 글 수
$sql = " select count(*) as cnt from {$g4['write_prefix']}{$bo_table} where wr_is_comment = 0 ";
$row = sql_fetch($sql);
@ -195,7 +163,7 @@ if ($w == '') {
$bo_count_comment = $row['cnt'];
// 글수 조정
if ($proc_count) {
if (isset($_POST['proc_count'])) {
// 원글을 얻습니다.
$sql = " select wr_id from {$g4['write_prefix']}{$bo_table} where wr_is_comment = 0 ";
$result = sql_query($sql);
@ -231,79 +199,79 @@ if ($w == '') {
{$sql_common}
where bo_table = '{$bo_table}' ";
sql_query($sql);
}
// 같은 그룹내 게시판 동일 옵션 적용
$s = "";
if ($chk_admin) $s .= " , bo_admin = '{$bo_admin}' ";
if ($chk_list_level) $s .= " , bo_list_level = '{$bo_list_level}' ";
if ($chk_read_level) $s .= " , bo_read_level = '{$bo_read_level}' ";
if ($chk_write_level) $s .= " , bo_write_level = '{$bo_write_level}' ";
if ($chk_reply_level) $s .= " , bo_reply_level = '{$bo_reply_level}' ";
if ($chk_comment_level) $s .= " , bo_comment_level = '{$bo_comment_level}' ";
if ($chk_link_level) $s .= " , bo_link_level = '{$bo_link_level}' ";
if ($chk_upload_level) $s .= " , bo_upload_level = '{$bo_upload_level}' ";
if ($chk_download_level) $s .= " , bo_download_level = '{$bo_download_level}' ";
if ($chk_html_level) $s .= " , bo_html_level = '{$bo_html_level}' ";
if ($chk_count_modify) $s .= " , bo_count_modify = '{$bo_count_modify}' ";
if ($chk_count_delete) $s .= " , bo_count_delete = '{$bo_count_delete}' ";
if ($chk_read_point) $s .= " , bo_read_point = '{$bo_read_point}' ";
if ($chk_write_point) $s .= " , bo_write_point = '{$bo_write_point}' ";
if ($chk_comment_point) $s .= " , bo_comment_point = '{$bo_comment_point}' ";
if ($chk_download_point) $s .= " , bo_download_point = '{$bo_download_point}' ";
if ($chk_category_list) {
$s .= " , bo_category_list = '{$bo_category_list}' ";
$s .= " , bo_use_category = '{$bo_use_category}' ";
$fields = "";
if (is_checked('chk_admin')) $fields .= " , bo_admin = '{$bo_admin}' ";
if (is_checked('chk_list_level')) $fields .= " , bo_list_level = '{$bo_list_level}' ";
if (is_checked('chk_read_level')) $fields .= " , bo_read_level = '{$bo_read_level}' ";
if (is_checked('chk_write_level')) $fields .= " , bo_write_level = '{$bo_write_level}' ";
if (is_checked('chk_reply_level')) $fields .= " , bo_reply_level = '{$bo_reply_level}' ";
if (is_checked('chk_comment_level')) $fields .= " , bo_comment_level = '{$bo_comment_level}' ";
if (is_checked('chk_link_level')) $fields .= " , bo_link_level = '{$bo_link_level}' ";
if (is_checked('chk_upload_level')) $fields .= " , bo_upload_level = '{$bo_upload_level}' ";
if (is_checked('chk_download_level')) $fields .= " , bo_download_level = '{$bo_download_level}' ";
if (is_checked('chk_html_level')) $fields .= " , bo_html_level = '{$bo_html_level}' ";
if (is_checked('chk_count_modify')) $fields .= " , bo_count_modify = '{$bo_count_modify}' ";
if (is_checked('chk_count_delete')) $fields .= " , bo_count_delete = '{$bo_count_delete}' ";
if (is_checked('chk_read_point')) $fields .= " , bo_read_point = '{$bo_read_point}' ";
if (is_checked('chk_write_point')) $fields .= " , bo_write_point = '{$bo_write_point}' ";
if (is_checked('chk_comment_point')) $fields .= " , bo_comment_point = '{$bo_comment_point}' ";
if (is_checked('chk_download_point')) $fields .= " , bo_download_point = '{$bo_download_point}' ";
if (is_checked('chk_category_list')) {
$fields .= " , bo_category_list = '{$bo_category_list}' ";
$fields .= " , bo_use_category = '{$bo_use_category}' ";
}
if ($chk_use_sideview) $s .= " , bo_use_sideview = '{$bo_use_sideview}' ";
if ($chk_use_file_content) $s .= " , bo_use_file_content = '{$bo_use_file_content}' ";
if ($chk_use_secret) $s .= " , bo_use_secret = '{$bo_use_secret}' ";
if ($chk_use_dhtml_editor) $s .= " , bo_use_dhtml_editor = '{$bo_use_dhtml_editor}' ";
if ($chk_use_rss_view) $s .= " , bo_use_rss_view = '{$bo_use_rss_view}' ";
if ($chk_use_good) $s .= " , bo_use_good = '{$bo_use_good}' ";
if ($chk_use_nogood) $s .= " , bo_use_nogood = '{$bo_use_nogood}' ";
if ($chk_use_name) $s .= " , bo_use_name = '{$bo_use_name}' ";
if ($chk_use_signature) $s .= " , bo_use_signature = '{$bo_use_signature}' ";
if ($chk_use_ip_view) $s .= " , bo_use_ip_view = '{$bo_use_ip_view}' ";
if ($chk_use_list_view) $s .= " , bo_use_list_view = '{$bo_use_list_view}' ";
if ($chk_use_list_content) $s .= " , bo_use_list_content = '{$bo_use_list_content}' ";
if ($chk_use_email) $s .= " , bo_use_email = '{$bo_use_email}' ";
if ($chk_skin) $s .= " , bo_skin = '{$bo_skin}' ";
if ($chk_gallery_cols) $s .= " , bo_gallery_cols = '{$bo_gallery_cols}' ";
if ($chk_table_width) $s .= " , bo_table_width = '{$bo_table_width}' ";
if ($chk_page_rows) $s .= " , bo_page_rows = '{$bo_page_rows}' ";
if ($chk_subject_len) $s .= " , bo_subject_len = '{$bo_subject_len}' ";
if ($chk_new) $s .= " , bo_new = '{$bo_new}' ";
if ($chk_hot) $s .= " , bo_hot = '{$bo_hot}' ";
if ($chk_image_width) $s .= " , bo_image_width = '{$bo_image_width}' ";
if ($chk_reply_order) $s .= " , bo_reply_order = '{$bo_reply_order}' ";
if ($chk_disable_tags) $s .= " , bo_disable_tags = '{$bo_disable_tags}' ";
if ($chk_sort_field) $s .= " , bo_sort_field = '{$bo_sort_field}' ";
if ($chk_write_min) $s .= " , bo_write_min = '{$bo_write_min}' ";
if ($chk_write_max) $s .= " , bo_write_max = '{$bo_write_max}' ";
if ($chk_comment_min) $s .= " , bo_comment_min = '{$bo_comment_min}' ";
if ($chk_comment_max) $s .= " , bo_comment_max = '{$bo_comment_max}' ";
if ($chk_upload_count) $s .= " , bo_upload_count = '{$bo_upload_count}' ";
if ($chk_upload_size) $s .= " , bo_upload_size = '{$bo_upload_size}' ";
if ($chk_include_head) $s .= " , bo_include_head = '{$bo_include_head}' ";
if ($chk_include_tail) $s .= " , bo_include_tail = '{$bo_include_tail}' ";
if ($chk_content_head) $s .= " , bo_content_head = '{$bo_content_head}' ";
if ($chk_content_tail) $s .= " , bo_content_tail = '{$bo_content_tail}' ";
if ($chk_insert_content) $s .= " , bo_insert_content = '{$bo_insert_content}' ";
if ($chk_use_search) $s .= " , bo_use_search = '{$bo_use_search}' ";
if ($chk_order_search) $s .= " , bo_order_search = '{$bo_order_search}' ";
if (is_checked('chk_use_sideview')) $fields .= " , bo_use_sideview = '{$bo_use_sideview}' ";
if (is_checked('chk_use_file_content')) $fields .= " , bo_use_file_content = '{$bo_use_file_content}' ";
if (is_checked('chk_use_secret')) $fields .= " , bo_use_secret = '{$bo_use_secret}' ";
if (is_checked('chk_use_dhtml_editor')) $fields .= " , bo_use_dhtml_editor = '{$bo_use_dhtml_editor}' ";
if (is_checked('chk_use_rss_view')) $fields .= " , bo_use_rss_view = '{$bo_use_rss_view}' ";
if (is_checked('chk_use_good')) $fields .= " , bo_use_good = '{$bo_use_good}' ";
if (is_checked('chk_use_nogood')) $fields .= " , bo_use_nogood = '{$bo_use_nogood}' ";
if (is_checked('chk_use_name')) $fields .= " , bo_use_name = '{$bo_use_name}' ";
if (is_checked('chk_use_signature')) $fields .= " , bo_use_signature = '{$bo_use_signature}' ";
if (is_checked('chk_use_ip_view')) $fields .= " , bo_use_ip_view = '{$bo_use_ip_view}' ";
if (is_checked('chk_use_list_view')) $fields .= " , bo_use_list_view = '{$bo_use_list_view}' ";
if (is_checked('chk_use_list_content')) $fields .= " , bo_use_list_content = '{$bo_use_list_content}' ";
if (is_checked('chk_use_email')) $fields .= " , bo_use_email = '{$bo_use_email}' ";
if (is_checked('chk_skin')) $fields .= " , bo_skin = '{$bo_skin}' ";
if (is_checked('chk_gallery_cols')) $fields .= " , bo_gallery_cols = '{$bo_gallery_cols}' ";
if (is_checked('chk_table_width')) $fields .= " , bo_table_width = '{$bo_table_width}' ";
if (is_checked('chk_page_rows')) $fields .= " , bo_page_rows = '{$bo_page_rows}' ";
if (is_checked('chk_subject_len')) $fields .= " , bo_subject_len = '{$bo_subject_len}' ";
if (is_checked('chk_new')) $fields .= " , bo_new = '{$bo_new}' ";
if (is_checked('chk_hot')) $fields .= " , bo_hot = '{$bo_hot}' ";
if (is_checked('chk_image_width')) $fields .= " , bo_image_width = '{$bo_image_width}' ";
if (is_checked('chk_reply_order')) $fields .= " , bo_reply_order = '{$bo_reply_order}' ";
if (is_checked('chk_sort_field')) $fields .= " , bo_sort_field = '{$bo_sort_field}' ";
if (is_checked('chk_write_min')) $fields .= " , bo_write_min = '{$bo_write_min}' ";
if (is_checked('chk_write_max')) $fields .= " , bo_write_max = '{$bo_write_max}' ";
if (is_checked('chk_comment_min')) $fields .= " , bo_comment_min = '{$bo_comment_min}' ";
if (is_checked('chk_comment_max')) $fields .= " , bo_comment_max = '{$bo_comment_max}' ";
if (is_checked('chk_upload_count')) $fields .= " , bo_upload_count = '{$bo_upload_count}' ";
if (is_checked('chk_upload_size')) $fields .= " , bo_upload_size = '{$bo_upload_size}' ";
if (is_checked('chk_include_head')) $fields .= " , bo_include_head = '{$bo_include_head}' ";
if (is_checked('chk_include_tail')) $fields .= " , bo_include_tail = '{$bo_include_tail}' ";
if (is_checked('chk_content_head')) $fields .= " , bo_content_head = '{$bo_content_head}' ";
if (is_checked('chk_content_tail')) $fields .= " , bo_content_tail = '{$bo_content_tail}' ";
if (is_checked('chk_insert_content')) $fields .= " , bo_insert_content = '{$bo_insert_content}' ";
if (is_checked('chk_use_search')) $fields .= " , bo_use_search = '{$bo_use_search}' ";
if (is_checked('chk_order_search')) $fields .= " , bo_order_search = '{$bo_order_search}' ";
for ($i=1; $i<=10; $i++) {
if ($_POST['chk_'.$i]) {
$s .= " , bo_{$i}_subj = '".$_POST['bo_'.$i.'_subj']."' ";
$s .= " , bo_{$i} = '".$_POST['bo_'.$i]."' ";
if (is_checked('chk_'.$i)) {
$fields .= " , bo_{$i}_subj = '".$_POST['bo_'.$i.'_subj']."' ";
$fields .= " , bo_{$i} = '".$_POST['bo_'.$i]."' ";
}
}
if ($s) {
if ($fields) {
$sql = " update {$g4['board_table']}
set bo_table = bo_table
{$s}
{$fields}
where gr_id = '$gr_id' ";
sql_query($sql);
}

View File

@ -4,8 +4,6 @@ include_once('./_common.php');
auth_check($auth[$sub_menu], 'r');
$token = get_token();
// DHTML 에디터 사용 필드 추가 : 061021
sql_query(" ALTER TABLE `{$g4['board_table']}` ADD `bo_use_dhtml_editor` TINYINT NOT NULL AFTER `bo_use_secret` ", false);
// RSS 보이기 사용 필드 추가 : 061106
@ -19,7 +17,7 @@ if ($is_admin != "super") {
$sql_search .= " and (a.gr_id = b.gr_id and b.gr_admin = '{$member['mb_id']}') ";
}
if (isset($stx)) {
if ($stx) {
$sql_search .= " and ( ";
switch ($sfl) {
case "bo_table" :
@ -155,7 +153,7 @@ for ($i=0; $row=sql_fetch_array($result); $i++) {
</td>
<td>
<?if ($is_admin == 'super'){?>
<?=get_group_select('gr_id[$i]', $row['gr_id'])?>
<?=get_group_select("gr_id[$i]", $row['gr_id'])?>
<?}else{?>
<input type="hidden" name="gr_id[<?=$i?>]" value="<?=$row['gr_id']?>"><?=$row['gr_subject']?>
<?}?>

View File

@ -6,15 +6,12 @@ check_demo();
auth_check($auth[$sub_menu], 'w');
check_token();
for ($i=0; $i<count($_POST['chk']); $i++) {
for ($i=0; $i<count($chk); $i++)
{
// 실제 번호를 넘김
$k = $chk[$i];
$k = $_POST['chk'][$i];
if ($is_admin != 'super')
{
if ($is_admin != 'super') {
$sql = " select count(*) as cnt from {$g4['board_table']} a, {$g4['group_table']} b
where a.gr_id = '{$_POST['gr_id'][$k]}'
and a.gr_id = b.gr_id

View File

@ -4,8 +4,6 @@ include_once('./_common.php');
auth_check($auth[$sub_menu], 'w');
$token = get_token();
if ($is_admin != 'super' && $w == '') alert('최고관리자만 접근 가능합니다.');
$html_title = '게시판그룹';
@ -35,7 +33,6 @@ include_once('./admin.head.php');
<input type="hidden" name="sst" value="<?=$sst?>">
<input type="hidden" name="sod" value="<?=$sod?>">
<input type="hidden" name="page" value="<?=$page?>">
<input type="hidden" name="token" value="<?=$token?>">
<table class="frm_tbl">
<caption>그룹 설정</caption>
<tbody>

View File

@ -14,11 +14,8 @@ if (!preg_match("/^([A-Za-z0-9_]{1,10})$/", $gr_id))
if (!$gr_subject) alert('그룹 제목을 입력하세요.');
check_token();
$sql_common = " gr_subject = '{$_POST['gr_subject']}',
gr_admin = '{$_POST['gr_admin']}',
gr_use_access = '{$_POST['gr_use_access']}',
gr_admin = '{$_POST['gr_admin']}',
gr_1_subj = '{$_POST['gr_1_subj']}',
gr_2_subj = '{$_POST['gr_2_subj']}',
gr_3_subj = '{$_POST['gr_3_subj']}',
@ -39,9 +36,13 @@ $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']))
$sql_common .= ", gr_use_access = '{$_POST['gr_use_access']}' ";
else
$sql_common .= ", gr_use_access = '' ";
if ($w == '') {
if ($w == '')
{
$sql = " select count(*) as cnt from {$g4['group_table']} where gr_id = '{$_POST['gr_id']}' ";
$row = sql_fetch($sql);
if ($row['cnt'])
@ -51,16 +52,17 @@ if ($w == '')
set gr_id = '{$_POST['gr_id']}',
{$sql_common} ";
sql_query($sql);
}
else if ($w == "u")
{
} else if ($w == "u") {
$sql = " update {$g4['group_table']}
set {$sql_common}
where gr_id = '{$_POST['gr_id']}' ";
sql_query($sql);
}
else
} else {
alert('제대로 된 값이 넘어오지 않았습니다.');
}
goto_url('./boardgroup_form.php?w=u&amp;gr_id='.$gr_id.'&amp;'.$qstr);
?>

View File

@ -4,15 +4,13 @@ include_once('./_common.php');
auth_check($auth[$sub_menu], 'r');
$token = get_token();
$sql_common = " from {$g4['group_table']} ";
$sql_search = " where (1) ";
if ($is_admin != 'super')
$sql_search .= " and (gr_admin = '{$member['mb_id']}') ";
if (isset($stx)) {
if ($stx) {
$sql_search .= " and ( ";
switch ($sfl) {
case "gr_id" :
@ -95,7 +93,6 @@ var list_update_php = "./boardgroup_list_update.php";
<input type="hidden" name="sfl" value="<?=$sfl?>">
<input type="hidden" name="stx" value="<?=$stx?>">
<input type="hidden" name="page" value="<?=$page?>">
<input type="hidden" name="token" value="<?=$token?>">
<table class="tbl_gr_list">
<caption>
게시판그룹 목록
@ -131,7 +128,6 @@ for ($i=0; $row=sql_fetch_array($result); $i++)
$s_upd = '<a href="./boardgroup_form.php?$qstr&amp;w=u&amp;gr_id='.$row['gr_id'].'">수정</a>';
$s_del = '';
if ($is_admin == 'super') {
//$s_del = '<a href="javascript:del(\'./boardgroup_delete.php?$qstr&gr_id='.$row['gr_id'].'\');">삭제</a>';
$s_del = '<a href="javascript:post_delete(\'boardgroup_delete.php\', \''.$row['gr_id'].'\');">삭제</a>';
}
?>

View File

@ -6,17 +6,15 @@ check_demo();
auth_check($auth[$sub_menu], 'w');
check_token();
for ($i=0; $i<count($chk); $i++)
for ($i=0; $i<count($_POST['chk']); $i++)
{
// 실제 번호를 넘김
$k = $chk[$i];
$k = $_POST['chk'][$i];
$sql = " update {$g4['group_table']}
set gr_subject = '{$_POST['gr_subject'][$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]}' ";
if ($is_admin != 'super')
$sql .= " and gr_admin = '{$_POST['gr_admin'][$k]}' ";

View File

@ -401,7 +401,7 @@ include_once ('./admin.head.php');
<tr>
<th scope="row"><label for="cf_email_admin">관리자 메일주소</label></th>
<td>
<?=help('일괄발송 사용하는 이메일 주소입니다.')?>
<?=help('일괄 발송 또는 테스트 등에 사용하는 이메일 주소입니다.')?>
<input type="text" id="cf_email_admin" name="cf_email_admin" class="email" value="<?=$config['cf_email_admin']?>" required size="40" title="관리자 메일주소">
</td>
</tr>

View File

@ -66,15 +66,7 @@ for ($i=0; $i<count($member_list); $i++)
$content = $content . "<hr size=0><p><span style='font-size:9pt; font-familye:굴림'>▶ 더 이상 정보 수신을 원치 않으시면 [<a href='{$g4['url']}/{$g4['bbs']}/email_stop.php?mb_id={$mb_id}&amp;mb_md5={$mb_md5}' target='_blank'>수신거부</a>] 해 주십시오.</span></p>";
/*
ob_start();
include "$mail_skin/mail.skin.php";
$content = ob_get_contents();
ob_end_clean();
*/
//mailer($default['de_subject'], $default['de_admin_email'], $email, $subject, $content, 1);
mailer($config['cf_title'], $member['mb_email'], $email, $subject, $content, 1);
mailer($config['cf_title'], $config['cf_email_admin'], $email, $subject, $content, 1);
echo "<script> document.all.cont.innerHTML += '$cnt. $email ($mb_id : $name)<br>'; </script>\n";
//echo "+";

View File

@ -55,20 +55,6 @@ else if ($w == 'u')
else
alert('제대로 된 값이 넘어오지 않았습니다.');
<<<<<<< HEAD
if ($mb['mb_mailling'] == 1) $mailling_checked = 'checked="checked"'; //메일수신
else {
$mailing_checked = '';
$mailling_no_checked = 'checked="checked"';
}
if ($mb['mb_sms']) $sms_checked = 'checked="checked"'; // SMS 수신
else {
$sms_checked = '';
$sms_no_checked = 'checked="checked"';
}
if ($mb['mb_open']) $open_checked = 'checked="checked"'; // 정보 공개
else {
=======
$mailling_no_checked = '';
$sms_no_checked = '';
$open_no_checked = '';
@ -89,7 +75,6 @@ if ($mb['mb_sms']) {
if ($mb['mb_open']) {
$open_checked = 'checked="checked"'; // 정보 공개
} else {
>>>>>>> 2b5c471bdb62542fc9cb8b6740a934c34e5de04b
$open_checked = '';
$open_no_checked = 'checked="checked"';
}
@ -264,7 +249,7 @@ include_once('./admin.head.php');
<fieldset id="admin_confirm">
<legend>XSS 혹은 CSRF 방지</legend>
<p>관리자 권한을 탈취당하는 경우를 대비하여 패스워드를 다시 한번 확인합니다.</p>
<p>관리자 권한을 탈취 당하는 경우를 대비하여 관리자의 패스워드를 다시 한번 확인합니다.</p>
<label for="admin_password">관리자 패스워드</label>
<input type="password" id="admin_password" name="admin_password" class="required" title="관리자 패스워드">
</fieldset>

View File

@ -9,7 +9,7 @@ $token = get_token();
$sql_common = " from {$g4['member_table']} ";
$sql_search = " where (1) ";
if (isset($stx)) {
if ($stx) {
$sql_search .= " and ( ";
switch ($sfl) {
case 'mb_point' :
@ -32,7 +32,7 @@ if (isset($stx)) {
if ($is_admin != 'super')
$sql_search .= " and mb_level <= '{$member['mb_level']}' ";
if (!isset($sst)) {
if (!$sst) {
$sst = "mb_datetime";
$sod = "desc";
}
@ -48,7 +48,7 @@ $total_count = $row['cnt'];
$rows = $config['cf_page_rows'];
$total_page = ceil($total_count / $rows); // 전체 페이지 계산
if (!isset($page)) $page = 1; // 페이지가 없으면 첫 페이지 (1 페이지)
if (!$page) $page = 1; // 페이지가 없으면 첫 페이지 (1 페이지)
$from_record = ($page - 1) * $rows; // 시작 열을 구함
// 탈퇴회원수

View File

@ -9,7 +9,7 @@ $token = get_token();
$sql_common = " from {$g4['point_table']} ";
$sql_search = " where (1) ";
if (isset($stx)) {
if ($stx) {
$sql_search .= " and ( ";
switch ($sfl) {
case 'mb_id' :
@ -84,15 +84,9 @@ function point_clear()
<?=$listall?>
전체 <?=number_format($total_count)?> 건
<?
<<<<<<< HEAD
if ($mb['mb_id'])
echo '&nbsp;(' . $mb['mb_id'] .' 님 포인트 합계 : ' . number_format($mb['mb_point']) . '점)';
else {
=======
if (isset($mb['mb_id']) && $mb['mb_id']) {
echo '&nbsp;(' . $mb['mb_id'] .' 님 포인트 합계 : ' . number_format($mb['mb_point']) . '점)';
} else {
>>>>>>> 35e2a0e57216e9ff77b98266f30f5e8f87800654
$row2 = sql_fetch(" select sum(po_point) as sum_point from {$g4['point_table']} ");
echo '&nbsp;(전체 합계 '.number_format($row2['sum_point']).'점)';
}
@ -179,11 +173,7 @@ if ($i == 0)
</div>
<?
<<<<<<< HEAD
$pagelist = get_paging($config['cf_write_pages'], $page, $total_page, "$_SERVER['PHP_SELF']?$qstr&amp;page=");
=======
$pagelist = get_paging($config['cf_write_pages'], $page, $total_page, "{$_SERVER['PHP_SELF']}?$qstr&amp;page=");
>>>>>>> 35e2a0e57216e9ff77b98266f30f5e8f87800654
?>
<div class="pg">
<?=$pagelist?>

View File

@ -9,7 +9,7 @@ $token = get_token();
$sql_common = " from {$g4['poll_table']} ";
$sql_search = " where (1) ";
if (isset($stx)) {
if ($stx) {
$sql_search .= " and ( ";
switch ($sfl) {
default :
@ -44,6 +44,7 @@ $sql = " select *
limit {$from_record}, {$rows} ";
$result = sql_query($sql);
$listall = '';
if ($sfl || $stx) // 검색렬일 때만 처음 버튼을 보여줌
$listall = '<a href="'.$_SERVER['PHP_SELF'].'">전체목록</a>';
@ -115,8 +116,9 @@ if ($i==0)
</table>
<?
$pagelist = get_paging($config['cf_write_pages'], $page, $total_page, "$_SERVER['PHP_SELF']?$qstr&amp;page=");
if ($pagelist) {?>
$pagelist = get_paging($config['cf_write_pages'], $page, $total_page, "{$_SERVER['PHP_SELF']}?$qstr&amp;page=");
if ($pagelist) {
?>
<div class="pg">
<?=$pagelist?>
</div>

View File

@ -5,7 +5,7 @@ include_once('./_common.php');
auth_check($auth[$sub_menu], 'r');
// 체크된 자료 삭제
if (is_array($_POST['chk'])) {
if (isset($_POST['chk']) && is_array($_POST['chk'])) {
for ($i=0; $i<count($chk); $i++) {
// 실제 번호를 넘김
$k = $chk[$i];
@ -17,7 +17,7 @@ if (is_array($_POST['chk'])) {
$sql_common = " from {$g4['popular_table']} a ";
$sql_search = " where (1) ";
if (isset($stx)) {
if ($stx) {
$sql_search .= " and ( ";
switch ($sfl) {
case "pp_word" :
@ -138,7 +138,7 @@ if ($i == 0)
<?}?>
<?
$pagelist = get_paging($config['cf_write_pages'], $page, $total_page, "$_SERVER['PHP_SELF']?$qstr&amp;page=");
$pagelist = get_paging($config['cf_write_pages'], $page, $total_page, "{$_SERVER['PHP_SELF']}?$qstr&amp;page=");
?>
<div class="pg">
<?=$pagelist?>

View File

@ -34,7 +34,9 @@ $sql = " select pp_word, count(*) as cnt
limit {$from_record}, {$rows} ";
$result = sql_query($sql);
if ($_GET['fr_date'] || $_GET['to_date']) $listall = '<a href="'.$_SERVER['PHP_SELF'].'">전체목록</a>';
$listall = '';
if (!empty($_GET['fr_date']) || !empty($_GET['to_date']))
$listall = '<a href="'.$_SERVER['PHP_SELF'].'">전체목록</a>';
$g4['title'] = '인기검색어순위';
include_once('./admin.head.php');
@ -95,7 +97,7 @@ if ($i == 0)
</table>
<?
$pagelist = get_paging($config['cf_write_pages'], $page, $total_page, "$_SERVER['PHP_SELF']?$qstr&amp;page=");
$pagelist = get_paging($config['cf_write_pages'], $page, $total_page, "{$_SERVER['PHP_SELF']}?$qstr&amp;page=");
?>
<div class="pg">
<?=$pagelist?>

View File

@ -13,27 +13,27 @@ $g4['title'] = '메일 테스트';
include_once('./admin.head.php');
if (isset($_POST['mail'])) {
check_token();
$from_name = '메일검사';
$from_email = 'mail@mail';
$from_email = $config['cf_email_admin'];
$email = explode(',', $mail);
for ($i=0; $i<count($email); $i++)
mailer($from_name, $from_email, trim($email[$i]), '[메일검사] 제목', '<span style="font-size:9pt;">[메일검사] 내용<p>이 내용이 제대로 보인다면 보내는 메일 서버에는 이상이 없는것입니다.<p>'.date("Y-m-d H:i:s").'<p>이 메일 주소로는 회신되지 않습니다.</span>', 1);
?>
<script>
alert('<?=$mail?>(으)로 메일을 발송 하였습니다.\\n\\n해당 주소로 메일이 왔는지 확인하여 주십시오.\\n\\n메일이 오지 않는다면 프로그램의 오류가 아닌 메일 서버(sendmail)의 오류일 가능성이 있습니다.\\n\\n이런 경우에는 웹 서버관리자에게 문의하여 주십시오.');
</script>
<?
echo "<p>";
echo "결과메세지<br>";
echo "----------------------------------------------------------------------------------------<br>";
echo "다음의 메일 주소로 메일을 발송 하였습니다. ($mail)<br>";
echo "해당 주소로 메일이 왔는지 확인하여 주십시오.<br>";
echo "만약, 메일이 오지 않는다면 여러곳의 메일 주소로 메일을 보내 보십시오.<br>";
echo "그래도 메일이 하나도 도착하지 않는다면 메일 서버(sendmail server)의 오류일 가능성이 높습니다.<br>";
echo "이런 경우에는 웹 서버관리자에게 문의하여 주십시오.<br>";
echo "----------------------------------------------------------------------------------------";
echo "</p>";
}
$token = get_token();
?>
<form id="fsendmailtest" name="fsendmailtest" method="post">
<input type="hidden" id="token" name="token" value='<?=$token?>'>
<p>
<span></span>
고객님들께서 메일이 오지 않는다고 하면 사용하는 메뉴입니다.<br>

46
adm/session_delete.php Normal file
View File

@ -0,0 +1,46 @@
<?
$sub_menu = "100800";
include_once("./_common.php");
if ($is_admin != "super")
alert("최고관리자만 접근 가능합니다.", $g4[path]);
$g4['title'] = "세션파일 일괄삭제";
include_once("./admin.head.php");
echo "'완료' 메세지가 나오기 전에 프로그램의 실행을 중지하지 마십시오.<br><br>";
echo "<span id='ct'></span>";
include_once("./admin.tail.php");
flush();
$session_path = "$g4[path]/data/session"; // 세션이저장된 디렉토리
if (!$dir=@opendir($session_path)) {
echo "세션 디렉토리를 열지못했습니다.";
}
$cnt=0;
while($file=readdir($dir)) {
if (!strstr($file,'sess_')) {
continue;
}
if (strpos($file,'sess_')!=0) {
continue;
}
if (!$atime=@fileatime("$session_path/$file")) {
continue;
}
if (time() > $atime + (3600 * 6)) { // 지난시간을 초로 계산해서 적어주시면 됩니다. default : 6시간전
$cnt++;
$return = unlink("$session_path/$file");
echo "<script>document.getElementById('ct').innerHTML += '$session_path/$file<br/>';</script>\n";
flush();
if ($cnt%10==0)
echo "<script>document.getElementById('ct').innerHTML = '';</script>\n";
}
}
echo "<script>document.getElementById('ct').innerHTML += '<br><br>세션데이터 {$cnt}건 삭제 완료.<br><br>프로그램의 실행을 끝마치셔도 좋습니다.';</script>\n";
?>

View File

@ -10,9 +10,6 @@ include_once('./visit.sub.php');
$colspan = 5;
//unset($br); // 브라우저
//unset($os); // OS
$sql_common = " from {$g4['visit_table']} ";
$sql_search = " where vi_date between '{$fr_date}' and '{$to_date}' ";
if (isset($domain))
@ -105,14 +102,10 @@ if ($i == 0)
</tbody>
</table>
<?
<<<<<<< HEAD
$page = get_paging($config['cf_write_pages'], $page, $total_page, "$_SERVER[PHP_SELF]?$qstr&amp;domain=$domain&amp;page=");
=======
if (isset($domain))
$qstr .= "&amp;domain=$domain";
$qstr .= "&amp;page=";
$page = get_paging($config['cf_write_pages'], $page, $total_page, "{$_SERVER['PHP_SELF']}?$qstr");
>>>>>>> 2b5c471bdb62542fc9cb8b6740a934c34e5de04b
if ($page) {
?>
<div class="pg">

View File

@ -1,4 +1,7 @@
<?
global $lo_location;
global $lo_url;
include_once('./_common.php');
include_once($g4['path'].'/head.sub.php');
// 필수 입력입니다.

View File

@ -130,7 +130,7 @@ if (isset($wr_id) && $wr_id) {
if (!isset($page) || (isset($page) && $page == 0)) $page = 1;
$g4['title'] = $board['bo_subject']." ".$page."페이지";
$g4['title'] = $board['bo_subject'];
}
include_once($g4['path'].'/head.sub.php');

View File

@ -1,9 +1,6 @@
<?
include_once('./_common.php');
if (isset($editor->lib)) include_once($editor->lib);
if (isset($captcha->lib)) include_once($captcha->lib);
set_session('ss_bo_table', $bo_table);
set_session('ss_wr_id', $wr_id);
@ -26,7 +23,7 @@ if (!($w == '' || $w == 'u' || $w == 'r')) {
}
if (($w == 'u' || $w == 'r') && !$write['wr_id']) {
alert('글이 존재하지 않습니다.'.PHP_EOL.PHP_EOL.'삭제되었거나 이동된 경우입니다.', $g4['path']);
alert("글이 존재하지 않습니다.\\n삭제되었거나 이동된 경우입니다.", $g4['path']);
}
if ($w == '') {
@ -38,7 +35,7 @@ if ($w == '') {
if ($member['mb_id']) {
alert('글을 쓸 권한이 없습니다.');
} else {
alert('글을 쓸 권한이 없습니다.'.PHP_EOL.PHP_EOL.'회원이시라면 로그인 후 이용해 보십시오.', './login.php?'.$qstr.'&amp;url='.urlencode($_SERVER['PHP_SELF'].'?bo_table='.$bo_table));
alert("글을 쓸 권한이 없습니다.\\n회원이시라면 로그인 후 이용해 보십시오.", './login.php?'.$qstr.'&amp;url='.urlencode($_SERVER['PHP_SELF'].'?bo_table='.$bo_table));
}
}
@ -159,9 +156,9 @@ if ($w == '') {
}
// 그룹접근 가능
if ($group['gr_use_access']) {
if (!empty($group['gr_use_access'])) {
if ($is_guest) {
alert('접근 권한이 없습니다.'.PHP_EOL.PHP_EOL.'회원이시라면 로그인 후 이용해 보십시오.', 'login.php?'.$qstr.'&amp;url='.urlencode($_SERVER['PHP_SELF'].'?bo_table='.$bo_table));
alert("접근 권한이 없습니다.\\n\\n회원이시라면 로그인 후 이용해 보십시오.", 'login.php?'.$qstr.'&amp;url='.urlencode($_SERVER['PHP_SELF'].'?bo_table='.$bo_table));
}
if ($is_admin == 'super' || $group['gr_admin'] == $member['mb_id'] || $board['bo_admin'] == $member['mb_id']) {
@ -200,10 +197,12 @@ if ($member['mb_level'] >= $board['bo_html_level'])
$is_secret = $board['bo_use_secret'];
if ($board['bo_use_dhtml_editor'] && $member['mb_level'] >= $board['bo_html_level'])
if ($board['bo_use_dhtml_editor'] && $member['mb_level'] >= $board['bo_html_level']) {
define('_EDITOR_', true);
$is_dhtml_editor = true;
else
} else {
$is_dhtml_editor = false;
}
$is_mail = false;
if ($config['cf_email_use'] && $board['bo_use_email'])
@ -348,17 +347,6 @@ if ($is_admin) {
$write_max = (int)$board['bo_write_max'];
}
if ($is_dhtml_editor && isset($editor->js)) {
$g4['js_file'][] = $editor->js;
if (isset($editor->config_js)) {
$g4['js_file'][] = $editor->config_js;
}
}
if (isset($captcha->js)) {
$g4['js_file'][] = $captcha->js;
}
include_once($g4['path'].'/head.sub.php');
include_once('./board_head.php');

View File

@ -219,7 +219,7 @@ if ($w == 'c') // 코멘트 입력
$subject = $board[bo_subject].' 게시판에 '.$str.'글이 올라왔습니다.';
// 4.00.15 - 메일로 보내는 코멘트의 바로가기 링크 수정
$link_url = $g4['url']"./."$g4['bbs']"./board.php?bo_table=".$bo_table."&amp;wr_id=".$wr_id."&amp;".$qstr."#c_".$comment_id;
$link_url = $g4['url']."/".$g4['bbs']."/board.php?bo_table=".$bo_table."&amp;wr_id=".$wr_id."&amp;".$qstr."#c_".$comment_id;
include_once($g4['path'].'/lib/mailer.lib.php');

View File

@ -2,7 +2,6 @@
/*******************************************************************************
** 공통 변수, 상수, 코드
*******************************************************************************/
//error_reporting(E_ALL);
//error_reporting(E_ALL ^ E_NOTICE);
// 보안설정이나 프레임이 달라도 쿠키가 통하도록 설정
@ -491,8 +490,9 @@ if (isset($bo_table)) {
}
}
if (isset($gr_id))
if (!empty($_GET['gr_id'])) {
$group = sql_fetch(" select * from {$g4['group_table']} where gr_id = '$gr_id' ");
}
if ($is_admin != 'super') {
// 접근가능 IP

View File

@ -8,7 +8,7 @@ h1, h2, h3, h4, h5, h6 {font-family:"verdana","dotum"}
article, aside, details, figcaption, figure, footer, header, hgroup, menu, nav, section {display:block}
header ul, nav ul {margin:0;padding:0;list-style:none}
form, img {border:0}
label, input, img {vertical-align:middle}
label, input, select, img {vertical-align:middle}
input {margin:0;padding:0;font-family:"verdana","dotum"}
p {margin:5px 0;padding:10px 0;line-height:1.5em}
hr {display:none}
@ -20,19 +20,22 @@ caption {padding:0 0 10px;text-align:left}
.caption_desc {font-size:0.75em}
th {padding:12px 0 8px;border-top:3px solid #666;border-bottom:1px solid #a9a9a9;font-size:0.8em}
th a {color:#000;text-decoration:none}
th input {vertical-align:top} /* middle 로 하면 게시판 읽기에서 목록 사용시 체크박스 라인 깨짐 */
td {padding:10px 0;border-top:1px solid #d9d9d9;border-bottom:1px solid #d9d9d9;font-size:0.75em}
.empty_table {padding:50px 0;text-align:center}
/* 필드셋 */
fieldset {margin-bottom:20px;padding:13px;border:1px solid #dedace;background:#fefefe}
legend {margin-left:0;padding:7px 10px;border:1px solid #dedace;background:#333;color:#fff}
fieldset .fieldset_input {padding:3px;border:1px solid #ddd;background:#f9f9f5;vertical-align:middle}
fieldset .fieldset_input:focus {padding:4px;border:0;background:#333;color:#fff}
fieldset .fieldset_input,
fieldset textarea {padding:3px;border:1px solid #ddd;background:#fff;vertical-align:middle}
fieldset .fieldset_input:focus,
fieldset textarea:focus {padding:4px;border:0;background:#555;color:#fff}
fieldset select {padding:2px;border:1px solid #ddd;background:#f9f9f5;vertical-align:middle}
fieldset p {margin:0}
fieldset .span_highlight {color:#ff3061}
fieldset button,
.fieldset_submit {padding:0 15px;height:24px;border:0;background:#333;color:#fff;font-size:0.8em;line-height:1.9em;vertical-align:middle;cursor:pointer}
.fieldset_submit {padding:0 15px;height:24px;border:0;background:#555;color:#fff;font-size:0.8em;line-height:1.9em;vertical-align:middle;cursor:pointer}
fieldset button:focus,
.fieldset_submit:focus {padding:0 15px;height:24px;border:0;background:#555;color:#fff;font-size:0.8em;line-height:1.9em;vertical-align:middle}
@ -68,7 +71,7 @@ h6 {margin:0 0 20px}
#logo a {display:inline-block;padding:20px 30px}
/* 상단메뉴 */
#tnb {padding-left:10px;border-bottom:1px solid #ccc;background:#ebebe9;zoom:1}
#tnb {padding-left:30px;border-bottom:1px solid #ccc;background:#ebebe9;zoom:1}
#tnb:after {display:block;visibility:hidden;clear:both;content:""}
#tnb li {float:left;margin-left:-1px}
#tnb a {display:block;padding:0 20px;height:35px;border-right:1px solid #ddd;border-left:1px solid #ddd;color:#595959;font-family:"dotum";font-size:0.8em;font-weight:bold;text-decoration:none;line-height:3em}
@ -107,11 +110,11 @@ h6 {margin:0 0 20px}
#ol_submit {position:absolute;top:42px;right:12px;width:60px;height:24px;border:1px solid #b7b7b7;background:#fff;font-size:1em;font-weight:bold;letter-spacing:-0.1em;line-height:2em}
/* 로그인 후 */
#ol_after {padding-top:15px;width:219px;background:#f9f9f5;color:#000;font-size:0.75em}
#ol_after header {padding:10px 0;text-align:center}
#ol_after header {padding:0 0 13px;border-bottom:1px solid #dedace;text-align:center}
#ol_after ul {padding:5px 0;background:#fff}
#ol_after li a {display:block;position:relative;padding:7px 10px;color:#000;text-decoration:none}
#ol_after li span {position:absolute;top:7px;right:10px}
#ol_after footer {padding:7px 0 10px;text-align:center}
#ol_after li a {display:block;position:relative;padding:7px 20px 7px 19px;color:#000;text-decoration:none}
#ol_after li span {position:absolute;top:7px;right:19px;color:#ff3061}
#ol_after footer {padding:7px 0 10px;border-top:1px solid #dedace;text-align:center}
#ol_after footer a {display:inline-block;padding:0 10px;color:#000;text-decoration:none}
/* 설문조사 */
@ -122,7 +125,7 @@ h6 {margin:0 0 20px}
#poll ul {margin:10px}
#poll li {margin:7px 0}
#poll footer {padding:10px;border-top:1px solid #efeada;text-align:center}
#poll footer input {padding:0 15px;height:24px;border:0;background:#333;color:#fff;font-size:0.9em;letter-spacing:-0.1em;vertical-align:top}
#poll footer input {padding:0 15px;height:24px;border:0;background:#555;color:#fff;font-size:0.9em;letter-spacing:-0.1em;vertical-align:top}
#poll footer a {display:inline-block;padding:0 5px;height:22px;border:1px solid #b7b7b7;background:#fff;color:#000;font-size:0.9em;vertical-align:top;text-decoration:none;letter-spacing:-0.1em;line-height:2.1em}
/* 설문조사 결과 (새창) */
#poll_result section {margin:0 auto 20px;padding:10px;width:90%}
@ -150,7 +153,7 @@ h6 {margin:0 0 20px}
#poll_result_another a {display:block;padding:5px 0}
/* 레이아웃 중간 */
#wrapper {z-index:2;clear:both;position:relative;margin:-2px 0 0 0;padding:1px 250px 30px 30px;min-height:520px;height:auto !important;height:520px;min-width:1000px;width:auto !important;width:1000px;background:url("../img/wrapper_bg.jpg") top right repeat-y}
#wrapper {z-index:2;clear:both;position:relative;margin:-2px 0 0 0;padding:1px 250px 30px 30px;min-height:520px;height:auto !important;height:520px;background:url("../img/wrapper_bg.jpg") top right repeat-y}
#wrapper h1 {margin-top:30px}
/* 레이아웃 하단 */
@ -194,7 +197,7 @@ h6 {margin:0 0 20px}
.btn02 {display:inline-block;padding:0 10px;height:25px;border:1px solid #ccc;background:#fafafa;color:#000;font-size:0.8em;text-decoration:none;line-height:2.2em}
.btn02:hover,
.btn02:focus {}
.btn03 {display:inline-block;padding:0 10px;height:25px;border:1px solid #555;background:#666;color:#fff;font-size:0.8em;text-decoration:none;line-height:2.2em}
.btn03 {display:inline-block;padding:0 10px;height:25px;border:1px solid #555;background:#555;color:#fff;font-size:0.8em;text-decoration:none;line-height:2.2em}
.btn02:hover,
.btn02:focus {}
@ -208,7 +211,7 @@ h6 {margin:0 0 20px}
.frm_tbl textarea,
.frm_tbl .frm_input {padding:3px;background:#f5f5f2}
.frm_tbl textarea:focus,
.frm_tbl .frm_input:focus {padding:4px;border:0;background:#333;color:#fff}
.frm_tbl .frm_input:focus {padding:4px;border:0;background:#555;color:#fff}
.frm_tbl textarea {width:90%}
.frm_tbl select {padding:2px}
.frm_file {display:block;margin-bottom:5px}
@ -228,10 +231,11 @@ h6 {margin:0 0 20px}
.latest_more a {display:inline-block;padding:5px 0}
/* 테이블 항목별 정의 */
.td_chk {width:40px;text-align:center}
.td_group {width:100px;text-align:center}
.td_board {width:120px;text-align:center}
.td_num {width:50px;text-align:center}
.td_bignum {width:100px;text-align:center}
.td_bignum {width:80px;text-align:center}
.td_mb_id {width:120px;text-align:center}
.td_nick {width:120px;text-align:center}
.td_name {width:120px;text-align:left}
@ -271,8 +275,10 @@ h6 {margin:0 0 20px}
#bo_sch {float:left;padding:0;margin:0;border:0}
#bo_sch legend {margin:0;padding:0;width:0;height:0;border:0;overflow:hidden}
#bo_sch form {display:inline-block}
#fcategory select {margin-right:10px;padding:2px;border:1px solid #ddd;background:#f9f9f5;vertical-align:middle}
#bo_sch .fieldset_submit {border:1px solid #ccc;background:#fafafa;color:#000}
#bo_cate {margin-bottom:10px}
#fcategory {display:inline-block}
#fcategory select {margin-right:5px;padding:2px;border:1px solid #ddd;background:#f9f9f5;vertical-align:middle}
#bo_list caption {padding:0;height:0;overflow:hidden}
.bo_cate_link {display:inline-block;margin-right:10px;color:#ff7200;font-weight:bold;text-decoration:none}
.td_subject img {margin-left:5px}
@ -281,9 +287,70 @@ h6 {margin:0 0 20px}
#bo_w caption {padding:0;height:0;overflow:hidden}
/* 게시판 읽기 */
#bo_v {margin-bottom:30px;border:1px solid #ddd}
#bo_v_h1 {padding:25px 15px 15px;border-bottom:1px solid #efeada;font-size:0.9em}
#bo_v aside h2 {margin:0;padding:0;height:0;overflow:hidden}
#bo_v_title {text-align:center}
#bo_v {position:relative;margin-bottom:30px;border-top:3px solid #666;border-bottom:1px solid #ccc}
#bo_v_h1 {margin:0 !important;padding:15px 0 0 10px;font-size:1em}
#bo_v_info {padding:0 0 10px;border-bottom:1px solid #efeada;zoom:1}
#bo_v_info:after {display:block;visibility:hidden;clear:both;content:""}
#bo_v_info h2 {margin:0;padding:0;height:0;overflow:hidden}
#bo_v_info dl {padding:0 0 0 10px;font-size:0.75em}
#bo_v_info dt {float:left}
#bo_v_info dd {float:left;margin:0 20px 0 10px}
#bo_v_top {zoom:1}
#bo_v_top:after {display:block;visibility:hidden;clear:both;content:""}
#bo_v_top h2 {margin:0;padding:0;height:0;overflow:hidden}
#bo_v_top ul {padding:0;list-style:none}
#bo_v_my {float:left}
#bo_v_my li {float:left;margin-right:5px}
.bo_v_com {float:right}
.bo_v_com li {float:left;margin-left:5px}
#bo_v_article {zoom:1}
#bo_v_article:after {display:block;visibility:hidden;clear:both;content:""}
#bo_v_article h1 {margin:0;padding:0;height:0;overflow:hidden}
#bo_v_article p {padding:0}
#bo_v_file {border-bottom:1px solid #666;background:#555;font-size:0.75em}
#bo_v_file h2 {margin:0;padding:0;height:0;overflow:hidden}
#bo_v_file ul {margin:0;padding:0;list-style:none}
#bo_v_file a {display:inline-block;margin-top:5px;padding:5px 10px;color:#fff}
.bo_v_file_cnt {display:inline-block;margin-left:10px;color:#ddd}
#bo_v_link {border-bottom:1px solid #666;background:#555;font-size:0.75em}
#bo_v_link h2 {margin:0;padding:0;height:0;overflow:hidden}
#bo_v_link ul {margin:0;padding:0;list-style:none}
#bo_v_link a {display:inline-block;margin-top:5px;padding:5px 10px;color:#fff}
.bo_v_link_cnt {display:inline-block;margin-left:10px;color:#ddd}
#bo_v_act {margin:20px 0;text-align:center}
#bo_v_act a {margin-right:5px;vertical-align:top}
#bo_v_act strong {color:#ff7200}
#bo_v_bot {zoom:1}
#bo_v_bot:after {display:block;visibility:hidden;clear:both;content:""}
#bo_v_bot h2 {margin:0;padding:0;height:0;overflow:hidden}
#bo_v_bot ul {float:right;padding:0;list-style:none}
#bo_v_bot li {float:left;margin-left:5px}
/* 게시판 댓글 */
#bo_vc {padding:10px;border:1px solid #eee;background:#f9f9f9}
#bo_vc h2 {margin:0;padding:0;height:0;overflow:hidden}
#bo_vc article {padding:0 10px 20px;border-bottom:1px solid #ddd}
#bo_vc header {zoom:1}
#bo_vc header:after {display:block;visibility:hidden;clear:both;content:""}
#bo_vc h1 {margin:15px 0 10px;font-size:0.875em}
.bo_vc_info {font-size:0.75em;zoom:1}
.bo_vc_info:after {display:block;visibility:hidden;clear:both;content:""}
.bo_vc_info dt {float:left}
.bo_vc_info dd {float:left;margin:0 15px 0 10px}
#bo_vc p {padding:0}
#bo_vc footer {zoom:1}
#bo_vc footer:after {display:block;visibility:hidden;clear:both;content:""}
.bo_vc_act {float:right;font-size:0.75em;list-style:none;zoom:1}
.bo_vc_act:after {display:block;visibility:hidden;clear:both;content:""}
.bo_vc_act li {float:left;margin-left:5px}
.bo_vc_act a {color:#000;text-decoration:none}
#bo_vc_w {position:relative;margin-top:10px;zoom:1}
#bo_vc_w:after {display:block;visibility:hidden;clear:both;content:""}
#bo_vc_w fieldset {margin:0;padding:0;border:0;background:transparent}
#bo_vc_w textarea {margin:10px 0;width:98%;height:50px}
#bo_vc_w .fieldset_submit {float:right;margin:0 2% 0 0}
#bo_vc_w #char_cnt {position:absolute;top:0;right:0}
/* 우편번호 검색 */
#post_num dl {margin:0 auto 10px;padding:0;width:90%}
@ -334,6 +401,9 @@ h6 {margin:0 0 20px}
/* 쪽지 */
/* 스크랩 */
#scrap_do table {margin-bottom:10px}
#scrap_do textarea {height:100px}
#scrap_do p {margin:0 auto 20px;width:90%;font-size:0.875em}
/* 폼메일 */
#formmail textarea {height:100px}
@ -352,7 +422,7 @@ h6 {margin:0 0 20px}
#memo_write textarea {height:100px}
/* pagination */
.pg {clear:both;margin:0 0 10px;padding-top:20px;font-size:0.875em;text-align:center}
.pg_page, .pg_current {display:inline-block;position:relative;margin-left:-6px;padding:0 10px;height:25px;border:1px solid #ddd;background:#fff;line-height:1.9em;vertical-align:middle}
.pg {clear:both;margin:0 0 10px;padding-top:20px;font-size:0.75em;text-align:center}
.pg_page, .pg_current {display:inline-block;position:relative;margin-left:-6px;padding:0 12px;height:30px;border:1px solid #ddd;background:#fff;color:#000;line-height:2.6em;vertical-align:middle}
.pg_page {text-decoration:none}
.pg_current {font-weight:normal}
.pg_current {background:#595959;color:#fff}

0
extend/.gitignore vendored
View File

View File

@ -1,8 +1,12 @@
<?
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
$captcha = (object)array(
'lib' => $g4['path']."/plugin/captcha/captcha.lib.php",
'js' => $g4['path']."/plugin/captcha/captcha.js"
);
if (defined('_CAPTCHA_')) {
$captcha = (object)array(
'lib' => $g4['path']."/plugin/captcha/captcha.lib.php",
'js' => $g4['path']."/plugin/captcha/captcha.js"
);
include_once($captcha->lib);
}
?>

View File

@ -7,4 +7,6 @@ $editor = (object)array(
'config_js' => $g4['path']."/plugin/ckeditor/config.js",
'data' => "data/editor"
);
include_once($editor->lib);
?>

View File

@ -73,6 +73,15 @@ var g4_is_ie = navigator.userAgent.toLowerCase().indexOf("msie") != -1;
<script src="<?=$g4['path']?>/js/jquery-1.4.2.min.js"></script>
<script src="<?=$g4['path']?>/js/common.js"></script>
<script src="<?=$g4['path']?>/js/wrest.js"></script>
<?
if (defined('_EDITOR_')) {
$g4['js_file'][] = $editor->js;
$g4['js_file'][] = $editor->config_js;
}
if (defined('_CAPTCHA_')) {
$g4['js_file'][] = $captcha->js;
}
?>
<!--[if lte IE 8]>
<script src="<?=$g4['path']?>/js/html5.js"></script>
<![endif]-->

View File

@ -29,7 +29,7 @@ function drawFont(fontSize) {
var subject=document.getElementById("writeSubject");
var content=document.getElementById("writeContents");
var comment=document.getElementById("commentContents");
var comment=document.getElementById("bo_vc");
var wr_subject=document.getElementById("wr_subject");
var wr_content=document.getElementById("wr_content");

View File

@ -1567,4 +1567,11 @@ function escape_trim($field)
{
return mysql_real_escape_string(htmlentities(trim($field)));
}
// $_POST 형식에서 checkbox 엘리먼트의 checked 속성에서 checked 가 되어 넘어 왔는지를 검사
function is_checked($field)
{
return !empty($_POST[$field]);
}
?>

View File

@ -4,17 +4,27 @@ if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
function editor_textarea($id, $content="", $class="")
{
global $g4;
$upload_url = $g4['path']."/plugin/ckeditor/upload.php?type=Images";
//$upload_url = $g4['path']."/plugin/ckeditor/upload.php?type=Images";
$str = "<textarea id=\"$id\" name=\"$id\" class=\"ckeditor $class\" rows=\"10\" style=\"width:100%;\">$content</textarea>\n";
//$str .= "<script> CKEDITOR.replace('$id',{ filebrowserUploadUrl : '$upload_url'}); </script>\n";
return $str;
}
function chk_editor($id, $textarea_name="내용")
// textarea 로 값을 넘김
function editor_getdata($id)
{
$str = "var {$id}_data = CKEDITOR.instances.{$id}.getData();\n";
$str .= " ";
$str .= "if (!{$id}_data) { alert(\"$textarea_name 입력해 주십시오.\"); return false; }\n";
return $str;
if (defined('_EDITOR_'))
return "var {$id}_data = CKEDITOR.instances.{$id}.getData();\n";
else
return "";
}
// textarea 의 값이 비어 있는지 검사
function editor_empty($id, $textarea_name="내용을")
{
if (defined('_EDITOR_'))
return "if (!{$id}_data) { alert(\"$textarea_name 입력해 주십시오.\"); return false; }\n";
else
return "";
}
?>

View File

@ -13,23 +13,26 @@ if ($is_nogood) $colspan++;
<? if ($admin_href) { ?><div id="btn_bo_adm"><a href="<?=$admin_href?>">게시판 관리자 바로가기</a></div><?}?>
<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>
<?=$category_option?>
</select>
</form>
<? } ?>
<span>Total <?=number_format($total_count)?>건</span>
<?=$page?> 페이지
</div>
<div class="btn_bo">
<fieldset id="bo_sch">
<legend>게시물 분류 및 검색</legend>
<? 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>
<?=$category_option?>
</select>
</form>
<? } ?>
<legend>게시물 검색</legend>
<form name="fsearch" method="get">
<input type="hidden" name="bo_table" value="<?=$bo_table?>">
<input type="hidden" name="sca" value="<?=$sca?>">
<span>Total <?=number_format($total_count)?>건</span>
<select name="sfl" title="검색대상">
<option value="wr_subject">제목</option>
<option value="wr_content">내용</option>
@ -94,7 +97,7 @@ for ($i=0; $i<count($list); $i++) {
echo $list[$i]['num'];
?>
</td>
<? if ($is_checkbox) { ?><td><input type="checkbox" name="chk_wr_id[]" value="<?=$list[$i]['wr_id']?>" title="이 게시물 선택"></td><? } ?>
<? if ($is_checkbox) { ?><td class="td_chk"><input type="checkbox" name="chk_wr_id[]" value="<?=$list[$i]['wr_id']?>" title="이 게시물 선택"></td><? } ?>
<td class="td_subject">
<?
echo $list[$i]['reply'];

View File

@ -2,53 +2,18 @@
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
?>
<p id="bo_v_title"><strong><?=$board['bo_subject']?></strong></p>
<div id="bo_v">
<h1 id="bo_v_h1"><? if ($is_category) { echo ($category_name ? "{$view['ca_name']} " : ""); } ?><?=cut_hangul_last(get_text($view['wr_subject']))?></h1>
<aside>
<h2>게시물 상단 링크</h2>
<!-- 링크 버튼 -->
<? if ($update_href || $delete_href) {?>
<ul>
<? if ($update_href) { ?>
<li><a href="<?=$update_href?>">수정</a></li>
<? } ?>
<? if ($delete_href) { ?>
<li><a href="<?=$delete_href?>">삭제</a></li>
<? } ?>
</ul>
<? } ?>
<ul>
<?
ob_start();
?>
<? if ($copy_href) { ?>
<li><a href="<?=$copy_href?>">복사</a></li>
<? } ?>
<? if ($move_href) { ?>
<li><a href="<?=$move_href?>">이동</a></li>
<? } ?>
<? if ($search_href) { ?>
<li><a href="<?=$search_href?>">검색</a></li>
<? } ?>
<li><a href="<?=$list_href?>">목록</a></li>
<? if ($reply_href) { ?>
<li><a href="<?=$reply_href?>">답변</a></li>
<? } ?>
<? if ($write_href) { ?>
<li><a href="<?=$write_href?>">글쓰기</a></li>
<? } ?>
<?
$link_buttons = ob_get_contents();
ob_end_flush();
?>
</ul>
</aside>
<h1 id="bo_v_h1"><?=cut_hangul_last(get_text($view['wr_subject']))?></h1>
<section id="bo_v_info">
<h2>게시물 정보</h2>
<dl>
<? if ($is_category) { ?>
<dt>분류</dt>
<dd><?=($category_name ? "{$view['ca_name']} " : "");?></dd>
<? } ?>
<dt>작성자</dt>
<dd><?=$view['name']?><? if ($is_ip_view) { echo "&nbsp;($ip)"; } ?></dd>
<dt>작성일</dt>
@ -57,19 +22,11 @@ if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
<dd><?=number_format($view['wr_hit'])?>회</dd>
<dt>댓글</dt>
<dd><?=number_format($view['wr_comment'])?>건</dd>
<? if ($is_good) { ?>
<dt>추천</dt>
<dd><?=number_format($view['wr_good'])?>회</dd>
<? } ?>
<? if ($is_nogood) { ?>
<dt>비추천</dt>
<dd><?=number_format($view['wr_nogood'])?></dd>
<? } ?>
</dl>
</section>
<? if ($view['file'][$i]) {?>
<section>
<section id="bo_v_file">
<h2>첨부파일</h2>
<ul>
<?
@ -82,7 +39,7 @@ if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
<li>
<a href="javascript:file_download('<?=$view['file'][$i]['href']?>', '<?=urlencode($view['file'][$i]['source'])?>');">
<span><?=$view['file'][$i]['source']?> (<?=$view['file'][$i]['size']?>)</span>
<span><?=$view['file'][$i]['download']?></span>
<span class="bo_v_file_cnt"><?=$view['file'][$i]['download']?></span>
<span>DATE : <?=$view['file'][$i]['datetime']?></span>
</a>
</li>
@ -95,7 +52,7 @@ if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
<? } ?>
<? if ($view['link'][$i]) {?>
<section>
<section id="bo_v_link">
<h2>관련링크</h2>
<ul>
<?
@ -109,7 +66,7 @@ if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
<li>
<a href="<?=$view['link_href'][$i]?>" target="_blank">
<span><?=$link?></span>
<span><?=$view['link_hit'][$i]?></span>
<span class="bo_v_link_cnt"><?=$view['link_hit'][$i]?>회 연결</span>
</a>
</li>
<?
@ -120,7 +77,34 @@ if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
</section>
<? } ?>
<article>
<aside id="bo_v_top">
<h2>게시물 상단 링크</h2>
<!-- 링크 버튼 -->
<? if ($update_href || $delete_href) {?>
<ul id="bo_v_my">
<? if ($update_href) { ?><li><a href="<?=$update_href?>" class="btn02">수정</a></li><? } ?>
<? if ($delete_href) { ?><li><a href="<?=$delete_href?>" class="btn02">삭제</a></li><? } ?>
</ul>
<? } ?>
<?
ob_start();
?>
<ul class="bo_v_com">
<? if ($copy_href) { ?><li><a href="<?=$copy_href?>" class="btn03">복사</a></li><? } ?>
<? if ($move_href) { ?><li><a href="<?=$move_href?>" class="btn03">이동</a></li><? } ?>
<? if ($search_href) { ?><li><a href="<?=$search_href?>" class="btn02">검색</a></li><? } ?>
<li><a href="<?=$list_href?>" class="btn02">목록</a></li>
<? if ($reply_href) { ?><li><a href="<?=$reply_href?>" class="btn02">답변</a></li><? } ?>
<? if ($write_href) { ?><li><a href="<?=$write_href?>" class="btn01">글쓰기</a></li><? } ?>
</ul>
<?
$link_buttons = ob_get_contents();
ob_end_flush();
?>
</aside>
<article id="bo_v_article">
<header>
<h1>본문</h1>
</header>
@ -141,11 +125,11 @@ if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
<? if ($is_signature) { ?><p><?=$signature?></p><? } ?>
<? if ($scrap_href || $good_href || $nogood_href) { ?>
<ul>
<? if ($scrap_href) { ?><li><a href="javascript:;" onclick="win_scrap('<?=$scrap_href?>');">스크랩</a></li><? } ?>
<? if ($good_href) {?><li>추천 <?=number_format($view['wr_good'])?> <a href="<?=$good_href?>" target="hiddenframe">추천</a></li><? } ?>
<? if ($nogood_href) {?><li>비추천 <?=number_format($view['wr_nogood'])?> <a href="<?=$nogood_href?>" target="hiddenframe">비추천</a></li><? } ?>
</ul>
<div id="bo_v_act">
<? if ($scrap_href) { ?><a href="javascript:;" class="btn02" onclick="win_scrap('<?=$scrap_href?>');">스크랩</a><? } ?>
<? if ($good_href) {?><a href="<?=$good_href?>" class="btn02" target="hiddenframe">추천 <strong><?=number_format($view['wr_good'])?></strong></a><? } ?>
<? if ($nogood_href) {?><a href="<?=$nogood_href?>" class="btn02" target="hiddenframe">비추천 <strong><?=number_format($view['wr_nogood'])?></strong></a><? } ?>
</div>
<? } ?>
</article>
@ -154,17 +138,17 @@ if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
include_once('./view_comment.php');
?>
<aside>
<aside id="bo_v_bot">
<h2>게시물 하단 링크</h2>
<ul>
<? if ($prev_href) { ?><li><a href="<?=$prev_href?>">이전</a></li><? } ?>
<? if ($next_href) { ?><li><a href="<?=$next_href?>">다음</a></li><? } ?>
<? if ($prev_href || $next_href) { ?>
<ul id="bo_v_nb">
<? if ($prev_href) { ?><li><a href="<?=$prev_href?>" class="btn02">이전</a></li><? } ?>
<? if ($next_href) { ?><li><a href="<?=$next_href?>" class="btn02">다음</a></li><? } ?>
</ul>
<? } ?>
<!-- 링크 버튼 -->
<ul>
<?=$link_buttons?>
</ul>
<?=$link_buttons?>
</aside>
</div>

View File

@ -9,7 +9,7 @@ var char_max = parseInt(<?=$comment_max?>); // 최대
</script>
<!-- 댓글 리스트 -->
<section id="commentContents">
<section id="bo_vc">
<h2>댓글</h2>
<?
for ($i=0; $i<count($list); $i++) {
@ -24,24 +24,17 @@ var char_max = parseInt(<?=$comment_max?>); // 최대
//$str = preg_replace("/\[\<a\s.*href\=\"(http|https|ftp)\:\/\/([^[:space:]]+)\.(swf)\".*\<\/a\>\]/i", "<script>doc_write(flash_movie('$1://$2.$3'));</script>", $str);
$str = preg_replace("/\[\<a\s*href\=\"(http|https|ftp)\:\/\/([^[:space:]]+)\.(gif|png|jpg|jpeg|bmp)\"\s*[^\>]*\>[^\s]*\<\/a\>\]/i", "<img src='$1://$2.$3' id='target_resize_image[]' onclick='image_window(this);'>", $str);
?>
<article>
<article id="c_<?=$comment_id?>">
<header>
<h1><?=$list[$i]['name']?>님의 댓글</h1>
<a id="c_<?=$comment_id?>"></a>
<dl>
<dl class="bo_vc_info">
<dt>아이피</dt>
<dd><? if ($is_ip_view) { echo $list[$i]['ip'];} ?></dd>
<dt>작성일</dt>
<dd><time datetime="<?=date('Y-m-d\TH:i:s+09:00', strtotime($list[$i]['datetime']))?>"><?=$list[$i]['datetime']?></time></dd>
</dl>
<? if($list[$i]['is_reply'] || $list[$i]['is_edit'] || $list[$i]['is_del']) { ?>
<ul>
<? if ($list[$i]['is_reply']) { ?><li><a href="javascript:comment_box('<?=$comment_id?>', 'c');">답변</a></li><? } ?>
<? if ($list[$i]['is_edit']) { ?><li><a href="javascript:comment_box('<?=$comment_id?>', 'cu');">수정</a></li><? } ?>
<? if ($list[$i]['is_del']) { ?><li><a href="javascript:comment_delete('<?=$list[$i]['del_link']?>');">삭제</a></li><? } ?>
</ul>
<? } ?>
</header>
<!-- 댓글 출력 -->
<p><?=$str?></p>
@ -50,6 +43,16 @@ var char_max = parseInt(<?=$comment_max?>); // 최대
<input type="hidden" id="secret_comment_<?=$comment_id?>" value="<?=strstr($list[$i]['wr_option'],"secret")?>">
<textarea id="save_comment_<?=$comment_id?>"><?=get_text($list[$i]['content1'], 0)?></textarea>
<? if($list[$i]['is_reply'] || $list[$i]['is_edit'] || $list[$i]['is_del']) { ?>
<footer>
<ul class="bo_vc_act">
<? if ($list[$i]['is_reply']) { ?><li><a href="javascript:comment_box('<?=$comment_id?>', 'c');">답변</a></li><? } ?>
<? if ($list[$i]['is_edit']) { ?><li><a href="javascript:comment_box('<?=$comment_id?>', 'cu');">수정</a></li><? } ?>
<? if ($list[$i]['is_del']) { ?><li><a href="javascript:comment_delete('<?=$list[$i]['del_link']?>');">삭제</a></li><? } ?>
</ul>
</footer>
<? } ?>
</article>
<?}?>
@ -66,27 +69,31 @@ var char_max = parseInt(<?=$comment_max?>); // 최대
<input type="hidden" name="page" value="<?=$page?>">
<input type="hidden" name="is_good" value="">
<div id="comment_write">
<? if ($is_guest) { ?>
<label for="wr_name">이름</label> <input type="text" id="wr_name" name="wr_name" maxLength="20" size="10" required>
<label for="wr_password">패스워드</label> <input type="password" id="wr_password" name="wr_password" maxLength="20" size="10" required>
<img id="kcaptcha_image" alt="" />
<input type="text" name="wr_key" title="왼쪽의 글자를 입력하세요." size="10" required>
<? } ?>
<input type="checkbox" id="wr_secret" name="wr_secret" value="secret">비밀글
<? if ($comment_min || $comment_max) { ?><span id="char_count"></span>글자<?}?>
<textarea id="wr_content" name="wr_content" required
<? if ($comment_min || $comment_max) { ?>onkeyup="check_byte('wr_content', 'char_count');"<?}?>></textarea>
<? if ($comment_min || $comment_max) { ?><script> check_byte('wr_content', 'char_count'); </script><?}?>
<input type="submit" value="댓글입력">
</div>
<aside id="bo_vc_w">
<h2>댓글쓰기</h2>
<fieldset>
<? if ($is_guest) { ?>
<label for="wr_name">이름</label> <input type="text" id="wr_name" name="wr_name" class="fieldset_input" maxLength="20" size="10" required>
<label for="wr_password">패스워드</label> <input type="password" id="wr_password" name="wr_password" class="fieldset_input" maxLength="20" size="10" required>
<img id="kcaptcha_image" alt="" />
<input type="text" name="wr_key" class="fieldset_input" title="왼쪽의 글자를 입력하세요." size="10" required>
<? } ?>
<input type="checkbox" id="wr_secret" name="wr_secret" value="secret">
<label for="wr_secret">비밀글</label>
<? if ($comment_min || $comment_max) { ?><strong id="char_cnt"><span id="char_count"></span>글자</strong><?}?>
<textarea id="wr_content" name="wr_content" required
<? if ($comment_min || $comment_max) { ?>onkeyup="check_byte('wr_content', 'char_count');"<?}?>></textarea>
<? if ($comment_min || $comment_max) { ?><script> check_byte('wr_content', 'char_count'); </script><?}?>
<input type="submit" class="fieldset_submit" value="댓글입력">
</fieldset>
</aside>
</form>
<script src="<?=$g4['path']?>/js/jquery.kcaptcha.js"></script>
<script>
var save_before = '';
var save_html = document.getElementById('comment_write').innerHTML;
var save_html = document.getElementById('bo_vc_w').innerHTML;
function good_and_write()
{
@ -223,7 +230,7 @@ var char_max = parseInt(<?=$comment_max?>); // 최대
el_id = 'edit_' + comment_id;
}
else
el_id = 'comment_write';
el_id = 'bo_vc_w';
if (save_before != el_id)
{

View File

@ -30,8 +30,6 @@ else
$action_url = "{$g4['bbs_path']}/login_check.php";
?>
<script src="<?=$g4[path]?>/js/capslock.js"></script>
<form name="flogin" method="post" action="<?=$action_url?>" onsubmit="return flogin_submit(this);">
<input type="hidden" name="url" value='<?=$login_url?>'>
@ -40,7 +38,7 @@ else
<label for="login_mb_id">아이디</label>
<input type="text" id="login_mb_id" name="mb_id" maxLength="20" size="15" required>
<label for="login_mb_password">패스워드</label>
<input type="password" id="login_mb_password" name="mb_password" maxLength="20" size="15" required onkeypress="check_capslock(event, 'login_mb_password');">
<input type="password" id="login_mb_password" name="mb_password" maxLength="20" size="15" required>
<input type="checkbox" id="login_auto_login" name="auto_login" onclick="if (this.checked) { if (confirm('자동로그인을 사용하시면 다음부터 회원아이디와 패스워드를 입력하실 필요가 없습니다.\n\n\공공장소에서는 개인정보가 유출될 수 있으니 사용을 자제하여 주십시오.\n\n자동로그인을 사용하시겠습니까?')) { this.checked = true; } else { this.checked = false;} }">
<label for="login_auto_login">자동로그인</label>
<input type="submit" value="로그인">

View File

@ -19,11 +19,11 @@ if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
<tbody>
<? for ($i=0; $i<count($list); $i++) { ?>
<tr>
<td><?=$list[$i][num]?></td>
<td><a href="javascript:;" onclick="opener.document.location.href='<?=$list[$i][opener_href]?>';"><?=$list[$i][bo_subject]?></a></td>
<td class="td_num"><?=$list[$i][num]?></td>
<td class="td_board"><a href="javascript:;" onclick="opener.document.location.href='<?=$list[$i][opener_href]?>';"><?=$list[$i][bo_subject]?></a></td>
<td><a href="javascript:;" onclick="opener.document.location.href='<?=$list[$i][opener_href_wr_id]?>';"><?=$list[$i][subject]?></a></td>
<td><?=$list[$i][ms_datetime]?></td>
<td><a href="javascript:del('<?=$list[$i][del_href]?>');">삭제</a></td>
<td class="td_datetime"><?=$list[$i][ms_datetime]?></td>
<td class="td_mng"><a href="javascript:del('<?=$list[$i][del_href]?>');">삭제</a></td>
</tr>
<? } ?>

View File

@ -2,28 +2,34 @@
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
?>
<h1>스크랩하기</h1>
<div id="scrap_do" class="new_win">
<h1>스크랩하기</h1>
<form name="f_scrap_popin" method="post" action="./scrap_popin_update.php">
<input type="hidden" name="bo_table" value="<?=$bo_table?>">
<input type="hidden" name="wr_id" value="<?=$wr_id?>">
<form name="f_scrap_popin" method="post" action="./scrap_popin_update.php">
<input type="hidden" name="bo_table" value="<?=$bo_table?>">
<input type="hidden" name="wr_id" value="<?=$wr_id?>">
<table>
<caption>스크랩 확인 및 댓글 달기</caption>
<tbody>
<tr>
<th scope="row">제목</th>
<td><?=get_text(cut_str($write[wr_subject], 255))?></td>
</tr>
<tr>
<th scope="row"><label for="wr_content">댓글</label></th>
<td><textarea id="wr_content" name="wr_content"></textarea></td>
</tr>
</tbody>
</table>
<table class="frm_tbl">
<caption>스크랩 확인 및 댓글 달기</caption>
<tbody>
<tr>
<th scope="row">제목</th>
<td><?=get_text(cut_str($write[wr_subject], 255))?></td>
</tr>
<tr>
<th scope="row"><label for="wr_content">댓글</label></th>
<td><textarea id="wr_content" name="wr_content"></textarea></td>
</tr>
</tbody>
</table>
</form>
</form>
<div class="btn_window">
<input type="submit" value="스크랩">
</div>
<p>
스크랩을 하시면서 감사 혹은 격려의 댓글을 남기실 수 있습니다.
</p>
<div class="btn_window">
<input type="submit" value="스크랩">
</div>
</div>

View File

@ -2,7 +2,7 @@
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
?>
<? if ($is_admin == 'super') { ?><!-- <div style='float:left; width:<?=$table_width?>px; text-align:center;'>RUN TIME : <?=get_microtime()-$begin_time;?><br></div> --><? } ?>
<? if ($is_admin == 'super') { ?><!-- <div style='float:left; text-align:center;'>RUN TIME : <?=get_microtime()-$begin_time;?><br></div> --><? } ?>
</body>
</html>
@ -11,8 +11,7 @@ $tmp_sql = " select count(*) as cnt from {$g4['login_table']} where lo_ip = '{$_
$tmp_row = sql_fetch($tmp_sql);
//sql_query(" lock table $g4['login_table'] write ", false);
if ($tmp_row['cnt'])
{
if ($tmp_row['cnt']) {
$tmp_sql = " update {$g4['login_table']} set mb_id = '{$member['mb_id']}', lo_datetime = '{$g4['time_ymdhis']}', lo_location = '$lo_location', lo_url = '$lo_url' where lo_ip = '{$_SERVER['REMOTE_ADDR']}' ";
sql_query($tmp_sql, FALSE);
} else {