Compare commits

..
67 Commits
Author SHA1 Message Date
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
thisgun 3e343bdf66 5.2.5 버전변경 2017-01-09 14:33:20 +09:00
thisgun e131563c8f XSS 취약점(16-1008) 수정 2017-01-09 14:30:47 +09:00
thisgun 0094cc9afe 스마트에디터 업로드 방식 수정 2017-01-09 14:30:39 +09:00
thisgun 5fde923aa0 PHPMailer 5.2.19 버전 적용 2017-01-09 14:30:33 +09:00
chicpro 1e3a4f2657 KCP 본인확인 모바일 관련 수정 2016-12-21 09:56:32 +09:00
chicpro 0693fde962 5.2.4 버전변경 2016-11-22 11:34:16 +09:00
chicpro 7fb5f92200 <?php 수정 2016-11-22 10:47:31 +09:00
chicpro 50c8207fed 컬럼 정렬 함수에 sca 변수 추가 (sir ko님 제안) 2016-10-20 09:30:42 +09:00
chicpro 6dbfa73461 5.2.3 버전변경 2016-10-19 10:26:05 +09:00
chicpro 76ecc6efe8 XSS 취약점(16-781) 수정 2016-10-17 16:57:04 +09:00
chicpro f4b0737178 개인정보처리방침 명칭 변경 2016-10-17 14:48:00 +09:00
chicpro e99c7a81db 게시글 CSRF 취약점(16-749 16-750) 수정 2016-10-17 14:47:45 +09:00
chicpro ce0a6dc3af js css 버전 상수 추가 2016-10-17 14:47:30 +09:00
chicpro f3e428ea1e 모바이 FAQ 하단 내용 출력 오류 수정 2016-09-21 11:41:04 +09:00
chicpro 9b422b38c5 5.2.2 버전변경 2016-09-20 09:59:04 +09:00
chicpro f6056b2d37 오픈 리다이렉트 취약점(16-603) 수정 2016-09-06 14:47:35 +09:00
chicpro a560fc353c htmlpurifier 4.8 업데이트 2016-08-29 13:48:02 +09:00
chicpro e2c67e854f 5.2.1 버전변경 2016-08-22 09:56:47 +09:00
thisgun 3e7617e825 스마트에디터 2.8.2.3 보안패치 #63 2016-08-17 14:37:23 +09:00
chicpro 4515f11169 토큰 초기화 코드 추가 2016-08-10 10:02:04 +09:00
chicpro ec32f64bc4 댓글 수정 CSRF 취약점 수정 2016-08-10 10:01:49 +09:00
chicpro 15bd8b9632 파일경로 필터링 코드 추가 2016-08-10 10:01:35 +09:00
chicpro ef013e0827 wr_id_list 필터링 코드 추가 2016-08-10 09:56:03 +09:00
chicpro b3773217e9 5.2.0 버전변경 2016-07-25 10:44:58 +09:00
chicpro 70f6d92e87 XSS 취약점 수정 16-480 2016-07-21 10:25:46 +09:00
chicpro 042695af55 5.1.19 버전변경 2016-07-05 11:01:48 +09:00
chicpro 85f9523b30 댓글 삭제 토큰 코드 수정 2016-06-28 13:33:28 +09:00
chicpro 8c1d6266af 게시글 댓글 삭제 때 토큰 체크 추가 2016-06-24 17:22:29 +09:00
chicpro 30009dba6f 커맨드 인젝션 취약점(16-418 419) 수정 2016-06-24 17:22:14 +09:00
chicpro 24e7e8823e 가입축하 메일의 메일인증코드 수정 2016-05-24 17:46:02 +09:00
chicpro 42fb4b71a6 5.1.18 버전변경 2016-05-17 10:05:35 +09:00
chicpro f0134b610b 누락된 필드 추가 2016-05-17 10:05:06 +09:00
chicpro c2cf34392a 1:1문의 등록 오류 수정 2016-05-17 10:04:53 +09:00
chicpro 20dc859436 5.1.17 버전변경 2016-05-16 15:21:55 +09:00
chicpro f5ec4d60c0 기본환경설정 NHN KCP 사명변경 2016-05-13 12:03:02 +09:00
chicpro de00b4e9d3 1:1문의 파일업로드 분류 체크 추가 2016-05-04 13:36:31 +09:00
chicpro 8c67945c64 파일 업로드 개수 코드 수정 2016-05-04 13:36:20 +09:00
chicpro e5889df761 게시글 카테고리 체크 수정 2016-05-03 17:33:53 +09:00
chicpro 624e3d74a6 파일 업로드 개수 체크 추가 2016-05-03 17:33:37 +09:00
chicpro 30815f71e0 폼메일에서의 이메일주소 노출 수정 2016-05-03 14:16:38 +09:00
chicpro 949a73b468 1:1문의 이메일 체크 수정 2016-05-03 14:16:23 +09:00
chicpro 24d57cdd4b 스크랩 게시글 체크 추가 2016-05-03 14:16:09 +09:00
chicpro 191f3d2f97 1:1문의 삭제 오류 수정 2016-05-03 14:15:55 +09:00
chicpro 4973714e2f 이메일인증 프로세스 개선 2016-05-03 14:15:40 +09:00
chicpro 70bfeefb3b 댓글 등록 오류 수정 2016-04-28 09:49:14 +09:00
chicpro e8b83f3a33 비밀글 등록 버그 수정 2016-04-27 10:44:37 +09:00
352 changed files with 22209 additions and 14410 deletions

No files matched your search

+1 -1
View File
@@ -6,7 +6,7 @@ sirgle/
test.php test.php
*.key *.key
*.sh *.sh
cheditor*/ cheditor5.*/
ckeditor*/ ckeditor*/
log/ log/
g5_tree/ g5_tree/
+4
View File
@@ -2,4 +2,8 @@
define('G5_IS_ADMIN', true); define('G5_IS_ADMIN', true);
include_once ('../common.php'); include_once ('../common.php');
include_once(G5_ADMIN_PATH.'/admin.lib.php'); include_once(G5_ADMIN_PATH.'/admin.lib.php');
if( isset($token) ){
$token = @htmlspecialchars(strip_tags($token), ENT_QUOTES);
}
?> ?>
+1 -1
View File
@@ -21,7 +21,7 @@ if (!defined('_GNUBOARD_')) exit;
<!-- <p>실행시간 : <?php echo get_microtime() - $begin_time; ?> --> <!-- <p>실행시간 : <?php echo get_microtime() - $begin_time; ?> -->
<script src="<?php echo G5_ADMIN_URL ?>/admin.js"></script> <script src="<?php echo G5_ADMIN_URL ?>/admin.js?ver=<?php echo G5_JS_VER; ?>"></script>
<script> <script>
$(function(){ $(function(){
var hide_menu = false; var hide_menu = false;
+1 -1
View File
@@ -8,7 +8,7 @@ $g5['title'] = '게시판 복사';
include_once(G5_PATH.'/head.sub.php'); include_once(G5_PATH.'/head.sub.php');
?> ?>
<script src="<?php echo G5_ADMIN_URL ?>/admin.js"></script> <script src="<?php echo G5_ADMIN_URL ?>/admin.js?ver=<?php echo G5_JS_VER; ?>"></script>
<div class="new_win"> <div class="new_win">
<h1><?php echo $g5['title']; ?></h1> <h1><?php echo $g5['title']; ?></h1>
+8
View File
@@ -35,6 +35,14 @@ if ($file = $_POST['bo_include_tail']) {
$_POST['bo_include_tail'] = $file; $_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; $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> <label for="sfl" class="sound_only">검색대상</label>
<select name="sfl" id="sfl"> <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="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> <option value="a.gr_id"<?php echo get_selected($_GET['sfl'], "a.gr_id"); ?>>그룹ID</option>
</select> </select>
+3 -3
View File
@@ -736,7 +736,7 @@ if ($config['cf_sms_use'] && $config['cf_icode_id'] && $config['cf_icode_pw']) {
<select name="cf_cert_hp" id="cf_cert_hp"> <select name="cf_cert_hp" id="cf_cert_hp">
<?php echo option_selected("", $config['cf_cert_hp'], "사용안함"); ?> <?php echo option_selected("", $config['cf_cert_hp'], "사용안함"); ?>
<?php echo option_selected("kcb", $config['cf_cert_hp'], "코리아크레딧뷰로(KCB) 휴대폰 본인확인"); ?> <?php echo option_selected("kcb", $config['cf_cert_hp'], "코리아크레딧뷰로(KCB) 휴대폰 본인확인"); ?>
<?php echo option_selected("kcp", $config['cf_cert_hp'], "한국사이버결제(KCP) 휴대폰 본인확인"); ?> <?php echo option_selected("kcp", $config['cf_cert_hp'], "NHN KCP 휴대폰 본인확인"); ?>
<?php echo option_selected("lg", $config['cf_cert_hp'], "LG유플러스 휴대폰 본인확인"); ?> <?php echo option_selected("lg", $config['cf_cert_hp'], "LG유플러스 휴대폰 본인확인"); ?>
</select> </select>
</td> </td>
@@ -750,11 +750,11 @@ if ($config['cf_sms_use'] && $config['cf_icode_id'] && $config['cf_icode_pw']) {
</td> </td>
</tr> </tr>
<tr> <tr>
<th scope="row" class="cf_cert_service"><label for="cf_cert_kcp_cd">한국사이버결제<br>KCP 사이트코드</label></th> <th scope="row" class="cf_cert_service"><label for="cf_cert_kcp_cd">NHN KCP 사이트코드</label></th>
<td class="cf_cert_service"> <td class="cf_cert_service">
<?php echo help('SM으로 시작하는 5자리 사이트 코드중 뒤의 3자리만 입력해 주십시오.<br>서비스에 가입되어 있지 않다면, 본인확인 서비스 신청페이지에서 서비스 신청 후 사이트코드를 발급 받으실 수 있습니다.') ?> <?php echo help('SM으로 시작하는 5자리 사이트 코드중 뒤의 3자리만 입력해 주십시오.<br>서비스에 가입되어 있지 않다면, 본인확인 서비스 신청페이지에서 서비스 신청 후 사이트코드를 발급 받으실 수 있습니다.') ?>
<span class="sitecode">SM</span> <span class="sitecode">SM</span>
<input type="text" name="cf_cert_kcp_cd" value="<?php echo $config['cf_cert_kcp_cd'] ?>" id="cf_cert_kcp_cd" class="frm_input" size="3"> <a href="http://sir.kr/main/service/p_cert.php" target="_blank" class="btn_frmline">KCP 휴대폰 본인확인 서비스 신청페이지</a> <input type="text" name="cf_cert_kcp_cd" value="<?php echo $config['cf_cert_kcp_cd'] ?>" id="cf_cert_kcp_cd" class="frm_input" size="3"> <a href="http://sir.kr/main/service/p_cert.php" target="_blank" class="btn_frmline">NHN KCP 휴대폰 본인확인 서비스 신청페이지</a>
</td> </td>
</tr> </tr>
<tr> <tr>
+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_himg_del) @unlink(G5_DATA_PATH."/content/{$co_id}_h");
if ($co_timg_del) @unlink(G5_DATA_PATH."/content/{$co_id}_t"); 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', $sql_common = " co_include_head = '$co_include_head',
co_include_tail = '$co_include_tail', co_include_tail = '$co_include_tail',
co_html = '$co_html', co_html = '$co_html',
@@ -74,7 +86,11 @@ if ($w == "" || $w == "u")
@chmod($dest_path, G5_FILE_PERMISSION); @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 else
{ {
+1
View File
@@ -311,6 +311,7 @@ tfoot td {font-weight:bold;text-align:center}
#menu_frm #menu_result {margin:20px 0} #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} #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} .mb_leave_msg {color:#b6b6b6}
+2
View File
@@ -7,6 +7,8 @@ auth_check($auth[$sub_menu], "w");
$html_title = 'FAQ'; $html_title = 'FAQ';
$fm_id = preg_replace('/[^0-9]/', '', $fm_id);
if ($w == "u") if ($w == "u")
{ {
$html_title .= ' 수정'; $html_title .= ' 수정';
+1 -1
View File
@@ -1,4 +1,4 @@
<? <?php
$sub_menu = "200100"; $sub_menu = "200100";
include_once("./_common.php"); include_once("./_common.php");
+5
View File
@@ -126,6 +126,11 @@ if(!isset($mb['mb_dupinfo'])) {
sql_query(" ALTER TABLE {$g5['member_table']} ADD `mb_dupinfo` varchar(255) NOT NULL DEFAULT '' AFTER `mb_adult` ", false); sql_query(" ALTER TABLE {$g5['member_table']} ADD `mb_dupinfo` varchar(255) NOT NULL DEFAULT '' AFTER `mb_adult` ", false);
} }
// 이메일인증 체크 필드추가
if(!isset($mb['mb_email_certify2'])) {
sql_query(" ALTER TABLE {$g5['member_table']} ADD `mb_email_certify2` varchar(255) NOT NULL DEFAULT '' AFTER `mb_email_certify` ", false);
}
if ($mb['mb_intercept_date']) $g5['title'] = "차단된 "; if ($mb['mb_intercept_date']) $g5['title'] = "차단된 ";
else $g5['title'] .= ""; else $g5['title'] .= "";
$g5['title'] .= '회원 '.$html_title; $g5['title'] .= '회원 '.$html_title;
+1 -1
View File
@@ -1,4 +1,4 @@
<? <?php
$sub_menu = "200100"; $sub_menu = "200100";
include_once("./_common.php"); include_once("./_common.php");
+47 -3
View File
@@ -43,13 +43,57 @@ $(function() {
"./menu_form_search.php" "./menu_form_search.php"
); );
$("#me_type").on("change", function() { function link_checks_all_chage(){
var type = $(this).val();
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_result").empty().load(
"./menu_form_search.php", "./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() { $(document).on("click", "#add_manual", function() {
+17 -2
View File
@@ -11,7 +11,7 @@ switch($type) {
order by gr_order, gr_id "; order by gr_order, gr_id ";
break; break;
case 'board': 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']} from {$g5['board_table']}
order by bo_order, bo_table "; order by bo_order, bo_table ";
break; break;
@@ -32,13 +32,18 @@ if($sql) {
for($i=0; $row=sql_fetch_array($result); $i++) { for($i=0; $row=sql_fetch_array($result); $i++) {
if($i == 0) { if($i == 0) {
$bbs_subject_title = ($type == 'board') ? '게시판제목' : '제목';
?> ?>
<div class="tbl_head01 tbl_wrap"> <div class="tbl_head01 tbl_wrap">
<table> <table>
<thead> <thead>
<tr> <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> <th scope="col">선택</th>
</tr> </tr>
</thead> </thead>
@@ -63,6 +68,12 @@ if($sql) {
<tr> <tr>
<td><?php echo $row['subject']; ?></td> <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"> <td class="td_mngsmall">
<input type="hidden" name="subject[]" value="<?php echo preg_replace('/[\'\"]/', '', $row['subject']); ?>"> <input type="hidden" name="subject[]" value="<?php echo preg_replace('/[\'\"]/', '', $row['subject']); ?>">
<input type="hidden" name="link[]" value="<?php echo $link; ?>"> <input type="hidden" name="link[]" value="<?php echo $link; ?>">
@@ -76,6 +87,10 @@ if($sql) {
</table> </table>
</div> </div>
<div class="local_desc01 menu_exists_tip" style="display:none">
<p>* <strong>빨간색</strong>의 제목은 이미 메뉴에 연결되어 경우 표시됩니다.</p>
</div>
<div class="btn_win02 btn_win"> <div class="btn_win02 btn_win">
<button type="button" class="btn_cancel" onclick="window.close();">창닫기</button> <button type="button" class="btn_cancel" onclick="window.close();">창닫기</button>
</div> </div>
+2
View File
@@ -5,6 +5,8 @@ include_once(G5_EDITOR_LIB);
auth_check($auth[$sub_menu], "w"); auth_check($auth[$sub_menu], "w");
$nw_id = preg_replace('/[^0-9]/', '', $nw_id);
$html_title = "팝업레이어"; $html_title = "팝업레이어";
if ($w == "u") if ($w == "u")
{ {
+2 -2
View File
@@ -4,8 +4,8 @@ include_once('./_common.php');
auth_check($auth[$sub_menu], 'r'); auth_check($auth[$sub_menu], 'r');
if (empty($fr_date)) $fr_date = G5_TIME_YMD; if (empty($fr_date) || ! preg_match("/^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])$/", $fr_date) ) $fr_date = G5_TIME_YMD;
if (empty($to_date)) $to_date = G5_TIME_YMD; if (empty($to_date) || ! preg_match("/^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])$/", $to_date) ) $to_date = G5_TIME_YMD;
$qstr = "fr_date={$fr_date}{&amp;to_date}={$to_date}"; $qstr = "fr_date={$fr_date}{&amp;to_date}={$to_date}";
+19 -3
View File
@@ -8,6 +8,18 @@ auth_check($auth[$sub_menu], 'w');
check_admin_token(); 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']} $sql = " update {$g5['qa_config_table']}
set qa_title = '{$_POST['qa_title']}', set qa_title = '{$_POST['qa_title']}',
qa_category = '{$_POST['qa_category']}', qa_category = '{$_POST['qa_category']}',
@@ -29,8 +41,8 @@ $sql = " update {$g5['qa_config_table']}
qa_image_width = '{$_POST['qa_image_width']}', qa_image_width = '{$_POST['qa_image_width']}',
qa_upload_size = '{$_POST['qa_upload_size']}', qa_upload_size = '{$_POST['qa_upload_size']}',
qa_insert_content = '{$_POST['qa_insert_content']}', qa_insert_content = '{$_POST['qa_insert_content']}',
qa_include_head = '{$_POST['qa_include_head']}', qa_include_head = '{$qa_include_head}',
qa_include_tail = '{$_POST['qa_include_tail']}', qa_include_tail = '{$qa_include_tail}',
qa_content_head = '{$_POST['qa_content_head']}', qa_content_head = '{$_POST['qa_content_head']}',
qa_content_tail = '{$_POST['qa_content_tail']}', qa_content_tail = '{$_POST['qa_content_tail']}',
qa_mobile_content_head = '{$_POST['qa_mobile_content_head']}', qa_mobile_content_head = '{$_POST['qa_mobile_content_head']}',
@@ -47,5 +59,9 @@ $sql = " update {$g5['qa_config_table']}
qa_5 = '{$_POST['qa_5']}' "; qa_5 = '{$_POST['qa_5']}' ";
sql_query($sql); 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'] ); //$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); add_stylesheet('<link rel="stylesheet" href="'.G5_SMS5_ADMIN_URL.'/css/sms5.css">', 0);
?> ?>
+6 -3
View File
@@ -18,6 +18,9 @@ if (is_numeric($fg_no))
else else
$sql_group = ""; $sql_group = "";
$st = clean_xss_tags($st);
$sv = clean_xss_tags($sv);
if ($st == 'all') { if ($st == 'all') {
$sql_search = "and (fo_name like '%{$sv}%' or fo_content like '%{$sv}%')"; $sql_search = "and (fo_name like '%{$sv}%' or fo_content like '%{$sv}%')";
} else if ($st == 'name') { } else if ($st == 'name') {
@@ -60,7 +63,7 @@ function book_all_checked(chk)
function book_del(fo_no) function book_del(fo_no)
{ {
if (confirm("한번 삭제한 자료는 복구할 방법이 없습니다.\n\n그래도 삭제하시겠습니까?")) if (confirm("한번 삭제한 자료는 복구할 방법이 없습니다.\n\n그래도 삭제하시겠습니까?"))
location.href = "./form_update.php?w=d&fo_no=" + fo_no + "&page=<?php echo $page?>&fg_no=<?php echo $fg_no?>&st=<?php echo $st?>&sv=<?php echo $sv?>"; location.href = "./form_update.php?w=d&fo_no=" + fo_no + "&page=<?php echo $page?>&fg_no=<?php echo $fg_no?>&st=<?php echo get_text($st); ?>&sv=<?php echo get_text($sv); ?>";
} }
function multi_update(sel) function multi_update(sel)
@@ -127,7 +130,7 @@ function multi_update(sel)
<option value="content"<?php echo get_selected('content', $st); ?>>이모티콘</option> <option value="content"<?php echo get_selected('content', $st); ?>>이모티콘</option>
</select> </select>
<label for="sv" class="sound_only">검색어<strong class="sound_only"> 필수</strong></label> <label for="sv" class="sound_only">검색어<strong class="sound_only"> 필수</strong></label>
<input type="text" name="sv" value="<?php echo $sv;?>" id="sv" required class="frm_input required" > <input type="text" name="sv" value="<?php echo get_text($sv) ;?>" id="sv" required class="frm_input required" >
<input type="submit" value="검색" class="btn_submit"> <input type="submit" value="검색" class="btn_submit">
</form> </form>
</div> </div>
@@ -181,7 +184,7 @@ function multi_update(sel)
<span class="sound_only">등록 </span><?php echo date('Y-m-d', strtotime($res['fo_datetime']))?> <span class="sound_only">등록 </span><?php echo date('Y-m-d', strtotime($res['fo_datetime']))?>
</div> </div>
<div class="li_cmd"> <div class="li_cmd">
<a href="./form_write.php?w=u&amp;fo_no=<?php echo $res['fo_no']?>&amp;page=<?php echo $page;?>&amp;fg_no=<?php echo $fg_no;?>&amp;st=<?php echo $st;?>&amp;sv=<?php echo $sv;?>">수정</a> <a href="./form_write.php?w=u&amp;fo_no=<?php echo $res['fo_no']?>&amp;page=<?php echo $page;?>&amp;fg_no=<?php echo $fg_no;?>&amp;st=<?php echo get_text($st);?>&amp;sv=<?php echo get_text($sv);?>">수정</a>
<a href="javascript:void(book_del('<?php echo $res['fo_no']?>'));">삭제</a> <a href="javascript:void(book_del('<?php echo $res['fo_no']?>'));">삭제</a>
<a href="./sms_write.php?fo_no=<?php echo $res['fo_no']?>">보내기</a> <a href="./sms_write.php?fo_no=<?php echo $res['fo_no']?>">보내기</a>
</div> </div>
+2 -2
View File
@@ -5,8 +5,8 @@ include_once(G5_LIB_PATH.'/visit.lib.php');
include_once('./admin.head.php'); include_once('./admin.head.php');
include_once(G5_PLUGIN_PATH.'/jquery-ui/datepicker.php'); include_once(G5_PLUGIN_PATH.'/jquery-ui/datepicker.php');
if (empty($fr_date)) $fr_date = G5_TIME_YMD; if (empty($fr_date) || ! preg_match("/^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])$/", $fr_date) ) $fr_date = G5_TIME_YMD;
if (empty($to_date)) $to_date = G5_TIME_YMD; if (empty($to_date) || ! preg_match("/^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])$/", $to_date) ) $to_date = G5_TIME_YMD;
$qstr = "fr_date=".$fr_date."&amp;to_date=".$to_date; $qstr = "fr_date=".$fr_date."&amp;to_date=".$to_date;
$query_string = $qstr ? '?'.$qstr : ''; $query_string = $qstr ? '?'.$qstr : '';
+1
View File
@@ -71,6 +71,7 @@ for ($i=0; $row=sql_fetch_array($result); $i++) {
</tr> </tr>
<?php <?php
$i++;
} }
} else { } else {
echo '<tr><td colspan="'.$colspan.'" class="empty_table">자료가 없습니다.</td></tr>'; 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> </tr>
<?php <?php
$i++;
} }
+1 -1
View File
@@ -44,7 +44,7 @@ $listall = '<a href="'.$_SERVER['SCRIPT_NAME'].'">처음</a>'; //페이지 처
<?php <?php
$sql_common = " from {$g5['visit_table']} "; $sql_common = " from {$g5['visit_table']} ";
if ($sfl) { if ($sfl) {
if($sst=='vi_ip' || $sst=='vi_date'){ if($sfl=='vi_ip' || $sfl=='vi_date'){
$sql_search = " where $sfl like '$stx%' "; $sql_search = " where $sfl like '$stx%' ";
}else{ }else{
$sql_search = " where $sfl like '%$stx%' "; $sql_search = " where $sfl like '%$stx%' ";
+1 -1
View File
@@ -205,6 +205,6 @@ $(document).ready(function(){
} }
?> ?>
<? <?php
include_once ('./admin.tail.php'); include_once ('./admin.tail.php');
?> ?>
+14
View File
@@ -0,0 +1,14 @@
<?php
include_once('./_common.php');
include_once(G5_LIB_PATH.'/json.lib.php');
$ss_name = 'ss_comment_token';
set_session($ss_name, '');
$token = _token();
set_session($ss_name, $token);
die(json_encode(array('token'=>$token)));
?>
+5 -1
View File
@@ -7,7 +7,11 @@ if (G5_IS_MOBILE) {
include_once(G5_BBS_PATH.'/_head.php'); include_once(G5_BBS_PATH.'/_head.php');
echo stripslashes($board['bo_mobile_content_head']); echo stripslashes($board['bo_mobile_content_head']);
} else { } 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']); 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'); include_once(G5_BBS_PATH.'/_tail.php');
} else { } else {
echo stripslashes($board['bo_content_tail']); 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']; $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']); @include_once($co['co_include_head']);
else else
include_once('./_head.php'); include_once('./_head.php');
@@ -85,7 +85,7 @@ if(is_file($skin_file)) {
echo '<p>'.str_replace(G5_PATH.'/', '', $skin_file).'이 존재하지 않습니다.</p>'; 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']); @include_once($co['co_include_tail']);
else else
include_once('./_tail.php'); include_once('./_tail.php');
+5 -5
View File
@@ -1,11 +1,11 @@
<?php <?php
include_once('./_common.php'); include_once('./_common.php');
if ($is_admin) $delete_token = get_session('ss_delete_token');
{ set_session('ss_delete_token', '');
if (!($token && get_session('ss_delete_token') == $token))
alert('토큰 에러로 삭제 불가합니다.'); if (!($token && $delete_token == $token))
} alert('토큰 에러로 삭제 불가합니다.');
//$wr = sql_fetch(" select * from $write_table where wr_id = '$wr_id' "); //$wr = sql_fetch(" select * from $write_table where wr_id = '$wr_id' ");
+5 -5
View File
@@ -2,11 +2,11 @@
// 코멘트 삭제 // 코멘트 삭제
include_once('./_common.php'); include_once('./_common.php');
if ($is_admin) $delete_comment_token = get_session('ss_delete_comment_'.$comment_id.'_token');
{ set_session('ss_delete_comment_'.$comment_id.'_token', '');
if (!($token && get_session("ss_delete_token") == $token))
alert('토큰 에러로 삭제 불가합니다.'); if (!($token && $delete_comment_token == $token))
} alert('토큰 에러로 삭제 불가합니다.');
// 4.1 // 4.1
@include_once($board_skin_path.'/delete_comment.head.skin.php'); @include_once($board_skin_path.'/delete_comment.head.skin.php');
+12 -3
View File
@@ -1,20 +1,29 @@
<?php <?php
include_once('./_common.php'); include_once('./_common.php');
$sql = " select mb_id, mb_email, mb_datetime from {$g5['member_table']} where mb_id = '{$mb_id}' "; $mb_id = trim($_GET['mb_id']);
$mb_md5 = trim($_GET['mb_md5']);
$sql = " select mb_id, mb_email_certify2 from {$g5['member_table']} where mb_id = '{$mb_id}' ";
$row = sql_fetch($sql); $row = sql_fetch($sql);
if (!$row['mb_id']) if (!$row['mb_id'])
alert('존재하는 회원이 아닙니다.', G5_URL); alert('존재하는 회원이 아닙니다.', G5_URL);
// 인증 링크는 한번만 처리가 되게 한다.
sql_query(" update {$g5['member_table']} set mb_email_certify2 = '' where mb_id = '$mb_id' ");
if ($mb_md5) if ($mb_md5)
{ {
$tmp_md5 = md5($row['mb_id'].$row['mb_email'].$row['mb_datetime']); if ($mb_md5 == $row['mb_email_certify2'])
if ($mb_md5 == $tmp_md5)
{ {
sql_query(" update {$g5['member_table']} set mb_email_certify = '".G5_TIME_YMDHIS."' where mb_id = '{$mb_id}' "); sql_query(" update {$g5['member_table']} set mb_email_certify = '".G5_TIME_YMDHIS."' where mb_id = '{$mb_id}' ");
alert("메일인증 처리를 완료 하였습니다.\\n\\n지금부터 {$mb_id} 아이디로 로그인 가능합니다.", G5_URL); alert("메일인증 처리를 완료 하였습니다.\\n\\n지금부터 {$mb_id} 아이디로 로그인 가능합니다.", G5_URL);
} }
else
{
alert('메일인증 요청 정보가 올바르지 않습니다.', G5_URL);
}
} }
alert('제대로 된 값이 넘어오지 않았습니다.', G5_URL); alert('제대로 된 값이 넘어오지 않았습니다.', G5_URL);
+6 -3
View File
@@ -28,14 +28,17 @@ if ($sendmail_count > 3)
$g5['title'] = '메일 쓰기'; $g5['title'] = '메일 쓰기';
include_once(G5_PATH.'/head.sub.php'); include_once(G5_PATH.'/head.sub.php');
$email = get_email_address(base64_decode($email)); $email_enc = new str_encrypt();
$email_dec = $email_enc->decrypt($email);
$email = get_email_address($email_dec);
if(!$email) if(!$email)
alert_close('이메일이 올바르지 않습니다.'); alert_close('이메일이 올바르지 않습니다.');
$email = base64_encode($email); $email = $email_enc->encrypt($email);
if (!$name) if (!$name)
$name = base64_decode($email); $name = $email;
else else
$name = get_text(stripslashes($name), true); $name = get_text(stripslashes($name), true);
+2 -1
View File
@@ -9,7 +9,8 @@ if (!$config['cf_email_use'])
if (!$is_member && $config['cf_formmail_is_member']) if (!$is_member && $config['cf_formmail_is_member'])
alert_close('회원만 이용하실 수 있습니다.'); alert_close('회원만 이용하실 수 있습니다.');
$to = base64_decode($to); $email_enc = new str_encrypt();
$to = $email_enc->decrypt($to);
if (substr_count($to, "@") > 1) if (substr_count($to, "@") > 1)
alert_close('한번에 한사람에게만 메일을 발송할 수 있습니다.'); alert_close('한번에 한사람에게만 메일을 발송할 수 있습니다.');
+2
View File
@@ -19,6 +19,8 @@ $save_count_write = 0;
$save_count_comment = 0; $save_count_comment = 0;
$cnt = 0; $cnt = 0;
$wr_id_list = preg_replace('/[^0-9\,]/', '', $_POST['wr_id_list']);
$sql = " select distinct wr_num from $write_table where wr_id in ({$wr_id_list}) order by wr_id "; $sql = " select distinct wr_num from $write_table where wr_id in ({$wr_id_list}) order by wr_id ";
$result = sql_query($sql); $result = sql_query($sql);
while ($row = sql_fetch_array($result)) while ($row = sql_fetch_array($result))
+4 -2
View File
@@ -9,11 +9,13 @@ switch ($w) {
$return_url = './board.php?bo_table='.$bo_table.'&amp;wr_id='.$wr_id; $return_url = './board.php?bo_table='.$bo_table.'&amp;wr_id='.$wr_id;
break; break;
case 'd' : case 'd' :
$action = './delete.php'; 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; $return_url = './board.php?bo_table='.$bo_table.'&amp;wr_id='.$wr_id;
break; break;
case 'x' : case 'x' :
$action = './delete_comment.php'; set_session('ss_delete_comment_'.$comment_id.'_token', $token = uniqid(time()));
$action = './delete_comment.php?token='.$token;
$row = sql_fetch(" select wr_parent from $write_table where wr_id = '$comment_id' "); $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 = './board.php?bo_table='.$bo_table.'&amp;wr_id='.$row['wr_parent'];
break; break;
+4
View File
@@ -29,6 +29,10 @@ for($i=0; $i<$count; $i++) {
if($is_admin != 'super' && $row['mb_id'] != $member['mb_id']) if($is_admin != 'super' && $row['mb_id'] != $member['mb_id'])
continue; continue;
// 답변이 달린 글은 삭제못함
if($is_admin != 'super' && !$row['qa_type'] && $row['qa_status'])
continue;
// 첨부파일 삭제 // 첨부파일 삭제
for($k=1; $k<=2; $k++) { for($k=1; $k<=2; $k++) {
@unlink(G5_DATA_PATH.'/qa/'.$row['qa_file'.$k]); @unlink(G5_DATA_PATH.'/qa/'.$row['qa_file'.$k]);
+1 -1
View File
@@ -9,7 +9,7 @@ if (G5_IS_MOBILE) {
include_once('./_head.php'); include_once('./_head.php');
echo conv_content($qaconfig['qa_mobile_content_head'], 1); echo conv_content($qaconfig['qa_mobile_content_head'], 1);
} else { } else {
if($qaconfig['qa_include_head']) if(is_include_path_check($qaconfig['qa_include_head']))
@include ($qaconfig['qa_include_head']); @include ($qaconfig['qa_include_head']);
else else
include ('./_head.php'); include ('./_head.php');
+1 -1
View File
@@ -7,7 +7,7 @@ if (G5_IS_MOBILE) {
include_once('./_tail.php'); include_once('./_tail.php');
} else { } else {
echo conv_content($qaconfig['qa_content_tail'], 1); 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']); @include ($qaconfig['qa_include_tail']);
else else
include ('./_tail.php'); include ('./_tail.php');
+26 -7
View File
@@ -15,16 +15,23 @@ $msg = array();
// 1:1문의 설정값 // 1:1문의 설정값
$qaconfig = get_qa_config(); $qaconfig = get_qa_config();
if(trim($qaconfig['qa_category'])) {
if($w != 'a') {
$category = explode('|', $qaconfig['qa_category']);
if(!in_array($qa_category, $category))
alert('분류를 올바르게 지정해 주십시오.');
}
} else {
alert('1:1문의 설정에서 분류를 설정해 주십시오');
}
// e-mail 체크 // e-mail 체크
if(isset($_POST['qa_email']) && $qa_email) { $qa_email = '';
if(isset($_POST['qa_email']) && $_POST['qa_email'])
$qa_email = get_email_address(trim($_POST['qa_email'])); $qa_email = get_email_address(trim($_POST['qa_email']));
if($qaconfig['qa_req_email'] && !$qa_email) if($w != 'a' && $qaconfig['qa_req_email'] && !$qa_email)
$msg[] = '이메일을 입력하세요.'; $msg[] = '이메일을 입력하세요.';
if (!preg_match("/([0-9a-zA-Z_-]+)@([0-9a-zA-Z_-]+)\.([0-9a-zA-Z_-]+)/", $qa_email))
$msg[] = '이메일 주소가 형식에 맞지 않습니다.';
}
$qa_subject = ''; $qa_subject = '';
if (isset($_POST['qa_subject'])) { if (isset($_POST['qa_subject'])) {
@@ -105,6 +112,18 @@ if($w == 'u' || $w == 'a' || $w == 'r') {
} }
} }
// 파일개수 체크
$file_count = 0;
$upload_count = count($_FILES['bf_file']['name']);
for ($i=1; $i<=$upload_count; $i++) {
if($_FILES['bf_file']['name'][$i] && is_uploaded_file($_FILES['bf_file']['tmp_name'][$i]))
$file_count++;
}
if($file_count > 2)
alert('첨부파일을 2개 이하로 업로드 해주십시오.');
// 디렉토리가 없다면 생성합니다. (퍼미션도 변경하구요.) // 디렉토리가 없다면 생성합니다. (퍼미션도 변경하구요.)
@mkdir(G5_DATA_PATH.'/qa', G5_DIR_PERMISSION); @mkdir(G5_DATA_PATH.'/qa', G5_DIR_PERMISSION);
@chmod(G5_DATA_PATH.'/qa', G5_DIR_PERMISSION); @chmod(G5_DATA_PATH.'/qa', G5_DIR_PERMISSION);
+7 -3
View File
@@ -9,7 +9,7 @@ $mb_email = get_email_address(trim($_POST['mb_email']));
if(!$mb_id || !$mb_email) if(!$mb_id || !$mb_email)
alert('올바른 방법으로 이용해 주십시오.', G5_URL); alert('올바른 방법으로 이용해 주십시오.', G5_URL);
$sql = " select mb_name, mb_password, mb_email, mb_datetime from {$g5['member_table']} where mb_id = '{$mb_id}' and substring(mb_email_certify, 1, 1) = '0' "; $sql = " select mb_name from {$g5['member_table']} where mb_id = '{$mb_id}' and substring(mb_email_certify, 1, 1) = '0' ";
$mb = sql_fetch($sql); $mb = sql_fetch($sql);
if (!$mb) { if (!$mb) {
alert("이미 메일인증 하신 회원입니다.", G5_URL); alert("이미 메일인증 하신 회원입니다.", G5_URL);
@@ -29,8 +29,12 @@ if ($row['cnt']) {
$subject = '['.$config['cf_title'].'] 인증확인 메일입니다.'; $subject = '['.$config['cf_title'].'] 인증확인 메일입니다.';
$mb_name = $mb['mb_name']; $mb_name = $mb['mb_name'];
$mb_datetime = $mb['mb_datetime'] ? $mb['mb_datetime'] : G5_TIME_YMDHIS;
$mb_md5 = md5($mb_id.$mb_email.$mb_datetime); // 어떠한 회원정보도 포함되지 않은 일회용 난수를 생성하여 인증에 사용
$mb_md5 = md5(pack('V*', rand(), rand(), rand(), rand()));
sql_query(" update {$g5['member_table']} set mb_email_certify2 = '$mb_md5' where mb_id = '$mb_id' ");
$certify_href = G5_BBS_URL.'/email_certify.php?mb_id='.$mb_id.'&amp;mb_md5='.$mb_md5; $certify_href = G5_BBS_URL.'/email_certify.php?mb_id='.$mb_id.'&amp;mb_md5='.$mb_md5;
ob_start(); ob_start();
+12 -5
View File
@@ -253,8 +253,12 @@ if ($w == '') {
if ($config['cf_email_mb_member']) { if ($config['cf_email_mb_member']) {
$subject = '['.$config['cf_title'].'] 회원가입을 축하드립니다.'; $subject = '['.$config['cf_title'].'] 회원가입을 축하드립니다.';
$mb_md5 = md5($mb_id.$mb_email.G5_TIME_YMDHIS); // 어떠한 회원정보도 포함되지 않은 일회용 난수를 생성하여 인증에 사용
$certify_href = G5_BBS_URL.'/email_certify.php?mb_id='.$mb_id.'&amp;mb_md5='.$mb_md5; if ($config['cf_use_email_certify']) {
$mb_md5 = md5(pack('V*', rand(), rand(), rand(), rand()));
sql_query(" update {$g5['member_table']} set mb_email_certify2 = '$mb_md5' where mb_id = '$mb_id' ");
$certify_href = G5_BBS_URL.'/email_certify.php?mb_id='.$mb_id.'&amp;mb_md5='.$mb_md5;
}
ob_start(); ob_start();
include_once ('./register_form_update_mail1.php'); include_once ('./register_form_update_mail1.php');
@@ -396,8 +400,11 @@ if (isset($_FILES['mb_icon']) && is_uploaded_file($_FILES['mb_icon']['tmp_name']
if ($config['cf_use_email_certify'] && $old_email != $mb_email) { if ($config['cf_use_email_certify'] && $old_email != $mb_email) {
$subject = '['.$config['cf_title'].'] 인증확인 메일입니다.'; $subject = '['.$config['cf_title'].'] 인증확인 메일입니다.';
$mb_datetime = $member['mb_datetime'] ? $member['mb_datetime'] : G5_TIME_YMDHIS; // 어떠한 회원정보도 포함되지 않은 일회용 난수를 생성하여 인증에 사용
$mb_md5 = md5($mb_id.$mb_email.$mb_datetime); $mb_md5 = md5(pack('V*', rand(), rand(), rand(), rand()));
sql_query(" update {$g5['member_table']} set mb_email_certify2 = '$mb_md5' where mb_id = '$mb_id' ");
$certify_href = G5_BBS_URL.'/email_certify.php?mb_id='.$mb_id.'&amp;mb_md5='.$mb_md5; $certify_href = G5_BBS_URL.'/email_certify.php?mb_id='.$mb_id.'&amp;mb_md5='.$mb_md5;
ob_start(); ob_start();
@@ -405,7 +412,7 @@ if ($config['cf_use_email_certify'] && $old_email != $mb_email) {
$content = ob_get_contents(); $content = ob_get_contents();
ob_end_clean(); ob_end_clean();
mailer($config['cf_title'], $config['cf_admin_email'], $mb_email, $subject, $content, 1); mailer($config['cf_admin_email_name'], $config['cf_admin_email'], $mb_email, $subject, $content, 1);
} }
+4
View File
@@ -10,6 +10,10 @@ if (!$is_member)
exit; exit;
} }
// 게시글 존재하는지
if(!$write['wr_id'])
alert_close('스크랩하시려는 게시글이 존재하지 않습니다.');
$sql = " select count(*) as cnt from {$g5['scrap_table']} $sql = " select count(*) as cnt from {$g5['scrap_table']}
where mb_id = '{$member['mb_id']}' where mb_id = '{$member['mb_id']}'
and bo_table = '$bo_table' and bo_table = '$bo_table'
+2 -6
View File
@@ -72,12 +72,8 @@ $update_href = $delete_href = '';
// 로그인중이고 자신의 글이라면 또는 관리자라면 비밀번호를 묻지 않고 바로 수정, 삭제 가능 // 로그인중이고 자신의 글이라면 또는 관리자라면 비밀번호를 묻지 않고 바로 수정, 삭제 가능
if (($member['mb_id'] && ($member['mb_id'] == $write['mb_id'])) || $is_admin) { if (($member['mb_id'] && ($member['mb_id'] == $write['mb_id'])) || $is_admin) {
$update_href = './write.php?w=u&amp;bo_table='.$bo_table.'&amp;wr_id='.$wr_id.'&amp;page='.$page.$qstr; $update_href = './write.php?w=u&amp;bo_table='.$bo_table.'&amp;wr_id='.$wr_id.'&amp;page='.$page.$qstr;
$delete_href = './delete.php?bo_table='.$bo_table.'&amp;wr_id='.$wr_id.'&amp;page='.$page.urldecode($qstr); set_session('ss_delete_token', $token = uniqid(time()));
if ($is_admin) $delete_href ='./delete.php?bo_table='.$bo_table.'&amp;wr_id='.$wr_id.'&amp;token='.$token.'&amp;page='.$page.urldecode($qstr);
{
set_session("ss_delete_token", $token = uniqid(time()));
$delete_href ='./delete.php?bo_table='.$bo_table.'&amp;wr_id='.$wr_id.'&amp;token='.$token.'&amp;page='.$page.urldecode($qstr);
}
} }
else if (!$write['mb_id']) { // 회원이 쓴 글이 아니라면 else if (!$write['mb_id']) { // 회원이 쓴 글이 아니라면
$update_href = './password.php?w=u&amp;bo_table='.$bo_table.'&amp;wr_id='.$wr_id.'&amp;page='.$page.$qstr; $update_href = './password.php?w=u&amp;bo_table='.$bo_table.'&amp;wr_id='.$wr_id.'&amp;page='.$page.$qstr;
+3 -5
View File
@@ -9,11 +9,6 @@ if ($is_guest && $board['bo_comment_level'] < 2) {
@include_once($board_skin_path.'/view_comment.head.skin.php'); @include_once($board_skin_path.'/view_comment.head.skin.php');
// 코멘트를 새창으로 여는 경우 세션값이 없으므로 생성한다.
if ($is_admin && !$token) {
set_session("ss_delete_token", $token = uniqid(time()));
}
$list = array(); $list = array();
$is_comment_write = false; $is_comment_write = false;
@@ -72,10 +67,13 @@ for ($i=0; $row=sql_fetch_array($result); $i++)
$list[$i]['is_del'] = false; $list[$i]['is_del'] = false;
if ($is_comment_write || $is_admin) if ($is_comment_write || $is_admin)
{ {
$token = '';
if ($member['mb_id']) if ($member['mb_id'])
{ {
if ($row['mb_id'] == $member['mb_id'] || $is_admin) if ($row['mb_id'] == $member['mb_id'] || $is_admin)
{ {
set_session('ss_delete_comment_'.$row['wr_id'].'_token', $token = uniqid(time()));
$list[$i]['del_link'] = './delete_comment.php?bo_table='.$bo_table.'&amp;comment_id='.$row['wr_id'].'&amp;token='.$token.'&amp;page='.$page.$qstr; $list[$i]['del_link'] = './delete_comment.php?bo_table='.$bo_table.'&amp;comment_id='.$row['wr_id'].'&amp;token='.$token.'&amp;page='.$page.$qstr;
$list[$i]['is_edit'] = true; $list[$i]['is_edit'] = true;
$list[$i]['is_del'] = true; $list[$i]['is_del'] = true;
+2
View File
@@ -337,6 +337,8 @@ if ($w == '') {
} }
$file = get_file($bo_table, $wr_id); $file = get_file($bo_table, $wr_id);
if($file_count < $file['count'])
$file_count = $file['count'];
} else if ($w == 'r') { } else if ($w == 'r') {
if (strstr($write['wr_option'], 'secret')) { if (strstr($write['wr_option'], 'secret')) {
$is_secret = true; $is_secret = true;
+10 -1
View File
@@ -3,6 +3,12 @@ define('G5_CAPTCHA', true);
include_once('./_common.php'); include_once('./_common.php');
include_once(G5_CAPTCHA_PATH.'/captcha.lib.php'); include_once(G5_CAPTCHA_PATH.'/captcha.lib.php');
// 토큰체크
$comment_token = trim(get_session('ss_comment_token'));
set_session('ss_comment_token', '');
if(!trim($_POST['token']) || !$comment_token || $comment_token != $_POST['token'])
alert('올바른 방법으로 이용해 주십시오.');
// 090710 // 090710
if (substr_count($wr_content, "&#") > 50) { if (substr_count($wr_content, "&#") > 50) {
alert('내용에 올바르지 않은 코드가 다수 포함되어 있습니다.'); alert('내용에 올바르지 않은 코드가 다수 포함되어 있습니다.');
@@ -77,12 +83,15 @@ if ($w == 'c') // 댓글 입력
// 댓글 답변 // 댓글 답변
if ($comment_id) if ($comment_id)
{ {
$sql = " select wr_id, wr_comment, wr_comment_reply from $write_table $sql = " select wr_id, wr_parent, wr_comment, wr_comment_reply from $write_table
where wr_id = '$comment_id' "; where wr_id = '$comment_id' ";
$reply_array = sql_fetch($sql); $reply_array = sql_fetch($sql);
if (!$reply_array['wr_id']) if (!$reply_array['wr_id'])
alert('답변할 댓글이 없습니다.\\n\\n답변하는 동안 댓글이 삭제되었을 수 있습니다.'); alert('답변할 댓글이 없습니다.\\n\\n답변하는 동안 댓글이 삭제되었을 수 있습니다.');
if($wr['wr_parent'] != $reply_array['wr_parent'])
alert('댓글을 등록할 수 없습니다.');
$tmp_comment = $reply_array['wr_comment']; $tmp_comment = $reply_array['wr_comment'];
if (strlen($reply_array['wr_comment_reply']) == 5) if (strlen($reply_array['wr_comment_reply']) == 5)
+13
View File
@@ -0,0 +1,13 @@
<?php
include_once('./_common.php');
include_once(G5_LIB_PATH.'/json.lib.php');
if(!$bo_table)
die(json_encode(array('error'=>'게시판 정보가 올바르지 않습니다.', 'url'=>G5_URL)));
set_session('ss_write_'.$bo_table.'_token', '');
$token = get_write_token($bo_table);
die(json_encode(array('error'=>'', 'token'=>$token, 'url'=>'')));
?>
+38 -4
View File
@@ -3,6 +3,9 @@ include_once('./_common.php');
include_once(G5_LIB_PATH.'/naver_syndi.lib.php'); include_once(G5_LIB_PATH.'/naver_syndi.lib.php');
include_once(G5_CAPTCHA_PATH.'/captcha.lib.php'); include_once(G5_CAPTCHA_PATH.'/captcha.lib.php');
// 토큰체크
check_write_token($bo_table);
$g5['title'] = '게시글 저장'; $g5['title'] = '게시글 저장';
$msg = array(); $msg = array();
@@ -15,7 +18,12 @@ if($board['bo_use_category']) {
$categories = array_map('trim', explode("|", $board['bo_category_list'].($is_admin ? '|공지' : ''))); $categories = array_map('trim', explode("|", $board['bo_category_list'].($is_admin ? '|공지' : '')));
if(!empty($categories) && !in_array($ca_name, $categories)) if(!empty($categories) && !in_array($ca_name, $categories))
$msg[] = '분류를 올바르게 입력하세요.'; $msg[] = '분류를 올바르게 입력하세요.';
if(empty($categories))
$ca_name = '';
} }
} else {
$ca_name = '';
} }
$wr_subject = ''; $wr_subject = '';
@@ -77,10 +85,16 @@ if ($w == 'u' || $w == 'r') {
} }
// 외부에서 글을 등록할 수 있는 버그가 존재하므로 비밀글은 사용일 경우에만 가능해야 함 // 외부에서 글을 등록할 수 있는 버그가 존재하므로 비밀글은 사용일 경우에만 가능해야 함
if (!$is_admin && !$board['bo_use_secret'] && $secret) { if (!$is_admin && !$board['bo_use_secret'] && (stripos($_POST['html'], 'secret') !== false || stripos($_POST['secret'], 'secret') !== false || stripos($_POST['mail'], 'secret') !== false)) {
alert('비밀글 미사용 게시판 이므로 비밀글로 등록할 수 없습니다.'); alert('비밀글 미사용 게시판 이므로 비밀글로 등록할 수 없습니다.');
} }
$secret = '';
if (isset($_POST['secret']) && $_POST['secret']) {
if(preg_match('#secret#', strtolower($_POST['secret']), $matches))
$secret = $matches[0];
}
// 외부에서 글을 등록할 수 있는 버그가 존재하므로 비밀글 무조건 사용일때는 관리자를 제외(공지)하고 무조건 비밀글로 등록 // 외부에서 글을 등록할 수 있는 버그가 존재하므로 비밀글 무조건 사용일때는 관리자를 제외(공지)하고 무조건 비밀글로 등록
if (!$is_admin && $board['bo_use_secret'] == 2) { if (!$is_admin && $board['bo_use_secret'] == 2) {
$secret = 'secret'; $secret = 'secret';
@@ -88,12 +102,14 @@ if (!$is_admin && $board['bo_use_secret'] == 2) {
$html = ''; $html = '';
if (isset($_POST['html']) && $_POST['html']) { if (isset($_POST['html']) && $_POST['html']) {
$html = $_POST['html']; if(preg_match('#html(1|2)#', strtolower($_POST['html']), $matches))
$html = $matches[0];
} }
$mail = ''; $mail = '';
if (isset($_POST['mail']) && $_POST['mail']) { if (isset($_POST['mail']) && $_POST['mail']) {
$mail = $_POST['mail']; if(preg_match('#mail#', strtolower($_POST['mail']), $matches))
$mail = $matches[0];
} }
$notice = ''; $notice = '';
@@ -402,6 +418,24 @@ if (!$group['gr_use_access'] && $board['bo_read_level'] < 2 && !$secret) {
naver_syndi_ping($bo_table, $wr_id); naver_syndi_ping($bo_table, $wr_id);
} }
// 파일개수 체크
$file_count = 0;
$upload_count = count($_FILES['bf_file']['name']);
for ($i=0; $i<$upload_count; $i++) {
if($_FILES['bf_file']['name'][$i] && is_uploaded_file($_FILES['bf_file']['tmp_name'][$i]))
$file_count++;
}
if($w == 'u') {
$file = get_file($bo_table, $wr_id);
if($file_count && (int)$file['count'] > $board['bo_upload_count'])
alert('기존 파일을 삭제하신 후 첨부파일을 '.number_format($board['bo_upload_count']).'개 이하로 업로드 해주십시오.');
} else {
if($file_count > $board['bo_upload_count'])
alert('첨부파일을 '.number_format($board['bo_upload_count']).'개 이하로 업로드 해주십시오.');
}
// 디렉토리가 없다면 생성합니다. (퍼미션도 변경하구요.) // 디렉토리가 없다면 생성합니다. (퍼미션도 변경하구요.)
@mkdir(G5_DATA_PATH.'/file/'.$bo_table, G5_DIR_PERMISSION); @mkdir(G5_DATA_PATH.'/file/'.$bo_table, G5_DIR_PERMISSION);
@chmod(G5_DATA_PATH.'/file/'.$bo_table, G5_DIR_PERMISSION); @chmod(G5_DATA_PATH.'/file/'.$bo_table, G5_DIR_PERMISSION);
@@ -658,7 +692,7 @@ if (!($w == 'u' || $w == 'cu') && $config['cf_email_use'] && $board['bo_use_emai
delete_cache_latest($bo_table); delete_cache_latest($bo_table);
if ($file_upload_msg) 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 else
goto_url(G5_HTTP_BBS_URL.'/board.php?bo_table='.$bo_table.'&amp;wr_id='.$wr_id.$qstr); goto_url(G5_HTTP_BBS_URL.'/board.php?bo_table='.$bo_table.'&amp;wr_id='.$wr_id.$qstr);
?> ?>
+5 -3
View File
@@ -32,13 +32,15 @@ function g5_path()
$result['path'] = str_replace('\\', '/', dirname(__FILE__)); $result['path'] = str_replace('\\', '/', dirname(__FILE__));
$tilde_remove = preg_replace('/^\/\~[^\/]+(.*)$/', '$1', $_SERVER['SCRIPT_NAME']); $tilde_remove = preg_replace('/^\/\~[^\/]+(.*)$/', '$1', $_SERVER['SCRIPT_NAME']);
$document_root = str_replace($tilde_remove, '', $_SERVER['SCRIPT_FILENAME']); $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'] : ''; $port = $_SERVER['SERVER_PORT'] != 80 ? ':'.$_SERVER['SERVER_PORT'] : '';
$http = 'http' . ((isset($_SERVER['HTTPS']) && $_SERVER['HTTPS']=='on') ? 's' : '') . '://'; $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']; $host = isset($_SERVER['HTTP_HOST']) ? $_SERVER['HTTP_HOST'] : $_SERVER['SERVER_NAME'];
if(isset($_SERVER['HTTP_HOST']) && preg_match('/:[0-9]+$/', $host)) if(isset($_SERVER['HTTP_HOST']) && preg_match('/:[0-9]+$/', $host))
$host = preg_replace('/:[0-9]+$/', '', $host); $host = preg_replace('/:[0-9]+$/', '', $host);
$host = preg_replace("/[\<\>\'\"\\\'\\\"\%\=\(\)\/\^\*]/", '', $host);
$result['url'] = $http.$host.$port.$user.$root; $result['url'] = $http.$host.$port.$user.$root;
return $result; return $result;
} }
@@ -369,7 +371,7 @@ if ($_SESSION['ss_mb_id']) { // 로그인중이라면
$key = md5($_SERVER['SERVER_ADDR'] . $_SERVER['REMOTE_ADDR'] . $_SERVER['HTTP_USER_AGENT'] . $row['mb_password']); $key = md5($_SERVER['SERVER_ADDR'] . $_SERVER['REMOTE_ADDR'] . $_SERVER['HTTP_USER_AGENT'] . $row['mb_password']);
// 쿠키에 저장된 키와 같다면 // 쿠키에 저장된 키와 같다면
$tmp_key = get_cookie('ck_auto'); $tmp_key = get_cookie('ck_auto');
if ($tmp_key == $key && $tmp_key) { if ($tmp_key === $key && $tmp_key) {
// 차단, 탈퇴가 아니고 메일인증이 사용이면서 인증을 받았다면 // 차단, 탈퇴가 아니고 메일인증이 사용이면서 인증을 받았다면
if ($row['mb_intercept_date'] == '' && if ($row['mb_intercept_date'] == '' &&
$row['mb_leave_date'] == '' && $row['mb_leave_date'] == '' &&
+1 -1
View File
@@ -5,7 +5,7 @@
********************/ ********************/
define('G5_VERSION', '그누보드5'); define('G5_VERSION', '그누보드5');
define('G5_GNUBOARD_VER', '5.1.16'); define('G5_GNUBOARD_VER', '5.2.8');
// 이 상수가 정의되지 않으면 각각의 개별 페이지는 별도로 실행될 수 없음 // 이 상수가 정의되지 않으면 각각의 개별 페이지는 별도로 실행될 수 없음
define('_GNUBOARD_', true); define('_GNUBOARD_', true);
+11
View File
@@ -0,0 +1,11 @@
<?php
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
//플러그인 폴더 이름 및 스킨 폴더 이름
define('SMARTEDITOR_UPLOAD_IMG_CHECK', 1); // 이미지 파일을 썸네일 할수 있는지 여부를 체크합니다. ( 해당 파일이 이미지 파일인지 체크합니다. 1이면 사용, 0이면 사용 안함 )
define('SMARTEDITOR_UPLOAD_RESIZE', 0); // 스마트에디터 업로드 이미지파일 JPG, PNG 리사이즈 1이면 사용, 0이면 사용안함
define('SMARTEDITOR_UPLOAD_MAX_WIDTH', 1200); // 스마트에디터 업로드 이미지 리사이즈 제한 width
define('SMARTEDITOR_UPLOAD_MAX_HEIGHT', 2800); // 스마트에디터 업로드 이미지 리사이즈 제한 height
define('SMARTEDITOR_UPLOAD_SIZE_LIMIT', 20); // 스마트에디터 업로드 사이즈 제한 ( 기본 20MB )
define('SMARTEDITOR_UPLOAD_IMAGE_QUALITY', 98); // 썸네일 이미지 JPG, PNG 압축률
?>
+6
View File
@@ -0,0 +1,6 @@
<?php
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
define('G5_JS_VER', '161020');
define('G5_CSS_VER', '161020');
?>
+2
View File
@@ -28,6 +28,8 @@ $g4_config_file = trim($_POST['file_path']);
if(!$g4_config_file) if(!$g4_config_file)
alert('config.php 파일의 경로를 입력해 주십시오.'); alert('config.php 파일의 경로를 입력해 주십시오.');
$g4_config_file = preg_replace('#/config.php$#i', '', $g4_config_file).'/config.php';
if(!is_file($g4_config_file)) if(!is_file($g4_config_file))
alert('입력하신 경로에 config.php 파일이 존재하지 않습니다.'); alert('입력하신 경로에 config.php 파일이 존재하지 않습니다.');
+6 -6
View File
@@ -45,7 +45,7 @@ if (G5_IS_MOBILE) {
echo '<meta name="format-detection" content="telephone=no">'.PHP_EOL; echo '<meta name="format-detection" content="telephone=no">'.PHP_EOL;
} else { } else {
echo '<meta http-equiv="imagetoolbar" content="no">'.PHP_EOL; 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']) if($config['cf_add_meta'])
@@ -55,9 +55,9 @@ if($config['cf_add_meta'])
<?php <?php
if (defined('G5_IS_ADMIN')) { if (defined('G5_IS_ADMIN')) {
if(!defined('_THEME_PREVIEW_')) if(!defined('_THEME_PREVIEW_'))
echo '<link rel="stylesheet" href="'.G5_ADMIN_URL.'/css/admin.css">'.PHP_EOL; echo '<link rel="stylesheet" href="'.G5_ADMIN_URL.'/css/admin.css?ver='.G5_CSS_VER.'">'.PHP_EOL;
} else { } else {
echo '<link rel="stylesheet" href="'.G5_CSS_URL.'/'.(G5_IS_MOBILE?'mobile':'default').'.css">'.PHP_EOL; echo '<link rel="stylesheet" href="'.G5_CSS_URL.'/'.(G5_IS_MOBILE?'mobile':'default').'.css?ver='.G5_CSS_VER.'">'.PHP_EOL;
} }
?> ?>
<!--[if lte IE 8]> <!--[if lte IE 8]>
@@ -79,9 +79,9 @@ var g5_admin_url = "<?php echo G5_ADMIN_URL; ?>";
<?php } ?> <?php } ?>
</script> </script>
<script src="<?php echo G5_JS_URL ?>/jquery-1.8.3.min.js"></script> <script src="<?php echo G5_JS_URL ?>/jquery-1.8.3.min.js"></script>
<script src="<?php echo G5_JS_URL ?>/jquery.menu.js"></script> <script src="<?php echo G5_JS_URL ?>/jquery.menu.js?ver=<?php echo G5_JS_VER; ?>"></script>
<script src="<?php echo G5_JS_URL ?>/common.js"></script> <script src="<?php echo G5_JS_URL ?>/common.js?ver=<?php echo G5_JS_VER; ?>"></script>
<script src="<?php echo G5_JS_URL ?>/wrest.js"></script> <script src="<?php echo G5_JS_URL ?>/wrest.js?ver=<?php echo G5_JS_VER; ?>"></script>
<?php <?php
if(G5_IS_MOBILE) { if(G5_IS_MOBILE) {
echo '<script src="'.G5_JS_URL.'/modernizr.custom.70111.js"></script>'.PHP_EOL; // overflow scroll 감지 echo '<script src="'.G5_JS_URL.'/modernizr.custom.70111.js"></script>'.PHP_EOL; // overflow scroll 감지
+1
View File
@@ -464,6 +464,7 @@ CREATE TABLE IF NOT EXISTS `g5_member` (
`mb_leave_date` varchar(8) NOT NULL default '', `mb_leave_date` varchar(8) NOT NULL default '',
`mb_intercept_date` varchar(8) NOT NULL default '', `mb_intercept_date` varchar(8) NOT NULL default '',
`mb_email_certify` datetime NOT NULL default '0000-00-00 00:00:00', `mb_email_certify` datetime NOT NULL default '0000-00-00 00:00:00',
`mb_email_certify2` varchar(255) NOT NULL default '',
`mb_memo` text NOT NULL, `mb_memo` text NOT NULL,
`mb_lost_certify` varchar(255) NOT NULL, `mb_lost_certify` varchar(255) NOT NULL,
`mb_mailling` tinyint(4) NOT NULL default '0', `mb_mailling` tinyint(4) NOT NULL default '0',
+2
View File
@@ -1,4 +1,6 @@
<?php <?php
@header('Content-Type: text/html; charset=utf-8');
@header('X-Robots-Tag: noindex');
include_once ('../config.php'); include_once ('../config.php');
$title = G5_VERSION." 라이센스 확인 1/3"; $title = G5_VERSION." 라이센스 확인 1/3";
include_once ('./install.inc.php'); 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: 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('Cache-Control: pre-check=0, post-check=0, max-age=0'); // HTTP/1.1
header('Pragma: no-cache'); // HTTP/1.0 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 ('../config.php');
$title = G5_VERSION." 초기환경설정 2/3"; $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: 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('Cache-Control: pre-check=0, post-check=0, max-age=0'); // HTTP/1.1
header('Pragma: no-cache'); // HTTP/1.0 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 ('../config.php');
include_once ('../lib/common.lib.php'); include_once ('../lib/common.lib.php');
+33 -8
View File
@@ -13,16 +13,41 @@ function certify_win_open(type, url)
} }
else if(type == 'kcp-hp') else if(type == 'kcp-hp')
{ {
var return_gubun; if($("input[name=veri_up_hash]").size() < 1)
var width = 410; $("input[name=cert_no]").after('<input type="hidden" name="veri_up_hash" value="">');
var height = 500;
var leftpos = screen.width / 2 - ( width / 2 ); if( navigator.userAgent.indexOf("Android") > - 1 || navigator.userAgent.indexOf("iPhone") > - 1 )
var toppos = screen.height / 2 - ( height / 2 ); {
var $frm = $(event.target.form);
if($("#kcp_cert").size() < 1) {
$frm.wrap('<div id="cert_info"></div>');
var winopts = "width=" + width + ", height=" + height + ", toolbar=no,status=no,statusbar=no,menubar=no,scrollbars=no,resizable=no"; $("#cert_info").append('<form name="form_temp" method="post">')
var position = ",left=" + leftpos + ", top=" + toppos; .after('<iframe id="kcp_cert" name="kcp_cert" width="100%" height="700" frameborder="0" scrolling="no" style="display:none"></iframe>');
var AUTH_POP = window.open(url,'auth_popup', winopts + position); }
var temp_form = document.form_temp;
temp_form.target = "kcp_cert";
temp_form.action = url;
document.getElementById( "cert_info" ).style.display = "none";
document.getElementById( "kcp_cert" ).style.display = "";
temp_form.submit();
}
else
{
var return_gubun;
var width = 410;
var height = 500;
var leftpos = screen.width / 2 - ( width / 2 );
var toppos = screen.height / 2 - ( height / 2 );
var winopts = "width=" + width + ", height=" + height + ", toolbar=no,status=no,statusbar=no,menubar=no,scrollbars=no,resizable=no";
var position = ",left=" + leftpos + ", top=" + toppos;
var AUTH_POP = window.open(url,'auth_popup', winopts + position);
}
} }
else if(type == 'lg-hp') else if(type == 'lg-hp')
{ {
+69
View File
@@ -546,6 +546,26 @@ function font_resize(id, rmv_class, add_class)
set_cookie("ck_font_resize_add_class", add_class, 1, g5_cookie_domain); set_cookie("ck_font_resize_add_class", add_class, 1, g5_cookie_domain);
} }
/**
* 댓글 수정 토큰
**/
function set_comment_token(f)
{
if(typeof f.token === "undefined")
$(f).prepend('<input type="hidden" name="token" value="">');
$.ajax({
url: g5_bbs_url+"/ajax.comment_token.php",
type: "GET",
dataType: "json",
async: false,
cache: false,
success: function(data, textStatus) {
f.token.value = data.token;
}
});
}
$(function(){ $(function(){
$(".win_point").click(function() { $(".win_point").click(function() {
win_point(this.href); win_point(this.href);
@@ -670,3 +690,52 @@ $(function(){
} }
}); });
}); });
function get_write_token(bo_table)
{
var token = "";
$.ajax({
type: "POST",
url: g5_bbs_url+"/write_token.php",
data: { bo_table: bo_table },
cache: false,
async: false,
dataType: "json",
success: function(data) {
if(data.error) {
alert(data.error);
if(data.url)
document.location.href = data.url;
return false;
}
token = data.token;
}
});
return token;
}
$(function() {
$(document).on("click", "form[name=fwrite] input:submit", function() {
var f = this.form;
var bo_table = f.bo_table.value;
var token = get_write_token(bo_table);
if(!token) {
alert("토큰 정보가 올바르지 않습니다.");
return false;
}
var $f = $(f);
if(typeof f.token === "undefined")
$f.prepend('<input type="hidden" name="token" value="">');
$f.find("input[name=token]").val(token);
return true;
});
});
+158 -4
View File
@@ -628,7 +628,7 @@ function get_sql_search($search_ca_name, $search_field, $search_text, $search_op
// SQL Injection 방지 // SQL Injection 방지
// 필드값에 a-z A-Z 0-9 _ , | 이외의 값이 있다면 검색필드를 wr_subject 로 설정한다. // 필드값에 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; $str .= $op2;
switch ($field[$k]) { switch ($field[$k]) {
@@ -712,7 +712,7 @@ function get_member($mb_id, $fields='*')
// 제목별로 컬럼 정렬하는 QUERY STRING // 제목별로 컬럼 정렬하는 QUERY STRING
function subject_sort_link($col, $query_string='', $flag='asc') function subject_sort_link($col, $query_string='', $flag='asc')
{ {
global $sst, $sod, $sfl, $stx, $page; global $sst, $sod, $sfl, $stx, $page, $sca;
$q1 = "sst=$col"; $q1 = "sst=$col";
if ($flag == 'asc') if ($flag == 'asc')
@@ -744,6 +744,7 @@ function subject_sort_link($col, $query_string='', $flag='asc')
$arr_query[] = $q2; $arr_query[] = $q2;
$arr_query[] = 'sfl='.$sfl; $arr_query[] = 'sfl='.$sfl;
$arr_query[] = 'stx='.$stx; $arr_query[] = 'stx='.$stx;
$arr_query[] = 'sca='.$sca;
$arr_query[] = 'page='.$page; $arr_query[] = 'page='.$page;
$qstr = implode("&amp;", $arr_query); $qstr = implode("&amp;", $arr_query);
@@ -1200,7 +1201,8 @@ function get_sideview($mb_id, $name='', $email='', $homepage='')
global $g5; global $g5;
global $bo_table, $sca, $is_admin, $member; global $bo_table, $sca, $is_admin, $member;
$email = base64_encode($email); $email_enc = new str_encrypt();
$email = $email_enc->encrypt($email);
$homepage = set_http(clean_xss_tags($homepage)); $homepage = set_http(clean_xss_tags($homepage));
$name = get_text($name, 0, true); $name = get_text($name, 0, true);
@@ -2422,6 +2424,8 @@ class html_process {
if(!trim($link[1])) if(!trim($link[1]))
continue; continue;
$link[1] = preg_replace('#\.css([\'\"]?>)$#i', '.css?ver='.G5_CSS_VER.'$1', $link[1]);
$stylesheet .= PHP_EOL.$link[1]; $stylesheet .= PHP_EOL.$link[1];
} }
} }
@@ -2446,6 +2450,8 @@ class html_process {
if(!trim($js[1])) if(!trim($js[1]))
continue; continue;
$js[1] = preg_replace('#\.js([\'\"]?>)$#i', '.js?ver='.G5_JS_VER.'$1', $js[1]);
$javascript .= $php_eol.$js[1]; $javascript .= $php_eol.$js[1];
$php_eol = PHP_EOL; $php_eol = PHP_EOL;
} }
@@ -2463,7 +2469,10 @@ class html_process {
<body> <body>
전에 스킨의 자바스크립트가 위치하도록 하게 한다. 전에 스킨의 자바스크립트가 위치하도록 하게 한다.
*/ */
$buffer = preg_replace('#(</head>[^<]*<body[^>]*>)#', "$javascript\n$1", $buffer); $nl = '';
if($javascript)
$nl = "\n";
$buffer = preg_replace('#(</head>[^<]*<body[^>]*>)#', "$javascript{$nl}$1", $buffer);
return $buffer; return $buffer;
} }
@@ -2980,6 +2989,11 @@ function check_url_host($url, $msg='', $return_url=G5_URL)
$p = @parse_url($url); $p = @parse_url($url);
$host = preg_replace('/:[0-9]+$/', '', $_SERVER['HTTP_HOST']); $host = preg_replace('/:[0-9]+$/', '', $_SERVER['HTTP_HOST']);
if(stripos($url, 'http:') !== false) {
if(!isset($p['scheme']) || !$p['scheme'] || !isset($p['host']) || !$p['host'])
alert('url 정보가 올바르지 않습니다.', $return_url);
}
if ((isset($p['scheme']) && $p['scheme']) || (isset($p['host']) && $p['host'])) { if ((isset($p['scheme']) && $p['scheme']) || (isset($p['host']) && $p['host'])) {
//if ($p['host'].(isset($p['port']) ? ':'.$p['port'] : '') != $_SERVER['HTTP_HOST']) { //if ($p['host'].(isset($p['port']) ? ':'.$p['port'] : '') != $_SERVER['HTTP_HOST']) {
if ($p['host'] != $host) { if ($p['host'] != $host) {
@@ -3173,4 +3187,144 @@ function check_vaild_callback($callback){
return true; return true;
} }
} }
// 문자열 암복호화
class str_encrypt
{
var $salt;
var $lenght;
function __construct($salt='')
{
if(!$salt)
$this->salt = md5(preg_replace('/[^0-9A-Za-z]/', substr(G5_MYSQL_USER, -1), G5_MYSQL_PASSWORD));
else
$this->salt = $salt;
$this->length = strlen($this->salt);
}
function encrypt($str)
{
$length = strlen($str);
$result = '';
for($i=0; $i<$length; $i++) {
$char = substr($str, $i, 1);
$keychar = substr($this->salt, ($i % $this->length) - 1, 1);
$char = chr(ord($char) + ord($keychar));
$result .= $char;
}
return base64_encode($result);
}
function decrypt($str) {
$result = '';
$str = base64_decode($str);
$length = strlen($str);
for($i=0; $i<$length; $i++) {
$char = substr($str, $i, 1);
$keychar = substr($this->salt, ($i % $this->length) - 1, 1);
$char = chr(ord($char) - ord($keychar));
$result .= $char;
}
return $result;
}
}
// 불법접근을 막도록 토큰을 생성하면서 토큰값을 리턴
function get_write_token($bo_table)
{
$token = md5(uniqid(rand(), true));
set_session('ss_write_'.$bo_table.'_token', $token);
return $token;
}
// POST로 넘어온 토큰과 세션에 저장된 토큰 비교
function check_write_token($bo_table)
{
if(!$bo_table)
alert('올바른 방법으로 이용해 주십시오.', G5_URL);
$token = get_session('ss_write_'.$bo_table.'_token');
set_session('ss_write_'.$bo_table.'_token', '');
if(!$token || !$_REQUEST['token'] || $token != $_REQUEST['token'])
alert('올바른 방법으로 이용해 주십시오.', G5_URL);
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;
}
?> ?>
+50 -18
View File
@@ -4,7 +4,7 @@ if (!defined('_GNUBOARD_')) exit;
@ini_set('memory_limit', '-1'); @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; global $g5, $config;
$filename = $alt = ""; $filename = $alt = "";
@@ -238,10 +238,10 @@ function thumbnail($filename, $source_path, $target_path, $thumb_width, $thumb_h
$degree = 0; $degree = 0;
if ($size[2] == 1) { if ($size[2] == 1) {
$src = imagecreatefromgif($source_file); $src = @imagecreatefromgif($source_file);
$src_transparency = imagecolortransparent($src); $src_transparency = @imagecolortransparent($src);
} else if ($size[2] == 2) { } else if ($size[2] == 2) {
$src = imagecreatefromjpeg($source_file); $src = @imagecreatefromjpeg($source_file);
if(function_exists('exif_read_data')) { if(function_exists('exif_read_data')) {
// exif 정보를 기준으로 회전각도 구함 // exif 정보를 기준으로 회전각도 구함
@@ -273,8 +273,8 @@ function thumbnail($filename, $source_path, $target_path, $thumb_width, $thumb_h
} }
} }
} else if ($size[2] == 3) { } else if ($size[2] == 3) {
$src = imagecreatefrompng($source_file); $src = @imagecreatefrompng($source_file);
imagealphablending($src, true); @imagealphablending($src, true);
} else { } else {
return; return;
} }
@@ -330,20 +330,52 @@ function thumbnail($filename, $source_path, $target_path, $thumb_width, $thumb_h
} }
break; break;
} }
}
$dst = imagecreatetruecolor($dst_w, $dst_h); $dst = imagecreatetruecolor($dst_w, $dst_h);
if($size[2] == 3) { if($size[2] == 3) {
imagealphablending($dst, false); imagealphablending($dst, false);
imagesavealpha($dst, true); imagesavealpha($dst, true);
} else if($size[2] == 1) { } else if($size[2] == 1) {
$palletsize = imagecolorstotal($src); $palletsize = imagecolorstotal($src);
if($src_transparency >= 0 && $src_transparency < $palletsize) { if($src_transparency >= 0 && $src_transparency < $palletsize) {
$transparent_color = imagecolorsforindex($src, $src_transparency); $transparent_color = imagecolorsforindex($src, $src_transparency);
$current_transparent = imagecolorallocate($dst, $transparent_color['red'], $transparent_color['green'], $transparent_color['blue']); $current_transparent = imagecolorallocate($dst, $transparent_color['red'], $transparent_color['green'], $transparent_color['blue']);
imagefill($dst, 0, 0, $current_transparent); imagefill($dst, 0, 0, $current_transparent);
imagecolortransparent($dst, $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 { } else {
@@ -250,6 +250,8 @@ var char_max = parseInt(<?php echo $comment_max ?>); // 최대
<?php if($is_guest) echo chk_captcha_js(); ?> <?php if($is_guest) echo chk_captcha_js(); ?>
set_comment_token(f);
document.getElementById("btn_submit").disabled = "disabled"; document.getElementById("btn_submit").disabled = "disabled";
return true; return true;
@@ -250,6 +250,8 @@ var char_max = parseInt(<?php echo $comment_max ?>); // 최대
<?php if($is_guest) echo chk_captcha_js(); ?> <?php if($is_guest) echo chk_captcha_js(); ?>
set_comment_token(f);
document.getElementById("btn_submit").disabled = "disabled"; document.getElementById("btn_submit").disabled = "disabled";
return true; return true;
+1 -1
View File
@@ -77,7 +77,7 @@ if( count($faq_master_list) ){
<?php <?php
// 하단 HTML // 하단 HTML
echo '<div id="faq_thtml">'.conv_content($fm['fm_tail_html'], 1).'</div>'; echo '<div id="faq_thtml">'.conv_content($fm['fm_mobile_tail_html'], 1).'</div>';
?> ?>
<div id="faq_sch"> <div id="faq_sch">
@@ -8,7 +8,7 @@ add_stylesheet('<link rel="stylesheet" href="'.$member_skin_url.'/style.css">',
<div class="mbskin"> <div class="mbskin">
<script src="<?php echo G5_JS_URL ?>/jquery.register_form.js"></script> <script src="<?php echo G5_JS_URL ?>/jquery.register_form.js"></script>
<?php if($config['cf_cert_use'] && ($config['cf_cert_ipin'] || $config['cf_cert_hp'])) { ?> <?php if($config['cf_cert_use'] && ($config['cf_cert_ipin'] || $config['cf_cert_hp'])) { ?>
<script src="<?php echo G5_JS_URL ?>/certify.js"></script> <script src="<?php echo G5_JS_URL ?>/certify.js?v=<?php echo G5_JS_VER; ?>"></script>
<?php } ?> <?php } ?>
<form name="fregisterform" id="fregisterform" action="<?php echo $register_action_url ?>" onsubmit="return fregisterform_submit(this);" method="post" enctype="multipart/form-data" autocomplete="off"> <form name="fregisterform" id="fregisterform" action="<?php echo $register_action_url ?>" onsubmit="return fregisterform_submit(this);" method="post" enctype="multipart/form-data" autocomplete="off">
@@ -122,7 +122,7 @@ add_stylesheet('<link rel="stylesheet" href="'.$member_skin_url.'/style.css">',
</tr> </tr>
<?php } ?> <?php } ?>
<?php if ($config['cf_use_hp']) { ?> <?php if ($config['cf_use_hp'] || $config['cf_cert_hp']) { ?>
<tr> <tr>
<th scope="row"><label for="reg_mb_hp">휴대폰번호<?php if ($config['cf_req_hp']) { ?><strong class="sound_only">필수</strong><?php } ?></label></th> <th scope="row"><label for="reg_mb_hp">휴대폰번호<?php if ($config['cf_req_hp']) { ?><strong class="sound_only">필수</strong><?php } ?></label></th>
<td> <td>
+1 -1
View File
@@ -21,7 +21,7 @@ if(defined('G5_THEME_PATH')) {
<div id="ft_copy"> <div id="ft_copy">
<div id="ft_company"> <div id="ft_company">
<a href="<?php echo G5_BBS_URL; ?>/content.php?co_id=company">회사소개</a> <a href="<?php echo G5_BBS_URL; ?>/content.php?co_id=company">회사소개</a>
<a href="<?php echo G5_BBS_URL; ?>/content.php?co_id=privacy">개인정보취급방침</a> <a href="<?php echo G5_BBS_URL; ?>/content.php?co_id=privacy">개인정보처리방침</a>
<a href="<?php echo G5_BBS_URL; ?>/content.php?co_id=provision">서비스이용약관</a> <a href="<?php echo G5_BBS_URL; ?>/content.php?co_id=provision">서비스이용약관</a>
</div> </div>
Copyright &copy; <b>소유하신 도메인.</b> All rights reserved.<br> Copyright &copy; <b>소유하신 도메인.</b> All rights reserved.<br>
+1 -1
View File
@@ -1 +1 @@
5.2.14 5.2.22
+227 -71
View File
@@ -31,7 +31,7 @@ class PHPMailer
* The PHPMailer Version number. * The PHPMailer Version number.
* @var string * @var string
*/ */
public $Version = '5.2.14'; public $Version = '5.2.22';
/** /**
* Email priority. * Email priority.
@@ -201,6 +201,9 @@ class PHPMailer
/** /**
* An ID to be used in the Message-ID header. * An ID to be used in the Message-ID header.
* If empty, a unique id will be generated. * If empty, a unique id will be generated.
* You can set your own, but it must be in the format "<id@domain>",
* as defined in RFC5322 section 3.6.4 or it will be ignored.
* @see https://tools.ietf.org/html/rfc5322#section-3.6.4
* @var string * @var string
*/ */
public $MessageID = ''; public $MessageID = '';
@@ -285,7 +288,7 @@ class PHPMailer
/** /**
* SMTP auth type. * SMTP auth type.
* Options are LOGIN (default), PLAIN, NTLM, CRAM-MD5 * Options are CRAM-MD5, LOGIN, PLAIN, NTLM, XOAUTH2, attempted in that order if not specified
* @var string * @var string
*/ */
public $AuthType = ''; public $AuthType = '';
@@ -352,6 +355,7 @@ class PHPMailer
/** /**
* Whether to split multiple to addresses into multiple messages * Whether to split multiple to addresses into multiple messages
* or send them all in one message. * or send them all in one message.
* Only supported in `mail` and `sendmail` transports, not in SMTP.
* @var boolean * @var boolean
*/ */
public $SingleTo = false; public $SingleTo = false;
@@ -394,7 +398,7 @@ class PHPMailer
/** /**
* DKIM Identity. * DKIM Identity.
* Usually the email address used as the source of the email * Usually the email address used as the source of the email.
* @var string * @var string
*/ */
public $DKIM_identity = ''; public $DKIM_identity = '';
@@ -419,6 +423,13 @@ class PHPMailer
*/ */
public $DKIM_private = ''; public $DKIM_private = '';
/**
* DKIM private key string.
* If set, takes precedence over `$DKIM_private`.
* @var string
*/
public $DKIM_private_string = '';
/** /**
* Callback Action function name. * Callback Action function name.
* *
@@ -446,6 +457,15 @@ class PHPMailer
*/ */
public $XMailer = ''; public $XMailer = '';
/**
* Which validator to use by default when validating email addresses.
* May be a callable to inject your own validator, but there are several built-in validators.
* @see PHPMailer::validateAddress()
* @var string|callable
* @static
*/
public static $validator = 'auto';
/** /**
* An instance of the SMTP sender class. * An instance of the SMTP sender class.
* @var SMTP * @var SMTP
@@ -634,9 +654,11 @@ class PHPMailer
* Constructor. * Constructor.
* @param boolean $exceptions Should we throw external exceptions? * @param boolean $exceptions Should we throw external exceptions?
*/ */
public function __construct($exceptions = false) public function __construct($exceptions = null)
{ {
$this->exceptions = (boolean)$exceptions; if ($exceptions !== null) {
$this->exceptions = (boolean)$exceptions;
}
} }
/** /**
@@ -645,9 +667,7 @@ class PHPMailer
public function __destruct() public function __destruct()
{ {
//Close any open SMTP connection nicely //Close any open SMTP connection nicely
if ($this->Mailer == 'smtp') { $this->smtpClose();
$this->smtpClose();
}
} }
/** /**
@@ -671,14 +691,16 @@ class PHPMailer
} else { } else {
$subject = $this->encodeHeader($this->secureHeader($subject)); $subject = $this->encodeHeader($this->secureHeader($subject));
} }
if (ini_get('safe_mode') || !($this->UseSendmailOptions)) {
//Can't use additional_parameters in safe_mode, calling mail() with null params breaks
//@link http://php.net/manual/en/function.mail.php
if (ini_get('safe_mode') or !$this->UseSendmailOptions or is_null($params)) {
$result = @mail($to, $subject, $body, $header); $result = @mail($to, $subject, $body, $header);
} else { } else {
$result = @mail($to, $subject, $body, $header, $params); $result = @mail($to, $subject, $body, $header, $params);
} }
return $result; return $result;
} }
/** /**
* Output debugging info via user-defined method. * Output debugging info via user-defined method.
* Only generates output if SMTP debug output is enabled (@see SMTP::$do_debug). * Only generates output if SMTP debug output is enabled (@see SMTP::$do_debug).
@@ -713,7 +735,7 @@ class PHPMailer
case 'echo': case 'echo':
default: default:
//Normalize line breaks //Normalize line breaks
$str = preg_replace('/(\r\n|\r|\n)/ms', "\n", $str); $str = preg_replace('/\r\n?/ms', "\n", $str);
echo gmdate('Y-m-d H:i:s') . "\t" . str_replace( echo gmdate('Y-m-d H:i:s') . "\t" . str_replace(
"\n", "\n",
"\n \t ", "\n \t ",
@@ -850,7 +872,7 @@ class PHPMailer
$name = trim(preg_replace('/[\r\n]+/', '', $name)); //Strip breaks and trim $name = trim(preg_replace('/[\r\n]+/', '', $name)); //Strip breaks and trim
if (($pos = strrpos($address, '@')) === false) { if (($pos = strrpos($address, '@')) === false) {
// At-sign is misssing. // At-sign is misssing.
$error_message = $this->lang('invalid_address') . $address; $error_message = $this->lang('invalid_address') . " (addAnAddress $kind): $address";
$this->setError($error_message); $this->setError($error_message);
$this->edebug($error_message); $this->edebug($error_message);
if ($this->exceptions) { if ($this->exceptions) {
@@ -900,7 +922,7 @@ class PHPMailer
return false; return false;
} }
if (!$this->validateAddress($address)) { if (!$this->validateAddress($address)) {
$error_message = $this->lang('invalid_address') . $address; $error_message = $this->lang('invalid_address') . " (addAnAddress $kind): $address";
$this->setError($error_message); $this->setError($error_message);
$this->edebug($error_message); $this->edebug($error_message);
if ($this->exceptions) { if ($this->exceptions) {
@@ -994,7 +1016,7 @@ class PHPMailer
if (($pos = strrpos($address, '@')) === false or if (($pos = strrpos($address, '@')) === false or
(!$this->has8bitChars(substr($address, ++$pos)) or !$this->idnSupported()) and (!$this->has8bitChars(substr($address, ++$pos)) or !$this->idnSupported()) and
!$this->validateAddress($address)) { !$this->validateAddress($address)) {
$error_message = $this->lang('invalid_address') . $address; $error_message = $this->lang('invalid_address') . " (setFrom) $address";
$this->setError($error_message); $this->setError($error_message);
$this->edebug($error_message); $this->edebug($error_message);
if ($this->exceptions) { if ($this->exceptions) {
@@ -1027,19 +1049,30 @@ class PHPMailer
/** /**
* Check that a string looks like an email address. * Check that a string looks like an email address.
* @param string $address The email address to check * @param string $address The email address to check
* @param string $patternselect A selector for the validation pattern to use : * @param string|callable $patternselect A selector for the validation pattern to use :
* * `auto` Pick best pattern automatically; * * `auto` Pick best pattern automatically;
* * `pcre8` Use the squiloople.com pattern, requires PCRE > 8.0, PHP >= 5.3.2, 5.2.14; * * `pcre8` Use the squiloople.com pattern, requires PCRE > 8.0, PHP >= 5.3.2, 5.2.14;
* * `pcre` Use old PCRE implementation; * * `pcre` Use old PCRE implementation;
* * `php` Use PHP built-in FILTER_VALIDATE_EMAIL; * * `php` Use PHP built-in FILTER_VALIDATE_EMAIL;
* * `html5` Use the pattern given by the HTML5 spec for 'email' type form input elements. * * `html5` Use the pattern given by the HTML5 spec for 'email' type form input elements.
* * `noregex` Don't use a regex: super fast, really dumb. * * `noregex` Don't use a regex: super fast, really dumb.
* Alternatively you may pass in a callable to inject your own validator, for example:
* PHPMailer::validateAddress('user@example.com', function($address) {
* return (strpos($address, '@') !== false);
* });
* You can also set the PHPMailer::$validator static to a callable, allowing built-in methods to use your validator.
* @return boolean * @return boolean
* @static * @static
* @access public * @access public
*/ */
public static function validateAddress($address, $patternselect = 'auto') public static function validateAddress($address, $patternselect = null)
{ {
if (is_null($patternselect)) {
$patternselect = self::$validator;
}
if (is_callable($patternselect)) {
return call_user_func($patternselect, $address);
}
//Reject line breaks in addresses; it's valid RFC5322, but not RFC5321 //Reject line breaks in addresses; it's valid RFC5322, but not RFC5321
if (strpos($address, "\n") !== false or strpos($address, "\r") !== false) { if (strpos($address, "\n") !== false or strpos($address, "\r") !== false) {
return false; return false;
@@ -1216,7 +1249,7 @@ class PHPMailer
} }
$this->$address_kind = $this->punyencodeAddress($this->$address_kind); $this->$address_kind = $this->punyencodeAddress($this->$address_kind);
if (!$this->validateAddress($this->$address_kind)) { if (!$this->validateAddress($this->$address_kind)) {
$error_message = $this->lang('invalid_address') . $this->$address_kind; $error_message = $this->lang('invalid_address') . ' (punyEncode) ' . $this->$address_kind;
$this->setError($error_message); $this->setError($error_message);
$this->edebug($error_message); $this->edebug($error_message);
if ($this->exceptions) { if ($this->exceptions) {
@@ -1227,7 +1260,7 @@ class PHPMailer
} }
// Set whether the message is multipart/alternative // Set whether the message is multipart/alternative
if (!empty($this->AltBody)) { if ($this->alternativeExists()) {
$this->ContentType = 'multipart/alternative'; $this->ContentType = 'multipart/alternative';
} }
@@ -1261,9 +1294,11 @@ class PHPMailer
// Sign with DKIM if enabled // Sign with DKIM if enabled
if (!empty($this->DKIM_domain) if (!empty($this->DKIM_domain)
&& !empty($this->DKIM_private)
&& !empty($this->DKIM_selector) && !empty($this->DKIM_selector)
&& file_exists($this->DKIM_private)) { && (!empty($this->DKIM_private_string)
|| (!empty($this->DKIM_private) && file_exists($this->DKIM_private))
)
) {
$header_dkim = $this->DKIM_Add( $header_dkim = $this->DKIM_Add(
$this->MIMEHeader . $this->mailHeader, $this->MIMEHeader . $this->mailHeader,
$this->encodeHeader($this->secureHeader($this->Subject)), $this->encodeHeader($this->secureHeader($this->Subject)),
@@ -1329,19 +1364,24 @@ class PHPMailer
*/ */
protected function sendmailSend($header, $body) protected function sendmailSend($header, $body)
{ {
if ($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') { if ($this->Mailer == 'qmail') {
$sendmail = sprintf('%s -f%s', escapeshellcmd($this->Sendmail), escapeshellarg($this->Sender)); $sendmailFmt = '%s -f%s';
} else { } else {
$sendmail = sprintf('%s -oi -f%s -t', escapeshellcmd($this->Sendmail), escapeshellarg($this->Sender)); $sendmailFmt = '%s -oi -f%s -t';
} }
} else { } else {
if ($this->Mailer == 'qmail') { if ($this->Mailer == 'qmail') {
$sendmail = sprintf('%s', escapeshellcmd($this->Sendmail)); $sendmailFmt = '%s';
} else { } 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) { if ($this->SingleTo) {
foreach ($this->SingleToArray as $toAddr) { foreach ($this->SingleToArray as $toAddr) {
if (!@$mail = popen($sendmail, 'w')) { if (!@$mail = popen($sendmail, 'w')) {
@@ -1387,6 +1427,40 @@ class PHPMailer
return true; 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. * Send mail using the PHP mail() function.
* @param string $header The message headers * @param string $header The message headers
@@ -1404,17 +1478,20 @@ class PHPMailer
} }
$to = implode(', ', $toArr); $to = implode(', ', $toArr);
if (empty($this->Sender)) { $params = null;
$params = ' '; //This sets the SMTP envelope sender which gets turned into a return-path header by the receiver
} else { if (!empty($this->Sender) and $this->validateAddress($this->Sender)) {
$params = sprintf('-f%s', $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 ($this->Sender != '' and !ini_get('safe_mode')) { if (!empty($this->Sender) and !ini_get('safe_mode') and $this->validateAddress($this->Sender)) {
$old_from = ini_get('sendmail_from'); $old_from = ini_get('sendmail_from');
ini_set('sendmail_from', $this->Sender); ini_set('sendmail_from', $this->Sender);
} }
$result = false; $result = false;
if ($this->SingleTo && count($toArr) > 1) { if ($this->SingleTo and count($toArr) > 1) {
foreach ($toArr as $toAddr) { foreach ($toArr as $toAddr) {
$result = $this->mailPassthru($toAddr, $this->Subject, $body, $header, $params); $result = $this->mailPassthru($toAddr, $this->Subject, $body, $header, $params);
$this->doCallback($result, array($toAddr), $this->cc, $this->bcc, $this->Subject, $body, $this->From); $this->doCallback($result, array($toAddr), $this->cc, $this->bcc, $this->Subject, $body, $this->From);
@@ -1463,10 +1540,10 @@ class PHPMailer
if (!$this->smtpConnect($this->SMTPOptions)) { if (!$this->smtpConnect($this->SMTPOptions)) {
throw new phpmailerException($this->lang('smtp_connect_failed'), self::STOP_CRITICAL); throw new phpmailerException($this->lang('smtp_connect_failed'), self::STOP_CRITICAL);
} }
if ('' == $this->Sender) { if (!empty($this->Sender) and $this->validateAddress($this->Sender)) {
$smtp_from = $this->From;
} else {
$smtp_from = $this->Sender; $smtp_from = $this->Sender;
} else {
$smtp_from = $this->From;
} }
if (!$this->smtp->mail($smtp_from)) { if (!$this->smtp->mail($smtp_from)) {
$this->setError($this->lang('from_failed') . $smtp_from . ' : ' . implode(',', $this->smtp->getError())); $this->setError($this->lang('from_failed') . $smtp_from . ' : ' . implode(',', $this->smtp->getError()));
@@ -1520,12 +1597,17 @@ class PHPMailer
* @throws phpmailerException * @throws phpmailerException
* @return boolean * @return boolean
*/ */
public function smtpConnect($options = array()) public function smtpConnect($options = null)
{ {
if (is_null($this->smtp)) { if (is_null($this->smtp)) {
$this->smtp = $this->getSMTPInstance(); $this->smtp = $this->getSMTPInstance();
} }
//If no options are provided, use whatever is set in the instance
if (is_null($options)) {
$options = $this->SMTPOptions;
}
// Already connected? // Already connected?
if ($this->smtp->connected()) { if ($this->smtp->connected()) {
return true; return true;
@@ -1595,7 +1677,7 @@ class PHPMailer
if (!$this->smtp->startTLS()) { if (!$this->smtp->startTLS()) {
throw new phpmailerException($this->lang('connect_host')); throw new phpmailerException($this->lang('connect_host'));
} }
// We must resend HELO after tls negotiation // We must resend EHLO after TLS negotiation
$this->smtp->hello($hello); $this->smtp->hello($hello);
} }
if ($this->SMTPAuth) { if ($this->SMTPAuth) {
@@ -1634,7 +1716,7 @@ class PHPMailer
*/ */
public function smtpClose() public function smtpClose()
{ {
if ($this->smtp !== null) { if (is_a($this->smtp, 'SMTP')) {
if ($this->smtp->connected()) { if ($this->smtp->connected()) {
$this->smtp->quit(); $this->smtp->quit();
$this->smtp->close(); $this->smtp->close();
@@ -1653,6 +1735,19 @@ class PHPMailer
*/ */
public function setLanguage($langcode = 'en', $lang_path = '') public function setLanguage($langcode = 'en', $lang_path = '')
{ {
// Backwards compatibility for renamed language codes
$renamed_langcodes = array(
'br' => 'pt_br',
'cz' => 'cs',
'dk' => 'da',
'no' => 'nb',
'se' => 'sv',
);
if (isset($renamed_langcodes[$langcode])) {
$langcode = $renamed_langcodes[$langcode];
}
// Define full set of translatable strings in English // Define full set of translatable strings in English
$PHPMAILER_LANG = array( $PHPMAILER_LANG = array(
'authenticate' => 'SMTP Error: Could not authenticate.', 'authenticate' => 'SMTP Error: Could not authenticate.',
@@ -1679,6 +1774,10 @@ class PHPMailer
// Calculate an absolute path so it can work if CWD is not here // Calculate an absolute path so it can work if CWD is not here
$lang_path = dirname(__FILE__). DIRECTORY_SEPARATOR . 'language'. DIRECTORY_SEPARATOR; $lang_path = dirname(__FILE__). DIRECTORY_SEPARATOR . 'language'. DIRECTORY_SEPARATOR;
} }
//Validate $langcode
if (!preg_match('/^[a-z]{2}(?:_[a-zA-Z]{2})?$/', $langcode)) {
$langcode = 'en';
}
$foundlang = true; $foundlang = true;
$lang_file = $lang_path . 'phpmailer.lang-' . $langcode . '.php'; $lang_file = $lang_path . 'phpmailer.lang-' . $langcode . '.php';
// There is no English translation file // There is no English translation file
@@ -1972,7 +2071,9 @@ class PHPMailer
$result .= $this->headerLine('Subject', $this->encodeHeader($this->secureHeader($this->Subject))); $result .= $this->headerLine('Subject', $this->encodeHeader($this->secureHeader($this->Subject)));
} }
if ($this->MessageID != '') { // Only allow a custom message ID if it conforms to RFC 5322 section 3.6.4
// https://tools.ietf.org/html/rfc5322#section-3.6.4
if ('' != $this->MessageID and preg_match('/^<.*@.*>$/', $this->MessageID)) {
$this->lastMessageID = $this->MessageID; $this->lastMessageID = $this->MessageID;
} else { } else {
$this->lastMessageID = sprintf('<%s@%s>', $this->uniqueid, $this->serverHostname()); $this->lastMessageID = sprintf('<%s@%s>', $this->uniqueid, $this->serverHostname());
@@ -2074,7 +2175,15 @@ class PHPMailer
*/ */
public function getSentMIMEMessage() public function getSentMIMEMessage()
{ {
return $this->MIMEHeader . $this->mailHeader . self::CRLF . $this->MIMEBody; return rtrim($this->MIMEHeader . $this->mailHeader, "\n\r") . self::CRLF . self::CRLF . $this->MIMEBody;
}
/**
* Create unique ID
* @return string
*/
protected function generateId() {
return md5(uniqid(time()));
} }
/** /**
@@ -2088,7 +2197,7 @@ class PHPMailer
{ {
$body = ''; $body = '';
//Create unique IDs and preset boundaries //Create unique IDs and preset boundaries
$this->uniqueid = md5(uniqid(time())); $this->uniqueid = $this->generateId();
$this->boundary[1] = 'b1_' . $this->uniqueid; $this->boundary[1] = 'b1_' . $this->uniqueid;
$this->boundary[2] = 'b2_' . $this->uniqueid; $this->boundary[2] = 'b2_' . $this->uniqueid;
$this->boundary[3] = 'b3_' . $this->uniqueid; $this->boundary[3] = 'b3_' . $this->uniqueid;
@@ -2104,12 +2213,12 @@ class PHPMailer
//Can we do a 7-bit downgrade? //Can we do a 7-bit downgrade?
if ($bodyEncoding == '8bit' and !$this->has8bitChars($this->Body)) { if ($bodyEncoding == '8bit' and !$this->has8bitChars($this->Body)) {
$bodyEncoding = '7bit'; $bodyEncoding = '7bit';
//All ISO 8859, Windows codepage and UTF-8 charsets are ascii compatible up to 7-bit
$bodyCharSet = 'us-ascii'; $bodyCharSet = 'us-ascii';
} }
//If lines are too long, and we're not already using an encoding that will shorten them, //If lines are too long, and we're not already using an encoding that will shorten them,
//change to quoted-printable transfer encoding //change to quoted-printable transfer encoding for the body part only
if ('base64' != $this->Encoding and self::hasLineLongerThanMax($this->Body)) { if ('base64' != $this->Encoding and self::hasLineLongerThanMax($this->Body)) {
$this->Encoding = 'quoted-printable';
$bodyEncoding = 'quoted-printable'; $bodyEncoding = 'quoted-printable';
} }
@@ -2118,10 +2227,12 @@ class PHPMailer
//Can we do a 7-bit downgrade? //Can we do a 7-bit downgrade?
if ($altBodyEncoding == '8bit' and !$this->has8bitChars($this->AltBody)) { if ($altBodyEncoding == '8bit' and !$this->has8bitChars($this->AltBody)) {
$altBodyEncoding = '7bit'; $altBodyEncoding = '7bit';
//All ISO 8859, Windows codepage and UTF-8 charsets are ascii compatible up to 7-bit
$altBodyCharSet = 'us-ascii'; $altBodyCharSet = 'us-ascii';
} }
//If lines are too long, change to quoted-printable transfer encoding //If lines are too long, and we're not already using an encoding that will shorten them,
if (self::hasLineLongerThanMax($this->AltBody)) { //change to quoted-printable transfer encoding for the alt body part only
if ('base64' != $altBodyEncoding and self::hasLineLongerThanMax($this->AltBody)) {
$altBodyEncoding = 'quoted-printable'; $altBodyEncoding = 'quoted-printable';
} }
//Use this as a preamble in all multipart message types //Use this as a preamble in all multipart message types
@@ -2224,8 +2335,10 @@ class PHPMailer
$body .= $this->attachAll('attachment', $this->boundary[1]); $body .= $this->attachAll('attachment', $this->boundary[1]);
break; break;
default: default:
// catch case 'plain' and case '' // Catch case 'plain' and case '', applies to simple `text/plain` and `text/html` body content types
$body .= $this->encodeString($this->Body, $bodyEncoding); //Reset the `Encoding` property in case we changed it for line length reasons
$this->Encoding = $bodyEncoding;
$body .= $this->encodeString($this->Body, $this->Encoding);
break; break;
} }
@@ -2331,8 +2444,7 @@ class PHPMailer
/** /**
* Set the message type. * Set the message type.
* PHPMailer only supports some preset message types, * PHPMailer only supports some preset message types, not arbitrary MIME structures.
* not arbitrary MIME structures.
* @access protected * @access protected
* @return void * @return void
*/ */
@@ -2350,6 +2462,7 @@ class PHPMailer
} }
$this->message_type = implode('_', $type); $this->message_type = implode('_', $type);
if ($this->message_type == '') { if ($this->message_type == '') {
//The 'plain' message_type refers to the message having a single body element, not that it is plain-text
$this->message_type = 'plain'; $this->message_type = 'plain';
} }
} }
@@ -2379,6 +2492,7 @@ class PHPMailer
/** /**
* Add an attachment from a path on the filesystem. * 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. * Returns false if the file could not be found or read.
* @param string $path Path to the attachment. * @param string $path Path to the attachment.
* @param string $name Overrides the attachment name. * @param string $name Overrides the attachment name.
@@ -2904,6 +3018,7 @@ class PHPMailer
* displayed inline with the message, not just attached for download. * displayed inline with the message, not just attached for download.
* This is used in HTML messages that embed the images * This is used in HTML messages that embed the images
* the HTML refers to using the $cid value. * 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 $path Path to the attachment.
* @param string $cid Content ID of the attachment; Use this to reference * @param string $cid Content ID of the attachment; Use this to reference
* the content when using an embedded image in HTML. * the content when using an embedded image in HTML.
@@ -3264,21 +3379,29 @@ class PHPMailer
} }
/** /**
* Create a message from an HTML string. * Create a message body from an HTML string.
* Automatically makes modifications for inline images and backgrounds * Automatically inlines images and creates a plain-text version by converting the HTML,
* and creates a plain-text version by converting the HTML. * overwriting any existing values in Body and AltBody.
* Overwrites any existing values in $this->Body and $this->AltBody * 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 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 * @access public
* @param string $message HTML message string * @param string $message HTML message string
* @param string $basedir baseline directory for path * @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 * @param boolean|callable $advanced Whether to use the internal HTML to text converter
* or your own custom converter @see PHPMailer::html2text() * or your own custom converter @see PHPMailer::html2text()
* @return string $message * @return string $message The transformed message Body
*/ */
public function msgHTML($message, $basedir = '', $advanced = false) public function msgHTML($message, $basedir = '', $advanced = false)
{ {
preg_match_all('/(src|background)=["\'](.*)["\']/Ui', $message, $images); preg_match_all('/(src|background)=["\'](.*)["\']/Ui', $message, $images);
if (array_key_exists(2, $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) { foreach ($images[2] as $imgindex => $url) {
// Convert data URIs into embedded images // Convert data URIs into embedded images
if (preg_match('#^data:(image[^;,]*)(;base64)?,#', $url, $match)) { if (preg_match('#^data:(image[^;,]*)(;base64)?,#', $url, $match)) {
@@ -3296,18 +3419,24 @@ class PHPMailer
$message $message
); );
} }
} elseif (substr($url, 0, 4) !== 'cid:' && !preg_match('#^[A-z]+://#', $url)) { continue;
// Do not change urls for absolute images (thanks to corvuscorax) }
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 // 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); $filename = basename($url);
$directory = dirname($url); $directory = dirname($url);
if ($directory == '.') { if ($directory == '.') {
$directory = ''; $directory = '';
} }
$cid = md5($url) . '@phpmailer.0'; // RFC2392 S 2 $cid = md5($url) . '@phpmailer.0'; // RFC2392 S 2
if (strlen($basedir) > 1 && substr($basedir, -1) != '/') {
$basedir .= '/';
}
if (strlen($directory) > 1 && substr($directory, -1) != '/') { if (strlen($directory) > 1 && substr($directory, -1) != '/') {
$directory .= '/'; $directory .= '/';
} }
@@ -3332,7 +3461,7 @@ class PHPMailer
// Convert all message body line breaks to CRLF, makes quoted-printable encoding work much better // Convert all message body line breaks to CRLF, makes quoted-printable encoding work much better
$this->Body = $this->normalizeBreaks($message); $this->Body = $this->normalizeBreaks($message);
$this->AltBody = $this->normalizeBreaks($this->html2text($message, $advanced)); $this->AltBody = $this->normalizeBreaks($this->html2text($message, $advanced));
if (empty($this->AltBody)) { if (!$this->alternativeExists()) {
$this->AltBody = 'To view this email message, open it in a program that understands HTML!' . $this->AltBody = 'To view this email message, open it in a program that understands HTML!' .
self::CRLF . self::CRLF; self::CRLF . self::CRLF;
} }
@@ -3343,7 +3472,7 @@ class PHPMailer
* Convert an HTML string into plain text. * Convert an HTML string into plain text.
* This is used by msgHTML(). * This is used by msgHTML().
* Note - older versions of this function used a bundled advanced converter * Note - older versions of this function used a bundled advanced converter
* which was been removed for license reasons in #232 * which was been removed for license reasons in #232.
* Example usage: * Example usage:
* <code> * <code>
* // Use default conversion * // Use default conversion
@@ -3643,7 +3772,7 @@ class PHPMailer
* @access public * @access public
* @param string $signHeader * @param string $signHeader
* @throws phpmailerException * @throws phpmailerException
* @return string * @return string The DKIM signature value
*/ */
public function DKIM_Sign($signHeader) public function DKIM_Sign($signHeader)
{ {
@@ -3653,15 +3782,35 @@ class PHPMailer
} }
return ''; return '';
} }
$privKeyStr = file_get_contents($this->DKIM_private); $privKeyStr = !empty($this->DKIM_private_string) ? $this->DKIM_private_string : file_get_contents($this->DKIM_private);
if ($this->DKIM_passphrase != '') { if ('' != $this->DKIM_passphrase) {
$privKey = openssl_pkey_get_private($privKeyStr, $this->DKIM_passphrase); $privKey = openssl_pkey_get_private($privKeyStr, $this->DKIM_passphrase);
} else { } else {
$privKey = $privKeyStr; $privKey = openssl_pkey_get_private($privKeyStr);
} }
if (openssl_sign($signHeader, $signature, $privKey)) { //Workaround for missing digest algorithms in old PHP & OpenSSL versions
return base64_encode($signature); //@link http://stackoverflow.com/a/11117338/333340
if (version_compare(PHP_VERSION, '5.3.0') >= 0 and
in_array('sha256WithRSAEncryption', openssl_get_md_methods(true))) {
if (openssl_sign($signHeader, $signature, $privKey, 'sha256WithRSAEncryption')) {
openssl_pkey_free($privKey);
return base64_encode($signature);
}
} else {
$pinfo = openssl_pkey_get_details($privKey);
$hash = hash('sha256', $signHeader);
//'Magic' constant for SHA256 from RFC3447
//@link https://tools.ietf.org/html/rfc3447#page-43
$t = '3031300d060960864801650304020105000420' . $hash;
$pslen = $pinfo['bits'] / 8 - (strlen($t) / 2 + 3);
$eb = pack('H*', '0001' . str_repeat('FF', $pslen) . '00' . $t);
if (openssl_private_encrypt($eb, $signature, $privKey, OPENSSL_NO_PADDING)) {
openssl_pkey_free($privKey);
return base64_encode($signature);
}
} }
openssl_pkey_free($privKey);
return ''; return '';
} }
@@ -3678,7 +3827,7 @@ class PHPMailer
foreach ($lines as $key => $line) { foreach ($lines as $key => $line) {
list($heading, $value) = explode(':', $line, 2); list($heading, $value) = explode(':', $line, 2);
$heading = strtolower($heading); $heading = strtolower($heading);
$value = preg_replace('/\s+/', ' ', $value); // Compress useless spaces $value = preg_replace('/\s{2,}/', ' ', $value); // Compress useless spaces
$lines[$key] = $heading . ':' . trim($value); // Don't forget to remove WSP around the value $lines[$key] = $heading . ':' . trim($value); // Don't forget to remove WSP around the value
} }
$signHeader = implode("\r\n", $lines); $signHeader = implode("\r\n", $lines);
@@ -3716,7 +3865,7 @@ class PHPMailer
*/ */
public function DKIM_Add($headers_line, $subject, $body) public function DKIM_Add($headers_line, $subject, $body)
{ {
$DKIMsignatureType = 'rsa-sha1'; // Signature & hash algorithms $DKIMsignatureType = 'rsa-sha256'; // Signature & hash algorithms
$DKIMcanonicalization = 'relaxed/simple'; // Canonicalization of header/body $DKIMcanonicalization = 'relaxed/simple'; // Canonicalization of header/body
$DKIMquery = 'dns/txt'; // Query method $DKIMquery = 'dns/txt'; // Query method
$DKIMtime = time(); // Signature Timestamp = seconds since 00:00:00 - Jan 1, 1970 (UTC time zone) $DKIMtime = time(); // Signature Timestamp = seconds since 00:00:00 - Jan 1, 1970 (UTC time zone)
@@ -3724,6 +3873,7 @@ class PHPMailer
$headers = explode($this->LE, $headers_line); $headers = explode($this->LE, $headers_line);
$from_header = ''; $from_header = '';
$to_header = ''; $to_header = '';
$date_header = '';
$current = ''; $current = '';
foreach ($headers as $header) { foreach ($headers as $header) {
if (strpos($header, 'From:') === 0) { if (strpos($header, 'From:') === 0) {
@@ -3732,6 +3882,9 @@ class PHPMailer
} elseif (strpos($header, 'To:') === 0) { } elseif (strpos($header, 'To:') === 0) {
$to_header = $header; $to_header = $header;
$current = 'to_header'; $current = 'to_header';
} elseif (strpos($header, 'Date:') === 0) {
$date_header = $header;
$current = 'date_header';
} else { } else {
if (!empty($$current) && strpos($header, ' =?') === 0) { if (!empty($$current) && strpos($header, ' =?') === 0) {
$$current .= $header; $$current .= $header;
@@ -3742,6 +3895,7 @@ class PHPMailer
} }
$from = str_replace('|', '=7C', $this->DKIM_QP($from_header)); $from = str_replace('|', '=7C', $this->DKIM_QP($from_header));
$to = str_replace('|', '=7C', $this->DKIM_QP($to_header)); $to = str_replace('|', '=7C', $this->DKIM_QP($to_header));
$date = str_replace('|', '=7C', $this->DKIM_QP($date_header));
$subject = str_replace( $subject = str_replace(
'|', '|',
'=7C', '=7C',
@@ -3749,7 +3903,7 @@ class PHPMailer
); // Copied header fields (dkim-quoted-printable) ); // Copied header fields (dkim-quoted-printable)
$body = $this->DKIM_BodyC($body); $body = $this->DKIM_BodyC($body);
$DKIMlen = strlen($body); // Length of body $DKIMlen = strlen($body); // Length of body
$DKIMb64 = base64_encode(pack('H*', sha1($body))); // Base64 of packed binary SHA-1 hash of body $DKIMb64 = base64_encode(pack('H*', hash('sha256', $body))); // Base64 of packed binary SHA-256 hash of body
if ('' == $this->DKIM_identity) { if ('' == $this->DKIM_identity) {
$ident = ''; $ident = '';
} else { } else {
@@ -3762,16 +3916,18 @@ class PHPMailer
$this->DKIM_selector . $this->DKIM_selector .
";\r\n" . ";\r\n" .
"\tt=" . $DKIMtime . '; c=' . $DKIMcanonicalization . ";\r\n" . "\tt=" . $DKIMtime . '; c=' . $DKIMcanonicalization . ";\r\n" .
"\th=From:To:Subject;\r\n" . "\th=From:To:Date:Subject;\r\n" .
"\td=" . $this->DKIM_domain . ';' . $ident . "\r\n" . "\td=" . $this->DKIM_domain . ';' . $ident . "\r\n" .
"\tz=$from\r\n" . "\tz=$from\r\n" .
"\t|$to\r\n" . "\t|$to\r\n" .
"\t|$date\r\n" .
"\t|$subject;\r\n" . "\t|$subject;\r\n" .
"\tbh=" . $DKIMb64 . ";\r\n" . "\tbh=" . $DKIMb64 . ";\r\n" .
"\tb="; "\tb=";
$toSign = $this->DKIM_HeaderC( $toSign = $this->DKIM_HeaderC(
$from_header . "\r\n" . $from_header . "\r\n" .
$to_header . "\r\n" . $to_header . "\r\n" .
$date_header . "\r\n" .
$subject_header . "\r\n" . $subject_header . "\r\n" .
$dkimhdrs $dkimhdrs
); );
@@ -80,6 +80,7 @@ class PHPMailerOAuth extends PHPMailer
* @uses SMTP * @uses SMTP
* @access public * @access public
* @return bool * @return bool
* @throws phpmailerException
*/ */
public function smtpConnect($options = array()) public function smtpConnect($options = array())
{ {
@@ -49,7 +49,8 @@ class PHPMailerOAuthGoogle
$this->oauthUserEmail = $UserEmail; $this->oauthUserEmail = $UserEmail;
} }
private function getProvider() { private function getProvider()
{
return new League\OAuth2\Client\Provider\Google([ return new League\OAuth2\Client\Provider\Google([
'clientId' => $this->oauthClientId, 'clientId' => $this->oauthClientId,
'clientSecret' => $this->oauthClientSecret 'clientSecret' => $this->oauthClientSecret
+1 -1
View File
@@ -34,7 +34,7 @@ class POP3
* @var string * @var string
* @access public * @access public
*/ */
public $Version = '5.2.14'; public $Version = '5.2.22';
/** /**
* Default POP3 port number. * Default POP3 port number.
+79 -11
View File
@@ -30,7 +30,7 @@ class SMTP
* The PHPMailer SMTP version number. * The PHPMailer SMTP version number.
* @var string * @var string
*/ */
const VERSION = '5.2.14'; const VERSION = '5.2.22';
/** /**
* SMTP line break constant. * SMTP line break constant.
@@ -81,7 +81,7 @@ class SMTP
* @deprecated Use the `VERSION` constant instead * @deprecated Use the `VERSION` constant instead
* @see SMTP::VERSION * @see SMTP::VERSION
*/ */
public $Version = '5.2.14'; public $Version = '5.2.22';
/** /**
* SMTP server port number. * SMTP server port number.
@@ -150,6 +150,17 @@ class SMTP
*/ */
public $Timelimit = 300; public $Timelimit = 300;
/**
* @var array patterns to extract smtp transaction id from smtp reply
* Only first capture group will be use, use non-capturing group to deal with it
* Extend this class to override this property to fulfil your needs.
*/
protected $smtp_transaction_id_patterns = array(
'exim' => '/[0-9]{3} OK id=(.*)/',
'sendmail' => '/[0-9]{3} 2.0.0 (.*) Message/',
'postfix' => '/[0-9]{3} 2.0.0 Ok: queued as (.*)/'
);
/** /**
* The socket for the server connection. * The socket for the server connection.
* @var resource * @var resource
@@ -206,7 +217,7 @@ class SMTP
} }
//Avoid clash with built-in function names //Avoid clash with built-in function names
if (!in_array($this->Debugoutput, array('error_log', 'html', 'echo')) and is_callable($this->Debugoutput)) { if (!in_array($this->Debugoutput, array('error_log', 'html', 'echo')) and is_callable($this->Debugoutput)) {
call_user_func($this->Debugoutput, $str, $this->do_debug); call_user_func($this->Debugoutput, $str, $level);
return; return;
} }
switch ($this->Debugoutput) { switch ($this->Debugoutput) {
@@ -272,8 +283,8 @@ class SMTP
$errstr = ''; $errstr = '';
if ($streamok) { if ($streamok) {
$socket_context = stream_context_create($options); $socket_context = stream_context_create($options);
//Suppress errors; connection failures are handled at a higher level set_error_handler(array($this, 'errorHandler'));
$this->smtp_conn = @stream_socket_client( $this->smtp_conn = stream_socket_client(
$host . ":" . $port, $host . ":" . $port,
$errno, $errno,
$errstr, $errstr,
@@ -281,12 +292,14 @@ class SMTP
STREAM_CLIENT_CONNECT, STREAM_CLIENT_CONNECT,
$socket_context $socket_context
); );
restore_error_handler();
} else { } else {
//Fall back to fsockopen which should work in more places, but is missing some features //Fall back to fsockopen which should work in more places, but is missing some features
$this->edebug( $this->edebug(
"Connection: stream_socket_client not available, falling back to fsockopen", "Connection: stream_socket_client not available, falling back to fsockopen",
self::DEBUG_CONNECTION self::DEBUG_CONNECTION
); );
set_error_handler(array($this, 'errorHandler'));
$this->smtp_conn = fsockopen( $this->smtp_conn = fsockopen(
$host, $host,
$port, $port,
@@ -294,6 +307,7 @@ class SMTP
$errstr, $errstr,
$timeout $timeout
); );
restore_error_handler();
} }
// Verify we connected properly // Verify we connected properly
if (!is_resource($this->smtp_conn)) { if (!is_resource($this->smtp_conn)) {
@@ -336,11 +350,22 @@ class SMTP
if (!$this->sendCommand('STARTTLS', 'STARTTLS', 220)) { if (!$this->sendCommand('STARTTLS', 'STARTTLS', 220)) {
return false; return false;
} }
//Allow the best TLS version(s) we can
$crypto_method = STREAM_CRYPTO_METHOD_TLS_CLIENT;
//PHP 5.6.7 dropped inclusion of TLS 1.1 and 1.2 in STREAM_CRYPTO_METHOD_TLS_CLIENT
//so add them back in manually if we can
if (defined('STREAM_CRYPTO_METHOD_TLSv1_2_CLIENT')) {
$crypto_method |= STREAM_CRYPTO_METHOD_TLSv1_2_CLIENT;
$crypto_method |= STREAM_CRYPTO_METHOD_TLSv1_1_CLIENT;
}
// Begin encrypted connection // Begin encrypted connection
if (!stream_socket_enable_crypto( if (!stream_socket_enable_crypto(
$this->smtp_conn, $this->smtp_conn,
true, true,
STREAM_CRYPTO_METHOD_TLS_CLIENT $crypto_method
)) { )) {
return false; return false;
} }
@@ -389,7 +414,7 @@ class SMTP
); );
if (empty($authtype)) { if (empty($authtype)) {
foreach (array('LOGIN', 'CRAM-MD5', 'NTLM', 'PLAIN', 'XOAUTH2') as $method) { foreach (array('CRAM-MD5', 'LOGIN', 'PLAIN', 'NTLM', 'XOAUTH2') as $method) {
if (in_array($method, $this->server_caps['AUTH'])) { if (in_array($method, $this->server_caps['AUTH'])) {
$authtype = $method; $authtype = $method;
break; break;
@@ -463,7 +488,7 @@ class SMTP
$temp = new stdClass; $temp = new stdClass;
$ntlm_client = new ntlm_sasl_client_class; $ntlm_client = new ntlm_sasl_client_class;
//Check that functions are available //Check that functions are available
if (!$ntlm_client->Initialize($temp)) { if (!$ntlm_client->initialize($temp)) {
$this->setError($temp->error); $this->setError($temp->error);
$this->edebug( $this->edebug(
'You need to enable some modules in your php.ini file: ' 'You need to enable some modules in your php.ini file: '
@@ -473,7 +498,7 @@ class SMTP
return false; return false;
} }
//msg1 //msg1
$msg1 = $ntlm_client->TypeMsg1($realm, $workstation); //msg1 $msg1 = $ntlm_client->typeMsg1($realm, $workstation); //msg1
if (!$this->sendCommand( if (!$this->sendCommand(
'AUTH NTLM', 'AUTH NTLM',
@@ -492,7 +517,7 @@ class SMTP
$password $password
); );
//msg3 //msg3
$msg3 = $ntlm_client->TypeMsg3( $msg3 = $ntlm_client->typeMsg3(
$ntlm_res, $ntlm_res,
$username, $username,
$realm, $realm,
@@ -736,7 +761,7 @@ class SMTP
protected function parseHelloFields($type) protected function parseHelloFields($type)
{ {
$this->server_caps = array(); $this->server_caps = array();
$lines = explode("\n", $this->last_reply); $lines = explode("\n", $this->helo_rply);
foreach ($lines as $n => $s) { foreach ($lines as $n => $s) {
//First 4 chars contain response code followed by - or space //First 4 chars contain response code followed by - or space
@@ -1178,4 +1203,47 @@ class SMTP
{ {
return $this->Timeout; return $this->Timeout;
} }
/**
* Reports an error number and string.
* @param integer $errno The error number returned by PHP.
* @param string $errmsg The error message returned by PHP.
*/
protected function errorHandler($errno, $errmsg)
{
$notice = 'Connection: Failed to connect to server.';
$this->setError(
$notice,
$errno,
$errmsg
);
$this->edebug(
$notice . ' Error number ' . $errno . '. "Error notice: ' . $errmsg,
self::DEBUG_CONNECTION
);
}
/**
* Will return the ID of the last smtp transaction based on a list of patterns provided
* in SMTP::$smtp_transaction_id_patterns.
* If no reply has been received yet, it will return null.
* If no pattern has been matched, it will return false.
* @return bool|null|string
*/
public function getLastTransactionID()
{
$reply = $this->getLastReply();
if (empty($reply)) {
return null;
}
foreach($this->smtp_transaction_id_patterns as $smtp_transaction_id_pattern) {
if(preg_match($smtp_transaction_id_pattern, $reply, $matches)) {
return $matches[1];
}
}
return false;
}
} }
+44
View File
@@ -0,0 +1,44 @@
{
"name": "phpmailer/phpmailer",
"type": "library",
"description": "PHPMailer is a full-featured email creation and transfer class for PHP",
"authors": [
{
"name": "Marcus Bointon",
"email": "phpmailer@synchromedia.co.uk"
},
{
"name": "Jim Jagielski",
"email": "jimjag@gmail.com"
},
{
"name": "Andy Prevost",
"email": "codeworxtech@users.sourceforge.net"
},
{
"name": "Brent R. Matzelle"
}
],
"require": {
"php": ">=5.0.0"
},
"require-dev": {
"phpdocumentor/phpdocumentor": "*",
"phpunit/phpunit": "4.7.*"
},
"suggest": {
"league/oauth2-google": "Needed for Google XOAUTH2 authentication"
},
"autoload": {
"classmap": [
"class.phpmailer.php",
"class.phpmaileroauth.php",
"class.phpmaileroauthgoogle.php",
"class.smtp.php",
"class.pop3.php",
"extras/EasyPeasyICS.php",
"extras/ntlm_sasl_client.php"
]
},
"license": "LGPL-2.1"
}
+3576
View File
File diff suppressed because it is too large. Load diff
+38
View File
@@ -0,0 +1,38 @@
<?php
/**
* This example shows how to use DKIM message authentication with PHPMailer.
* There's more to using DKIM than just this code - check out this article:
* @link https://yomotherboard.com/how-to-setup-email-server-dkim-keys/
* See also the DKIM code in the PHPMailer unit tests,
* which shows how to make a key pair from PHP.
*/
require '../PHPMailerAutoload.php';
//Create a new PHPMailer instance
$mail = new PHPMailer;
//Set who the message is to be sent from
$mail->setFrom('from@example.com', 'First Last');
//Set an alternative reply-to address
$mail->addReplyTo('replyto@example.com', 'First Last');
//Set who the message is to be sent to
$mail->addAddress('whoto@example.com', 'John Doe');
//Set the subject line
$mail->Subject = 'PHPMailer DKIM test';
//This should be the same as the domain of your From address
$mail->DKIM_domain = 'example.com';
//Path to your private key file
$mail->DKIM_private = 'dkim_private.pem';
//Set this to your own selector
$mail->DKIM_selector = 'phpmailer';
//If your private key has a passphrase, set it here
$mail->DKIM_passphrase = '';
//The identity you're signing as - usually your From address
$mail->DKIM_identity = $mail->From;
//send the message, check for errors
if (!$mail->send()) {
echo "Mailer Error: " . $mail->ErrorInfo;
} else {
echo "Message sent!";
}
@@ -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>Russian text: Пустое тело сообщения</p>
<p>Armenian text: Հաղորդագրությունը դատարկ է</p> <p>Armenian text: Հաղորդագրությունը դատարկ է</p>
<p>Czech text: Prázdné tělo zprávy</p> <p>Czech text: Prázdné tělo zprávy</p>
<p>Emoji: <span style="font-size: 48px">😂 🦄 💥 📤 📧</span></p>
</div> </div>
</body> </body>
</html> </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 // Adds named capture support (with backreferences returned as `result.name`), and fixes two
+5 -6
View File
@@ -23,24 +23,23 @@ dp.SyntaxHighlighter = {
return match.value; return match.value;
return null; return null;
}; }
function defaultValue(value, def) function defaultValue(value, def)
{ {
return value != null ? value : def; return value != null ? value : def;
}; }
function asString(value) function asString(value)
{ {
return value != null ? value.toString() : null; return value != null ? value.toString() : null;
}; }
var parts = input.split(':'), var parts = input.split(':'),
brushName = parts[0], brushName = parts[0],
options = {}, options = {},
straight = { 'true' : true } straight = { 'true' : true },
reverse = { 'true' : false }, reverse = { 'true' : false },
result = null,
defaults = SyntaxHighlighter.defaults defaults = SyntaxHighlighter.defaults
; ;
@@ -89,7 +88,7 @@ dp.SyntaxHighlighter = {
} }
return null; return null;
}; }
function findTagsByName(list, name, tagName) function findTagsByName(list, name, tagName)
{ {
@@ -12,28 +12,28 @@ if (array_key_exists('userfile', $_FILES)) {
// Upload handled successfully // Upload handled successfully
// Now create a message // Now create a message
// This should be somewhere in your include_path // This should be somewhere in your include_path
require 'PHPMailerAutoload.php'; require '../PHPMailerAutoload.php';
$mail = new PHPMailer; $mail = new PHPMailer;
$mail->setFrom('from@example.com', 'First Last'); $mail->setFrom('from@example.com', 'First Last');
$mail->addAddress('whoto@example.com', 'John Doe'); $mail->addAddress('whoto@example.com', 'John Doe');
$mail->Subject = 'PHPMailer file sender'; $mail->Subject = 'PHPMailer file sender';
$mail->msgHTML("My message body"); $mail->Body = 'My message body';
// Attach the uploaded file // Attach the uploaded file
$mail->addAttachment($uploadfile, 'My uploaded file'); $mail->addAttachment($uploadfile, 'My uploaded file');
if (!$mail->send()) { if (!$mail->send()) {
$msg = "Mailer Error: " . $mail->ErrorInfo; $msg .= "Mailer Error: " . $mail->ErrorInfo;
} else { } else {
$msg = "Message sent!"; $msg .= "Message sent!";
} }
} else { } else {
$msg = 'Failed to move file to ' . $uploadfile; $msg .= 'Failed to move file to ' . $uploadfile;
} }
} }
?> ?>
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
<head> <head>
<meta charset="utf-8"/> <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>PHPMailer Upload</title> <title>PHPMailer Upload</title>
</head> </head>
<body> <body>
@@ -0,0 +1,51 @@
<?php
/**
* PHPMailer multiple files upload and send example
*/
$msg = '';
if (array_key_exists('userfile', $_FILES)) {
// Create a message
// This should be somewhere in your include_path
require '../PHPMailerAutoload.php';
$mail = new PHPMailer;
$mail->setFrom('from@example.com', 'First Last');
$mail->addAddress('whoto@example.com', 'John Doe');
$mail->Subject = 'PHPMailer file sender';
$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]));
$filename = $_FILES['userfile']['name'][$ct];
if (move_uploaded_file($_FILES['userfile']['tmp_name'][$ct], $uploadfile)) {
$mail->addAttachment($uploadfile, $filename);
} else {
$msg .= 'Failed to move file to ' . $uploadfile;
}
}
if (!$mail->send()) {
$msg .= "Mailer Error: " . $mail->ErrorInfo;
} else {
$msg .= "Message sent!";
}
}
?>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>PHPMailer Upload</title>
</head>
<body>
<?php if (empty($msg)) { ?>
<form method="post" enctype="multipart/form-data">
<input type="hidden" name="MAX_FILE_SIZE" value="100000">
Select one or more files:
<input name="userfile[]" type="file" multiple="multiple">
<input type="submit" value="Send Files">
</form>
<?php } else {
echo $msg;
} ?>
</body>
</html>
+30 -15
View File
@@ -17,24 +17,39 @@ $smtp = new SMTP;
$smtp->do_debug = SMTP::DEBUG_CONNECTION; $smtp->do_debug = SMTP::DEBUG_CONNECTION;
try { try {
//Connect to an SMTP server //Connect to an SMTP server
if ($smtp->connect('mail.example.com', 25)) { if (!$smtp->connect('mail.example.com', 25)) {
//Say hello
if ($smtp->hello('localhost')) { //Put your host name in here
//Authenticate
if ($smtp->authenticate('username', 'password')) {
echo "Connected ok!";
} else {
throw new Exception('Authentication failed: ' . $smtp->getLastReply());
}
} else {
throw new Exception('HELO failed: '. $smtp->getLastReply());
}
} else {
throw new Exception('Connect failed'); throw new Exception('Connect failed');
} }
//Say hello
if (!$smtp->hello(gethostname())) {
throw new Exception('EHLO failed: ' . $smtp->getError()['error']);
}
//Get the list of ESMTP services the server offers
$e = $smtp->getServerExtList();
//If server can do TLS encryption, use it
if (is_array($e) && array_key_exists('STARTTLS', $e)) {
$tlsok = $smtp->startTLS();
if (!$tlsok) {
throw new Exception('Failed to start encryption: ' . $smtp->getError()['error']);
}
//Repeat EHLO after STARTTLS
if (!$smtp->hello(gethostname())) {
throw new Exception('EHLO (2) failed: ' . $smtp->getError()['error']);
}
//Get new capabilities list, which will usually now include AUTH if it didn't before
$e = $smtp->getServerExtList();
}
//If server supports authentication, do it (even if no encryption)
if (is_array($e) && array_key_exists('AUTH', $e)) {
if ($smtp->authenticate('username', 'password')) {
echo "Connected ok!";
} else {
throw new Exception('Authentication failed: ' . $smtp->getError()['error']);
}
}
} catch (Exception $e) { } catch (Exception $e) {
echo 'SMTP error: '. $e->getMessage(), "\n"; echo 'SMTP error: ' . $e->getMessage(), "\n";
} }
//Whatever happened, close the connection. //Whatever happened, close the connection.
$smtp->quit(true); $smtp->quit(true);
+5 -12
View File
@@ -433,7 +433,7 @@ function tln_getnxtag($body, $offset)
* *
* @param string $attvalue the by-ref value to check. * @param string $attvalue the by-ref value to check.
* @param string $regex the regular expression to check against. * @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. * @return boolean True or False depending on whether there were matches.
*/ */
function tln_deent(&$attvalue, $regex, $hex = false) function tln_deent(&$attvalue, $regex, $hex = false)
@@ -461,7 +461,6 @@ function tln_deent(&$attvalue, $regex, $hex = false)
* checks on them. * checks on them.
* *
* @param string $attvalue A string to run entity check against. * @param string $attvalue A string to run entity check against.
* @return Void, modifies a reference value.
*/ */
function tln_defang(&$attvalue) function tln_defang(&$attvalue)
{ {
@@ -488,7 +487,6 @@ function tln_defang(&$attvalue)
* be funny to make "java[tab]script" be just as good as "javascript". * be funny to make "java[tab]script" be just as good as "javascript".
* *
* @param string $attvalue The attribute value before extraneous spaces removed. * @param string $attvalue The attribute value before extraneous spaces removed.
* @return Void, modifies a reference value.
*/ */
function tln_unspace(&$attvalue) function tln_unspace(&$attvalue)
{ {
@@ -511,7 +509,7 @@ function tln_unspace(&$attvalue)
* @param array $add_attr_to_tag See description for tln_sanitize * @param array $add_attr_to_tag See description for tln_sanitize
* @param string $trans_image_path * @param string $trans_image_path
* @param boolean $block_external_images * @param boolean $block_external_images
* @return Array with modified attributes. * @return array with modified attributes.
*/ */
function tln_fixatts( function tln_fixatts(
$tagname, $tagname,
@@ -667,9 +665,7 @@ function tln_fixurl($attname, &$attvalue, $trans_image_path, $block_external_ima
function tln_fixstyle($body, $pos, $trans_image_path, $block_external_images) function tln_fixstyle($body, $pos, $trans_image_path, $block_external_images)
{ {
$me = 'tln_fixstyle';
// workaround for </style> in between comments // workaround for </style> in between comments
$iCurrentPos = $pos;
$content = ''; $content = '';
$sToken = ''; $sToken = '';
$bSucces = false; $bSucces = false;
@@ -740,8 +736,6 @@ function tln_fixstyle($body, $pos, $trans_image_path, $block_external_images)
*/ */
$content = preg_replace("|body(\s*\{.*?\})|si", ".bodyclass\\1", $content); $content = preg_replace("|body(\s*\{.*?\})|si", ".bodyclass\\1", $content);
$trans_image_path = $trans_image_path;
/** /**
* Fix url('blah') declarations. * Fix url('blah') declarations.
*/ */
@@ -778,7 +772,7 @@ function tln_fixstyle($body, $pos, $trans_image_path, $block_external_images)
tln_defang($contentTemp); tln_defang($contentTemp);
tln_unspace($contentTemp); tln_unspace($contentTemp);
$match = Array('/\/\*.*\*\//', $match = array('/\/\*.*\*\//',
'/expression/i', '/expression/i',
'/behaviou*r/i', '/behaviou*r/i',
'/binding/i', '/binding/i',
@@ -786,7 +780,7 @@ function tln_fixstyle($body, $pos, $trans_image_path, $block_external_images)
'/javascript/i', '/javascript/i',
'/script/i', '/script/i',
'/position/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); $contentNew = preg_replace($match, $replace, $contentTemp);
if ($contentNew !== $contentTemp) { if ($contentNew !== $contentTemp) {
$content = $contentNew; $content = $contentNew;
@@ -796,7 +790,6 @@ function tln_fixstyle($body, $pos, $trans_image_path, $block_external_images)
function tln_body2div($attary, $trans_image_path) function tln_body2div($attary, $trans_image_path)
{ {
$me = 'tln_body2div';
$divattary = array('class' => "'bodyclass'"); $divattary = array('class' => "'bodyclass'");
$text = '#000000'; $text = '#000000';
$has_bgc_stl = $has_txt_stl = false; $has_bgc_stl = $has_txt_stl = false;
@@ -901,7 +894,7 @@ function tln_sanitize(
} }
$trusted .= tln_tagprint($tagname, $attary, $tagtype); $trusted .= tln_tagprint($tagname, $attary, $tagtype);
$trusted .= $free_content; $trusted .= $free_content;
$trusted .= tln_tagprint($tagname, false, 2); $trusted .= tln_tagprint($tagname, null, 2);
} }
continue; continue;
} }
+2 -2
View File
@@ -160,12 +160,12 @@ class ntlm_sasl_client_class
{ {
switch ($this->state) { switch ($this->state) {
case SASL_NTLM_STATE_IDENTIFY_DOMAIN: case SASL_NTLM_STATE_IDENTIFY_DOMAIN:
$message = $this->TypeMsg1($this->credentials["realm"], $this->credentials["workstation"]); $message = $this->typeMsg1($this->credentials["realm"], $this->credentials["workstation"]);
$this->state = SASL_NTLM_STATE_RESPOND_CHALLENGE; $this->state = SASL_NTLM_STATE_RESPOND_CHALLENGE;
break; break;
case SASL_NTLM_STATE_RESPOND_CHALLENGE: case SASL_NTLM_STATE_RESPOND_CHALLENGE:
$ntlm_response = $this->NTLMResponse(substr($response, 24, 8), $this->credentials["password"]); $ntlm_response = $this->NTLMResponse(substr($response, 24, 8), $this->credentials["password"]);
$message = $this->TypeMsg3( $message = $this->typeMsg3(
$ntlm_response, $ntlm_response,
$this->credentials["user"], $this->credentials["user"],
$this->credentials["realm"], $this->credentials["realm"],
+105 -3
View File
@@ -13,8 +13,15 @@
* PHP Version 5.4 * PHP Version 5.4
*/ */
namespace League\OAuth2\Client\Provider;
require 'vendor/autoload.php'; require 'vendor/autoload.php';
use League\OAuth2\Client\Provider\Exception\IdentityProviderException;
use League\OAuth2\Client\Token\AccessToken;
use League\OAuth2\Client\Tool\BearerAuthorizationTrait;
use Psr\Http\Message\ResponseInterface;
session_start(); session_start();
//If this automatic URL doesn't work, set it yourself manually //If this automatic URL doesn't work, set it yourself manually
@@ -25,14 +32,109 @@ $redirectUri = isset($_SERVER['HTTPS']) ? 'https://' : 'http://' . $_SERVER['HTT
$clientId = 'RANDOMCHARS-----duv1n2.apps.googleusercontent.com'; $clientId = 'RANDOMCHARS-----duv1n2.apps.googleusercontent.com';
$clientSecret = 'RANDOMCHARS-----lGyjPcRtvP'; $clientSecret = 'RANDOMCHARS-----lGyjPcRtvP';
class Google extends AbstractProvider
{
use BearerAuthorizationTrait;
const ACCESS_TOKEN_RESOURCE_OWNER_ID = 'id';
/**
* @var string If set, this will be sent to google as the "access_type" parameter.
* @link https://developers.google.com/accounts/docs/OAuth2WebServer#offline
*/
protected $accessType;
/**
* @var string If set, this will be sent to google as the "hd" parameter.
* @link https://developers.google.com/accounts/docs/OAuth2Login#hd-param
*/
protected $hostedDomain;
/**
* @var string If set, this will be sent to google as the "scope" parameter.
* @link https://developers.google.com/gmail/api/auth/scopes
*/
protected $scope;
public function getBaseAuthorizationUrl()
{
return 'https://accounts.google.com/o/oauth2/auth';
}
public function getBaseAccessTokenUrl(array $params)
{
return 'https://accounts.google.com/o/oauth2/token';
}
public function getResourceOwnerDetailsUrl(AccessToken $token)
{
return ' ';
}
protected function getAuthorizationParameters(array $options)
{
if (is_array($this->scope)) {
$separator = $this->getScopeSeparator();
$this->scope = implode($separator, $this->scope);
}
$params = array_merge(
parent::getAuthorizationParameters($options),
array_filter([
'hd' => $this->hostedDomain,
'access_type' => $this->accessType,
'scope' => $this->scope,
// if the user is logged in with more than one account ask which one to use for the login!
'authuser' => '-1'
])
);
return $params;
}
protected function getDefaultScopes()
{
return [
'email',
'openid',
'profile',
];
}
protected function getScopeSeparator()
{
return ' ';
}
protected function checkResponse(ResponseInterface $response, $data)
{
if (!empty($data['error'])) {
$code = 0;
$error = $data['error'];
if (is_array($error)) {
$code = $error['code'];
$error = $error['message'];
}
throw new IdentityProviderException($error, $code, $data);
}
}
protected function createResourceOwner(array $response, AccessToken $token)
{
return new GoogleUser($response);
}
}
//Set Redirect URI in Developer Console as [https/http]://<yourdomain>/<folder>/get_oauth_token.php //Set Redirect URI in Developer Console as [https/http]://<yourdomain>/<folder>/get_oauth_token.php
$provider = new League\OAuth2\Client\Provider\Google( $provider = new Google(
array( array(
'clientId' => $clientId, 'clientId' => $clientId,
'clientSecret' => $clientSecret, 'clientSecret' => $clientSecret,
'redirectUri' => $redirectUri, 'redirectUri' => $redirectUri,
'scopes' => array('https://mail.google.com/'), 'scope' => array('https://mail.google.com/'),
'accessType' => 'offline' 'accessType' => 'offline'
) )
); );
@@ -0,0 +1,25 @@
<?php
/**
* Czech PHPMailer language file: refer to English translation for definitive list
* @package PHPMailer
*/
$PHPMAILER_LANG['authenticate'] = 'Chyba SMTP: Autentizace selhala.';
$PHPMAILER_LANG['connect_host'] = 'Chyba SMTP: Nelze navázat spojení se SMTP serverem.';
$PHPMAILER_LANG['data_not_accepted'] = 'Chyba SMTP: Data nebyla přijata.';
$PHPMAILER_LANG['empty_message'] = 'Prázdné tělo zprávy';
$PHPMAILER_LANG['encoding'] = 'Neznámé kódování: ';
$PHPMAILER_LANG['execute'] = 'Nelze provést: ';
$PHPMAILER_LANG['file_access'] = 'Nelze získat přístup k souboru: ';
$PHPMAILER_LANG['file_open'] = 'Chyba souboru: Nelze otevřít soubor pro čtení: ';
$PHPMAILER_LANG['from_failed'] = 'Následující adresa odesílatele je nesprávná: ';
$PHPMAILER_LANG['instantiate'] = 'Nelze vytvořit instanci emailové funkce.';
$PHPMAILER_LANG['invalid_address'] = 'Neplatná adresa: ';
$PHPMAILER_LANG['mailer_not_supported'] = ' mailer není podporován.';
$PHPMAILER_LANG['provide_address'] = 'Musíte zadat alespoň jednu emailovou adresu příjemce.';
$PHPMAILER_LANG['recipients_failed'] = 'Chyba SMTP: Následující adresy příjemců nejsou správně: ';
$PHPMAILER_LANG['signing'] = 'Chyba přihlašování: ';
$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() selhal.';
$PHPMAILER_LANG['smtp_error'] = 'Chyba SMTP serveru: ';
$PHPMAILER_LANG['variable_set'] = 'Nelze nastavit nebo změnit proměnnou: ';
//$PHPMAILER_LANG['extension_missing'] = 'Extension missing: ';
@@ -0,0 +1,26 @@
<?php
/**
* Danish PHPMailer language file: refer to English translation for definitive list
* @package PHPMailer
* @author Mikael Stokkebro <info@stokkebro.dk>
*/
$PHPMAILER_LANG['authenticate'] = 'SMTP fejl: Kunne ikke logge på.';
$PHPMAILER_LANG['connect_host'] = 'SMTP fejl: Kunne ikke tilslutte SMTP serveren.';
$PHPMAILER_LANG['data_not_accepted'] = 'SMTP fejl: Data kunne ikke accepteres.';
//$PHPMAILER_LANG['empty_message'] = 'Message body empty';
$PHPMAILER_LANG['encoding'] = 'Ukendt encode-format: ';
$PHPMAILER_LANG['execute'] = 'Kunne ikke køre: ';
$PHPMAILER_LANG['file_access'] = 'Ingen adgang til fil: ';
$PHPMAILER_LANG['file_open'] = 'Fil fejl: Kunne ikke åbne filen: ';
$PHPMAILER_LANG['from_failed'] = 'Følgende afsenderadresse er forkert: ';
$PHPMAILER_LANG['instantiate'] = 'Kunne ikke initialisere email funktionen.';
//$PHPMAILER_LANG['invalid_address'] = 'Invalid address: ';
$PHPMAILER_LANG['mailer_not_supported'] = ' mailer understøttes ikke.';
$PHPMAILER_LANG['provide_address'] = 'Du skal indtaste mindst en modtagers emailadresse.';
$PHPMAILER_LANG['recipients_failed'] = 'SMTP fejl: Følgende modtagere er forkerte: ';
//$PHPMAILER_LANG['signing'] = 'Signing Error: ';
//$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() failed.';
//$PHPMAILER_LANG['smtp_error'] = 'SMTP server error: ';
//$PHPMAILER_LANG['variable_set'] = 'Cannot set or reset variable: ';
//$PHPMAILER_LANG['extension_missing'] = 'Extension missing: ';
+13 -13
View File
@@ -4,22 +4,22 @@
* @package PHPMailer * @package PHPMailer
*/ */
$PHPMAILER_LANG['authenticate'] = 'SMTP Fehler: Authentifizierung fehlgeschlagen.'; $PHPMAILER_LANG['authenticate'] = 'SMTP-Fehler: Authentifizierung fehlgeschlagen.';
$PHPMAILER_LANG['connect_host'] = 'SMTP Fehler: Konnte keine Verbindung zum SMTP-Host herstellen.'; $PHPMAILER_LANG['connect_host'] = 'SMTP-Fehler: Konnte keine Verbindung zum SMTP-Host herstellen.';
$PHPMAILER_LANG['data_not_accepted'] = 'SMTP Fehler: Daten werden nicht akzeptiert.'; $PHPMAILER_LANG['data_not_accepted'] = 'SMTP-Fehler: Daten werden nicht akzeptiert.';
$PHPMAILER_LANG['empty_message'] = 'E-Mail Inhalt ist leer.'; $PHPMAILER_LANG['empty_message'] = 'E-Mail-Inhalt ist leer.';
$PHPMAILER_LANG['encoding'] = 'Unbekanntes Encoding-Format: '; $PHPMAILER_LANG['encoding'] = 'Unbekannte Kodierung: ';
$PHPMAILER_LANG['execute'] = 'Konnte folgenden Befehl nicht ausführen: '; $PHPMAILER_LANG['execute'] = 'Konnte folgenden Befehl nicht ausführen: ';
$PHPMAILER_LANG['file_access'] = 'Zugriff auf folgende Datei fehlgeschlagen: '; $PHPMAILER_LANG['file_access'] = 'Zugriff auf folgende Datei fehlgeschlagen: ';
$PHPMAILER_LANG['file_open'] = 'Datei Fehler: konnte folgende Datei nicht öffnen: '; $PHPMAILER_LANG['file_open'] = 'Dateifehler: Konnte folgende Datei nicht öffnen: ';
$PHPMAILER_LANG['from_failed'] = 'Die folgende Absenderadresse ist nicht korrekt: '; $PHPMAILER_LANG['from_failed'] = 'Die folgende Absenderadresse ist nicht korrekt: ';
$PHPMAILER_LANG['instantiate'] = 'Mail Funktion konnte nicht initialisiert werden.'; $PHPMAILER_LANG['instantiate'] = 'Mail-Funktion konnte nicht initialisiert werden.';
$PHPMAILER_LANG['invalid_address'] = 'E-Mail wird nicht gesendet, die Adresse ist ungültig: '; $PHPMAILER_LANG['invalid_address'] = 'Die Adresse ist ungültig: ';
$PHPMAILER_LANG['mailer_not_supported'] = ' mailer wird nicht unterstützt.'; $PHPMAILER_LANG['mailer_not_supported'] = ' mailer wird nicht unterstützt.';
$PHPMAILER_LANG['provide_address'] = 'Bitte geben Sie mindestens eine Empfänger E-Mailadresse an.'; $PHPMAILER_LANG['provide_address'] = 'Bitte geben Sie mindestens eine Empfängeradresse an.';
$PHPMAILER_LANG['recipients_failed'] = 'SMTP Fehler: Die folgenden Empfänger sind nicht korrekt: '; $PHPMAILER_LANG['recipients_failed'] = 'SMTP-Fehler: Die folgenden Empfänger sind nicht korrekt: ';
$PHPMAILER_LANG['signing'] = 'Fehler beim Signieren: '; $PHPMAILER_LANG['signing'] = 'Fehler beim Signieren: ';
$PHPMAILER_LANG['smtp_connect_failed'] = 'Verbindung zu SMTP Server fehlgeschlagen.'; $PHPMAILER_LANG['smtp_connect_failed'] = 'Verbindung zum SMTP-Server fehlgeschlagen.';
$PHPMAILER_LANG['smtp_error'] = 'Fehler vom SMTP Server: '; $PHPMAILER_LANG['smtp_error'] = 'Fehler vom SMTP-Server: ';
$PHPMAILER_LANG['variable_set'] = 'Kann Variable nicht setzen oder zurücksetzen: '; $PHPMAILER_LANG['variable_set'] = 'Kann Variable nicht setzen oder zurücksetzen: ';
//$PHPMAILER_LANG['extension_missing'] = 'Extension missing: '; $PHPMAILER_LANG['extension_missing'] = 'Fehlende Erweiterung: ';
@@ -23,4 +23,4 @@ $PHPMAILER_LANG['signing'] = 'Error al firmar: ';
$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() falló.'; $PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() falló.';
$PHPMAILER_LANG['smtp_error'] = 'Error del servidor SMTP: '; $PHPMAILER_LANG['smtp_error'] = 'Error del servidor SMTP: ';
$PHPMAILER_LANG['variable_set'] = 'No se pudo configurar la variable: '; $PHPMAILER_LANG['variable_set'] = 'No se pudo configurar la variable: ';
//$PHPMAILER_LANG['extension_missing'] = 'Extension missing: '; $PHPMAILER_LANG['extension_missing'] = 'Extensión faltante: ';
@@ -23,4 +23,4 @@ $PHPMAILER_LANG['signing'] = 'ხელმოწერის შე
$PHPMAILER_LANG['smtp_connect_failed'] = 'შეცდომა SMTP სერვერთან დაკავშირებისას'; $PHPMAILER_LANG['smtp_connect_failed'] = 'შეცდომა SMTP სერვერთან დაკავშირებისას';
$PHPMAILER_LANG['smtp_error'] = 'SMTP სერვერის შეცდომა: '; $PHPMAILER_LANG['smtp_error'] = 'SMTP სერვერის შეცდომა: ';
$PHPMAILER_LANG['variable_set'] = 'შეუძლებელია შემდეგი ცვლადის შექმნა ან შეცვლა: '; $PHPMAILER_LANG['variable_set'] = 'შეუძლებელია შემდეგი ცვლადის შექმნა ან შეცვლა: ';
//$PHPMAILER_LANG['extension_missing'] = 'Extension missing: '; $PHPMAILER_LANG['extension_missing'] = 'ბიბლიოთეკა არ არსებობს: ';
@@ -0,0 +1,25 @@
<?php
/**
* Norwegian PHPMailer language file: refer to English translation for definitive list
* @package PHPMailer
*/
$PHPMAILER_LANG['authenticate'] = 'SMTP Feil: Kunne ikke autentisere.';
$PHPMAILER_LANG['connect_host'] = 'SMTP Feil: Kunne ikke koble til SMTP tjener.';
$PHPMAILER_LANG['data_not_accepted'] = 'SMTP Feil: Data ble ikke akseptert.';
$PHPMAILER_LANG['empty_message'] = 'Meldingsinnholdet er tomt';
$PHPMAILER_LANG['encoding'] = 'Ukjent tegnkoding: ';
$PHPMAILER_LANG['execute'] = 'Kunne ikke utføre: ';
$PHPMAILER_LANG['file_access'] = 'Får ikke tilgang til filen: ';
$PHPMAILER_LANG['file_open'] = 'Fil feil: Kunne ikke åpne filen: ';
$PHPMAILER_LANG['from_failed'] = 'Følgende avsenderadresse feilet: ';
$PHPMAILER_LANG['instantiate'] = 'Kunne ikke initialisere mailfunksjonen.';
$PHPMAILER_LANG['invalid_address'] = 'Meldingen ble ikke sendt, følgende adresse er ugyldig: ';
$PHPMAILER_LANG['provide_address'] = 'Du må angi minst en mottakeradresse.';
$PHPMAILER_LANG['mailer_not_supported'] = ' mailer er ikke supportert.';
$PHPMAILER_LANG['recipients_failed'] = 'SMTP Feil: Følgende mottagere feilet: ';
$PHPMAILER_LANG['signing'] = 'Signeringsfeil: ';
$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() feilet.';
$PHPMAILER_LANG['smtp_error'] = 'SMTP-serverfeil: ';
$PHPMAILER_LANG['variable_set'] = 'Kan ikke sette eller resette variabelen: ';
//$PHPMAILER_LANG['extension_missing'] = 'Extension missing: ';
@@ -23,4 +23,4 @@ $PHPMAILER_LANG['signing'] = 'Błąd podpisywania wiadomości: ';
$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() zakończone niepowodzeniem.'; $PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() zakończone niepowodzeniem.';
$PHPMAILER_LANG['smtp_error'] = 'Błąd SMTP: '; $PHPMAILER_LANG['smtp_error'] = 'Błąd SMTP: ';
$PHPMAILER_LANG['variable_set'] = 'Nie można ustawić lub zmodyfikować zmiennej: '; $PHPMAILER_LANG['variable_set'] = 'Nie można ustawić lub zmodyfikować zmiennej: ';
//$PHPMAILER_LANG['extension_missing'] = 'Extension missing: '; $PHPMAILER_LANG['extension_missing'] = 'Brakujące rozszerzenie: ';
@@ -0,0 +1,28 @@
<?php
/**
* Brazilian Portuguese PHPMailer language file: refer to English translation for definitive list
* @package PHPMailer
* @author Paulo Henrique Garcia <paulo@controllerweb.com.br>
* @author Lucas Guimarães <lucas@lucasguimaraes.com>
* @author Phelipe Alves <phelipealvesdesouza@gmail.com>
*/
$PHPMAILER_LANG['authenticate'] = 'Erro de SMTP: Não foi possível autenticar.';
$PHPMAILER_LANG['connect_host'] = 'Erro de SMTP: Não foi possível conectar ao servidor SMTP.';
$PHPMAILER_LANG['data_not_accepted'] = 'Erro de SMTP: Dados rejeitados.';
$PHPMAILER_LANG['empty_message'] = 'Mensagem vazia';
$PHPMAILER_LANG['encoding'] = 'Codificação desconhecida: ';
$PHPMAILER_LANG['execute'] = 'Não foi possível executar: ';
$PHPMAILER_LANG['file_access'] = 'Não foi possível acessar o arquivo: ';
$PHPMAILER_LANG['file_open'] = 'Erro de Arquivo: Não foi possível abrir o arquivo: ';
$PHPMAILER_LANG['from_failed'] = 'Os seguintes remententes falharam: ';
$PHPMAILER_LANG['instantiate'] = 'Não foi possível instanciar a função mail.';
$PHPMAILER_LANG['invalid_address'] = 'Endereço de e-mail inválido: ';
$PHPMAILER_LANG['mailer_not_supported'] = ' mailer não é suportado.';
$PHPMAILER_LANG['provide_address'] = 'Você deve informar pelo menos um destinatário.';
$PHPMAILER_LANG['recipients_failed'] = 'Erro de SMTP: Os seguintes destinatários falharam: ';
$PHPMAILER_LANG['signing'] = 'Erro de Assinatura: ';
$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() falhou.';
$PHPMAILER_LANG['smtp_error'] = 'Erro de servidor SMTP: ';
$PHPMAILER_LANG['variable_set'] = 'Não foi possível definir ou redefinir a variável: ';
$PHPMAILER_LANG['extension_missing'] = 'Extensão ausente: ';
+17 -17
View File
@@ -2,25 +2,25 @@
/** /**
* Romanian PHPMailer language file: refer to English translation for definitive list * Romanian PHPMailer language file: refer to English translation for definitive list
* @package PHPMailer * @package PHPMailer
* @author Catalin Constantin <catalin@dazoot.ro> * @author Alex Florea <alecz.fia@gmail.com>
*/ */
$PHPMAILER_LANG['authenticate'] = 'Eroare SMTP: Nu a functionat autentificarea.'; $PHPMAILER_LANG['authenticate'] = 'Eroare SMTP: Autentificarea a eșuat.';
$PHPMAILER_LANG['connect_host'] = 'Eroare SMTP: Nu m-am putut conecta la adresa SMTP.'; $PHPMAILER_LANG['connect_host'] = 'Eroare SMTP: Conectarea la serverul SMTP a eșuat.';
$PHPMAILER_LANG['data_not_accepted'] = 'Eroare SMTP: Continutul mailului nu a fost acceptat.'; $PHPMAILER_LANG['data_not_accepted'] = 'Eroare SMTP: Datele nu au fost acceptate.';
$PHPMAILER_LANG['empty_message'] = 'Mesajul este gol.'; $PHPMAILER_LANG['empty_message'] = 'Mesajul este gol.';
$PHPMAILER_LANG['encoding'] = 'Encodare necunoscuta: '; $PHPMAILER_LANG['encoding'] = 'Encodare necunoscută: ';
$PHPMAILER_LANG['execute'] = 'Nu pot executa: '; $PHPMAILER_LANG['execute'] = 'Nu se poate executa următoarea comandă: ';
$PHPMAILER_LANG['file_access'] = 'Nu pot accesa fisierul: '; $PHPMAILER_LANG['file_access'] = 'Nu se poate accesa următorul fișier: ';
$PHPMAILER_LANG['file_open'] = 'Eroare de fisier: Nu pot deschide fisierul: '; $PHPMAILER_LANG['file_open'] = 'Eroare fișier: Nu se poate deschide următorul fișier: ';
$PHPMAILER_LANG['from_failed'] = 'Urmatoarele adrese From au dat eroare: '; $PHPMAILER_LANG['from_failed'] = 'Următoarele adrese From au dat eroare: ';
$PHPMAILER_LANG['instantiate'] = 'Nu am putut instantia functia mail.'; $PHPMAILER_LANG['instantiate'] = 'Funcția mail nu a putut fi inițializată.';
$PHPMAILER_LANG['invalid_address'] = 'Adresa de email nu este valida: '; $PHPMAILER_LANG['invalid_address'] = 'Adresa de email nu este validă: ';
$PHPMAILER_LANG['mailer_not_supported'] = ' mailer nu este suportat.'; $PHPMAILER_LANG['mailer_not_supported'] = ' mailer nu este suportat.';
$PHPMAILER_LANG['provide_address'] = 'Trebuie sa adaugati cel putin un recipient (adresa de mail).'; $PHPMAILER_LANG['provide_address'] = 'Trebuie să adăugați cel puțin o adresă de email.';
$PHPMAILER_LANG['recipients_failed'] = 'Eroare SMTP: Urmatoarele adrese de mail au dat eroare: '; $PHPMAILER_LANG['recipients_failed'] = 'Eroare SMTP: Următoarele adrese de email au eșuat: ';
$PHPMAILER_LANG['signing'] = 'A aparut o problema la semnarea emailului. '; $PHPMAILER_LANG['signing'] = 'A aparut o problemă la semnarea emailului. ';
$PHPMAILER_LANG['smtp_connect_failed'] = 'Conectarea la serverul SMTP a esuat.'; $PHPMAILER_LANG['smtp_connect_failed'] = 'Conectarea la serverul SMTP a eșuat.';
$PHPMAILER_LANG['smtp_error'] = 'A aparut o eroare la serverul SMTP. '; $PHPMAILER_LANG['smtp_error'] = 'Eroare server SMTP: ';
$PHPMAILER_LANG['variable_set'] = 'Nu se poate seta/reseta variabila. '; $PHPMAILER_LANG['variable_set'] = 'Nu se poate seta/reseta variabila. ';
//$PHPMAILER_LANG['extension_missing'] = 'Extension missing: '; $PHPMAILER_LANG['extension_missing'] = 'Lipsește extensia: ';
@@ -18,9 +18,9 @@ $PHPMAILER_LANG['instantiate'] = 'Невозможно запустит
$PHPMAILER_LANG['provide_address'] = 'Пожалуйста, введите хотя бы один адрес e-mail получателя.'; $PHPMAILER_LANG['provide_address'] = 'Пожалуйста, введите хотя бы один адрес e-mail получателя.';
$PHPMAILER_LANG['mailer_not_supported'] = ' — почтовый сервер не поддерживается.'; $PHPMAILER_LANG['mailer_not_supported'] = ' — почтовый сервер не поддерживается.';
$PHPMAILER_LANG['recipients_failed'] = 'Ошибка SMTP: отправка по следующим адресам получателей не удалась: '; $PHPMAILER_LANG['recipients_failed'] = 'Ошибка SMTP: отправка по следующим адресам получателей не удалась: ';
$PHPMAILER_LANG['empty_message'] = 'Пустое тело сообщения'; $PHPMAILER_LANG['empty_message'] = 'Пустое сообщение';
$PHPMAILER_LANG['invalid_address'] = 'Не отослано, неправильный формат email адреса: '; $PHPMAILER_LANG['invalid_address'] = 'Не отослано, неправильный формат email адреса: ';
$PHPMAILER_LANG['signing'] = 'Ошибка подписывания: '; $PHPMAILER_LANG['signing'] = 'Ошибка подписи: ';
$PHPMAILER_LANG['smtp_connect_failed'] = 'Ошибка соединения с SMTP-сервером'; $PHPMAILER_LANG['smtp_connect_failed'] = 'Ошибка соединения с SMTP-сервером';
$PHPMAILER_LANG['smtp_error'] = 'Ошибка SMTP-сервера: '; $PHPMAILER_LANG['smtp_error'] = 'Ошибка SMTP-сервера: ';
$PHPMAILER_LANG['variable_set'] = 'Невозможно установить или переустановить переменную: '; $PHPMAILER_LANG['variable_set'] = 'Невозможно установить или переустановить переменную: ';
@@ -0,0 +1,26 @@
<?php
/**
* Swedish PHPMailer language file: refer to English translation for definitive list
* @package PHPMailer
* @author Johan Linnér <johan@linner.biz>
*/
$PHPMAILER_LANG['authenticate'] = 'SMTP fel: Kunde inte autentisera.';
$PHPMAILER_LANG['connect_host'] = 'SMTP fel: Kunde inte ansluta till SMTP-server.';
$PHPMAILER_LANG['data_not_accepted'] = 'SMTP fel: Data accepterades inte.';
//$PHPMAILER_LANG['empty_message'] = 'Message body empty';
$PHPMAILER_LANG['encoding'] = 'Okänt encode-format: ';
$PHPMAILER_LANG['execute'] = 'Kunde inte köra: ';
$PHPMAILER_LANG['file_access'] = 'Ingen åtkomst till fil: ';
$PHPMAILER_LANG['file_open'] = 'Fil fel: Kunde inte öppna fil: ';
$PHPMAILER_LANG['from_failed'] = 'Följande avsändaradress är felaktig: ';
$PHPMAILER_LANG['instantiate'] = 'Kunde inte initiera e-postfunktion.';
$PHPMAILER_LANG['invalid_address'] = 'Felaktig adress: ';
$PHPMAILER_LANG['provide_address'] = 'Du måste ange minst en mottagares e-postadress.';
$PHPMAILER_LANG['mailer_not_supported'] = ' mailer stöds inte.';
$PHPMAILER_LANG['recipients_failed'] = 'SMTP fel: Följande mottagare är felaktig: ';
$PHPMAILER_LANG['signing'] = 'Signerings fel: ';
$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() misslyckades.';
$PHPMAILER_LANG['smtp_error'] = 'SMTP server fel: ';
$PHPMAILER_LANG['variable_set'] = 'Kunde inte definiera eller återställa variabel: ';
$PHPMAILER_LANG['extension_missing'] = 'Tillägg ej tillgängligt: ';
+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
Loaded 100 of 352 files, more files were not shown because too many files have changed in this diff. Show more