Compare commits

..
32 Commits
Author SHA1 Message Date
thisgun 0d19b01229 5.2.9 버전 변경 2017-07-03 19:58:40 +09:00
thisgun 2b2d558c87 게시판 본문의 url 자동 링크 소스 수정 2017-07-03 19:41:44 +09:00
thisgun 94f25f73fa 그누보드 글 수정 XSS 취약점 수정 ( 17-454 ) 2017-07-03 19:41:38 +09:00
thisgun 5bd16c0e77 kcaptcha https 적용이 안되는 오류 수정 2017-07-03 19:41:33 +09:00
thisgun 7bb40dd882 코멘트 폼 및 게시판 패스워드 action url에 https 처리 2017-07-03 19:41:26 +09:00
thisgun bb99c050b6 게시판 글쓰기시 버튼도 토큰 적용되도록 수정 2017-07-03 19:41:20 +09:00
thisgun 31cdf10011 스마트에디터 2.9.0 버전으로 수정 2017-07-03 19:41:13 +09:00
thisgun 02c29c137c cheditor js 업로드 수정 2017-07-03 19:41:09 +09:00
thisgun e9afe3fdae 1:1 문의 페이징 오류 수정 2017-07-03 19:41:05 +09:00
thisgun ce9517885b 그누보드 AND 검색을 이용한 취약점 수정 (17-455) 2017-07-03 19:40:57 +09:00
thisgun 6a41d655de 게시판에서 특수문자 일부 입력시 캐쉬 파일 생성 오류 수정 2017-07-03 19:40:50 +09:00
thisgun c2a4a39ea0 에디터 이미지 업로드 부분 정규식 수정 2017-06-14 11:22:05 +09:00
thisgun b8759e4acd 5.2.8 버젼변경 2017-06-14 10:35:04 +09:00
thisgun e6a3df6f08 그누보드 파일 삭제 취약점 17-282 수정 2017-06-14 10:32:43 +09:00
thisgun 617dfbf0e2 그누보드 원격 취약점 17-259 수정 2017-06-14 10:32:35 +09:00
thisgun e4c9bf5ba4 g5_path 함수 수정 2017-06-14 10:32:29 +09:00
thisgun 910091b6c6 모바일 크롬 브라우저에서 캡챠 조회수 버그 수정 2017-06-14 10:32:23 +09:00
thisgun 92b8ce3a89 게시판 검색시 필드 소문자로 변경 2017-06-14 10:32:13 +09:00
thisgun 8a276fc073 install 파일에 utf-8 헤더 추가 2017-06-14 10:32:08 +09:00
thisgun baa2e890ba 기타 오류 수정 2017-06-14 10:32:04 +09:00
thisgun a9f4aee93f 메뉴 추가 대상에서 게시판일 경우 게시판 그룹 표시하기 #73 2017-06-14 10:31:59 +09:00
thisgun 144926774d 이메일 복화화 문자열이 깨지는 현상 수정 2017-06-14 10:31:53 +09:00
thisgun 435da08a02 5.2.7 버전변경 2017-03-20 17:45:21 +09:00
thisgun 945c060b67 썸네일 파일 수정 2017-03-20 17:45:17 +09:00
thisgun 83fd4bf68a cheditor 소스 수정 2017-03-20 17:45:09 +09:00
thisgun f11c4531e9 원격코드 실행 취약점(17-00160) 수정 2017-03-20 17:45:05 +09:00
thisgun f36c24e5d0 오타 수정 (왕대인님 제보) 2017-03-20 17:45:00 +09:00
thisgun 23a91b346d LFI to RCE 취약점 수정 2017-03-20 17:44:56 +09:00
thisgun 8eb465d26f 5.2.6 버전변경 2017-01-18 19:59:42 +09:00
thisgun 6ff06d4609 글쓰기시 page 중복 소스 삭제 2017-01-18 19:58:35 +09:00
thisgun c817b1edb7 PHPMailer 5.2.22 버전 적용 2017-01-18 19:58:31 +09:00
thisgun f7c6a52f6d cheditor5 추가 2017-01-18 19:58:20 +09:00
334 changed files with 47056 additions and 22055 deletions
+1 -1
View File
@@ -6,7 +6,7 @@ sirgle/
test.php
*.key
*.sh
cheditor*/
cheditor5.*/
ckeditor*/
log/
g5_tree/
+4
View File
@@ -2,4 +2,8 @@
define('G5_IS_ADMIN', true);
include_once ('../common.php');
include_once(G5_ADMIN_PATH.'/admin.lib.php');
if( isset($token) ){
$token = @htmlspecialchars(strip_tags($token), ENT_QUOTES);
}
?>
+2
View File
@@ -2,6 +2,8 @@
$sub_menu = '300100';
include_once('./_common.php');
check_demo();
auth_check($auth[$sub_menu], 'w');
check_admin_token();
+8
View File
@@ -35,6 +35,14 @@ if ($file = $_POST['bo_include_tail']) {
$_POST['bo_include_tail'] = $file;
}
if(!is_include_path_check($_POST['bo_include_head'])) {
alert('/data/file/ 또는 /data/editor/ 포함된 문자를 상단 파일 경로에 포함시킬수 없습니다.');
}
if(!is_include_path_check($_POST['bo_include_tail'])) {
alert('/data/file/ 또는 /data/editor/ 포함된 문자를 하단 파일 경로에 포함시킬수 없습니다.');
}
$board_path = G5_DATA_PATH.'/file/'.$bo_table;
// 게시판 디렉토리 생성
+1 -1
View File
@@ -63,7 +63,7 @@ $colspan = 15;
<label for="sfl" class="sound_only">검색대상</label>
<select name="sfl" id="sfl">
<option value="bo_table"<?php echo get_selected($_GET['sfl'], "bo_subject", true); ?>>TABLE</option>
<option value="bo_table"<?php echo get_selected($_GET['sfl'], "bo_table", true); ?>>TABLE</option>
<option value="bo_subject"<?php echo get_selected($_GET['sfl'], "bo_subject"); ?>>제목</option>
<option value="a.gr_id"<?php echo get_selected($_GET['sfl'], "a.gr_id"); ?>>그룹ID</option>
</select>
+17 -1
View File
@@ -18,6 +18,18 @@ check_admin_token();
if ($co_himg_del) @unlink(G5_DATA_PATH."/content/{$co_id}_h");
if ($co_timg_del) @unlink(G5_DATA_PATH."/content/{$co_id}_t");
$error_msg = '';
if( $co_include_head && ! is_include_path_check($co_include_head) ){
$co_include_head = '';
$error_msg = '/data/file/ 또는 /data/editor/ 포함된 문자를 상단 파일 경로에 포함시킬수 없습니다.';
}
if( $co_include_tail && ! is_include_path_check($co_include_tail) ){
$co_include_tail = '';
$error_msg = '/data/file/ 또는 /data/editor/ 포함된 문자를 하단 파일 경로에 포함시킬수 없습니다.';
}
$sql_common = " co_include_head = '$co_include_head',
co_include_tail = '$co_include_tail',
co_html = '$co_html',
@@ -74,7 +86,11 @@ if ($w == "" || $w == "u")
@chmod($dest_path, G5_FILE_PERMISSION);
}
goto_url("./contentform.php?w=u&amp;co_id=$co_id");
if( $error_msg ){
alert($error_msg, "./contentform.php?w=u&amp;co_id=$co_id");
} else {
goto_url("./contentform.php?w=u&amp;co_id=$co_id");
}
}
else
{
+1
View File
@@ -311,6 +311,7 @@ tfoot td {font-weight:bold;text-align:center}
#menu_frm #menu_result {margin:20px 0}
#menulist .sub_menu_class {padding-left:25px;background:url('../img/sub_menu_ico.gif') 5px 15px no-repeat}
.exist_menu_link {font-weight:bold;color:red}
/* 회원관리 목록 */
.mb_leave_msg {color:#b6b6b6}
+47 -3
View File
@@ -43,13 +43,57 @@ $(function() {
"./menu_form_search.php"
);
$("#me_type").on("change", function() {
var type = $(this).val();
function link_checks_all_chage(){
var $links = $(opener.document).find("#menulist input[name='me_link[]']"),
$o_link = $(".td_mngsmall input[name='link[]']"),
hrefs = [],
menu_exist = false;
if( $links.length ){
$links.each(function( index ) {
hrefs.push( $(this).val() );
});
$o_link.each(function( index ) {
if( $.inArray( $(this).val(), hrefs ) != -1 ){
$(this).closest("tr").find("td:eq( 0 )").addClass("exist_menu_link");
menu_exist = true;
}
});
}
if( menu_exist ){
$(".menu_exists_tip").show();
} else {
$(".menu_exists_tip").hide();
}
}
function menu_result_change( type ){
var dfd = new $.Deferred();
$("#menu_result").empty().load(
"./menu_form_search.php",
{ type : type }
{ type : type },
function(){
dfd.resolve('Finished');
}
);
return dfd.promise();
}
$("#me_type").on("change", function() {
var type = $(this).val();
var promise = menu_result_change( type );
promise.done(function(message) {
link_checks_all_chage(type);
});
});
$(document).on("click", "#add_manual", function() {
+17 -2
View File
@@ -11,7 +11,7 @@ switch($type) {
order by gr_order, gr_id ";
break;
case 'board':
$sql = " select bo_table as id, bo_subject as subject
$sql = " select bo_table as id, bo_subject as subject, gr_id
from {$g5['board_table']}
order by bo_order, bo_table ";
break;
@@ -32,13 +32,18 @@ if($sql) {
for($i=0; $row=sql_fetch_array($result); $i++) {
if($i == 0) {
$bbs_subject_title = ($type == 'board') ? '게시판제목' : '제목';
?>
<div class="tbl_head01 tbl_wrap">
<table>
<thead>
<tr>
<th scope="col">제목</th>
<th scope="col"><?php echo $bbs_subject_title; ?></th>
<?php if($type == 'board'){ ?>
<th scope="col">게시판 그룹</th>
<?php } ?>
<th scope="col">선택</th>
</tr>
</thead>
@@ -63,6 +68,12 @@ if($sql) {
<tr>
<td><?php echo $row['subject']; ?></td>
<?php
if($type == 'board'){
$group = get_call_func_cache('get_group', array($row['gr_id']));
?>
<td><?php echo $group['gr_subject']; ?></td>
<?php } ?>
<td class="td_mngsmall">
<input type="hidden" name="subject[]" value="<?php echo preg_replace('/[\'\"]/', '', $row['subject']); ?>">
<input type="hidden" name="link[]" value="<?php echo $link; ?>">
@@ -76,6 +87,10 @@ if($sql) {
</table>
</div>
<div class="local_desc01 menu_exists_tip" style="display:none">
<p>* <strong>빨간색</strong>의 제목은 이미 메뉴에 연결되어 경우 표시됩니다.</p>
</div>
<div class="btn_win02 btn_win">
<button type="button" class="btn_cancel" onclick="window.close();">창닫기</button>
</div>
+19 -3
View File
@@ -8,6 +8,18 @@ auth_check($auth[$sub_menu], 'w');
check_admin_token();
$error_msg = '';
if( $qa_include_head && ! is_include_path_check($qa_include_head) ){
$qa_include_head = '';
$error_msg = '/data/file/ 또는 /data/editor/ 포함된 문자를 상단 파일 경로에 포함시킬수 없습니다.';
}
if( $qa_include_tail && ! is_include_path_check($qa_include_tail) ){
$qa_include_tail = '';
$error_msg = '/data/file/ 또는 /data/editor/ 포함된 문자를 하단 파일 경로에 포함시킬수 없습니다.';
}
$sql = " update {$g5['qa_config_table']}
set qa_title = '{$_POST['qa_title']}',
qa_category = '{$_POST['qa_category']}',
@@ -29,8 +41,8 @@ $sql = " update {$g5['qa_config_table']}
qa_image_width = '{$_POST['qa_image_width']}',
qa_upload_size = '{$_POST['qa_upload_size']}',
qa_insert_content = '{$_POST['qa_insert_content']}',
qa_include_head = '{$_POST['qa_include_head']}',
qa_include_tail = '{$_POST['qa_include_tail']}',
qa_include_head = '{$qa_include_head}',
qa_include_tail = '{$qa_include_tail}',
qa_content_head = '{$_POST['qa_content_head']}',
qa_content_tail = '{$_POST['qa_content_tail']}',
qa_mobile_content_head = '{$_POST['qa_mobile_content_head']}',
@@ -47,5 +59,9 @@ $sql = " update {$g5['qa_config_table']}
qa_5 = '{$_POST['qa_5']}' ";
sql_query($sql);
goto_url('./qa_config.php');
if($error_msg){
alert($error_msg, './qa_config.php');
} else {
goto_url('./qa_config.php');
}
?>
+6
View File
@@ -12,5 +12,11 @@ if (!strstr($_SERVER['SCRIPT_NAME'], 'install.php')) {
//$sms5 = sql_fetch("select * from ".$g5['sms5_config_table'] );
}
$sv = isset($_REQUEST['sv']) ? get_search_string($_REQUEST['sv']) : '';
if( isset($token) ){
$token = @htmlspecialchars(strip_tags($token), ENT_QUOTES);
}
add_stylesheet('<link rel="stylesheet" href="'.G5_SMS5_ADMIN_URL.'/css/sms5.css">', 0);
?>
+1
View File
@@ -71,6 +71,7 @@ for ($i=0; $row=sql_fetch_array($result); $i++) {
</tr>
<?php
$i++;
}
} else {
echo '<tr><td colspan="'.$colspan.'" class="empty_table">자료가 없습니다.</td></tr>';
+1
View File
@@ -72,6 +72,7 @@ for ($i=0; $row=sql_fetch_array($result); $i++) {
</tr>
<?php
$i++;
}
+1 -1
View File
@@ -44,7 +44,7 @@ $listall = '<a href="'.$_SERVER['SCRIPT_NAME'].'">처음</a>'; //페이지 처
<?php
$sql_common = " from {$g5['visit_table']} ";
if ($sfl) {
if($sst=='vi_ip' || $sst=='vi_date'){
if($sfl=='vi_ip' || $sfl=='vi_date'){
$sql_search = " where $sfl like '$stx%' ";
}else{
$sql_search = " where $sfl like '%$stx%' ";
+5 -1
View File
@@ -7,7 +7,11 @@ if (G5_IS_MOBILE) {
include_once(G5_BBS_PATH.'/_head.php');
echo stripslashes($board['bo_mobile_content_head']);
} else {
@include ($board['bo_include_head']);
if(is_include_path_check($board['bo_include_head'])) { //파일경로 체크
@include ($board['bo_include_head']);
} else { //파일경로가 올바르지 않으면 기본파일을 가져옴
include_once(G5_BBS_PATH.'/_head.php');
}
echo stripslashes($board['bo_content_head']);
}
?>
+5 -1
View File
@@ -8,6 +8,10 @@ if (G5_IS_MOBILE) {
include_once(G5_BBS_PATH.'/_tail.php');
} else {
echo stripslashes($board['bo_content_tail']);
@include ($board['bo_include_tail']);
if(is_include_path_check($board['bo_include_tail'])) { //파일경로 체크
@include ($board['bo_include_tail']);
} else { //파일경로가 올바르지 않으면 기본파일을 가져옴
include_once(G5_BBS_PATH.'/_tail.php');
}
}
?>
+2 -2
View File
@@ -19,7 +19,7 @@ if (!$co['co_id'])
$g5['title'] = $co['co_subject'];
if ($co['co_include_head'])
if (is_include_path_check($co['co_include_head']))
@include_once($co['co_include_head']);
else
include_once('./_head.php');
@@ -85,7 +85,7 @@ if(is_file($skin_file)) {
echo '<p>'.str_replace(G5_PATH.'/', '', $skin_file).'이 존재하지 않습니다.</p>';
}
if ($co['co_include_tail'])
if (is_include_path_check($co['co_include_tail']))
@include_once($co['co_include_tail']);
else
include_once('./_tail.php');
+1 -1
View File
@@ -134,5 +134,5 @@ if ($count_write > 0 || $count_comment > 0)
delete_cache_latest($bo_table);
goto_url('./board.php?bo_table='.$bo_table.'&amp;page='.$page.$qstr);
goto_url(G5_HTTP_BBS_URL.'/board.php?bo_table='.$bo_table.'&amp;page='.$page.$qstr);
?>
+1 -1
View File
@@ -156,5 +156,5 @@ if ($count_write > 0 || $count_comment > 0)
delete_cache_latest($bo_table);
goto_url('./board.php?bo_table='.$bo_table.'&amp;page='.$page.$qstr);
goto_url(G5_HTTP_BBS_URL.'/board.php?bo_table='.$bo_table.'&amp;page='.$page.$qstr);
?>
+1 -1
View File
@@ -84,5 +84,5 @@ sql_query(" delete from {$g5['board_new_table']} where bo_table = '{$bo_table}'
delete_cache_latest($bo_table);
goto_url('./board.php?bo_table='.$bo_table.'&amp;wr_id='.$write['wr_parent'].'&amp;page='.$page. $qstr);
goto_url(G5_HTTP_BBS_URL.'/board.php?bo_table='.$bo_table.'&amp;wr_id='.$write['wr_parent'].'&amp;page='.$page. $qstr);
?>
+12 -12
View File
@@ -5,36 +5,36 @@ $g5['title'] = '비밀번호 입력';
switch ($w) {
case 'u' :
$action = './write.php';
$return_url = './board.php?bo_table='.$bo_table.'&amp;wr_id='.$wr_id;
$action = G5_HTTP_BBS_URL.'/write.php';
$return_url = G5_HTTP_BBS_URL.'/board.php?bo_table='.$bo_table.'&amp;wr_id='.$wr_id;
break;
case 'd' :
set_session('ss_delete_token', $token = uniqid(time()));
$action = './delete.php?token='.$token;
$return_url = './board.php?bo_table='.$bo_table.'&amp;wr_id='.$wr_id;
$action = https_url(G5_BBS_DIR).'/delete.php?token='.$token;
$return_url = G5_HTTP_BBS_URL.'/board.php?bo_table='.$bo_table.'&amp;wr_id='.$wr_id;
break;
case 'x' :
set_session('ss_delete_comment_'.$comment_id.'_token', $token = uniqid(time()));
$action = './delete_comment.php?token='.$token;
$action = https_url(G5_BBS_DIR).'/delete_comment.php?token='.$token;
$row = sql_fetch(" select wr_parent from $write_table where wr_id = '$comment_id' ");
$return_url = './board.php?bo_table='.$bo_table.'&amp;wr_id='.$row['wr_parent'];
$return_url = G5_HTTP_BBS_URL.'/board.php?bo_table='.$bo_table.'&amp;wr_id='.$row['wr_parent'];
break;
case 's' :
// 비밀번호 창에서 로그인 하는 경우 관리자 또는 자신의 글이면 바로 글보기로 감
if ($is_admin || ($member['mb_id'] == $write['mb_id'] && $write['mb_id']))
goto_url('./board.php?bo_table='.$bo_table.'&amp;wr_id='.$wr_id);
goto_url(G5_HTTP_BBS_URL.'/board.php?bo_table='.$bo_table.'&amp;wr_id='.$wr_id);
else {
$action = './password_check.php';
$return_url = './board.php?bo_table='.$bo_table;
$action = https_url(G5_BBS_DIR).'/password_check.php';
$return_url = G5_HTTP_BBS_URL.'/board.php?bo_table='.$bo_table;
}
break;
case 'sc' :
// 비밀번호 창에서 로그인 하는 경우 관리자 또는 자신의 글이면 바로 글보기로 감
if ($is_admin || ($member['mb_id'] == $write['mb_id'] && $write['mb_id']))
goto_url('./board.php?bo_table='.$bo_table.'&amp;wr_id='.$wr_id);
goto_url(G5_HTTP_BBS_URL.'/board.php?bo_table='.$bo_table.'&amp;wr_id='.$wr_id);
else {
$action = './password_check.php';
$return_url = './board.php?bo_table='.$bo_table.'&amp;wr_id='.$wr_id;
$action = https_url(G5_BBS_DIR).'/password_check.php';
$return_url = G5_HTTP_BBS_URL.'/board.php?bo_table='.$bo_table.'&amp;wr_id='.$wr_id;
}
break;
default :
+1 -1
View File
@@ -9,7 +9,7 @@ if (G5_IS_MOBILE) {
include_once('./_head.php');
echo conv_content($qaconfig['qa_mobile_content_head'], 1);
} else {
if($qaconfig['qa_include_head'])
if(is_include_path_check($qaconfig['qa_include_head']))
@include ($qaconfig['qa_include_head']);
else
include ('./_head.php');
+1 -1
View File
@@ -110,7 +110,7 @@ if(is_file($skin_file)) {
$list_href = G5_BBS_URL.'/qalist.php';
$write_href = G5_BBS_URL.'/qawrite.php';
$list_pages = preg_replace('/(\.php)(&amp;|&)/i', '$1?', get_paging(G5_IS_MOBILE ? $qaconfig['qa_mobile_page_rows'] : $qaconfig['qa_page_rows'], $page, $total_page, './qalist.php'.$qstr.'&amp;page='));
$list_pages = preg_replace('/(\.php)(&amp;|&)/i', '$1?', get_paging(G5_IS_MOBILE ? $config['cf_mobile_pages'] : $config['cf_write_pages'], $page, $total_page, './qalist.php'.$qstr.'&amp;page='));
$stx = get_text(stripslashes($stx));
include_once($skin_file);
+1 -1
View File
@@ -7,7 +7,7 @@ if (G5_IS_MOBILE) {
include_once('./_tail.php');
} else {
echo conv_content($qaconfig['qa_content_tail'], 1);
if($qaconfig['qa_include_tail'])
if(is_include_path_check($qaconfig['qa_include_tail']))
@include ($qaconfig['qa_include_tail']);
else
include ('./_tail.php');
+10 -6
View File
@@ -54,15 +54,19 @@ if ($stx) {
$g5_search['read_level'][] = $row['bo_read_level'];
}
$search_query = 'sfl='.urlencode($sfl).'&amp;stx='.urlencode($stx).'&amp;sop='.$sop;
$text_stx = get_text(stripslashes($stx));
$op1 = '';
// 검색어를 구분자로 나눈다. 여기서는 공백
$s = explode(' ', strip_tags($stx));
if( count($s) > 1 ){
$s = array_slice($s, 0, 2);
$stx = implode(' ', $s);
}
$text_stx = get_text(stripslashes($stx));
$search_query = 'sfl='.urlencode($sfl).'&amp;stx='.urlencode($stx).'&amp;sop='.$sop;
// 검색필드를 구분자로 나눈다. 여기서는 +
$field = explode('||', trim($sfl));
@@ -233,4 +237,4 @@ if (!$sop) $sop = 'or';
include_once($search_skin_path.'/search.skin.php');
include_once('./_tail.php');
?>
?>
+2
View File
@@ -118,6 +118,8 @@ else
$comment_max = (int)$board['bo_comment_max'];
}
$comment_action_url = https_url(G5_BBS_DIR)."/write_comment_update.php";
include_once($board_skin_path.'/view_comment.skin.php');
if (!$member['mb_id']) // 비회원일 경우에만
+5
View File
@@ -401,6 +401,11 @@ if(!is_mobile() || defined('G5_IS_MOBILE_DHTML_USE') && G5_IS_MOBILE_DHTML_USE)
if ($config['cf_editor'] && $is_dhtml_editor_use && $board['bo_use_dhtml_editor'] && $member['mb_level'] >= $board['bo_html_level']) {
$is_dhtml_editor = true;
if ( $w == 'u' && (! $is_member || ! $is_admin || $write['mb_id'] !== $member['mb_id']) ){
// kisa 취약점 제보 xss 필터 적용
$content = get_text(html_purifier($write['wr_content']), 0);
}
if(is_file(G5_EDITOR_PATH.'/'.$config['cf_editor'].'/autosave.editor.js'))
$editor_content_js = '<script src="'.G5_EDITOR_URL.'/'.$config['cf_editor'].'/autosave.editor.js"></script>'.PHP_EOL;
}
+1 -1
View File
@@ -337,5 +337,5 @@ else if ($w == 'cu') // 댓글 수정
delete_cache_latest($bo_table);
goto_url('./board.php?bo_table='.$bo_table.'&amp;wr_id='.$wr['wr_parent'].'&amp;'.$qstr.'&amp;#c_'.$comment_id);
goto_url(G5_HTTP_BBS_URL.'/board.php?bo_table='.$bo_table.'&amp;wr_id='.$wr['wr_parent'].'&amp;'.$qstr.'&amp;#c_'.$comment_id);
?>
+1 -1
View File
@@ -692,7 +692,7 @@ if (!($w == 'u' || $w == 'cu') && $config['cf_email_use'] && $board['bo_use_emai
delete_cache_latest($bo_table);
if ($file_upload_msg)
alert($file_upload_msg, G5_HTTP_BBS_URL.'/board.php?bo_table='.$bo_table.'&amp;wr_id='.$wr_id.'&amp;page='.$page.$qstr);
alert($file_upload_msg, G5_HTTP_BBS_URL.'/board.php?bo_table='.$bo_table.'&amp;wr_id='.$wr_id.$qstr);
else
goto_url(G5_HTTP_BBS_URL.'/board.php?bo_table='.$bo_table.'&amp;wr_id='.$wr_id.$qstr);
?>
+4 -3
View File
@@ -32,10 +32,11 @@ function g5_path()
$result['path'] = str_replace('\\', '/', dirname(__FILE__));
$tilde_remove = preg_replace('/^\/\~[^\/]+(.*)$/', '$1', $_SERVER['SCRIPT_NAME']);
$document_root = str_replace($tilde_remove, '', $_SERVER['SCRIPT_FILENAME']);
$root = str_replace($document_root, '', $result['path']);
$pattern = '/' . preg_quote($document_root, '/') . '/i';
$root = preg_replace($pattern, '', $result['path']);
$port = $_SERVER['SERVER_PORT'] != 80 ? ':'.$_SERVER['SERVER_PORT'] : '';
$http = 'http' . ((isset($_SERVER['HTTPS']) && $_SERVER['HTTPS']=='on') ? 's' : '') . '://';
$user = str_replace(str_replace($document_root, '', $_SERVER['SCRIPT_FILENAME']), '', $_SERVER['SCRIPT_NAME']);
$user = str_replace(preg_replace($pattern, '', $_SERVER['SCRIPT_FILENAME']), '', $_SERVER['SCRIPT_NAME']);
$host = isset($_SERVER['HTTP_HOST']) ? $_SERVER['HTTP_HOST'] : $_SERVER['SERVER_NAME'];
if(isset($_SERVER['HTTP_HOST']) && preg_match('/:[0-9]+$/', $host))
$host = preg_replace('/:[0-9]+$/', '', $host);
@@ -370,7 +371,7 @@ if ($_SESSION['ss_mb_id']) { // 로그인중이라면
$key = md5($_SERVER['SERVER_ADDR'] . $_SERVER['REMOTE_ADDR'] . $_SERVER['HTTP_USER_AGENT'] . $row['mb_password']);
// 쿠키에 저장된 키와 같다면
$tmp_key = get_cookie('ck_auto');
if ($tmp_key == $key && $tmp_key) {
if ($tmp_key === $key && $tmp_key) {
// 차단, 탈퇴가 아니고 메일인증이 사용이면서 인증을 받았다면
if ($row['mb_intercept_date'] == '' &&
$row['mb_leave_date'] == '' &&
+1 -1
View File
@@ -5,7 +5,7 @@
********************/
define('G5_VERSION', '그누보드5');
define('G5_GNUBOARD_VER', '5.2.5');
define('G5_GNUBOARD_VER', '5.2.9');
// 이 상수가 정의되지 않으면 각각의 개별 페이지는 별도로 실행될 수 없음
define('_GNUBOARD_', true);
+1 -1
View File
@@ -45,7 +45,7 @@ if (G5_IS_MOBILE) {
echo '<meta name="format-detection" content="telephone=no">'.PHP_EOL;
} else {
echo '<meta http-equiv="imagetoolbar" content="no">'.PHP_EOL;
echo '<meta http-equiv="X-UA-Compatible" content="IE=10,chrome=1">'.PHP_EOL;
echo '<meta http-equiv="X-UA-Compatible" content="IE=Edge">'.PHP_EOL;
}
if($config['cf_add_meta'])
+2
View File
@@ -1,4 +1,6 @@
<?php
@header('Content-Type: text/html; charset=utf-8');
@header('X-Robots-Tag: noindex');
include_once ('../config.php');
$title = G5_VERSION." 라이센스 확인 1/3";
include_once ('./install.inc.php');
+2
View File
@@ -5,6 +5,8 @@ header('Last-Modified: ' . $gmnow);
header('Cache-Control: no-store, no-cache, must-revalidate'); // HTTP/1.1
header('Cache-Control: pre-check=0, post-check=0, max-age=0'); // HTTP/1.1
header('Pragma: no-cache'); // HTTP/1.0
@header('Content-Type: text/html; charset=utf-8');
@header('X-Robots-Tag: noindex');
include_once ('../config.php');
$title = G5_VERSION." 초기환경설정 2/3";
+2
View File
@@ -6,6 +6,8 @@ header('Last-Modified: ' . $gmnow);
header('Cache-Control: no-store, no-cache, must-revalidate'); // HTTP/1.1
header('Cache-Control: pre-check=0, post-check=0, max-age=0'); // HTTP/1.1
header('Pragma: no-cache'); // HTTP/1.0
@header('Content-Type: text/html; charset=utf-8');
@header('X-Robots-Tag: noindex');
include_once ('../config.php');
include_once ('../lib/common.lib.php');
+1 -1
View File
@@ -719,7 +719,7 @@ function get_write_token(bo_table)
}
$(function() {
$(document).on("click", "form[name=fwrite] input:submit", function() {
$(document).on("click", "form[name=fwrite] input:submit, form[name=fwrite] button:submit", function() {
var f = this.form;
var bo_table = f.bo_table.value;
var token = get_write_token(bo_table);
+71 -3
View File
@@ -216,7 +216,7 @@ function url_auto_link($str)
// http://sir.kr/pg_lecture/463
$str = str_replace(array("&lt;", "&gt;", "&amp;", "&quot;", "&nbsp;", "&#039;"), array("\t_lt_\t", "\t_gt_\t", "&", "\"", "\t_nbsp_\t", "'"), $str);
//$str = preg_replace("`(?:(?:(?:href|src)\s*=\s*(?:\"|'|)){0})((http|https|ftp|telnet|news|mms)://[^\"'\s()]+)`", "<A HREF=\"\\1\" TARGET='{$config['cf_link_target']}'>\\1</A>", $str);
$str = preg_replace("/([^(href=\"?'?)|(src=\"?'?)]|\(|^)((http|https|ftp|telnet|news|mms):\/\/[a-zA-Z0-9\.-]+\.[가-힣\xA1-\xFEa-zA-Z0-9\.:&#=_\?\/~\+%@;\-\|\,\(\)]+)/i", "\\1<A HREF=\"\\2\" TARGET=\"{$config['cf_link_target']}\">\\2</A>", $str);
$str = preg_replace("/([^(href=\"?'?)|(src=\"?'?)]|\(|^)((http|https|ftp|telnet|news|mms):\/\/[a-zA-Z0-9\.-]+\.[가-힣\xA1-\xFEa-zA-Z0-9\.:&#!=_\?\/~\+%@;\-\|\,\(\)]+)/i", "\\1<A HREF=\"\\2\" TARGET=\"{$config['cf_link_target']}\">\\2</A>", $str);
$str = preg_replace("/(^|[\"'\s(])(www\.[^\"'\s()]+)/i", "\\1<A HREF=\"http://\\2\" TARGET=\"{$config['cf_link_target']}\">\\2</A>", $str);
$str = preg_replace("/[0-9a-z_-]+@[a-z0-9._-]{4,}/i", "<a href=\"mailto:\\0\">\\0</a>", $str);
$str = str_replace(array("\t_nbsp_\t", "\t_lt_\t", "\t_gt_\t", "'"), array("&nbsp;", "&lt;", "&gt;", "&#039;"), $str);
@@ -628,7 +628,7 @@ function get_sql_search($search_ca_name, $search_field, $search_text, $search_op
// SQL Injection 방지
// 필드값에 a-z A-Z 0-9 _ , | 이외의 값이 있다면 검색필드를 wr_subject 로 설정한다.
$field[$k] = preg_match("/^[\w\,\|]+$/", $field[$k]) ? $field[$k] : "wr_subject";
$field[$k] = preg_match("/^[\w\,\|]+$/", $field[$k]) ? strtolower($field[$k]) : "wr_subject";
$str .= $op2;
switch ($field[$k]) {
@@ -3197,7 +3197,7 @@ class str_encrypt
function __construct($salt='')
{
if(!$salt)
$this->salt = md5(G5_MYSQL_PASSWORD);
$this->salt = md5(preg_replace('/[^0-9A-Za-z]/', substr(G5_MYSQL_USER, -1), G5_MYSQL_PASSWORD));
else
$this->salt = $salt;
@@ -3259,4 +3259,72 @@ function check_write_token($bo_table)
return true;
}
function get_call_func_cache($func, $args=array()){
static $cache = array();
$key = md5(serialize($args));
if( isset($cache[$func]) && isset($cache[$func][$key]) ){
return $cache[$func][$key];
}
$result = null;
try{
$cache[$func][$key] = $result = call_user_func_array($func, $args);
} catch (Exception $e) {
return null;
}
return $result;
}
// include 하는 경로에 data file 경로가 포함되어 있는지 체크합니다.
function is_include_path_check($path='')
{
if( $path ){
try {
// whether $path is unix or not
$unipath = strlen($path)==0 || $path{0}!='/';
$unc = substr($path,0,2)=='\\\\'?true:false;
// attempts to detect if path is relative in which case, add cwd
if(strpos($path,':') === false && $unipath && !$unc){
$path=getcwd().DIRECTORY_SEPARATOR.$path;
if($path{0}=='/'){
$unipath = false;
}
}
// resolve path parts (single dot, double dot and double delimiters)
$path = str_replace(array('/', '\\'), DIRECTORY_SEPARATOR, $path);
$parts = array_filter(explode(DIRECTORY_SEPARATOR, $path), 'strlen');
$absolutes = array();
foreach ($parts as $part) {
if ('.' == $part){
continue;
}
if ('..' == $part) {
array_pop($absolutes);
} else {
$absolutes[] = $part;
}
}
$path = implode(DIRECTORY_SEPARATOR, $absolutes);
// resolve any symlinks
// put initial separator that could have been lost
$path = !$unipath ? '/'.$path : $path;
$path = $unc ? '\\\\'.$path : $path;
} catch (Exception $e) {
//echo 'Caught exception: ', $e->getMessage(), "\n";
return false;
}
}
if( !$path || preg_match('/\/data\/(file|editor)\/[A-Za-z0-9_]{1,20}\//', $path) ){
return false;
}
return true;
}
?>
+1 -1
View File
@@ -66,7 +66,7 @@ function latest($skin_dir='', $bo_table, $rows=10, $subject_len=40, $cache_time=
if($cache_fwrite) {
$handle = fopen($cache_file, 'w');
$cache_content = "<?php\nif (!defined('_GNUBOARD_')) exit;\n\$bo_subject='".$bo_subject."';\n\$list=".var_export($list, true)."?>";
$cache_content = "<?php\nif (!defined('_GNUBOARD_')) exit;\n\$bo_subject='".sql_escape_string($bo_subject)."';\n\$list=".var_export($list, true)."?>";
fwrite($handle, $cache_content);
fclose($handle);
}
+50 -18
View File
@@ -4,7 +4,7 @@ if (!defined('_GNUBOARD_')) exit;
@ini_set('memory_limit', '-1');
// 게시글리스트 썸네일 생성
function get_list_thumbnail($bo_table, $wr_id, $thumb_width, $thumb_height, $is_create=false, $is_crop=true, $crop_mode='center', $is_sharpen=false, $um_value='80/0.5/3')
function get_list_thumbnail($bo_table, $wr_id, $thumb_width, $thumb_height, $is_create=false, $is_crop=false, $crop_mode='center', $is_sharpen=false, $um_value='80/0.5/3')
{
global $g5, $config;
$filename = $alt = "";
@@ -238,10 +238,10 @@ function thumbnail($filename, $source_path, $target_path, $thumb_width, $thumb_h
$degree = 0;
if ($size[2] == 1) {
$src = imagecreatefromgif($source_file);
$src_transparency = imagecolortransparent($src);
$src = @imagecreatefromgif($source_file);
$src_transparency = @imagecolortransparent($src);
} else if ($size[2] == 2) {
$src = imagecreatefromjpeg($source_file);
$src = @imagecreatefromjpeg($source_file);
if(function_exists('exif_read_data')) {
// exif 정보를 기준으로 회전각도 구함
@@ -273,8 +273,8 @@ function thumbnail($filename, $source_path, $target_path, $thumb_width, $thumb_h
}
}
} else if ($size[2] == 3) {
$src = imagecreatefrompng($source_file);
imagealphablending($src, true);
$src = @imagecreatefrompng($source_file);
@imagealphablending($src, true);
} else {
return;
}
@@ -330,20 +330,52 @@ function thumbnail($filename, $source_path, $target_path, $thumb_width, $thumb_h
}
break;
}
}
$dst = imagecreatetruecolor($dst_w, $dst_h);
$dst = imagecreatetruecolor($dst_w, $dst_h);
if($size[2] == 3) {
imagealphablending($dst, false);
imagesavealpha($dst, true);
} else if($size[2] == 1) {
$palletsize = imagecolorstotal($src);
if($src_transparency >= 0 && $src_transparency < $palletsize) {
$transparent_color = imagecolorsforindex($src, $src_transparency);
$current_transparent = imagecolorallocate($dst, $transparent_color['red'], $transparent_color['green'], $transparent_color['blue']);
imagefill($dst, 0, 0, $current_transparent);
imagecolortransparent($dst, $current_transparent);
if($size[2] == 3) {
imagealphablending($dst, false);
imagesavealpha($dst, true);
} else if($size[2] == 1) {
$palletsize = imagecolorstotal($src);
if($src_transparency >= 0 && $src_transparency < $palletsize) {
$transparent_color = imagecolorsforindex($src, $src_transparency);
$current_transparent = imagecolorallocate($dst, $transparent_color['red'], $transparent_color['green'], $transparent_color['blue']);
imagefill($dst, 0, 0, $current_transparent);
imagecolortransparent($dst, $current_transparent);
}
}
} else { // 비율에 맞게 생성
$dst = imagecreatetruecolor($dst_w, $dst_h);
$bgcolor = imagecolorallocate($dst, 255, 255, 255); // 배경색
if($src_w > $src_h) {
$tmp_h = round(($dst_w * $src_h) / $src_w);
$dst_y = round(($dst_h - $tmp_h) / 2);
$dst_h = $tmp_h;
} else {
$tmp_w = round(($dst_h * $src_w) / $src_h);
$dst_x = round(($dst_w - $tmp_w) / 2);
$dst_w = $tmp_w;
}
if($size[2] == 3) {
$bgcolor = imagecolorallocatealpha($dst, 0, 0, 0, 127);
imagefill($dst, 0, 0, $bgcolor);
imagealphablending($dst, false);
imagesavealpha($dst, true);
} else if($size[2] == 1) {
$palletsize = imagecolorstotal($src);
if($src_transparency >= 0 && $src_transparency < $palletsize) {
$transparent_color = imagecolorsforindex($src, $src_transparency);
$current_transparent = imagecolorallocate($dst, $transparent_color['red'], $transparent_color['green'], $transparent_color['blue']);
imagefill($dst, 0, 0, $current_transparent);
imagecolortransparent($dst, $current_transparent);
} else {
imagefill($dst, 0, 0, $bgcolor);
}
} else {
imagefill($dst, 0, 0, $bgcolor);
}
}
} else {
+1 -1
View File
@@ -1 +1 @@
5.2.19
5.2.22
+71 -15
View File
@@ -31,7 +31,7 @@ class PHPMailer
* The PHPMailer Version number.
* @var string
*/
public $Version = '5.2.19';
public $Version = '5.2.22';
/**
* Email priority.
@@ -1364,19 +1364,24 @@ class PHPMailer
*/
protected function sendmailSend($header, $body)
{
if (!empty($this->Sender)) {
// CVE-2016-10033, CVE-2016-10045: Don't pass -f if characters will be escaped.
if (!empty($this->Sender) and self::isShellSafe($this->Sender)) {
if ($this->Mailer == 'qmail') {
$sendmail = sprintf('%s -f%s', escapeshellcmd($this->Sendmail), escapeshellarg($this->Sender));
$sendmailFmt = '%s -f%s';
} else {
$sendmail = sprintf('%s -oi -f%s -t', escapeshellcmd($this->Sendmail), escapeshellarg($this->Sender));
$sendmailFmt = '%s -oi -f%s -t';
}
} else {
if ($this->Mailer == 'qmail') {
$sendmail = sprintf('%s', escapeshellcmd($this->Sendmail));
$sendmailFmt = '%s';
} else {
$sendmail = sprintf('%s -oi -t', escapeshellcmd($this->Sendmail));
$sendmailFmt = '%s -oi -t';
}
}
// TODO: If possible, this should be changed to escapeshellarg. Needs thorough testing.
$sendmail = sprintf($sendmailFmt, escapeshellcmd($this->Sendmail), $this->Sender);
if ($this->SingleTo) {
foreach ($this->SingleToArray as $toAddr) {
if (!@$mail = popen($sendmail, 'w')) {
@@ -1422,6 +1427,40 @@ class PHPMailer
return true;
}
/**
* Fix CVE-2016-10033 and CVE-2016-10045 by disallowing potentially unsafe shell characters.
*
* Note that escapeshellarg and escapeshellcmd are inadequate for our purposes, especially on Windows.
* @param string $string The string to be validated
* @see https://github.com/PHPMailer/PHPMailer/issues/924 CVE-2016-10045 bug report
* @access protected
* @return boolean
*/
protected static function isShellSafe($string)
{
// Future-proof
if (escapeshellcmd($string) !== $string
or !in_array(escapeshellarg($string), array("'$string'", "\"$string\""))
) {
return false;
}
$length = strlen($string);
for ($i = 0; $i < $length; $i++) {
$c = $string[$i];
// All other characters have a special meaning in at least one common shell, including = and +.
// Full stop (.) has a special meaning in cmd.exe, but its impact should be negligible here.
// Note that this does permit non-Latin alphanumeric characters based on the current locale.
if (!ctype_alnum($c) && strpos('@_-.', $c) === false) {
return false;
}
}
return true;
}
/**
* Send mail using the PHP mail() function.
* @param string $header The message headers
@@ -1442,7 +1481,10 @@ class PHPMailer
$params = null;
//This sets the SMTP envelope sender which gets turned into a return-path header by the receiver
if (!empty($this->Sender) and $this->validateAddress($this->Sender)) {
$params = sprintf('-f%s', escapeshellarg($this->Sender));
// CVE-2016-10033, CVE-2016-10045: Don't pass -f if characters will be escaped.
if (self::isShellSafe($this->Sender)) {
$params = sprintf('-f%s', $this->Sender);
}
}
if (!empty($this->Sender) and !ini_get('safe_mode') and $this->validateAddress($this->Sender)) {
$old_from = ini_get('sendmail_from');
@@ -2450,6 +2492,7 @@ class PHPMailer
/**
* Add an attachment from a path on the filesystem.
* Never use a user-supplied path to a file!
* Returns false if the file could not be found or read.
* @param string $path Path to the attachment.
* @param string $name Overrides the attachment name.
@@ -2975,6 +3018,7 @@ class PHPMailer
* displayed inline with the message, not just attached for download.
* This is used in HTML messages that embed the images
* the HTML refers to using the $cid value.
* Never use a user-supplied path to a file!
* @param string $path Path to the attachment.
* @param string $cid Content ID of the attachment; Use this to reference
* the content when using an embedded image in HTML.
@@ -3338,12 +3382,14 @@ class PHPMailer
* Create a message body from an HTML string.
* Automatically inlines images and creates a plain-text version by converting the HTML,
* overwriting any existing values in Body and AltBody.
* $basedir is used when handling relative image paths, e.g. <img src="images/a.png">
* Do not source $message content from user input!
* $basedir is prepended when handling relative URLs, e.g. <img src="/images/a.png"> and must not be empty
* will look for an image file in $basedir/images/a.png and convert it to inline.
* If you don't want to apply these transformations to your HTML, just set Body and AltBody yourself.
* If you don't provide a $basedir, relative paths will be left untouched (and thus probably break in email)
* If you don't want to apply these transformations to your HTML, just set Body and AltBody directly.
* @access public
* @param string $message HTML message string
* @param string $basedir base directory for relative paths to images
* @param string $basedir Absolute path to a base directory to prepend to relative paths to images
* @param boolean|callable $advanced Whether to use the internal HTML to text converter
* or your own custom converter @see PHPMailer::html2text()
* @return string $message The transformed message Body
@@ -3352,6 +3398,10 @@ class PHPMailer
{
preg_match_all('/(src|background)=["\'](.*)["\']/Ui', $message, $images);
if (array_key_exists(2, $images)) {
if (strlen($basedir) > 1 && substr($basedir, -1) != '/') {
// Ensure $basedir has a trailing /
$basedir .= '/';
}
foreach ($images[2] as $imgindex => $url) {
// Convert data URIs into embedded images
if (preg_match('#^data:(image[^;,]*)(;base64)?,#', $url, $match)) {
@@ -3369,18 +3419,24 @@ class PHPMailer
$message
);
}
} elseif (substr($url, 0, 4) !== 'cid:' && !preg_match('#^[a-z][a-z0-9+.-]*://#i', $url)) {
// Do not change urls for absolute images (thanks to corvuscorax)
continue;
}
if (
// Only process relative URLs if a basedir is provided (i.e. no absolute local paths)
!empty($basedir)
// Ignore URLs containing parent dir traversal (..)
&& (strpos($url, '..') === false)
// Do not change urls that are already inline images
&& substr($url, 0, 4) !== 'cid:'
// Do not change absolute URLs, including anonymous protocol
&& !preg_match('#^[a-z][a-z0-9+.-]*:?//#i', $url)
) {
$filename = basename($url);
$directory = dirname($url);
if ($directory == '.') {
$directory = '';
}
$cid = md5($url) . '@phpmailer.0'; // RFC2392 S 2
if (strlen($basedir) > 1 && substr($basedir, -1) != '/') {
$basedir .= '/';
}
if (strlen($directory) > 1 && substr($directory, -1) != '/') {
$directory .= '/';
}
+1 -1
View File
@@ -34,7 +34,7 @@ class POP3
* @var string
* @access public
*/
public $Version = '5.2.19';
public $Version = '5.2.22';
/**
* Default POP3 port number.
+2 -2
View File
@@ -30,7 +30,7 @@ class SMTP
* The PHPMailer SMTP version number.
* @var string
*/
const VERSION = '5.2.19';
const VERSION = '5.2.22';
/**
* SMTP line break constant.
@@ -81,7 +81,7 @@ class SMTP
* @deprecated Use the `VERSION` constant instead
* @see SMTP::VERSION
*/
public $Version = '5.2.19';
public $Version = '5.2.22';
/**
* SMTP server port number.
@@ -0,0 +1,71 @@
<?php
/**
* This example shows how to handle a simple contact form.
*/
$msg = '';
//Don't run this unless we're handling a form submission
if (array_key_exists('email', $_POST)) {
date_default_timezone_set('Etc/UTC');
require '../PHPMailerAutoload.php';
//Create a new PHPMailer instance
$mail = new PHPMailer;
//Tell PHPMailer to use SMTP - requires a local mail server
//Faster and safer than using mail()
$mail->isSMTP();
$mail->Host = 'localhost';
$mail->Port = 25;
//Use a fixed address in your own domain as the from address
//**DO NOT** use the submitter's address here as it will be forgery
//and will cause your messages to fail SPF checks
$mail->setFrom('from@example.com', 'First Last');
//Send the message to yourself, or whoever should receive contact for submissions
$mail->addAddress('whoto@example.com', 'John Doe');
//Put the submitter's address in a reply-to header
//This will fail if the address provided is invalid,
//in which case we should ignore the whole request
if ($mail->addReplyTo($_POST['email'], $_POST['name'])) {
$mail->Subject = 'PHPMailer contact form';
//Keep it simple - don't use HTML
$mail->isHTML(false);
//Build a simple message body
$mail->Body = <<<EOT
Email: {$_POST['email']}
Name: {$_POST['name']}
Message: {$_POST['message']}
EOT;
//Send the message, check for errors
if (!$mail->send()) {
//The reason for failing to send will be in $mail->ErrorInfo
//but you shouldn't display errors to users - process the error, log it on your server.
$msg = 'Sorry, something went wrong. Please try again later.';
} else {
$msg = 'Message sent! Thanks for contacting us.';
}
} else {
$msg = 'Invalid email address, message ignored.';
}
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Contact form</title>
</head>
<body>
<h1>Contact us</h1>
<?php if (!empty($msg)) {
echo "<h2>$msg</h2>";
} ?>
<form method="POST">
<label for="name">Name: <input type="text" name="name" id="name"></label><br>
<label for="email">Email address: <input type="email" name="email" id="email"></label><br>
<label for="message">Message: <textarea name="message" id="message" rows="8" cols="20"></textarea></label><br>
<input type="submit" value="Send">
</form>
</body>
</html>
@@ -15,6 +15,7 @@
<p>Russian text: Пустое тело сообщения</p>
<p>Armenian text: Հաղորդագրությունը դատարկ է</p>
<p>Czech text: Prázdné tělo zprávy</p>
<p>Emoji: <span style="font-size: 48px">😂 🦄 💥 📤 📧</span></p>
</div>
</body>
</html>
+1 -1
View File
@@ -259,7 +259,7 @@ if (XRegExp) {
//---------------------------------
// Overriden native methods
// Overridden native methods
//---------------------------------
// Adds named capture support (with backreferences returned as `result.name`), and fixes two
@@ -17,7 +17,7 @@ if (array_key_exists('userfile', $_FILES)) {
$mail->setFrom('from@example.com', 'First Last');
$mail->addAddress('whoto@example.com', 'John Doe');
$mail->Subject = 'PHPMailer file sender';
$mail->msgHTML("My message body");
$mail->Body = 'My message body';
// Attach the uploaded file
$mail->addAttachment($uploadfile, 'My uploaded file');
if (!$mail->send()) {
@@ -12,7 +12,7 @@ if (array_key_exists('userfile', $_FILES)) {
$mail->setFrom('from@example.com', 'First Last');
$mail->addAddress('whoto@example.com', 'John Doe');
$mail->Subject = 'PHPMailer file sender';
$mail->msgHTML('My message body');
$mail->Body = 'My message body';
//Attach multiple files one by one
for ($ct = 0; $ct < count($_FILES['userfile']['tmp_name']); $ct++) {
$uploadfile = tempnam(sys_get_temp_dir(), sha1($_FILES['userfile']['name'][$ct]));
+3 -3
View File
@@ -433,7 +433,7 @@ function tln_getnxtag($body, $offset)
*
* @param string $attvalue the by-ref value to check.
* @param string $regex the regular expression to check against.
* @param boolean $hex whether the entites are hexadecimal.
* @param boolean $hex whether the entities are hexadecimal.
* @return boolean True or False depending on whether there were matches.
*/
function tln_deent(&$attvalue, $regex, $hex = false)
@@ -772,7 +772,7 @@ function tln_fixstyle($body, $pos, $trans_image_path, $block_external_images)
tln_defang($contentTemp);
tln_unspace($contentTemp);
$match = Array('/\/\*.*\*\//',
$match = array('/\/\*.*\*\//',
'/expression/i',
'/behaviou*r/i',
'/binding/i',
@@ -780,7 +780,7 @@ function tln_fixstyle($body, $pos, $trans_image_path, $block_external_images)
'/javascript/i',
'/script/i',
'/position/i');
$replace = Array('','idiocy', 'idiocy', 'idiocy', 'idiocy', 'idiocy', 'idiocy', '');
$replace = array('','idiocy', 'idiocy', 'idiocy', 'idiocy', 'idiocy', 'idiocy', '');
$contentNew = preg_replace($match, $replace, $contentTemp);
if ($contentNew !== $contentTemp) {
$content = $contentNew;
+380
View File
@@ -0,0 +1,380 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
// ================================================================
// CHEditor Template
// ================================================================
-->
<Template>
<Container>
<Html>
<![CDATA[
<div class="cheditor-container">
<div id="toolbar" style="padding:4px;height:47px"></div>
<div id="editWrapper" class="cheditor-editarea-wrapper">
<iframe frameborder="0" class="cheditor-editarea"></iframe>
<textarea class="cheditor-editarea-text-content" spellcheck="false"></textarea>
</div>
<div id="modifyBlock" class="cheditor-modify-block"></div>
<div id="tagPath" class="cheditor-tag-path">
<span class="cheditor-status-bar">&lt;html&gt; </span>
</div>
<div id="resizeBar" class="cheditor-resizebar"></div>
<div id="viewMode" class="cheditor-viewmode">
<div id="rich" class="cheditor-tab-rich" title="입력 모드" alt="">&#160;</div>
<div id="code" class="cheditor-tab-code-off" title="HTML 편집" alt="">&#160;</div>
<div id="preview" class="cheditor-tab-preview-off" title="미리 보기" alt="">&#160;</div>
</div>
</div>
]]>
</Html>
</Container>
<PopupWindow>
<Html>
<![CDATA[
<div class="cheditor-popup-window" onselectstart="return false">
<div class="cheditor-popup-drag-handle">
<div class="cheditor-popup-titlebar">
<span><label class="cheditor-popup-title"></label></span>
</div>
</div>
<div class="cheditor-popup-cframe" id="cheditor-popup-cframe"></div>
</div>
]]>
</Html>
</PopupWindow>
<Toolbar>
<Image file="toolbar.png" />
<Group name="Print">
<Button name="Print" tooltip="인쇄">
<Attribute class="cheditor-tb-bg" width="24" height="23">
<Icon position="0" width="16" class="cheditor-tb-icon" margin="4px" />
<Execution method="doCmd" value="Print" />
</Attribute>
</Button>
<Button name="NewDocument" tooltip="새 문서">
<Attribute class="cheditor-tb-bg" width="23" height="23">
<Icon position="16" width="16" class="cheditor-tb-icon" />
<Execution method="doCmd" value="NewDocument" />
</Attribute>
</Button>
</Group>
<Group name="Undo">
<Button name="Undo" tooltip="되돌리기">
<Attribute class="cheditor-tb-bg" width="24" height="23">
<Icon position="32" width="16" class="cheditor-tb-icon" margin="4px" />
<Execution method="doCmd" value="Undo" />
</Attribute>
</Button>
<Button name="Redo" tooltip="다시 실행">
<Attribute class="cheditor-tb-bg" width="23" height="23">
<Icon position="48" width="16" class="cheditor-tb-icon" />
<Execution method="doCmd" value="Redo" />
</Attribute>
</Button>
</Group>
<Group name="Edit">
<Button name="Copy" tooltip="복사하기">
<Attribute class="cheditor-tb-bg" width="24" height="23" check="1">
<Icon position="64" width="16" class="cheditor-tb-icon" margin="4px" />
<Execution method="doCmd" value="Copy" />
</Attribute>
</Button>
<Button name="Cut" tooltip="오려두기">
<Attribute class="cheditor-tb-bg" width="23" height="23" check="1">
<Icon position="80" width="16" class="cheditor-tb-icon" />
<Execution method="doCmd" value="Cut" />
</Attribute>
</Button>
<Button name="Paste" tooltip="텍스트로 붙이기">
<Attribute class="cheditor-tb-bg" width="23" height="23">
<Icon position="96" width="16" class="cheditor-tb-icon" />
<Execution method="doCmd" value="Paste" />
</Attribute>
</Button>
<Button name="PasteFromWord" tooltip="MS 워드 붙이기">
<Attribute class="cheditor-tb-bg" width="23" height="23">
<Icon position="112" width="16" class="cheditor-tb-icon" />
<Execution method="doCmd" value="PasteFromWord" />
</Attribute>
</Button>
<Button name="SelectAll" tooltip="전체 선택">
<Attribute class="cheditor-tb-bg" width="23" height="23">
<Icon position="128" width="16" class="cheditor-tb-icon" />
<Execution method="doCmd" value="SelectAll" />
</Attribute>
</Button>
</Group>
<Group name="Color">
<Button name="BackColor" tooltip="형광펜">
<Attribute class="cheditor-tb-bg30" width="30" default="#fff" height="23" check="1">
<Icon position="240" width="23" class="cheditor-tb-icon23" />
<Execution method="showPulldown" value="BackColor" />
</Attribute>
</Button>
<Button name="ForeColor" tooltip="글자색">
<Attribute class="cheditor-tb-bg30" width="30" default="#000" height="23" check="1">
<Icon position="263" width="23" class="cheditor-tb-icon23" />
<Execution method="showPulldown" value="ForeColor" />
</Attribute>
</Button>
</Group>
<Group name="Format">
<Button name="Bold" tooltip="진하게">
<Attribute class="cheditor-tb-bg" width="24" height="23" check="1">
<Icon position="144" width="16" class="cheditor-tb-icon" margin="4px" />
<Execution method="doCmd" value="Bold" />
</Attribute>
</Button>
<Button name="Italic" tooltip="기울임">
<Attribute class="cheditor-tb-bg" width="23" height="23" check="1">
<Icon position="160" width="16" class="cheditor-tb-icon" />
<Execution method="doCmd" value="Italic" />
</Attribute>
</Button>
<Button name="Underline" tooltip="밑줄">
<Attribute class="cheditor-tb-bg" width="23" height="23" check="1">
<Icon position="176" width="16" class="cheditor-tb-icon" />
<Execution method="doCmd" value="Underline" />
</Attribute>
</Button>
<Button name="Strikethrough" tooltip="취소선">
<Attribute class="cheditor-tb-bg" width="23" height="23" check="1">
<Icon position="192" width="16" class="cheditor-tb-icon" />
<Execution method="doCmd" value="Strikethrough" />
</Attribute>
</Button>
<Button name="Superscript" tooltip="위 첨자">
<Attribute class="cheditor-tb-bg" width="23" height="23" use="" check="1">
<Icon position="208" width="16" class="cheditor-tb-icon" />
<Execution method="doCmd" value="Superscript" />
</Attribute>
</Button>
<Button name="Subscript" tooltip="아래 첨자">
<Attribute class="cheditor-tb-bg" width="23" height="23" use="" check="1">
<Icon position="224" width="16" class="cheditor-tb-icon" />
<Execution method="doCmd" value="Subscript" />
</Attribute>
</Button>
</Group>
<Group name="Alignment">
<Button name="JustifyLeft" tooltip="왼쪽 정렬">
<Attribute class="cheditor-tb-bg" width="24" height="23" check="1">
<Icon position="286" width="16" class="cheditor-tb-icon" margin="4px" />
<Execution method="doCmd" value="JustifyLeft" />
</Attribute>
</Button>
<Button name="JustifyCenter" tooltip="가운데 정렬">
<Attribute class="cheditor-tb-bg" width="23" height="23" check="1">
<Icon position="302" width="16" class="cheditor-tb-icon" />
<Execution method="doCmd" value="JustifyCenter" />
</Attribute>
</Button>
<Button name="JustifyRight" tooltip="오른쪽 정렬">
<Attribute class="cheditor-tb-bg" width="23" height="23" check="1">
<Icon position="318" width="16" class="cheditor-tb-icon" />
<Execution method="doCmd" value="JustifyRight" />
</Attribute>
</Button>
<Button name="JustifyFull" tooltip="양쪽 정렬">
<Attribute class="cheditor-tb-bg" width="23" height="23" check="1">
<Icon position="334" width="16" class="cheditor-tb-icon" />
<Execution method="doCmd" value="JustifyFull" />
</Attribute>
</Button>
</Group>
<Group name="List">
<Button name="OrderedList" tooltip="문단 번호">
<Attribute class="cheditor-tb-bg" width="24" height="23" check="1" type="combo">
<Icon position="350" width="16" class="cheditor-tb-icon" margin="4px" />
<Execution method="doCmd" value="InsertOrderedList" />
</Attribute>
</Button>
<Button name="OrderedListCombo" tooltip="문단 번호 확장">
<Attribute class="cheditor-tb-bgcombo" width="10" height="23" type="combobox" node="OrderedList">
<Icon width="10" class="cheditor-tb-combo" margin="0px" />
<Execution method="showPulldown" value="OrderedList" />
</Attribute>
</Button>
<Button name="UnOrderedList" tooltip="글 머리표">
<Attribute class="cheditor-tb-bg" width="23" height="23" check="1" type="combo">
<Icon position="366" width="16" class="cheditor-tb-icon" />
<Execution method="doCmd" value="InsertUnOrderedList" />
</Attribute>
</Button>
<Button name="UnOrderedListCombo" tooltip="글 머리표 확장">
<Attribute class="cheditor-tb-bgcombo" width="10" height="23" type="combobox" node="UnOrderedList">
<Icon width="10" class="cheditor-tb-combo" margin="0px" />
<Execution method="showPulldown" value="UnOrderedList" />
</Attribute>
</Button>
</Group>
<Group name="Outdent">
<Button name="Outdent" tooltip="왼쪽 여백 줄이기">
<Attribute class="cheditor-tb-bg" width="24" height="23">
<Icon position="382" width="16" class="cheditor-tb-icon" />
<Execution method="doCmd" value="Outdent" />
</Attribute>
</Button>
<Button name="Indent" tooltip="왼쪽 여백 늘이기">
<Attribute class="cheditor-tb-bg" width="23" height="23">
<Icon position="398" width="16" class="cheditor-tb-icon" />
<Execution method="doCmd" value="Indent" />
</Attribute>
</Button>
</Group>
<Group name="Split">
</Group>
<Group name="FormatBlock">
<Button name="FormatBlock" tooltip="스타일">
<Attribute class="cheditor-tb-bg55" width="55" height="23" check="1">
<Icon class="cheditor-tb-text" alt="스타일" />
<Execution method="showPulldown" value="FormatBlock" />
</Attribute>
</Button>
</Group>
<Group name="FontName">
<Button name="FontName" tooltip="글꼴">
<Attribute class="cheditor-tb-bg55" width="55" height="23" check="1">
<Icon class="cheditor-tb-text" alt="굴림" />
<Execution method="showPulldown" value="FontName" />
</Attribute>
</Button>
</Group>
<Group name="FontSize">
<Button name="FontSize" tooltip="글꼴 크기">
<Attribute class="cheditor-tb-bg40" width="41" height="23" check="1">
<Icon class="cheditor-tb-text" alt="9pt" />
<Execution method="showPulldown" value="FontSize" />
</Attribute>
</Button>
</Group>
<Group name="LineHeight">
<Button name="LineHeight" tooltip="줄 간격">
<Attribute class="cheditor-tb-bg55" width="55" height="23" check="1">
<Icon class="cheditor-tb-text" alt="줄 간격" />
<Execution method="showPulldown" value="LineHeight" />
</Attribute>
</Button>
</Group>
<Group name="RemoveFormat">
<Button name="RemoveFormat" tooltip="서식 지우기">
<Attribute class="cheditor-tb-bg" width="24" height="23">
<Icon position="414" width="16" class="cheditor-tb-icon" margin="4px" />
<Execution method="doCmd" value="RemoveFormat" />
</Attribute>
</Button>
<Button name="ClearTag" tooltip="모든 HTML 태그 제거">
<Attribute class="cheditor-tb-bg" width="23" height="23">
<Icon position="430" width="16" class="cheditor-tb-icon" />
<Execution method="doCmd" value="ClearTag" />
</Attribute>
</Button>
</Group>
<Group name="Insert">
<Button name="TextBlock" tooltip="글 상자">
<Attribute class="cheditor-tb-bg" width="24" height="23" check="1">
<Icon position="446" width="16" class="cheditor-tb-icon" margin="4px" />
<Execution method="showPulldown" value="TextBlock" />
</Attribute>
</Button>
<Button name="Symbol" tooltip="특수 문자">
<Attribute class="cheditor-tb-bg" width="23" height="23">
<Icon position="462" width="16" class="cheditor-tb-icon" />
<Execution method="windowOpen" value="Symbol" />
</Attribute>
</Button>
<Button name="HR" tooltip="가로줄">
<Attribute class="cheditor-tb-bg" width="23" height="23">
<Icon position="478" width="16" class="cheditor-tb-icon" />
<Execution method="doCmd" value="InsertHorizontalRule" />
</Attribute>
</Button>
<Button name="SmileyIcon" tooltip="표정 아이콘">
<Attribute class="cheditor-tb-bg" width="23" height="23">
<Icon position="494" width="16" class="cheditor-tb-icon" />
<Execution method="windowOpen" value="EmotionIcon" />
</Attribute>
</Button>
</Group>
<Group name="Table">
<Button name="Table" tooltip="표 만들기">
<Attribute class="cheditor-tb-bg" width="24" height="23">
<Icon position="510" width="16" class="cheditor-tb-icon" margin="4px" />
<Execution method="windowOpen" value="Table" />
</Attribute>
</Button>
<Button name="ModifyTable" tooltip="표 수정">
<Attribute class="cheditor-tb-bg" width="23" height="23">
<Icon position="526" width="16" class="cheditor-tb-icon" />
<Execution method="windowOpen" value="ModifyTable" />
</Attribute>
</Button>
<Button name="Layout" tooltip="레이아웃">
<Attribute class="cheditor-tb-bg" width="23" height="23">
<Icon position="542" width="16" class="cheditor-tb-icon" />
<Execution method="windowOpen" value="Layout" />
</Attribute>
</Button>
</Group>
<Group name="Link">
<Button name="Link" tooltip="하이퍼링크">
<Attribute class="cheditor-tb-bg" width="24" height="23">
<Icon position="558" width="16" class="cheditor-tb-icon" margin="4px" />
<Execution method="windowOpen" value="Link" />
</Attribute>
</Button>
<Button name="UnLink" tooltip="하이퍼링크 없애기">
<Attribute class="cheditor-tb-bg" width="23" height="23" check="1">
<Icon position="574" width="16" class="cheditor-tb-icon" />
<Execution method="doCmd" value="UnLink" />
</Attribute>
</Button>
</Group>
<Group name="ImageUpload">
<Button name="Image" tooltip="내 PC 사진 넣기">
<Attribute class="cheditor-tb-bg44" width="50" height="23">
<Icon position="590" width="36" class="cheditor-tb-icon36" margin="6px" />
<Execution method="windowOpen" value="ImageUpload" />
</Attribute>
</Button>
</Group>
<Group name="ImageWeb">
<Button name="ImageUrl" tooltip="웹 사진">
<Attribute class="cheditor-tb-bg44" width="50" height="23">
<Icon position="626" width="36" class="cheditor-tb-icon36" margin="6px" />
<Execution method="windowOpen" value="ImageUrl" />
</Attribute>
</Button>
</Group>
<Group name="Media">
<Button name="Flash" tooltip="플래쉬 동영상">
<Attribute class="cheditor-tb-bg" width="24" height="23">
<Icon position="662" width="16" class="cheditor-tb-icon" margin="4px" />
<Execution method="windowOpen" value="FlashMovie" />
</Attribute>
</Button>
<Button name="Media" tooltip="미디어">
<Attribute class="cheditor-tb-bg" width="23" height="23">
<Icon position="678" width="16" class="cheditor-tb-icon" />
<Execution method="windowOpen" value="Embed" />
</Attribute>
</Button>
<Button name="Map" tooltip="지도">
<Attribute class="cheditor-tb-bg" width="23" height="23">
<Icon position="694" width="16" class="cheditor-tb-icon" />
<Execution method="windowOpen" value="GoogleMap" />
</Attribute>
</Button>
</Group>
<Group name="PageBreak">
<Button name="PageBreak" tooltip="인쇄 쪽 나눔">
<Attribute class="cheditor-tb-bg" width="24" height="23">
<Icon position="710" width="16" class="cheditor-tb-icon" margin="4px" />
<Execution method="doCmd" value="PageBreak" />
</Attribute>
</Button>
</Group>
</Toolbar>
</Template>
File diff suppressed because it is too large Load Diff
Binary file not shown.
Binary file not shown.
+185
View File
@@ -0,0 +1,185 @@
body {
background-color: #fff;
margin: 0;
border: 0;
padding: 0;
font-size: 9pt;
font-family: "Malgun Gothic", "Apple SD Gothic Neo", gulim, monospace;
line-height: 1em;
overflow: hidden;
}
td, input {
font-size: 9pt;
vertical-align: middle;
margin: 0;
line-height: 15px;
height: 15px;
}
select {
font-size: 9pt;
vertical-align: middle;
margin: 0;
}
.handCursor {
cursor: pointer;
}
td.hover
{
background-color : Fuchsia;
}
table.dlg {
border: 0;
}
fieldset {
border: 1px solid #ccc;
padding: 2px;
margin: 0;
}
.content-outline {
border: 1px solid #ccc;
border-radius: 4px;
padding: 5px;
margin: 0;
}
.dlg td {
text-align: left;
height: 20px;
}
form {
display: inline;
}
.dlg input {
border: 2px;
}
.img {
border: 0;
vertical-align: middle;
}
.font-normal {
font-size: 9pt;
}
legend {
font-size: 9pt;
font-weight: bold;
}
.bottom-status {
background-color: #fff;
margin-top: 10px;
padding: 0;
text-align: center;
height: 24px;
vertical-align: middle;
}
.button {
width: 64px;
height: 22px;
margin: 1px 2px;
cursor: pointer;
vertical-align: middle;
}
.button8em {
font-size: 9pt;
padding-top: 2px !important;
height: 21px;
width: 8em;
}
.button10em {
font-size: 9pt;
padding-top: 1px !important;
height: 21px;
width: 10em;
}
.emIcon {
width: 19px;
height: 19px;
cursor: pointer;
}
.schar {
border: 1px solid #ccc;
background-color: #fff;
width: 18px;
height: 17px;
text-align: center;
cursor: pointer;
font-size: 12px;
line-height: 1.2em;
}
.spacer {
margin: 10px 0 0 0;
}
.spacer5 {
margin: 5px 0 0 0;
clear: both;
}
.wrapper {
text-align: center;
}
.clear {
clear: both;
}
.flash-movie-source {
margin: 0 auto;
}
.flash-player-wrapper {
width: 560px;
height: 315px;
border: 1px #a0a0a0 solid;
text-align: center;
overflow: auto;
margin: 0 auto;
background-color: #fff;
display: block;
}
.media-player-wrapper {
height: 200px;
margin-top: 5px;
text-align: center;
overflow-x: auto;
overflow-y: hidden;
}
.hr {
border: 0;
background: #e0e0e0;
height: 1px;
}
.colorCellMouseOver {
line-height: 0;
font-size: 0;
height: 8px;
width: 8px;
border: 1px solid #fff;
}
.colorCellMouseOut {
line-height: 8px;
font-size: 0;
height: 8px;
width: 8px;
border: 1px solid #000;
}
.colorInputBox {
background-color: #000;
text-align: center;
border: 1px solid #000;
height: 16px;
}
.colorWrapper {
border: 1px solid #000;
background-color: #fff;
position: absolute;
padding: 2px;
display: none;
}
.colorPickerButton {
background: url("../icons/button/color_picker.png") no-repeat center center;
width: 24px;
height: 20px;
cursor: pointer;
float: left;
}
.colorPickerButtonGray {
background: url("../icons/button/color_picker_disable.png") no-repeat center center;
width: 24px;
height: 20px;
cursor: pointer;
float: left;
}
+23
View File
@@ -0,0 +1,23 @@
html, body {
}
p {
margin: 0;
}
table, td, th { border:1px dotted #ccc; }
table { border-collapse: collapse }
/*-------------------------------------------------------------------------------*/
.ch_bogus_spacer {}
.cheditor-zero-width { font-family: monospace; }
.cheditor-insertpara-pointer {
height: 1px;
display: none;
overflow: hidden;
background-color: red;
position: absolute;
}
.cheditor-add-paragraph {
border: #999 dotted 1px;
margin: 1px 0px;
}
+136
View File
@@ -0,0 +1,136 @@
#uploadWindow {
display: none;
}
.clear { clear: both; }
#container {
padding: 0;
}
.imageListWrapperHtml5, .imageListWrapper, .dragOver {
background-color: #fff;
position: absolute;
height: 295px;
width: 522px;
overflow-y: scroll;
border-radius: 4px;
border: 1px red solid;
}
.imageListWrapperHtml5 {
border: 2px #66b2ff dashed;
}
.imageListWrapper {
border: 1px #aaa solid;
box-shadow: 0 0 3px #aaa;
}
.dragOver {
border: 2px #ff3399 dashed;
}
#imageInfoBox {
position: absolute;
left: 548px;
}
.imageInfoTitle {
text-align: center;
background-color: #e0e0e0;
width: 130px;
font-family: "Malgun Gothic",gulim;
font-weight: bold;
font-size: 12px;
}
.imageInfoTitle span {
display: inline-block;
margin-top: -1px;
line-height: 22px;
}
.remove-button {
width: 93px;
height: 22px;
cursor: pointer;
vertical-align: middle;
}
.imageBox, .imageBoxHighlighted {
width: 120px;
height: 90px;
margin: 3px 3px;
float: left;
}
.imageBox_theImage,.imageBox_theImage_over {
width: 100%;
height: 100%;
position: relative;
display: block;
background-color: #fff;
}
.imageBox .imageBox_theImage{
border: 1px solid #e0e0e0;
background-image: url('../icons/dot.gif');
background-position: center center;
background-repeat: no-repeat;
}
.imageBox .imageBox_theImage_over {
border: 1px solid #a0a0a0;
background-image: url('../icons/dot.gif');
background-position: center center;
background-repeat: no-repeat;
cursor: pointer;
}
.imageBoxHighlighted .imageBox_theImage {
border: 1px solid #ff6600;
}
.imageBoxHighlighted .imageBox_theImage_over {
border: 1px solid #ff6600;
background-image: url('../icons/dot.gif');
background-position: center center;
background-repeat: no-repeat;
}
.removeButton, .removeButton_over {
display: none;
position: absolute;
cursor: pointer;
background-image: url(../icons/imageUpload/cross-small.png);
background-repeat: no-repeat;
background-position: center center;
}
.removeButton {
border: 1px solid #a0a0a0;
}
.removeButton_over {
border: 1px solid #808080;
}
#insertionMarker {
height: 102px;
width: 6px;
position: absolute;
display: none;
}
#insertionMarker img {
float: left;
}
#dragDropContent{
position: absolute;
z-index: 10;
display: none;
}
.button {
width: 64px;
height: 22px;
margin: 0 2px;
cursor: pointer;
vertical-align: middle;
}
body {
margin: 0;
padding: 0;
overflow: hidden;
background-color: #fff;
line-height: 1em;
font-family: 'Malgun Gothic', gulim, tahoma, helvetica;
font-size: 12px;
}
+5
View File
@@ -0,0 +1,5 @@
/* CSS file */
Application
{
}
+95
View File
@@ -0,0 +1,95 @@
/************************************************
CHEditor Image Caption Util
************************************************/
img.chimg_photo
{
border: 1px darkgray solid;
padding:10px;
}
div.imgblock
{
}
div.leftjust
{
}
div.rightjust
{
}
div.caption
{
margin-top: 5px;
margin-left: 0.2em;
color: darkgray;
font-size: 9pt;
}
div.caption-marker
{
float: left;
margin-right: 0.2em;
}
div.caption-text
{
float: left;
clear: right;
text-align: left;
}
.imageUtil {
cursor: url(icons/imageutil/zoomin.cur), pointer;
outline: none;
}
.imageUtil img {
border: 2px solid gray;
}
.imageUtil:hover img {
border: 2px solid silver;
}
.imageUtil-image {
border-bottom: 1px solid white;
}
.imageUtil-image-blur {
}
.imageUtil-caption {
display: none;
border-bottom: 1px solid white;
font-family: gulim, Verdana, Helvetica;
font-size: 9pt;
padding: 5px;
background-color: #fff;
}
.imageUtil-loading {
display: block;
color: white;
font-size: 9px;
font-weight: normal;
text-decoration: none;
padding: 3px;
border-top: 1px solid white;
border-bottom: 1px solid white;
background-color: black;
padding-left: 22px;
background-image: url(icons/imageutil/loader.gif);
background-repeat: no-repeat;
background-position: 3px 1px;
}
a.imageUtil-credits,
a.imageUtil-credits i {
padding: 2px;
color: silver;
text-decoration: none;
font-size: 10px;
}
a.imageUtil-credits:hover,
a.imageUtil-credits:hover i {
color: white;
background-color: gray;
}
.imageUtil-display-block {
display: block;
}
.imageUtil-display-none {
display: none;
}
+653
View File
@@ -0,0 +1,653 @@
a.cheditor-tag-path-elem {
text-decoration: none;
color: #0033cc;
font-size: 8pt;
font-family: "Malgun Gothic", "Apple SD Gothic Neo", dotum, monospace;
cursor: pointer;
}
a.cheditor-tag-path-elem:hover {
color: #0033cc;
text-decoration: underline;
cursor: pointer;
}
.cheditor-container {
border-top: 1px #ccc solid;
position: relative;
text-align: left;
}
.cheditor-tb-wrapper {
border-right: 1px #ccc solid;
border-left: 1px #ccc solid;
border-bottom: 1px #ccc solid;
position: relative;
display: block;
background-color: #f0f0f0;
zoom:1;
height:auto ! important;
}
.cheditor-tb-wrapper:after{display:block;visibility:hidden;clear:both;content:""}
.cheditor-tb-wrapper-readonly {
border-right: 1px #ccc solid;
border-left: 1px #ccc solid;
border-bottom: 1px #ccc solid;
position: relative;
display: block;
background: #f0f0f0 url(../icons/readonlymode.png) no-repeat 10px center;
}
.cheditor-tb-wrapper-code {
border-right: 1px #ccc solid;
border-left: 1px #ccc solid;
border-bottom: 1px #ccc solid;
position: relative;
display: block;
background: #f0f0f0 url(../icons/viewmode_code.png) no-repeat 10px center;
}
.cheditor-tb-wrapper-preview {
border-right: 1px #ccc solid;
border-left: 1px #ccc solid;
border-bottom: 1px #ccc solid;
position: relative;
display: block;
background: #f0f0f0 url(../icons/viewmode_preview.png) no-repeat 10px center;
}
.cheditor-tb-wrapper-readonly div, .cheditor-tb-wrapper-code div, .cheditor-tb-wrapper-preview div {
display: none;
}
.cheditor-tb-fullscreen {
width: 16px;
height: 16px;
float: right;
margin-top: 3px;
cursor: pointer;
background: transparent url(../icons/fullscreen.png) no-repeat center center;
}
.cheditor-tb-fullscreen-disable {
display: none;
}
.cheditor-tb-fullscreen-actual {
width: 16px;
height: 16px;
float: right;
margin-top: 3px;
cursor: pointer;
background: transparent url(../icons/fullscreen_actual.png) no-repeat center center;
}
.cheditor-editarea-wrapper {
border-right: 1px #ccc solid;
border-bottom: 1px #ccc solid;
border-left: 1px #ccc solid;
width: auto;
overflow: hidden;
}
.cheditor-editarea {
width: 100%;
overflow-x: hidden;
overflow-y: auto;
margin: 0;
padding: 0;
display: block;
}
@font-face {
font-family: 'SourceCodePro';
src: url('SourceCodePro.eot');
src: url('SourceCodePro.woff') format('woff');
}
.cheditor-editarea-text-content {
overflow-x: hidden;
overflow-y: scroll;
margin: 0;
border: 1px solid transparent;
padding: 7px 10px;
display: none;
resize: none;
outline: none;
font-family: SourceCodePro, monospace;
font-size: 12px;
}
.cheditor-modify-block .cheditor-ico {
width: 16px;
height: 16px;
vertical-align: middle;
margin-right: 5px;
}
.cheditor-modify-block select {
font-family: "Malgun Gothic", "Apple SD Gothic Neo", gulim, monospace;
font-size: 9pt;
color: #000;
}
.cheditor-modify-block div {
padding: 5px 10px 5px 10px;
color: #000;
display: block;
}
.cheditor-modify-block div .wrap-text-desc {
line-height: 1em;
color: #000;
}
.cheditor-modify-block div .user-input-alt {
width: 120px;
margin: 3px 10px 0 5px;
height: 15px;
line-height: 15px;
padding-top: 1px;
font-size: 9pt;
font-family: "Malgun Gothic", "Apple SD Gothic Neo", gulim, monospace;
color: #000;
}
.cheditor-modify-block div .user-input-caption {
width: 350px;
margin: 7px 10px 0 5px;
height: 15px;
line-height: 15px;
padding-top: 1px;
font-size: 9pt;
font-family: "Malgun Gothic", "Apple SD Gothic Neo", gulim, monospace;
color: #000;
}
.cheditor-modify-block div .caption-align {
margin: 7px 0 0 4px;
font-size: 9pt;
vertical-align: top;
font-family: "Malgun Gothic", "Apple SD Gothic Neo", gulim, monospace;
color: #000;
}
.cheditor-modify-block div .wrap-checked {
vertical-align: middle;
padding: 0;
margin-right: 2px;
}
.cheditor-modify-block div .input-submit {
cursor: pointer;
vertical-align: middle;
margin-top: -2px;
margin-left: 10px;
height: 20px;
width: 64px;
}
.cheditor-modify-block div .color-picker {
cursor: pointer;
vertical-align: middle;
height: 20px;
width: 20px;
}
.cheditor-modify-block div .delete-submit {
cursor: pointer;
vertical-align: middle;
margin-top: -2px;
margin-left: 3px;
height: 20px;
width: 64px;
}
.cheditor-modify-block div .edit-table-ico {
cursor: pointer;
vertical-align: middle;
width: 16px;
height: 16px;
margin: 0 3px;
}
.cheditor-modify-block {
display: none;
border-right: 1px #ccc solid;
border-bottom: 1px #ccc solid;
border-left: 1px #ccc solid;
padding: 2px;
background-color: #eee;
font-size: 9pt;
font-family: "Malgun Gothic", "Apple SD Gothic Neo", gulim, monospace;
text-align: center;
}
.cheditor-status-bar {
font-size: 8pt;
font-family: "Malgun Gothic", "Apple SD Gothic Neo", dotum, monospace;
color: #333;
}
.cheditor-tag-path {
border-right: 1px #ccc solid;
border-bottom: 1px #ccc solid;
border-left: 1px #ccc solid;
padding: 0 2px 0 2px;
display: none;
height: 18px;
line-height: 18px;
overflow: hidden;
}
.cheditor-viewmode {
padding: 0 4px 0 4px;
height: 16px;
background: transparent url(../icons/statusbar_bgline.gif) repeat-x 0 0;
}
.cheditor-viewmode div {
width: 24px;
height: 16px;
cursor: pointer;
}
.cheditor-tab-rich {
background: transparent url(../icons/edit_mode_rich_a.png) no-repeat 0 0;
float: left;
}
.cheditor-tab-rich-off {
background: transparent url(../icons/edit_mode_rich_b.png) no-repeat 0 0;
float: left;
}
.cheditor-tab-code {
background: transparent url(../icons/edit_mode_code_a.png) no-repeat 0 0;
float: left;
}
.cheditor-tab-code-off {
background: transparent url(../icons/edit_mode_code_b.png) no-repeat 0 0;
float: left;
}
.cheditor-tab-preview {
background: transparent url(../icons/edit_mode_view_a.png) no-repeat 0 0;
float: left;
}
.cheditor-tab-preview-off {
background: transparent url(../icons/edit_mode_view_b.png) no-repeat 0 0;
float: left;
}
.cheditor-resizebar {
height: 11px;
overflow: hidden;
border-left: 1px #ccc solid;
border-right: 1px #ccc solid;
cursor: s-resize;
background: #eee url(../icons/splitter.gif) no-repeat center top;
}
.cheditor-resizebar-off {
height: 11px;
overflow: hidden;
border-left: 1px #ccc solid;
border-right: 1px #ccc solid;
cursor: default;
background-color: #eee;
}
.cheditor_mode_icon { width: 24px; height: 16px; cursor: pointer; vertical-align: top }
.cheditor-pulldown-container {
border: #7d8db0 1px solid;
background-color: #fff;
padding: 1px;
position: relative;
-moz-box-shadow: 0 0 5px #aaa;
-webkit-box-shadow: 0 0 5px #aaa;
box-shadow: 1px 1px 10px #bbb;
}
.cheditor-pulldown-container div {
padding: 2px 2px 2px 15px;
font-size: 9pt;
font-family: "Malgun Gothic", "Apple SD Gothic Neo", gulim, monospace;
color: #222;
position: relative;
display: block;
line-height: 1.2;
margin: 2px 2px;
}
.cheditor-pulldown-color-container {
border: #7d8db0 1px solid;
-moz-box-shadow: 0 0 5px #aaa;
-webkit-box-shadow: 0 0 5px #aaa;
box-shadow: 1px 1px 10px #bbb;
background-color: #fff;
padding: 2px;
}
.cheditor-pulldown-container div label, .cheditor-pulldown-textblock-container div label {
display: block;
}
.cheditor-pulldown-textblock-container div div {
text-align: center;
padding: 2px;
font-size: 9pt;
color: #000;
line-height: 1.2;
}
.cheditor-pulldown-textblock-container div {
padding: 1px;
}
.cheditor-pulldown-textblock-out {
border: #fff 1px solid;
}
.cheditor-pulldown-textblock-over {
border: #ccc 1px solid;
}
.cheditor-pulldown-textblock-container {
border: #7d8db0 1px solid;
-moz-box-shadow: 0 0 5px #aaa;
-webkit-box-shadow: 0 0 5px #aaa;
box-shadow: 1px 1px 10px #bbb;
background-color: #fff;
padding: 2px;
}
.cheditor-pulldown-mouseout {
border: #fff 1px solid;
}
.cheditor-pulldown-mouseover {
background-color: #f0f0f0;
border: #e0e0e0 1px solid;
}
.cheditor-pulldown-frame {
position: absolute;
visibility: hidden;
z-index: -1;
width: 1px;
height: 1px;
line-height: 12px;
}
.cheditor-pulldown-color-cell-over, .cheditor-pulldown-color-cell {
float: left;
width: 14px;
height: 14px;
margin: 1px;
cursor: pointer;
}
.cheditor-pulldown-color-cell-over {
border: 1px #000 solid;
}
.cheditor-pulldown-color-cell-over span {
width: 12px;
height: 12px;
border: 1px #fff solid;
display: block;
}
.cheditor-pulldown-color-cell {
border: 1px #999 solid;
}
.cheditor-pulldown-color-cell span {
width: 14px;
height: 14px;
display: block;
border: none;
}
.cheditor-pulldown-color-selected {
border: 1px solid #999;
text-align: left;
margin: 4px 0 0 1px;
padding-left: 5px;
height: 15px;
line-height: 15px;
font-size: 11px;
font-family: verdana, monospace;
width: 55px;
vertical-align: -10%;
}
.cheditor-pulldown-color-reset, .cheditor-pulldown-color-show-picker {
height: 19px;
width: 16px;
cursor: pointer;
display: inline-block;
vertical-align: middle;
margin-left: 3px;
}
.cheditor-pulldown-color-reset {
background: #fff url(../icons/color_picker_reset.png) no-repeat center center;
}
.cheditor-pulldown-color-show-picker {
background: #fff url(../icons/color_picker.png) no-repeat center center;
}
.cheditor-pulldown-color-submit {
vertical-align: middle;
margin: 4px 1px 0 0;
height: 19px;
width: 40px;
cursor: pointer;
right: 0;
position: absolute;
}
.cheditor-container-fullscreen {
position: fixed;
left: 0;
top: 0;
_position: absolute;
z-index: 1000;
text-align: left;
background-color: #fff;
}
.cheditor-popupModalBackground {
background-color: #fff;
position: fixed;
_position: absolute;
display: none;
top: 0;
left: 0;
width: 100%;
height: 100%;
}
.cheditor-popup-window {
border: 1px solid #0078D7;
border-radius: 5px;
background-color: #0078D7;
display: none;
position: absolute;
top: 0;
left: 0;
-moz-box-shadow: 0 0 5px #aaa;
-webkit-box-shadow: 0 0 5px #aaa;
box-shadow: 0 0 10px #bbb;
padding: 0;
overflow: hidden;
}
.cheditor-popup-cmd-button {
width: 64px;
height: 22px;
margin: 5px 2px;
cursor: pointer;
vertical-align: middle;
}
.cheditor-popup-cframe {
background-color: #fff;
margin: 0;
padding: 10px;
border: none;
text-align: center;
}
.cheditor-popup-cframe iframe {
margin: 0;
padding: 0;
overflow: hidden;
}
.cheditor-popup-drag-handle {
height: 31px;
}
.cheditor-popup-titlebar {
padding-left: 10px;
line-height: 30px;
}
.cheditor-popup-title {
font-size: 12px;
font-family: "Malgun Gothic", "Apple SD Gothic Neo", gulim, monospace;
font-weight: bold;
color: #fff;
}
.cheditor-dragWindowTransparent {
background-color: #fff;
position: absolute;
display: block;
left: 0px;
top: 27px;
}
.cheditor-pulldown-wrapper {
line-height: 1;
}
.cheditor-toolbar-icon-wrapper {
margin: 0 2px 0 0;
float: left;
height: 24px;
overflow: hidden;
}
.cheditor-tb-icon {
height: 22px;
width: 16px;
overflow: hidden;
}
.cheditor-tb-icon-disable {
height: 22px;
width: 16px;
overflow: hidden;
filter: alpha(opacity=40) gray;
opacity: 0.4;
}
.cheditor-tb-text {
padding: 0;
margin: 0;
color: #333;
height: 20px;
line-height: 20px;
}
.cheditor-tb-text-disable {
padding: 0;
margin: 0;
height: 20px;
line-height: 20px;
color: #333;
overflow: hidden;
filter: alpha(opacity=40) gray;
-webkit-filter: grayscale(100%);
opacity: 0.4;
}
.cheditor-tb-text span, .cheditor-tb-text-disable span {
font-family: "Malgun Gothic", "Apple SD Gothic Neo", gulim, monospace;
margin: 0 0 0 1px;
padding: 0;
width: 41px;
text-overflow: ellipsis;
overflow: hidden;
white-space: nowrap;
display: block;
font-size: 12px;
}
.cheditor-tb-icon23 {
height: 22px;
width: 23px;
margin-left: 3px;
overflow: hidden;
}
.cheditor-tb-icon23-disable {
height: 22px;
width: 23px;
margin-left: 3px;
overflow: hidden;
filter: alpha(opacity=40) gray;
opacity: 0.4;
}
.cheditor-tb-icon36 {
height: 22px;
width: 36px;
overflow: hidden;
}
.cheditor-tb-icon36-disable {
height: 22px;
width: 36px;
overflow: hidden;
filter: alpha(opacity=40) gray;
opacity: 0.4;
}
.cheditor-tb-combo {
height: 22px;
width: 10px;
overflow: hidden;
}
.cheditor-tb-combo-disable {
height: 22px;
width: 10px;
overflow: hidden;
filter: alpha(opacity=40) gray;
opacity: 0.4;
}
.cheditor-tb-bg55 {
float: left;
overflow: hidden;
background: transparent url(../icons/toolbar-background.png) no-repeat left -483px;
position: relative;
}
.cheditor-tb-bg40 {
float: left;
overflow: hidden;
background: transparent url(../icons/toolbar-background.png) no-repeat left -552px;
position: relative;
}
.cheditor-tb-bg44 {
float: left;
overflow: hidden;
background: transparent url(../icons/toolbar-background.png) no-repeat left -621px;
position: relative;
}
.cheditor-tb-bg30-first {
float: left;
overflow: hidden;
background: transparent url(../icons/toolbar-background.png) no-repeat left -276px;
position: relative;
}
.cheditor-tb-bg30 {
float: left;
overflow: hidden;
background: transparent url(../icons/toolbar-background.png) no-repeat left -345px;
position: relative;
}
.cheditor-tb-bg30-last {
float: left;
overflow: hidden;
background: transparent url(../icons/toolbar-background.png) no-repeat left -414px;
position: relative;
}
.cheditor-tb-bgcombo {
float: left;
overflow: hidden;
background: transparent url(../icons/toolbar-background.png) no-repeat left -690px;
position: relative;
}
.cheditor-tb-bgcombo-first {
float: left;
overflow: hidden;
background: transparent url(../icons/toolbar-background.png) no-repeat left top;
position: relative;
}
.cheditor-tb-bgcombo-last {
float: left;
overflow: hidden;
background: url(../icons/toolbar-background.png) no-repeat left -759px;
position: relative;
}
.cheditor-tb-bg {
float: left;
overflow: hidden;
background: transparent url(../icons/toolbar-background.png) no-repeat left -69px;
position: relative;
}
.cheditor-tb-bg-first {
float: left;
overflow: hidden;
background: transparent url(../icons/toolbar-background.png) no-repeat left top;
position: relative;
}
.cheditor-tb-bg-last {
float: left;
overflow: hidden;
background: transparent url(../icons/toolbar-background.png) no-repeat left -138px;
position: relative;
background-clip: border-box;
}
.cheditor-tb-bg-single {
float: left;
overflow: hidden;
background: transparent url(../icons/toolbar-background.png) no-repeat left -207px;
position: relative;
}
.cheditor-tb-color-btn {
width: 16px;
height: 3px;
overflow: hidden;
position: absolute;
top: 16px;
left: 3px;
}
.cheditor-tb-button-spacer {
overflow: hidden;
width: 4px;
height: 4px;
float: left;
}
.cheditor-tb-split {
overflow: hidden;
height: 2px;
width: 3px;
clear: both;
}
+158
View File
@@ -0,0 +1,158 @@
<?php
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
function editor_html($id, $content, $is_dhtml_editor=true)
{
global $config, $w, $board;
global $editor_width, $editor_height;
static $js = true;
if( $is_dhtml_editor && $content && !$w && (isset($board['bo_insert_content']) && !empty($board['bo_insert_content']) ) ){ //글쓰기 기본 내용 처리
if( preg_match('/\r|\n/', $content) && $content === strip_tags($content, '<a><strong><b>') ) { //textarea로 작성되고, html 내용이 없다면
$content = nl2br($content);
}
}
$width = isset($editor_width) ? $editor_width : "100%";
$height = isset($editor_height) ? $editor_height : "250px";
if (defined(G5_PUNYCODE))
$editor_url = G5_PUNYCODE.'/'.G5_EDITOR_DIR.'/'.$config['cf_editor'];
else
$editor_url = G5_EDITOR_URL.'/'.$config['cf_editor'];
$html = "";
if ($is_dhtml_editor) {
if ($js) {
$html .= "<script src=\"{$editor_url}/cheditor.js\"></script>";
}
$html .= "<script>\n";
$html .= "var ed_nonce = \"".ft_nonce_create('cheditor')."\";\n";
$html .= "var ed_{$id} = new cheditor('ed_{$id}');\n";
$html .= "ed_{$id}.config.editorWidth = \"{$width}\";\n";
$html .= "ed_{$id}.config.editorHeight = \"{$height}\";\n";
$html .= "ed_{$id}.config.imgReSize = false;\n";
$html .= "ed_{$id}.config.fullHTMLSource = false;\n";
$html .= "ed_{$id}.config.editorPath = \"{$editor_url}\";\n";
$html .= "ed_{$id}.inputForm = \"tx_{$id}\";\n";
$html .= "</script>\n";
$html .= "<span class=\"sound_only\">웹에디터 시작</span>";
$html .= "<textarea name=\"{$id}\" id=\"tx_{$id}\" style=\"display:none;\">{$content}</textarea>\n";
$html .= "\n<span class=\"sound_only\">웹 에디터 끝</span>";
$html .= "<script>ed_{$id}.run();</script>\n";
} else {
$html .= "<textarea id=\"$id\" name=\"$id\" style=\"width:{$width};height:{$height};\" maxlength=\"65536\">$content</textarea>\n";
}
return $html;
}
// textarea 로 값을 넘긴다. javascript 반드시 필요
function get_editor_js($id, $is_dhtml_editor=true)
{
if ($is_dhtml_editor) {
return "document.getElementById('tx_{$id}').value = ed_{$id}.outputBodyHTML();\n";
} else {
return "var {$id}_editor = document.getElementById('{$id}');\n";
}
}
// textarea 의 값이 비어 있는지 검사
function chk_editor_js($id, $is_dhtml_editor=true)
{
if ($is_dhtml_editor) {
return "if (document.getElementById('tx_{$id}') && jQuery.inArray(ed_{$id}.outputBodyHTML().toLowerCase().replace(/^\s*|\s*$/g, ''), ['&nbsp;','<p>&nbsp;</p>','<p><br></p>','<div><br></div>','<p></p>','<br>','']) != -1) { alert(\"내용을 입력해 주십시오.\"); ed_{$id}.returnFalse(); return false; }\n";
} else {
return "if (!{$id}_editor.value) { alert(\"내용을 입력해 주십시오.\"); {$id}_editor.focus(); return false; }\n";
}
}
/*
https://github.com/timostamm/NonceUtil-PHP
*/
if (!defined('FT_NONCE_UNIQUE_KEY'))
define( 'FT_NONCE_UNIQUE_KEY' , sha1($_SERVER['SERVER_SOFTWARE'].G5_MYSQL_USER.session_id().G5_TABLE_PREFIX) );
if (!defined('FT_NONCE_SESSION_KEY'))
define( 'FT_NONCE_SESSION_KEY' , substr(md5(FT_NONCE_UNIQUE_KEY), 5) );
if (!defined('FT_NONCE_DURATION'))
define( 'FT_NONCE_DURATION' , 60 * 30 ); // 300 makes link or form good for 5 minutes from time of generation, 300은 5분간 유효, 60 * 60 은 1시간
if (!defined('FT_NONCE_KEY'))
define( 'FT_NONCE_KEY' , '_nonce' );
// This method creates a key / value pair for a url string
if(!function_exists('ft_nonce_create_query_string')){
function ft_nonce_create_query_string( $action = '' , $user = '' ){
return FT_NONCE_KEY."=".ft_nonce_create( $action , $user );
}
}
if(!function_exists('ft_get_secret_key')){
function ft_get_secret_key($secret){
return md5(FT_NONCE_UNIQUE_KEY.$secret);
}
}
// This method creates an nonce. It should be called by one of the previous two functions.
if(!function_exists('ft_nonce_create')){
function ft_nonce_create( $action = '',$user='', $timeoutSeconds=FT_NONCE_DURATION ){
$secret = ft_get_secret_key($action.$user);
$salt = ft_nonce_generate_hash();
$time = time();
$maxTime = $time + $timeoutSeconds;
$nonce = $salt . "|" . $maxTime . "|" . sha1( $salt . $secret . $maxTime );
set_session('nonce_'.FT_NONCE_SESSION_KEY, $nonce);
return $nonce;
}
}
// This method validates an nonce
if(!function_exists('ft_nonce_is_valid')){
function ft_nonce_is_valid( $nonce, $action = '', $user='' ){
$secret = ft_get_secret_key($action.$user);
if (is_string($nonce) == false) {
return false;
}
$a = explode('|', $nonce);
if (count($a) != 3) {
return false;
}
$salt = $a[0];
$maxTime = intval($a[1]);
$hash = $a[2];
$back = sha1( $salt . $secret . $maxTime );
if ($back != $hash) {
return false;
}
if (time() > $maxTime) {
return false;
}
return true;
}
}
// This method generates the nonce timestamp
if(!function_exists('ft_nonce_generate_hash')){
function ft_nonce_generate_hash(){
$length = 10;
$chars='1234567890qwertyuiopasdfghjklzxcvbnmQWERTYUIOPASDFGHJKLZXCVBNM';
$ll = strlen($chars)-1;
$o = '';
while (strlen($o) < $length) {
$o .= $chars[ rand(0, $ll) ];
}
return $o;
}
}
?>
Binary file not shown.

After

Width:  |  Height:  |  Size: 187 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 190 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 180 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 181 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 187 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 188 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 187 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 187 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 811 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 66 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 543 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 43 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1012 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1014 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 393 B

Some files were not shown because too many files have changed in this diff Show More