Merge branch 'master' of github.com:gnuboard/yc5
This commit is contained in:
@ -95,7 +95,7 @@ function imageview(id, w, h)
|
||||
continue;
|
||||
}
|
||||
$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";
|
||||
$gnb_str .= '<li class="gnb_1dli'.$current_class.'">'.PHP_EOL;
|
||||
$gnb_str .= $href1 . $menu['menu'.$key][0][1] . $href2;
|
||||
|
||||
@ -57,7 +57,7 @@ $sql = " select *
|
||||
limit {$from_record}, {$rows} ";
|
||||
$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'] = '인기검색어관리';
|
||||
include_once('./admin.head.php');
|
||||
|
||||
@ -48,6 +48,9 @@ else if ($w == "u")
|
||||
$sql = " select * from {$g5['g5_shop_item_table']} where it_id = '$it_id' ";
|
||||
$it = sql_fetch($sql);
|
||||
|
||||
if(!$it)
|
||||
alert('상품정보가 존재하지 않습니다.');
|
||||
|
||||
if (!$ca_id)
|
||||
$ca_id = $it['ca_id'];
|
||||
|
||||
|
||||
@ -12,7 +12,7 @@ $sql = " select *
|
||||
$iq = sql_fetch($sql);
|
||||
if (!$iq['iq_id']) alert('등록된 자료가 없습니다.');
|
||||
|
||||
$name = get_sideview($is['mb_id'], get_text($iq['iq_name']), $is['mb_email'], $is['mb_homepage']);
|
||||
$name = get_sideview($iq['mb_id'], get_text($iq['iq_name']), $iq['mb_email'], $iq['mb_homepage']);
|
||||
|
||||
$g5['title'] = '상품문의';
|
||||
include_once (G5_ADMIN_PATH.'/admin.head.php');
|
||||
|
||||
@ -40,11 +40,11 @@ for($i=1; $row=sql_fetch_array($result); $i++) {
|
||||
|
||||
$worksheet->write($i, 0, ' '.$row['od_id']);
|
||||
$worksheet->write($i, 1, $row['od_name']);
|
||||
$worksheet->write($i, 2, $row['od_tel']);
|
||||
$worksheet->write($i, 3, $row['od_hp']);
|
||||
$worksheet->write($i, 2, ' '.$row['od_tel']);
|
||||
$worksheet->write($i, 3, ' '.$row['od_hp']);
|
||||
$worksheet->write($i, 4, $row['od_b_name']);
|
||||
$worksheet->write($i, 5, $row['od_b_tel']);
|
||||
$worksheet->write($i, 6, $row['od_b_hp']);
|
||||
$worksheet->write($i, 5, ' '.$row['od_b_tel']);
|
||||
$worksheet->write($i, 6, ' '.$row['od_b_hp']);
|
||||
$worksheet->write($i, 7, print_address($row['od_b_addr1'], $row['od_b_addr2'], $row['od_b_addr3'], $row['od_b_addr_jibeon']));
|
||||
$worksheet->write($i, 8, $row['od_delivery_company']);
|
||||
$worksheet->write($i, 9, $row['od_invoice']);
|
||||
|
||||
@ -10,16 +10,6 @@ auth_check($auth[$sub_menu], "w");
|
||||
$g5['title'] = "주문 내역 수정";
|
||||
include_once(G5_ADMIN_PATH.'/admin.head.php');
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// 설정 시간이 지난 주문서 없는 장바구니 자료 삭제
|
||||
//------------------------------------------------------------------------------
|
||||
$keep_term = $default['de_cart_keep_term'];
|
||||
if (!$keep_term) $keep_term = 15; // 기본값 15일
|
||||
$beforetime = date('Y-m-d', ( G5_SERVER_TIME - (86400 * $keep_term) ) );
|
||||
$sql = " delete from {$g5['g5_shop_cart_table']} where ct_status = '쇼핑' and substring(ct_time, 1, 10) < '$beforetime' ";
|
||||
sql_query($sql);
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
|
||||
// 완료된 주문에 포인트를 적립한다.
|
||||
save_order_point("완료");
|
||||
|
||||
@ -13,11 +13,18 @@ for ($i=0; $i<count($_POST['chk']); $i++)
|
||||
$od = sql_fetch(" select * from {$g5['g5_shop_order_table']} where od_id = '$od_id' ");
|
||||
if (!$od) continue;
|
||||
|
||||
// 주문상태가 주문이 아니면 건너뜀
|
||||
if($od['od_status'] != '주문') continue;
|
||||
|
||||
$data = serialize($od);
|
||||
|
||||
$sql = " insert {$g5['g5_shop_order_delete_table']} set de_key = '$od_id', de_data = '".addslashes($data)."', mb_id = '{$member['mb_id']}', de_ip = '{$_SERVER['REMOTE_ADDR']}', de_datetime = '".G5_TIME_YMDHIS."' ";
|
||||
sql_query($sql, true);
|
||||
|
||||
// cart 테이블의 상품 상태를 삭제로 변경
|
||||
$sql = " update {$g5['g5_shop_cart_table']} set ct_status = '삭제' where od_id = '$od_id' and ct_status = '주문' ";
|
||||
sql_query($sql);
|
||||
|
||||
$sql = " delete from {$g5['g5_shop_order_table']} where od_id = '$od_id' ";
|
||||
sql_query($sql);
|
||||
}
|
||||
|
||||
@ -212,8 +212,8 @@ if ($csv == 'xls')
|
||||
$worksheet->write($i, 0, $row['od_b_zip1'].'-'.$row['od_b_zip2']);
|
||||
$worksheet->write($i, 1, print_address($row['od_b_addr1'], $row['od_b_addr2'], $row['od_b_addr3'], $row['od_b_addr_jibeon']));
|
||||
$worksheet->write($i, 2, $row['od_b_name']);
|
||||
$worksheet->write($i, 3, $row['od_b_tel']);
|
||||
$worksheet->write($i, 4, $row['od_b_hp']);
|
||||
$worksheet->write($i, 3, ' '.$row['od_b_tel']);
|
||||
$worksheet->write($i, 4, ' '.$row['od_b_hp']);
|
||||
$worksheet->write($i, 5, $row['it_name']);
|
||||
$worksheet->write($i, 6, $row['ct_qty']);
|
||||
$worksheet->write($i, 7, $row['ct_option']);
|
||||
|
||||
@ -181,7 +181,7 @@ if ($result)
|
||||
$hs_memo = "인증 받지 못하였습니다. 계정을 다시 확인해 주세요.";
|
||||
break;
|
||||
default: // "미 확인 오류"
|
||||
$hs_memo = "알 수 없는 오류로 전송이 실패하었습니다.";
|
||||
$hs_memo = "알 수 없는 오류로 전송이 실패하였습니다.";
|
||||
break;
|
||||
}
|
||||
$wr_failure++;
|
||||
|
||||
@ -17,7 +17,7 @@ if(!$count)
|
||||
for($i=0; $i<$count; $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']}
|
||||
where qa_id = '$qa_id' ";
|
||||
$row = sql_fetch($sql);
|
||||
@ -25,6 +25,10 @@ for($i=0; $i<$count; $i++) {
|
||||
if(!$row['qa_id'])
|
||||
continue;
|
||||
|
||||
// 자신의 글이 아니면 건너뜀
|
||||
if($is_admin != 'super' && $row['mb_id'] != $member['mb_id'])
|
||||
continue;
|
||||
|
||||
// 첨부파일 삭제
|
||||
for($k=1; $k<=2; $k++) {
|
||||
@unlink(G5_DATA_PATH.'/qa/'.$row['qa_file'.$k]);
|
||||
|
||||
@ -10,10 +10,11 @@ $w == u : 수정
|
||||
if($is_guest)
|
||||
alert('회원이시라면 로그인 후 이용해 보십시오.', './login.php?url='.urlencode(G5_BBS_URL.'/qalist.php'));
|
||||
|
||||
$qaconfig = get_qa_config();
|
||||
|
||||
$msg = array();
|
||||
|
||||
// 1:1문의 설정값
|
||||
$qaconfig = get_qa_config();
|
||||
|
||||
// e-mail 체크
|
||||
if(isset($_POST['qa_email']) && $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 == 'a' && !$is_admin)
|
||||
alert('답변은 관리자만 등록할 수 있습니다.');
|
||||
|
||||
@ -20,7 +20,16 @@ if (!chk_captcha()) {
|
||||
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_re = trim($_POST['mb_password_re']);
|
||||
$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');
|
||||
|
||||
$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 == '') {
|
||||
|
||||
$sql = " insert into {$g5['member_table']}
|
||||
set mb_id = '{$mb_id}',
|
||||
mb_password = '".sql_password($mb_password)."',
|
||||
@ -303,11 +267,10 @@ if ($w == '') {
|
||||
set_session('ss_mb_reg', $mb_id);
|
||||
|
||||
} else if ($w == 'u') {
|
||||
|
||||
if (!trim($_SESSION['ss_mb_id']))
|
||||
alert('로그인 되어 있지 않습니다.');
|
||||
|
||||
if ($_SESSION['ss_mb_id'] != $mb_id)
|
||||
if (trim($_POST['mb_id']) != $mb_id)
|
||||
alert("로그인된 정보와 수정하려는 정보가 틀리므로 수정할 수 없습니다.\\n만약 올바르지 않은 방법을 사용하신다면 바로 중지하여 주십시오.");
|
||||
|
||||
$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) {
|
||||
$subject = '['.$config['cf_title'].'] 인증확인 메일입니다.';
|
||||
@ -442,14 +451,14 @@ unset($_SESSION['ss_cert_adult']);
|
||||
if ($msg)
|
||||
echo '<script>alert(\''.$msg.'\');</script>';
|
||||
|
||||
if ($w == "") {
|
||||
if ($w == '') {
|
||||
goto_url(G5_HTTP_BBS_URL.'/register_result.php');
|
||||
} else if ($w == 'u') {
|
||||
$row = sql_fetch(" select mb_password from {$g5['member_table']} where mb_id = '{$member['mb_id']}' ");
|
||||
$tmp_password = $row['mb_password'];
|
||||
|
||||
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);
|
||||
} else {
|
||||
alert('회원 정보가 수정 되었습니다.', G5_URL);
|
||||
|
||||
@ -40,10 +40,10 @@ if ($wr_content && ($member['mb_level'] >= $board['bo_comment_level']))
|
||||
if ($wr['wr_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_email = $member['mb_email'];
|
||||
$wr_homepage = $member['mb_homepage'];
|
||||
$wr_email = addslashes($member['mb_email']);
|
||||
$wr_homepage = addslashes(clean_xss_tags($member['mb_homepage']));
|
||||
|
||||
$sql = " select max(wr_comment) as max_comment from $write_table
|
||||
where wr_parent = '$wr_id' and wr_is_comment = '1' ";
|
||||
|
||||
@ -3,9 +3,6 @@ include_once('./_common.php');
|
||||
include_once(G5_EDITOR_LIB);
|
||||
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']) {
|
||||
alert('존재하지 않는 게시판입니다.', G5_URL);
|
||||
}
|
||||
@ -294,10 +291,10 @@ $homepage = "";
|
||||
if ($w == "" || $w == "r") {
|
||||
if ($is_member) {
|
||||
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'];
|
||||
$homepage = get_text($member['mb_homepage']);
|
||||
$email = get_email_address($member['mb_email']);
|
||||
$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']);
|
||||
$homepage = get_text($write['wr_homepage']);
|
||||
$homepage = get_text(stripslashes($write['wr_homepage']));
|
||||
|
||||
for ($i=1; $i<=G5_LINK_COUNT; $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 = "";
|
||||
if (isset($write['wr_subject'])) {
|
||||
$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";
|
||||
|
||||
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_tail.php');
|
||||
|
||||
@ -15,7 +15,7 @@ $w = $_POST["w"];
|
||||
$wr_name = trim($_POST['wr_name']);
|
||||
$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) {
|
||||
@ -52,10 +52,10 @@ if ($is_member)
|
||||
{
|
||||
$mb_id = $member['mb_id'];
|
||||
// 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_email = $member['mb_email'];
|
||||
$wr_homepage = $member['mb_homepage'];
|
||||
$wr_email = addslashes($member['mb_email']);
|
||||
$wr_homepage = addslashes(clean_xss_tags($member['mb_homepage']));
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@ -28,11 +28,15 @@ if ($wr_content == '') {
|
||||
$wr_link1 = '';
|
||||
if (isset($_POST['wr_link1'])) {
|
||||
$wr_link1 = substr($_POST['wr_link1'],0,1000);
|
||||
$wr_link1 = trim(strip_tags($wr_link1));
|
||||
$wr_link1 = preg_replace("#[\\\]+$#", "", $wr_link1);
|
||||
}
|
||||
|
||||
$wr_link2 = '';
|
||||
if (isset($_POST['wr_link2'])) {
|
||||
$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);
|
||||
@ -52,10 +56,6 @@ if (empty($_POST)) {
|
||||
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']);
|
||||
|
||||
if ($w == 'u' || $w == 'r') {
|
||||
@ -177,6 +177,220 @@ if ($w == '' || $w == 'r') {
|
||||
if (!isset($_POST['wr_subject']) || !trim($_POST['wr_subject']))
|
||||
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);
|
||||
@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 값을 저장해야 하기 때문입니다.
|
||||
for ($i=0; $i<count($upload); $i++)
|
||||
{
|
||||
|
||||
@ -136,7 +136,7 @@ a.sanchor_on {background:#626870;color:#fff !important;text-decoration:none}
|
||||
#sps dd img {position:relative;top:-2px}
|
||||
|
||||
.sps_section {float:right;width:75%}
|
||||
.sps_section p {padding:0;width:100%;height:1.8em;overflow:hidden}
|
||||
.sps_section p {padding:0;width:100%}
|
||||
.sps_con_full {padding:0;height:auto !important}
|
||||
.sps_con_btn {margin:5px 0 0;text-align:right}
|
||||
.sps_con_btn button {margin:0;padding:5px;border:0;background:#565e60;color:#fff}
|
||||
@ -162,7 +162,7 @@ a.sanchor_on {background:#626870;color:#fff !important;text-decoration:none}
|
||||
|
||||
.sqa_section {float:right;width:75%}
|
||||
.sqa_section .sqa_con {padding:10px;background:#f2f5f9;line-height:1.7em}
|
||||
.sqa_section p {padding:0;width:100%;height:1.8em;overflow:hidden}
|
||||
.sqa_section p {padding:0;width:100%}
|
||||
.sqa_con_full {padding:0;height:auto !important}
|
||||
.sqa_con_btn {margin:5px 0 0;text-align:right}
|
||||
.sqa_con_btn button {margin:0;padding:5px;border:0;background:#565e60;color:#fff}
|
||||
|
||||
@ -468,7 +468,7 @@ $(function(){
|
||||
});
|
||||
|
||||
$(".win_email").click(function() {
|
||||
win_email(this.ref);
|
||||
win_email(this.href);
|
||||
return false;
|
||||
});
|
||||
|
||||
@ -478,12 +478,12 @@ $(function(){
|
||||
});
|
||||
|
||||
$(".win_profile").click(function() {
|
||||
win_profile(this.ref);
|
||||
win_profile(this.href);
|
||||
return false;
|
||||
});
|
||||
|
||||
$(".win_homepage").click(function() {
|
||||
win_homepage(this.ref);
|
||||
win_homepage(this.href);
|
||||
return false;
|
||||
});
|
||||
|
||||
|
||||
@ -336,10 +336,6 @@ function get_cart_count($cart_id)
|
||||
global $g5, $default;
|
||||
|
||||
$sql = " select count(ct_id) as cnt from {$g5['g5_shop_cart_table']} where od_id = '$cart_id' ";
|
||||
if($default['de_cart_keep_term']) {
|
||||
$ctime = date('Y-m-d', G5_SERVER_TIME - ($default['de_cart_keep_term'] * 86400));
|
||||
$sql .= " and substring(ct_time, 1, 10) >= '$ctime' ";
|
||||
}
|
||||
$row = sql_fetch($sql);
|
||||
$cnt = (int)$row['cnt'];
|
||||
return $cnt;
|
||||
@ -1342,11 +1338,6 @@ function set_cart_id($direct)
|
||||
where mb_id = '{$member['mb_id']}'
|
||||
and ct_direct = '0'
|
||||
and ct_status = '쇼핑' ";
|
||||
if($default['de_cart_keep_term']) {
|
||||
$ctime = date('Y-m-d', G5_SERVER_TIME - ($default['de_cart_keep_term'] * 86400));
|
||||
$sql .= " and substring(ct_time, 1, 10) >= '$ctime' ";
|
||||
}
|
||||
|
||||
sql_query($sql);
|
||||
}
|
||||
}
|
||||
@ -2142,6 +2133,19 @@ function get_itemuselist_thumbnail($it_id, $contents, $thumb_width, $thumb_heigh
|
||||
return $img;
|
||||
}
|
||||
|
||||
// 장바구니 상품삭제
|
||||
function cart_item_clean()
|
||||
{
|
||||
global $g5, $default;
|
||||
|
||||
$keep_term = $default['de_cart_keep_term'];
|
||||
if(!$keep_term)
|
||||
$keep_term = 15; // 기본값 15일
|
||||
$beforetime = G5_SERVER_TIME - (86400 * $keep_term);
|
||||
|
||||
sql_query(" delete from {$g5['g5_shop_cart_table']} where ct_status = '쇼핑' and UNIX_TIMESTAMP(ct_time) < '$beforetime' ");
|
||||
}
|
||||
|
||||
//==============================================================================
|
||||
// 쇼핑몰 라이브러리 모음 끝
|
||||
//==============================================================================
|
||||
|
||||
@ -65,10 +65,6 @@ ob_start();
|
||||
from {$g5['g5_shop_cart_table']} a left join {$g5['g5_shop_item_table']} b on ( a.it_id = b.it_id )
|
||||
where a.od_id = '$s_cart_id'
|
||||
and a.ct_select = '1' ";
|
||||
if($default['de_cart_keep_term']) {
|
||||
$ctime = date('Y-m-d', G5_SERVER_TIME - ($default['de_cart_keep_term'] * 86400));
|
||||
$sql .= " and substring(a.ct_time, 1, 10) >= '$ctime' ";
|
||||
}
|
||||
$sql .= " group by a.it_id ";
|
||||
$sql .= " order by a.ct_id ";
|
||||
$result = sql_query($sql);
|
||||
|
||||
@ -1,6 +1,9 @@
|
||||
<?php
|
||||
include_once('./_common.php');
|
||||
|
||||
// 보관기간이 지난 상품 삭제
|
||||
cart_item_clean();
|
||||
|
||||
// cart id 설정
|
||||
set_cart_id($sw_direct);
|
||||
|
||||
@ -63,10 +66,6 @@ include_once('./_head.php');
|
||||
b.ca_id3
|
||||
from {$g5['g5_shop_cart_table']} a left join {$g5['g5_shop_item_table']} b on ( a.it_id = b.it_id )
|
||||
where a.od_id = '$s_cart_id' ";
|
||||
if($default['de_cart_keep_term']) {
|
||||
$ctime = date('Y-m-d', G5_SERVER_TIME - ($default['de_cart_keep_term'] * 86400));
|
||||
$sql .= " and substring(a.ct_time, 1, 10) >= '$ctime' ";
|
||||
}
|
||||
$sql .= " group by a.it_id ";
|
||||
$sql .= " order by a.ct_id ";
|
||||
$result = sql_query($sql);
|
||||
|
||||
@ -3,6 +3,9 @@ include_once('./_common.php');
|
||||
|
||||
// print_r2($_POST); exit;
|
||||
|
||||
// 보관기간이 지난 상품 삭제
|
||||
cart_item_clean();
|
||||
|
||||
// cart id 설정
|
||||
set_cart_id($sw_direct);
|
||||
|
||||
|
||||
@ -96,10 +96,6 @@ require_once('./'.$default['de_pg_service'].'/orderform.1.php');
|
||||
from {$g5['g5_shop_cart_table']} a left join {$g5['g5_shop_item_table']} b on ( a.it_id = b.it_id )
|
||||
where a.od_id = '$s_cart_id'
|
||||
and a.ct_select = '1' ";
|
||||
if($default['de_cart_keep_term']) {
|
||||
$ctime = date('Y-m-d', G5_SERVER_TIME - ($default['de_cart_keep_term'] * 86400));
|
||||
$sql .= " and substring(a.ct_time, 1, 10) >= '$ctime' ";
|
||||
}
|
||||
$sql .= " group by a.it_id ";
|
||||
$sql .= " order by a.ct_id ";
|
||||
$result = sql_query($sql);
|
||||
|
||||
@ -12,22 +12,23 @@ for ($i=0; $row=sql_fetch_array($result); $i++)
|
||||
if ($i==0) echo '<aside id="sbn_side" class="sbn"><h2>쇼핑몰 배너</h2><ul>'.PHP_EOL;
|
||||
//print_r2($row);
|
||||
// 테두리 있는지
|
||||
$bn_border = ($row['bn_border']) ? ' sbn_border' : '';;
|
||||
$bn_border = ($row['bn_border']) ? ' class="sbn_border"' : '';;
|
||||
// 새창 띄우기인지
|
||||
$bn_new_win = ($row['bn_new_win']) ? ' target="_blank"' : '';
|
||||
|
||||
$bimg = G5_DATA_PATH.'/banner/'.$row['bn_id'];
|
||||
if (file_exists($bimg))
|
||||
{
|
||||
$banner = '';
|
||||
$size = getimagesize($bimg);
|
||||
echo '<li>'.PHP_EOL;
|
||||
if ($row['bn_url'][0] == '#')
|
||||
echo '<a href="'.$row['bn_url'].'">';
|
||||
$banner .= '<a href="'.$row['bn_url'].'">';
|
||||
else if ($row['bn_url'] && $row['bn_url'] != 'http://') {
|
||||
echo '<a href="'.G5_SHOP_URL.'/bannerhit.php?bn_id='.$row['bn_id'].'&url='.urlencode($row['bn_url']).'"'.$bn_new_win.'>';
|
||||
$banner .= '<a href="'.G5_SHOP_URL.'/bannerhit.php?bn_id='.$row['bn_id'].'&url='.urlencode($row['bn_url']).'"'.$bn_new_win.'>';
|
||||
}
|
||||
echo '<img src="'.G5_DATA_URL.'/banner/'.$row['bn_id'].'" alt="'.$row['bn_alt'].'" width="'.$size[0].'" height="'.$size[1].'" class="'.$bn_border.'">';
|
||||
if($row['bn_url'])
|
||||
echo $banner.'<img src="'.G5_DATA_URL.'/banner/'.$row['bn_id'].'" alt="'.$row['bn_alt'].'" width="'.$size[0].'" height="'.$size[1].'"'.$bn_border.'>';
|
||||
if($banner)
|
||||
echo '</a>'.PHP_EOL;
|
||||
echo '</li>'.PHP_EOL;
|
||||
}
|
||||
|
||||
@ -14,13 +14,14 @@ for ($i=0; $row=sql_fetch_array($result); $i++)
|
||||
if ($i==0) echo '<section id="sbn_idx" class="sbn">'.PHP_EOL.'<h2>쇼핑몰 배너</h2>'.PHP_EOL.'<ul>'.PHP_EOL;
|
||||
//print_r2($row);
|
||||
// 테두리 있는지
|
||||
$bn_border = ($row['bn_border']) ? ' sbn_border' : '';;
|
||||
$bn_border = ($row['bn_border']) ? ' class="sbn_border"' : '';;
|
||||
// 새창 띄우기인지
|
||||
$bn_new_win = ($row['bn_new_win']) ? ' target="_blank"' : '';
|
||||
|
||||
$bimg = G5_DATA_PATH.'/banner/'.$row['bn_id'];
|
||||
if (file_exists($bimg))
|
||||
{
|
||||
$banner = '';
|
||||
$size = getimagesize($bimg);
|
||||
|
||||
if($size[2] < 1 || $size[2] > 16)
|
||||
@ -34,12 +35,12 @@ for ($i=0; $row=sql_fetch_array($result); $i++)
|
||||
|
||||
echo '<li'.$bn_first_class.'>'.PHP_EOL;
|
||||
if ($row['bn_url'][0] == '#')
|
||||
echo '<a href="'.$row['bn_url'].'">';
|
||||
$banner .= '<a href="'.$row['bn_url'].'">';
|
||||
else if ($row['bn_url'] && $row['bn_url'] != 'http://') {
|
||||
echo '<a href="'.G5_SHOP_URL.'/bannerhit.php?bn_id='.$row['bn_id'].'&url='.urlencode($row['bn_url']).'"'.$bn_new_win.'>';
|
||||
$banner .= '<a href="'.G5_SHOP_URL.'/bannerhit.php?bn_id='.$row['bn_id'].'&url='.urlencode($row['bn_url']).'"'.$bn_new_win.'>';
|
||||
}
|
||||
echo '<img src="'.G5_DATA_URL.'/banner/'.$row['bn_id'].'" width="'.$size[0].'" alt="'.$row['bn_alt'].'" class="'.$bn_border.'">';
|
||||
if($row['bn_url'])
|
||||
echo $banner.'<img src="'.G5_DATA_URL.'/banner/'.$row['bn_id'].'" width="'.$size[0].'" alt="'.$row['bn_alt'].'"'.$bn_border.'>';
|
||||
if($banner)
|
||||
echo '</a>'.PHP_EOL;
|
||||
echo '</li>'.PHP_EOL;
|
||||
|
||||
|
||||
@ -516,7 +516,7 @@
|
||||
#sps dd img {position:relative;top:-2px}
|
||||
|
||||
.sps_section {float:left;width:630px}
|
||||
.sps_section p {padding:0;width:100%;height:20px;overflow:hidden}
|
||||
.sps_section p {padding:0;width:100%}
|
||||
.sps_con_full {padding:0;height:auto !important}
|
||||
.sps_con_btn {margin:5px 0 0;text-align:right}
|
||||
.sps_con_btn button {margin:0;padding:5px;border:0;background:#565e60;color:#fff}
|
||||
@ -542,7 +542,7 @@
|
||||
|
||||
.sqa_section {float:left;width:630px}
|
||||
.sqa_section .sqa_con {padding:10px;background:#f2f5f9;line-height:1.7em}
|
||||
.sqa_section p {padding:0;width:100%;height:20px;overflow:hidden}
|
||||
.sqa_section p {padding:0;width:100%}
|
||||
.sqa_con_full {padding:0;height:auto !important}
|
||||
.sqa_con_btn {margin:5px 0 0;text-align:right}
|
||||
.sqa_con_btn button {margin:0;padding:5px;border:0;background:#565e60;color:#fff}
|
||||
Reference in New Issue
Block a user