merge
This commit is contained in:
@ -558,7 +558,7 @@ if (!preg_match("/([m|M])$/", $upload_max_filesize)) {
|
|||||||
<tr>
|
<tr>
|
||||||
<th scope="row"><label for="tx_bo_content_head">상단 내용</label></th>
|
<th scope="row"><label for="tx_bo_content_head">상단 내용</label></th>
|
||||||
<td>
|
<td>
|
||||||
<?=editor_textarea("bo_content_head", $board['bo_content_head']);?>
|
<?=editor("bo_content_head", $board['bo_content_head']);?>
|
||||||
</td>
|
</td>
|
||||||
<td class="group_setting">
|
<td class="group_setting">
|
||||||
<input type="checkbox" id="chk_content_head" name="chk_content_head" value="1">
|
<input type="checkbox" id="chk_content_head" name="chk_content_head" value="1">
|
||||||
@ -568,7 +568,7 @@ if (!preg_match("/([m|M])$/", $upload_max_filesize)) {
|
|||||||
<tr>
|
<tr>
|
||||||
<th scope="row"><label for="tx_bo_content_tail">하단 내용</label></th>
|
<th scope="row"><label for="tx_bo_content_tail">하단 내용</label></th>
|
||||||
<td>
|
<td>
|
||||||
<?=editor_textarea("bo_content_tail", $board['bo_content_tail']);?>
|
<?=editor("bo_content_tail", $board['bo_content_tail']);?>
|
||||||
</td>
|
</td>
|
||||||
<td class="group_setting">
|
<td class="group_setting">
|
||||||
<input type="checkbox" id="chk_content_tail" name="chk_content_tail" value="1">
|
<input type="checkbox" id="chk_content_tail" name="chk_content_tail" value="1">
|
||||||
|
|||||||
@ -1,5 +1,4 @@
|
|||||||
<?
|
<?
|
||||||
define('_CAPTCHA_', true);
|
|
||||||
include_once('./_common.php');
|
include_once('./_common.php');
|
||||||
|
|
||||||
if (!$board['bo_table']) {
|
if (!$board['bo_table']) {
|
||||||
|
|||||||
141
bbs/calendar.php
141
bbs/calendar.php
@ -1,141 +0,0 @@
|
|||||||
<?
|
|
||||||
include_once('./_common.php');
|
|
||||||
|
|
||||||
$g4['title'] = '달력';
|
|
||||||
include_once($g4['path'].'/head.sub.php');
|
|
||||||
|
|
||||||
// 글자 색상
|
|
||||||
$weekday_color = '#000000'; // 평일
|
|
||||||
$saturday_color = '#000000'; // 토요일
|
|
||||||
$sunday_color = '#FF3300'; // 일요일 (공휴일)
|
|
||||||
// 배경 색상
|
|
||||||
$today_bgcolor = 'yellow'; // 오늘
|
|
||||||
$select_bgcolor = '#BAFFF6'; // 선택일
|
|
||||||
|
|
||||||
// 요일
|
|
||||||
$yoil = array ('일', '월', '화', '수', '목', '금', '토');
|
|
||||||
|
|
||||||
// mktime() 함수는 1970 ~ 2038년까지만 계산되므로 사용하지 않음
|
|
||||||
// 참고 : http://phpschool.com/bbs2/inc_view.html?id=3924&code=tnt2&start=0&mode=search&s_que=mktime&field=title&operator=and&period=all
|
|
||||||
function spacer($year, $month)
|
|
||||||
{
|
|
||||||
$day = 1;
|
|
||||||
$spacer = array(0, 3, 2, 5, 0, 3, 5, 1, 4, 6, 2, 4);
|
|
||||||
$year = $year - ($month < 3);
|
|
||||||
$result = ($year + (int) ($year/4) - (int) ($year/100) + (int) ($year/400) + $spacer[$month-1] + $day) % 7;
|
|
||||||
return $result;
|
|
||||||
}
|
|
||||||
|
|
||||||
// 오늘
|
|
||||||
$today = getdate($g4[server_time]);
|
|
||||||
$mon = substr('0'.$today[mon],-2);
|
|
||||||
$mday = substr('0'.$today[mday],-2);
|
|
||||||
|
|
||||||
// delimiter 를 없앤다
|
|
||||||
$cur_date = preg_replace("/([^0-9]*)/", "", $cur_date);
|
|
||||||
|
|
||||||
if ($cur_date && !$yyyy)
|
|
||||||
{
|
|
||||||
$yyyy = substr($cur_date,0,4);
|
|
||||||
$mm = substr($cur_date,4,2);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
if (!$yyyy) $yyyy = $today[year];
|
|
||||||
if (!$mm) $mm = $today[mon];
|
|
||||||
}
|
|
||||||
$yyyy = (int)$yyyy;
|
|
||||||
$mm = (int)$mm;
|
|
||||||
|
|
||||||
$f = @file('./calendar/'.$yyyy.'.txt');
|
|
||||||
if ($f) {
|
|
||||||
while ($line = each($f)) {
|
|
||||||
$tmp = explode("|", $line[value]);
|
|
||||||
$nal[$tmp[0]] = $tmp;
|
|
||||||
//print_r2($nal);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
$spacer = spacer($yyyy, $mm);
|
|
||||||
|
|
||||||
$endday = array(1=>31, 28, 31, 30 , 31, 30, 31, 31, 30 ,31 ,30, 31);
|
|
||||||
// 윤년 계산 부분이다. 4년에 한번꼴로 2월이 28일이 아닌 29일이 있다.
|
|
||||||
if( $yyyy%4 == 0 && $yyyy%100 != 0 || $yyyy%400 == 0 )
|
|
||||||
$endday[2] = 29; // 조건에 적합할 경우 28을 29로 변경
|
|
||||||
|
|
||||||
// 해당월의 1일
|
|
||||||
$mktime = mktime(0,0,0,$mm,1,$yyyy);
|
|
||||||
$dt = getdate(strtotime(date("Y-m-1", $mktime)));
|
|
||||||
|
|
||||||
$dt[wday] = $spacer;
|
|
||||||
|
|
||||||
// 해당월의 마지막 날짜,
|
|
||||||
//$last_day = date("t", $mktime);
|
|
||||||
$last_day = $endday[$mm];
|
|
||||||
|
|
||||||
$yyyy_before = $yyyy;
|
|
||||||
$mm_before = $mm - 1;
|
|
||||||
if ($mm_before < 1)
|
|
||||||
{
|
|
||||||
$yyyy_before--;
|
|
||||||
$mm_before = 12;
|
|
||||||
}
|
|
||||||
|
|
||||||
$yyyy_after = $yyyy;
|
|
||||||
$mm_after = $mm + 1;
|
|
||||||
if ($mm_after > 12)
|
|
||||||
{
|
|
||||||
$yyyy_after++;
|
|
||||||
$mm_after = 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
$fr_yyyy = $yyyy - 80;
|
|
||||||
$to_yyyy = $yyyy + 80;
|
|
||||||
|
|
||||||
$yyyy_before_href = $_SERVER[PHP_SELF].'?yyyy='.($yyyy-1).'&mm='.$mm.'&cur_date='.$cur_date.'&fld='.$fld.'&delimiter='.$delimiter;
|
|
||||||
$yyyy_after_href = $_SERVER[PHP_SELF].'?yyyy='.($yyyy+1).'&mm='.$mm.'&cur_date='.$cur_date.'&fld='.$fld.'&delimiter='.$delimiter;
|
|
||||||
|
|
||||||
$mm_after_href = $_SERVER[PHP_SELF].'?yyyy='.$yyyy_after.'&mm='.$mm_after.'&cur_date='.$cur_date.'&fld='.$fld.'&delimiter='.$delimiter;
|
|
||||||
$mm_before_href = $_SERVER[PHP_SELF].'?yyyy='.$yyyy_before.'&mm='.$mm_before.'&cur_date='.$cur_date.'&fld='.$fld.'&delimiter='.$delimiter;
|
|
||||||
|
|
||||||
$yyyy_select = '<select name="yyyy" onchange="document.fcalendar.submit();">';
|
|
||||||
for ($i=$fr_yyyy; $i<=$to_yyyy; $i++)
|
|
||||||
{
|
|
||||||
if ($i == $yyyy) $selected = ' selected';
|
|
||||||
else $selected = "";
|
|
||||||
$yyyy_select .= '<option value='.$i.$selected.'>'.$i.' 년</option>';
|
|
||||||
}
|
|
||||||
$yyyy_select .= '</select>';
|
|
||||||
|
|
||||||
$mm_select = '<select name="mm" onchange="document.fcalendar.submit();">';
|
|
||||||
for ($i=1; $i<=12; $i++)
|
|
||||||
{
|
|
||||||
if ($i == $mm) $selected = ' selected';
|
|
||||||
else $selected = "";
|
|
||||||
$mm_select .= '<option value="'.$i.$selected.'">'.$i.' 월</option>';
|
|
||||||
}
|
|
||||||
$mm_select .= '</select>';
|
|
||||||
|
|
||||||
$member_skin_path = $g4['path'].'/skin/member/.'$config[cf_member_skin];
|
|
||||||
include_once($member_skin_path.'/calendar.skin.php');
|
|
||||||
?>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
//
|
|
||||||
// year : 4자리
|
|
||||||
// month : 1~2자리
|
|
||||||
// day : 1~2자리
|
|
||||||
// wday : 요일 숫자 (0:일 ~ 6:토)
|
|
||||||
// handay : 요일 한글
|
|
||||||
//
|
|
||||||
function date_send(year, month, day, wday, handay)
|
|
||||||
{
|
|
||||||
var delimiter = document.getElementById('delimiter').value;
|
|
||||||
opener.document.getElementById('<?=$fld?>').value = year + delimiter + month + delimiter + day;
|
|
||||||
window.close();
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<?
|
|
||||||
include_once($g4['path'].'/tail.sub.php');
|
|
||||||
?>
|
|
||||||
@ -1,7 +1,7 @@
|
|||||||
<?
|
<?
|
||||||
|
define('_CAPTCHA_', true);
|
||||||
include_once('./_common.php');
|
include_once('./_common.php');
|
||||||
include_once($g4['path'].'/lib/register.lib.php');
|
include_once($g4['path'].'/lib/register.lib.php');
|
||||||
if ($captcha->lib) include_once($captcha->lib);
|
|
||||||
|
|
||||||
// 불법접근을 막도록 토큰생성
|
// 불법접근을 막도록 토큰생성
|
||||||
$token = md5(uniqid(rand(), true));
|
$token = md5(uniqid(rand(), true));
|
||||||
@ -102,7 +102,6 @@ if ($w == "") {
|
|||||||
// 회원아이콘 경로
|
// 회원아이콘 경로
|
||||||
$mb_icon = $g4['path'].'/data/member/'.substr($member['mb_id'],0,2).'/'.$member['mb_id'].'.gif';
|
$mb_icon = $g4['path'].'/data/member/'.substr($member['mb_id'],0,2).'/'.$member['mb_id'].'.gif';
|
||||||
$member_skin_path = $g4['path'].'/skin/member/'.$config['cf_member_skin'];
|
$member_skin_path = $g4['path'].'/skin/member/'.$config['cf_member_skin'];
|
||||||
$g4['js_file'][] = "{$g4['path']}/plugin/captcha/captcha.js";
|
|
||||||
|
|
||||||
include_once('./_head.php');
|
include_once('./_head.php');
|
||||||
|
|
||||||
|
|||||||
@ -1,5 +1,4 @@
|
|||||||
<?
|
<?
|
||||||
define('_CAPTCHA_', true);
|
|
||||||
include_once('./_common.php');
|
include_once('./_common.php');
|
||||||
|
|
||||||
set_session('ss_bo_table', $bo_table);
|
set_session('ss_bo_table', $bo_table);
|
||||||
@ -11,7 +10,7 @@ if (!$board['bo_table']) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!$bo_table) {
|
if (!$bo_table) {
|
||||||
alert('bo_table 값이 넘어오지 않았습니다.'.PHP_EOL.PHP_EOL.'write.php?bo_table=code 와 같은 방식으로 넘겨 주세요.', $g4['path']);
|
alert("bo_table 값이 넘어오지 않았습니다.\\nwrite.php?bo_table=code 와 같은 방식으로 넘겨 주세요.", $g4['path']);
|
||||||
}
|
}
|
||||||
|
|
||||||
@include_once ($g4['path'].'/skin/board/write.head.skin.php');
|
@include_once ($g4['path'].'/skin/board/write.head.skin.php');
|
||||||
@ -198,16 +197,9 @@ if ($member['mb_level'] >= $board['bo_html_level'])
|
|||||||
|
|
||||||
$is_secret = $board['bo_use_secret'];
|
$is_secret = $board['bo_use_secret'];
|
||||||
|
|
||||||
|
$is_dhtml_editor = false;
|
||||||
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;
|
$is_dhtml_editor = true;
|
||||||
} else {
|
|
||||||
$is_dhtml_editor = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
$captcha_html = "";
|
|
||||||
if ($is_guest) {
|
|
||||||
$captcha_html = captcha_html('wr_key');
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$is_mail = false;
|
$is_mail = false;
|
||||||
@ -369,4 +361,4 @@ include_once('./board_tail.php');
|
|||||||
include_once($g4['path'].'/tail.sub.php');
|
include_once($g4['path'].'/tail.sub.php');
|
||||||
|
|
||||||
@include_once ($board_skin_path.'/write.tail.skin.php');
|
@include_once ($board_skin_path.'/write.tail.skin.php');
|
||||||
?>
|
?>
|
||||||
@ -1,11 +1,8 @@
|
|||||||
<?
|
<?
|
||||||
define('_CAPTCHA_', true);
|
|
||||||
include_once('./_common.php');
|
include_once('./_common.php');
|
||||||
|
|
||||||
$g4['title'] = '게시글 저장';
|
$g4['title'] = '게시글 저장';
|
||||||
|
|
||||||
if (isset($captcha->lib)) include_once($captcha->lib);
|
|
||||||
|
|
||||||
$msg = array();
|
$msg = array();
|
||||||
|
|
||||||
$wr_subject = '';
|
$wr_subject = '';
|
||||||
@ -151,8 +148,10 @@ if ($w == '' || $w == 'u') {
|
|||||||
alert('w 값이 제대로 넘어오지 않았습니다.');
|
alert('w 값이 제대로 넘어오지 않았습니다.');
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!chk_captcha('wr_key')) {
|
if (defined('_CAPTCHA_')) {
|
||||||
alert('자동등록방지의 답변으로 입력한 숫자가 틀렸습니다.');
|
if ($is_guest && !chk_captcha()) {
|
||||||
|
alert('스팸방지의 답변으로 입력한 숫자가 틀렸습니다.');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($w == '' || $w == 'r') {
|
if ($w == '' || $w == 'r') {
|
||||||
@ -283,8 +282,8 @@ if ($w == '' || $w == 'r') {
|
|||||||
} else {
|
} else {
|
||||||
$mb_id = '';
|
$mb_id = '';
|
||||||
// 비회원의 경우 이름이 누락되는 경우가 있음
|
// 비회원의 경우 이름이 누락되는 경우가 있음
|
||||||
$wr_name = strip_tags(mysql_escape_string($_POST['wr_name']));
|
$wr_name = escape_trim($_POST['wr_name']);
|
||||||
if (!trim($wr_name))
|
if (!$wr_name)
|
||||||
alert('이름은 필히 입력하셔야 합니다.');
|
alert('이름은 필히 입력하셔야 합니다.');
|
||||||
$wr_password = sql_password($wr_password);
|
$wr_password = sql_password($wr_password);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -13,6 +13,10 @@ $g4['bbs_path'] = $g4['path'] . '/' . $g4['bbs'];
|
|||||||
$g4['bbs_img'] = 'img';
|
$g4['bbs_img'] = 'img';
|
||||||
$g4['bbs_img_path'] = $g4['path'] . '/' . $g4['bbs'] . '/' . $g4['bbs_img'];
|
$g4['bbs_img_path'] = $g4['path'] . '/' . $g4['bbs'] . '/' . $g4['bbs_img'];
|
||||||
|
|
||||||
|
$g4['data_dir'] = 'data';
|
||||||
|
$g4['cache_dir'] = 'cache';
|
||||||
|
$g4['captcha_dir'] = 'captcha';
|
||||||
|
|
||||||
$g4['admin'] = 'adm';
|
$g4['admin'] = 'adm';
|
||||||
$g4['admin_path'] = $g4['path'] . '/' . $g4['admin'];
|
$g4['admin_path'] = $g4['path'] . '/' . $g4['admin'];
|
||||||
|
|
||||||
|
|||||||
@ -1,14 +0,0 @@
|
|||||||
<?
|
|
||||||
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
|
|
||||||
|
|
||||||
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);
|
|
||||||
} else {
|
|
||||||
unset($_SESSION['ss_captcha_use']);
|
|
||||||
}
|
|
||||||
?>
|
|
||||||
@ -1,12 +1,20 @@
|
|||||||
<?
|
<?
|
||||||
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
|
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
|
||||||
|
|
||||||
$editor = (object)array(
|
// _EDITOR_ 의 값에 상관없이 선언 되었는지의 여부만 따짐
|
||||||
'lib' => $g4['path']."/plugin/ckeditor/ckeditor.lib.php",
|
// if (defined('_EDITOR_')) true;
|
||||||
'js' => $g4['path']."/plugin/ckeditor/ckeditor.js",
|
define('_EDITOR_', 1);
|
||||||
'config_js' => $g4['path']."/plugin/ckeditor/config.js",
|
|
||||||
'data' => "data/editor"
|
|
||||||
);
|
|
||||||
|
|
||||||
include_once($editor->lib);
|
if (defined('_EDITOR_')) {
|
||||||
|
$ckeditor = new stdClass;
|
||||||
|
$ckeditor->url = $g4['url']."/extend/ckeditor";
|
||||||
|
$ckeditor->path = $g4['path']."/extend/ckeditor";
|
||||||
|
$ckeditor->data = "data/editor";
|
||||||
|
|
||||||
|
include_once($ckeditor->path."/ckeditor.lib.php");
|
||||||
|
|
||||||
|
$g4['js_code'][] = "var g4_ckeditor_path = \"{$ckeditor->path}\";";
|
||||||
|
$g4['js_file'][] = $ckeditor->url."/ckeditor.js";
|
||||||
|
$g4['js_file'][] = $ckeditor->url."/config.js";
|
||||||
|
}
|
||||||
?>
|
?>
|
||||||
23
extend/ckeditor/ckeditor.lib.php
Normal file
23
extend/ckeditor/ckeditor.lib.php
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
<?php
|
||||||
|
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
|
||||||
|
|
||||||
|
function editor($id, $content="", $class="")
|
||||||
|
{
|
||||||
|
global $g4;
|
||||||
|
$str = "<textarea id=\"$id\" name=\"$id\" class=\"ckeditor $class\" rows=\"10\" style=\"width:100%;\">$content</textarea>\n";
|
||||||
|
//if (_EDITOR_) $str .= "<script>CKEDITOR.replace('$id',{height:'500px'});</script>\n";
|
||||||
|
return $str;
|
||||||
|
}
|
||||||
|
|
||||||
|
// textarea 로 값을 넘김
|
||||||
|
function editor_getdata($id)
|
||||||
|
{
|
||||||
|
return "var {$id}_data = CKEDITOR.instances.{$id}.getData();\n";
|
||||||
|
}
|
||||||
|
|
||||||
|
// textarea 의 값이 비어 있는지 검사
|
||||||
|
function editor_empty($id, $textarea_name="내용을")
|
||||||
|
{
|
||||||
|
return "if (!{$id}_data) { alert(\"$textarea_name 입력해 주십시오.\"); CKEDITOR.instances.{$id}.focus(); return false; }\n";
|
||||||
|
}
|
||||||
|
?>
|
||||||
@ -26,5 +26,5 @@ CKEDITOR.editorConfig = function( config ) {
|
|||||||
config.fontSize_sizes = "7pt/9px;8pt/11px;9pt/12px;10pt/13px;11pt/15px;14pt/19px;18pt/24px;24pt/32px;36/48px;";
|
config.fontSize_sizes = "7pt/9px;8pt/11px;9pt/12px;10pt/13px;11pt/15px;14pt/19px;18pt/24px;24pt/32px;36/48px;";
|
||||||
config.enterMode = CKEDITOR.ENTER_BR;
|
config.enterMode = CKEDITOR.ENTER_BR;
|
||||||
config.shiftEnterMode = CKEDITOR.ENTER_P;
|
config.shiftEnterMode = CKEDITOR.ENTER_P;
|
||||||
config.filebrowserUploadUrl = g4_path+"/plugin/ckeditor/upload.php?type=Images";
|
config.filebrowserUploadUrl = g4_ckeditor_path+"/upload.php?type=Images";
|
||||||
};
|
};
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user