Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c2a4a39ea0 | ||
|
|
b8759e4acd | ||
|
|
e6a3df6f08 | ||
|
|
617dfbf0e2 | ||
|
|
e4c9bf5ba4 | ||
|
|
910091b6c6 | ||
|
|
92b8ce3a89 | ||
|
|
8a276fc073 | ||
|
|
baa2e890ba | ||
|
|
a9f4aee93f | ||
|
|
144926774d | ||
|
|
435da08a02 | ||
|
|
945c060b67 | ||
|
|
83fd4bf68a | ||
|
|
f11c4531e9 | ||
|
|
f36c24e5d0 | ||
|
|
23a91b346d | ||
|
|
8eb465d26f | ||
|
|
6ff06d4609 | ||
|
|
c817b1edb7 | ||
|
|
f7c6a52f6d | ||
|
|
3e343bdf66 | ||
|
|
e131563c8f | ||
|
|
0094cc9afe | ||
|
|
5fde923aa0 | ||
|
|
1e3a4f2657 | ||
|
|
0693fde962 | ||
|
|
7fb5f92200 | ||
|
|
50c8207fed | ||
|
|
6dbfa73461 | ||
|
|
76ecc6efe8 | ||
|
|
f4b0737178 | ||
|
|
e99c7a81db | ||
|
|
ce0a6dc3af | ||
|
|
f3e428ea1e | ||
|
|
9b422b38c5 | ||
|
|
f6056b2d37 | ||
|
|
a560fc353c | ||
|
|
e2c67e854f | ||
|
|
3e7617e825 | ||
|
|
4515f11169 | ||
|
|
ec32f64bc4 | ||
|
|
15bd8b9632 | ||
|
|
ef013e0827 | ||
|
|
b3773217e9 | ||
|
|
70f6d92e87 | ||
|
|
042695af55 | ||
|
|
85f9523b30 | ||
|
|
8c1d6266af | ||
|
|
30009dba6f | ||
|
|
24e7e8823e | ||
|
|
42fb4b71a6 | ||
|
|
f0134b610b | ||
|
|
c2cf34392a | ||
|
|
20dc859436 | ||
|
|
f5ec4d60c0 | ||
|
|
de00b4e9d3 | ||
|
|
8c67945c64 | ||
|
|
e5889df761 | ||
|
|
624e3d74a6 | ||
|
|
30815f71e0 | ||
|
|
949a73b468 | ||
|
|
24d57cdd4b | ||
|
|
191f3d2f97 | ||
|
|
4973714e2f | ||
|
|
70bfeefb3b | ||
|
|
e8b83f3a33 | ||
|
|
c6bdc172ee | ||
|
|
c3cf74f0c5 | ||
|
|
52db203ecd | ||
|
|
6e05353f31 | ||
|
|
7f6a9a090a | ||
|
|
1825830c3d |
+1
-1
@@ -6,7 +6,7 @@ sirgle/
|
||||
test.php
|
||||
*.key
|
||||
*.sh
|
||||
cheditor*/
|
||||
cheditor5.*/
|
||||
ckeditor*/
|
||||
log/
|
||||
g5_tree/
|
||||
|
||||
@@ -2,4 +2,8 @@
|
||||
define('G5_IS_ADMIN', true);
|
||||
include_once ('../common.php');
|
||||
include_once(G5_ADMIN_PATH.'/admin.lib.php');
|
||||
|
||||
if( isset($token) ){
|
||||
$token = @htmlspecialchars(strip_tags($token), ENT_QUOTES);
|
||||
}
|
||||
?>
|
||||
+1
-1
@@ -21,7 +21,7 @@ if (!defined('_GNUBOARD_')) exit;
|
||||
|
||||
<!-- <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>
|
||||
$(function(){
|
||||
var hide_menu = false;
|
||||
|
||||
+1
-1
@@ -8,7 +8,7 @@ $g5['title'] = '게시판 복사';
|
||||
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">
|
||||
<h1><?php echo $g5['title']; ?></h1>
|
||||
|
||||
@@ -35,6 +35,14 @@ if ($file = $_POST['bo_include_tail']) {
|
||||
$_POST['bo_include_tail'] = $file;
|
||||
}
|
||||
|
||||
if(!is_include_path_check($_POST['bo_include_head'])) {
|
||||
alert('/data/file/ 또는 /data/editor/ 포함된 문자를 상단 파일 경로에 포함시킬수 없습니다.');
|
||||
}
|
||||
|
||||
if(!is_include_path_check($_POST['bo_include_tail'])) {
|
||||
alert('/data/file/ 또는 /data/editor/ 포함된 문자를 하단 파일 경로에 포함시킬수 없습니다.');
|
||||
}
|
||||
|
||||
$board_path = G5_DATA_PATH.'/file/'.$bo_table;
|
||||
|
||||
// 게시판 디렉토리 생성
|
||||
|
||||
+1
-1
@@ -63,7 +63,7 @@ $colspan = 15;
|
||||
|
||||
<label for="sfl" class="sound_only">검색대상</label>
|
||||
<select name="sfl" id="sfl">
|
||||
<option value="bo_table"<?php echo get_selected($_GET['sfl'], "bo_subject", true); ?>>TABLE</option>
|
||||
<option value="bo_table"<?php echo get_selected($_GET['sfl'], "bo_table", true); ?>>TABLE</option>
|
||||
<option value="bo_subject"<?php echo get_selected($_GET['sfl'], "bo_subject"); ?>>제목</option>
|
||||
<option value="a.gr_id"<?php echo get_selected($_GET['sfl'], "a.gr_id"); ?>>그룹ID</option>
|
||||
</select>
|
||||
|
||||
+3
-3
@@ -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">
|
||||
<?php echo option_selected("", $config['cf_cert_hp'], "사용안함"); ?>
|
||||
<?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유플러스 휴대폰 본인확인"); ?>
|
||||
</select>
|
||||
</td>
|
||||
@@ -750,11 +750,11 @@ if ($config['cf_sms_use'] && $config['cf_icode_id'] && $config['cf_icode_pw']) {
|
||||
</td>
|
||||
</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">
|
||||
<?php echo help('SM으로 시작하는 5자리 사이트 코드중 뒤의 3자리만 입력해 주십시오.<br>서비스에 가입되어 있지 않다면, 본인확인 서비스 신청페이지에서 서비스 신청 후 사이트코드를 발급 받으실 수 있습니다.') ?>
|
||||
<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>
|
||||
</tr>
|
||||
<tr>
|
||||
|
||||
@@ -18,6 +18,18 @@ check_admin_token();
|
||||
if ($co_himg_del) @unlink(G5_DATA_PATH."/content/{$co_id}_h");
|
||||
if ($co_timg_del) @unlink(G5_DATA_PATH."/content/{$co_id}_t");
|
||||
|
||||
$error_msg = '';
|
||||
|
||||
if( $co_include_head && ! is_include_path_check($co_include_head) ){
|
||||
$co_include_head = '';
|
||||
$error_msg = '/data/file/ 또는 /data/editor/ 포함된 문자를 상단 파일 경로에 포함시킬수 없습니다.';
|
||||
}
|
||||
|
||||
if( $co_include_tail && ! is_include_path_check($co_include_tail) ){
|
||||
$co_include_tail = '';
|
||||
$error_msg = '/data/file/ 또는 /data/editor/ 포함된 문자를 하단 파일 경로에 포함시킬수 없습니다.';
|
||||
}
|
||||
|
||||
$sql_common = " co_include_head = '$co_include_head',
|
||||
co_include_tail = '$co_include_tail',
|
||||
co_html = '$co_html',
|
||||
@@ -74,7 +86,11 @@ if ($w == "" || $w == "u")
|
||||
@chmod($dest_path, G5_FILE_PERMISSION);
|
||||
}
|
||||
|
||||
goto_url("./contentform.php?w=u&co_id=$co_id");
|
||||
if( $error_msg ){
|
||||
alert($error_msg, "./contentform.php?w=u&co_id=$co_id");
|
||||
} else {
|
||||
goto_url("./contentform.php?w=u&co_id=$co_id");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -311,6 +311,7 @@ tfoot td {font-weight:bold;text-align:center}
|
||||
#menu_frm #menu_result {margin:20px 0}
|
||||
|
||||
#menulist .sub_menu_class {padding-left:25px;background:url('../img/sub_menu_ico.gif') 5px 15px no-repeat}
|
||||
.exist_menu_link {font-weight:bold;color:red}
|
||||
|
||||
/* 회원관리 목록 */
|
||||
.mb_leave_msg {color:#b6b6b6}
|
||||
|
||||
@@ -7,6 +7,8 @@ auth_check($auth[$sub_menu], "w");
|
||||
|
||||
$html_title = 'FAQ';
|
||||
|
||||
$fm_id = preg_replace('/[^0-9]/', '', $fm_id);
|
||||
|
||||
if ($w == "u")
|
||||
{
|
||||
$html_title .= ' 수정';
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 3.0 KiB After Width: | Height: | Size: 18 KiB |
@@ -1,4 +1,4 @@
|
||||
<?
|
||||
<?php
|
||||
$sub_menu = "200100";
|
||||
include_once("./_common.php");
|
||||
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
// 이메일인증 체크 필드추가
|
||||
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'] = "차단된 ";
|
||||
else $g5['title'] .= "";
|
||||
$g5['title'] .= '회원 '.$html_title;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<?
|
||||
<?php
|
||||
$sub_menu = "200100";
|
||||
include_once("./_common.php");
|
||||
|
||||
|
||||
+47
-3
@@ -43,13 +43,57 @@ $(function() {
|
||||
"./menu_form_search.php"
|
||||
);
|
||||
|
||||
$("#me_type").on("change", function() {
|
||||
var type = $(this).val();
|
||||
function link_checks_all_chage(){
|
||||
|
||||
var $links = $(opener.document).find("#menulist input[name='me_link[]']"),
|
||||
$o_link = $(".td_mngsmall input[name='link[]']"),
|
||||
hrefs = [],
|
||||
menu_exist = false;
|
||||
|
||||
if( $links.length ){
|
||||
$links.each(function( index ) {
|
||||
hrefs.push( $(this).val() );
|
||||
});
|
||||
|
||||
$o_link.each(function( index ) {
|
||||
if( $.inArray( $(this).val(), hrefs ) != -1 ){
|
||||
$(this).closest("tr").find("td:eq( 0 )").addClass("exist_menu_link");
|
||||
menu_exist = true;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
if( menu_exist ){
|
||||
$(".menu_exists_tip").show();
|
||||
} else {
|
||||
$(".menu_exists_tip").hide();
|
||||
}
|
||||
}
|
||||
|
||||
function menu_result_change( type ){
|
||||
|
||||
var dfd = new $.Deferred();
|
||||
|
||||
$("#menu_result").empty().load(
|
||||
"./menu_form_search.php",
|
||||
{ type : type }
|
||||
{ type : type },
|
||||
function(){
|
||||
dfd.resolve('Finished');
|
||||
}
|
||||
);
|
||||
|
||||
return dfd.promise();
|
||||
}
|
||||
|
||||
$("#me_type").on("change", function() {
|
||||
var type = $(this).val();
|
||||
|
||||
var promise = menu_result_change( type );
|
||||
|
||||
promise.done(function(message) {
|
||||
link_checks_all_chage(type);
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
$(document).on("click", "#add_manual", function() {
|
||||
|
||||
@@ -11,7 +11,7 @@ switch($type) {
|
||||
order by gr_order, gr_id ";
|
||||
break;
|
||||
case 'board':
|
||||
$sql = " select bo_table as id, bo_subject as subject
|
||||
$sql = " select bo_table as id, bo_subject as subject, gr_id
|
||||
from {$g5['board_table']}
|
||||
order by bo_order, bo_table ";
|
||||
break;
|
||||
@@ -32,13 +32,18 @@ if($sql) {
|
||||
|
||||
for($i=0; $row=sql_fetch_array($result); $i++) {
|
||||
if($i == 0) {
|
||||
|
||||
$bbs_subject_title = ($type == 'board') ? '게시판제목' : '제목';
|
||||
?>
|
||||
|
||||
<div class="tbl_head01 tbl_wrap">
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col">제목</th>
|
||||
<th scope="col"><?php echo $bbs_subject_title; ?></th>
|
||||
<?php if($type == 'board'){ ?>
|
||||
<th scope="col">게시판 그룹</th>
|
||||
<?php } ?>
|
||||
<th scope="col">선택</th>
|
||||
</tr>
|
||||
</thead>
|
||||
@@ -63,6 +68,12 @@ if($sql) {
|
||||
|
||||
<tr>
|
||||
<td><?php echo $row['subject']; ?></td>
|
||||
<?php
|
||||
if($type == 'board'){
|
||||
$group = get_call_func_cache('get_group', array($row['gr_id']));
|
||||
?>
|
||||
<td><?php echo $group['gr_subject']; ?></td>
|
||||
<?php } ?>
|
||||
<td class="td_mngsmall">
|
||||
<input type="hidden" name="subject[]" value="<?php echo preg_replace('/[\'\"]/', '', $row['subject']); ?>">
|
||||
<input type="hidden" name="link[]" value="<?php echo $link; ?>">
|
||||
@@ -76,6 +87,10 @@ if($sql) {
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="local_desc01 menu_exists_tip" style="display:none">
|
||||
<p>* <strong>빨간색</strong>의 제목은 이미 메뉴에 연결되어 경우 표시됩니다.</p>
|
||||
</div>
|
||||
|
||||
<div class="btn_win02 btn_win">
|
||||
<button type="button" class="btn_cancel" onclick="window.close();">창닫기</button>
|
||||
</div>
|
||||
|
||||
@@ -5,6 +5,8 @@ include_once(G5_EDITOR_LIB);
|
||||
|
||||
auth_check($auth[$sub_menu], "w");
|
||||
|
||||
$nw_id = preg_replace('/[^0-9]/', '', $nw_id);
|
||||
|
||||
$html_title = "팝업레이어";
|
||||
if ($w == "u")
|
||||
{
|
||||
|
||||
@@ -4,8 +4,8 @@ include_once('./_common.php');
|
||||
|
||||
auth_check($auth[$sub_menu], 'r');
|
||||
|
||||
if (empty($fr_date)) $fr_date = G5_TIME_YMD;
|
||||
if (empty($to_date)) $to_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) || ! 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}{&to_date}={$to_date}";
|
||||
|
||||
|
||||
@@ -8,6 +8,18 @@ auth_check($auth[$sub_menu], 'w');
|
||||
|
||||
check_admin_token();
|
||||
|
||||
$error_msg = '';
|
||||
|
||||
if( $qa_include_head && ! is_include_path_check($qa_include_head) ){
|
||||
$qa_include_head = '';
|
||||
$error_msg = '/data/file/ 또는 /data/editor/ 포함된 문자를 상단 파일 경로에 포함시킬수 없습니다.';
|
||||
}
|
||||
|
||||
if( $qa_include_tail && ! is_include_path_check($qa_include_tail) ){
|
||||
$qa_include_tail = '';
|
||||
$error_msg = '/data/file/ 또는 /data/editor/ 포함된 문자를 하단 파일 경로에 포함시킬수 없습니다.';
|
||||
}
|
||||
|
||||
$sql = " update {$g5['qa_config_table']}
|
||||
set qa_title = '{$_POST['qa_title']}',
|
||||
qa_category = '{$_POST['qa_category']}',
|
||||
@@ -29,8 +41,8 @@ $sql = " update {$g5['qa_config_table']}
|
||||
qa_image_width = '{$_POST['qa_image_width']}',
|
||||
qa_upload_size = '{$_POST['qa_upload_size']}',
|
||||
qa_insert_content = '{$_POST['qa_insert_content']}',
|
||||
qa_include_head = '{$_POST['qa_include_head']}',
|
||||
qa_include_tail = '{$_POST['qa_include_tail']}',
|
||||
qa_include_head = '{$qa_include_head}',
|
||||
qa_include_tail = '{$qa_include_tail}',
|
||||
qa_content_head = '{$_POST['qa_content_head']}',
|
||||
qa_content_tail = '{$_POST['qa_content_tail']}',
|
||||
qa_mobile_content_head = '{$_POST['qa_mobile_content_head']}',
|
||||
@@ -47,5 +59,9 @@ $sql = " update {$g5['qa_config_table']}
|
||||
qa_5 = '{$_POST['qa_5']}' ";
|
||||
sql_query($sql);
|
||||
|
||||
goto_url('./qa_config.php');
|
||||
if($error_msg){
|
||||
alert($error_msg, './qa_config.php');
|
||||
} else {
|
||||
goto_url('./qa_config.php');
|
||||
}
|
||||
?>
|
||||
@@ -12,5 +12,11 @@ if (!strstr($_SERVER['SCRIPT_NAME'], 'install.php')) {
|
||||
//$sms5 = sql_fetch("select * from ".$g5['sms5_config_table'] );
|
||||
}
|
||||
|
||||
$sv = isset($_REQUEST['sv']) ? get_search_string($_REQUEST['sv']) : '';
|
||||
|
||||
if( isset($token) ){
|
||||
$token = @htmlspecialchars(strip_tags($token), ENT_QUOTES);
|
||||
}
|
||||
|
||||
add_stylesheet('<link rel="stylesheet" href="'.G5_SMS5_ADMIN_URL.'/css/sms5.css">', 0);
|
||||
?>
|
||||
@@ -18,6 +18,9 @@ if (is_numeric($fg_no))
|
||||
else
|
||||
$sql_group = "";
|
||||
|
||||
$st = clean_xss_tags($st);
|
||||
$sv = clean_xss_tags($sv);
|
||||
|
||||
if ($st == 'all') {
|
||||
$sql_search = "and (fo_name like '%{$sv}%' or fo_content like '%{$sv}%')";
|
||||
} else if ($st == 'name') {
|
||||
@@ -60,7 +63,7 @@ function book_all_checked(chk)
|
||||
function book_del(fo_no)
|
||||
{
|
||||
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)
|
||||
@@ -127,7 +130,7 @@ function multi_update(sel)
|
||||
<option value="content"<?php echo get_selected('content', $st); ?>>이모티콘</option>
|
||||
</select>
|
||||
<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">
|
||||
</form>
|
||||
</div>
|
||||
@@ -181,7 +184,7 @@ function multi_update(sel)
|
||||
<span class="sound_only">등록 </span><?php echo date('Y-m-d', strtotime($res['fo_datetime']))?>
|
||||
</div>
|
||||
<div class="li_cmd">
|
||||
<a href="./form_write.php?w=u&fo_no=<?php echo $res['fo_no']?>&page=<?php echo $page;?>&fg_no=<?php echo $fg_no;?>&st=<?php echo $st;?>&sv=<?php echo $sv;?>">수정</a>
|
||||
<a href="./form_write.php?w=u&fo_no=<?php echo $res['fo_no']?>&page=<?php echo $page;?>&fg_no=<?php echo $fg_no;?>&st=<?php echo get_text($st);?>&sv=<?php echo get_text($sv);?>">수정</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>
|
||||
</div>
|
||||
|
||||
+2
-2
@@ -5,8 +5,8 @@ include_once(G5_LIB_PATH.'/visit.lib.php');
|
||||
include_once('./admin.head.php');
|
||||
include_once(G5_PLUGIN_PATH.'/jquery-ui/datepicker.php');
|
||||
|
||||
if (empty($fr_date)) $fr_date = G5_TIME_YMD;
|
||||
if (empty($to_date)) $to_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) || ! 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."&to_date=".$to_date;
|
||||
$query_string = $qstr ? '?'.$qstr : '';
|
||||
|
||||
@@ -71,6 +71,7 @@ for ($i=0; $row=sql_fetch_array($result); $i++) {
|
||||
</tr>
|
||||
|
||||
<?php
|
||||
$i++;
|
||||
}
|
||||
} else {
|
||||
echo '<tr><td colspan="'.$colspan.'" class="empty_table">자료가 없습니다.</td></tr>';
|
||||
|
||||
@@ -72,6 +72,7 @@ for ($i=0; $row=sql_fetch_array($result); $i++) {
|
||||
</tr>
|
||||
|
||||
<?php
|
||||
$i++;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -44,7 +44,7 @@ $listall = '<a href="'.$_SERVER['SCRIPT_NAME'].'">처음</a>'; //페이지 처
|
||||
<?php
|
||||
$sql_common = " from {$g5['visit_table']} ";
|
||||
if ($sfl) {
|
||||
if($sst=='vi_ip' || $sst=='vi_date'){
|
||||
if($sfl=='vi_ip' || $sfl=='vi_date'){
|
||||
$sql_search = " where $sfl like '$stx%' ";
|
||||
}else{
|
||||
$sql_search = " where $sfl like '%$stx%' ";
|
||||
|
||||
+8
-8
@@ -14,7 +14,7 @@ add_javascript('<script src="'.G5_PLUGIN_URL.'/jqplot/plugins/jqplot.categoryAxi
|
||||
add_javascript('<script src="'.G5_PLUGIN_URL.'/jqplot/plugins/jqplot.pointLabels.min.js"></script>', 0);
|
||||
add_javascript('<!--[if lt IE 9]><script src="'.G5_PLUGIN_URL.'/jqplot/excanvas.js"></script><![endif]-->', 0);
|
||||
|
||||
if (!($graph == 'line' || $graph == 'bar'))
|
||||
if (!($graph == 'line' || $graph == 'bar'))
|
||||
$graph = 'line';
|
||||
|
||||
if ($graph == 'bar') {
|
||||
@@ -49,7 +49,7 @@ foreach($period_array as $key=>$value) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (!$is_period)
|
||||
if (!$is_period)
|
||||
$period = '오늘';
|
||||
|
||||
$day = $period_array[$period][0];
|
||||
@@ -64,15 +64,15 @@ if ($period == '오늘') {
|
||||
$from = $yesterday;
|
||||
$to = $from;
|
||||
} else if ($period == '내일') {
|
||||
$from = date('Y-m-d', G5_SERVER_TIME + (86400 * 2));
|
||||
$from = date('Y-m-d', G5_SERVER_TIME + (86400 * 2));
|
||||
$to = $from;
|
||||
} else {
|
||||
$from = date('Y-m-d', G5_SERVER_TIME - (86400 * $period_array[$period][1]));
|
||||
$from = date('Y-m-d', G5_SERVER_TIME - (86400 * $period_array[$period][1]));
|
||||
$to = $yesterday;
|
||||
}
|
||||
|
||||
$sql_bo_table = '';
|
||||
if ($bo_table)
|
||||
if ($bo_table)
|
||||
$sql_bo_table = "and bo_table = '$bo_table'";
|
||||
|
||||
switch ($day) {
|
||||
@@ -130,7 +130,7 @@ switch ($day) {
|
||||
<form>
|
||||
<select name="bo_table">
|
||||
<option value="">전체게시판</a>
|
||||
<?php
|
||||
<?php
|
||||
$sql = " select bo_table, bo_subject from {$g5['board_table']} order by bo_count_write desc ";
|
||||
$result = sql_query($sql);
|
||||
for($i=0; $row=sql_fetch_array($result); $i++) {
|
||||
@@ -179,7 +179,7 @@ $(document).ready(function(){
|
||||
var line1 = [<?php echo implode($line1, ','); ?>];
|
||||
var line2 = [<?php echo implode($line2, ','); ?>];
|
||||
var plot1 = $.jqplot ('chart1', [line1, line2], {
|
||||
seriesDefaults: {
|
||||
seriesDefaults: {
|
||||
<?php if ($graph == 'bar') { ?>
|
||||
renderer:$.jqplot.BarRenderer,
|
||||
<?php } ?>
|
||||
@@ -205,6 +205,6 @@ $(document).ready(function(){
|
||||
}
|
||||
?>
|
||||
|
||||
<?
|
||||
<?php
|
||||
include_once ('./admin.tail.php');
|
||||
?>
|
||||
@@ -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
@@ -7,7 +7,11 @@ if (G5_IS_MOBILE) {
|
||||
include_once(G5_BBS_PATH.'/_head.php');
|
||||
echo stripslashes($board['bo_mobile_content_head']);
|
||||
} else {
|
||||
@include ($board['bo_include_head']);
|
||||
if(is_include_path_check($board['bo_include_head'])) { //파일경로 체크
|
||||
@include ($board['bo_include_head']);
|
||||
} else { //파일경로가 올바르지 않으면 기본파일을 가져옴
|
||||
include_once(G5_BBS_PATH.'/_head.php');
|
||||
}
|
||||
echo stripslashes($board['bo_content_head']);
|
||||
}
|
||||
?>
|
||||
+5
-1
@@ -8,6 +8,10 @@ if (G5_IS_MOBILE) {
|
||||
include_once(G5_BBS_PATH.'/_tail.php');
|
||||
} else {
|
||||
echo stripslashes($board['bo_content_tail']);
|
||||
@include ($board['bo_include_tail']);
|
||||
if(is_include_path_check($board['bo_include_tail'])) { //파일경로 체크
|
||||
@include ($board['bo_include_tail']);
|
||||
} else { //파일경로가 올바르지 않으면 기본파일을 가져옴
|
||||
include_once(G5_BBS_PATH.'/_tail.php');
|
||||
}
|
||||
}
|
||||
?>
|
||||
+2
-2
@@ -19,7 +19,7 @@ if (!$co['co_id'])
|
||||
|
||||
$g5['title'] = $co['co_subject'];
|
||||
|
||||
if ($co['co_include_head'])
|
||||
if (is_include_path_check($co['co_include_head']))
|
||||
@include_once($co['co_include_head']);
|
||||
else
|
||||
include_once('./_head.php');
|
||||
@@ -85,7 +85,7 @@ if(is_file($skin_file)) {
|
||||
echo '<p>'.str_replace(G5_PATH.'/', '', $skin_file).'이 존재하지 않습니다.</p>';
|
||||
}
|
||||
|
||||
if ($co['co_include_tail'])
|
||||
if (is_include_path_check($co['co_include_tail']))
|
||||
@include_once($co['co_include_tail']);
|
||||
else
|
||||
include_once('./_tail.php');
|
||||
|
||||
+5
-5
@@ -1,11 +1,11 @@
|
||||
<?php
|
||||
include_once('./_common.php');
|
||||
|
||||
if ($is_admin)
|
||||
{
|
||||
if (!($token && get_session('ss_delete_token') == $token))
|
||||
alert('토큰 에러로 삭제 불가합니다.');
|
||||
}
|
||||
$delete_token = get_session('ss_delete_token');
|
||||
set_session('ss_delete_token', '');
|
||||
|
||||
if (!($token && $delete_token == $token))
|
||||
alert('토큰 에러로 삭제 불가합니다.');
|
||||
|
||||
//$wr = sql_fetch(" select * from $write_table where wr_id = '$wr_id' ");
|
||||
|
||||
|
||||
@@ -2,11 +2,11 @@
|
||||
// 코멘트 삭제
|
||||
include_once('./_common.php');
|
||||
|
||||
if ($is_admin)
|
||||
{
|
||||
if (!($token && get_session("ss_delete_token") == $token))
|
||||
alert('토큰 에러로 삭제 불가합니다.');
|
||||
}
|
||||
$delete_comment_token = get_session('ss_delete_comment_'.$comment_id.'_token');
|
||||
set_session('ss_delete_comment_'.$comment_id.'_token', '');
|
||||
|
||||
if (!($token && $delete_comment_token == $token))
|
||||
alert('토큰 에러로 삭제 불가합니다.');
|
||||
|
||||
// 4.1
|
||||
@include_once($board_skin_path.'/delete_comment.head.skin.php');
|
||||
|
||||
+12
-3
@@ -1,20 +1,29 @@
|
||||
<?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);
|
||||
if (!$row['mb_id'])
|
||||
alert('존재하는 회원이 아닙니다.', G5_URL);
|
||||
|
||||
// 인증 링크는 한번만 처리가 되게 한다.
|
||||
sql_query(" update {$g5['member_table']} set mb_email_certify2 = '' where mb_id = '$mb_id' ");
|
||||
|
||||
if ($mb_md5)
|
||||
{
|
||||
$tmp_md5 = md5($row['mb_id'].$row['mb_email'].$row['mb_datetime']);
|
||||
if ($mb_md5 == $tmp_md5)
|
||||
if ($mb_md5 == $row['mb_email_certify2'])
|
||||
{
|
||||
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);
|
||||
}
|
||||
else
|
||||
{
|
||||
alert('메일인증 요청 정보가 올바르지 않습니다.', G5_URL);
|
||||
}
|
||||
}
|
||||
|
||||
alert('제대로 된 값이 넘어오지 않았습니다.', G5_URL);
|
||||
|
||||
+6
-3
@@ -28,14 +28,17 @@ if ($sendmail_count > 3)
|
||||
$g5['title'] = '메일 쓰기';
|
||||
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)
|
||||
alert_close('이메일이 올바르지 않습니다.');
|
||||
|
||||
$email = base64_encode($email);
|
||||
$email = $email_enc->encrypt($email);
|
||||
|
||||
if (!$name)
|
||||
$name = base64_decode($email);
|
||||
$name = $email;
|
||||
else
|
||||
$name = get_text(stripslashes($name), true);
|
||||
|
||||
|
||||
@@ -9,7 +9,8 @@ if (!$config['cf_email_use'])
|
||||
if (!$is_member && $config['cf_formmail_is_member'])
|
||||
alert_close('회원만 이용하실 수 있습니다.');
|
||||
|
||||
$to = base64_decode($to);
|
||||
$email_enc = new str_encrypt();
|
||||
$to = $email_enc->decrypt($to);
|
||||
|
||||
if (substr_count($to, "@") > 1)
|
||||
alert_close('한번에 한사람에게만 메일을 발송할 수 있습니다.');
|
||||
|
||||
@@ -19,6 +19,8 @@ $save_count_write = 0;
|
||||
$save_count_comment = 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 ";
|
||||
$result = sql_query($sql);
|
||||
while ($row = sql_fetch_array($result))
|
||||
|
||||
+4
-2
@@ -9,11 +9,13 @@ switch ($w) {
|
||||
$return_url = './board.php?bo_table='.$bo_table.'&wr_id='.$wr_id;
|
||||
break;
|
||||
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.'&wr_id='.$wr_id;
|
||||
break;
|
||||
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' ");
|
||||
$return_url = './board.php?bo_table='.$bo_table.'&wr_id='.$row['wr_parent'];
|
||||
break;
|
||||
|
||||
@@ -29,6 +29,10 @@ for($i=0; $i<$count; $i++) {
|
||||
if($is_admin != 'super' && $row['mb_id'] != $member['mb_id'])
|
||||
continue;
|
||||
|
||||
// 답변이 달린 글은 삭제못함
|
||||
if($is_admin != 'super' && !$row['qa_type'] && $row['qa_status'])
|
||||
continue;
|
||||
|
||||
// 첨부파일 삭제
|
||||
for($k=1; $k<=2; $k++) {
|
||||
@unlink(G5_DATA_PATH.'/qa/'.$row['qa_file'.$k]);
|
||||
|
||||
+1
-1
@@ -9,7 +9,7 @@ if (G5_IS_MOBILE) {
|
||||
include_once('./_head.php');
|
||||
echo conv_content($qaconfig['qa_mobile_content_head'], 1);
|
||||
} else {
|
||||
if($qaconfig['qa_include_head'])
|
||||
if(is_include_path_check($qaconfig['qa_include_head']))
|
||||
@include ($qaconfig['qa_include_head']);
|
||||
else
|
||||
include ('./_head.php');
|
||||
|
||||
+1
-1
@@ -7,7 +7,7 @@ if (G5_IS_MOBILE) {
|
||||
include_once('./_tail.php');
|
||||
} else {
|
||||
echo conv_content($qaconfig['qa_content_tail'], 1);
|
||||
if($qaconfig['qa_include_tail'])
|
||||
if(is_include_path_check($qaconfig['qa_include_tail']))
|
||||
@include ($qaconfig['qa_include_tail']);
|
||||
else
|
||||
include ('./_tail.php');
|
||||
|
||||
+26
-7
@@ -15,16 +15,23 @@ $msg = array();
|
||||
// 1:1문의 설정값
|
||||
$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 체크
|
||||
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']));
|
||||
|
||||
if($qaconfig['qa_req_email'] && !$qa_email)
|
||||
$msg[] = '이메일을 입력하세요.';
|
||||
|
||||
if (!preg_match("/([0-9a-zA-Z_-]+)@([0-9a-zA-Z_-]+)\.([0-9a-zA-Z_-]+)/", $qa_email))
|
||||
$msg[] = '이메일 주소가 형식에 맞지 않습니다.';
|
||||
}
|
||||
if($w != 'a' && $qaconfig['qa_req_email'] && !$qa_email)
|
||||
$msg[] = '이메일을 입력하세요.';
|
||||
|
||||
$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);
|
||||
@chmod(G5_DATA_PATH.'/qa', G5_DIR_PERMISSION);
|
||||
|
||||
@@ -9,7 +9,7 @@ $mb_email = get_email_address(trim($_POST['mb_email']));
|
||||
if(!$mb_id || !$mb_email)
|
||||
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);
|
||||
if (!$mb) {
|
||||
alert("이미 메일인증 하신 회원입니다.", G5_URL);
|
||||
@@ -29,8 +29,12 @@ if ($row['cnt']) {
|
||||
$subject = '['.$config['cf_title'].'] 인증확인 메일입니다.';
|
||||
|
||||
$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.'&mb_md5='.$mb_md5;
|
||||
|
||||
ob_start();
|
||||
|
||||
@@ -253,8 +253,12 @@ if ($w == '') {
|
||||
if ($config['cf_email_mb_member']) {
|
||||
$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.'&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.'&mb_md5='.$mb_md5;
|
||||
}
|
||||
|
||||
ob_start();
|
||||
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) {
|
||||
$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.'&mb_md5='.$mb_md5;
|
||||
|
||||
ob_start();
|
||||
@@ -405,7 +412,7 @@ if ($config['cf_use_email_certify'] && $old_email != $mb_email) {
|
||||
$content = ob_get_contents();
|
||||
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);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -10,6 +10,10 @@ if (!$is_member)
|
||||
exit;
|
||||
}
|
||||
|
||||
// 게시글 존재하는지
|
||||
if(!$write['wr_id'])
|
||||
alert_close('스크랩하시려는 게시글이 존재하지 않습니다.');
|
||||
|
||||
$sql = " select count(*) as cnt from {$g5['scrap_table']}
|
||||
where mb_id = '{$member['mb_id']}'
|
||||
and bo_table = '$bo_table'
|
||||
|
||||
+2
-6
@@ -72,12 +72,8 @@ $update_href = $delete_href = '';
|
||||
// 로그인중이고 자신의 글이라면 또는 관리자라면 비밀번호를 묻지 않고 바로 수정, 삭제 가능
|
||||
if (($member['mb_id'] && ($member['mb_id'] == $write['mb_id'])) || $is_admin) {
|
||||
$update_href = './write.php?w=u&bo_table='.$bo_table.'&wr_id='.$wr_id.'&page='.$page.$qstr;
|
||||
$delete_href = './delete.php?bo_table='.$bo_table.'&wr_id='.$wr_id.'&page='.$page.urldecode($qstr);
|
||||
if ($is_admin)
|
||||
{
|
||||
set_session("ss_delete_token", $token = uniqid(time()));
|
||||
$delete_href ='./delete.php?bo_table='.$bo_table.'&wr_id='.$wr_id.'&token='.$token.'&page='.$page.urldecode($qstr);
|
||||
}
|
||||
set_session('ss_delete_token', $token = uniqid(time()));
|
||||
$delete_href ='./delete.php?bo_table='.$bo_table.'&wr_id='.$wr_id.'&token='.$token.'&page='.$page.urldecode($qstr);
|
||||
}
|
||||
else if (!$write['mb_id']) { // 회원이 쓴 글이 아니라면
|
||||
$update_href = './password.php?w=u&bo_table='.$bo_table.'&wr_id='.$wr_id.'&page='.$page.$qstr;
|
||||
|
||||
@@ -9,11 +9,6 @@ if ($is_guest && $board['bo_comment_level'] < 2) {
|
||||
|
||||
@include_once($board_skin_path.'/view_comment.head.skin.php');
|
||||
|
||||
// 코멘트를 새창으로 여는 경우 세션값이 없으므로 생성한다.
|
||||
if ($is_admin && !$token) {
|
||||
set_session("ss_delete_token", $token = uniqid(time()));
|
||||
}
|
||||
|
||||
$list = array();
|
||||
|
||||
$is_comment_write = false;
|
||||
@@ -72,10 +67,13 @@ for ($i=0; $row=sql_fetch_array($result); $i++)
|
||||
$list[$i]['is_del'] = false;
|
||||
if ($is_comment_write || $is_admin)
|
||||
{
|
||||
$token = '';
|
||||
|
||||
if ($member['mb_id'])
|
||||
{
|
||||
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.'&comment_id='.$row['wr_id'].'&token='.$token.'&page='.$page.$qstr;
|
||||
$list[$i]['is_edit'] = true;
|
||||
$list[$i]['is_del'] = true;
|
||||
|
||||
@@ -337,6 +337,8 @@ if ($w == '') {
|
||||
}
|
||||
|
||||
$file = get_file($bo_table, $wr_id);
|
||||
if($file_count < $file['count'])
|
||||
$file_count = $file['count'];
|
||||
} else if ($w == 'r') {
|
||||
if (strstr($write['wr_option'], 'secret')) {
|
||||
$is_secret = true;
|
||||
|
||||
@@ -3,6 +3,12 @@ define('G5_CAPTCHA', true);
|
||||
include_once('./_common.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
|
||||
if (substr_count($wr_content, "&#") > 50) {
|
||||
alert('내용에 올바르지 않은 코드가 다수 포함되어 있습니다.');
|
||||
@@ -77,12 +83,15 @@ if ($w == 'c') // 댓글 입력
|
||||
// 댓글 답변
|
||||
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' ";
|
||||
$reply_array = sql_fetch($sql);
|
||||
if (!$reply_array['wr_id'])
|
||||
alert('답변할 댓글이 없습니다.\\n\\n답변하는 동안 댓글이 삭제되었을 수 있습니다.');
|
||||
|
||||
if($wr['wr_parent'] != $reply_array['wr_parent'])
|
||||
alert('댓글을 등록할 수 없습니다.');
|
||||
|
||||
$tmp_comment = $reply_array['wr_comment'];
|
||||
|
||||
if (strlen($reply_array['wr_comment_reply']) == 5)
|
||||
|
||||
@@ -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
@@ -3,6 +3,9 @@ include_once('./_common.php');
|
||||
include_once(G5_LIB_PATH.'/naver_syndi.lib.php');
|
||||
include_once(G5_CAPTCHA_PATH.'/captcha.lib.php');
|
||||
|
||||
// 토큰체크
|
||||
check_write_token($bo_table);
|
||||
|
||||
$g5['title'] = '게시글 저장';
|
||||
|
||||
$msg = array();
|
||||
@@ -15,7 +18,12 @@ if($board['bo_use_category']) {
|
||||
$categories = array_map('trim', explode("|", $board['bo_category_list'].($is_admin ? '|공지' : '')));
|
||||
if(!empty($categories) && !in_array($ca_name, $categories))
|
||||
$msg[] = '분류를 올바르게 입력하세요.';
|
||||
|
||||
if(empty($categories))
|
||||
$ca_name = '';
|
||||
}
|
||||
} else {
|
||||
$ca_name = '';
|
||||
}
|
||||
|
||||
$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('비밀글 미사용 게시판 이므로 비밀글로 등록할 수 없습니다.');
|
||||
}
|
||||
|
||||
$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) {
|
||||
$secret = 'secret';
|
||||
@@ -88,12 +102,14 @@ if (!$is_admin && $board['bo_use_secret'] == 2) {
|
||||
|
||||
$html = '';
|
||||
if (isset($_POST['html']) && $_POST['html']) {
|
||||
$html = $_POST['html'];
|
||||
if(preg_match('#html(1|2)#', strtolower($_POST['html']), $matches))
|
||||
$html = $matches[0];
|
||||
}
|
||||
|
||||
$mail = '';
|
||||
if (isset($_POST['mail']) && $_POST['mail']) {
|
||||
$mail = $_POST['mail'];
|
||||
if(preg_match('#mail#', strtolower($_POST['mail']), $matches))
|
||||
$mail = $matches[0];
|
||||
}
|
||||
|
||||
$notice = '';
|
||||
@@ -402,6 +418,24 @@ if (!$group['gr_use_access'] && $board['bo_read_level'] < 2 && !$secret) {
|
||||
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);
|
||||
@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);
|
||||
|
||||
if ($file_upload_msg)
|
||||
alert($file_upload_msg, G5_HTTP_BBS_URL.'/board.php?bo_table='.$bo_table.'&wr_id='.$wr_id.'&page='.$page.$qstr);
|
||||
alert($file_upload_msg, G5_HTTP_BBS_URL.'/board.php?bo_table='.$bo_table.'&wr_id='.$wr_id.$qstr);
|
||||
else
|
||||
goto_url(G5_HTTP_BBS_URL.'/board.php?bo_table='.$bo_table.'&wr_id='.$wr_id.$qstr);
|
||||
?>
|
||||
|
||||
+8
-6
@@ -32,13 +32,15 @@ function g5_path()
|
||||
$result['path'] = str_replace('\\', '/', dirname(__FILE__));
|
||||
$tilde_remove = preg_replace('/^\/\~[^\/]+(.*)$/', '$1', $_SERVER['SCRIPT_NAME']);
|
||||
$document_root = str_replace($tilde_remove, '', $_SERVER['SCRIPT_FILENAME']);
|
||||
$root = str_replace($document_root, '', $result['path']);
|
||||
$pattern = '/' . preg_quote($document_root, '/') . '/i';
|
||||
$root = preg_replace($pattern, '', $result['path']);
|
||||
$port = $_SERVER['SERVER_PORT'] != 80 ? ':'.$_SERVER['SERVER_PORT'] : '';
|
||||
$http = 'http' . ((isset($_SERVER['HTTPS']) && $_SERVER['HTTPS']=='on') ? 's' : '') . '://';
|
||||
$user = str_replace(str_replace($document_root, '', $_SERVER['SCRIPT_FILENAME']), '', $_SERVER['SCRIPT_NAME']);
|
||||
$user = str_replace(preg_replace($pattern, '', $_SERVER['SCRIPT_FILENAME']), '', $_SERVER['SCRIPT_NAME']);
|
||||
$host = isset($_SERVER['HTTP_HOST']) ? $_SERVER['HTTP_HOST'] : $_SERVER['SERVER_NAME'];
|
||||
if(isset($_SERVER['HTTP_HOST']) && preg_match('/:[0-9]+$/', $host))
|
||||
$host = preg_replace('/:[0-9]+$/', '', $host);
|
||||
$host = preg_replace("/[\<\>\'\"\\\'\\\"\%\=\(\)\/\^\*]/", '', $host);
|
||||
$result['url'] = $http.$host.$port.$user.$root;
|
||||
return $result;
|
||||
}
|
||||
@@ -228,7 +230,7 @@ $qstr = '';
|
||||
if (isset($_REQUEST['sca'])) {
|
||||
$sca = clean_xss_tags(trim($_REQUEST['sca']));
|
||||
if ($sca) {
|
||||
$sca = preg_replace("/[\<\>\'\"\\\'\\\"\%\=\(\)]/", "", $sca);
|
||||
$sca = preg_replace("/[\<\>\'\"\\\'\\\"\%\=\(\)\/\^\*]/", "", $sca);
|
||||
$qstr .= '&sca=' . urlencode($sca);
|
||||
}
|
||||
} else {
|
||||
@@ -237,7 +239,7 @@ if (isset($_REQUEST['sca'])) {
|
||||
|
||||
if (isset($_REQUEST['sfl'])) {
|
||||
$sfl = trim($_REQUEST['sfl']);
|
||||
$sfl = preg_replace("/[\<\>\'\"\\\'\\\"\%\=\(\)\s]/", "", $sfl);
|
||||
$sfl = preg_replace("/[\<\>\'\"\\\'\\\"\%\=\(\)\/\^\*\s]/", "", $sfl);
|
||||
if ($sfl)
|
||||
$qstr .= '&sfl=' . urlencode($sfl); // search field (검색 필드)
|
||||
} else {
|
||||
@@ -255,7 +257,7 @@ if (isset($_REQUEST['stx'])) { // search text (검색어)
|
||||
|
||||
if (isset($_REQUEST['sst'])) {
|
||||
$sst = trim($_REQUEST['sst']);
|
||||
$sst = preg_replace("/[\<\>\'\"\\\'\\\"\%\=\(\)\s]/", "", $sst);
|
||||
$sst = preg_replace("/[\<\>\'\"\\\'\\\"\%\=\(\)\/\^\*\s]/", "", $sst);
|
||||
if ($sst)
|
||||
$qstr .= '&sst=' . urlencode($sst); // search sort (검색 정렬 필드)
|
||||
} else {
|
||||
@@ -369,7 +371,7 @@ if ($_SESSION['ss_mb_id']) { // 로그인중이라면
|
||||
$key = md5($_SERVER['SERVER_ADDR'] . $_SERVER['REMOTE_ADDR'] . $_SERVER['HTTP_USER_AGENT'] . $row['mb_password']);
|
||||
// 쿠키에 저장된 키와 같다면
|
||||
$tmp_key = get_cookie('ck_auto');
|
||||
if ($tmp_key == $key && $tmp_key) {
|
||||
if ($tmp_key === $key && $tmp_key) {
|
||||
// 차단, 탈퇴가 아니고 메일인증이 사용이면서 인증을 받았다면
|
||||
if ($row['mb_intercept_date'] == '' &&
|
||||
$row['mb_leave_date'] == '' &&
|
||||
|
||||
+1
-1
@@ -5,7 +5,7 @@
|
||||
********************/
|
||||
|
||||
define('G5_VERSION', '그누보드5');
|
||||
define('G5_GNUBOARD_VER', '5.1.14');
|
||||
define('G5_GNUBOARD_VER', '5.2.8');
|
||||
|
||||
// 이 상수가 정의되지 않으면 각각의 개별 페이지는 별도로 실행될 수 없음
|
||||
define('_GNUBOARD_', true);
|
||||
|
||||
@@ -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 압축률
|
||||
?>
|
||||
@@ -0,0 +1,6 @@
|
||||
<?php
|
||||
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
|
||||
|
||||
define('G5_JS_VER', '161020');
|
||||
define('G5_CSS_VER', '161020');
|
||||
?>
|
||||
@@ -28,6 +28,8 @@ $g4_config_file = trim($_POST['file_path']);
|
||||
if(!$g4_config_file)
|
||||
alert('config.php 파일의 경로를 입력해 주십시오.');
|
||||
|
||||
$g4_config_file = preg_replace('#/config.php$#i', '', $g4_config_file).'/config.php';
|
||||
|
||||
if(!is_file($g4_config_file))
|
||||
alert('입력하신 경로에 config.php 파일이 존재하지 않습니다.');
|
||||
|
||||
|
||||
+6
-6
@@ -45,7 +45,7 @@ if (G5_IS_MOBILE) {
|
||||
echo '<meta name="format-detection" content="telephone=no">'.PHP_EOL;
|
||||
} else {
|
||||
echo '<meta http-equiv="imagetoolbar" content="no">'.PHP_EOL;
|
||||
echo '<meta http-equiv="X-UA-Compatible" content="IE=10,chrome=1">'.PHP_EOL;
|
||||
echo '<meta http-equiv="X-UA-Compatible" content="IE=Edge">'.PHP_EOL;
|
||||
}
|
||||
|
||||
if($config['cf_add_meta'])
|
||||
@@ -55,9 +55,9 @@ if($config['cf_add_meta'])
|
||||
<?php
|
||||
if (defined('G5_IS_ADMIN')) {
|
||||
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 {
|
||||
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]>
|
||||
@@ -79,9 +79,9 @@ var g5_admin_url = "<?php echo G5_ADMIN_URL; ?>";
|
||||
<?php } ?>
|
||||
</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 ?>/common.js"></script>
|
||||
<script src="<?php echo G5_JS_URL ?>/wrest.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?ver=<?php echo G5_JS_VER; ?>"></script>
|
||||
<script src="<?php echo G5_JS_URL ?>/wrest.js?ver=<?php echo G5_JS_VER; ?>"></script>
|
||||
<?php
|
||||
if(G5_IS_MOBILE) {
|
||||
echo '<script src="'.G5_JS_URL.'/modernizr.custom.70111.js"></script>'.PHP_EOL; // overflow scroll 감지
|
||||
|
||||
@@ -463,7 +463,8 @@ CREATE TABLE IF NOT EXISTS `g5_member` (
|
||||
`mb_ip` varchar(255) NOT NULL default '',
|
||||
`mb_leave_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_lost_certify` varchar(255) NOT NULL,
|
||||
`mb_mailling` tinyint(4) NOT NULL default '0',
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
<?php
|
||||
@header('Content-Type: text/html; charset=utf-8');
|
||||
@header('X-Robots-Tag: noindex');
|
||||
include_once ('../config.php');
|
||||
$title = G5_VERSION." 라이센스 확인 1/3";
|
||||
include_once ('./install.inc.php');
|
||||
|
||||
@@ -5,6 +5,8 @@ header('Last-Modified: ' . $gmnow);
|
||||
header('Cache-Control: no-store, no-cache, must-revalidate'); // HTTP/1.1
|
||||
header('Cache-Control: pre-check=0, post-check=0, max-age=0'); // HTTP/1.1
|
||||
header('Pragma: no-cache'); // HTTP/1.0
|
||||
@header('Content-Type: text/html; charset=utf-8');
|
||||
@header('X-Robots-Tag: noindex');
|
||||
|
||||
include_once ('../config.php');
|
||||
$title = G5_VERSION." 초기환경설정 2/3";
|
||||
|
||||
@@ -6,6 +6,8 @@ header('Last-Modified: ' . $gmnow);
|
||||
header('Cache-Control: no-store, no-cache, must-revalidate'); // HTTP/1.1
|
||||
header('Cache-Control: pre-check=0, post-check=0, max-age=0'); // HTTP/1.1
|
||||
header('Pragma: no-cache'); // HTTP/1.0
|
||||
@header('Content-Type: text/html; charset=utf-8');
|
||||
@header('X-Robots-Tag: noindex');
|
||||
|
||||
include_once ('../config.php');
|
||||
include_once ('../lib/common.lib.php');
|
||||
|
||||
+33
-8
@@ -13,16 +13,41 @@ function certify_win_open(type, url)
|
||||
}
|
||||
else if(type == 'kcp-hp')
|
||||
{
|
||||
var return_gubun;
|
||||
var width = 410;
|
||||
var height = 500;
|
||||
if($("input[name=veri_up_hash]").size() < 1)
|
||||
$("input[name=cert_no]").after('<input type="hidden" name="veri_up_hash" value="">');
|
||||
|
||||
var leftpos = screen.width / 2 - ( width / 2 );
|
||||
var toppos = screen.height / 2 - ( height / 2 );
|
||||
if( navigator.userAgent.indexOf("Android") > - 1 || navigator.userAgent.indexOf("iPhone") > - 1 )
|
||||
{
|
||||
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";
|
||||
var position = ",left=" + leftpos + ", top=" + toppos;
|
||||
var AUTH_POP = window.open(url,'auth_popup', winopts + position);
|
||||
$("#cert_info").append('<form name="form_temp" method="post">')
|
||||
.after('<iframe id="kcp_cert" name="kcp_cert" width="100%" height="700" frameborder="0" scrolling="no" style="display:none"></iframe>');
|
||||
}
|
||||
|
||||
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')
|
||||
{
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
/**
|
||||
* 댓글 수정 토큰
|
||||
**/
|
||||
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(){
|
||||
$(".win_point").click(function() {
|
||||
win_point(this.href);
|
||||
@@ -669,4 +689,53 @@ $(function(){
|
||||
return false;
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
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
@@ -628,7 +628,7 @@ function get_sql_search($search_ca_name, $search_field, $search_text, $search_op
|
||||
|
||||
// SQL Injection 방지
|
||||
// 필드값에 a-z A-Z 0-9 _ , | 이외의 값이 있다면 검색필드를 wr_subject 로 설정한다.
|
||||
$field[$k] = preg_match("/^[\w\,\|]+$/", $field[$k]) ? $field[$k] : "wr_subject";
|
||||
$field[$k] = preg_match("/^[\w\,\|]+$/", $field[$k]) ? strtolower($field[$k]) : "wr_subject";
|
||||
|
||||
$str .= $op2;
|
||||
switch ($field[$k]) {
|
||||
@@ -712,7 +712,7 @@ function get_member($mb_id, $fields='*')
|
||||
// 제목별로 컬럼 정렬하는 QUERY STRING
|
||||
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";
|
||||
if ($flag == 'asc')
|
||||
@@ -744,6 +744,7 @@ function subject_sort_link($col, $query_string='', $flag='asc')
|
||||
$arr_query[] = $q2;
|
||||
$arr_query[] = 'sfl='.$sfl;
|
||||
$arr_query[] = 'stx='.$stx;
|
||||
$arr_query[] = 'sca='.$sca;
|
||||
$arr_query[] = 'page='.$page;
|
||||
$qstr = implode("&", $arr_query);
|
||||
|
||||
@@ -1200,7 +1201,8 @@ function get_sideview($mb_id, $name='', $email='', $homepage='')
|
||||
global $g5;
|
||||
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));
|
||||
|
||||
$name = get_text($name, 0, true);
|
||||
@@ -2422,6 +2424,8 @@ class html_process {
|
||||
if(!trim($link[1]))
|
||||
continue;
|
||||
|
||||
$link[1] = preg_replace('#\.css([\'\"]?>)$#i', '.css?ver='.G5_CSS_VER.'$1', $link[1]);
|
||||
|
||||
$stylesheet .= PHP_EOL.$link[1];
|
||||
}
|
||||
}
|
||||
@@ -2446,6 +2450,8 @@ class html_process {
|
||||
if(!trim($js[1]))
|
||||
continue;
|
||||
|
||||
$js[1] = preg_replace('#\.js([\'\"]?>)$#i', '.js?ver='.G5_JS_VER.'$1', $js[1]);
|
||||
|
||||
$javascript .= $php_eol.$js[1];
|
||||
$php_eol = PHP_EOL;
|
||||
}
|
||||
@@ -2463,7 +2469,10 @@ class html_process {
|
||||
<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;
|
||||
}
|
||||
@@ -2980,6 +2989,11 @@ function check_url_host($url, $msg='', $return_url=G5_URL)
|
||||
$p = @parse_url($url);
|
||||
$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 ($p['host'].(isset($p['port']) ? ':'.$p['port'] : '') != $_SERVER['HTTP_HOST']) {
|
||||
if ($p['host'] != $host) {
|
||||
@@ -3173,4 +3187,144 @@ function check_vaild_callback($callback){
|
||||
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
@@ -4,7 +4,7 @@ if (!defined('_GNUBOARD_')) exit;
|
||||
@ini_set('memory_limit', '-1');
|
||||
|
||||
// 게시글리스트 썸네일 생성
|
||||
function get_list_thumbnail($bo_table, $wr_id, $thumb_width, $thumb_height, $is_create=false, $is_crop=true, $crop_mode='center', $is_sharpen=false, $um_value='80/0.5/3')
|
||||
function get_list_thumbnail($bo_table, $wr_id, $thumb_width, $thumb_height, $is_create=false, $is_crop=false, $crop_mode='center', $is_sharpen=false, $um_value='80/0.5/3')
|
||||
{
|
||||
global $g5, $config;
|
||||
$filename = $alt = "";
|
||||
@@ -238,10 +238,10 @@ function thumbnail($filename, $source_path, $target_path, $thumb_width, $thumb_h
|
||||
$degree = 0;
|
||||
|
||||
if ($size[2] == 1) {
|
||||
$src = imagecreatefromgif($source_file);
|
||||
$src_transparency = imagecolortransparent($src);
|
||||
$src = @imagecreatefromgif($source_file);
|
||||
$src_transparency = @imagecolortransparent($src);
|
||||
} else if ($size[2] == 2) {
|
||||
$src = imagecreatefromjpeg($source_file);
|
||||
$src = @imagecreatefromjpeg($source_file);
|
||||
|
||||
if(function_exists('exif_read_data')) {
|
||||
// exif 정보를 기준으로 회전각도 구함
|
||||
@@ -273,8 +273,8 @@ function thumbnail($filename, $source_path, $target_path, $thumb_width, $thumb_h
|
||||
}
|
||||
}
|
||||
} else if ($size[2] == 3) {
|
||||
$src = imagecreatefrompng($source_file);
|
||||
imagealphablending($src, true);
|
||||
$src = @imagecreatefrompng($source_file);
|
||||
@imagealphablending($src, true);
|
||||
} else {
|
||||
return;
|
||||
}
|
||||
@@ -330,20 +330,52 @@ function thumbnail($filename, $source_path, $target_path, $thumb_width, $thumb_h
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
$dst = imagecreatetruecolor($dst_w, $dst_h);
|
||||
$dst = imagecreatetruecolor($dst_w, $dst_h);
|
||||
|
||||
if($size[2] == 3) {
|
||||
imagealphablending($dst, false);
|
||||
imagesavealpha($dst, true);
|
||||
} else if($size[2] == 1) {
|
||||
$palletsize = imagecolorstotal($src);
|
||||
if($src_transparency >= 0 && $src_transparency < $palletsize) {
|
||||
$transparent_color = imagecolorsforindex($src, $src_transparency);
|
||||
$current_transparent = imagecolorallocate($dst, $transparent_color['red'], $transparent_color['green'], $transparent_color['blue']);
|
||||
imagefill($dst, 0, 0, $current_transparent);
|
||||
imagecolortransparent($dst, $current_transparent);
|
||||
if($size[2] == 3) {
|
||||
imagealphablending($dst, false);
|
||||
imagesavealpha($dst, true);
|
||||
} else if($size[2] == 1) {
|
||||
$palletsize = imagecolorstotal($src);
|
||||
if($src_transparency >= 0 && $src_transparency < $palletsize) {
|
||||
$transparent_color = imagecolorsforindex($src, $src_transparency);
|
||||
$current_transparent = imagecolorallocate($dst, $transparent_color['red'], $transparent_color['green'], $transparent_color['blue']);
|
||||
imagefill($dst, 0, 0, $current_transparent);
|
||||
imagecolortransparent($dst, $current_transparent);
|
||||
}
|
||||
}
|
||||
} else { // 비율에 맞게 생성
|
||||
$dst = imagecreatetruecolor($dst_w, $dst_h);
|
||||
$bgcolor = imagecolorallocate($dst, 255, 255, 255); // 배경색
|
||||
|
||||
if($src_w > $src_h) {
|
||||
$tmp_h = round(($dst_w * $src_h) / $src_w);
|
||||
$dst_y = round(($dst_h - $tmp_h) / 2);
|
||||
$dst_h = $tmp_h;
|
||||
} else {
|
||||
$tmp_w = round(($dst_h * $src_w) / $src_h);
|
||||
$dst_x = round(($dst_w - $tmp_w) / 2);
|
||||
$dst_w = $tmp_w;
|
||||
}
|
||||
|
||||
if($size[2] == 3) {
|
||||
$bgcolor = imagecolorallocatealpha($dst, 0, 0, 0, 127);
|
||||
imagefill($dst, 0, 0, $bgcolor);
|
||||
imagealphablending($dst, false);
|
||||
imagesavealpha($dst, true);
|
||||
} else if($size[2] == 1) {
|
||||
$palletsize = imagecolorstotal($src);
|
||||
if($src_transparency >= 0 && $src_transparency < $palletsize) {
|
||||
$transparent_color = imagecolorsforindex($src, $src_transparency);
|
||||
$current_transparent = imagecolorallocate($dst, $transparent_color['red'], $transparent_color['green'], $transparent_color['blue']);
|
||||
imagefill($dst, 0, 0, $current_transparent);
|
||||
imagecolortransparent($dst, $current_transparent);
|
||||
} else {
|
||||
imagefill($dst, 0, 0, $bgcolor);
|
||||
}
|
||||
} else {
|
||||
imagefill($dst, 0, 0, $bgcolor);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
|
||||
@@ -250,6 +250,8 @@ var char_max = parseInt(<?php echo $comment_max ?>); // 최대
|
||||
|
||||
<?php if($is_guest) echo chk_captcha_js(); ?>
|
||||
|
||||
set_comment_token(f);
|
||||
|
||||
document.getElementById("btn_submit").disabled = "disabled";
|
||||
|
||||
return true;
|
||||
|
||||
@@ -250,6 +250,8 @@ var char_max = parseInt(<?php echo $comment_max ?>); // 최대
|
||||
|
||||
<?php if($is_guest) echo chk_captcha_js(); ?>
|
||||
|
||||
set_comment_token(f);
|
||||
|
||||
document.getElementById("btn_submit").disabled = "disabled";
|
||||
|
||||
return true;
|
||||
|
||||
@@ -77,7 +77,7 @@ if( count($faq_master_list) ){
|
||||
|
||||
<?php
|
||||
// 하단 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">
|
||||
|
||||
@@ -8,7 +8,7 @@ add_stylesheet('<link rel="stylesheet" href="'.$member_skin_url.'/style.css">',
|
||||
<div class="mbskin">
|
||||
<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'])) { ?>
|
||||
<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 } ?>
|
||||
|
||||
<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>
|
||||
<?php } ?>
|
||||
|
||||
<?php if ($config['cf_use_hp']) { ?>
|
||||
<?php if ($config['cf_use_hp'] || $config['cf_cert_hp']) { ?>
|
||||
<tr>
|
||||
<th scope="row"><label for="reg_mb_hp">휴대폰번호<?php if ($config['cf_req_hp']) { ?><strong class="sound_only">필수</strong><?php } ?></label></th>
|
||||
<td>
|
||||
|
||||
@@ -135,7 +135,8 @@
|
||||
#memo_list_ul {margin:0 20px;padding:0;border-top:1px solid #e9e9e9;list-style:none}
|
||||
#memo_list_ul li {position:relative;padding:10px 0;border-bottom:1px solid #e9e9e9}
|
||||
#memo_list_ul .memo_link {}
|
||||
#memo_list_ul .memo_send {position:absolute;top:10px;right:30px}
|
||||
#memo_list_ul .memo_send {display:block;margin-top:4px}
|
||||
#memo_list_ul .memo_send a{color:#777}
|
||||
#memo_list_ul .memo_read {font-size:0.95em;color:#666}
|
||||
#memo_list_ul .memo_del {position:absolute;top:10px;right:0}
|
||||
|
||||
|
||||
+1
-1
@@ -21,7 +21,7 @@ if(defined('G5_THEME_PATH')) {
|
||||
<div id="ft_copy">
|
||||
<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=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>
|
||||
</div>
|
||||
Copyright © <b>소유하신 도메인.</b> All rights reserved.<br>
|
||||
|
||||
@@ -1 +1 @@
|
||||
5.2.14
|
||||
5.2.22
|
||||
|
||||
@@ -31,7 +31,7 @@ class PHPMailer
|
||||
* The PHPMailer Version number.
|
||||
* @var string
|
||||
*/
|
||||
public $Version = '5.2.14';
|
||||
public $Version = '5.2.22';
|
||||
|
||||
/**
|
||||
* Email priority.
|
||||
@@ -201,6 +201,9 @@ class PHPMailer
|
||||
/**
|
||||
* An ID to be used in the Message-ID header.
|
||||
* 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
|
||||
*/
|
||||
public $MessageID = '';
|
||||
@@ -285,7 +288,7 @@ class PHPMailer
|
||||
|
||||
/**
|
||||
* 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
|
||||
*/
|
||||
public $AuthType = '';
|
||||
@@ -352,6 +355,7 @@ class PHPMailer
|
||||
/**
|
||||
* Whether to split multiple to addresses into multiple messages
|
||||
* or send them all in one message.
|
||||
* Only supported in `mail` and `sendmail` transports, not in SMTP.
|
||||
* @var boolean
|
||||
*/
|
||||
public $SingleTo = false;
|
||||
@@ -394,7 +398,7 @@ class PHPMailer
|
||||
|
||||
/**
|
||||
* 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
|
||||
*/
|
||||
public $DKIM_identity = '';
|
||||
@@ -419,6 +423,13 @@ class PHPMailer
|
||||
*/
|
||||
public $DKIM_private = '';
|
||||
|
||||
/**
|
||||
* DKIM private key string.
|
||||
* If set, takes precedence over `$DKIM_private`.
|
||||
* @var string
|
||||
*/
|
||||
public $DKIM_private_string = '';
|
||||
|
||||
/**
|
||||
* Callback Action function name.
|
||||
*
|
||||
@@ -446,6 +457,15 @@ class PHPMailer
|
||||
*/
|
||||
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.
|
||||
* @var SMTP
|
||||
@@ -634,9 +654,11 @@ class PHPMailer
|
||||
* Constructor.
|
||||
* @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()
|
||||
{
|
||||
//Close any open SMTP connection nicely
|
||||
if ($this->Mailer == 'smtp') {
|
||||
$this->smtpClose();
|
||||
}
|
||||
$this->smtpClose();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -671,14 +691,16 @@ class PHPMailer
|
||||
} else {
|
||||
$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);
|
||||
} else {
|
||||
$result = @mail($to, $subject, $body, $header, $params);
|
||||
}
|
||||
return $result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Output debugging info via user-defined method.
|
||||
* Only generates output if SMTP debug output is enabled (@see SMTP::$do_debug).
|
||||
@@ -713,7 +735,7 @@ class PHPMailer
|
||||
case 'echo':
|
||||
default:
|
||||
//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(
|
||||
"\n",
|
||||
"\n \t ",
|
||||
@@ -850,7 +872,7 @@ class PHPMailer
|
||||
$name = trim(preg_replace('/[\r\n]+/', '', $name)); //Strip breaks and trim
|
||||
if (($pos = strrpos($address, '@')) === false) {
|
||||
// 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->edebug($error_message);
|
||||
if ($this->exceptions) {
|
||||
@@ -900,7 +922,7 @@ class PHPMailer
|
||||
return false;
|
||||
}
|
||||
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->edebug($error_message);
|
||||
if ($this->exceptions) {
|
||||
@@ -994,7 +1016,7 @@ class PHPMailer
|
||||
if (($pos = strrpos($address, '@')) === false or
|
||||
(!$this->has8bitChars(substr($address, ++$pos)) or !$this->idnSupported()) and
|
||||
!$this->validateAddress($address)) {
|
||||
$error_message = $this->lang('invalid_address') . $address;
|
||||
$error_message = $this->lang('invalid_address') . " (setFrom) $address";
|
||||
$this->setError($error_message);
|
||||
$this->edebug($error_message);
|
||||
if ($this->exceptions) {
|
||||
@@ -1027,19 +1049,30 @@ class PHPMailer
|
||||
/**
|
||||
* Check that a string looks like an email address.
|
||||
* @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;
|
||||
* * `pcre8` Use the squiloople.com pattern, requires PCRE > 8.0, PHP >= 5.3.2, 5.2.14;
|
||||
* * `pcre` Use old PCRE implementation;
|
||||
* * `php` Use PHP built-in FILTER_VALIDATE_EMAIL;
|
||||
* * `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.
|
||||
* 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
|
||||
* @static
|
||||
* @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
|
||||
if (strpos($address, "\n") !== false or strpos($address, "\r") !== false) {
|
||||
return false;
|
||||
@@ -1216,7 +1249,7 @@ class PHPMailer
|
||||
}
|
||||
$this->$address_kind = $this->punyencodeAddress($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->edebug($error_message);
|
||||
if ($this->exceptions) {
|
||||
@@ -1227,7 +1260,7 @@ class PHPMailer
|
||||
}
|
||||
|
||||
// Set whether the message is multipart/alternative
|
||||
if (!empty($this->AltBody)) {
|
||||
if ($this->alternativeExists()) {
|
||||
$this->ContentType = 'multipart/alternative';
|
||||
}
|
||||
|
||||
@@ -1261,9 +1294,11 @@ class PHPMailer
|
||||
|
||||
// Sign with DKIM if enabled
|
||||
if (!empty($this->DKIM_domain)
|
||||
&& !empty($this->DKIM_private)
|
||||
&& !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(
|
||||
$this->MIMEHeader . $this->mailHeader,
|
||||
$this->encodeHeader($this->secureHeader($this->Subject)),
|
||||
@@ -1329,19 +1364,24 @@ class PHPMailer
|
||||
*/
|
||||
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') {
|
||||
$sendmail = sprintf('%s -f%s', escapeshellcmd($this->Sendmail), escapeshellarg($this->Sender));
|
||||
$sendmailFmt = '%s -f%s';
|
||||
} else {
|
||||
$sendmail = sprintf('%s -oi -f%s -t', escapeshellcmd($this->Sendmail), escapeshellarg($this->Sender));
|
||||
$sendmailFmt = '%s -oi -f%s -t';
|
||||
}
|
||||
} else {
|
||||
if ($this->Mailer == 'qmail') {
|
||||
$sendmail = sprintf('%s', escapeshellcmd($this->Sendmail));
|
||||
$sendmailFmt = '%s';
|
||||
} else {
|
||||
$sendmail = sprintf('%s -oi -t', escapeshellcmd($this->Sendmail));
|
||||
$sendmailFmt = '%s -oi -t';
|
||||
}
|
||||
}
|
||||
|
||||
// TODO: If possible, this should be changed to escapeshellarg. Needs thorough testing.
|
||||
$sendmail = sprintf($sendmailFmt, escapeshellcmd($this->Sendmail), $this->Sender);
|
||||
|
||||
if ($this->SingleTo) {
|
||||
foreach ($this->SingleToArray as $toAddr) {
|
||||
if (!@$mail = popen($sendmail, 'w')) {
|
||||
@@ -1387,6 +1427,40 @@ class PHPMailer
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Fix CVE-2016-10033 and CVE-2016-10045 by disallowing potentially unsafe shell characters.
|
||||
*
|
||||
* Note that escapeshellarg and escapeshellcmd are inadequate for our purposes, especially on Windows.
|
||||
* @param string $string The string to be validated
|
||||
* @see https://github.com/PHPMailer/PHPMailer/issues/924 CVE-2016-10045 bug report
|
||||
* @access protected
|
||||
* @return boolean
|
||||
*/
|
||||
protected static function isShellSafe($string)
|
||||
{
|
||||
// Future-proof
|
||||
if (escapeshellcmd($string) !== $string
|
||||
or !in_array(escapeshellarg($string), array("'$string'", "\"$string\""))
|
||||
) {
|
||||
return false;
|
||||
}
|
||||
|
||||
$length = strlen($string);
|
||||
|
||||
for ($i = 0; $i < $length; $i++) {
|
||||
$c = $string[$i];
|
||||
|
||||
// All other characters have a special meaning in at least one common shell, including = and +.
|
||||
// Full stop (.) has a special meaning in cmd.exe, but its impact should be negligible here.
|
||||
// Note that this does permit non-Latin alphanumeric characters based on the current locale.
|
||||
if (!ctype_alnum($c) && strpos('@_-.', $c) === false) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Send mail using the PHP mail() function.
|
||||
* @param string $header The message headers
|
||||
@@ -1404,17 +1478,20 @@ class PHPMailer
|
||||
}
|
||||
$to = implode(', ', $toArr);
|
||||
|
||||
if (empty($this->Sender)) {
|
||||
$params = ' ';
|
||||
} else {
|
||||
$params = sprintf('-f%s', $this->Sender);
|
||||
$params = null;
|
||||
//This sets the SMTP envelope sender which gets turned into a return-path header by the receiver
|
||||
if (!empty($this->Sender) and $this->validateAddress($this->Sender)) {
|
||||
// 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');
|
||||
ini_set('sendmail_from', $this->Sender);
|
||||
}
|
||||
$result = false;
|
||||
if ($this->SingleTo && count($toArr) > 1) {
|
||||
if ($this->SingleTo and count($toArr) > 1) {
|
||||
foreach ($toArr as $toAddr) {
|
||||
$result = $this->mailPassthru($toAddr, $this->Subject, $body, $header, $params);
|
||||
$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)) {
|
||||
throw new phpmailerException($this->lang('smtp_connect_failed'), self::STOP_CRITICAL);
|
||||
}
|
||||
if ('' == $this->Sender) {
|
||||
$smtp_from = $this->From;
|
||||
} else {
|
||||
if (!empty($this->Sender) and $this->validateAddress($this->Sender)) {
|
||||
$smtp_from = $this->Sender;
|
||||
} else {
|
||||
$smtp_from = $this->From;
|
||||
}
|
||||
if (!$this->smtp->mail($smtp_from)) {
|
||||
$this->setError($this->lang('from_failed') . $smtp_from . ' : ' . implode(',', $this->smtp->getError()));
|
||||
@@ -1520,12 +1597,17 @@ class PHPMailer
|
||||
* @throws phpmailerException
|
||||
* @return boolean
|
||||
*/
|
||||
public function smtpConnect($options = array())
|
||||
public function smtpConnect($options = null)
|
||||
{
|
||||
if (is_null($this->smtp)) {
|
||||
$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?
|
||||
if ($this->smtp->connected()) {
|
||||
return true;
|
||||
@@ -1595,7 +1677,7 @@ class PHPMailer
|
||||
if (!$this->smtp->startTLS()) {
|
||||
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);
|
||||
}
|
||||
if ($this->SMTPAuth) {
|
||||
@@ -1634,7 +1716,7 @@ class PHPMailer
|
||||
*/
|
||||
public function smtpClose()
|
||||
{
|
||||
if ($this->smtp !== null) {
|
||||
if (is_a($this->smtp, 'SMTP')) {
|
||||
if ($this->smtp->connected()) {
|
||||
$this->smtp->quit();
|
||||
$this->smtp->close();
|
||||
@@ -1653,6 +1735,19 @@ class PHPMailer
|
||||
*/
|
||||
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
|
||||
$PHPMAILER_LANG = array(
|
||||
'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
|
||||
$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;
|
||||
$lang_file = $lang_path . 'phpmailer.lang-' . $langcode . '.php';
|
||||
// There is no English translation file
|
||||
@@ -1972,7 +2071,9 @@ class PHPMailer
|
||||
$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;
|
||||
} else {
|
||||
$this->lastMessageID = sprintf('<%s@%s>', $this->uniqueid, $this->serverHostname());
|
||||
@@ -2074,7 +2175,15 @@ class PHPMailer
|
||||
*/
|
||||
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 = '';
|
||||
//Create unique IDs and preset boundaries
|
||||
$this->uniqueid = md5(uniqid(time()));
|
||||
$this->uniqueid = $this->generateId();
|
||||
$this->boundary[1] = 'b1_' . $this->uniqueid;
|
||||
$this->boundary[2] = 'b2_' . $this->uniqueid;
|
||||
$this->boundary[3] = 'b3_' . $this->uniqueid;
|
||||
@@ -2104,12 +2213,12 @@ class PHPMailer
|
||||
//Can we do a 7-bit downgrade?
|
||||
if ($bodyEncoding == '8bit' and !$this->has8bitChars($this->Body)) {
|
||||
$bodyEncoding = '7bit';
|
||||
//All ISO 8859, Windows codepage and UTF-8 charsets are ascii compatible up to 7-bit
|
||||
$bodyCharSet = 'us-ascii';
|
||||
}
|
||||
//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)) {
|
||||
$this->Encoding = 'quoted-printable';
|
||||
$bodyEncoding = 'quoted-printable';
|
||||
}
|
||||
|
||||
@@ -2118,10 +2227,12 @@ class PHPMailer
|
||||
//Can we do a 7-bit downgrade?
|
||||
if ($altBodyEncoding == '8bit' and !$this->has8bitChars($this->AltBody)) {
|
||||
$altBodyEncoding = '7bit';
|
||||
//All ISO 8859, Windows codepage and UTF-8 charsets are ascii compatible up to 7-bit
|
||||
$altBodyCharSet = 'us-ascii';
|
||||
}
|
||||
//If lines are too long, change to quoted-printable transfer encoding
|
||||
if (self::hasLineLongerThanMax($this->AltBody)) {
|
||||
//If lines are too long, and we're not already using an encoding that will shorten them,
|
||||
//change to quoted-printable transfer encoding for the alt body part only
|
||||
if ('base64' != $altBodyEncoding and self::hasLineLongerThanMax($this->AltBody)) {
|
||||
$altBodyEncoding = 'quoted-printable';
|
||||
}
|
||||
//Use this as a preamble in all multipart message types
|
||||
@@ -2224,8 +2335,10 @@ class PHPMailer
|
||||
$body .= $this->attachAll('attachment', $this->boundary[1]);
|
||||
break;
|
||||
default:
|
||||
// catch case 'plain' and case ''
|
||||
$body .= $this->encodeString($this->Body, $bodyEncoding);
|
||||
// Catch case 'plain' and case '', applies to simple `text/plain` and `text/html` body content types
|
||||
//Reset the `Encoding` property in case we changed it for line length reasons
|
||||
$this->Encoding = $bodyEncoding;
|
||||
$body .= $this->encodeString($this->Body, $this->Encoding);
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -2331,8 +2444,7 @@ class PHPMailer
|
||||
|
||||
/**
|
||||
* Set the message type.
|
||||
* PHPMailer only supports some preset message types,
|
||||
* not arbitrary MIME structures.
|
||||
* PHPMailer only supports some preset message types, not arbitrary MIME structures.
|
||||
* @access protected
|
||||
* @return void
|
||||
*/
|
||||
@@ -2350,6 +2462,7 @@ class PHPMailer
|
||||
}
|
||||
$this->message_type = implode('_', $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';
|
||||
}
|
||||
}
|
||||
@@ -2379,6 +2492,7 @@ class PHPMailer
|
||||
|
||||
/**
|
||||
* Add an attachment from a path on the filesystem.
|
||||
* Never use a user-supplied path to a file!
|
||||
* Returns false if the file could not be found or read.
|
||||
* @param string $path Path to the attachment.
|
||||
* @param string $name Overrides the attachment name.
|
||||
@@ -2904,6 +3018,7 @@ class PHPMailer
|
||||
* displayed inline with the message, not just attached for download.
|
||||
* This is used in HTML messages that embed the images
|
||||
* the HTML refers to using the $cid value.
|
||||
* Never use a user-supplied path to a file!
|
||||
* @param string $path Path to the attachment.
|
||||
* @param string $cid Content ID of the attachment; Use this to reference
|
||||
* the content when using an embedded image in HTML.
|
||||
@@ -3264,21 +3379,29 @@ class PHPMailer
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a message from an HTML string.
|
||||
* Automatically makes modifications for inline images and backgrounds
|
||||
* and creates a plain-text version by converting the HTML.
|
||||
* Overwrites any existing values in $this->Body and $this->AltBody
|
||||
* Create a message body from an HTML string.
|
||||
* Automatically inlines images and creates a plain-text version by converting the HTML,
|
||||
* overwriting any existing values in Body and AltBody.
|
||||
* 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
|
||||
* @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
|
||||
* 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)
|
||||
{
|
||||
preg_match_all('/(src|background)=["\'](.*)["\']/Ui', $message, $images);
|
||||
if (array_key_exists(2, $images)) {
|
||||
if (strlen($basedir) > 1 && substr($basedir, -1) != '/') {
|
||||
// Ensure $basedir has a trailing /
|
||||
$basedir .= '/';
|
||||
}
|
||||
foreach ($images[2] as $imgindex => $url) {
|
||||
// Convert data URIs into embedded images
|
||||
if (preg_match('#^data:(image[^;,]*)(;base64)?,#', $url, $match)) {
|
||||
@@ -3296,18 +3419,24 @@ class PHPMailer
|
||||
$message
|
||||
);
|
||||
}
|
||||
} elseif (substr($url, 0, 4) !== 'cid:' && !preg_match('#^[A-z]+://#', $url)) {
|
||||
// Do not change urls for absolute images (thanks to corvuscorax)
|
||||
continue;
|
||||
}
|
||||
if (
|
||||
// Only process relative URLs if a basedir is provided (i.e. no absolute local paths)
|
||||
!empty($basedir)
|
||||
// Ignore URLs containing parent dir traversal (..)
|
||||
&& (strpos($url, '..') === false)
|
||||
// Do not change urls that are already inline images
|
||||
&& substr($url, 0, 4) !== 'cid:'
|
||||
// Do not change absolute URLs, including anonymous protocol
|
||||
&& !preg_match('#^[a-z][a-z0-9+.-]*:?//#i', $url)
|
||||
) {
|
||||
$filename = basename($url);
|
||||
$directory = dirname($url);
|
||||
if ($directory == '.') {
|
||||
$directory = '';
|
||||
}
|
||||
$cid = md5($url) . '@phpmailer.0'; // RFC2392 S 2
|
||||
if (strlen($basedir) > 1 && substr($basedir, -1) != '/') {
|
||||
$basedir .= '/';
|
||||
}
|
||||
if (strlen($directory) > 1 && substr($directory, -1) != '/') {
|
||||
$directory .= '/';
|
||||
}
|
||||
@@ -3332,7 +3461,7 @@ class PHPMailer
|
||||
// Convert all message body line breaks to CRLF, makes quoted-printable encoding work much better
|
||||
$this->Body = $this->normalizeBreaks($message);
|
||||
$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!' .
|
||||
self::CRLF . self::CRLF;
|
||||
}
|
||||
@@ -3343,7 +3472,7 @@ class PHPMailer
|
||||
* Convert an HTML string into plain text.
|
||||
* This is used by msgHTML().
|
||||
* 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:
|
||||
* <code>
|
||||
* // Use default conversion
|
||||
@@ -3643,7 +3772,7 @@ class PHPMailer
|
||||
* @access public
|
||||
* @param string $signHeader
|
||||
* @throws phpmailerException
|
||||
* @return string
|
||||
* @return string The DKIM signature value
|
||||
*/
|
||||
public function DKIM_Sign($signHeader)
|
||||
{
|
||||
@@ -3653,15 +3782,35 @@ class PHPMailer
|
||||
}
|
||||
return '';
|
||||
}
|
||||
$privKeyStr = file_get_contents($this->DKIM_private);
|
||||
if ($this->DKIM_passphrase != '') {
|
||||
$privKeyStr = !empty($this->DKIM_private_string) ? $this->DKIM_private_string : file_get_contents($this->DKIM_private);
|
||||
if ('' != $this->DKIM_passphrase) {
|
||||
$privKey = openssl_pkey_get_private($privKeyStr, $this->DKIM_passphrase);
|
||||
} else {
|
||||
$privKey = $privKeyStr;
|
||||
$privKey = openssl_pkey_get_private($privKeyStr);
|
||||
}
|
||||
if (openssl_sign($signHeader, $signature, $privKey)) {
|
||||
return base64_encode($signature);
|
||||
//Workaround for missing digest algorithms in old PHP & OpenSSL versions
|
||||
//@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 '';
|
||||
}
|
||||
|
||||
@@ -3678,7 +3827,7 @@ class PHPMailer
|
||||
foreach ($lines as $key => $line) {
|
||||
list($heading, $value) = explode(':', $line, 2);
|
||||
$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
|
||||
}
|
||||
$signHeader = implode("\r\n", $lines);
|
||||
@@ -3716,7 +3865,7 @@ class PHPMailer
|
||||
*/
|
||||
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
|
||||
$DKIMquery = 'dns/txt'; // Query method
|
||||
$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);
|
||||
$from_header = '';
|
||||
$to_header = '';
|
||||
$date_header = '';
|
||||
$current = '';
|
||||
foreach ($headers as $header) {
|
||||
if (strpos($header, 'From:') === 0) {
|
||||
@@ -3732,6 +3882,9 @@ class PHPMailer
|
||||
} elseif (strpos($header, 'To:') === 0) {
|
||||
$to_header = $header;
|
||||
$current = 'to_header';
|
||||
} elseif (strpos($header, 'Date:') === 0) {
|
||||
$date_header = $header;
|
||||
$current = 'date_header';
|
||||
} else {
|
||||
if (!empty($$current) && strpos($header, ' =?') === 0) {
|
||||
$$current .= $header;
|
||||
@@ -3742,6 +3895,7 @@ class PHPMailer
|
||||
}
|
||||
$from = str_replace('|', '=7C', $this->DKIM_QP($from_header));
|
||||
$to = str_replace('|', '=7C', $this->DKIM_QP($to_header));
|
||||
$date = str_replace('|', '=7C', $this->DKIM_QP($date_header));
|
||||
$subject = str_replace(
|
||||
'|',
|
||||
'=7C',
|
||||
@@ -3749,7 +3903,7 @@ class PHPMailer
|
||||
); // Copied header fields (dkim-quoted-printable)
|
||||
$body = $this->DKIM_BodyC($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) {
|
||||
$ident = '';
|
||||
} else {
|
||||
@@ -3762,16 +3916,18 @@ class PHPMailer
|
||||
$this->DKIM_selector .
|
||||
";\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" .
|
||||
"\tz=$from\r\n" .
|
||||
"\t|$to\r\n" .
|
||||
"\t|$date\r\n" .
|
||||
"\t|$subject;\r\n" .
|
||||
"\tbh=" . $DKIMb64 . ";\r\n" .
|
||||
"\tb=";
|
||||
$toSign = $this->DKIM_HeaderC(
|
||||
$from_header . "\r\n" .
|
||||
$to_header . "\r\n" .
|
||||
$date_header . "\r\n" .
|
||||
$subject_header . "\r\n" .
|
||||
$dkimhdrs
|
||||
);
|
||||
|
||||
@@ -80,6 +80,7 @@ class PHPMailerOAuth extends PHPMailer
|
||||
* @uses SMTP
|
||||
* @access public
|
||||
* @return bool
|
||||
* @throws phpmailerException
|
||||
*/
|
||||
public function smtpConnect($options = array())
|
||||
{
|
||||
|
||||
@@ -49,7 +49,8 @@ class PHPMailerOAuthGoogle
|
||||
$this->oauthUserEmail = $UserEmail;
|
||||
}
|
||||
|
||||
private function getProvider() {
|
||||
private function getProvider()
|
||||
{
|
||||
return new League\OAuth2\Client\Provider\Google([
|
||||
'clientId' => $this->oauthClientId,
|
||||
'clientSecret' => $this->oauthClientSecret
|
||||
|
||||
@@ -34,7 +34,7 @@ class POP3
|
||||
* @var string
|
||||
* @access public
|
||||
*/
|
||||
public $Version = '5.2.14';
|
||||
public $Version = '5.2.22';
|
||||
|
||||
/**
|
||||
* Default POP3 port number.
|
||||
|
||||
@@ -30,7 +30,7 @@ class SMTP
|
||||
* The PHPMailer SMTP version number.
|
||||
* @var string
|
||||
*/
|
||||
const VERSION = '5.2.14';
|
||||
const VERSION = '5.2.22';
|
||||
|
||||
/**
|
||||
* SMTP line break constant.
|
||||
@@ -81,7 +81,7 @@ class SMTP
|
||||
* @deprecated Use the `VERSION` constant instead
|
||||
* @see SMTP::VERSION
|
||||
*/
|
||||
public $Version = '5.2.14';
|
||||
public $Version = '5.2.22';
|
||||
|
||||
/**
|
||||
* SMTP server port number.
|
||||
@@ -150,6 +150,17 @@ class SMTP
|
||||
*/
|
||||
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.
|
||||
* @var resource
|
||||
@@ -206,7 +217,7 @@ class SMTP
|
||||
}
|
||||
//Avoid clash with built-in function names
|
||||
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;
|
||||
}
|
||||
switch ($this->Debugoutput) {
|
||||
@@ -272,8 +283,8 @@ class SMTP
|
||||
$errstr = '';
|
||||
if ($streamok) {
|
||||
$socket_context = stream_context_create($options);
|
||||
//Suppress errors; connection failures are handled at a higher level
|
||||
$this->smtp_conn = @stream_socket_client(
|
||||
set_error_handler(array($this, 'errorHandler'));
|
||||
$this->smtp_conn = stream_socket_client(
|
||||
$host . ":" . $port,
|
||||
$errno,
|
||||
$errstr,
|
||||
@@ -281,12 +292,14 @@ class SMTP
|
||||
STREAM_CLIENT_CONNECT,
|
||||
$socket_context
|
||||
);
|
||||
restore_error_handler();
|
||||
} else {
|
||||
//Fall back to fsockopen which should work in more places, but is missing some features
|
||||
$this->edebug(
|
||||
"Connection: stream_socket_client not available, falling back to fsockopen",
|
||||
self::DEBUG_CONNECTION
|
||||
);
|
||||
set_error_handler(array($this, 'errorHandler'));
|
||||
$this->smtp_conn = fsockopen(
|
||||
$host,
|
||||
$port,
|
||||
@@ -294,6 +307,7 @@ class SMTP
|
||||
$errstr,
|
||||
$timeout
|
||||
);
|
||||
restore_error_handler();
|
||||
}
|
||||
// Verify we connected properly
|
||||
if (!is_resource($this->smtp_conn)) {
|
||||
@@ -336,11 +350,22 @@ class SMTP
|
||||
if (!$this->sendCommand('STARTTLS', 'STARTTLS', 220)) {
|
||||
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
|
||||
if (!stream_socket_enable_crypto(
|
||||
$this->smtp_conn,
|
||||
true,
|
||||
STREAM_CRYPTO_METHOD_TLS_CLIENT
|
||||
$crypto_method
|
||||
)) {
|
||||
return false;
|
||||
}
|
||||
@@ -389,7 +414,7 @@ class SMTP
|
||||
);
|
||||
|
||||
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'])) {
|
||||
$authtype = $method;
|
||||
break;
|
||||
@@ -463,7 +488,7 @@ class SMTP
|
||||
$temp = new stdClass;
|
||||
$ntlm_client = new ntlm_sasl_client_class;
|
||||
//Check that functions are available
|
||||
if (!$ntlm_client->Initialize($temp)) {
|
||||
if (!$ntlm_client->initialize($temp)) {
|
||||
$this->setError($temp->error);
|
||||
$this->edebug(
|
||||
'You need to enable some modules in your php.ini file: '
|
||||
@@ -473,7 +498,7 @@ class SMTP
|
||||
return false;
|
||||
}
|
||||
//msg1
|
||||
$msg1 = $ntlm_client->TypeMsg1($realm, $workstation); //msg1
|
||||
$msg1 = $ntlm_client->typeMsg1($realm, $workstation); //msg1
|
||||
|
||||
if (!$this->sendCommand(
|
||||
'AUTH NTLM',
|
||||
@@ -492,7 +517,7 @@ class SMTP
|
||||
$password
|
||||
);
|
||||
//msg3
|
||||
$msg3 = $ntlm_client->TypeMsg3(
|
||||
$msg3 = $ntlm_client->typeMsg3(
|
||||
$ntlm_res,
|
||||
$username,
|
||||
$realm,
|
||||
@@ -736,7 +761,7 @@ class SMTP
|
||||
protected function parseHelloFields($type)
|
||||
{
|
||||
$this->server_caps = array();
|
||||
$lines = explode("\n", $this->last_reply);
|
||||
$lines = explode("\n", $this->helo_rply);
|
||||
|
||||
foreach ($lines as $n => $s) {
|
||||
//First 4 chars contain response code followed by - or space
|
||||
@@ -1178,4 +1203,47 @@ class SMTP
|
||||
{
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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"
|
||||
}
|
||||
Generated
+3576
File diff suppressed because it is too large
Load Diff
@@ -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>Armenian text: Հաղորդագրությունը դատարկ է</p>
|
||||
<p>Czech text: Prázdné tělo zprávy</p>
|
||||
<p>Emoji: <span style="font-size: 48px">😂 🦄 💥 📤 📧</span></p>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -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
|
||||
|
||||
+5
-6
@@ -23,24 +23,23 @@ dp.SyntaxHighlighter = {
|
||||
return match.value;
|
||||
|
||||
return null;
|
||||
};
|
||||
}
|
||||
|
||||
function defaultValue(value, def)
|
||||
{
|
||||
return value != null ? value : def;
|
||||
};
|
||||
}
|
||||
|
||||
function asString(value)
|
||||
{
|
||||
return value != null ? value.toString() : null;
|
||||
};
|
||||
}
|
||||
|
||||
var parts = input.split(':'),
|
||||
brushName = parts[0],
|
||||
options = {},
|
||||
straight = { 'true' : true }
|
||||
straight = { 'true' : true },
|
||||
reverse = { 'true' : false },
|
||||
result = null,
|
||||
defaults = SyntaxHighlighter.defaults
|
||||
;
|
||||
|
||||
@@ -89,7 +88,7 @@ dp.SyntaxHighlighter = {
|
||||
}
|
||||
|
||||
return null;
|
||||
};
|
||||
}
|
||||
|
||||
function findTagsByName(list, name, tagName)
|
||||
{
|
||||
|
||||
@@ -12,28 +12,28 @@ if (array_key_exists('userfile', $_FILES)) {
|
||||
// Upload handled successfully
|
||||
// Now create a message
|
||||
// This should be somewhere in your include_path
|
||||
require 'PHPMailerAutoload.php';
|
||||
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->msgHTML("My message body");
|
||||
$mail->Body = 'My message body';
|
||||
// Attach the uploaded file
|
||||
$mail->addAttachment($uploadfile, 'My uploaded file');
|
||||
if (!$mail->send()) {
|
||||
$msg = "Mailer Error: " . $mail->ErrorInfo;
|
||||
$msg .= "Mailer Error: " . $mail->ErrorInfo;
|
||||
} else {
|
||||
$msg = "Message sent!";
|
||||
$msg .= "Message sent!";
|
||||
}
|
||||
} else {
|
||||
$msg = 'Failed to move file to ' . $uploadfile;
|
||||
$msg .= 'Failed to move file to ' . $uploadfile;
|
||||
}
|
||||
}
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8"/>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<title>PHPMailer Upload</title>
|
||||
</head>
|
||||
<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>
|
||||
@@ -17,24 +17,39 @@ $smtp = new SMTP;
|
||||
$smtp->do_debug = SMTP::DEBUG_CONNECTION;
|
||||
|
||||
try {
|
||||
//Connect to an SMTP server
|
||||
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 {
|
||||
//Connect to an SMTP server
|
||||
if (!$smtp->connect('mail.example.com', 25)) {
|
||||
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) {
|
||||
echo 'SMTP error: '. $e->getMessage(), "\n";
|
||||
echo 'SMTP error: ' . $e->getMessage(), "\n";
|
||||
}
|
||||
//Whatever happened, close the connection.
|
||||
$smtp->quit(true);
|
||||
|
||||
@@ -433,7 +433,7 @@ function tln_getnxtag($body, $offset)
|
||||
*
|
||||
* @param string $attvalue the by-ref value to check.
|
||||
* @param string $regex the regular expression to check against.
|
||||
* @param boolean $hex whether the entites are hexadecimal.
|
||||
* @param boolean $hex whether the entities are hexadecimal.
|
||||
* @return boolean True or False depending on whether there were matches.
|
||||
*/
|
||||
function tln_deent(&$attvalue, $regex, $hex = false)
|
||||
@@ -461,7 +461,6 @@ function tln_deent(&$attvalue, $regex, $hex = false)
|
||||
* checks on them.
|
||||
*
|
||||
* @param string $attvalue A string to run entity check against.
|
||||
* @return Void, modifies a reference value.
|
||||
*/
|
||||
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".
|
||||
*
|
||||
* @param string $attvalue The attribute value before extraneous spaces removed.
|
||||
* @return Void, modifies a reference value.
|
||||
*/
|
||||
function tln_unspace(&$attvalue)
|
||||
{
|
||||
@@ -511,7 +509,7 @@ function tln_unspace(&$attvalue)
|
||||
* @param array $add_attr_to_tag See description for tln_sanitize
|
||||
* @param string $trans_image_path
|
||||
* @param boolean $block_external_images
|
||||
* @return Array with modified attributes.
|
||||
* @return array with modified attributes.
|
||||
*/
|
||||
function tln_fixatts(
|
||||
$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)
|
||||
{
|
||||
$me = 'tln_fixstyle';
|
||||
// workaround for </style> in between comments
|
||||
$iCurrentPos = $pos;
|
||||
$content = '';
|
||||
$sToken = '';
|
||||
$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);
|
||||
|
||||
$trans_image_path = $trans_image_path;
|
||||
|
||||
/**
|
||||
* Fix url('blah') declarations.
|
||||
*/
|
||||
@@ -778,7 +772,7 @@ function tln_fixstyle($body, $pos, $trans_image_path, $block_external_images)
|
||||
tln_defang($contentTemp);
|
||||
tln_unspace($contentTemp);
|
||||
|
||||
$match = Array('/\/\*.*\*\//',
|
||||
$match = array('/\/\*.*\*\//',
|
||||
'/expression/i',
|
||||
'/behaviou*r/i',
|
||||
'/binding/i',
|
||||
@@ -786,7 +780,7 @@ function tln_fixstyle($body, $pos, $trans_image_path, $block_external_images)
|
||||
'/javascript/i',
|
||||
'/script/i',
|
||||
'/position/i');
|
||||
$replace = Array('','idiocy', 'idiocy', 'idiocy', 'idiocy', 'idiocy', 'idiocy', '');
|
||||
$replace = array('','idiocy', 'idiocy', 'idiocy', 'idiocy', 'idiocy', 'idiocy', '');
|
||||
$contentNew = preg_replace($match, $replace, $contentTemp);
|
||||
if ($contentNew !== $contentTemp) {
|
||||
$content = $contentNew;
|
||||
@@ -796,7 +790,6 @@ function tln_fixstyle($body, $pos, $trans_image_path, $block_external_images)
|
||||
|
||||
function tln_body2div($attary, $trans_image_path)
|
||||
{
|
||||
$me = 'tln_body2div';
|
||||
$divattary = array('class' => "'bodyclass'");
|
||||
$text = '#000000';
|
||||
$has_bgc_stl = $has_txt_stl = false;
|
||||
@@ -901,7 +894,7 @@ function tln_sanitize(
|
||||
}
|
||||
$trusted .= tln_tagprint($tagname, $attary, $tagtype);
|
||||
$trusted .= $free_content;
|
||||
$trusted .= tln_tagprint($tagname, false, 2);
|
||||
$trusted .= tln_tagprint($tagname, null, 2);
|
||||
}
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -160,12 +160,12 @@ class ntlm_sasl_client_class
|
||||
{
|
||||
switch ($this->state) {
|
||||
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;
|
||||
break;
|
||||
case SASL_NTLM_STATE_RESPOND_CHALLENGE:
|
||||
$ntlm_response = $this->NTLMResponse(substr($response, 24, 8), $this->credentials["password"]);
|
||||
$message = $this->TypeMsg3(
|
||||
$message = $this->typeMsg3(
|
||||
$ntlm_response,
|
||||
$this->credentials["user"],
|
||||
$this->credentials["realm"],
|
||||
|
||||
@@ -13,8 +13,15 @@
|
||||
* PHP Version 5.4
|
||||
*/
|
||||
|
||||
namespace League\OAuth2\Client\Provider;
|
||||
|
||||
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();
|
||||
|
||||
//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';
|
||||
$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
|
||||
$provider = new League\OAuth2\Client\Provider\Google(
|
||||
$provider = new Google(
|
||||
array(
|
||||
'clientId' => $clientId,
|
||||
'clientSecret' => $clientSecret,
|
||||
'redirectUri' => $redirectUri,
|
||||
'scopes' => array('https://mail.google.com/'),
|
||||
'accessType' => 'offline'
|
||||
'scope' => array('https://mail.google.com/'),
|
||||
'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: ';
|
||||
@@ -4,22 +4,22 @@
|
||||
* @package PHPMailer
|
||||
*/
|
||||
|
||||
$PHPMAILER_LANG['authenticate'] = 'SMTP Fehler: Authentifizierung fehlgeschlagen.';
|
||||
$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['empty_message'] = 'E-Mail Inhalt ist leer.';
|
||||
$PHPMAILER_LANG['encoding'] = 'Unbekanntes Encoding-Format: ';
|
||||
$PHPMAILER_LANG['authenticate'] = 'SMTP-Fehler: Authentifizierung fehlgeschlagen.';
|
||||
$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['empty_message'] = 'E-Mail-Inhalt ist leer.';
|
||||
$PHPMAILER_LANG['encoding'] = 'Unbekannte Kodierung: ';
|
||||
$PHPMAILER_LANG['execute'] = 'Konnte folgenden Befehl nicht ausführen: ';
|
||||
$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['instantiate'] = 'Mail Funktion konnte nicht initialisiert werden.';
|
||||
$PHPMAILER_LANG['invalid_address'] = 'E-Mail wird nicht gesendet, die Adresse ist ungültig: ';
|
||||
$PHPMAILER_LANG['instantiate'] = 'Mail-Funktion konnte nicht initialisiert werden.';
|
||||
$PHPMAILER_LANG['invalid_address'] = 'Die Adresse ist ungültig: ';
|
||||
$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['recipients_failed'] = 'SMTP Fehler: Die folgenden Empfänger sind nicht korrekt: ';
|
||||
$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['signing'] = 'Fehler beim Signieren: ';
|
||||
$PHPMAILER_LANG['smtp_connect_failed'] = 'Verbindung zu SMTP Server fehlgeschlagen.';
|
||||
$PHPMAILER_LANG['smtp_error'] = 'Fehler vom SMTP Server: ';
|
||||
$PHPMAILER_LANG['smtp_connect_failed'] = 'Verbindung zum SMTP-Server fehlgeschlagen.';
|
||||
$PHPMAILER_LANG['smtp_error'] = 'Fehler vom SMTP-Server: ';
|
||||
$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_error'] = 'Error del servidor SMTP: ';
|
||||
$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_error'] = 'SMTP სერვერის შეცდომა: ';
|
||||
$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_error'] = 'Błąd SMTP: ';
|
||||
$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: ';
|
||||
@@ -2,25 +2,25 @@
|
||||
/**
|
||||
* Romanian PHPMailer language file: refer to English translation for definitive list
|
||||
* @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['connect_host'] = 'Eroare SMTP: Nu m-am putut conecta la adresa SMTP.';
|
||||
$PHPMAILER_LANG['data_not_accepted'] = 'Eroare SMTP: Continutul mailului nu a fost acceptat.';
|
||||
$PHPMAILER_LANG['authenticate'] = 'Eroare SMTP: Autentificarea a eșuat.';
|
||||
$PHPMAILER_LANG['connect_host'] = 'Eroare SMTP: Conectarea la serverul SMTP a eșuat.';
|
||||
$PHPMAILER_LANG['data_not_accepted'] = 'Eroare SMTP: Datele nu au fost acceptate.';
|
||||
$PHPMAILER_LANG['empty_message'] = 'Mesajul este gol.';
|
||||
$PHPMAILER_LANG['encoding'] = 'Encodare necunoscuta: ';
|
||||
$PHPMAILER_LANG['execute'] = 'Nu pot executa: ';
|
||||
$PHPMAILER_LANG['file_access'] = 'Nu pot accesa fisierul: ';
|
||||
$PHPMAILER_LANG['file_open'] = 'Eroare de fisier: Nu pot deschide fisierul: ';
|
||||
$PHPMAILER_LANG['from_failed'] = 'Urmatoarele adrese From au dat eroare: ';
|
||||
$PHPMAILER_LANG['instantiate'] = 'Nu am putut instantia functia mail.';
|
||||
$PHPMAILER_LANG['invalid_address'] = 'Adresa de email nu este valida: ';
|
||||
$PHPMAILER_LANG['encoding'] = 'Encodare necunoscută: ';
|
||||
$PHPMAILER_LANG['execute'] = 'Nu se poate executa următoarea comandă: ';
|
||||
$PHPMAILER_LANG['file_access'] = 'Nu se poate accesa următorul fișier: ';
|
||||
$PHPMAILER_LANG['file_open'] = 'Eroare fișier: Nu se poate deschide următorul fișier: ';
|
||||
$PHPMAILER_LANG['from_failed'] = 'Următoarele adrese From au dat eroare: ';
|
||||
$PHPMAILER_LANG['instantiate'] = 'Funcția mail nu a putut fi inițializată.';
|
||||
$PHPMAILER_LANG['invalid_address'] = 'Adresa de email nu este validă: ';
|
||||
$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['recipients_failed'] = 'Eroare SMTP: Urmatoarele adrese de mail au dat eroare: ';
|
||||
$PHPMAILER_LANG['signing'] = 'A aparut o problema la semnarea emailului. ';
|
||||
$PHPMAILER_LANG['smtp_connect_failed'] = 'Conectarea la serverul SMTP a esuat.';
|
||||
$PHPMAILER_LANG['smtp_error'] = 'A aparut o eroare la serverul SMTP. ';
|
||||
$PHPMAILER_LANG['provide_address'] = 'Trebuie să adăugați cel puțin o adresă de email.';
|
||||
$PHPMAILER_LANG['recipients_failed'] = 'Eroare SMTP: Următoarele adrese de email au eșuat: ';
|
||||
$PHPMAILER_LANG['signing'] = 'A aparut o problemă la semnarea emailului. ';
|
||||
$PHPMAILER_LANG['smtp_connect_failed'] = 'Conectarea la serverul SMTP a eșuat.';
|
||||
$PHPMAILER_LANG['smtp_error'] = 'Eroare server SMTP: ';
|
||||
$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['mailer_not_supported'] = ' — почтовый сервер не поддерживается.';
|
||||
$PHPMAILER_LANG['recipients_failed'] = 'Ошибка SMTP: отправка по следующим адресам получателей не удалась: ';
|
||||
$PHPMAILER_LANG['empty_message'] = 'Пустое тело сообщения';
|
||||
$PHPMAILER_LANG['empty_message'] = 'Пустое сообщение';
|
||||
$PHPMAILER_LANG['invalid_address'] = 'Не отослано, неправильный формат email адреса: ';
|
||||
$PHPMAILER_LANG['signing'] = 'Ошибка подписывания: ';
|
||||
$PHPMAILER_LANG['signing'] = 'Ошибка подписи: ';
|
||||
$PHPMAILER_LANG['smtp_connect_failed'] = 'Ошибка соединения с SMTP-сервером';
|
||||
$PHPMAILER_LANG['smtp_error'] = 'Ошибка SMTP-сервера: ';
|
||||
$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: ';
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user