Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7dc293a147 | ||
|
|
097903d0ce | ||
|
|
37b0fa5788 | ||
|
|
ad78efcdaa |
No files matched your search
+1
-1
@@ -95,7 +95,7 @@ function imageview(id, w, h)
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
$current_class = "";
|
$current_class = "";
|
||||||
if (isset($sub_menu) && (substr($sub_menu, 0, 2) == substr($menu['menu'.$key][0][0], 0, 2)))
|
if (isset($sub_menu) && (substr($sub_menu, 0, 3) == substr($menu['menu'.$key][0][0], 0, 3)))
|
||||||
$current_class = " gnb_1dli_air";
|
$current_class = " gnb_1dli_air";
|
||||||
$gnb_str .= '<li class="gnb_1dli'.$current_class.'">'.PHP_EOL;
|
$gnb_str .= '<li class="gnb_1dli'.$current_class.'">'.PHP_EOL;
|
||||||
$gnb_str .= $href1 . $menu['menu'.$key][0][1] . $href2;
|
$gnb_str .= $href1 . $menu['menu'.$key][0][1] . $href2;
|
||||||
|
|||||||
@@ -57,7 +57,7 @@ $sql = " select *
|
|||||||
limit {$from_record}, {$rows} ";
|
limit {$from_record}, {$rows} ";
|
||||||
$result = sql_query($sql);
|
$result = sql_query($sql);
|
||||||
|
|
||||||
$listall = '<a href="'.$_SERVER['PHP_SELF'].'" class="local_ov01 local_ov">전체목록</a>';
|
$listall = '<a href="'.$_SERVER['PHP_SELF'].'" class="ov_listall">전체목록</a>';
|
||||||
|
|
||||||
$g5['title'] = '인기검색어관리';
|
$g5['title'] = '인기검색어관리';
|
||||||
include_once('./admin.head.php');
|
include_once('./admin.head.php');
|
||||||
|
|||||||
@@ -181,7 +181,7 @@ if ($result)
|
|||||||
$hs_memo = "인증 받지 못하였습니다. 계정을 다시 확인해 주세요.";
|
$hs_memo = "인증 받지 못하였습니다. 계정을 다시 확인해 주세요.";
|
||||||
break;
|
break;
|
||||||
default: // "미 확인 오류"
|
default: // "미 확인 오류"
|
||||||
$hs_memo = "알 수 없는 오류로 전송이 실패하었습니다.";
|
$hs_memo = "알 수 없는 오류로 전송이 실패하였습니다.";
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
$wr_failure++;
|
$wr_failure++;
|
||||||
|
|||||||
+5
-1
@@ -17,7 +17,7 @@ if(!$count)
|
|||||||
for($i=0; $i<$count; $i++) {
|
for($i=0; $i<$count; $i++) {
|
||||||
$qa_id = $tmp_array[$i];
|
$qa_id = $tmp_array[$i];
|
||||||
|
|
||||||
$sql = " select qa_id, qa_type, qa_status, qa_parent, qa_content, qa_file1, qa_file2
|
$sql = " select qa_id, mb_id, qa_type, qa_status, qa_parent, qa_content, qa_file1, qa_file2
|
||||||
from {$g5['qa_content_table']}
|
from {$g5['qa_content_table']}
|
||||||
where qa_id = '$qa_id' ";
|
where qa_id = '$qa_id' ";
|
||||||
$row = sql_fetch($sql);
|
$row = sql_fetch($sql);
|
||||||
@@ -25,6 +25,10 @@ for($i=0; $i<$count; $i++) {
|
|||||||
if(!$row['qa_id'])
|
if(!$row['qa_id'])
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
// 자신의 글이 아니면 건너뜀
|
||||||
|
if($is_admin != 'super' && $row['mb_id'] != $member['mb_id'])
|
||||||
|
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]);
|
||||||
|
|||||||
@@ -10,10 +10,11 @@ $w == u : 수정
|
|||||||
if($is_guest)
|
if($is_guest)
|
||||||
alert('회원이시라면 로그인 후 이용해 보십시오.', './login.php?url='.urlencode(G5_BBS_URL.'/qalist.php'));
|
alert('회원이시라면 로그인 후 이용해 보십시오.', './login.php?url='.urlencode(G5_BBS_URL.'/qalist.php'));
|
||||||
|
|
||||||
$qaconfig = get_qa_config();
|
|
||||||
|
|
||||||
$msg = array();
|
$msg = array();
|
||||||
|
|
||||||
|
// 1:1문의 설정값
|
||||||
|
$qaconfig = get_qa_config();
|
||||||
|
|
||||||
// e-mail 체크
|
// e-mail 체크
|
||||||
if(isset($_POST['qa_email']) && $qa_email) {
|
if(isset($_POST['qa_email']) && $qa_email) {
|
||||||
$qa_email = get_email_address(trim($_POST['qa_email']));
|
$qa_email = get_email_address(trim($_POST['qa_email']));
|
||||||
@@ -71,9 +72,6 @@ for ($i=1; $i<=5; $i++) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 1:1문의 설정값
|
|
||||||
$qaconfig = get_qa_config();
|
|
||||||
|
|
||||||
if($w == 'u' || $w == 'a' || $w == 'r') {
|
if($w == 'u' || $w == 'a' || $w == 'r') {
|
||||||
if($w == 'a' && !$is_admin)
|
if($w == 'a' && !$is_admin)
|
||||||
alert('답변은 관리자만 등록할 수 있습니다.');
|
alert('답변은 관리자만 등록할 수 있습니다.');
|
||||||
|
|||||||
@@ -20,7 +20,16 @@ if (!chk_captcha()) {
|
|||||||
alert('자동등록방지 숫자가 틀렸습니다.');
|
alert('자동등록방지 숫자가 틀렸습니다.');
|
||||||
}
|
}
|
||||||
|
|
||||||
$mb_id = trim($_POST['mb_id']);
|
if($w == 'u')
|
||||||
|
$mb_id = isset($_SESSION['ss_mb_id']) ? trim($_SESSION['ss_mb_id']) : '';
|
||||||
|
else if($w == '')
|
||||||
|
$mb_id = trim($_POST['mb_id']);
|
||||||
|
else
|
||||||
|
alert('잘못된 접근입니다', G5_URL);
|
||||||
|
|
||||||
|
if(!$mb_id)
|
||||||
|
alert('회원아이디 값이 없습니다. 올바른 방법으로 이용해 주십시오.');
|
||||||
|
|
||||||
$mb_password = trim($_POST['mb_password']);
|
$mb_password = trim($_POST['mb_password']);
|
||||||
$mb_password_re = trim($_POST['mb_password_re']);
|
$mb_password_re = trim($_POST['mb_password_re']);
|
||||||
$mb_name = trim($_POST['mb_name']);
|
$mb_name = trim($_POST['mb_name']);
|
||||||
@@ -123,50 +132,6 @@ $mb_addr_jibeon = preg_match("/^(N|R)$/", $mb_addr_jibeon) ? $mb_addr_jibeon : '
|
|||||||
// 사용자 코드 실행
|
// 사용자 코드 실행
|
||||||
@include_once($member_skin_path.'/register_form_update.head.skin.php');
|
@include_once($member_skin_path.'/register_form_update.head.skin.php');
|
||||||
|
|
||||||
$mb_dir = G5_DATA_PATH.'/member/'.substr($mb_id,0,2);
|
|
||||||
|
|
||||||
// 아이콘 삭제
|
|
||||||
if (isset($_POST['del_mb_icon'])) {
|
|
||||||
@unlink($mb_dir.'/'.$mb_id.'.gif');
|
|
||||||
}
|
|
||||||
|
|
||||||
$msg = "";
|
|
||||||
|
|
||||||
// 아이콘 업로드
|
|
||||||
$mb_icon = '';
|
|
||||||
if (isset($_FILES['mb_icon']) && is_uploaded_file($_FILES['mb_icon']['tmp_name'])) {
|
|
||||||
if (preg_match("/(\.gif)$/i", $_FILES['mb_icon']['name'])) {
|
|
||||||
// 아이콘 용량이 설정값보다 이하만 업로드 가능
|
|
||||||
if ($_FILES['mb_icon']['size'] <= $config['cf_member_icon_size']) {
|
|
||||||
@mkdir($mb_dir, G5_DIR_PERMISSION);
|
|
||||||
@chmod($mb_dir, G5_DIR_PERMISSION);
|
|
||||||
$dest_path = $mb_dir.'/'.$mb_id.'.gif';
|
|
||||||
move_uploaded_file($_FILES['mb_icon']['tmp_name'], $dest_path);
|
|
||||||
chmod($dest_path, G5_FILE_PERMISSION);
|
|
||||||
if (file_exists($dest_path)) {
|
|
||||||
//=================================================================\
|
|
||||||
// 090714
|
|
||||||
// gif 파일에 악성코드를 심어 업로드 하는 경우를 방지
|
|
||||||
// 에러메세지는 출력하지 않는다.
|
|
||||||
//-----------------------------------------------------------------
|
|
||||||
$size = getimagesize($dest_path);
|
|
||||||
if ($size[2] != 1) // gif 파일이 아니면 올라간 이미지를 삭제한다.
|
|
||||||
@unlink($dest_path);
|
|
||||||
else
|
|
||||||
// 아이콘의 폭 또는 높이가 설정값 보다 크다면 이미 업로드 된 아이콘 삭제
|
|
||||||
if ($size[0] > $config['cf_member_icon_width'] || $size[1] > $config['cf_member_icon_height'])
|
|
||||||
@unlink($dest_path);
|
|
||||||
//=================================================================\
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
$msg .= '회원아이콘을 '.number_format($config['cf_member_icon_size']).'바이트 이하로 업로드 해주십시오.';
|
|
||||||
}
|
|
||||||
|
|
||||||
} else {
|
|
||||||
$msg .= $_FILES['mb_icon']['name'].'은(는) gif 파일이 아닙니다.';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
//===============================================================
|
//===============================================================
|
||||||
// 본인확인
|
// 본인확인
|
||||||
//---------------------------------------------------------------
|
//---------------------------------------------------------------
|
||||||
@@ -213,7 +178,6 @@ if ($config['cf_cert_use'] && $cert_type && $md5_cert_no) {
|
|||||||
//===============================================================
|
//===============================================================
|
||||||
|
|
||||||
if ($w == '') {
|
if ($w == '') {
|
||||||
|
|
||||||
$sql = " insert into {$g5['member_table']}
|
$sql = " insert into {$g5['member_table']}
|
||||||
set mb_id = '{$mb_id}',
|
set mb_id = '{$mb_id}',
|
||||||
mb_password = '".sql_password($mb_password)."',
|
mb_password = '".sql_password($mb_password)."',
|
||||||
@@ -303,11 +267,10 @@ if ($w == '') {
|
|||||||
set_session('ss_mb_reg', $mb_id);
|
set_session('ss_mb_reg', $mb_id);
|
||||||
|
|
||||||
} else if ($w == 'u') {
|
} else if ($w == 'u') {
|
||||||
|
|
||||||
if (!trim($_SESSION['ss_mb_id']))
|
if (!trim($_SESSION['ss_mb_id']))
|
||||||
alert('로그인 되어 있지 않습니다.');
|
alert('로그인 되어 있지 않습니다.');
|
||||||
|
|
||||||
if ($_SESSION['ss_mb_id'] != $mb_id)
|
if (trim($_POST['mb_id']) != $mb_id)
|
||||||
alert("로그인된 정보와 수정하려는 정보가 틀리므로 수정할 수 없습니다.\\n만약 올바르지 않은 방법을 사용하신다면 바로 중지하여 주십시오.");
|
alert("로그인된 정보와 수정하려는 정보가 틀리므로 수정할 수 없습니다.\\n만약 올바르지 않은 방법을 사용하신다면 바로 중지하여 주십시오.");
|
||||||
|
|
||||||
$sql_password = "";
|
$sql_password = "";
|
||||||
@@ -368,6 +331,52 @@ if ($w == '') {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// 회원 아이콘
|
||||||
|
$mb_dir = G5_DATA_PATH.'/member/'.substr($mb_id,0,2);
|
||||||
|
|
||||||
|
// 아이콘 삭제
|
||||||
|
if (isset($_POST['del_mb_icon'])) {
|
||||||
|
@unlink($mb_dir.'/'.$mb_id.'.gif');
|
||||||
|
}
|
||||||
|
|
||||||
|
$msg = "";
|
||||||
|
|
||||||
|
// 아이콘 업로드
|
||||||
|
$mb_icon = '';
|
||||||
|
if (isset($_FILES['mb_icon']) && is_uploaded_file($_FILES['mb_icon']['tmp_name'])) {
|
||||||
|
if (preg_match("/(\.gif)$/i", $_FILES['mb_icon']['name'])) {
|
||||||
|
// 아이콘 용량이 설정값보다 이하만 업로드 가능
|
||||||
|
if ($_FILES['mb_icon']['size'] <= $config['cf_member_icon_size']) {
|
||||||
|
@mkdir($mb_dir, G5_DIR_PERMISSION);
|
||||||
|
@chmod($mb_dir, G5_DIR_PERMISSION);
|
||||||
|
$dest_path = $mb_dir.'/'.$mb_id.'.gif';
|
||||||
|
move_uploaded_file($_FILES['mb_icon']['tmp_name'], $dest_path);
|
||||||
|
chmod($dest_path, G5_FILE_PERMISSION);
|
||||||
|
if (file_exists($dest_path)) {
|
||||||
|
//=================================================================\
|
||||||
|
// 090714
|
||||||
|
// gif 파일에 악성코드를 심어 업로드 하는 경우를 방지
|
||||||
|
// 에러메세지는 출력하지 않는다.
|
||||||
|
//-----------------------------------------------------------------
|
||||||
|
$size = getimagesize($dest_path);
|
||||||
|
if ($size[2] != 1) // gif 파일이 아니면 올라간 이미지를 삭제한다.
|
||||||
|
@unlink($dest_path);
|
||||||
|
else
|
||||||
|
// 아이콘의 폭 또는 높이가 설정값 보다 크다면 이미 업로드 된 아이콘 삭제
|
||||||
|
if ($size[0] > $config['cf_member_icon_width'] || $size[1] > $config['cf_member_icon_height'])
|
||||||
|
@unlink($dest_path);
|
||||||
|
//=================================================================\
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
$msg .= '회원아이콘을 '.number_format($config['cf_member_icon_size']).'바이트 이하로 업로드 해주십시오.';
|
||||||
|
}
|
||||||
|
|
||||||
|
} else {
|
||||||
|
$msg .= $_FILES['mb_icon']['name'].'은(는) gif 파일이 아닙니다.';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// 인증메일 발송
|
// 인증메일 발송
|
||||||
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'].'] 인증확인 메일입니다.';
|
||||||
@@ -397,14 +406,14 @@ unset($_SESSION['ss_cert_adult']);
|
|||||||
if ($msg)
|
if ($msg)
|
||||||
echo '<script>alert(\''.$msg.'\');</script>';
|
echo '<script>alert(\''.$msg.'\');</script>';
|
||||||
|
|
||||||
if ($w == "") {
|
if ($w == '') {
|
||||||
goto_url(G5_HTTP_BBS_URL.'/register_result.php');
|
goto_url(G5_HTTP_BBS_URL.'/register_result.php');
|
||||||
} else if ($w == 'u') {
|
} else if ($w == 'u') {
|
||||||
$row = sql_fetch(" select mb_password from {$g5['member_table']} where mb_id = '{$member['mb_id']}' ");
|
$row = sql_fetch(" select mb_password from {$g5['member_table']} where mb_id = '{$member['mb_id']}' ");
|
||||||
$tmp_password = $row['mb_password'];
|
$tmp_password = $row['mb_password'];
|
||||||
|
|
||||||
if ($old_email != $mb_email && $config['cf_use_email_certify']) {
|
if ($old_email != $mb_email && $config['cf_use_email_certify']) {
|
||||||
set_session("ss_mb_id", "");
|
set_session('ss_mb_id', '');
|
||||||
alert('회원 정보가 수정 되었습니다.\n\nE-mail 주소가 변경되었으므로 다시 인증하셔야 합니다.', G5_URL);
|
alert('회원 정보가 수정 되었습니다.\n\nE-mail 주소가 변경되었으므로 다시 인증하셔야 합니다.', G5_URL);
|
||||||
} else {
|
} else {
|
||||||
alert('회원 정보가 수정 되었습니다.', G5_URL);
|
alert('회원 정보가 수정 되었습니다.', G5_URL);
|
||||||
|
|||||||
@@ -40,10 +40,10 @@ if ($wr_content && ($member['mb_level'] >= $board['bo_comment_level']))
|
|||||||
if ($wr['wr_id'])
|
if ($wr['wr_id'])
|
||||||
{
|
{
|
||||||
$mb_id = $member['mb_id'];
|
$mb_id = $member['mb_id'];
|
||||||
$wr_name = $member['mb_nick'];
|
$wr_name = addslashes(clean_xss_tags($board['bo_use_name'] ? $member['mb_name'] : $member['mb_nick']));
|
||||||
$wr_password = $member['mb_password'];
|
$wr_password = $member['mb_password'];
|
||||||
$wr_email = $member['mb_email'];
|
$wr_email = addslashes($member['mb_email']);
|
||||||
$wr_homepage = $member['mb_homepage'];
|
$wr_homepage = addslashes(clean_xss_tags($member['mb_homepage']));
|
||||||
|
|
||||||
$sql = " select max(wr_comment) as max_comment from $write_table
|
$sql = " select max(wr_comment) as max_comment from $write_table
|
||||||
where wr_parent = '$wr_id' and wr_is_comment = '1' ";
|
where wr_parent = '$wr_id' and wr_is_comment = '1' ";
|
||||||
|
|||||||
+9
-9
@@ -3,9 +3,6 @@ include_once('./_common.php');
|
|||||||
include_once(G5_EDITOR_LIB);
|
include_once(G5_EDITOR_LIB);
|
||||||
include_once(G5_CAPTCHA_PATH.'/captcha.lib.php');
|
include_once(G5_CAPTCHA_PATH.'/captcha.lib.php');
|
||||||
|
|
||||||
set_session('ss_bo_table', $_REQUEST['bo_table']);
|
|
||||||
set_session('ss_wr_id', $_REQUEST['wr_id']);
|
|
||||||
|
|
||||||
if (!$board['bo_table']) {
|
if (!$board['bo_table']) {
|
||||||
alert('존재하지 않는 게시판입니다.', G5_URL);
|
alert('존재하지 않는 게시판입니다.', G5_URL);
|
||||||
}
|
}
|
||||||
@@ -294,10 +291,10 @@ $homepage = "";
|
|||||||
if ($w == "" || $w == "r") {
|
if ($w == "" || $w == "r") {
|
||||||
if ($is_member) {
|
if ($is_member) {
|
||||||
if (isset($write['wr_name'])) {
|
if (isset($write['wr_name'])) {
|
||||||
$name = get_text(cut_str($write['wr_name'],20));
|
$name = get_text(cut_str(stripslashes($write['wr_name']),20));
|
||||||
}
|
}
|
||||||
$email = $member['mb_email'];
|
$email = get_email_address($member['mb_email']);
|
||||||
$homepage = get_text($member['mb_homepage']);
|
$homepage = get_text(stripslashes($member['mb_homepage']));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -318,9 +315,9 @@ if ($w == '') {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$name = get_text(cut_str($write['wr_name'],20));
|
$name = get_text(cut_str(stripslashes($write['wr_name']),20));
|
||||||
$email = get_email_address($write['wr_email']);
|
$email = get_email_address($write['wr_email']);
|
||||||
$homepage = get_text($write['wr_homepage']);
|
$homepage = get_text(stripslashes($write['wr_homepage']));
|
||||||
|
|
||||||
for ($i=1; $i<=G5_LINK_COUNT; $i++) {
|
for ($i=1; $i<=G5_LINK_COUNT; $i++) {
|
||||||
$write['wr_link'.$i] = get_text($write['wr_link'.$i]);
|
$write['wr_link'.$i] = get_text($write['wr_link'.$i]);
|
||||||
@@ -353,6 +350,9 @@ if ($w == '') {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
set_session('ss_bo_table', $_REQUEST['bo_table']);
|
||||||
|
set_session('ss_wr_id', $_REQUEST['wr_id']);
|
||||||
|
|
||||||
$subject = "";
|
$subject = "";
|
||||||
if (isset($write['wr_subject'])) {
|
if (isset($write['wr_subject'])) {
|
||||||
$subject = str_replace("\"", """, get_text(cut_str($write['wr_subject'], 255), 0));
|
$subject = str_replace("\"", """, get_text(cut_str($write['wr_subject'], 255), 0));
|
||||||
@@ -408,7 +408,7 @@ include_once('./board_head.php');
|
|||||||
|
|
||||||
$action_url = https_url(G5_BBS_DIR)."/write_update.php";
|
$action_url = https_url(G5_BBS_DIR)."/write_update.php";
|
||||||
|
|
||||||
echo '<!-- skin : '.(G5_IS_MOBEILE ? $board['bo_mobile_skin'] : $board['bo_skin']).' -->';
|
echo '<!-- skin : '.(G5_IS_MOBILE ? $board['bo_mobile_skin'] : $board['bo_skin']).' -->';
|
||||||
include_once ($board_skin_path.'/write.skin.php');
|
include_once ($board_skin_path.'/write.skin.php');
|
||||||
|
|
||||||
include_once('./board_tail.php');
|
include_once('./board_tail.php');
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ $w = $_POST["w"];
|
|||||||
$wr_name = trim($_POST['wr_name']);
|
$wr_name = trim($_POST['wr_name']);
|
||||||
$wr_email = '';
|
$wr_email = '';
|
||||||
if (!empty($_POST['wr_email']))
|
if (!empty($_POST['wr_email']))
|
||||||
$wr_email = trim($_POST['wr_email']);
|
$wr_email = get_email_address(trim($_POST['wr_email']));
|
||||||
|
|
||||||
// 비회원의 경우 이름이 누락되는 경우가 있음
|
// 비회원의 경우 이름이 누락되는 경우가 있음
|
||||||
if ($is_guest) {
|
if ($is_guest) {
|
||||||
@@ -52,10 +52,10 @@ if ($is_member)
|
|||||||
{
|
{
|
||||||
$mb_id = $member['mb_id'];
|
$mb_id = $member['mb_id'];
|
||||||
// 4.00.13 - 실명 사용일때 댓글에 닉네임으로 입력되던 오류를 수정
|
// 4.00.13 - 실명 사용일때 댓글에 닉네임으로 입력되던 오류를 수정
|
||||||
$wr_name = $board['bo_use_name'] ? $member['mb_name'] : $member['mb_nick'];
|
$wr_name = addslashes(clean_xss_tags($board['bo_use_name'] ? $member['mb_name'] : $member['mb_nick']));
|
||||||
$wr_password = $member['mb_password'];
|
$wr_password = $member['mb_password'];
|
||||||
$wr_email = $member['mb_email'];
|
$wr_email = addslashes($member['mb_email']);
|
||||||
$wr_homepage = $member['mb_homepage'];
|
$wr_homepage = addslashes(clean_xss_tags($member['mb_homepage']));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
+218
-210
@@ -28,11 +28,15 @@ if ($wr_content == '') {
|
|||||||
$wr_link1 = '';
|
$wr_link1 = '';
|
||||||
if (isset($_POST['wr_link1'])) {
|
if (isset($_POST['wr_link1'])) {
|
||||||
$wr_link1 = substr($_POST['wr_link1'],0,1000);
|
$wr_link1 = substr($_POST['wr_link1'],0,1000);
|
||||||
|
$wr_link1 = trim(strip_tags($wr_link1));
|
||||||
|
$wr_link1 = preg_replace("#[\\\]+$#", "", $wr_link1);
|
||||||
}
|
}
|
||||||
|
|
||||||
$wr_link2 = '';
|
$wr_link2 = '';
|
||||||
if (isset($_POST['wr_link2'])) {
|
if (isset($_POST['wr_link2'])) {
|
||||||
$wr_link2 = substr($_POST['wr_link2'],0,1000);
|
$wr_link2 = substr($_POST['wr_link2'],0,1000);
|
||||||
|
$wr_link2 = trim(strip_tags($wr_link2));
|
||||||
|
$wr_link2 = preg_replace("#[\\\]+$#", "", $wr_link2);
|
||||||
}
|
}
|
||||||
|
|
||||||
$msg = implode('<br>', $msg);
|
$msg = implode('<br>', $msg);
|
||||||
@@ -52,10 +56,6 @@ if (empty($_POST)) {
|
|||||||
alert("파일 또는 글내용의 크기가 서버에서 설정한 값을 넘어 오류가 발생하였습니다.\\npost_max_size=".ini_get('post_max_size')." , upload_max_filesize=".$upload_max_filesize."\\n게시판관리자 또는 서버관리자에게 문의 바랍니다.");
|
alert("파일 또는 글내용의 크기가 서버에서 설정한 값을 넘어 오류가 발생하였습니다.\\npost_max_size=".ini_get('post_max_size')." , upload_max_filesize=".$upload_max_filesize."\\n게시판관리자 또는 서버관리자에게 문의 바랍니다.");
|
||||||
}
|
}
|
||||||
|
|
||||||
$w = $_POST['w'];
|
|
||||||
$wr_link1 = trim(strip_tags($_POST['wr_link1']));
|
|
||||||
$wr_link2 = trim(strip_tags($_POST['wr_link2']));
|
|
||||||
|
|
||||||
$notice_array = explode(",", $board['bo_notice']);
|
$notice_array = explode(",", $board['bo_notice']);
|
||||||
|
|
||||||
if ($w == 'u' || $w == 'r') {
|
if ($w == 'u' || $w == 'r') {
|
||||||
@@ -177,6 +177,220 @@ if ($w == '' || $w == 'r') {
|
|||||||
if (!isset($_POST['wr_subject']) || !trim($_POST['wr_subject']))
|
if (!isset($_POST['wr_subject']) || !trim($_POST['wr_subject']))
|
||||||
alert('제목을 입력하여 주십시오.');
|
alert('제목을 입력하여 주십시오.');
|
||||||
|
|
||||||
|
if ($w == '' || $w == 'r') {
|
||||||
|
|
||||||
|
if ($member['mb_id']) {
|
||||||
|
$mb_id = $member['mb_id'];
|
||||||
|
$wr_name = addslashes(clean_xss_tags($board['bo_use_name'] ? $member['mb_name'] : $member['mb_nick']));
|
||||||
|
$wr_password = $member['mb_password'];
|
||||||
|
$wr_email = addslashes($member['mb_email']);
|
||||||
|
$wr_homepage = addslashes(clean_xss_tags($member['mb_homepage']));
|
||||||
|
} else {
|
||||||
|
$mb_id = '';
|
||||||
|
// 비회원의 경우 이름이 누락되는 경우가 있음
|
||||||
|
$wr_name = clean_xss_tags(trim($_POST['wr_name']));
|
||||||
|
if (!$wr_name)
|
||||||
|
alert('이름은 필히 입력하셔야 합니다.');
|
||||||
|
$wr_password = sql_password($wr_password);
|
||||||
|
$wr_email = get_email_address(trim($_POST['wr_email']));
|
||||||
|
$wr_homepage = clean_xss_tags($wr_homepage);
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($w == 'r') {
|
||||||
|
// 답변의 원글이 비밀글이라면 비밀번호는 원글과 동일하게 넣는다.
|
||||||
|
if ($secret)
|
||||||
|
$wr_password = $wr['wr_password'];
|
||||||
|
|
||||||
|
$wr_id = $wr_id . $reply;
|
||||||
|
$wr_num = $write['wr_num'];
|
||||||
|
$wr_reply = $reply;
|
||||||
|
} else {
|
||||||
|
$wr_num = get_next_num($write_table);
|
||||||
|
$wr_reply = '';
|
||||||
|
}
|
||||||
|
|
||||||
|
$sql = " insert into $write_table
|
||||||
|
set wr_num = '$wr_num',
|
||||||
|
wr_reply = '$wr_reply',
|
||||||
|
wr_comment = 0,
|
||||||
|
ca_name = '$ca_name',
|
||||||
|
wr_option = '$html,$secret,$mail',
|
||||||
|
wr_subject = '$wr_subject',
|
||||||
|
wr_content = '$wr_content',
|
||||||
|
wr_link1 = '$wr_link1',
|
||||||
|
wr_link2 = '$wr_link2',
|
||||||
|
wr_link1_hit = 0,
|
||||||
|
wr_link2_hit = 0,
|
||||||
|
wr_hit = 0,
|
||||||
|
wr_good = 0,
|
||||||
|
wr_nogood = 0,
|
||||||
|
mb_id = '{$member['mb_id']}',
|
||||||
|
wr_password = '$wr_password',
|
||||||
|
wr_name = '$wr_name',
|
||||||
|
wr_email = '$wr_email',
|
||||||
|
wr_homepage = '$wr_homepage',
|
||||||
|
wr_datetime = '".G5_TIME_YMDHIS."',
|
||||||
|
wr_last = '".G5_TIME_YMDHIS."',
|
||||||
|
wr_ip = '{$_SERVER['REMOTE_ADDR']}',
|
||||||
|
wr_1 = '$wr_1',
|
||||||
|
wr_2 = '$wr_2',
|
||||||
|
wr_3 = '$wr_3',
|
||||||
|
wr_4 = '$wr_4',
|
||||||
|
wr_5 = '$wr_5',
|
||||||
|
wr_6 = '$wr_6',
|
||||||
|
wr_7 = '$wr_7',
|
||||||
|
wr_8 = '$wr_8',
|
||||||
|
wr_9 = '$wr_9',
|
||||||
|
wr_10 = '$wr_10' ";
|
||||||
|
sql_query($sql);
|
||||||
|
|
||||||
|
$wr_id = mysql_insert_id();
|
||||||
|
|
||||||
|
// 부모 아이디에 UPDATE
|
||||||
|
sql_query(" update $write_table set wr_parent = '$wr_id' where wr_id = '$wr_id' ");
|
||||||
|
|
||||||
|
// 새글 INSERT
|
||||||
|
sql_query(" insert into {$g5['board_new_table']} ( bo_table, wr_id, wr_parent, bn_datetime, mb_id ) values ( '{$bo_table}', '{$wr_id}', '{$wr_id}', '".G5_TIME_YMDHIS."', '{$member['mb_id']}' ) ");
|
||||||
|
|
||||||
|
// 게시글 1 증가
|
||||||
|
sql_query("update {$g5['board_table']} set bo_count_write = bo_count_write + 1 where bo_table = '{$bo_table}'");
|
||||||
|
|
||||||
|
// 쓰기 포인트 부여
|
||||||
|
if ($w == '') {
|
||||||
|
if ($notice) {
|
||||||
|
$bo_notice = $wr_id.($board['bo_notice'] ? ",".$board['bo_notice'] : '');
|
||||||
|
sql_query(" update {$g5['board_table']} set bo_notice = '{$bo_notice}' where bo_table = '{$bo_table}' ");
|
||||||
|
}
|
||||||
|
|
||||||
|
insert_point($member['mb_id'], $board['bo_write_point'], "{$board['bo_subject']} {$wr_id} 글쓰기", $bo_table, $wr_id, '쓰기');
|
||||||
|
} else {
|
||||||
|
// 답변은 코멘트 포인트를 부여함
|
||||||
|
// 답변 포인트가 많은 경우 코멘트 대신 답변을 하는 경우가 많음
|
||||||
|
insert_point($member['mb_id'], $board['bo_comment_point'], "{$board['bo_subject']} {$wr_id} 글답변", $bo_table, $wr_id, '쓰기');
|
||||||
|
}
|
||||||
|
} else if ($w == 'u') {
|
||||||
|
if (get_session('ss_bo_table') != $_POST['bo_table'] || get_session('ss_wr_id') != $_POST['wr_id']) {
|
||||||
|
alert('올바른 방법으로 수정하여 주십시오.', G5_BBS_URL.'/board.php?bo_table='.$bo_table);
|
||||||
|
}
|
||||||
|
|
||||||
|
$return_url = './board.php?bo_table='.$bo_table.'&wr_id='.$wr_id;
|
||||||
|
|
||||||
|
if ($is_admin == 'super') // 최고관리자 통과
|
||||||
|
;
|
||||||
|
else if ($is_admin == 'group') { // 그룹관리자
|
||||||
|
$mb = get_member($write['mb_id']);
|
||||||
|
if ($member['mb_id'] != $group['gr_admin']) // 자신이 관리하는 그룹인가?
|
||||||
|
alert('자신이 관리하는 그룹의 게시판이 아니므로 수정할 수 없습니다.', $return_url);
|
||||||
|
else if ($member['mb_level'] < $mb['mb_level']) // 자신의 레벨이 크거나 같다면 통과
|
||||||
|
alert('자신의 권한보다 높은 권한의 회원이 작성한 글은 수정할 수 없습니다.', $return_url);
|
||||||
|
} else if ($is_admin == 'board') { // 게시판관리자이면
|
||||||
|
$mb = get_member($write['mb_id']);
|
||||||
|
if ($member['mb_id'] != $board['bo_admin']) // 자신이 관리하는 게시판인가?
|
||||||
|
alert('자신이 관리하는 게시판이 아니므로 수정할 수 없습니다.', $return_url);
|
||||||
|
else if ($member['mb_level'] < $mb['mb_level']) // 자신의 레벨이 크거나 같다면 통과
|
||||||
|
alert('자신의 권한보다 높은 권한의 회원이 작성한 글은 수정할 수 없습니다.', $return_url);
|
||||||
|
} else if ($member['mb_id']) {
|
||||||
|
if ($member['mb_id'] != $write['mb_id'])
|
||||||
|
alert('자신의 글이 아니므로 수정할 수 없습니다.', $return_url);
|
||||||
|
} else {
|
||||||
|
if ($write['mb_id'])
|
||||||
|
alert('로그인 후 수정하세요.', './login.php?url='.urlencode($return_url));
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($member['mb_id']) {
|
||||||
|
// 자신의 글이라면
|
||||||
|
if ($member['mb_id'] == $wr['mb_id']) {
|
||||||
|
$mb_id = $member['mb_id'];
|
||||||
|
$wr_name = addslashes(clean_xss_tags($board['bo_use_name'] ? $member['mb_name'] : $member['mb_nick']));
|
||||||
|
$wr_email = addslashes($member['mb_email']);
|
||||||
|
$wr_homepage = addslashes(clean_xss_tags($member['mb_homepage']));
|
||||||
|
} else {
|
||||||
|
$mb_id = $wr['mb_id'];
|
||||||
|
if(isset($_POST['wr_name']) && $_POST['wr_name'])
|
||||||
|
$wr_name = clean_xss_tags(trim($_POST['wr_name']));
|
||||||
|
else
|
||||||
|
$wr_name = addslashes(clean_xss_tags($wr['wr_name']));
|
||||||
|
if(isset($_POST['wr_email']) && $_POST['wr_email'])
|
||||||
|
$wr_email = get_email_address(trim($_POST['wr_email']));
|
||||||
|
else
|
||||||
|
$wr_email = addslashes($wr['wr_email']);
|
||||||
|
if(isset($_POST['wr_homepage']) && $_POST['wr_homepage'])
|
||||||
|
$wr_homepage = addslashes(clean_xss_tags($_POST['wr_homepage']));
|
||||||
|
else
|
||||||
|
$wr_homepage = addslashes(clean_xss_tags($wr['wr_homepage']));
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
$mb_id = "";
|
||||||
|
// 비회원의 경우 이름이 누락되는 경우가 있음
|
||||||
|
if (!trim($wr_name)) alert("이름은 필히 입력하셔야 합니다.");
|
||||||
|
$wr_name = clean_xss_tags(trim($_POST['wr_name']));
|
||||||
|
$wr_email = get_email_address(trim($_POST['wr_email']));
|
||||||
|
}
|
||||||
|
|
||||||
|
$sql_password = $wr_password ? " , wr_password = '".sql_password($wr_password)."' " : "";
|
||||||
|
|
||||||
|
$sql_ip = '';
|
||||||
|
if (!$is_admin)
|
||||||
|
$sql_ip = " , wr_ip = '{$_SERVER['REMOTE_ADDR']}' ";
|
||||||
|
|
||||||
|
$sql = " update {$write_table}
|
||||||
|
set ca_name = '{$ca_name}',
|
||||||
|
wr_option = '{$html},{$secret},{$mail}',
|
||||||
|
wr_subject = '{$wr_subject}',
|
||||||
|
wr_content = '{$wr_content}',
|
||||||
|
wr_link1 = '{$wr_link1}',
|
||||||
|
wr_link2 = '{$wr_link2}',
|
||||||
|
mb_id = '{$mb_id}',
|
||||||
|
wr_name = '{$wr_name}',
|
||||||
|
wr_email = '{$wr_email}',
|
||||||
|
wr_homepage = '{$wr_homepage}',
|
||||||
|
wr_1 = '{$wr_1}',
|
||||||
|
wr_2 = '{$wr_2}',
|
||||||
|
wr_3 = '{$wr_3}',
|
||||||
|
wr_4 = '{$wr_4}',
|
||||||
|
wr_5 = '{$wr_5}',
|
||||||
|
wr_6 = '{$wr_6}',
|
||||||
|
wr_7 = '{$wr_7}',
|
||||||
|
wr_8 = '{$wr_8}',
|
||||||
|
wr_9 = '{$wr_9}',
|
||||||
|
wr_10= '{$wr_10}'
|
||||||
|
{$sql_ip}
|
||||||
|
{$sql_password}
|
||||||
|
where wr_id = '{$wr['wr_id']}' ";
|
||||||
|
sql_query($sql);
|
||||||
|
|
||||||
|
// 분류가 수정되는 경우 해당되는 코멘트의 분류명도 모두 수정함
|
||||||
|
// 코멘트의 분류를 수정하지 않으면 검색이 제대로 되지 않음
|
||||||
|
$sql = " update {$write_table} set ca_name = '{$ca_name}' where wr_parent = '{$wr['wr_id']}' ";
|
||||||
|
sql_query($sql);
|
||||||
|
|
||||||
|
/*
|
||||||
|
if ($notice) {
|
||||||
|
//if (!preg_match("/[^0-9]{0,1}{$wr_id}[\r]{0,1}/",$board['bo_notice']))
|
||||||
|
if (!in_array((int)$wr_id, $notice_array)) {
|
||||||
|
$bo_notice = $wr_id . ',' . $board['bo_notice'];
|
||||||
|
sql_query(" update {$g5['board_table']} set bo_notice = '{$bo_notice}' where bo_table = '{$bo_table}' ");
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
$bo_notice = '';
|
||||||
|
for ($i=0; $i<count($notice_array); $i++)
|
||||||
|
if ((int)$wr_id != (int)$notice_array[$i])
|
||||||
|
$bo_notice .= $notice_array[$i] . ',';
|
||||||
|
$bo_notice = trim($bo_notice);
|
||||||
|
//$bo_notice = preg_replace("/^".$wr_id."[\n]?$/m", "", $board['bo_notice']);
|
||||||
|
sql_query(" update {$g5['board_table']} set bo_notice = '{$bo_notice}' where bo_table = '{$bo_table}' ");
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
|
$bo_notice = board_notice($board['bo_notice'], $wr_id, $notice);
|
||||||
|
sql_query(" update {$g5['board_table']} set bo_notice = '{$bo_notice}' where bo_table = '{$bo_table}' ");
|
||||||
|
}
|
||||||
|
|
||||||
|
// 게시판그룹접근사용을 하지 않아야 하고 비회원 글읽기가 가능해야 하며 비밀글이 아니어야 합니다.
|
||||||
|
if (!$group['gr_use_access'] && $board['bo_read_level'] < 2 && !$secret) {
|
||||||
|
naver_syndi_ping($bo_table, $wr_id);
|
||||||
|
}
|
||||||
|
|
||||||
// 디렉토리가 없다면 생성합니다. (퍼미션도 변경하구요.)
|
// 디렉토리가 없다면 생성합니다. (퍼미션도 변경하구요.)
|
||||||
@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);
|
||||||
@@ -283,212 +497,6 @@ for ($i=0; $i<count($_FILES['bf_file']['name']); $i++) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($w == '' || $w == 'r') {
|
|
||||||
|
|
||||||
if ($member['mb_id']) {
|
|
||||||
$mb_id = $member['mb_id'];
|
|
||||||
$wr_name = addslashes(clean_xss_tags($board['bo_use_name'] ? $member['mb_name'] : $member['mb_nick']));
|
|
||||||
$wr_password = $member['mb_password'];
|
|
||||||
$wr_email = addslashes($member['mb_email']);
|
|
||||||
$wr_homepage = addslashes(clean_xss_tags($member['mb_homepage']));
|
|
||||||
} else {
|
|
||||||
$mb_id = '';
|
|
||||||
// 비회원의 경우 이름이 누락되는 경우가 있음
|
|
||||||
$wr_name = clean_xss_tags(trim($_POST['wr_name']));
|
|
||||||
if (!$wr_name)
|
|
||||||
alert('이름은 필히 입력하셔야 합니다.');
|
|
||||||
$wr_password = sql_password($wr_password);
|
|
||||||
$wr_email = get_email_address(trim($_POST['wr_email']));
|
|
||||||
$wr_homepage = clean_xss_tags($wr_homepage);
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($w == 'r') {
|
|
||||||
// 답변의 원글이 비밀글이라면 비밀번호는 원글과 동일하게 넣는다.
|
|
||||||
if ($secret)
|
|
||||||
$wr_password = $wr['wr_password'];
|
|
||||||
|
|
||||||
$wr_id = $wr_id . $reply;
|
|
||||||
$wr_num = $write['wr_num'];
|
|
||||||
$wr_reply = $reply;
|
|
||||||
} else {
|
|
||||||
$wr_num = get_next_num($write_table);
|
|
||||||
$wr_reply = '';
|
|
||||||
}
|
|
||||||
|
|
||||||
$sql = " insert into $write_table
|
|
||||||
set wr_num = '$wr_num',
|
|
||||||
wr_reply = '$wr_reply',
|
|
||||||
wr_comment = 0,
|
|
||||||
ca_name = '$ca_name',
|
|
||||||
wr_option = '$html,$secret,$mail',
|
|
||||||
wr_subject = '$wr_subject',
|
|
||||||
wr_content = '$wr_content',
|
|
||||||
wr_link1 = '$wr_link1',
|
|
||||||
wr_link2 = '$wr_link2',
|
|
||||||
wr_link1_hit = 0,
|
|
||||||
wr_link2_hit = 0,
|
|
||||||
wr_hit = 0,
|
|
||||||
wr_good = 0,
|
|
||||||
wr_nogood = 0,
|
|
||||||
mb_id = '{$member['mb_id']}',
|
|
||||||
wr_password = '$wr_password',
|
|
||||||
wr_name = '$wr_name',
|
|
||||||
wr_email = '$wr_email',
|
|
||||||
wr_homepage = '$wr_homepage',
|
|
||||||
wr_datetime = '".G5_TIME_YMDHIS."',
|
|
||||||
wr_last = '".G5_TIME_YMDHIS."',
|
|
||||||
wr_ip = '{$_SERVER['REMOTE_ADDR']}',
|
|
||||||
wr_1 = '$wr_1',
|
|
||||||
wr_2 = '$wr_2',
|
|
||||||
wr_3 = '$wr_3',
|
|
||||||
wr_4 = '$wr_4',
|
|
||||||
wr_5 = '$wr_5',
|
|
||||||
wr_6 = '$wr_6',
|
|
||||||
wr_7 = '$wr_7',
|
|
||||||
wr_8 = '$wr_8',
|
|
||||||
wr_9 = '$wr_9',
|
|
||||||
wr_10 = '$wr_10' ";
|
|
||||||
sql_query($sql);
|
|
||||||
|
|
||||||
$wr_id = mysql_insert_id();
|
|
||||||
|
|
||||||
// 부모 아이디에 UPDATE
|
|
||||||
sql_query(" update $write_table set wr_parent = '$wr_id' where wr_id = '$wr_id' ");
|
|
||||||
|
|
||||||
// 새글 INSERT
|
|
||||||
sql_query(" insert into {$g5['board_new_table']} ( bo_table, wr_id, wr_parent, bn_datetime, mb_id ) values ( '{$bo_table}', '{$wr_id}', '{$wr_id}', '".G5_TIME_YMDHIS."', '{$member['mb_id']}' ) ");
|
|
||||||
|
|
||||||
// 게시글 1 증가
|
|
||||||
sql_query("update {$g5['board_table']} set bo_count_write = bo_count_write + 1 where bo_table = '{$bo_table}'");
|
|
||||||
|
|
||||||
// 쓰기 포인트 부여
|
|
||||||
if ($w == '') {
|
|
||||||
if ($notice) {
|
|
||||||
$bo_notice = $wr_id.($board['bo_notice'] ? ",".$board['bo_notice'] : '');
|
|
||||||
sql_query(" update {$g5['board_table']} set bo_notice = '{$bo_notice}' where bo_table = '{$bo_table}' ");
|
|
||||||
}
|
|
||||||
|
|
||||||
insert_point($member['mb_id'], $board['bo_write_point'], "{$board['bo_subject']} {$wr_id} 글쓰기", $bo_table, $wr_id, '쓰기');
|
|
||||||
} else {
|
|
||||||
// 답변은 코멘트 포인트를 부여함
|
|
||||||
// 답변 포인트가 많은 경우 코멘트 대신 답변을 하는 경우가 많음
|
|
||||||
insert_point($member['mb_id'], $board['bo_comment_point'], "{$board['bo_subject']} {$wr_id} 글답변", $bo_table, $wr_id, '쓰기');
|
|
||||||
}
|
|
||||||
} else if ($w == 'u') {
|
|
||||||
if (get_session('ss_bo_table') != $_POST['bo_table'] || get_session('ss_wr_id') != $_POST['wr_id']) {
|
|
||||||
alert('올바른 방법으로 수정하여 주십시오.');
|
|
||||||
}
|
|
||||||
|
|
||||||
$return_url = './board.php?bo_table='.$bo_table.'&wr_id='.$wr_id;
|
|
||||||
|
|
||||||
if ($is_admin == 'super') // 최고관리자 통과
|
|
||||||
;
|
|
||||||
else if ($is_admin == 'group') { // 그룹관리자
|
|
||||||
$mb = get_member($write['mb_id']);
|
|
||||||
if ($member['mb_id'] != $group['gr_admin']) // 자신이 관리하는 그룹인가?
|
|
||||||
alert('자신이 관리하는 그룹의 게시판이 아니므로 수정할 수 없습니다.', $return_url);
|
|
||||||
else if ($member['mb_level'] < $mb['mb_level']) // 자신의 레벨이 크거나 같다면 통과
|
|
||||||
alert('자신의 권한보다 높은 권한의 회원이 작성한 글은 수정할 수 없습니다.', $return_url);
|
|
||||||
} else if ($is_admin == 'board') { // 게시판관리자이면
|
|
||||||
$mb = get_member($write['mb_id']);
|
|
||||||
if ($member['mb_id'] != $board['bo_admin']) // 자신이 관리하는 게시판인가?
|
|
||||||
alert('자신이 관리하는 게시판이 아니므로 수정할 수 없습니다.', $return_url);
|
|
||||||
else if ($member['mb_level'] < $mb['mb_level']) // 자신의 레벨이 크거나 같다면 통과
|
|
||||||
alert('자신의 권한보다 높은 권한의 회원이 작성한 글은 수정할 수 없습니다.', $return_url);
|
|
||||||
} else if ($member['mb_id']) {
|
|
||||||
if ($member['mb_id'] != $write['mb_id'])
|
|
||||||
alert('자신의 글이 아니므로 수정할 수 없습니다.', $return_url);
|
|
||||||
} else {
|
|
||||||
if ($write['mb_id'])
|
|
||||||
alert('로그인 후 수정하세요.', './login.php?url='.urlencode($return_url));
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($member['mb_id']) {
|
|
||||||
// 자신의 글이라면
|
|
||||||
if ($member['mb_id'] == $wr['mb_id']) {
|
|
||||||
$mb_id = $member['mb_id'];
|
|
||||||
$wr_name = $board['bo_use_name'] ? $member['mb_name'] : $member['mb_nick'];
|
|
||||||
$wr_email = $member['mb_email'];
|
|
||||||
$wr_homepage = $member['mb_homepage'];
|
|
||||||
} else {
|
|
||||||
$mb_id = $wr['mb_id'];
|
|
||||||
$wr_name = $wr['wr_name'];
|
|
||||||
$wr_email = $wr['wr_email'];
|
|
||||||
$wr_homepage = $wr['wr_homepage'];
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
$mb_id = "";
|
|
||||||
// 비회원의 경우 이름이 누락되는 경우가 있음
|
|
||||||
//if (!trim($wr_name)) alert("이름은 필히 입력하셔야 합니다.");
|
|
||||||
$wr_email = get_email_address(trim($_POST['wr_email']));
|
|
||||||
}
|
|
||||||
|
|
||||||
$sql_password = $wr_password ? " , wr_password = '".sql_password($wr_password)."' " : "";
|
|
||||||
|
|
||||||
$sql_ip = '';
|
|
||||||
if (!$is_admin)
|
|
||||||
$sql_ip = " , wr_ip = '{$_SERVER['REMOTE_ADDR']}' ";
|
|
||||||
|
|
||||||
$sql = " update {$write_table}
|
|
||||||
set ca_name = '{$ca_name}',
|
|
||||||
wr_option = '{$html},{$secret},{$mail}',
|
|
||||||
wr_subject = '{$wr_subject}',
|
|
||||||
wr_content = '{$wr_content}',
|
|
||||||
wr_link1 = '{$wr_link1}',
|
|
||||||
wr_link2 = '{$wr_link2}',
|
|
||||||
mb_id = '{$mb_id}',
|
|
||||||
wr_name = '{$wr_name}',
|
|
||||||
wr_email = '{$wr_email}',
|
|
||||||
wr_homepage = '{$wr_homepage}',
|
|
||||||
wr_1 = '{$wr_1}',
|
|
||||||
wr_2 = '{$wr_2}',
|
|
||||||
wr_3 = '{$wr_3}',
|
|
||||||
wr_4 = '{$wr_4}',
|
|
||||||
wr_5 = '{$wr_5}',
|
|
||||||
wr_6 = '{$wr_6}',
|
|
||||||
wr_7 = '{$wr_7}',
|
|
||||||
wr_8 = '{$wr_8}',
|
|
||||||
wr_9 = '{$wr_9}',
|
|
||||||
wr_10= '{$wr_10}'
|
|
||||||
{$sql_ip}
|
|
||||||
{$sql_password}
|
|
||||||
where wr_id = '{$wr['wr_id']}' ";
|
|
||||||
sql_query($sql);
|
|
||||||
|
|
||||||
// 분류가 수정되는 경우 해당되는 코멘트의 분류명도 모두 수정함
|
|
||||||
// 코멘트의 분류를 수정하지 않으면 검색이 제대로 되지 않음
|
|
||||||
$sql = " update {$write_table} set ca_name = '{$ca_name}' where wr_parent = '{$wr['wr_id']}' ";
|
|
||||||
sql_query($sql);
|
|
||||||
|
|
||||||
/*
|
|
||||||
if ($notice) {
|
|
||||||
//if (!preg_match("/[^0-9]{0,1}{$wr_id}[\r]{0,1}/",$board['bo_notice']))
|
|
||||||
if (!in_array((int)$wr_id, $notice_array)) {
|
|
||||||
$bo_notice = $wr_id . ',' . $board['bo_notice'];
|
|
||||||
sql_query(" update {$g5['board_table']} set bo_notice = '{$bo_notice}' where bo_table = '{$bo_table}' ");
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
$bo_notice = '';
|
|
||||||
for ($i=0; $i<count($notice_array); $i++)
|
|
||||||
if ((int)$wr_id != (int)$notice_array[$i])
|
|
||||||
$bo_notice .= $notice_array[$i] . ',';
|
|
||||||
$bo_notice = trim($bo_notice);
|
|
||||||
//$bo_notice = preg_replace("/^".$wr_id."[\n]?$/m", "", $board['bo_notice']);
|
|
||||||
sql_query(" update {$g5['board_table']} set bo_notice = '{$bo_notice}' where bo_table = '{$bo_table}' ");
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
$bo_notice = board_notice($board['bo_notice'], $wr_id, $notice);
|
|
||||||
sql_query(" update {$g5['board_table']} set bo_notice = '{$bo_notice}' where bo_table = '{$bo_table}' ");
|
|
||||||
}
|
|
||||||
|
|
||||||
// 게시판그룹접근사용을 하지 않아야 하고 비회원 글읽기가 가능해야 하며 비밀글이 아니어야 합니다.
|
|
||||||
if (!$group['gr_use_access'] && $board['bo_read_level'] < 2 && !$secret) {
|
|
||||||
naver_syndi_ping($bo_table, $wr_id);
|
|
||||||
}
|
|
||||||
|
|
||||||
//------------------------------------------------------------------------------
|
|
||||||
// 가변 파일 업로드
|
|
||||||
// 나중에 테이블에 저장하는 이유는 $wr_id 값을 저장해야 하기 때문입니다.
|
// 나중에 테이블에 저장하는 이유는 $wr_id 값을 저장해야 하기 때문입니다.
|
||||||
for ($i=0; $i<count($upload); $i++)
|
for ($i=0; $i<count($upload); $i++)
|
||||||
{
|
{
|
||||||
|
|||||||
+3
-3
@@ -468,7 +468,7 @@ $(function(){
|
|||||||
});
|
});
|
||||||
|
|
||||||
$(".win_email").click(function() {
|
$(".win_email").click(function() {
|
||||||
win_email(this.ref);
|
win_email(this.href);
|
||||||
return false;
|
return false;
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -478,12 +478,12 @@ $(function(){
|
|||||||
});
|
});
|
||||||
|
|
||||||
$(".win_profile").click(function() {
|
$(".win_profile").click(function() {
|
||||||
win_profile(this.ref);
|
win_profile(this.href);
|
||||||
return false;
|
return false;
|
||||||
});
|
});
|
||||||
|
|
||||||
$(".win_homepage").click(function() {
|
$(".win_homepage").click(function() {
|
||||||
win_homepage(this.ref);
|
win_homepage(this.href);
|
||||||
return false;
|
return false;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user