Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
42fb4b71a6 | ||
|
|
f0134b610b | ||
|
|
c2cf34392a | ||
|
|
20dc859436 | ||
|
|
f5ec4d60c0 | ||
|
|
de00b4e9d3 | ||
|
|
8c67945c64 | ||
|
|
e5889df761 | ||
|
|
624e3d74a6 | ||
|
|
30815f71e0 | ||
|
|
949a73b468 | ||
|
|
24d57cdd4b | ||
|
|
191f3d2f97 | ||
|
|
4973714e2f | ||
|
|
70bfeefb3b | ||
|
|
e8b83f3a33 |
No files matched your search
+3
-3
@@ -736,7 +736,7 @@ if ($config['cf_sms_use'] && $config['cf_icode_id'] && $config['cf_icode_pw']) {
|
|||||||
<select name="cf_cert_hp" id="cf_cert_hp">
|
<select name="cf_cert_hp" id="cf_cert_hp">
|
||||||
<?php echo option_selected("", $config['cf_cert_hp'], "사용안함"); ?>
|
<?php echo option_selected("", $config['cf_cert_hp'], "사용안함"); ?>
|
||||||
<?php echo option_selected("kcb", $config['cf_cert_hp'], "코리아크레딧뷰로(KCB) 휴대폰 본인확인"); ?>
|
<?php echo option_selected("kcb", $config['cf_cert_hp'], "코리아크레딧뷰로(KCB) 휴대폰 본인확인"); ?>
|
||||||
<?php echo option_selected("kcp", $config['cf_cert_hp'], "한국사이버결제(KCP) 휴대폰 본인확인"); ?>
|
<?php echo option_selected("kcp", $config['cf_cert_hp'], "NHN KCP 휴대폰 본인확인"); ?>
|
||||||
<?php echo option_selected("lg", $config['cf_cert_hp'], "LG유플러스 휴대폰 본인확인"); ?>
|
<?php echo option_selected("lg", $config['cf_cert_hp'], "LG유플러스 휴대폰 본인확인"); ?>
|
||||||
</select>
|
</select>
|
||||||
</td>
|
</td>
|
||||||
@@ -750,11 +750,11 @@ if ($config['cf_sms_use'] && $config['cf_icode_id'] && $config['cf_icode_pw']) {
|
|||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="row" class="cf_cert_service"><label for="cf_cert_kcp_cd">한국사이버결제<br>KCP 사이트코드</label></th>
|
<th scope="row" class="cf_cert_service"><label for="cf_cert_kcp_cd">NHN KCP 사이트코드</label></th>
|
||||||
<td class="cf_cert_service">
|
<td class="cf_cert_service">
|
||||||
<?php echo help('SM으로 시작하는 5자리 사이트 코드중 뒤의 3자리만 입력해 주십시오.<br>서비스에 가입되어 있지 않다면, 본인확인 서비스 신청페이지에서 서비스 신청 후 사이트코드를 발급 받으실 수 있습니다.') ?>
|
<?php echo help('SM으로 시작하는 5자리 사이트 코드중 뒤의 3자리만 입력해 주십시오.<br>서비스에 가입되어 있지 않다면, 본인확인 서비스 신청페이지에서 서비스 신청 후 사이트코드를 발급 받으실 수 있습니다.') ?>
|
||||||
<span class="sitecode">SM</span>
|
<span class="sitecode">SM</span>
|
||||||
<input type="text" name="cf_cert_kcp_cd" value="<?php echo $config['cf_cert_kcp_cd'] ?>" id="cf_cert_kcp_cd" class="frm_input" size="3"> <a href="http://sir.kr/main/service/p_cert.php" target="_blank" class="btn_frmline">KCP 휴대폰 본인확인 서비스 신청페이지</a>
|
<input type="text" name="cf_cert_kcp_cd" value="<?php echo $config['cf_cert_kcp_cd'] ?>" id="cf_cert_kcp_cd" class="frm_input" size="3"> <a href="http://sir.kr/main/service/p_cert.php" target="_blank" class="btn_frmline">NHN KCP 휴대폰 본인확인 서비스 신청페이지</a>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
|
|||||||
@@ -126,6 +126,11 @@ if(!isset($mb['mb_dupinfo'])) {
|
|||||||
sql_query(" ALTER TABLE {$g5['member_table']} ADD `mb_dupinfo` varchar(255) NOT NULL DEFAULT '' AFTER `mb_adult` ", false);
|
sql_query(" ALTER TABLE {$g5['member_table']} ADD `mb_dupinfo` varchar(255) NOT NULL DEFAULT '' AFTER `mb_adult` ", false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 이메일인증 체크 필드추가
|
||||||
|
if(!isset($mb['mb_email_certify2'])) {
|
||||||
|
sql_query(" ALTER TABLE {$g5['member_table']} ADD `mb_email_certify2` varchar(255) NOT NULL DEFAULT '' AFTER `mb_email_certify` ", false);
|
||||||
|
}
|
||||||
|
|
||||||
if ($mb['mb_intercept_date']) $g5['title'] = "차단된 ";
|
if ($mb['mb_intercept_date']) $g5['title'] = "차단된 ";
|
||||||
else $g5['title'] .= "";
|
else $g5['title'] .= "";
|
||||||
$g5['title'] .= '회원 '.$html_title;
|
$g5['title'] .= '회원 '.$html_title;
|
||||||
|
|||||||
+12
-3
@@ -1,20 +1,29 @@
|
|||||||
<?php
|
<?php
|
||||||
include_once('./_common.php');
|
include_once('./_common.php');
|
||||||
|
|
||||||
$sql = " select mb_id, mb_email, mb_datetime from {$g5['member_table']} where mb_id = '{$mb_id}' ";
|
$mb_id = trim($_GET['mb_id']);
|
||||||
|
$mb_md5 = trim($_GET['mb_md5']);
|
||||||
|
|
||||||
|
$sql = " select mb_id, mb_email_certify2 from {$g5['member_table']} where mb_id = '{$mb_id}' ";
|
||||||
$row = sql_fetch($sql);
|
$row = sql_fetch($sql);
|
||||||
if (!$row['mb_id'])
|
if (!$row['mb_id'])
|
||||||
alert('존재하는 회원이 아닙니다.', G5_URL);
|
alert('존재하는 회원이 아닙니다.', G5_URL);
|
||||||
|
|
||||||
|
// 인증 링크는 한번만 처리가 되게 한다.
|
||||||
|
sql_query(" update {$g5['member_table']} set mb_email_certify2 = '' where mb_id = '$mb_id' ");
|
||||||
|
|
||||||
if ($mb_md5)
|
if ($mb_md5)
|
||||||
{
|
{
|
||||||
$tmp_md5 = md5($row['mb_id'].$row['mb_email'].$row['mb_datetime']);
|
if ($mb_md5 == $row['mb_email_certify2'])
|
||||||
if ($mb_md5 == $tmp_md5)
|
|
||||||
{
|
{
|
||||||
sql_query(" update {$g5['member_table']} set mb_email_certify = '".G5_TIME_YMDHIS."' where mb_id = '{$mb_id}' ");
|
sql_query(" update {$g5['member_table']} set mb_email_certify = '".G5_TIME_YMDHIS."' where mb_id = '{$mb_id}' ");
|
||||||
|
|
||||||
alert("메일인증 처리를 완료 하였습니다.\\n\\n지금부터 {$mb_id} 아이디로 로그인 가능합니다.", G5_URL);
|
alert("메일인증 처리를 완료 하였습니다.\\n\\n지금부터 {$mb_id} 아이디로 로그인 가능합니다.", G5_URL);
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
alert('메일인증 요청 정보가 올바르지 않습니다.', G5_URL);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
alert('제대로 된 값이 넘어오지 않았습니다.', G5_URL);
|
alert('제대로 된 값이 넘어오지 않았습니다.', G5_URL);
|
||||||
|
|||||||
+6
-3
@@ -28,14 +28,17 @@ if ($sendmail_count > 3)
|
|||||||
$g5['title'] = '메일 쓰기';
|
$g5['title'] = '메일 쓰기';
|
||||||
include_once(G5_PATH.'/head.sub.php');
|
include_once(G5_PATH.'/head.sub.php');
|
||||||
|
|
||||||
$email = get_email_address(base64_decode($email));
|
$email_enc = new str_encrypt();
|
||||||
|
$email_dec = $email_enc->decrypt($email);
|
||||||
|
|
||||||
|
$email = get_email_address($email_dec);
|
||||||
if(!$email)
|
if(!$email)
|
||||||
alert_close('이메일이 올바르지 않습니다.');
|
alert_close('이메일이 올바르지 않습니다.');
|
||||||
|
|
||||||
$email = base64_encode($email);
|
$email = $email_enc->encrypt($email);
|
||||||
|
|
||||||
if (!$name)
|
if (!$name)
|
||||||
$name = base64_decode($email);
|
$name = $email;
|
||||||
else
|
else
|
||||||
$name = get_text(stripslashes($name), true);
|
$name = get_text(stripslashes($name), true);
|
||||||
|
|
||||||
|
|||||||
@@ -9,7 +9,8 @@ if (!$config['cf_email_use'])
|
|||||||
if (!$is_member && $config['cf_formmail_is_member'])
|
if (!$is_member && $config['cf_formmail_is_member'])
|
||||||
alert_close('회원만 이용하실 수 있습니다.');
|
alert_close('회원만 이용하실 수 있습니다.');
|
||||||
|
|
||||||
$to = base64_decode($to);
|
$email_enc = new str_encrypt();
|
||||||
|
$to = $email_enc->decrypt($to);
|
||||||
|
|
||||||
if (substr_count($to, "@") > 1)
|
if (substr_count($to, "@") > 1)
|
||||||
alert_close('한번에 한사람에게만 메일을 발송할 수 있습니다.');
|
alert_close('한번에 한사람에게만 메일을 발송할 수 있습니다.');
|
||||||
|
|||||||
@@ -29,6 +29,10 @@ for($i=0; $i<$count; $i++) {
|
|||||||
if($is_admin != 'super' && $row['mb_id'] != $member['mb_id'])
|
if($is_admin != 'super' && $row['mb_id'] != $member['mb_id'])
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
// 답변이 달린 글은 삭제못함
|
||||||
|
if($is_admin != 'super' && !$row['qa_type'] && $row['qa_status'])
|
||||||
|
continue;
|
||||||
|
|
||||||
// 첨부파일 삭제
|
// 첨부파일 삭제
|
||||||
for($k=1; $k<=2; $k++) {
|
for($k=1; $k<=2; $k++) {
|
||||||
@unlink(G5_DATA_PATH.'/qa/'.$row['qa_file'.$k]);
|
@unlink(G5_DATA_PATH.'/qa/'.$row['qa_file'.$k]);
|
||||||
|
|||||||
+26
-7
@@ -15,16 +15,23 @@ $msg = array();
|
|||||||
// 1:1문의 설정값
|
// 1:1문의 설정값
|
||||||
$qaconfig = get_qa_config();
|
$qaconfig = get_qa_config();
|
||||||
|
|
||||||
|
if(trim($qaconfig['qa_category'])) {
|
||||||
|
if($w != 'a') {
|
||||||
|
$category = explode('|', $qaconfig['qa_category']);
|
||||||
|
if(!in_array($qa_category, $category))
|
||||||
|
alert('분류를 올바르게 지정해 주십시오.');
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
alert('1:1문의 설정에서 분류를 설정해 주십시오');
|
||||||
|
}
|
||||||
|
|
||||||
// e-mail 체크
|
// e-mail 체크
|
||||||
if(isset($_POST['qa_email']) && $qa_email) {
|
$qa_email = '';
|
||||||
|
if(isset($_POST['qa_email']) && $_POST['qa_email'])
|
||||||
$qa_email = get_email_address(trim($_POST['qa_email']));
|
$qa_email = get_email_address(trim($_POST['qa_email']));
|
||||||
|
|
||||||
if($qaconfig['qa_req_email'] && !$qa_email)
|
if($w != 'a' && $qaconfig['qa_req_email'] && !$qa_email)
|
||||||
$msg[] = '이메일을 입력하세요.';
|
$msg[] = '이메일을 입력하세요.';
|
||||||
|
|
||||||
if (!preg_match("/([0-9a-zA-Z_-]+)@([0-9a-zA-Z_-]+)\.([0-9a-zA-Z_-]+)/", $qa_email))
|
|
||||||
$msg[] = '이메일 주소가 형식에 맞지 않습니다.';
|
|
||||||
}
|
|
||||||
|
|
||||||
$qa_subject = '';
|
$qa_subject = '';
|
||||||
if (isset($_POST['qa_subject'])) {
|
if (isset($_POST['qa_subject'])) {
|
||||||
@@ -105,6 +112,18 @@ if($w == 'u' || $w == 'a' || $w == 'r') {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 파일개수 체크
|
||||||
|
$file_count = 0;
|
||||||
|
$upload_count = count($_FILES['bf_file']['name']);
|
||||||
|
|
||||||
|
for ($i=1; $i<=$upload_count; $i++) {
|
||||||
|
if($_FILES['bf_file']['name'][$i] && is_uploaded_file($_FILES['bf_file']['tmp_name'][$i]))
|
||||||
|
$file_count++;
|
||||||
|
}
|
||||||
|
|
||||||
|
if($file_count > 2)
|
||||||
|
alert('첨부파일을 2개 이하로 업로드 해주십시오.');
|
||||||
|
|
||||||
// 디렉토리가 없다면 생성합니다. (퍼미션도 변경하구요.)
|
// 디렉토리가 없다면 생성합니다. (퍼미션도 변경하구요.)
|
||||||
@mkdir(G5_DATA_PATH.'/qa', G5_DIR_PERMISSION);
|
@mkdir(G5_DATA_PATH.'/qa', G5_DIR_PERMISSION);
|
||||||
@chmod(G5_DATA_PATH.'/qa', G5_DIR_PERMISSION);
|
@chmod(G5_DATA_PATH.'/qa', G5_DIR_PERMISSION);
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ $mb_email = get_email_address(trim($_POST['mb_email']));
|
|||||||
if(!$mb_id || !$mb_email)
|
if(!$mb_id || !$mb_email)
|
||||||
alert('올바른 방법으로 이용해 주십시오.', G5_URL);
|
alert('올바른 방법으로 이용해 주십시오.', G5_URL);
|
||||||
|
|
||||||
$sql = " select mb_name, mb_password, mb_email, mb_datetime from {$g5['member_table']} where mb_id = '{$mb_id}' and substring(mb_email_certify, 1, 1) = '0' ";
|
$sql = " select mb_name from {$g5['member_table']} where mb_id = '{$mb_id}' and substring(mb_email_certify, 1, 1) = '0' ";
|
||||||
$mb = sql_fetch($sql);
|
$mb = sql_fetch($sql);
|
||||||
if (!$mb) {
|
if (!$mb) {
|
||||||
alert("이미 메일인증 하신 회원입니다.", G5_URL);
|
alert("이미 메일인증 하신 회원입니다.", G5_URL);
|
||||||
@@ -29,8 +29,12 @@ if ($row['cnt']) {
|
|||||||
$subject = '['.$config['cf_title'].'] 인증확인 메일입니다.';
|
$subject = '['.$config['cf_title'].'] 인증확인 메일입니다.';
|
||||||
|
|
||||||
$mb_name = $mb['mb_name'];
|
$mb_name = $mb['mb_name'];
|
||||||
$mb_datetime = $mb['mb_datetime'] ? $mb['mb_datetime'] : G5_TIME_YMDHIS;
|
|
||||||
$mb_md5 = md5($mb_id.$mb_email.$mb_datetime);
|
// 어떠한 회원정보도 포함되지 않은 일회용 난수를 생성하여 인증에 사용
|
||||||
|
$mb_md5 = md5(pack('V*', rand(), rand(), rand(), rand()));
|
||||||
|
|
||||||
|
sql_query(" update {$g5['member_table']} set mb_email_certify2 = '$mb_md5' where mb_id = '$mb_id' ");
|
||||||
|
|
||||||
$certify_href = G5_BBS_URL.'/email_certify.php?mb_id='.$mb_id.'&mb_md5='.$mb_md5;
|
$certify_href = G5_BBS_URL.'/email_certify.php?mb_id='.$mb_id.'&mb_md5='.$mb_md5;
|
||||||
|
|
||||||
ob_start();
|
ob_start();
|
||||||
|
|||||||
@@ -396,8 +396,11 @@ if (isset($_FILES['mb_icon']) && is_uploaded_file($_FILES['mb_icon']['tmp_name']
|
|||||||
if ($config['cf_use_email_certify'] && $old_email != $mb_email) {
|
if ($config['cf_use_email_certify'] && $old_email != $mb_email) {
|
||||||
$subject = '['.$config['cf_title'].'] 인증확인 메일입니다.';
|
$subject = '['.$config['cf_title'].'] 인증확인 메일입니다.';
|
||||||
|
|
||||||
$mb_datetime = $member['mb_datetime'] ? $member['mb_datetime'] : G5_TIME_YMDHIS;
|
// 어떠한 회원정보도 포함되지 않은 일회용 난수를 생성하여 인증에 사용
|
||||||
$mb_md5 = md5($mb_id.$mb_email.$mb_datetime);
|
$mb_md5 = md5(pack('V*', rand(), rand(), rand(), rand()));
|
||||||
|
|
||||||
|
sql_query(" update {$g5['member_table']} set mb_email_certify2 = '$mb_md5' where mb_id = '$mb_id' ");
|
||||||
|
|
||||||
$certify_href = G5_BBS_URL.'/email_certify.php?mb_id='.$mb_id.'&mb_md5='.$mb_md5;
|
$certify_href = G5_BBS_URL.'/email_certify.php?mb_id='.$mb_id.'&mb_md5='.$mb_md5;
|
||||||
|
|
||||||
ob_start();
|
ob_start();
|
||||||
@@ -405,7 +408,7 @@ if ($config['cf_use_email_certify'] && $old_email != $mb_email) {
|
|||||||
$content = ob_get_contents();
|
$content = ob_get_contents();
|
||||||
ob_end_clean();
|
ob_end_clean();
|
||||||
|
|
||||||
mailer($config['cf_title'], $config['cf_admin_email'], $mb_email, $subject, $content, 1);
|
mailer($config['cf_admin_email_name'], $config['cf_admin_email'], $mb_email, $subject, $content, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -10,6 +10,10 @@ if (!$is_member)
|
|||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 게시글 존재하는지
|
||||||
|
if(!$write['wr_id'])
|
||||||
|
alert_close('스크랩하시려는 게시글이 존재하지 않습니다.');
|
||||||
|
|
||||||
$sql = " select count(*) as cnt from {$g5['scrap_table']}
|
$sql = " select count(*) as cnt from {$g5['scrap_table']}
|
||||||
where mb_id = '{$member['mb_id']}'
|
where mb_id = '{$member['mb_id']}'
|
||||||
and bo_table = '$bo_table'
|
and bo_table = '$bo_table'
|
||||||
|
|||||||
@@ -337,6 +337,8 @@ if ($w == '') {
|
|||||||
}
|
}
|
||||||
|
|
||||||
$file = get_file($bo_table, $wr_id);
|
$file = get_file($bo_table, $wr_id);
|
||||||
|
if($file_count < $file['count'])
|
||||||
|
$file_count = $file['count'];
|
||||||
} else if ($w == 'r') {
|
} else if ($w == 'r') {
|
||||||
if (strstr($write['wr_option'], 'secret')) {
|
if (strstr($write['wr_option'], 'secret')) {
|
||||||
$is_secret = true;
|
$is_secret = true;
|
||||||
|
|||||||
@@ -77,12 +77,15 @@ if ($w == 'c') // 댓글 입력
|
|||||||
// 댓글 답변
|
// 댓글 답변
|
||||||
if ($comment_id)
|
if ($comment_id)
|
||||||
{
|
{
|
||||||
$sql = " select wr_id, wr_comment, wr_comment_reply from $write_table
|
$sql = " select wr_id, wr_parent, wr_comment, wr_comment_reply from $write_table
|
||||||
where wr_id = '$comment_id' ";
|
where wr_id = '$comment_id' ";
|
||||||
$reply_array = sql_fetch($sql);
|
$reply_array = sql_fetch($sql);
|
||||||
if (!$reply_array['wr_id'])
|
if (!$reply_array['wr_id'])
|
||||||
alert('답변할 댓글이 없습니다.\\n\\n답변하는 동안 댓글이 삭제되었을 수 있습니다.');
|
alert('답변할 댓글이 없습니다.\\n\\n답변하는 동안 댓글이 삭제되었을 수 있습니다.');
|
||||||
|
|
||||||
|
if($wr['wr_parent'] != $reply_array['wr_parent'])
|
||||||
|
alert('댓글을 등록할 수 없습니다.');
|
||||||
|
|
||||||
$tmp_comment = $reply_array['wr_comment'];
|
$tmp_comment = $reply_array['wr_comment'];
|
||||||
|
|
||||||
if (strlen($reply_array['wr_comment_reply']) == 5)
|
if (strlen($reply_array['wr_comment_reply']) == 5)
|
||||||
|
|||||||
+34
-3
@@ -15,7 +15,12 @@ if($board['bo_use_category']) {
|
|||||||
$categories = array_map('trim', explode("|", $board['bo_category_list'].($is_admin ? '|공지' : '')));
|
$categories = array_map('trim', explode("|", $board['bo_category_list'].($is_admin ? '|공지' : '')));
|
||||||
if(!empty($categories) && !in_array($ca_name, $categories))
|
if(!empty($categories) && !in_array($ca_name, $categories))
|
||||||
$msg[] = '분류를 올바르게 입력하세요.';
|
$msg[] = '분류를 올바르게 입력하세요.';
|
||||||
|
|
||||||
|
if(empty($categories))
|
||||||
|
$ca_name = '';
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
$ca_name = '';
|
||||||
}
|
}
|
||||||
|
|
||||||
$wr_subject = '';
|
$wr_subject = '';
|
||||||
@@ -77,10 +82,16 @@ if ($w == 'u' || $w == 'r') {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 외부에서 글을 등록할 수 있는 버그가 존재하므로 비밀글은 사용일 경우에만 가능해야 함
|
// 외부에서 글을 등록할 수 있는 버그가 존재하므로 비밀글은 사용일 경우에만 가능해야 함
|
||||||
if (!$is_admin && !$board['bo_use_secret'] && $secret) {
|
if (!$is_admin && !$board['bo_use_secret'] && (stripos($_POST['html'], 'secret') !== false || stripos($_POST['secret'], 'secret') !== false || stripos($_POST['mail'], 'secret') !== false)) {
|
||||||
alert('비밀글 미사용 게시판 이므로 비밀글로 등록할 수 없습니다.');
|
alert('비밀글 미사용 게시판 이므로 비밀글로 등록할 수 없습니다.');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$secret = '';
|
||||||
|
if (isset($_POST['secret']) && $_POST['secret']) {
|
||||||
|
if(preg_match('#secret#', strtolower($_POST['secret']), $matches))
|
||||||
|
$secret = $matches[0];
|
||||||
|
}
|
||||||
|
|
||||||
// 외부에서 글을 등록할 수 있는 버그가 존재하므로 비밀글 무조건 사용일때는 관리자를 제외(공지)하고 무조건 비밀글로 등록
|
// 외부에서 글을 등록할 수 있는 버그가 존재하므로 비밀글 무조건 사용일때는 관리자를 제외(공지)하고 무조건 비밀글로 등록
|
||||||
if (!$is_admin && $board['bo_use_secret'] == 2) {
|
if (!$is_admin && $board['bo_use_secret'] == 2) {
|
||||||
$secret = 'secret';
|
$secret = 'secret';
|
||||||
@@ -88,12 +99,14 @@ if (!$is_admin && $board['bo_use_secret'] == 2) {
|
|||||||
|
|
||||||
$html = '';
|
$html = '';
|
||||||
if (isset($_POST['html']) && $_POST['html']) {
|
if (isset($_POST['html']) && $_POST['html']) {
|
||||||
$html = $_POST['html'];
|
if(preg_match('#html(1|2)#', strtolower($_POST['html']), $matches))
|
||||||
|
$html = $matches[0];
|
||||||
}
|
}
|
||||||
|
|
||||||
$mail = '';
|
$mail = '';
|
||||||
if (isset($_POST['mail']) && $_POST['mail']) {
|
if (isset($_POST['mail']) && $_POST['mail']) {
|
||||||
$mail = $_POST['mail'];
|
if(preg_match('#mail#', strtolower($_POST['mail']), $matches))
|
||||||
|
$mail = $matches[0];
|
||||||
}
|
}
|
||||||
|
|
||||||
$notice = '';
|
$notice = '';
|
||||||
@@ -402,6 +415,24 @@ if (!$group['gr_use_access'] && $board['bo_read_level'] < 2 && !$secret) {
|
|||||||
naver_syndi_ping($bo_table, $wr_id);
|
naver_syndi_ping($bo_table, $wr_id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 파일개수 체크
|
||||||
|
$file_count = 0;
|
||||||
|
$upload_count = count($_FILES['bf_file']['name']);
|
||||||
|
|
||||||
|
for ($i=0; $i<$upload_count; $i++) {
|
||||||
|
if($_FILES['bf_file']['name'][$i] && is_uploaded_file($_FILES['bf_file']['tmp_name'][$i]))
|
||||||
|
$file_count++;
|
||||||
|
}
|
||||||
|
|
||||||
|
if($w == 'u') {
|
||||||
|
$file = get_file($bo_table, $wr_id);
|
||||||
|
if($file_count && (int)$file['count'] > $board['bo_upload_count'])
|
||||||
|
alert('기존 파일을 삭제하신 후 첨부파일을 '.number_format($board['bo_upload_count']).'개 이하로 업로드 해주십시오.');
|
||||||
|
} else {
|
||||||
|
if($file_count > $board['bo_upload_count'])
|
||||||
|
alert('첨부파일을 '.number_format($board['bo_upload_count']).'개 이하로 업로드 해주십시오.');
|
||||||
|
}
|
||||||
|
|
||||||
// 디렉토리가 없다면 생성합니다. (퍼미션도 변경하구요.)
|
// 디렉토리가 없다면 생성합니다. (퍼미션도 변경하구요.)
|
||||||
@mkdir(G5_DATA_PATH.'/file/'.$bo_table, G5_DIR_PERMISSION);
|
@mkdir(G5_DATA_PATH.'/file/'.$bo_table, G5_DIR_PERMISSION);
|
||||||
@chmod(G5_DATA_PATH.'/file/'.$bo_table, G5_DIR_PERMISSION);
|
@chmod(G5_DATA_PATH.'/file/'.$bo_table, G5_DIR_PERMISSION);
|
||||||
|
|||||||
+1
-1
@@ -5,7 +5,7 @@
|
|||||||
********************/
|
********************/
|
||||||
|
|
||||||
define('G5_VERSION', '그누보드5');
|
define('G5_VERSION', '그누보드5');
|
||||||
define('G5_GNUBOARD_VER', '5.1.16');
|
define('G5_GNUBOARD_VER', '5.1.18');
|
||||||
|
|
||||||
// 이 상수가 정의되지 않으면 각각의 개별 페이지는 별도로 실행될 수 없음
|
// 이 상수가 정의되지 않으면 각각의 개별 페이지는 별도로 실행될 수 없음
|
||||||
define('_GNUBOARD_', true);
|
define('_GNUBOARD_', true);
|
||||||
|
|||||||
@@ -463,7 +463,8 @@ CREATE TABLE IF NOT EXISTS `g5_member` (
|
|||||||
`mb_ip` varchar(255) NOT NULL default '',
|
`mb_ip` varchar(255) NOT NULL default '',
|
||||||
`mb_leave_date` varchar(8) NOT NULL default '',
|
`mb_leave_date` varchar(8) NOT NULL default '',
|
||||||
`mb_intercept_date` varchar(8) NOT NULL default '',
|
`mb_intercept_date` varchar(8) NOT NULL default '',
|
||||||
`mb_email_certify` datetime NOT NULL default '0000-00-00 00:00:00',
|
`mb_email_certify` datetime NOT NULL default '0000-00-00 00:00:00',
|
||||||
|
`mb_email_certify2` varchar(255) NOT NULL default '',
|
||||||
`mb_memo` text NOT NULL,
|
`mb_memo` text NOT NULL,
|
||||||
`mb_lost_certify` varchar(255) NOT NULL,
|
`mb_lost_certify` varchar(255) NOT NULL,
|
||||||
`mb_mailling` tinyint(4) NOT NULL default '0',
|
`mb_mailling` tinyint(4) NOT NULL default '0',
|
||||||
|
|||||||
+49
-1
@@ -1200,7 +1200,8 @@ function get_sideview($mb_id, $name='', $email='', $homepage='')
|
|||||||
global $g5;
|
global $g5;
|
||||||
global $bo_table, $sca, $is_admin, $member;
|
global $bo_table, $sca, $is_admin, $member;
|
||||||
|
|
||||||
$email = base64_encode($email);
|
$email_enc = new str_encrypt();
|
||||||
|
$email = $email_enc->encrypt($email);
|
||||||
$homepage = set_http(clean_xss_tags($homepage));
|
$homepage = set_http(clean_xss_tags($homepage));
|
||||||
|
|
||||||
$name = get_text($name, 0, true);
|
$name = get_text($name, 0, true);
|
||||||
@@ -3173,4 +3174,51 @@ function check_vaild_callback($callback){
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 문자열 암복호화
|
||||||
|
class str_encrypt
|
||||||
|
{
|
||||||
|
var $salt;
|
||||||
|
var $lenght;
|
||||||
|
|
||||||
|
function __construct($salt='')
|
||||||
|
{
|
||||||
|
if(!$salt)
|
||||||
|
$this->salt = md5(G5_MYSQL_PASSWORD);
|
||||||
|
else
|
||||||
|
$this->salt = $salt;
|
||||||
|
|
||||||
|
$this->length = strlen($this->salt);
|
||||||
|
}
|
||||||
|
|
||||||
|
function encrypt($str)
|
||||||
|
{
|
||||||
|
$length = strlen($str);
|
||||||
|
$result = '';
|
||||||
|
|
||||||
|
for($i=0; $i<$length; $i++) {
|
||||||
|
$char = substr($str, $i, 1);
|
||||||
|
$keychar = substr($this->salt, ($i % $this->length) - 1, 1);
|
||||||
|
$char = chr(ord($char) + ord($keychar));
|
||||||
|
$result .= $char;
|
||||||
|
}
|
||||||
|
|
||||||
|
return base64_encode($result);
|
||||||
|
}
|
||||||
|
|
||||||
|
function decrypt($str) {
|
||||||
|
$result = '';
|
||||||
|
$str = base64_decode($str);
|
||||||
|
$length = strlen($str);
|
||||||
|
|
||||||
|
for($i=0; $i<$length; $i++) {
|
||||||
|
$char = substr($str, $i, 1);
|
||||||
|
$keychar = substr($this->salt, ($i % $this->length) - 1, 1);
|
||||||
|
$char = chr(ord($char) - ord($keychar));
|
||||||
|
$result .= $char;
|
||||||
|
}
|
||||||
|
|
||||||
|
return $result;
|
||||||
|
}
|
||||||
|
}
|
||||||
?>
|
?>
|
||||||
Reference in new issue
Block a user