Merge branch 'php81-jw'

This commit is contained in:
kjh
2022-05-31 07:38:17 +00:00
82 changed files with 452 additions and 502 deletions

View File

@ -4,15 +4,14 @@ include_once('./_common.php');
if ($is_guest)
alert('로그인 한 회원만 접근하실 수 있습니다.', G5_BBS_URL.'/login.php');
/*
if ($url)
$urlencode = urlencode($url);
else
$urlencode = urlencode($_SERVER[REQUEST_URI]);
*/
$url = isset($_GET['url']) ? clean_xss_tags($_GET['url']) : '';
while (1) {
$tmp = preg_replace('/&#[^;]+;/', '', $url);
if ($tmp == $url) break;
$url = $tmp;
}
//소셜 로그인 한 경우
if( function_exists('social_member_comfirm_redirect') && (! $url || $url === 'register_form.php' || (function_exists('social_is_edit_page') && social_is_edit_page($url) ) ) ){
social_member_comfirm_redirect();

View File

@ -16,8 +16,7 @@ if ($kind == 'recv')
else if ($kind == 'send')
$unkind = 'recv';
else {
$kind = clean_xss_tags(trim($kind));
alert(''.$kind .'값을 넘겨주세요.');
alert("kind 변수 값이 올바르지 않습니다.");
}
if ($page < 1) { $page = 1; } // 페이지가 없으면 첫 페이지 (1 페이지)

View File

@ -1,27 +1,31 @@
<?php
include_once('./_common.php');
if($w == '')
$mb_id = isset($_POST['mb_id']) ? trim($_POST['mb_id']) : '';
else
alert('잘못된 접근입니다', G5_URL);
$mb_id = isset($_SESSION['ss_cert_mb_id']) ? trim(get_session('ss_cert_mb_id')) : '';
$mb_dupinfo = isset($_SESSION['ss_cert_dupinfo']) ? trim(get_session('ss_cert_dupinfo')) : '';
if(!$mb_id)
alert('회원아이디 값이 없습니다. 올바른 방법으로 이용해 주십시오.');
if(!$mb_id) alert('회원아이디 값이 없습니다. 올바른 방법으로 이용해 주십시오.', G5_URL);
if(!$mb_dupinfo) alert('잘못된 접근입니다.', G5_URL);
$mb_check = sql_fetch("select * from {$g5['member_table']} where mb_id = '{$mb_id}' AND mb_dupinfo = '{$mb_dupinfo}'");
if(!$mb_check) alert('잘못된 접근입니다.', G5_URL);
$mb_password = isset($_POST['mb_password']) ? trim($_POST['mb_password_re']) : '';
$mb_password_re = isset($_POST['mb_password_re']) ? trim($_POST['mb_password_re']) : '';
if ($w == '' && !$mb_password)
alert('비밀번호가 넘어오지 않았습니다.');
if($w == '' && $mb_password != $mb_password_re)
alert('비밀번호가 일치하지 않습니다.');
if (!$mb_password)
alert('비밀번호가 넘어오지 않았습니다.');
if ($mb_password != $mb_password_re)
alert('비밀번호가 일치하지 않습니다.');
$sql_password = "";
if ($mb_password)
$sql_password = "mb_password = '".get_encrypt_string($mb_password)."' ";
$sql_password = "mb_password = '".get_encrypt_string($mb_password)."' ";
sql_query("update {$g5['member_table']} set {$sql_password} where mb_id = '{$mb_id}'");
sql_query("update {$g5['member_table']} set {$sql_password} where mb_id = '{$mb_id}' AND mb_dupinfo = '{$mb_dupinfo}'");
set_session('ss_cert_mb_id', '');
set_session('ss_cert_dupinfo', '');
goto_url(G5_BBS_URL.'/login.php');

View File

@ -223,7 +223,7 @@ for ($i=1; $i<=$upload_count; $i++) {
$shuffle = implode('', $chars_array);
// 첨부파일 첨부시 첨부파일명에 공백이 포함되어 있으면 일부 PC에서 보이지 않거나 다운로드 되지 않는 현상이 있습니다. (길상여의 님 090925)
$upload[$i]['file'] = abs(ip2long($_SERVER['REMOTE_ADDR'])).'_'.substr($shuffle,0,8).'_'.replace_filename($filename);
$upload[$i]['file'] = md5(sha1($_SERVER['REMOTE_ADDR'])).'_'.substr($shuffle,0,8).'_'.replace_filename($filename);
$dest_file = G5_DATA_PATH.'/qa/'.$upload[$i]['file'];

View File

@ -221,6 +221,9 @@ if (!isset($_POST['wr_subject']) || !trim($_POST['wr_subject']))
$wr_seo_title = exist_seo_title_recursive('bbs', generate_seo_title($wr_subject), $write_table, $wr_id);
$options = array($html,$secret,$mail);
$wr_option = implode(',', array_filter($options, function($v) { return trim($v); }));
if ($w == '' || $w == 'r') {
if ($member['mb_id']) {
@ -258,7 +261,7 @@ if ($w == '' || $w == 'r') {
wr_reply = '$wr_reply',
wr_comment = 0,
ca_name = '$ca_name',
wr_option = '$html,$secret,$mail',
wr_option = '$wr_option',
wr_subject = '$wr_subject',
wr_content = '$wr_content',
wr_seo_title = '$wr_seo_title',
@ -380,7 +383,7 @@ if ($w == '' || $w == 'r') {
$sql = " update {$write_table}
set ca_name = '{$ca_name}',
wr_option = '{$html},{$secret},{$mail}',
wr_option = '{$wr_option}',
wr_subject = '{$wr_subject}',
wr_content = '{$wr_content}',
wr_seo_title = '$wr_seo_title',
@ -567,7 +570,7 @@ if(isset($_FILES['bf_file']['name']) && is_array($_FILES['bf_file']['name'])) {
$shuffle = implode('', $chars_array);
// 첨부파일 첨부시 첨부파일명에 공백이 포함되어 있으면 일부 PC에서 보이지 않거나 다운로드 되지 않는 현상이 있습니다. (길상여의 님 090925)
$upload[$i]['file'] = abs(ip2long($_SERVER['REMOTE_ADDR'])).'_'.substr($shuffle,0,8).'_'.replace_filename($filename);
$upload[$i]['file'] = md5(sha1($_SERVER['REMOTE_ADDR'])).'_'.substr($shuffle,0,8).'_'.replace_filename($filename);
$dest_file = G5_DATA_PATH.'/file/'.$bo_table.'/'.$upload[$i]['file'];