Compare commits

...
27 Commits
Author SHA1 Message Date
thisgun 8eb465d26f 5.2.6 버전변경 2017-01-18 19:59:42 +09:00
thisgun 6ff06d4609 글쓰기시 page 중복 소스 삭제 2017-01-18 19:58:35 +09:00
thisgun c817b1edb7 PHPMailer 5.2.22 버전 적용 2017-01-18 19:58:31 +09:00
thisgun f7c6a52f6d cheditor5 추가 2017-01-18 19:58:20 +09:00
thisgun 3e343bdf66 5.2.5 버전변경 2017-01-09 14:33:20 +09:00
thisgun e131563c8f XSS 취약점(16-1008) 수정 2017-01-09 14:30:47 +09:00
thisgun 0094cc9afe 스마트에디터 업로드 방식 수정 2017-01-09 14:30:39 +09:00
thisgun 5fde923aa0 PHPMailer 5.2.19 버전 적용 2017-01-09 14:30:33 +09:00
chicpro 1e3a4f2657 KCP 본인확인 모바일 관련 수정 2016-12-21 09:56:32 +09:00
chicpro 0693fde962 5.2.4 버전변경 2016-11-22 11:34:16 +09:00
chicpro 7fb5f92200 <?php 수정 2016-11-22 10:47:31 +09:00
chicpro 50c8207fed 컬럼 정렬 함수에 sca 변수 추가 (sir ko님 제안) 2016-10-20 09:30:42 +09:00
chicpro 6dbfa73461 5.2.3 버전변경 2016-10-19 10:26:05 +09:00
chicpro 76ecc6efe8 XSS 취약점(16-781) 수정 2016-10-17 16:57:04 +09:00
chicpro f4b0737178 개인정보처리방침 명칭 변경 2016-10-17 14:48:00 +09:00
chicpro e99c7a81db 게시글 CSRF 취약점(16-749 16-750) 수정 2016-10-17 14:47:45 +09:00
chicpro ce0a6dc3af js css 버전 상수 추가 2016-10-17 14:47:30 +09:00
chicpro f3e428ea1e 모바이 FAQ 하단 내용 출력 오류 수정 2016-09-21 11:41:04 +09:00
chicpro 9b422b38c5 5.2.2 버전변경 2016-09-20 09:59:04 +09:00
chicpro f6056b2d37 오픈 리다이렉트 취약점(16-603) 수정 2016-09-06 14:47:35 +09:00
chicpro a560fc353c htmlpurifier 4.8 업데이트 2016-08-29 13:48:02 +09:00
chicpro e2c67e854f 5.2.1 버전변경 2016-08-22 09:56:47 +09:00
thisgunandchicpro 3e7617e825 스마트에디터 2.8.2.3 보안패치 #63 2016-08-17 14:37:23 +09:00
chicpro 4515f11169 토큰 초기화 코드 추가 2016-08-10 10:02:04 +09:00
chicpro ec32f64bc4 댓글 수정 CSRF 취약점 수정 2016-08-10 10:01:49 +09:00
chicpro 15bd8b9632 파일경로 필터링 코드 추가 2016-08-10 10:01:35 +09:00
chicpro ef013e0827 wr_id_list 필터링 코드 추가 2016-08-10 09:56:03 +09:00
310 changed files with 21745 additions and 14323 deletions
+1 -1
View File
@@ -6,7 +6,7 @@ sirgle/
test.php
*.key
*.sh
cheditor*/
cheditor5.*/
ckeditor*/
log/
g5_tree/
+1 -1
View File
@@ -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
View File
@@ -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>
+2
View File
@@ -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 .= ' 수정';
+1 -1
View File
@@ -1,4 +1,4 @@
<?
<?php
$sub_menu = "200100";
include_once("./_common.php");
+1 -1
View File
@@ -1,4 +1,4 @@
<?
<?php
$sub_menu = "200100";
include_once("./_common.php");
+2
View File
@@ -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")
{
+2 -2
View File
@@ -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}{&amp;to_date}={$to_date}";
+6 -3
View File
@@ -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&amp;fo_no=<?php echo $res['fo_no']?>&amp;page=<?php echo $page;?>&amp;fg_no=<?php echo $fg_no;?>&amp;st=<?php echo $st;?>&amp;sv=<?php echo $sv;?>">수정</a>
<a href="./form_write.php?w=u&amp;fo_no=<?php echo $res['fo_no']?>&amp;page=<?php echo $page;?>&amp;fg_no=<?php echo $fg_no;?>&amp;st=<?php echo get_text($st);?>&amp;sv=<?php echo get_text($sv);?>">수정</a>
<a href="javascript:void(book_del('<?php echo $res['fo_no']?>'));">삭제</a>
<a href="./sms_write.php?fo_no=<?php echo $res['fo_no']?>">보내기</a>
</div>
+2 -2
View File
@@ -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."&amp;to_date=".$to_date;
$query_string = $qstr ? '?'.$qstr : '';
+8 -8
View File
@@ -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');
?>
+14
View File
@@ -0,0 +1,14 @@
<?php
include_once('./_common.php');
include_once(G5_LIB_PATH.'/json.lib.php');
$ss_name = 'ss_comment_token';
set_session($ss_name, '');
$token = _token();
set_session($ss_name, $token);
die(json_encode(array('token'=>$token)));
?>
+2
View File
@@ -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))
+6
View File
@@ -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('내용에 올바르지 않은 코드가 다수 포함되어 있습니다.');
+13
View File
@@ -0,0 +1,13 @@
<?php
include_once('./_common.php');
include_once(G5_LIB_PATH.'/json.lib.php');
if(!$bo_table)
die(json_encode(array('error'=>'게시판 정보가 올바르지 않습니다.', 'url'=>G5_URL)));
set_session('ss_write_'.$bo_table.'_token', '');
$token = get_write_token($bo_table);
die(json_encode(array('error'=>'', 'token'=>$token, 'url'=>'')));
?>
+4 -1
View File
@@ -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();
@@ -689,7 +692,7 @@ if (!($w == 'u' || $w == 'cu') && $config['cf_email_use'] && $board['bo_use_emai
delete_cache_latest($bo_table);
if ($file_upload_msg)
alert($file_upload_msg, G5_HTTP_BBS_URL.'/board.php?bo_table='.$bo_table.'&amp;wr_id='.$wr_id.'&amp;page='.$page.$qstr);
alert($file_upload_msg, G5_HTTP_BBS_URL.'/board.php?bo_table='.$bo_table.'&amp;wr_id='.$wr_id.$qstr);
else
goto_url(G5_HTTP_BBS_URL.'/board.php?bo_table='.$bo_table.'&amp;wr_id='.$wr_id.$qstr);
?>
+1 -1
View File
@@ -5,7 +5,7 @@
********************/
define('G5_VERSION', '그누보드5');
define('G5_GNUBOARD_VER', '5.2.0');
define('G5_GNUBOARD_VER', '5.2.6');
// 이 상수가 정의되지 않으면 각각의 개별 페이지는 별도로 실행될 수 없음
define('_GNUBOARD_', true);
+11
View File
@@ -0,0 +1,11 @@
<?php
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
//플러그인 폴더 이름 및 스킨 폴더 이름
define('SMARTEDITOR_UPLOAD_IMG_CHECK', 1); // 이미지 파일을 썸네일 할수 있는지 여부를 체크합니다. ( 해당 파일이 이미지 파일인지 체크합니다. 1이면 사용, 0이면 사용 안함 )
define('SMARTEDITOR_UPLOAD_RESIZE', 0); // 스마트에디터 업로드 이미지파일 JPG, PNG 리사이즈 1이면 사용, 0이면 사용안함
define('SMARTEDITOR_UPLOAD_MAX_WIDTH', 1200); // 스마트에디터 업로드 이미지 리사이즈 제한 width
define('SMARTEDITOR_UPLOAD_MAX_HEIGHT', 2800); // 스마트에디터 업로드 이미지 리사이즈 제한 height
define('SMARTEDITOR_UPLOAD_SIZE_LIMIT', 20); // 스마트에디터 업로드 사이즈 제한 ( 기본 20MB )
define('SMARTEDITOR_UPLOAD_IMAGE_QUALITY', 98); // 썸네일 이미지 JPG, PNG 압축률
?>
+6
View File
@@ -0,0 +1,6 @@
<?php
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
define('G5_JS_VER', '161020');
define('G5_CSS_VER', '161020');
?>
+2
View File
@@ -28,6 +28,8 @@ $g4_config_file = trim($_POST['file_path']);
if(!$g4_config_file)
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 파일이 존재하지 않습니다.');
+5 -5
View File
@@ -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 감지
+33 -8
View File
@@ -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')
{
+69
View File
@@ -546,6 +546,26 @@ function font_resize(id, rmv_class, add_class)
set_cookie("ck_font_resize_add_class", add_class, 1, g5_cookie_domain);
}
/**
* 댓글 수정 토큰
**/
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;
});
});
+40 -2
View File
@@ -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("&amp;", $arr_query);
@@ -2423,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];
}
}
@@ -2447,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;
}
@@ -2464,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;
}
@@ -2981,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) {
@@ -3221,4 +3234,29 @@ class str_encrypt
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;
}
?>
@@ -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;
+1 -1
View File
@@ -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>
+1 -1
View File
@@ -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 &copy; <b>소유하신 도메인.</b> All rights reserved.<br>
+1 -1
View File
@@ -1 +1 @@
5.2.14
5.2.22
+227 -71
View File
@@ -31,7 +31,7 @@ class PHPMailer
* The PHPMailer Version number.
* @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
+1 -1
View File
@@ -34,7 +34,7 @@ class POP3
* @var string
* @access public
*/
public $Version = '5.2.14';
public $Version = '5.2.22';
/**
* Default POP3 port number.
+79 -11
View File
@@ -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;
}
}
+44
View File
@@ -0,0 +1,44 @@
{
"name": "phpmailer/phpmailer",
"type": "library",
"description": "PHPMailer is a full-featured email creation and transfer class for PHP",
"authors": [
{
"name": "Marcus Bointon",
"email": "phpmailer@synchromedia.co.uk"
},
{
"name": "Jim Jagielski",
"email": "jimjag@gmail.com"
},
{
"name": "Andy Prevost",
"email": "codeworxtech@users.sourceforge.net"
},
{
"name": "Brent R. Matzelle"
}
],
"require": {
"php": ">=5.0.0"
},
"require-dev": {
"phpdocumentor/phpdocumentor": "*",
"phpunit/phpunit": "4.7.*"
},
"suggest": {
"league/oauth2-google": "Needed for Google XOAUTH2 authentication"
},
"autoload": {
"classmap": [
"class.phpmailer.php",
"class.phpmaileroauth.php",
"class.phpmaileroauthgoogle.php",
"class.smtp.php",
"class.pop3.php",
"extras/EasyPeasyICS.php",
"extras/ntlm_sasl_client.php"
]
},
"license": "LGPL-2.1"
}
+3576
View File
File diff suppressed because it is too large Load Diff
+38
View File
@@ -0,0 +1,38 @@
<?php
/**
* This example shows how to use DKIM message authentication with PHPMailer.
* There's more to using DKIM than just this code - check out this article:
* @link https://yomotherboard.com/how-to-setup-email-server-dkim-keys/
* See also the DKIM code in the PHPMailer unit tests,
* which shows how to make a key pair from PHP.
*/
require '../PHPMailerAutoload.php';
//Create a new PHPMailer instance
$mail = new PHPMailer;
//Set who the message is to be sent from
$mail->setFrom('from@example.com', 'First Last');
//Set an alternative reply-to address
$mail->addReplyTo('replyto@example.com', 'First Last');
//Set who the message is to be sent to
$mail->addAddress('whoto@example.com', 'John Doe');
//Set the subject line
$mail->Subject = 'PHPMailer DKIM test';
//This should be the same as the domain of your From address
$mail->DKIM_domain = 'example.com';
//Path to your private key file
$mail->DKIM_private = 'dkim_private.pem';
//Set this to your own selector
$mail->DKIM_selector = 'phpmailer';
//If your private key has a passphrase, set it here
$mail->DKIM_passphrase = '';
//The identity you're signing as - usually your From address
$mail->DKIM_identity = $mail->From;
//send the message, check for errors
if (!$mail->send()) {
echo "Mailer Error: " . $mail->ErrorInfo;
} else {
echo "Message sent!";
}
@@ -0,0 +1,71 @@
<?php
/**
* This example shows how to handle a simple contact form.
*/
$msg = '';
//Don't run this unless we're handling a form submission
if (array_key_exists('email', $_POST)) {
date_default_timezone_set('Etc/UTC');
require '../PHPMailerAutoload.php';
//Create a new PHPMailer instance
$mail = new PHPMailer;
//Tell PHPMailer to use SMTP - requires a local mail server
//Faster and safer than using mail()
$mail->isSMTP();
$mail->Host = 'localhost';
$mail->Port = 25;
//Use a fixed address in your own domain as the from address
//**DO NOT** use the submitter's address here as it will be forgery
//and will cause your messages to fail SPF checks
$mail->setFrom('from@example.com', 'First Last');
//Send the message to yourself, or whoever should receive contact for submissions
$mail->addAddress('whoto@example.com', 'John Doe');
//Put the submitter's address in a reply-to header
//This will fail if the address provided is invalid,
//in which case we should ignore the whole request
if ($mail->addReplyTo($_POST['email'], $_POST['name'])) {
$mail->Subject = 'PHPMailer contact form';
//Keep it simple - don't use HTML
$mail->isHTML(false);
//Build a simple message body
$mail->Body = <<<EOT
Email: {$_POST['email']}
Name: {$_POST['name']}
Message: {$_POST['message']}
EOT;
//Send the message, check for errors
if (!$mail->send()) {
//The reason for failing to send will be in $mail->ErrorInfo
//but you shouldn't display errors to users - process the error, log it on your server.
$msg = 'Sorry, something went wrong. Please try again later.';
} else {
$msg = 'Message sent! Thanks for contacting us.';
}
} else {
$msg = 'Invalid email address, message ignored.';
}
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Contact form</title>
</head>
<body>
<h1>Contact us</h1>
<?php if (!empty($msg)) {
echo "<h2>$msg</h2>";
} ?>
<form method="POST">
<label for="name">Name: <input type="text" name="name" id="name"></label><br>
<label for="email">Email address: <input type="email" name="email" id="email"></label><br>
<label for="message">Message: <textarea name="message" id="message" rows="8" cols="20"></textarea></label><br>
<input type="submit" value="Send">
</form>
</body>
</html>
@@ -15,6 +15,7 @@
<p>Russian text: Пустое тело сообщения</p>
<p>Armenian text: Հաղորդագրությունը դատարկ է</p>
<p>Czech text: Prázdné tělo zprávy</p>
<p>Emoji: <span style="font-size: 48px">😂 🦄 💥 📤 📧</span></p>
</div>
</body>
</html>
+1 -1
View File
@@ -259,7 +259,7 @@ if (XRegExp) {
//---------------------------------
// Overriden native methods
// Overridden native methods
//---------------------------------
// Adds named capture support (with backreferences returned as `result.name`), and fixes two
+5 -6
View File
@@ -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>
+30 -15
View File
@@ -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);
+5 -12
View File
@@ -433,7 +433,7 @@ function tln_getnxtag($body, $offset)
*
* @param string $attvalue the by-ref value to check.
* @param string $regex the regular expression to check against.
* @param boolean $hex whether the entites are hexadecimal.
* @param boolean $hex whether the entities are hexadecimal.
* @return boolean True or False depending on whether there were matches.
*/
function tln_deent(&$attvalue, $regex, $hex = false)
@@ -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;
}
+2 -2
View File
@@ -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"],
+105 -3
View File
@@ -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: ';
+13 -13
View File
@@ -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: ';
+17 -17
View File
@@ -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: ';
+380
View File
@@ -0,0 +1,380 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
// ================================================================
// CHEditor Template
// ================================================================
-->
<Template>
<Container>
<Html>
<![CDATA[
<div class="cheditor-container">
<div id="toolbar" style="padding:4px;height:47px"></div>
<div id="editWrapper" class="cheditor-editarea-wrapper">
<iframe frameborder="0" class="cheditor-editarea"></iframe>
<textarea class="cheditor-editarea-text-content" spellcheck="false"></textarea>
</div>
<div id="modifyBlock" class="cheditor-modify-block"></div>
<div id="tagPath" class="cheditor-tag-path">
<span class="cheditor-status-bar">&lt;html&gt; </span>
</div>
<div id="resizeBar" class="cheditor-resizebar"></div>
<div id="viewMode" class="cheditor-viewmode">
<div id="rich" class="cheditor-tab-rich" title="입력 모드" alt="">&#160;</div>
<div id="code" class="cheditor-tab-code-off" title="HTML 편집" alt="">&#160;</div>
<div id="preview" class="cheditor-tab-preview-off" title="미리 보기" alt="">&#160;</div>
</div>
</div>
]]>
</Html>
</Container>
<PopupWindow>
<Html>
<![CDATA[
<div class="cheditor-popup-window" onselectstart="return false">
<div class="cheditor-popup-drag-handle">
<div class="cheditor-popup-titlebar">
<span><label class="cheditor-popup-title"></label></span>
</div>
</div>
<div class="cheditor-popup-cframe" id="cheditor-popup-cframe"></div>
</div>
]]>
</Html>
</PopupWindow>
<Toolbar>
<Image file="toolbar.png" />
<Group name="Print">
<Button name="Print" tooltip="인쇄">
<Attribute class="cheditor-tb-bg" width="24" height="23">
<Icon position="0" width="16" class="cheditor-tb-icon" margin="4px" />
<Execution method="doCmd" value="Print" />
</Attribute>
</Button>
<Button name="NewDocument" tooltip="새 문서">
<Attribute class="cheditor-tb-bg" width="23" height="23">
<Icon position="16" width="16" class="cheditor-tb-icon" />
<Execution method="doCmd" value="NewDocument" />
</Attribute>
</Button>
</Group>
<Group name="Undo">
<Button name="Undo" tooltip="되돌리기">
<Attribute class="cheditor-tb-bg" width="24" height="23">
<Icon position="32" width="16" class="cheditor-tb-icon" margin="4px" />
<Execution method="doCmd" value="Undo" />
</Attribute>
</Button>
<Button name="Redo" tooltip="다시 실행">
<Attribute class="cheditor-tb-bg" width="23" height="23">
<Icon position="48" width="16" class="cheditor-tb-icon" />
<Execution method="doCmd" value="Redo" />
</Attribute>
</Button>
</Group>
<Group name="Edit">
<Button name="Copy" tooltip="복사하기">
<Attribute class="cheditor-tb-bg" width="24" height="23" check="1">
<Icon position="64" width="16" class="cheditor-tb-icon" margin="4px" />
<Execution method="doCmd" value="Copy" />
</Attribute>
</Button>
<Button name="Cut" tooltip="오려두기">
<Attribute class="cheditor-tb-bg" width="23" height="23" check="1">
<Icon position="80" width="16" class="cheditor-tb-icon" />
<Execution method="doCmd" value="Cut" />
</Attribute>
</Button>
<Button name="Paste" tooltip="텍스트로 붙이기">
<Attribute class="cheditor-tb-bg" width="23" height="23">
<Icon position="96" width="16" class="cheditor-tb-icon" />
<Execution method="doCmd" value="Paste" />
</Attribute>
</Button>
<Button name="PasteFromWord" tooltip="MS 워드 붙이기">
<Attribute class="cheditor-tb-bg" width="23" height="23">
<Icon position="112" width="16" class="cheditor-tb-icon" />
<Execution method="doCmd" value="PasteFromWord" />
</Attribute>
</Button>
<Button name="SelectAll" tooltip="전체 선택">
<Attribute class="cheditor-tb-bg" width="23" height="23">
<Icon position="128" width="16" class="cheditor-tb-icon" />
<Execution method="doCmd" value="SelectAll" />
</Attribute>
</Button>
</Group>
<Group name="Color">
<Button name="BackColor" tooltip="형광펜">
<Attribute class="cheditor-tb-bg30" width="30" default="#fff" height="23" check="1">
<Icon position="240" width="23" class="cheditor-tb-icon23" />
<Execution method="showPulldown" value="BackColor" />
</Attribute>
</Button>
<Button name="ForeColor" tooltip="글자색">
<Attribute class="cheditor-tb-bg30" width="30" default="#000" height="23" check="1">
<Icon position="263" width="23" class="cheditor-tb-icon23" />
<Execution method="showPulldown" value="ForeColor" />
</Attribute>
</Button>
</Group>
<Group name="Format">
<Button name="Bold" tooltip="진하게">
<Attribute class="cheditor-tb-bg" width="24" height="23" check="1">
<Icon position="144" width="16" class="cheditor-tb-icon" margin="4px" />
<Execution method="doCmd" value="Bold" />
</Attribute>
</Button>
<Button name="Italic" tooltip="기울임">
<Attribute class="cheditor-tb-bg" width="23" height="23" check="1">
<Icon position="160" width="16" class="cheditor-tb-icon" />
<Execution method="doCmd" value="Italic" />
</Attribute>
</Button>
<Button name="Underline" tooltip="밑줄">
<Attribute class="cheditor-tb-bg" width="23" height="23" check="1">
<Icon position="176" width="16" class="cheditor-tb-icon" />
<Execution method="doCmd" value="Underline" />
</Attribute>
</Button>
<Button name="Strikethrough" tooltip="취소선">
<Attribute class="cheditor-tb-bg" width="23" height="23" check="1">
<Icon position="192" width="16" class="cheditor-tb-icon" />
<Execution method="doCmd" value="Strikethrough" />
</Attribute>
</Button>
<Button name="Superscript" tooltip="위 첨자">
<Attribute class="cheditor-tb-bg" width="23" height="23" use="" check="1">
<Icon position="208" width="16" class="cheditor-tb-icon" />
<Execution method="doCmd" value="Superscript" />
</Attribute>
</Button>
<Button name="Subscript" tooltip="아래 첨자">
<Attribute class="cheditor-tb-bg" width="23" height="23" use="" check="1">
<Icon position="224" width="16" class="cheditor-tb-icon" />
<Execution method="doCmd" value="Subscript" />
</Attribute>
</Button>
</Group>
<Group name="Alignment">
<Button name="JustifyLeft" tooltip="왼쪽 정렬">
<Attribute class="cheditor-tb-bg" width="24" height="23" check="1">
<Icon position="286" width="16" class="cheditor-tb-icon" margin="4px" />
<Execution method="doCmd" value="JustifyLeft" />
</Attribute>
</Button>
<Button name="JustifyCenter" tooltip="가운데 정렬">
<Attribute class="cheditor-tb-bg" width="23" height="23" check="1">
<Icon position="302" width="16" class="cheditor-tb-icon" />
<Execution method="doCmd" value="JustifyCenter" />
</Attribute>
</Button>
<Button name="JustifyRight" tooltip="오른쪽 정렬">
<Attribute class="cheditor-tb-bg" width="23" height="23" check="1">
<Icon position="318" width="16" class="cheditor-tb-icon" />
<Execution method="doCmd" value="JustifyRight" />
</Attribute>
</Button>
<Button name="JustifyFull" tooltip="양쪽 정렬">
<Attribute class="cheditor-tb-bg" width="23" height="23" check="1">
<Icon position="334" width="16" class="cheditor-tb-icon" />
<Execution method="doCmd" value="JustifyFull" />
</Attribute>
</Button>
</Group>
<Group name="List">
<Button name="OrderedList" tooltip="문단 번호">
<Attribute class="cheditor-tb-bg" width="24" height="23" check="1" type="combo">
<Icon position="350" width="16" class="cheditor-tb-icon" margin="4px" />
<Execution method="doCmd" value="InsertOrderedList" />
</Attribute>
</Button>
<Button name="OrderedListCombo" tooltip="문단 번호 확장">
<Attribute class="cheditor-tb-bgcombo" width="10" height="23" type="combobox" node="OrderedList">
<Icon width="10" class="cheditor-tb-combo" margin="0px" />
<Execution method="showPulldown" value="OrderedList" />
</Attribute>
</Button>
<Button name="UnOrderedList" tooltip="글 머리표">
<Attribute class="cheditor-tb-bg" width="23" height="23" check="1" type="combo">
<Icon position="366" width="16" class="cheditor-tb-icon" />
<Execution method="doCmd" value="InsertUnOrderedList" />
</Attribute>
</Button>
<Button name="UnOrderedListCombo" tooltip="글 머리표 확장">
<Attribute class="cheditor-tb-bgcombo" width="10" height="23" type="combobox" node="UnOrderedList">
<Icon width="10" class="cheditor-tb-combo" margin="0px" />
<Execution method="showPulldown" value="UnOrderedList" />
</Attribute>
</Button>
</Group>
<Group name="Outdent">
<Button name="Outdent" tooltip="왼쪽 여백 줄이기">
<Attribute class="cheditor-tb-bg" width="24" height="23">
<Icon position="382" width="16" class="cheditor-tb-icon" />
<Execution method="doCmd" value="Outdent" />
</Attribute>
</Button>
<Button name="Indent" tooltip="왼쪽 여백 늘이기">
<Attribute class="cheditor-tb-bg" width="23" height="23">
<Icon position="398" width="16" class="cheditor-tb-icon" />
<Execution method="doCmd" value="Indent" />
</Attribute>
</Button>
</Group>
<Group name="Split">
</Group>
<Group name="FormatBlock">
<Button name="FormatBlock" tooltip="스타일">
<Attribute class="cheditor-tb-bg55" width="55" height="23" check="1">
<Icon class="cheditor-tb-text" alt="스타일" />
<Execution method="showPulldown" value="FormatBlock" />
</Attribute>
</Button>
</Group>
<Group name="FontName">
<Button name="FontName" tooltip="글꼴">
<Attribute class="cheditor-tb-bg55" width="55" height="23" check="1">
<Icon class="cheditor-tb-text" alt="굴림" />
<Execution method="showPulldown" value="FontName" />
</Attribute>
</Button>
</Group>
<Group name="FontSize">
<Button name="FontSize" tooltip="글꼴 크기">
<Attribute class="cheditor-tb-bg40" width="41" height="23" check="1">
<Icon class="cheditor-tb-text" alt="9pt" />
<Execution method="showPulldown" value="FontSize" />
</Attribute>
</Button>
</Group>
<Group name="LineHeight">
<Button name="LineHeight" tooltip="줄 간격">
<Attribute class="cheditor-tb-bg55" width="55" height="23" check="1">
<Icon class="cheditor-tb-text" alt="줄 간격" />
<Execution method="showPulldown" value="LineHeight" />
</Attribute>
</Button>
</Group>
<Group name="RemoveFormat">
<Button name="RemoveFormat" tooltip="서식 지우기">
<Attribute class="cheditor-tb-bg" width="24" height="23">
<Icon position="414" width="16" class="cheditor-tb-icon" margin="4px" />
<Execution method="doCmd" value="RemoveFormat" />
</Attribute>
</Button>
<Button name="ClearTag" tooltip="모든 HTML 태그 제거">
<Attribute class="cheditor-tb-bg" width="23" height="23">
<Icon position="430" width="16" class="cheditor-tb-icon" />
<Execution method="doCmd" value="ClearTag" />
</Attribute>
</Button>
</Group>
<Group name="Insert">
<Button name="TextBlock" tooltip="글 상자">
<Attribute class="cheditor-tb-bg" width="24" height="23" check="1">
<Icon position="446" width="16" class="cheditor-tb-icon" margin="4px" />
<Execution method="showPulldown" value="TextBlock" />
</Attribute>
</Button>
<Button name="Symbol" tooltip="특수 문자">
<Attribute class="cheditor-tb-bg" width="23" height="23">
<Icon position="462" width="16" class="cheditor-tb-icon" />
<Execution method="windowOpen" value="Symbol" />
</Attribute>
</Button>
<Button name="HR" tooltip="가로줄">
<Attribute class="cheditor-tb-bg" width="23" height="23">
<Icon position="478" width="16" class="cheditor-tb-icon" />
<Execution method="doCmd" value="InsertHorizontalRule" />
</Attribute>
</Button>
<Button name="SmileyIcon" tooltip="표정 아이콘">
<Attribute class="cheditor-tb-bg" width="23" height="23">
<Icon position="494" width="16" class="cheditor-tb-icon" />
<Execution method="windowOpen" value="EmotionIcon" />
</Attribute>
</Button>
</Group>
<Group name="Table">
<Button name="Table" tooltip="표 만들기">
<Attribute class="cheditor-tb-bg" width="24" height="23">
<Icon position="510" width="16" class="cheditor-tb-icon" margin="4px" />
<Execution method="windowOpen" value="Table" />
</Attribute>
</Button>
<Button name="ModifyTable" tooltip="표 수정">
<Attribute class="cheditor-tb-bg" width="23" height="23">
<Icon position="526" width="16" class="cheditor-tb-icon" />
<Execution method="windowOpen" value="ModifyTable" />
</Attribute>
</Button>
<Button name="Layout" tooltip="레이아웃">
<Attribute class="cheditor-tb-bg" width="23" height="23">
<Icon position="542" width="16" class="cheditor-tb-icon" />
<Execution method="windowOpen" value="Layout" />
</Attribute>
</Button>
</Group>
<Group name="Link">
<Button name="Link" tooltip="하이퍼링크">
<Attribute class="cheditor-tb-bg" width="24" height="23">
<Icon position="558" width="16" class="cheditor-tb-icon" margin="4px" />
<Execution method="windowOpen" value="Link" />
</Attribute>
</Button>
<Button name="UnLink" tooltip="하이퍼링크 없애기">
<Attribute class="cheditor-tb-bg" width="23" height="23" check="1">
<Icon position="574" width="16" class="cheditor-tb-icon" />
<Execution method="doCmd" value="UnLink" />
</Attribute>
</Button>
</Group>
<Group name="ImageUpload">
<Button name="Image" tooltip="내 PC 사진 넣기">
<Attribute class="cheditor-tb-bg44" width="50" height="23">
<Icon position="590" width="36" class="cheditor-tb-icon36" margin="6px" />
<Execution method="windowOpen" value="ImageUpload" />
</Attribute>
</Button>
</Group>
<Group name="ImageWeb">
<Button name="ImageUrl" tooltip="웹 사진">
<Attribute class="cheditor-tb-bg44" width="50" height="23">
<Icon position="626" width="36" class="cheditor-tb-icon36" margin="6px" />
<Execution method="windowOpen" value="ImageUrl" />
</Attribute>
</Button>
</Group>
<Group name="Media">
<Button name="Flash" tooltip="플래쉬 동영상">
<Attribute class="cheditor-tb-bg" width="24" height="23">
<Icon position="662" width="16" class="cheditor-tb-icon" margin="4px" />
<Execution method="windowOpen" value="FlashMovie" />
</Attribute>
</Button>
<Button name="Media" tooltip="미디어">
<Attribute class="cheditor-tb-bg" width="23" height="23">
<Icon position="678" width="16" class="cheditor-tb-icon" />
<Execution method="windowOpen" value="Embed" />
</Attribute>
</Button>
<Button name="Map" tooltip="지도">
<Attribute class="cheditor-tb-bg" width="23" height="23">
<Icon position="694" width="16" class="cheditor-tb-icon" />
<Execution method="windowOpen" value="GoogleMap" />
</Attribute>
</Button>
</Group>
<Group name="PageBreak">
<Button name="PageBreak" tooltip="인쇄 쪽 나눔">
<Attribute class="cheditor-tb-bg" width="24" height="23">
<Icon position="710" width="16" class="cheditor-tb-icon" margin="4px" />
<Execution method="doCmd" value="PageBreak" />
</Attribute>
</Button>
</Group>
</Toolbar>
</Template>
File diff suppressed because it is too large Load Diff
Binary file not shown.
Binary file not shown.
+185
View File
@@ -0,0 +1,185 @@
body {
background-color: #fff;
margin: 0;
border: 0;
padding: 0;
font-size: 9pt;
font-family: "Malgun Gothic", "Apple SD Gothic Neo", gulim, monospace;
line-height: 1em;
overflow: hidden;
}
td, input {
font-size: 9pt;
vertical-align: middle;
margin: 0;
line-height: 15px;
height: 15px;
}
select {
font-size: 9pt;
vertical-align: middle;
margin: 0;
}
.handCursor {
cursor: pointer;
}
td.hover
{
background-color : Fuchsia;
}
table.dlg {
border: 0;
}
fieldset {
border: 1px solid #ccc;
padding: 2px;
margin: 0;
}
.content-outline {
border: 1px solid #ccc;
border-radius: 4px;
padding: 5px;
margin: 0;
}
.dlg td {
text-align: left;
height: 20px;
}
form {
display: inline;
}
.dlg input {
border: 2px;
}
.img {
border: 0;
vertical-align: middle;
}
.font-normal {
font-size: 9pt;
}
legend {
font-size: 9pt;
font-weight: bold;
}
.bottom-status {
background-color: #fff;
margin-top: 10px;
padding: 0;
text-align: center;
height: 24px;
vertical-align: middle;
}
.button {
width: 64px;
height: 22px;
margin: 1px 2px;
cursor: pointer;
vertical-align: middle;
}
.button8em {
font-size: 9pt;
padding-top: 2px !important;
height: 21px;
width: 8em;
}
.button10em {
font-size: 9pt;
padding-top: 1px !important;
height: 21px;
width: 10em;
}
.emIcon {
width: 19px;
height: 19px;
cursor: pointer;
}
.schar {
border: 1px solid #ccc;
background-color: #fff;
width: 18px;
height: 17px;
text-align: center;
cursor: pointer;
font-size: 12px;
line-height: 1.2em;
}
.spacer {
margin: 10px 0 0 0;
}
.spacer5 {
margin: 5px 0 0 0;
clear: both;
}
.wrapper {
text-align: center;
}
.clear {
clear: both;
}
.flash-movie-source {
margin: 0 auto;
}
.flash-player-wrapper {
width: 560px;
height: 315px;
border: 1px #a0a0a0 solid;
text-align: center;
overflow: auto;
margin: 0 auto;
background-color: #fff;
display: block;
}
.media-player-wrapper {
height: 200px;
margin-top: 5px;
text-align: center;
overflow-x: auto;
overflow-y: hidden;
}
.hr {
border: 0;
background: #e0e0e0;
height: 1px;
}
.colorCellMouseOver {
line-height: 0;
font-size: 0;
height: 8px;
width: 8px;
border: 1px solid #fff;
}
.colorCellMouseOut {
line-height: 8px;
font-size: 0;
height: 8px;
width: 8px;
border: 1px solid #000;
}
.colorInputBox {
background-color: #000;
text-align: center;
border: 1px solid #000;
height: 16px;
}
.colorWrapper {
border: 1px solid #000;
background-color: #fff;
position: absolute;
padding: 2px;
display: none;
}
.colorPickerButton {
background: url("../icons/button/color_picker.png") no-repeat center center;
width: 24px;
height: 20px;
cursor: pointer;
float: left;
}
.colorPickerButtonGray {
background: url("../icons/button/color_picker_disable.png") no-repeat center center;
width: 24px;
height: 20px;
cursor: pointer;
float: left;
}
+23
View File
@@ -0,0 +1,23 @@
html, body {
}
p {
margin: 0;
}
table, td, th { border:1px dotted #ccc; }
table { border-collapse: collapse }
/*-------------------------------------------------------------------------------*/
.ch_bogus_spacer {}
.cheditor-zero-width { font-family: monospace; }
.cheditor-insertpara-pointer {
height: 1px;
display: none;
overflow: hidden;
background-color: red;
position: absolute;
}
.cheditor-add-paragraph {
border: #999 dotted 1px;
margin: 1px 0px;
}
+136
View File
@@ -0,0 +1,136 @@
#uploadWindow {
display: none;
}
.clear { clear: both; }
#container {
padding: 0;
}
.imageListWrapperHtml5, .imageListWrapper, .dragOver {
background-color: #fff;
position: absolute;
height: 295px;
width: 522px;
overflow-y: scroll;
border-radius: 4px;
border: 1px red solid;
}
.imageListWrapperHtml5 {
border: 2px #66b2ff dashed;
}
.imageListWrapper {
border: 1px #aaa solid;
box-shadow: 0 0 3px #aaa;
}
.dragOver {
border: 2px #ff3399 dashed;
}
#imageInfoBox {
position: absolute;
left: 548px;
}
.imageInfoTitle {
text-align: center;
background-color: #e0e0e0;
width: 130px;
font-family: "Malgun Gothic",gulim;
font-weight: bold;
font-size: 12px;
}
.imageInfoTitle span {
display: inline-block;
margin-top: -1px;
line-height: 22px;
}
.remove-button {
width: 93px;
height: 22px;
cursor: pointer;
vertical-align: middle;
}
.imageBox, .imageBoxHighlighted {
width: 120px;
height: 90px;
margin: 3px 3px;
float: left;
}
.imageBox_theImage,.imageBox_theImage_over {
width: 100%;
height: 100%;
position: relative;
display: block;
background-color: #fff;
}
.imageBox .imageBox_theImage{
border: 1px solid #e0e0e0;
background-image: url('../icons/dot.gif');
background-position: center center;
background-repeat: no-repeat;
}
.imageBox .imageBox_theImage_over {
border: 1px solid #a0a0a0;
background-image: url('../icons/dot.gif');
background-position: center center;
background-repeat: no-repeat;
cursor: pointer;
}
.imageBoxHighlighted .imageBox_theImage {
border: 1px solid #ff6600;
}
.imageBoxHighlighted .imageBox_theImage_over {
border: 1px solid #ff6600;
background-image: url('../icons/dot.gif');
background-position: center center;
background-repeat: no-repeat;
}
.removeButton, .removeButton_over {
display: none;
position: absolute;
cursor: pointer;
background-image: url(../icons/imageUpload/cross-small.png);
background-repeat: no-repeat;
background-position: center center;
}
.removeButton {
border: 1px solid #a0a0a0;
}
.removeButton_over {
border: 1px solid #808080;
}
#insertionMarker {
height: 102px;
width: 6px;
position: absolute;
display: none;
}
#insertionMarker img {
float: left;
}
#dragDropContent{
position: absolute;
z-index: 10;
display: none;
}
.button {
width: 64px;
height: 22px;
margin: 0 2px;
cursor: pointer;
vertical-align: middle;
}
body {
margin: 0;
padding: 0;
overflow: hidden;
background-color: #fff;
line-height: 1em;
font-family: 'Malgun Gothic', gulim, tahoma, helvetica;
font-size: 12px;
}
+5
View File
@@ -0,0 +1,5 @@
/* CSS file */
Application
{
}
+95
View File
@@ -0,0 +1,95 @@
/************************************************
CHEditor Image Caption Util
************************************************/
img.chimg_photo
{
border: 1px darkgray solid;
padding:10px;
}
div.imgblock
{
}
div.leftjust
{
}
div.rightjust
{
}
div.caption
{
margin-top: 5px;
margin-left: 0.2em;
color: darkgray;
font-size: 9pt;
}
div.caption-marker
{
float: left;
margin-right: 0.2em;
}
div.caption-text
{
float: left;
clear: right;
text-align: left;
}
.imageUtil {
cursor: url(icons/imageutil/zoomin.cur), pointer;
outline: none;
}
.imageUtil img {
border: 2px solid gray;
}
.imageUtil:hover img {
border: 2px solid silver;
}
.imageUtil-image {
border-bottom: 1px solid white;
}
.imageUtil-image-blur {
}
.imageUtil-caption {
display: none;
border-bottom: 1px solid white;
font-family: gulim, Verdana, Helvetica;
font-size: 9pt;
padding: 5px;
background-color: #fff;
}
.imageUtil-loading {
display: block;
color: white;
font-size: 9px;
font-weight: normal;
text-decoration: none;
padding: 3px;
border-top: 1px solid white;
border-bottom: 1px solid white;
background-color: black;
padding-left: 22px;
background-image: url(icons/imageutil/loader.gif);
background-repeat: no-repeat;
background-position: 3px 1px;
}
a.imageUtil-credits,
a.imageUtil-credits i {
padding: 2px;
color: silver;
text-decoration: none;
font-size: 10px;
}
a.imageUtil-credits:hover,
a.imageUtil-credits:hover i {
color: white;
background-color: gray;
}
.imageUtil-display-block {
display: block;
}
.imageUtil-display-none {
display: none;
}
+653
View File
@@ -0,0 +1,653 @@
a.cheditor-tag-path-elem {
text-decoration: none;
color: #0033cc;
font-size: 8pt;
font-family: "Malgun Gothic", "Apple SD Gothic Neo", dotum, monospace;
cursor: pointer;
}
a.cheditor-tag-path-elem:hover {
color: #0033cc;
text-decoration: underline;
cursor: pointer;
}
.cheditor-container {
border-top: 1px #ccc solid;
position: relative;
text-align: left;
}
.cheditor-tb-wrapper {
border-right: 1px #ccc solid;
border-left: 1px #ccc solid;
border-bottom: 1px #ccc solid;
position: relative;
display: block;
background-color: #f0f0f0;
zoom:1;
height:auto ! important;
}
.cheditor-tb-wrapper:after{display:block;visibility:hidden;clear:both;content:""}
.cheditor-tb-wrapper-readonly {
border-right: 1px #ccc solid;
border-left: 1px #ccc solid;
border-bottom: 1px #ccc solid;
position: relative;
display: block;
background: #f0f0f0 url(../icons/readonlymode.png) no-repeat 10px center;
}
.cheditor-tb-wrapper-code {
border-right: 1px #ccc solid;
border-left: 1px #ccc solid;
border-bottom: 1px #ccc solid;
position: relative;
display: block;
background: #f0f0f0 url(../icons/viewmode_code.png) no-repeat 10px center;
}
.cheditor-tb-wrapper-preview {
border-right: 1px #ccc solid;
border-left: 1px #ccc solid;
border-bottom: 1px #ccc solid;
position: relative;
display: block;
background: #f0f0f0 url(../icons/viewmode_preview.png) no-repeat 10px center;
}
.cheditor-tb-wrapper-readonly div, .cheditor-tb-wrapper-code div, .cheditor-tb-wrapper-preview div {
display: none;
}
.cheditor-tb-fullscreen {
width: 16px;
height: 16px;
float: right;
margin-top: 3px;
cursor: pointer;
background: transparent url(../icons/fullscreen.png) no-repeat center center;
}
.cheditor-tb-fullscreen-disable {
display: none;
}
.cheditor-tb-fullscreen-actual {
width: 16px;
height: 16px;
float: right;
margin-top: 3px;
cursor: pointer;
background: transparent url(../icons/fullscreen_actual.png) no-repeat center center;
}
.cheditor-editarea-wrapper {
border-right: 1px #ccc solid;
border-bottom: 1px #ccc solid;
border-left: 1px #ccc solid;
width: auto;
overflow: hidden;
}
.cheditor-editarea {
width: 100%;
overflow-x: hidden;
overflow-y: auto;
margin: 0;
padding: 0;
display: block;
}
@font-face {
font-family: 'SourceCodePro';
src: url('SourceCodePro.eot');
src: url('SourceCodePro.woff') format('woff');
}
.cheditor-editarea-text-content {
overflow-x: hidden;
overflow-y: scroll;
margin: 0;
border: 1px solid transparent;
padding: 7px 10px;
display: none;
resize: none;
outline: none;
font-family: SourceCodePro, monospace;
font-size: 12px;
}
.cheditor-modify-block .cheditor-ico {
width: 16px;
height: 16px;
vertical-align: middle;
margin-right: 5px;
}
.cheditor-modify-block select {
font-family: "Malgun Gothic", "Apple SD Gothic Neo", gulim, monospace;
font-size: 9pt;
color: #000;
}
.cheditor-modify-block div {
padding: 5px 10px 5px 10px;
color: #000;
display: block;
}
.cheditor-modify-block div .wrap-text-desc {
line-height: 1em;
color: #000;
}
.cheditor-modify-block div .user-input-alt {
width: 120px;
margin: 3px 10px 0 5px;
height: 15px;
line-height: 15px;
padding-top: 1px;
font-size: 9pt;
font-family: "Malgun Gothic", "Apple SD Gothic Neo", gulim, monospace;
color: #000;
}
.cheditor-modify-block div .user-input-caption {
width: 350px;
margin: 7px 10px 0 5px;
height: 15px;
line-height: 15px;
padding-top: 1px;
font-size: 9pt;
font-family: "Malgun Gothic", "Apple SD Gothic Neo", gulim, monospace;
color: #000;
}
.cheditor-modify-block div .caption-align {
margin: 7px 0 0 4px;
font-size: 9pt;
vertical-align: top;
font-family: "Malgun Gothic", "Apple SD Gothic Neo", gulim, monospace;
color: #000;
}
.cheditor-modify-block div .wrap-checked {
vertical-align: middle;
padding: 0;
margin-right: 2px;
}
.cheditor-modify-block div .input-submit {
cursor: pointer;
vertical-align: middle;
margin-top: -2px;
margin-left: 10px;
height: 20px;
width: 64px;
}
.cheditor-modify-block div .color-picker {
cursor: pointer;
vertical-align: middle;
height: 20px;
width: 20px;
}
.cheditor-modify-block div .delete-submit {
cursor: pointer;
vertical-align: middle;
margin-top: -2px;
margin-left: 3px;
height: 20px;
width: 64px;
}
.cheditor-modify-block div .edit-table-ico {
cursor: pointer;
vertical-align: middle;
width: 16px;
height: 16px;
margin: 0 3px;
}
.cheditor-modify-block {
display: none;
border-right: 1px #ccc solid;
border-bottom: 1px #ccc solid;
border-left: 1px #ccc solid;
padding: 2px;
background-color: #eee;
font-size: 9pt;
font-family: "Malgun Gothic", "Apple SD Gothic Neo", gulim, monospace;
text-align: center;
}
.cheditor-status-bar {
font-size: 8pt;
font-family: "Malgun Gothic", "Apple SD Gothic Neo", dotum, monospace;
color: #333;
}
.cheditor-tag-path {
border-right: 1px #ccc solid;
border-bottom: 1px #ccc solid;
border-left: 1px #ccc solid;
padding: 0 2px 0 2px;
display: none;
height: 18px;
line-height: 18px;
overflow: hidden;
}
.cheditor-viewmode {
padding: 0 4px 0 4px;
height: 16px;
background: transparent url(../icons/statusbar_bgline.gif) repeat-x 0 0;
}
.cheditor-viewmode div {
width: 24px;
height: 16px;
cursor: pointer;
}
.cheditor-tab-rich {
background: transparent url(../icons/edit_mode_rich_a.png) no-repeat 0 0;
float: left;
}
.cheditor-tab-rich-off {
background: transparent url(../icons/edit_mode_rich_b.png) no-repeat 0 0;
float: left;
}
.cheditor-tab-code {
background: transparent url(../icons/edit_mode_code_a.png) no-repeat 0 0;
float: left;
}
.cheditor-tab-code-off {
background: transparent url(../icons/edit_mode_code_b.png) no-repeat 0 0;
float: left;
}
.cheditor-tab-preview {
background: transparent url(../icons/edit_mode_view_a.png) no-repeat 0 0;
float: left;
}
.cheditor-tab-preview-off {
background: transparent url(../icons/edit_mode_view_b.png) no-repeat 0 0;
float: left;
}
.cheditor-resizebar {
height: 11px;
overflow: hidden;
border-left: 1px #ccc solid;
border-right: 1px #ccc solid;
cursor: s-resize;
background: #eee url(../icons/splitter.gif) no-repeat center top;
}
.cheditor-resizebar-off {
height: 11px;
overflow: hidden;
border-left: 1px #ccc solid;
border-right: 1px #ccc solid;
cursor: default;
background-color: #eee;
}
.cheditor_mode_icon { width: 24px; height: 16px; cursor: pointer; vertical-align: top }
.cheditor-pulldown-container {
border: #7d8db0 1px solid;
background-color: #fff;
padding: 1px;
position: relative;
-moz-box-shadow: 0 0 5px #aaa;
-webkit-box-shadow: 0 0 5px #aaa;
box-shadow: 1px 1px 10px #bbb;
}
.cheditor-pulldown-container div {
padding: 2px 2px 2px 15px;
font-size: 9pt;
font-family: "Malgun Gothic", "Apple SD Gothic Neo", gulim, monospace;
color: #222;
position: relative;
display: block;
line-height: 1.2;
margin: 2px 2px;
}
.cheditor-pulldown-color-container {
border: #7d8db0 1px solid;
-moz-box-shadow: 0 0 5px #aaa;
-webkit-box-shadow: 0 0 5px #aaa;
box-shadow: 1px 1px 10px #bbb;
background-color: #fff;
padding: 2px;
}
.cheditor-pulldown-container div label, .cheditor-pulldown-textblock-container div label {
display: block;
}
.cheditor-pulldown-textblock-container div div {
text-align: center;
padding: 2px;
font-size: 9pt;
color: #000;
line-height: 1.2;
}
.cheditor-pulldown-textblock-container div {
padding: 1px;
}
.cheditor-pulldown-textblock-out {
border: #fff 1px solid;
}
.cheditor-pulldown-textblock-over {
border: #ccc 1px solid;
}
.cheditor-pulldown-textblock-container {
border: #7d8db0 1px solid;
-moz-box-shadow: 0 0 5px #aaa;
-webkit-box-shadow: 0 0 5px #aaa;
box-shadow: 1px 1px 10px #bbb;
background-color: #fff;
padding: 2px;
}
.cheditor-pulldown-mouseout {
border: #fff 1px solid;
}
.cheditor-pulldown-mouseover {
background-color: #f0f0f0;
border: #e0e0e0 1px solid;
}
.cheditor-pulldown-frame {
position: absolute;
visibility: hidden;
z-index: -1;
width: 1px;
height: 1px;
line-height: 12px;
}
.cheditor-pulldown-color-cell-over, .cheditor-pulldown-color-cell {
float: left;
width: 14px;
height: 14px;
margin: 1px;
cursor: pointer;
}
.cheditor-pulldown-color-cell-over {
border: 1px #000 solid;
}
.cheditor-pulldown-color-cell-over span {
width: 12px;
height: 12px;
border: 1px #fff solid;
display: block;
}
.cheditor-pulldown-color-cell {
border: 1px #999 solid;
}
.cheditor-pulldown-color-cell span {
width: 14px;
height: 14px;
display: block;
border: none;
}
.cheditor-pulldown-color-selected {
border: 1px solid #999;
text-align: left;
margin: 4px 0 0 1px;
padding-left: 5px;
height: 15px;
line-height: 15px;
font-size: 11px;
font-family: verdana, monospace;
width: 55px;
vertical-align: -10%;
}
.cheditor-pulldown-color-reset, .cheditor-pulldown-color-show-picker {
height: 19px;
width: 16px;
cursor: pointer;
display: inline-block;
vertical-align: middle;
margin-left: 3px;
}
.cheditor-pulldown-color-reset {
background: #fff url(../icons/color_picker_reset.png) no-repeat center center;
}
.cheditor-pulldown-color-show-picker {
background: #fff url(../icons/color_picker.png) no-repeat center center;
}
.cheditor-pulldown-color-submit {
vertical-align: middle;
margin: 4px 1px 0 0;
height: 19px;
width: 40px;
cursor: pointer;
right: 0;
position: absolute;
}
.cheditor-container-fullscreen {
position: fixed;
left: 0;
top: 0;
_position: absolute;
z-index: 1000;
text-align: left;
background-color: #fff;
}
.cheditor-popupModalBackground {
background-color: #fff;
position: fixed;
_position: absolute;
display: none;
top: 0;
left: 0;
width: 100%;
height: 100%;
}
.cheditor-popup-window {
border: 1px solid #0078D7;
border-radius: 5px;
background-color: #0078D7;
display: none;
position: absolute;
top: 0;
left: 0;
-moz-box-shadow: 0 0 5px #aaa;
-webkit-box-shadow: 0 0 5px #aaa;
box-shadow: 0 0 10px #bbb;
padding: 0;
overflow: hidden;
}
.cheditor-popup-cmd-button {
width: 64px;
height: 22px;
margin: 5px 2px;
cursor: pointer;
vertical-align: middle;
}
.cheditor-popup-cframe {
background-color: #fff;
margin: 0;
padding: 10px;
border: none;
text-align: center;
}
.cheditor-popup-cframe iframe {
margin: 0;
padding: 0;
overflow: hidden;
}
.cheditor-popup-drag-handle {
height: 31px;
}
.cheditor-popup-titlebar {
padding-left: 10px;
line-height: 30px;
}
.cheditor-popup-title {
font-size: 12px;
font-family: "Malgun Gothic", "Apple SD Gothic Neo", gulim, monospace;
font-weight: bold;
color: #fff;
}
.cheditor-dragWindowTransparent {
background-color: #fff;
position: absolute;
display: block;
left: 0px;
top: 27px;
}
.cheditor-pulldown-wrapper {
line-height: 1;
}
.cheditor-toolbar-icon-wrapper {
margin: 0 2px 0 0;
float: left;
height: 24px;
overflow: hidden;
}
.cheditor-tb-icon {
height: 22px;
width: 16px;
overflow: hidden;
}
.cheditor-tb-icon-disable {
height: 22px;
width: 16px;
overflow: hidden;
filter: alpha(opacity=40) gray;
opacity: 0.4;
}
.cheditor-tb-text {
padding: 0;
margin: 0;
color: #333;
height: 20px;
line-height: 20px;
}
.cheditor-tb-text-disable {
padding: 0;
margin: 0;
height: 20px;
line-height: 20px;
color: #333;
overflow: hidden;
filter: alpha(opacity=40) gray;
-webkit-filter: grayscale(100%);
opacity: 0.4;
}
.cheditor-tb-text span, .cheditor-tb-text-disable span {
font-family: "Malgun Gothic", "Apple SD Gothic Neo", gulim, monospace;
margin: 0 0 0 1px;
padding: 0;
width: 41px;
text-overflow: ellipsis;
overflow: hidden;
white-space: nowrap;
display: block;
font-size: 12px;
}
.cheditor-tb-icon23 {
height: 22px;
width: 23px;
margin-left: 3px;
overflow: hidden;
}
.cheditor-tb-icon23-disable {
height: 22px;
width: 23px;
margin-left: 3px;
overflow: hidden;
filter: alpha(opacity=40) gray;
opacity: 0.4;
}
.cheditor-tb-icon36 {
height: 22px;
width: 36px;
overflow: hidden;
}
.cheditor-tb-icon36-disable {
height: 22px;
width: 36px;
overflow: hidden;
filter: alpha(opacity=40) gray;
opacity: 0.4;
}
.cheditor-tb-combo {
height: 22px;
width: 10px;
overflow: hidden;
}
.cheditor-tb-combo-disable {
height: 22px;
width: 10px;
overflow: hidden;
filter: alpha(opacity=40) gray;
opacity: 0.4;
}
.cheditor-tb-bg55 {
float: left;
overflow: hidden;
background: transparent url(../icons/toolbar-background.png) no-repeat left -483px;
position: relative;
}
.cheditor-tb-bg40 {
float: left;
overflow: hidden;
background: transparent url(../icons/toolbar-background.png) no-repeat left -552px;
position: relative;
}
.cheditor-tb-bg44 {
float: left;
overflow: hidden;
background: transparent url(../icons/toolbar-background.png) no-repeat left -621px;
position: relative;
}
.cheditor-tb-bg30-first {
float: left;
overflow: hidden;
background: transparent url(../icons/toolbar-background.png) no-repeat left -276px;
position: relative;
}
.cheditor-tb-bg30 {
float: left;
overflow: hidden;
background: transparent url(../icons/toolbar-background.png) no-repeat left -345px;
position: relative;
}
.cheditor-tb-bg30-last {
float: left;
overflow: hidden;
background: transparent url(../icons/toolbar-background.png) no-repeat left -414px;
position: relative;
}
.cheditor-tb-bgcombo {
float: left;
overflow: hidden;
background: transparent url(../icons/toolbar-background.png) no-repeat left -690px;
position: relative;
}
.cheditor-tb-bgcombo-first {
float: left;
overflow: hidden;
background: transparent url(../icons/toolbar-background.png) no-repeat left top;
position: relative;
}
.cheditor-tb-bgcombo-last {
float: left;
overflow: hidden;
background: url(../icons/toolbar-background.png) no-repeat left -759px;
position: relative;
}
.cheditor-tb-bg {
float: left;
overflow: hidden;
background: transparent url(../icons/toolbar-background.png) no-repeat left -69px;
position: relative;
}
.cheditor-tb-bg-first {
float: left;
overflow: hidden;
background: transparent url(../icons/toolbar-background.png) no-repeat left top;
position: relative;
}
.cheditor-tb-bg-last {
float: left;
overflow: hidden;
background: transparent url(../icons/toolbar-background.png) no-repeat left -138px;
position: relative;
background-clip: border-box;
}
.cheditor-tb-bg-single {
float: left;
overflow: hidden;
background: transparent url(../icons/toolbar-background.png) no-repeat left -207px;
position: relative;
}
.cheditor-tb-color-btn {
width: 16px;
height: 3px;
overflow: hidden;
position: absolute;
top: 16px;
left: 3px;
}
.cheditor-tb-button-spacer {
overflow: hidden;
width: 4px;
height: 4px;
float: left;
}
.cheditor-tb-split {
overflow: hidden;
height: 2px;
width: 3px;
clear: both;
}
+158
View File
@@ -0,0 +1,158 @@
<?php
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
function editor_html($id, $content, $is_dhtml_editor=true)
{
global $config, $w, $board;
global $editor_width, $editor_height;
static $js = true;
if( $is_dhtml_editor && $content && !$w && (isset($board['bo_insert_content']) && !empty($board['bo_insert_content']) ) ){ //글쓰기 기본 내용 처리
if( preg_match('/\r|\n/', $content) && $content === strip_tags($content, '<a><strong><b>') ) { //textarea로 작성되고, html 내용이 없다면
$content = nl2br($content);
}
}
$width = isset($editor_width) ? $editor_width : "100%";
$height = isset($editor_height) ? $editor_height : "250px";
if (defined(G5_PUNYCODE))
$editor_url = G5_PUNYCODE.'/'.G5_EDITOR_DIR.'/'.$config['cf_editor'];
else
$editor_url = G5_EDITOR_URL.'/'.$config['cf_editor'];
$html = "";
if ($is_dhtml_editor) {
if ($js) {
$html .= "<script src=\"{$editor_url}/cheditor.js\"></script>";
}
$html .= "<script>\n";
$html .= "var ed_nonce = \"".ft_nonce_create('cheditor')."\";\n";
$html .= "var ed_{$id} = new cheditor('ed_{$id}');\n";
$html .= "ed_{$id}.config.editorWidth = \"{$width}\";\n";
$html .= "ed_{$id}.config.editorHeight = \"{$height}\";\n";
$html .= "ed_{$id}.config.imgReSize = false;\n";
$html .= "ed_{$id}.config.fullHTMLSource = false;\n";
$html .= "ed_{$id}.config.editorPath = \"{$editor_url}\";\n";
$html .= "ed_{$id}.inputForm = \"tx_{$id}\";\n";
$html .= "</script>\n";
$html .= "<span class=\"sound_only\">웹에디터 시작</span>";
$html .= "<textarea name=\"{$id}\" id=\"tx_{$id}\" style=\"display:none;\">{$content}</textarea>\n";
$html .= "\n<span class=\"sound_only\">웹 에디터 끝</span>";
$html .= "<script>ed_{$id}.run();</script>\n";
} else {
$html .= "<textarea id=\"$id\" name=\"$id\" style=\"width:{$width};height:{$height};\" maxlength=\"65536\">$content</textarea>\n";
}
return $html;
}
// textarea 로 값을 넘긴다. javascript 반드시 필요
function get_editor_js($id, $is_dhtml_editor=true)
{
if ($is_dhtml_editor) {
return "document.getElementById('tx_{$id}').value = ed_{$id}.outputBodyHTML();\n";
} else {
return "var {$id}_editor = document.getElementById('{$id}');\n";
}
}
// textarea 의 값이 비어 있는지 검사
function chk_editor_js($id, $is_dhtml_editor=true)
{
if ($is_dhtml_editor) {
return "if (document.getElementById('tx_{$id}') && jQuery.inArray(ed_{$id}.outputBodyHTML().toLowerCase().replace(/^\s*|\s*$/g, ''), ['&nbsp;','<p>&nbsp;</p>','<p><br></p>','<div><br></div>','<p></p>','<br>','']) != -1) { alert(\"내용을 입력해 주십시오.\"); ed_{$id}.returnFalse(); return false; }\n";
} else {
return "if (!{$id}_editor.value) { alert(\"내용을 입력해 주십시오.\"); {$id}_editor.focus(); return false; }\n";
}
}
/*
https://github.com/timostamm/NonceUtil-PHP
*/
if (!defined('FT_NONCE_UNIQUE_KEY'))
define( 'FT_NONCE_UNIQUE_KEY' , sha1($_SERVER['SERVER_SOFTWARE'].G5_MYSQL_USER.session_id().G5_TABLE_PREFIX) );
if (!defined('FT_NONCE_SESSION_KEY'))
define( 'FT_NONCE_SESSION_KEY' , substr(md5(FT_NONCE_UNIQUE_KEY), 5) );
if (!defined('FT_NONCE_DURATION'))
define( 'FT_NONCE_DURATION' , 60 * 30 ); // 300 makes link or form good for 5 minutes from time of generation, 300은 5분간 유효, 60 * 60 은 1시간
if (!defined('FT_NONCE_KEY'))
define( 'FT_NONCE_KEY' , '_nonce' );
// This method creates a key / value pair for a url string
if(!function_exists('ft_nonce_create_query_string')){
function ft_nonce_create_query_string( $action = '' , $user = '' ){
return FT_NONCE_KEY."=".ft_nonce_create( $action , $user );
}
}
if(!function_exists('ft_get_secret_key')){
function ft_get_secret_key($secret){
return md5(FT_NONCE_UNIQUE_KEY.$secret);
}
}
// This method creates an nonce. It should be called by one of the previous two functions.
if(!function_exists('ft_nonce_create')){
function ft_nonce_create( $action = '',$user='', $timeoutSeconds=FT_NONCE_DURATION ){
$secret = ft_get_secret_key($action.$user);
$salt = ft_nonce_generate_hash();
$time = time();
$maxTime = $time + $timeoutSeconds;
$nonce = $salt . "|" . $maxTime . "|" . sha1( $salt . $secret . $maxTime );
set_session('nonce_'.FT_NONCE_SESSION_KEY, $nonce);
return $nonce;
}
}
// This method validates an nonce
if(!function_exists('ft_nonce_is_valid')){
function ft_nonce_is_valid( $nonce, $action = '', $user='' ){
$secret = ft_get_secret_key($action.$user);
if (is_string($nonce) == false) {
return false;
}
$a = explode('|', $nonce);
if (count($a) != 3) {
return false;
}
$salt = $a[0];
$maxTime = intval($a[1]);
$hash = $a[2];
$back = sha1( $salt . $secret . $maxTime );
if ($back != $hash) {
return false;
}
if (time() > $maxTime) {
return false;
}
return true;
}
}
// This method generates the nonce timestamp
if(!function_exists('ft_nonce_generate_hash')){
function ft_nonce_generate_hash(){
$length = 10;
$chars='1234567890qwertyuiopasdfghjklzxcvbnmQWERTYUIOPASDFGHJKLZXCVBNM';
$ll = strlen($chars)-1;
$o = '';
while (strlen($o) < $length) {
$o .= $chars[ rand(0, $ll) ];
}
return $o;
}
}
?>
Binary file not shown.

After

Width:  |  Height:  |  Size: 187 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 190 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 180 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 181 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 187 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 188 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 187 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 187 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 811 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 66 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

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