diff --git a/adm/rb/_common.php b/adm/rb/_common.php new file mode 100644 index 000000000..ecbf0b4a2 --- /dev/null +++ b/adm/rb/_common.php @@ -0,0 +1,10 @@ + "http://", + 'bn_begin_time' => date("Y-m-d 00:00:00", time()), + 'bn_end_time' => date("Y-m-d 00:00:00", time() + (60 * 60 * 24 * 31)), + 'bn_id' => '' + ]; +} + +// 접속기기 필드 추가 +if (!sql_query("SELECT bn_device FROM rb_banner LIMIT 0, 1")) { + sql_query("ALTER TABLE `rb_banner` ADD `bn_device` varchar(10) NOT NULL DEFAULT '' AFTER `bn_url`", true); + sql_query("UPDATE rb_banner SET bn_device = 'pc'", true); +} + +include_once(G5_ADMIN_PATH . '/admin.head.php'); +?> + +
+ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
이미지 + + 750) ? 750 : (isset($size[0]) ? $size[0] : 0); + + echo ' '; + $bimg_str = ''; + } + if (isset($bn['bn_id']) && $bn['bn_id']) { + echo ''; + } + ?> +
+ + +
+ + +
+ + +
+ + + +
+ +

+ 생성되는 배너는 모두 모듈설정 패널에서 사용하실 수 있습니다."); ?> + + "); ?>
+ "); ?>
+ + +
+ + + +
+ + +
+ + +
+ + +
+ + +
+ + " id="bn_begin_time" class="frm_input" size="21" maxlength="19"> + " id="bn_begin_chk" onclick="if (this.checked == true) this.form.bn_begin_time.value=this.form.bn_begin_chk.value; else this.form.bn_begin_time.value = this.form.bn_begin_time.defaultValue;"> + +
+ + " id="bn_end_time" class="frm_input" size=21 maxlength=19> + " id="bn_end_chk" onclick="if (this.checked == true) this.form.bn_end_time.value=this.form.bn_end_chk.value; else this.form.bn_end_time.value = this.form.bn_end_time.defaultValue;"> + +
+ + +
+
+ +
+ 목록 + +
+ +
+ + \ No newline at end of file diff --git a/adm/rb/banner_form_update.php b/adm/rb/banner_form_update.php new file mode 100644 index 000000000..358ddac37 --- /dev/null +++ b/adm/rb/banner_form_update.php @@ -0,0 +1,111 @@ + 16) { + alert("이미지 파일만 업로드 할 수 있습니다."); + } +} + +$bn_url = isset($bn_url) ? clean_xss_tags($bn_url) : ''; +$bn_alt = isset($bn_alt) ? (function_exists('clean_xss_attributes') ? clean_xss_attributes(strip_tags($bn_alt)) : strip_tags($bn_alt)) : ''; +$bn_alt2 = isset($bn_alt2) ? (function_exists('clean_xss_attributes') ? clean_xss_attributes(strip_tags($bn_alt2)) : strip_tags($bn_alt2)) : ''; +$bn_alt3 = isset($bn_alt3) ? (function_exists('clean_xss_attributes') ? clean_xss_attributes(strip_tags($bn_alt3)) : strip_tags($bn_alt3)) : ''; +$bn_alt4 = isset($bn_alt4) ? (function_exists('clean_xss_attributes') ? clean_xss_attributes(strip_tags($bn_alt4)) : strip_tags($bn_alt4)) : ''; + +if(isset($_POST['bn_position_use']) && $_POST['bn_position_use']) { + $bn_position = $_POST['bn_position_use']; +} else { + $bn_position = $_POST['bn_position']; +} + +if ($w == "") { + if (!$bn_bimg_name) alert('배너 이미지를 업로드 하세요.'); + + sql_query("ALTER TABLE rb_banner AUTO_INCREMENT=1"); + + $sql = "INSERT INTO rb_banner + SET bn_alt = '$bn_alt', + bn_alt2 = '$bn_alt2', + bn_alt3 = '$bn_alt3', + bn_alt4 = '$bn_alt4', + bn_url = '$bn_url', + bn_device = '$bn_device', + bn_position = '$bn_position', + bn_border = '$bn_border', + bn_radius = '$bn_radius', + bn_ad_ico = '$bn_ad_ico', + bn_new_win = '$bn_new_win', + bn_begin_time = '$bn_begin_time', + bn_end_time = '$bn_end_time', + bn_time = '$now', + bn_hit = '0', + bn_order = '$bn_order'"; + sql_query($sql); + + $bn_id = sql_insert_id(); +} elseif ($w == "u") { + $sql = "UPDATE rb_banner + SET bn_alt = '$bn_alt', + bn_alt2 = '$bn_alt2', + bn_alt3 = '$bn_alt3', + bn_alt4 = '$bn_alt4', + bn_url = '$bn_url', + bn_device = '$bn_device', + bn_position = '$bn_position', + bn_border = '$bn_border', + bn_radius = '$bn_radius', + bn_ad_ico = '$bn_ad_ico', + bn_new_win = '$bn_new_win', + bn_begin_time = '$bn_begin_time', + bn_end_time = '$bn_end_time', + bn_order = '$bn_order' + WHERE bn_id = '$bn_id'"; + sql_query($sql); +} elseif ($w == "d") { + @unlink(G5_DATA_PATH."/banners/$bn_id"); + + $sql = "DELETE FROM rb_banner WHERE bn_id = $bn_id"; + $result = sql_query($sql); +} + +if ($w == "" || $w == "u") { + if (isset($_FILES['bn_bimg']['name']) && $_FILES['bn_bimg']['name']) { + rb_upload_files($_FILES['bn_bimg']['tmp_name'], $bn_id, G5_DATA_PATH."/banners"); + } + + goto_url("./banner_form.php?w=u&bn_id=$bn_id"); +} else { + goto_url("./banner_list.php"); +} +?> \ No newline at end of file diff --git a/adm/rb/banner_list.php b/adm/rb/banner_list.php new file mode 100644 index 000000000..58f0113bd --- /dev/null +++ b/adm/rb/banner_list.php @@ -0,0 +1,165 @@ + + +
+ 등록된 배너 +
+ +
+ 배너추가 +
+ +
+ + + + + + + + + + + + + + + + + + + 800) + $width = 800; + else + $width = $size[0]; + + $bn_img = ""; + + $bn_img .= G5_DATA_URL."/banners/".$row['bn_id']; + } + + switch($row['bn_device']) { + case 'pc': + $bn_device = 'PC'; + break; + case 'mobile': + $bn_device = '모바일'; + break; + default: + $bn_device = 'PC와 모바일'; + break; + } + + $bn_begin_time = substr($row['bn_begin_time'], 0, 19); + $bn_end_time = substr($row['bn_end_time'], 0, 19); + + $bg = 'bg'.($i%2); + ?> + + + + + + + + + + + + + + + '; + } + ?> + +
목록
ID배너 Url배너설명출력그룹출력기기시작일시종료일시출력순서클릭관리
+ + + + + 수정 + 삭제 +
자료가 없습니다.
+ +
+ + + + +
+

+ 배너를 등록하시면 모듈설정에서 추가하실 수 있습니다. + +

+
+ + diff --git a/adm/rb/bbs_form.php b/adm/rb/bbs_form.php new file mode 100644 index 000000000..e5588aff3 --- /dev/null +++ b/adm/rb/bbs_form.php @@ -0,0 +1,252 @@ +null, 'source'=>null, 'size'=>null, 'bf_content' => null); + } + } +} + +//카테고리 +$is_category = false; +$category_option = ''; +if ($board['bo_use_category']) { + $ca_name = ""; + if (isset($wr['ca_name'])) + $ca_name = $wr['ca_name']; + $category_option = get_category_option($bo_table, $ca_name); + $is_category = true; +} + +//링크 +$is_link = false; +if ($member['mb_level'] >= $board['bo_link_level']) { + $is_link = true; +} + +//파일 +$is_file = false; +if ($member['mb_level'] >= $board['bo_upload_level']) { + $is_file = true; +} + +$is_file_content = false; +if ($board['bo_use_file_content']) { + $is_file_content = true; +} + +$file_count = (int)$board['bo_upload_count']; + +//공지 +$notice_array = explode(',', trim($board['bo_notice'])); +$notice_checked = ''; +if ($w == 'u') { + if (in_array((int)$wr_id, $notice_array)) { + $notice_checked = 'checked'; + } +} +?> + +
+ + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
분류 + +
옵션 + > +
작성자 + +
링크 + " id="wr_link" class="frm_input" size="50" placeholder="링크 "> +
+   + + ()  + + + + + + +
+
+ +
+ 목록 + +
+
+ + + +분류를 선택하세요.'; + } +} else { + $ca_name = ''; +} + +//제목확인 +$wr_subject = ''; +if (isset($_POST['wr_subject'])) { + $wr_subject = substr(trim($_POST['wr_subject']),0,255); + $wr_subject = preg_replace("#[\\\]+$#", "", $wr_subject); +} +if ($wr_subject == '') { + $msg[] = '제목을 입력하세요.'; +} + +//내용확인 +$wr_content = ''; +if (isset($_POST['wr_content'])) { + $wr_content = substr(trim($_POST['wr_content']),0,65536); + $wr_content = preg_replace("#[\\\]+$#", "", $wr_content); +} +if ($wr_content == '') { + $msg[] = '내용을 입력하세요.'; +} + +//링크확인 +$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('
', $msg); +if ($msg) { + alert($msg); +} + +$upload_max_filesize = ini_get('upload_max_filesize'); + +if (empty($_POST)) { + alert("파일 또는 글내용의 크기가 서버에서 설정한 값을 넘어 오류가 발생하였습니다.\\npost_max_size=".ini_get('post_max_size')." , upload_max_filesize=".$upload_max_filesize."\\n서버관리자에게 문의 바랍니다."); +} + +$notice_array = explode(",", $board['bo_notice']); +$wr_password = isset($_POST['wr_password']) ? $_POST['wr_password'] : ''; +$bf_content = isset($_POST['bf_content']) ? (array) $_POST['bf_content'] : array(); +$_POST['html'] = isset($_POST['html']) ? clean_xss_tags($_POST['html'], 1, 1) : ''; +$_POST['secret'] = isset($_POST['secret']) ? clean_xss_tags($_POST['secret'], 1, 1) : ''; +$_POST['mail'] = isset($_POST['mail']) ? clean_xss_tags($_POST['mail'], 1, 1) : ''; + +if ($w == 'u') { + $wr = get_write($write_table, $wr_id); + if (!$wr['wr_id']) { + alert("해당 게시물이 존재하지 않습니다."); + } +} + +//비밀글 체크 +$secret = ''; +if (isset($_POST['secret']) && $_POST['secret']) { + if(preg_match('#secret#', strtolower($_POST['secret']), $matches)) + $secret = $matches[0]; +} + +//html 체크 +$html = ''; +if (isset($_POST['html']) && $_POST['html']) { + if(preg_match('#html(1|2)#', strtolower($_POST['html']), $matches)) + $html = $matches[0]; +} + +//메일발송 체크 +$mail = ''; +if (isset($_POST['mail']) && $_POST['mail']) { + if(preg_match('#mail#', strtolower($_POST['mail']), $matches)) + $mail = $matches[0]; +} + +//공지체크 +$notice = ''; +if (isset($_POST['notice']) && $_POST['notice']) { + $notice = $_POST['notice']; +} + +//여분필드 체크 +for ($i=1; $i<=10; $i++) { + $var = "wr_$i"; + $$var = ""; + if (isset($_POST['wr_'.$i]) && settype($_POST['wr_'.$i], 'string')) { + $$var = trim($_POST['wr_'.$i]); + } +} + +//옵션 +$options = array($html,$secret,$mail); +$wr_option = implode(',', array_filter(array_map('trim', $options))); + +if ($w == ""){ + 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 = ''; + $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 = get_encrypt_string($wr_password); + $wr_email = get_email_address(trim($_POST['wr_email'])); + $wr_homepage = clean_xss_tags($wr_homepage); + } +} + +$wr_seo_title = exist_seo_title_recursive('bbs', generate_seo_title($wr_subject), $write_table, $wr_id); + +$wr_num = get_next_num($write_table); +$wr_reply = ''; + + +if ($w == "") { + $sql = " insert into $write_table + set wr_num = '$wr_num', + wr_reply = '$wr_reply', + wr_comment = 0, + ca_name = '$ca_name', + wr_option = '$wr_option', + wr_subject = '$wr_subject', + wr_content = '$wr_content', + wr_seo_title = '$wr_seo_title', + 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']}' "; + sql_query($sql); + + $wr_id = sql_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}' "); + } + } else { + + } + +} else if($w == "u") { + + 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 = '".get_encrypt_string($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 = '{$wr_option}', + wr_subject = '{$wr_subject}', + wr_content = '{$wr_content}', + wr_seo_title = '$wr_seo_title', + wr_link1 = '{$wr_link1}', + wr_link2 = '{$wr_link2}', + mb_id = '{$mb_id}', + wr_name = '{$wr_name}', + wr_email = '{$wr_email}', + wr_homepage = '{$wr_homepage}' + {$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); + + $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}' "); + + // 글을 수정한 경우에는 제목이 달라질수도 있으니 static variable 를 새로고침합니다. + $write = get_write( $write_table, $wr['wr_id'], false); + +} + + +// 파일개수 체크 +$file_count = 0; +$upload_count = (isset($_FILES['bf_file']['name']) && is_array($_FILES['bf_file']['name'])) ? count($_FILES['bf_file']['name']) : 0; + +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); +@chmod(G5_DATA_PATH.'/file/'.$bo_table, G5_DIR_PERMISSION); + +$chars_array = array_merge(range(0,9), range('a','z'), range('A','Z')); + +// 가변 파일 업로드 +$file_upload_msg = ''; +$upload = array(); + +if(isset($_FILES['bf_file']['name']) && is_array($_FILES['bf_file']['name'])) { + for ($i=0; $i $board['bo_upload_size']) { + $file_upload_msg .= '\"'.$filename.'\" 파일의 용량('.number_format($filesize).' 바이트)이 게시판에 설정('.number_format($board['bo_upload_size']).' 바이트)된 값보다 크므로 업로드 하지 않습니다.\\n'; + continue; + } + + //=================================================================\ + // 090714 + // 이미지나 플래시 파일에 악성코드를 심어 업로드 하는 경우를 방지 + // 에러메세지는 출력하지 않는다. + //----------------------------------------------------------------- + $timg = @getimagesize($tmp_file); + // image type + if ( preg_match("/\.({$config['cf_image_extension']})$/i", $filename) || + preg_match("/\.({$config['cf_flash_extension']})$/i", $filename) ) { + if ($timg['2'] < 1 || $timg['2'] > 18) + continue; + } + //================================================================= + + $upload[$i]['image'] = $timg; + + // 4.00.11 - 글답변에서 파일 업로드시 원글의 파일이 삭제되는 오류를 수정 + if ($w == 'u') { + // 존재하는 파일이 있다면 삭제합니다. + $row = sql_fetch(" select * from {$g5['board_file_table']} where bo_table = '$bo_table' and wr_id = '$wr_id' and bf_no = '$i' "); + + if(isset($row['bf_file']) && $row['bf_file']){ + $delete_file = run_replace('delete_file_path', G5_DATA_PATH.'/file/'.$bo_table.'/'.str_replace('../', '', $row['bf_file']), $row); + if( file_exists($delete_file) ){ + @unlink(G5_DATA_PATH.'/file/'.$bo_table.'/'.$row['bf_file']); + } + // 이미지파일이면 썸네일삭제 + if(preg_match("/\.({$config['cf_image_extension']})$/i", $row['bf_file'])) { + delete_board_thumbnail($bo_table, $row['bf_file']); + } + } + } + + // 프로그램 원래 파일명 + $upload[$i]['source'] = $filename; + $upload[$i]['filesize'] = $filesize; + + // 아래의 문자열이 들어간 파일은 -x 를 붙여서 웹경로를 알더라도 실행을 하지 못하도록 함 + $filename = preg_replace("/\.(php|pht|phtm|htm|cgi|pl|exe|jsp|asp|inc|phar)/i", "$0-x", $filename); + + shuffle($chars_array); + $shuffle = implode('', $chars_array); + + // 첨부파일 첨부시 첨부파일명에 공백이 포함되어 있으면 일부 PC에서 보이지 않거나 다운로드 되지 않는 현상이 있습니다. (길상여의 님 090925) + $upload[$i]['file'] = md5(sha1($_SERVER['REMOTE_ADDR'])).'_'.substr($shuffle,0,8).'_'.replace_filename($filename); + + $dest_file = G5_DATA_PATH.'/file/'.$bo_table.'/'.$upload[$i]['file']; + + // 업로드가 안된다면 에러메세지 출력하고 죽어버립니다. + $error_code = move_uploaded_file($tmp_file, $dest_file) or die($_FILES['bf_file']['error'][$i]); + + // 올라간 파일의 퍼미션을 변경합니다. + chmod($dest_file, G5_FILE_PERMISSION); + + $dest_file = run_replace('write_update_upload_file', $dest_file, $board, $wr_id, $w); + $upload[$i] = run_replace('write_update_upload_array', $upload[$i], $dest_file, $board, $wr_id, $w); + } + } // end for +} // end if + +// 나중에 테이블에 저장하는 이유는 $wr_id 값을 저장해야 하기 때문입니다. +for ($i=0; $i=0; $i--) +{ + $row2 = sql_fetch(" select bf_file from {$g5['board_file_table']} where bo_table = '{$bo_table}' and wr_id = '{$wr_id}' and bf_no = '{$i}' "); + + // 정보가 있다면 빠집니다. + if (isset($row2['bf_file']) && $row2['bf_file']) break; + + // 그렇지 않다면 정보를 삭제합니다. + sql_query(" delete from {$g5['board_file_table']} where bo_table = '{$bo_table}' and wr_id = '{$wr_id}' and bf_no = '{$i}' "); +} + +// 파일의 개수를 게시물에 업데이트 한다. +$row = sql_fetch(" select count(*) as cnt from {$g5['board_file_table']} where bo_table = '{$bo_table}' and wr_id = '{$wr_id}' "); +sql_query(" update {$write_table} set wr_file = '{$row['cnt']}' where wr_id = '{$wr_id}' "); + +// 자동저장된 레코드를 삭제한다. +sql_query(" delete from {$g5['autosave_table']} where as_uid = '{$uid}' "); +//------------------------------------------------------------------------------ + + +delete_cache_latest($bo_table); + +if ($file_upload_msg) { + alert($file_upload_msg); +} + +if($w == "u") { + goto_url("./bbs_form.php?w=u&wr_id=$wr_id&sca=$sca&$qstr&bo_table=$bo_table"); +} else if ($w == "") { + goto_url("./bbs_list.php?$qstr&bo_table=$bo_table"); +} \ No newline at end of file diff --git a/adm/rb/bbs_list.php b/adm/rb/bbs_list.php new file mode 100644 index 000000000..d57bf0314 --- /dev/null +++ b/adm/rb/bbs_list.php @@ -0,0 +1,231 @@ +', 1); + +$bo_table = isset($_GET['bo_table']) ? $_GET['bo_table'] : ''; +$write_table = isset($g5['write_prefix']) ? $g5['write_prefix'] . $bo_table : ''; + +global $board; + +$where = " where wr_is_comment = 0 and "; +$sql_search = ""; +if ($stx != "") { + if ($sfl != "") { + $sql_search .= " $where $sfl like '%$stx%' "; + $where = " and "; + } + if ($save_stx != $stx) + $page = 1; +} + +if ($sca != "") { + $sql_search .= " and ca_id like '$sca%' "; +} + +//if ($sfl == "") $sfl = "it_name"; +if (!$sst) { + $sst = "wr_id"; + $sod = "desc"; +} + +if ($stx) { + $sql_common = " from {$write_table} "; +} else { + $sql_common = " from {$write_table} where wr_is_comment = 0 "; +} +$sql_common .= $sql_search; + +// 테이블의 전체 레코드수만 얻음 +$sql = " select count(*) as cnt " . $sql_common; +$row = sql_fetch($sql); +$total_count = isset($row['cnt']) ? $row['cnt'] : 0; + +$rows = $config['cf_page_rows']; +$total_page = ceil($total_count / $rows); // 전체 페이지 계산 +if ($page < 1) { $page = 1; } // 페이지가 없으면 첫 페이지 (1 페이지) +$from_record = ($page - 1) * $rows; // 시작 열을 구함 + +$sql = " select * + $sql_common + order by $sst $sod, wr_id desc + limit $from_record, $rows "; +$result = sql_query($sql); + +//$qstr = 'page='.$page.'&sst='.$sst.'&sod='.$sod.'&stx='.$stx; +$qstr .= ($qstr ? '&' : '').'sca='.$sca.'&save_stx='.$stx; + +$listall = '전체목록'; + + +//제외할 게시판이 있다면 아래 예제와 같이 추가 +//$sql_wheres = " where (1) "; +//$sql_wheres .= " and bo_table != 'aaa' "; +//$sql_wheres .= " and bo_table != 'bbb' "; +//$sql_wheres .= " and bo_table != 'ccc' "; + +$sql_wheres = isset($sql_wheres) ? $sql_wheres : ''; +$sql_b = "SELECT bo_table, bo_subject FROM " . (isset($g5['board_table']) ? $g5['board_table'] : '') . " " . $sql_wheres . " ORDER BY bo_mobile_subject"; +$res_b = sql_query($sql_b); + + +// + +?> +
+
+ + + + + + 미선택게시판을 선택해주세요. + + +
+
+ + + + + +
+ + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + '; + } else { + echo ''; + } + } + ?> + +
목록
+ + + 제목작성일작성자조회관리
+ + + + + [] +
+ 수정 +
게시물이 없습니다.
게시판을 선택해주세요.
+
+ + +
+ + + + + + + +메인페이지 > 우측 하단의 환경설정 버튼을 이용해주세요.
+(추후 업데이트 예정) + +', 0); + +$g5['title'] = '쪽지 관리'; +include_once (G5_ADMIN_PATH.'/admin.head.php'); + +// 메세지 목록처리 +$where = " where me_recv_mb_id != '' and "; +$sql_search = ""; + +if ($stx != "") { + if ($sfl != "") { + $sql_search .= " $where $sfl like '%$stx%' "; + $where = " and "; + } + if ($save_stx != $stx) + $page = 1; +} + +if (!$sst) { + $sst = "me_id"; + $sod = "desc"; +} + + +$sql_common = " from {$g5['memo_table']} "; +$sql_common .= $sql_search; + +// 테이블의 전체 레코드수만 얻음 +$sql_list = " select count(*) as cnt " . $sql_common; +$list = sql_fetch($sql_list); +$total_count = isset($list['cnt']) ? $list['cnt'] : 0; + +$rows = 10; +$total_page = ceil($total_count / $rows); // 전체 페이지 계산 +if ($page < 1) { $page = 1; } // 페이지가 없으면 첫 페이지 (1 페이지) +$from_record = ($page - 1) * $rows; // 시작 열을 구함 + +$sql_is = " select * + $sql_common + order by $sst $sod + limit $from_record, $rows "; +$result_is = sql_query($sql_is); + +$qstr .= ($qstr ? '&' : '').'save_stx='.$stx; +$listall = '전체목록'; + +?> + + + + + +
+ + + + + + + + + + +
+ +
+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + '; + } + ?> + +
목록
+ + + 보냄받음내용발송시간수신시간발송IP
+ + + + + + + + + 시스템 + + + + + + + + - + +
메세지가 없습니다.
+
+ +
+ + +
+
+ + + + + + + + + + + + + +
+ +
+

시스템메세지 전체 발송

+ +
+

+ 쪽지미수신(정보비공개) 회원을 포함하여 발송 됩니다.
+ 10레벨 발송의 경우 최고 관리자는 제외합니다. +

+
+ +
+ + + + + + + + + + + + + + + + + +
+ +   + + + +   + + +
+ +
+
+
+ + + +
+ +
+
+ + + + + + 0) { + + while ($row = sql_fetch_array($result)) { + if (!$row['mb_leave_date']) { + + $rows_me = sql_fetch("SELECT MAX(me_id) AS new_me_id FROM {$g5['memo_table']}"); + $me_id = $rows_me['new_me_id'] + 1; + + $send_id = 'system-msg'; // 발송할 아이디 + $memo_content = sql_escape_string($_POST['me_memo']); + $from_id = $row['mb_id']; + + $sql_m1 = "INSERT INTO {$g5['memo_table']} SET me_id='$me_id', me_recv_mb_id='$from_id', me_send_mb_id='$send_id', me_type='recv', me_send_datetime='".G5_TIME_YMDHIS."', me_memo='$memo_content'"; + sql_query($sql_m1); + + $sql_m2 = "UPDATE {$g5['member_table']} SET mb_memo_call='$send_id', mb_memo_cnt='".get_memo_not_read($from_id)."' WHERE mb_id='$from_id'"; + sql_query($sql_m2); + + } + } + + alert('시스템메세지를 발송했습니다.'); + + } else { + alert('시스템메세지를 발송할 회원이 없습니다.'); + } +} + + +?> diff --git a/adm/rb/module_list.php b/adm/rb/module_list.php new file mode 100644 index 000000000..8684c320e --- /dev/null +++ b/adm/rb/module_list.php @@ -0,0 +1,212 @@ + + +일반모듈'; +$listall2 = '마켓모듈'; + + + + +$where = " where "; +$sql_search = ""; + +$sfl = in_array($sfl, array('md_title', 'md_theme', 'md_layout_name')) ? $sfl : ''; + +if ($stx != "") { + if ($sfl != "") { + $sql_search .= " $where $sfl like '%$stx%' "; + $where = " and "; + } + if (isset($save_stx) && $save_stx && ($save_stx != $stx)) + $page = 1; +} + +$sql_common = " from {$table_name} "; +$sql_common .= $sql_search; + + +// 테이블의 전체 레코드수만 얻음 +$sql = " select count(*) as cnt " . $sql_common; +$row = sql_fetch($sql); +$total_count = $row['cnt']; + +$rows = $config['cf_page_rows']; +$total_page = ceil($total_count / $rows); // 전체 페이지 계산 +if ($page < 1) { $page = 1; } // 페이지가 없으면 첫 페이지 (1 페이지) +$from_record = ($page - 1) * $rows; // 시작 열을 구함 + +if (!$sst) +{ + $sst = "md_id"; + $sod = "asc"; +} +$sql_order = "order by $sst $sod"; + +// 출력할 레코드를 얻음 +$sql = " select * + $sql_common + $sql_order + limit $from_record, $rows "; +$result = sql_query($sql); + +?> + +
+ + 생성된 모듈 수 +
+ +
+ + + + + + + + + + + +
+ +
+ + + + + + + +
+ + + + + + + + + + + + + + + + + '.get_text($row['md_title']).' 삭제 '; + + if($row['md_type'] == "latest") { + $md_type = "최신글"; + } else if($row['md_type'] == "widget") { + $md_type = "위젯"; + } else if($row['md_type'] == "poll") { + $md_type = "투표"; + } else if($row['md_type'] == "banner") { + $md_type = "배너"; + } else if($row['md_type'] == "item") { + $md_type = "상품"; + } else { + $md_type = "-"; + } + + $bg = 'bg'.($i%2); + ?> + + + + + + + + + + + + + + + + + + + + + + + + \n"; + ?> + +
목록
ID모듈명테마레이아웃섹션타입진열순서생성일시관리
+ + + + + + + + + + + + + + + + + + + + + + + + + +
데이터가 없습니다.
+
+ +
+ +
+ +
+ + + + $info) { goto y9_M8; y9_M8: $columns = $info["\x63\157\x6c\165\x6d\156\163"]; goto sGSee; WHmXw: $result = sql_query("\x53\110\117\x57\x20\x54\101\102\x4c\x45\x53\x20\114\x49\113\105\x20\x27{$table}\47"); goto QSYS_; sGSee: $table = sql_real_escape_string($table); goto WHmXw; QSYS_: if (mysqli_num_rows($result) == 0) { goto VRfiX; Yt8XE: if (isset($info["\160\x72\x69\x6d\141\162\x79\137\153\x65\171"])) { $primary_key = sql_real_escape_string($info["\160\x72\x69\155\x61\x72\x79\137\x6b\145\171"]); $column_defs[] = "\120\x52\111\115\101\x52\x59\x20\113\x45\131\40\50\140{$primary_key}\x60\51"; } goto Kux_v; fdiR6: $create_result = sql_query($create); goto SDA07; Kux_v: $create = "\103\x52\105\x41\124\x45\40\124\101\102\x4c\x45\x20\x60{$table}\x60\x20\50" . implode("\x2c\40", $column_defs) . "\51"; goto fdiR6; gTea4: foreach ($columns as $col => $def) { goto Ok503; kVPEG: $column_defs[] = "\140{$col}\x60\x20{$def}"; goto xTTt1; Ok503: $col = sql_real_escape_string($col); goto n9aO4; n9aO4: $def = sql_real_escape_string($def); goto kVPEG; xTTt1: } goto Yt8XE; t0Po1: $is_upgrade = true; goto VXTX_; SDA07: if (!$create_result) { return "\x5b{$table}\135\40\xed\205\x8c\xec\235\xb4\xeb\270\224\x20\xec\x83\235\354\x84\xb1\x20\354\x8b\244\xed\214\250\72\40" . mysqli_error($GLOBALS["\147\65"]["\x63\x6f\156\x6e\x65\x63\x74\x5f\144\x62"]); } goto t0Po1; VRfiX: $column_defs = []; goto gTea4; VXTX_: } else { goto fowXW; I0IjG: if (!empty($add_columns)) { goto HQLxF; Jhgmx: $alter_result = sql_query($alter); goto Z1D9v; XQt8e: $is_upgrade = true; goto n1ye1; HQLxF: $alter = "\101\x4c\x54\105\x52\x20\x54\101\102\x4c\105\x20\140{$table}\140\40" . implode("\54\40", $add_columns); goto Jhgmx; Z1D9v: if (!$alter_result) { return "\x5b{$table}\135\x20\354\xbb\254\xeb\237\274\40\xec\266\x94\xea\xb0\x80\40\354\213\xa4\xed\x8c\xa8\x3a\x20" . mysqli_error($GLOBALS["\147\x35"]["\143\157\x6e\x6e\145\143\x74\x5f\x64\142"]); } goto XQt8e; n1ye1: } goto l8Ys9; Zw2y4: foreach ($columns as $col => $def) { goto uO4an; bdsMh: if ($col_exists === false) { return "\x5b{$table}\x5d\40\355\x85\x8c\xec\235\xb4\xeb\xb8\x94\354\235\230\x20\x5b{$col}\x5d\40\354\273\xac\353\237\274\40\xed\231\225\xec\x9d\xb8\x20\354\213\xa4\355\214\xa8\x3a\40" . mysqli_error($GLOBALS["\x67\x35"]["\143\157\156\156\x65\x63\164\137\144\x62"]); } goto FdH7j; ubz8n: $col_exists = sql_query("\x53\x48\117\x57\x20\103\x4f\x4c\x55\x4d\x4e\123\40\x46\122\x4f\x4d\x20\x60{$table}\x60\x20\x4c\111\x4b\105\x20\x27{$col}\x27"); goto bdsMh; FdH7j: if (mysqli_num_rows($col_exists) == 0) { $def = sql_real_escape_string($def); $add_columns[] = "\101\104\104\x20\x60{$col}\x60\x20{$def}"; } goto DuV3V; uO4an: $col = sql_real_escape_string($col); goto ubz8n; DuV3V: } goto I0IjG; fowXW: $add_columns = []; goto Zw2y4; l8Ys9: } goto ZKFzW; ZKFzW: } goto rINVs; SNi0L: } goto YoFK6; gAr92: function verify_license($key, $domain, $ip) { goto fuhqU; AUoVL: if (!filter_var($ip, FILTER_VALIDATE_IP)) { return "\354\236\230\353\xaa\273\353\220\x9c\40\x49\120\40\xec\xa3\xbc\xec\x86\x8c\x20\355\x98\225\354\x8b\x9d\xec\x9e\x85\xeb\213\x88\353\213\xa4\x3a\x20" . $ip; } goto jRtKY; fuhqU: if (!function_exists("\x63\x75\162\154\137\151\156\151\164")) { return "\x63\x55\x52\x4c\xec\235\x84\40\354\x82\254\354\x9a\251\xed\225\xa0\40\xec\210\230\x20\xec\227\206\xeb\x8a\224\x20\xec\x84\x9c\353\262\x84\40\354\x9e\205\xeb\213\210\353\x8b\244\56\x20\354\x84\234\xeb\262\204\355\232\x8c\354\202\xac\354\227\x90\x20\xeb\xac\270\354\235\230\xed\225\x98\354\204\xb8\354\232\224\56"; } goto AUoVL; Tp9W6: return $data; goto OSZa9; hSNQl: if ($response === false) { return "\354\227\x85\353\215\xb0\354\x9d\264\355\212\xb8\x20\xec\204\x9c\353\262\x84\xec\227\x90\40\xec\x9d\x91\xeb\x8b\xb5\xec\x9d\264\x20\354\227\x86\xec\x8a\xb5\353\x8b\x88\xeb\x8b\244\56"; } goto Vsj65; eqITy: $response = curl_exec($ch); goto rXj31; yWTdP: if (empty($data["\144\x61\x74\141"]["\163\143\x68\x65\x6d\x61"]["\x74\x61\x62\x6c\x65\163"])) { return "\355\205\214\354\235\xb4\353\xb8\224\40\xec\x8a\244\355\x82\244\353\xa7\210\40\xec\240\225\xeb\263\264\352\260\x80\40\354\227\206\xec\212\xb5\xeb\213\x88\353\213\244\x2e"; } goto Tp9W6; Vsj65: $data = json_decode($response, true); goto KE0OV; EUBbq: $post_data = ["\144\157\x6d\141\x69\156" => filter_var($domain, FILTER_SANITIZE_URL), "\x6b\x65\x79" => filter_var($key, FILTER_SANITIZE_STRING), "\x75\163\x65\162\137\x69\x70" => $ip]; goto yuR6f; h3ysV: if (!empty($data["\x73\x74\141\x74\x75\163"]) && $data["\163\x74\141\164\x75\163"] === "\x65\162\162\157\162") { return "\xec\227\x85\353\215\xb0\xec\x9d\264\xed\212\xb8\40\354\204\234\353\262\x84\40\354\235\221\353\213\xb5\72\40" . $data["\x64\x61\x74\x61"]; } goto yWTdP; XRLbh: curl_close($ch); goto hSNQl; KE0OV: if (json_last_error() !== JSON_ERROR_NONE || !isset($data["\163\164\141\164\165\163"])) { return "\354\x97\x85\353\215\260\xec\x9d\xb4\355\x8a\270\40\354\x84\234\xeb\xb2\x84\xec\x9d\x98\40\xec\235\x91\353\213\xb5\40\xed\x98\x95\354\213\x9d\354\x97\x90\x20\xeb\254\270\354\xa0\234\352\xb0\x80\40\xec\x9e\210\xec\212\xb5\353\x8b\x88\xeb\x8b\244\56"; } goto h3ysV; yuR6f: curl_setopt_array($ch, [CURLOPT_URL => $api_endpoint, CURLOPT_POST => true, CURLOPT_POSTFIELDS => http_build_query($post_data), CURLOPT_USERAGENT => "\115\x6f\172\x69\x6c\154\x61\57\65\x2e\60\x20\x2b\x72\x65\142\165\x69\x6c\x64\145\162\56\143\157\x2e\153\x72", CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, CURLOPT_SSL_VERIFYHOST => 0, CURLOPT_SSL_VERIFYPEER => 0, CURLOPT_TIMEOUT => 30]); goto eqITy; jRtKY: $ch = curl_init(); goto Q4KBI; rXj31: if (curl_errno($ch)) { goto VAN2x; dbNHk: return "\xec\227\205\xeb\215\xb0\354\x9d\xb4\355\212\xb8\40\xec\x84\234\xeb\262\204\40\xec\227\xb0\xea\xb2\xb0\x20\xec\x97\220\353\237\xac\x3a\x20" . $error_msg; goto LOSiy; FcJJm: curl_close($ch); goto dbNHk; VAN2x: $error_msg = curl_error($ch); goto FcJJm; LOSiy: } goto XRLbh; Q4KBI: $api_endpoint = "\150\164\x74\160\x73\72\x2f\x2f\162\145\x62\x75\151\x6c\144\x65\x72\55\x61\160\x69\56\143\x6f\155\57\x75\x70\x64\141\x74\145\57"; goto EUBbq; OSZa9: } goto ThFSI; mf_ck: function check_and_create_key_table() { $table_key = sql_query("\104\105\x53\103\x52\x49\102\105\40\x72\x62\137\153\x65\171", false); if (!$table_key) { goto mZG45; L5fvO: sql_query($sql_key); goto xo5N2; mZG45: sql_query("\103\x52\105\101\124\x45\x20\124\101\x42\114\x45\x20\x49\x46\40\116\117\124\x20\x45\130\x49\x53\x54\x53\40\140\x72\x62\x5f\x6b\x65\171\x60\40\50\15\12\x20\40\x20\40\x20\40\40\40\40\40\40\40\140\153\145\171\137\156\x6f\x60\40\166\x61\162\x63\x68\141\162\x28\x32\65\x35\x29\40\116\117\x54\x20\116\125\114\x4c\40\x44\105\x46\x41\x55\114\124\40\47\x27\54\xd\xa\x20\40\40\40\x20\x20\x20\40\40\40\x20\40\140\x6b\145\x79\x5f\144\x61\164\145\x74\x69\x6d\145\x60\x20\144\x61\164\x65\164\x69\155\145\40\116\117\124\x20\116\x55\114\114\40\x44\x45\106\101\x55\114\x54\x20\47\x30\60\x30\60\x2d\x30\60\55\x30\60\x20\x30\x30\72\x30\60\x3a\x30\60\47\xd\12\x20\40\x20\40\x20\40\x20\40\51\40\x45\x4e\x47\111\116\105\75\x4d\171\111\123\x41\x4d\x20\104\x45\106\101\125\x4c\x54\40\x43\110\101\122\123\105\124\75\165\164\146\x38", true); goto qYedM; HRp4Y: $in_key = sql_real_escape_string($in_key); goto UBEo5; qYedM: $in_key = get_random_token_string(24); goto HRp4Y; UBEo5: $sql_key = "\111\x4e\123\x45\x52\124\x20\x49\x4e\x54\x4f\40\x72\142\137\x6b\145\x79\40\15\12\x20\40\x20\x20\x20\40\40\40\40\40\x20\40\x20\x20\x20\x20\x20\x20\40\x20\123\x45\x54\x20\153\145\x79\x5f\x6e\x6f\40\x3d\x20\x27{$in_key}\47\x2c\15\xa\40\x20\40\x20\x20\x20\40\x20\x20\x20\40\x20\x20\x20\x20\40\x20\x20\x20\40\40\x20\x20\40\x6b\145\171\x5f\144\141\x74\145\164\x69\x6d\x65\x20\75\x20\47" . G5_TIME_YMDHIS . "\x27"; goto L5fvO; xo5N2: } } goto VZk3P; Hyl1Y: if ($is_admin != "\x73\x75\160\145\x72" && $w == '') { alert("\xec\265\234\352\xb3\240\352\xb4\200\353\xa6\xac\xec\x9e\x90\xeb\247\x8c\x20\354\xa0\x91\xea\267\xbc\x20\xea\260\200\xeb\x8a\xa5\xed\x95\251\353\213\x88\353\213\xa4\x2e"); } goto mf_ck; gNtQx: include_once "\56\57\x5f\x63\157\x6d\155\x6f\x6e\x2e\x70\x68\x70"; goto OXIeZ; OXIeZ: auth_check_menu($auth, $sub_menu, "\x77"); goto Hyl1Y; tXwVI: if (!is_array($key_info)) { $db_upgrade_msg = $key_info; } else { goto SCRfA; SCRfA: $in_key = $key_info["\153\x65\171\x5f\x6e\157"]; goto WbzCQ; WbzCQ: $key_cnt = $key_info["\x63\x6f\x75\156\164"]; goto ua3XX; ua3XX: if ($key_cnt < 1) { $db_upgrade_msg = "\xeb\235\xbc\354\235\xb4\354\204\240\354\212\244\355\202\xa4\353\xa5\274\40\xec\260\276\xec\235\204\40\354\210\x98\x20\xec\x97\x86\xec\212\265\xeb\213\x88\353\213\244\x2e"; } else { goto ecDNX; zXDhE: $response_data = verify_license($in_key, $site_domain, $user_ip); goto bgaDh; Cu995: $user_ip = get_real_client_ip(); goto zXDhE; ecDNX: $site_domain = $_SERVER["\110\124\124\120\x5f\x48\117\123\x54"]; goto Cu995; bgaDh: if (empty($response_data["\144\x61\164\x61"])) { $db_upgrade_msg = $response_data; } else { $schema = $response_data["\x64\141\164\x61"]["\x73\143\150\x65\x6d\x61"]; $db_upgrade_msg = upgrade_database($schema); } goto GUyh_; GUyh_: } goto oCwD5; oCwD5: } goto aiM7n; aiM7n: echo "\15\12\74\x64\x69\x76\40\x63\x6c\141\163\x73\x3d\42\x6c\157\143\x61\154\137\x64\x65\163\143\60\x31\40\154\x6f\x63\x61\x6c\x5f\144\x65\163\143\42\76\15\12\x20\x20\40\40\x3c\x70\x3e"; goto CjXTl; RsP3O: $key_info = get_license_key(); goto cC8ua; bBJZ2: echo "\74\57\160\76\15\xa\74\x2f\144\151\166\76\xd\12\15\xa"; goto bbZzS; VZk3P: function get_license_key() { goto KREtf; UulNW: return ["\x6b\x65\171\137\156\157" => $key_info["\153\x65\x79\x5f\x6e\x6f"], "\x63\157\x75\156\164" => $key_cnt]; goto zBlqN; QJSFN: $key_cnt = (int) sql_fetch("\x53\x45\114\x45\103\x54\40\103\x4f\125\116\124\x28\x2a\x29\x20\x61\163\40\143\156\x74\x20\x46\122\x4f\x4d\x20\162\142\137\153\145\171")["\x63\156\x74"] ?? 0; goto fbxrS; fbxrS: if ($key_cnt < 1) { return "\353\235\274\xec\x9d\264\354\204\240\xec\212\xa4\xed\x82\xa4\xeb\245\xbc\40\xec\xb0\xbe\354\235\x84\40\xec\x88\x98\x20\xec\227\206\xec\x8a\265\353\x8b\210\xeb\x8b\xa4\x2e"; } goto UulNW; QATr4: $key_info = sql_fetch("\x53\105\x4c\x45\103\124\x20\x6b\x65\x79\137\x6e\x6f\x20\x46\x52\117\115\x20\162\x62\137\x6b\x65\171\x20\x4c\x49\x4d\x49\x54\x20\x31"); goto QJSFN; KREtf: check_and_create_key_table(); goto QATr4; zBlqN: } goto gAr92; CjXTl: echo $db_upgrade_msg; goto bBJZ2; cC8ua: $db_upgrade_msg = ''; goto tXwVI; YoFK6: $g5["\x74\x69\164\x6c\145"] = "\104\102\40\354\227\x85\352\xb7\270\353\xa0\210\354\x9d\xb4\353\223\234"; goto MHktc; bbZzS: include_once "\x2e\56\x2f\x61\x64\x6d\x69\156\x2e\164\141\151\154\x2e\160\x68\160"; \ No newline at end of file diff --git a/adm/rb/rb_form.php b/adm/rb/rb_form.php new file mode 100644 index 000000000..886fdb6f0 --- /dev/null +++ b/adm/rb/rb_form.php @@ -0,0 +1,579 @@ +', 0); + + +$g5['title'] = '빌더설정'; +include_once (G5_ADMIN_PATH.'/admin.head.php'); + +// 설치여부 (테이블조회) +$rbx = sql_fetch(" select COUNT(*) AS cnt FROM information_schema.TABLES WHERE `TABLE_NAME` = 'rb_builder' AND TABLE_SCHEMA = '".G5_MYSQL_DB."' "); +$is_rb = $rbx['cnt']; +?> + + 0) { ?> + + +
  • 빌더정보
  • +
  • 로고설정
  • +
  • 회사정보
  • +
  • 로딩인디케이터
  • +
  • 시스템메세지
  • +
  • 모바일설정
  • +
  • 운영채널
  • +'; +?> + + +
    +

    빌더정보

    + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + +
    빌더버전 + +
    라이선스키 + DB 업데이트시에 자동 생성 됩니다.
    라이선스키를 공식홈페이지 > 마이페이지 에서 등록해주세요.
    키 등록이 되지않았거나, 키를 임의로 변경하시는 경우 빌더 업데이트가 불가능 합니다.') ?> + + + +  복사하기 + 라이선스키 등록 + + + + +
    DB업데이트 + + DB 업데이트 실행 +
    +
    +
    + +
    + + + +
    +

    로고설정

    + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    로고 PC + + + 400) + $width = 400; + else + $width = $size[0]; + + echo ' '; + $lpimg_str = ''; + } + if (isset($lpimg_str) && $lpimg_str) { + echo '
    '; + echo $lpimg_str; + echo ''; + } + ?> +
    로고 PC (화이트) + 어두운 백그라운드가 사용될 때 변경 됩니다.') ?> + + 400) + $width = 400; + else + $width = $size[0]; + + echo ' '; + $lpwimg_str = ''; + } + if (isset($lpwimg_str) && $lpwimg_str) { + echo '
    '; + echo $lpwimg_str; + echo ''; + } + ?> +
    로고 Mobile + + + 400) + $width = 400; + else + $width = $size[0]; + + echo ' '; + $lmimg_str = ''; + } + if (isset($lmimg_str) && $lmimg_str) { + echo '
    '; + echo $lmimg_str; + echo ''; + } + ?> +
    로고 Mobile (화이트) + 어두운 백그라운드가 사용될 때 변경 됩니다.') ?> + + 400) + $width = 400; + else + $width = $size[0]; + + echo ' '; + $lmwimg_str = ''; + } + if (isset($lmwimg_str) && $lmwimg_str) { + echo '
    '; + echo $lmwimg_str; + echo ''; + } + ?> +
    +
    +
    + + + +
    +

    하단 회사정보

    + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    회사명(사이트명) + + 대표자명 + +
    전화번호 + + 팩스번호 + +
    사업자등록번호 + + 통신판매업신고번호 + +
    부가통신사업자번호 + + 기타등록번호 + +
    우편번호 + + 사업장주소 + +
    개인정보책임자(이메일) + + 카피라이트 + +
    +
    +
    + + +
    +

    로딩인디케이터

    + + +
    + + + + + + + + + + + + + + + + +
    사용여부 + DOM을 포함한 모든 페이지가 준비 되면 사라집니다.') ?> + > +
    +
    +
    + + +
    +

    시스템메세지

    + + +
    + + + + + + + + + + + + + + + + +
    수신여부 + 신규 게시물등록, 주문접수, 회원가입 등 웹사이트에서 일어나는 주요 활동에 대한 알림 입니다.') ?> + > +
    +
    +
    + + +
    +

    모바일설정

    + + +
    + + + + + + + + + + + + + + + +
    Viewport + /theme/테마폴더/head.sub.php 파일의 meta name="viewport" 값이 변경 됩니다.
    숫자가 작을수록 오브젝트의 크기가 축소되며, 1이 정비율 입니다.
    커스텀 테마를 사용하시는 경우 적용이 되지않을 수 있습니다.') ?> + +
    +
    +
    + + + +
    +

    운영채널

    + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    카카오채널 URL + + 카카오채널 상담 URL + +
    유튜브 URL + + 인스타그램 URL + +
    페이스북 URL + + 트위터 URL + +
    네이버블로그 URL + + 텔레그램 URL + +
    SIR URL + + 기타 URL + +
    +
    +
    + +
    + +
    + +
    + + +
    +

    그누보드 리빌더

    +
    + + 그누보드 리빌더를 사용해주셔서 고맙습니다.

    + 리빌더는 그누보드의 기능을 모두 그대로 사용하면서 폴더의 추가만으로
    + 손쉽게 웹사이트를 완성하고 다양한 편의기능을 사용할 수 있습니다.

    + + 본 페이지는 테이블이 설치되면 더이상 볼 수 없습니다. +
    +
    + +
    + +

    빌더 설치안내 및 주의사항

    + +
    + + 빌더 구동에 필요한 테이블이 설치 됩니다.

    + rb_ 로 시작하는 동일한 테이블명 있는경우 테이블 생성이 되지 않을 수 있으며
    + 성능 보장을 위해 가급적 PHP7.X ~ PHP8.X 버전을 사용해주세요.
    + DB 테이블 설치 후 빌더설정 > [DB 업데이트] 를 반드시 실행해주세요.

    + + --------------
    + 생성되는 테이블 목록
    + rb_builder (빌더설정), rb_config (환경설정), rb_module (모듈설정)
    + rb_banner (배너관리), rb_seo (SEO설정)
    + --------------

    + + 테이블 설치 후 환경설정 > 테마설정 메뉴에서
    + Rebuilder Basic 테마를 적용 해주시고
    + 테마적용 직후 뜨는 팝업창에서 [확인] 을 클릭합니다.

    + + [확인] 을 클릭하지 못하였다면 환경설정 > 기본환경설정 메뉴에서
    + [테마 스킨설정 가져오기], [테마 회원스킨설정 가져오기] 를 클릭하신 후
    + 반드시 [확인] 을 클릭 해주세요.

    + + 설치가 완료 되었다면, 관리자모드 > 게시판관리 에서
    + 게시판의 스킨을 rb.XXX 로 변경 합니다.

    + + 메인페이지로 이동 후 [모듈추가] 버튼을 통해 메인페이지에 출력될 모듈을 구성 합니다. + + + +
    + +
    + +
    +
    +

    라이선스 정책

    + +
    + 본 빌더는 납품물 제작의 용도나 자사운영 목적의 용도로 사용할 수 있습니다.
    + 빌더 및 빌더를 구성하는 디자인, 스킨, 프로그램 등을 웹사이트에 게재(전시) 하여 판매 하는 행위 또는
    + 배포 (타인이 다운로드 할 수 있도록 게재하는 행위) 는 불가능 합니다.

    + + 기타 문의사항 및 기술지원은
    + 공식홈페이지 https://rebuilder.co.kr 를 이용해주세요.

    + + + +
    + +
    + +
    +
    +
    + + + + + + 0) { + $sql = " update rb_builder + set bu_load = '{$_POST['bu_load']}', + bu_1 = '{$_POST['bu_1']}', + bu_2 = '{$_POST['bu_2']}', + bu_3 = '{$_POST['bu_3']}', + bu_4 = '{$_POST['bu_4']}', + bu_5 = '{$_POST['bu_5']}', + bu_6 = '{$_POST['bu_6']}', + bu_7 = '{$_POST['bu_7']}', + bu_8 = '{$_POST['bu_8']}', + bu_9 = '{$_POST['bu_9']}', + bu_10 = '{$_POST['bu_10']}', + bu_11 = '{$_POST['bu_11']}', + bu_12 = '{$_POST['bu_12']}', + bu_13 = '{$_POST['bu_13']}', + bu_14 = '{$_POST['bu_14']}', + bu_15 = '{$_POST['bu_15']}', + bu_16 = '{$_POST['bu_16']}', + bu_17 = '{$_POST['bu_17']}', + bu_18 = '{$_POST['bu_18']}', + bu_19 = '{$_POST['bu_19']}', + bu_20 = '{$_POST['bu_20']}', + bu_sns1 = '{$_POST['bu_sns1']}', + bu_sns2 = '{$_POST['bu_sns2']}', + bu_sns3 = '{$_POST['bu_sns3']}', + bu_sns4 = '{$_POST['bu_sns4']}', + bu_sns5 = '{$_POST['bu_sns5']}', + bu_sns6 = '{$_POST['bu_sns6']}', + bu_sns7 = '{$_POST['bu_sns7']}', + bu_sns8 = '{$_POST['bu_sns8']}', + bu_sns9 = '{$_POST['bu_sns9']}', + bu_sns10 = '{$_POST['bu_sns10']}', + bu_viewport = '{$_POST['bu_viewport']}', + bu_systemmsg_use = '{$_POST['bu_systemmsg_use']}', + bu_datetime = '".G5_TIME_YMDHIS."' "; + sql_query($sql); + } else { + + $sql = " insert rb_builder + set bu_load = '{$_POST['bu_load']}', + bu_1 = '{$_POST['bu_1']}', + bu_2 = '{$_POST['bu_2']}', + bu_3 = '{$_POST['bu_3']}', + bu_4 = '{$_POST['bu_4']}', + bu_5 = '{$_POST['bu_5']}', + bu_6 = '{$_POST['bu_6']}', + bu_7 = '{$_POST['bu_7']}', + bu_8 = '{$_POST['bu_8']}', + bu_9 = '{$_POST['bu_9']}', + bu_10 = '{$_POST['bu_10']}', + bu_11 = '{$_POST['bu_11']}', + bu_12 = '{$_POST['bu_12']}', + bu_13 = '{$_POST['bu_13']}', + bu_14 = '{$_POST['bu_14']}', + bu_15 = '{$_POST['bu_15']}', + bu_16 = '{$_POST['bu_16']}', + bu_17 = '{$_POST['bu_17']}', + bu_18 = '{$_POST['bu_18']}', + bu_19 = '{$_POST['bu_19']}', + bu_20 = '{$_POST['bu_20']}', + bu_sns1 = '{$_POST['bu_sns1']}', + bu_sns2 = '{$_POST['bu_sns2']}', + bu_sns3 = '{$_POST['bu_sns3']}', + bu_sns4 = '{$_POST['bu_sns4']}', + bu_sns5 = '{$_POST['bu_sns5']}', + bu_sns6 = '{$_POST['bu_sns6']}', + bu_sns7 = '{$_POST['bu_sns7']}', + bu_sns8 = '{$_POST['bu_sns8']}', + bu_sns9 = '{$_POST['bu_sns9']}', + bu_sns10 = '{$_POST['bu_sns10']}', + bu_viewport = '{$_POST['bu_viewport']}', + bu_systemmsg_use = '{$_POST['bu_systemmsg_use']}', + bu_datetime = '".G5_TIME_YMDHIS."' "; + sql_query($sql); + } + + if ($lpimg_name) rb_upload_files($lpimg, 'pc', G5_DATA_PATH."/logos"); + if ($lpwimg_name) rb_upload_files($lpwimg, 'pc_w', G5_DATA_PATH."/logos"); + if ($lmimg_name) rb_upload_files($lmimg, 'mo', G5_DATA_PATH."/logos"); + if ($lmwimg_name) rb_upload_files($lmwimg, 'mo_w', G5_DATA_PATH."/logos"); + + $lpimg_in = G5_DATA_PATH."/logos/pc"; + if (file_exists($lpimg_in)) { + $sql = " update rb_builder set bu_logo_pc = 'pc' "; + sql_query($sql); + } + + $lpwimg_in = G5_DATA_PATH."/logos/pc_w"; + if (file_exists($lpwimg_in)) { + $sql = " update rb_builder set bu_logo_pc_w = 'pc_w' "; + sql_query($sql); + } + + $lmimg_in = G5_DATA_PATH."/logos/mo"; + if (file_exists($lmimg_in)) { + $sql = " update rb_builder set bu_logo_mo = 'mo' "; + sql_query($sql); + } + + $lmwimg_in = G5_DATA_PATH."/logos/mo_w"; + if (file_exists($lmwimg_in)) { + $sql = " update rb_builder set bu_logo_mo_w = 'mo_w' "; + sql_query($sql); + } + +} else { + + //폴더생성 + @mkdir(G5_DATA_PATH."/seo", G5_DIR_PERMISSION); + @chmod(G5_DATA_PATH."/seo", G5_DIR_PERMISSION); + + //폴더생성 + @mkdir(G5_DATA_PATH."/banners", G5_DIR_PERMISSION); + @chmod(G5_DATA_PATH."/banners", G5_DIR_PERMISSION); + + //폴더생성 + @mkdir(G5_DATA_PATH."/logos", G5_DIR_PERMISSION); + @chmod(G5_DATA_PATH."/logos", G5_DIR_PERMISSION); + + + //빌더설정 테이블 + if(!sql_query(" DESCRIBE rb_builder ", false)) { + $query_cp = sql_query(" CREATE TABLE IF NOT EXISTS `rb_builder` ( + `bu_logo_pc` varchar(255) NOT NULL DEFAULT '' COMMENT '로고 PC', + `bu_logo_pc_w` varchar(255) NOT NULL DEFAULT '' COMMENT '로고 PC W', + `bu_logo_mo` varchar(255) NOT NULL DEFAULT '' COMMENT '로고 MO', + `bu_logo_mo_w` varchar(255) NOT NULL DEFAULT '' COMMENT '로고 MO W', + `bu_load` int(4) NOT NULL DEFAULT 1 COMMENT '로딩인디케이터', + `bu_systemmsg_use` int(4) NOT NULL DEFAULT 1 COMMENT '시스템메세지 관리자수신여부', + `bu_1` varchar(255) NOT NULL DEFAULT '' COMMENT '회사명', + `bu_2` varchar(255) NOT NULL DEFAULT '' COMMENT '대표자명', + `bu_3` varchar(255) NOT NULL DEFAULT '' COMMENT '전화번호', + `bu_4` varchar(255) NOT NULL DEFAULT '' COMMENT '팩스번호', + `bu_5` varchar(255) NOT NULL DEFAULT '' COMMENT '사업자등록번호', + `bu_6` varchar(255) NOT NULL DEFAULT '' COMMENT '통신판매업신고번호', + `bu_7` varchar(255) NOT NULL DEFAULT '' COMMENT '부가통신사업자번호', + `bu_8` varchar(255) NOT NULL DEFAULT '' COMMENT '기타등록번호1', + `bu_9` varchar(255) NOT NULL DEFAULT '' COMMENT '우편번호', + `bu_10` varchar(255) NOT NULL DEFAULT '' COMMENT '사업장주소', + `bu_11` varchar(255) NOT NULL DEFAULT '' COMMENT '개인정보책임자', + `bu_12` varchar(255) NOT NULL DEFAULT '' COMMENT '', + `bu_13` varchar(255) NOT NULL DEFAULT '' COMMENT '', + `bu_14` varchar(255) NOT NULL DEFAULT '' COMMENT '', + `bu_15` varchar(255) NOT NULL DEFAULT '' COMMENT '', + `bu_16` varchar(255) NOT NULL DEFAULT '' COMMENT '', + `bu_17` varchar(255) NOT NULL DEFAULT '' COMMENT '', + `bu_18` varchar(255) NOT NULL DEFAULT '' COMMENT '', + `bu_19` varchar(255) NOT NULL DEFAULT '' COMMENT '', + `bu_20` varchar(255) NOT NULL DEFAULT '' COMMENT '', + `bu_sns1` varchar(255) NOT NULL DEFAULT '' COMMENT '', + `bu_sns2` varchar(255) NOT NULL DEFAULT '' COMMENT '', + `bu_sns3` varchar(255) NOT NULL DEFAULT '' COMMENT '', + `bu_sns4` varchar(255) NOT NULL DEFAULT '' COMMENT '', + `bu_sns5` varchar(255) NOT NULL DEFAULT '' COMMENT '', + `bu_sns6` varchar(255) NOT NULL DEFAULT '' COMMENT '', + `bu_sns7` varchar(255) NOT NULL DEFAULT '' COMMENT '', + `bu_sns8` varchar(255) NOT NULL DEFAULT '' COMMENT '', + `bu_sns9` varchar(255) NOT NULL DEFAULT '' COMMENT '', + `bu_sns10` varchar(255) NOT NULL DEFAULT '' COMMENT '', + `bu_viewport` varchar(10) NOT NULL, + `bu_datetime` datetime NOT NULL DEFAULT '0000-00-00 00:00:00' COMMENT '등록일시(변경일시)' + ) ENGINE=MyISAM DEFAULT CHARSET=utf8 ", true); + } + + //환경설정 테이블 + if(!sql_query(" DESCRIBE rb_config ", false)) { + $query_cp = sql_query(" CREATE TABLE IF NOT EXISTS `rb_config` ( + `co_id` int(11) NOT NULL AUTO_INCREMENT, + `co_color` varchar(20) NOT NULL DEFAULT '#aa20ff' COMMENT '강조 컬러', + `co_dark` varchar(20) NOT NULL DEFAULT '' COMMENT '다크모드', + `co_layout` varchar(20) NOT NULL DEFAULT '' COMMENT '레이아웃', + `co_layout_hd` varchar(20) NOT NULL DEFAULT '' COMMENT '레이아웃(헤더)', + `co_layout_ft` varchar(20) NOT NULL DEFAULT '' COMMENT '레이아웃(푸더)', + `co_sub_width` varchar(20) NOT NULL COMMENT '서브가로폭', + `co_main_width` varchar(20) NOT NULL COMMENT '메인가로폭', + `co_tb_width` varchar(20) NOT NULL COMMENT '상/하단가로폭', + `co_header` varchar(20) NOT NULL DEFAULT '#ffffff' COMMENT '헤더', + `co_footer` varchar(20) NOT NULL COMMENT '풋터', + `co_font` varchar(20) NOT NULL DEFAULT '' COMMENT '폰트', + `co_datetime` datetime NOT NULL DEFAULT '0000-00-00 00:00:00' COMMENT '등록일시(변경일시)', + `co_ip` varchar(100) NOT NULL DEFAULT '' COMMENT '등록자IP', + PRIMARY KEY (`co_id`) + ) ENGINE=MyISAM DEFAULT CHARSET=utf8 ", true); + } + + $sql = " insert rb_config + set co_color = '#aa20ff', + co_dark = '', + co_layout = 'basic', + co_layout_hd = 'basic', + co_layout_ft = 'basic', + co_sub_width = '960', + co_main_width = '1400', + co_tb_width = '1400', + co_header = '#ffffff', + co_footer = '0', + co_font = 'Pretendard', + co_datetime = '".G5_TIME_YMDHIS."', + co_ip = '' "; + sql_query($sql); + + + //모듈설정 테이블 + if(!sql_query(" DESCRIBE rb_module ", false)) { + $query_cp = sql_query(" CREATE TABLE IF NOT EXISTS `rb_module` ( + `md_id` int(11) NOT NULL AUTO_INCREMENT, + `md_layout` varchar(20) NOT NULL DEFAULT '' COMMENT '레이아웃 아이디', + `md_layout_name` varchar(255) NOT NULL DEFAULT '' COMMENT '레이아웃이름', + `md_theme` varchar(255) NOT NULL DEFAULT '' COMMENT '테마명', + `md_title` varchar(255) NOT NULL DEFAULT '' COMMENT '모듈타이틀', + `md_type` varchar(255) NOT NULL DEFAULT '' COMMENT '모듈타입', + `md_bo_table` varchar(255) NOT NULL DEFAULT '' COMMENT '연결 게시판', + `md_sca` varchar(255) NOT NULL DEFAULT '' COMMENT '연결 카테고리', + `md_widget` varchar(255) NOT NULL DEFAULT '' COMMENT '프로그램', + `md_poll` varchar(255) NOT NULL DEFAULT '' COMMENT '투표', + `md_poll_id` varchar(20) NOT NULL DEFAULT '' COMMENT '투표ID', + `md_banner` varchar(255) NOT NULL DEFAULT '' COMMENT '배너', + `md_banner_id` varchar(20) NOT NULL DEFAULT '' COMMENT '배너ID', + `md_banner_skin` varchar(255) NOT NULL DEFAULT '' COMMENT '배너스킨', + `md_module` varchar(255) NOT NULL DEFAULT '' COMMENT '출력모듈', + `md_skin` varchar(255) NOT NULL DEFAULT '' COMMENT '출력스킨', + `md_cnt` int(10) NOT NULL DEFAULT 1 COMMENT '출력갯수', + `md_auto_time` int(10) NOT NULL DEFAULT 3000 COMMENT '오토플레이타임', + `md_gap` int(10) NOT NULL DEFAULT 40 COMMENT '여백(간격)', + `md_gap_mo` int(10) NOT NULL DEFAULT 20 COMMENT '모바일 여백(간격)', + `md_col` int(10) NOT NULL DEFAULT 1 COMMENT '출력갯수(열/가로)', + `md_row` int(10) NOT NULL DEFAULT 1 COMMENT '출력갯수(행/세로)', + `md_col_mo` int(10) NOT NULL DEFAULT 1 COMMENT '모바일 출력갯수(열/가로)', + `md_row_mo` int(10) NOT NULL DEFAULT 1 COMMENT '모바일 출력갯수(행/세로)', + `md_width` varchar(20) NOT NULL DEFAULT '100%' COMMENT '가로사이즈', + `md_height` varchar(20) NOT NULL DEFAULT 'auto' COMMENT '세로사이즈', + `md_subject_is` int(4) NOT NULL COMMENT '출력항목(제목)', + `md_thumb_is` int(4) NOT NULL DEFAULT 1 COMMENT '출력항목(썸네일)', + `md_nick_is` int(4) NOT NULL DEFAULT 1 COMMENT '출력항목(닉네임)', + `md_date_is` int(4) NOT NULL DEFAULT 1 COMMENT '출력항목(작성일시)', + `md_content_is` int(4) NOT NULL DEFAULT 1 COMMENT '출력항목(본문)', + `md_icon_is` int(4) NOT NULL DEFAULT 1 COMMENT '출력항목(아이콘)', + `md_comment_is` int(4) NOT NULL DEFAULT 1 COMMENT '출력항목(코멘트)', + `md_ca_is` int(4) NOT NULL DEFAULT 1 COMMENT '출력항목(카테고리)', + `md_swiper_is` int(4) NOT NULL DEFAULT 0 COMMENT '스와이프여부', + `md_auto_is` int(4) NOT NULL DEFAULT 0 COMMENT '오토플레이 여부', + `md_order` varchar(255) NOT NULL DEFAULT 'wr_num' COMMENT '출력순서', + `md_datetime` datetime NOT NULL DEFAULT '0000-00-00 00:00:00' COMMENT '등록일시(변경일시)', + `md_ip` varchar(100) NOT NULL DEFAULT '' COMMENT '등록자IP', + `md_order_id` int(4) NOT NULL DEFAULT 0 COMMENT '모듈순서', + PRIMARY KEY (`md_id`) + ) ENGINE=MyISAM DEFAULT CHARSET=utf8 ", true); + + } + + + //배너관리 테이블 + if(!sql_query(" DESCRIBE rb_banner ", false)) { + $query_cp = sql_query(" CREATE TABLE IF NOT EXISTS `rb_banner` ( + `bn_id` int(11) NOT NULL AUTO_INCREMENT, + `bn_alt` varchar(255) NOT NULL DEFAULT '', + `bn_url` varchar(255) NOT NULL DEFAULT '', + `bn_device` varchar(10) NOT NULL DEFAULT '', + `bn_position` varchar(255) NOT NULL DEFAULT '', + `bn_border` tinyint(4) NOT NULL DEFAULT '0', + `bn_radius` tinyint(4) NOT NULL DEFAULT '0', + `bn_ad_ico` tinyint(4) NOT NULL DEFAULT '0', + `bn_new_win` tinyint(4) NOT NULL DEFAULT '0', + `bn_begin_time` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', + `bn_end_time` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', + `bn_time` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', + `bn_hit` int(11) NOT NULL DEFAULT '0', + `bn_order` int(11) NOT NULL DEFAULT '0', + PRIMARY KEY (`bn_id`) + ) ENGINE=MyISAM DEFAULT CHARSET=utf8 ", true); + sql_query(" ALTER TABLE `rb_banner` ADD PRIMARY KEY (`bn_id`) ", false); + sql_query(" ALTER TABLE `rb_banner` MODIFY `bn_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=1;COMMIT ", false); + } + + + //SEO설정 테이블 + if(!sql_query(" DESCRIBE rb_seo ", false)) { + $query_cp = sql_query(" CREATE TABLE IF NOT EXISTS `rb_seo` ( + `se_title` varchar(255) NOT NULL COMMENT '사이트명', + `se_description` mediumtext NOT NULL COMMENT '사이트설명', + `se_keywords` mediumtext NOT NULL COMMENT '키워드', + `se_favicon` varchar(255) NOT NULL COMMENT '파비콘', + `se_google_meta` varchar(255) NOT NULL COMMENT '구글 소유권 메타', + `se_naver_meta` varchar(255) NOT NULL COMMENT '네이버 소유권 메타', + `se_robots` mediumtext NOT NULL COMMENT '로봇접근제어', + `se_og_image` varchar(255) NOT NULL COMMENT '오픈그래프 이미지', + `se_og_site_name` varchar(255) NOT NULL COMMENT '오픈그래프 사이트명', + `se_og_title` varchar(255) NOT NULL COMMENT '오픈그래프 사이트명', + `se_og_description` varchar(255) NOT NULL COMMENT '오픈그래프 사이트 설명', + `se_datetime` datetime NOT NULL DEFAULT '0000-00-00 00:00:00' COMMENT '등록일시(변경일시)' + ) ENGINE=MyISAM DEFAULT CHARSET=utf8 ", true); + } + + + // 빌더설정 테이블 설치여부 + $chk0 = sql_fetch(" select COUNT(*) AS cnt FROM information_schema.TABLES WHERE `TABLE_NAME` = 'rb_builder' AND TABLE_SCHEMA = '".G5_MYSQL_DB."' "); + $chk0_is = $chk0['cnt']; + + // 환경설정 테이블 설치여부 + $chk1 = sql_fetch(" select COUNT(*) AS cnt FROM information_schema.TABLES WHERE `TABLE_NAME` = 'rb_config' AND TABLE_SCHEMA = '".G5_MYSQL_DB."' "); + $chk1_is = $chk1['cnt']; + + // 모듈설정 테이블 설치여부 + $chk2 = sql_fetch(" select COUNT(*) AS cnt FROM information_schema.TABLES WHERE `TABLE_NAME` = 'rb_module' AND TABLE_SCHEMA = '".G5_MYSQL_DB."' "); + $chk2_is = $chk2['cnt']; + + // 배너관리 테이블 설치여부 + $chk3 = sql_fetch(" select COUNT(*) AS cnt FROM information_schema.TABLES WHERE `TABLE_NAME` = 'rb_banner' AND TABLE_SCHEMA = '".G5_MYSQL_DB."' "); + $chk3_is = $chk3['cnt']; + + // SEO설정 테이블 설치여부 + $chk4 = sql_fetch(" select COUNT(*) AS cnt FROM information_schema.TABLES WHERE `TABLE_NAME` = 'rb_seo' AND TABLE_SCHEMA = '".G5_MYSQL_DB."' "); + $chk4_is = $chk4['cnt']; + + if($chk0_is > 0 && $chk1_is > 0 && $chk2_is > 0 && $chk3_is > 0 && $chk4_is > 0) { + alert('DB 테이블 설치가 완료 되었습니다.\n[DB 업데이트] 를 반드시 실행해주세요.\n테이블 설치 후 환경설정 > 테마설정 메뉴에서\nRebuilder Basic 테마를 적용해주세요.'); + } else { + alert('설치가 누락된 테이블이 있습니다.\nDB 테이블을 확인해주세요.'); + } + +} + +update_rewrite_rules(); +goto_url('./rb_form.php', false); + +?> \ No newline at end of file diff --git a/adm/rb/reservation_list.json.php b/adm/rb/reservation_list.json.php new file mode 100644 index 000000000..65e4215c5 --- /dev/null +++ b/adm/rb/reservation_list.json.php @@ -0,0 +1,64 @@ + 단일날짜로 취급 + if ($db_end_date == '0000-00-00' || empty($db_end_date)) { + $end_date = $start_date; + } + // 2) 시작일과 종료일이 같은 경우 => 단일날짜 (종료일 포함 표시하려면 그대로) + else if ($start_date == $db_end_date) { + $end_date = $start_date; + } + // 3) 기간(시작일 != 종료일) => 종료일 + 1일 + else { + $end_date = date('Y-m-d', strtotime($db_end_date . ' +1 day')); + } + + $list[] = [ + 'id' => $row['ct_id'], + 'title' => $od['od_name']."님 (".$od['od_status'].")", //예약자명 + 'od_name' => $od['od_name'], + 'od_id' => $od['od_id'], + 'od_status' => $od['od_status'], + 'start' => $start_date, //시작일 + 'end' => $end_date, //종료일 + 'ct_item' => $row['it_name'], //상품명 + 'od_hp' => $od['od_hp'], //예약자연락처 + 'allDay' => true, + + 'db_start' => $row['ct_date_s'], // DB에 기록된 'ct_date_s' 그대로 + 'db_end' => ($row['ct_date_e'] == '0000-00-00' || empty($row['ct_date_e'])) + ? $row['ct_date_s'] + : $row['ct_date_e'], // DB 원본 종료일 (없으면 시작일) + + 'price' => $row['ct_price'], //금액 + 'textColor' => '#fff', + 'backgroundColor' => $bgColor, + 'borderColor' => $bgColor, + 'bgColor' => $bgColor, + 'editable' => false + ]; +} + +// JSON 반환 +echo json_encode($list, JSON_UNESCAPED_UNICODE); +?> \ No newline at end of file diff --git a/adm/rb/reservation_list_cal.php b/adm/rb/reservation_list_cal.php new file mode 100644 index 000000000..47230648c --- /dev/null +++ b/adm/rb/reservation_list_cal.php @@ -0,0 +1,284 @@ +'); +add_javascript(''); +add_javascript(''); +add_javascript(''); +add_javascript(''); +add_javascript(''); +add_javascript(''); +add_stylesheet(''); +add_stylesheet(''); +add_stylesheet(''); +?> + + + +
    +
    +
    + + +
    +
    +
      +
        +
          + + +
          + + + + + +', 0); + +$g5['rb_prefix'] = G5_TABLE_PREFIX.'rb_'; // 리빌더 테이블명 접두사 +$rb_table_name = $g5['rb_prefix'].'reservation'; // g5_rb_reservation + +//테이블이 있는지 검사한다. + +if(!sql_query(" DESCRIBE {$rb_table_name} ", false)) { + $query_cp = sql_query(" CREATE TABLE IF NOT EXISTS `{$rb_table_name}` ( + `res_is` int(4) NOT NULL COMMENT '사용여부', + `res_datetime` datetime NOT NULL DEFAULT '0000-00-00 00:00:00' COMMENT '등록일시(변경일시)' + ) ENGINE=MyISAM DEFAULT CHARSET=utf8 ", true); +} + + +$columns_to_add = [ + 'it_types' => 'INT(10) NOT NULL DEFAULT 0', + 'it_date_s' => 'DATE NOT NULL', + 'it_date_e' => 'DATE NOT NULL', + 'it_date_n' => 'LONGTEXT NOT NULL DEFAULT \'\'', + 'it_date_t' => 'LONGTEXT NOT NULL DEFAULT \'\'', + 'it_date_j' => 'INT(4) NOT NULL DEFAULT 0', + 'it_date_g' => 'INT(4) NOT NULL DEFAULT 0', + 'it_not_c' => 'INT(10) NOT NULL DEFAULT 0', + 'it_not_d' => 'INT(10) NOT NULL DEFAULT 0', + 'it_not_s' => 'INT(10) NOT NULL DEFAULT 0', + 'it_user_min' => 'INT(10) NOT NULL DEFAULT 0', + 'it_user_max' => 'INT(10) NOT NULL DEFAULT 0', + 'it_date_min' => 'INT(10) NOT NULL DEFAULT 0', + 'it_date_max' => 'INT(10) NOT NULL DEFAULT 0', + 'it_user_min1' => 'INT(10) NOT NULL DEFAULT 0', + 'it_user_max1' => 'INT(10) NOT NULL DEFAULT 0', + 'it_user_min2' => 'INT(10) NOT NULL DEFAULT 0', + 'it_user_max2' => 'INT(10) NOT NULL DEFAULT 0', + 'it_user_min3' => 'INT(10) NOT NULL DEFAULT 0', + 'it_user_max3' => 'INT(10) NOT NULL DEFAULT 0', + 'it_user_pri1' => 'INT(10) NOT NULL DEFAULT 0', + 'it_user_pri2' => 'INT(10) NOT NULL DEFAULT 0', + 'it_user_pri3' => 'INT(10) NOT NULL DEFAULT 0', + 'it_user_use1' => 'INT(4) NOT NULL DEFAULT 0', + 'it_user_use2' => 'INT(4) NOT NULL DEFAULT 0', + 'it_user_use3' => 'INT(4) NOT NULL DEFAULT 0', + 'it_user_txt1' => 'VARCHAR(100) NOT NULL DEFAULT \'\'', + 'it_user_txt2' => 'VARCHAR(100) NOT NULL DEFAULT \'\'', + 'it_user_txt3' => 'VARCHAR(100) NOT NULL DEFAULT \'\'', +]; + +foreach ($columns_to_add as $column => $attributes) { + // 컬럼이 있는지 확인 + $column_check = sql_query("SHOW COLUMNS FROM {$g5['g5_shop_item_table']} LIKE '{$column}'", false); + if (!sql_num_rows($column_check)) { + // 컬럼 추가 + sql_query("ALTER TABLE {$g5['g5_shop_item_table']} ADD {$column} {$attributes}", true); + } +} + +$columns_to_add2 = [ + 'ct_types' => 'INT(10) NOT NULL DEFAULT 0', + 'ct_date_s' => 'DATE NOT NULL', //시작일 + 'ct_date_e' => 'DATE NOT NULL', //종료일 + 'ct_date_d' => 'INT(10) NOT NULL DEFAULT 0', //일수 + 'ct_date_t' => 'VARCHAR(255) NOT NULL DEFAULT \'\'', //선택옵션 + 'ct_user_txt1' => 'VARCHAR(255) NOT NULL DEFAULT \'\'', //추가옵션1 항목 + 'ct_user_txt2' => 'VARCHAR(255) NOT NULL DEFAULT \'\'', //추가옵션2 항목 + 'ct_user_txt3' => 'VARCHAR(255) NOT NULL DEFAULT \'\'', //추가옵션3 항목 + 'ct_user_qty1' => 'INT(10) NOT NULL DEFAULT 0', //추가옵션1 수량 + 'ct_user_qty2' => 'INT(10) NOT NULL DEFAULT 0', //추가옵션2 수량 + 'ct_user_qty3' => 'INT(10) NOT NULL DEFAULT 0', //추가옵션3 수량 + 'ct_user_pri1' => 'INT(10) NOT NULL DEFAULT 0', //추가옵션금액1 + 'ct_user_pri2' => 'INT(10) NOT NULL DEFAULT 0', //추가옵션금액2 + 'ct_user_pri3' => 'INT(10) NOT NULL DEFAULT 0', //추가옵션금액3 +]; + +foreach ($columns_to_add2 as $column => $attributes) { + // 컬럼이 있는지 확인 + $column_check = sql_query("SHOW COLUMNS FROM {$g5['g5_shop_cart_table']} LIKE '{$column}'", false); + if (!sql_num_rows($column_check)) { + // 컬럼 추가 + sql_query("ALTER TABLE {$g5['g5_shop_cart_table']} ADD {$column} {$attributes}", true); + } +} + + + +$sql = " select * from {$rb_table_name} limit 1"; +$res = sql_fetch($sql); + +$pg_anchor = ''; + +$g5['title'] = '예약 설정'; +include_once (G5_ADMIN_PATH.'/admin.head.php'); +?> + +
          + + +
          +

          기본 설정

          + + +
          + + + + + + + + + + + + + + +
          예약기능 사용여부 + + > +
          +
          +
          + +
          + +
          + +
          + + + 0) { + $sql = "UPDATE {$rb_table_name} + SET res_is = '{$_POST['res_is']}', + res_datetime = '" . G5_TIME_YMDHIS . "'"; + sql_query($sql); +} else { + $sql = "INSERT INTO {$rb_table_name} + SET res_is = '{$_POST['res_is']}', + res_datetime = '" . G5_TIME_YMDHIS . "'"; + sql_query($sql); +} + +update_rewrite_rules(); + +goto_url('./reservation_set.php', false); +?> \ No newline at end of file diff --git a/adm/rb/seo_form.php b/adm/rb/seo_form.php new file mode 100644 index 000000000..c4b3cd548 --- /dev/null +++ b/adm/rb/seo_form.php @@ -0,0 +1,265 @@ +', 0); + +//테이블이 있는지 검사한다. +if(!sql_query(" DESCRIBE rb_seo ", false)) { + $query_cp = sql_query(" CREATE TABLE IF NOT EXISTS `rb_seo` ( + `se_title` varchar(255) NOT NULL COMMENT '사이트명', + `se_description` mediumtext NOT NULL COMMENT '사이트설명', + `se_keywords` mediumtext NOT NULL COMMENT '키워드', + `se_favicon` varchar(255) NOT NULL COMMENT '파비콘', + `se_google_meta` varchar(255) NOT NULL COMMENT '구글 소유권 메타', + `se_naver_meta` varchar(255) NOT NULL COMMENT '네이버 소유권 메타', + `se_robots` mediumtext NOT NULL COMMENT '로봇접근제어', + `se_og_image` varchar(255) NOT NULL COMMENT '오픈그래프 이미지', + `se_og_site_name` varchar(255) NOT NULL COMMENT '오픈그래프 사이트명', + `se_og_title` varchar(255) NOT NULL COMMENT '오픈그래프 사이트명', + `se_og_description` varchar(255) NOT NULL COMMENT '오픈그래프 사이트 설명', + `se_datetime` datetime NOT NULL DEFAULT '0000-00-00 00:00:00' COMMENT '등록일시(변경일시)' + ) ENGINE=MyISAM DEFAULT CHARSET=utf8 ", true); +} + +$sql = " select * from rb_seo limit 1"; +$seo = sql_fetch($sql); + +$pg_anchor = ''; + +$g5['title'] = 'SEO 관리'; +include_once (G5_ADMIN_PATH.'/admin.head.php'); +?> + + +
          + + +
          +

          기본설정

          + + +
          + + + + + + + + + + + + + + + + + + + + + + + + + + +
          웹사이트 제목필수 + 웹사이트 이름과 함께 고유한 브랜드메시지를 짧게 입력하는 것도 좋습니다.') ?> + +
          웹사이트 설명 + + +
          키워드 + + +
          파비콘 +
          +

          + 브라우저의 상단 탭과 북마크 영역에서 나타납니다.') ?> +
          + + + + '; + + if (isset($seo['se_favicon'])) { + echo '
          ' . G5_URL . '/data/seo/' . $seo['se_favicon'] . '
          '; + } + } + ?> +
          +
          +
          + + +
          +

          검색엔진

          + + +
          + + + + + + + + + + + + + + + + + + +
          구글 서치 콘솔 + + + 바로가기 +
          네이버 서치 어드바이저 + + + 바로가기 +
          +
          +
          + + +
          +

          오픈그래프

          + + +
          + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
          og:image + 게시판, 상품 등의 페이지는 자동적용 됩니다.') ?> + + 400) { + $width = 400; + } else { + $width = $size[0]; + } + + echo ' '; + $ogimg_str = ''; + } + } + + if (isset($seo['se_og_image'])) { + echo '
          ' . G5_URL . '/data/seo/' . $seo['se_og_image'] . '
          '; + } + + if (!empty($ogimg_str)) { + echo '
          '; + echo $ogimg_str; + echo '
          '; + } + + + ?> +
          og:site_name + 게시판, 상품 등의 페이지는 자동적용 됩니다.') ?> + +
          og:title + 게시판, 상품 등의 페이지는 자동적용 됩니다.') ?> + +
          og:description + 게시판, 상품 등의 페이지는 자동적용 됩니다.') ?> + +
          +
          +
          + + + +
          +

          기타설정

          + + +
          + + + + + + + + + + + + + + + +
          robots.txt + + + '.G5_URL.'/robots.txt'; + } + ?> +
          +
          +
          + +
          + +
          + +
          + + 16) { + alert("이미지 파일만 업로드 할수 있습니다."); + } +} + +// 컬럼이 있는지 검사한다. +$cnt = sql_fetch("SELECT COUNT(*) as cnt FROM rb_seo"); + +if ($cnt['cnt'] > 0) { + $sql = "UPDATE rb_seo + SET se_title = '{$_POST['se_title']}', + se_description = '{$_POST['se_description']}', + se_keywords = '{$_POST['se_keywords']}', + se_google_meta = '{$_POST['se_google_meta']}', + se_naver_meta = '{$_POST['se_naver_meta']}', + se_robots = '{$_POST['se_robots']}', + se_og_site_name = '{$_POST['se_og_site_name']}', + se_og_title = '{$_POST['se_og_title']}', + se_og_description = '{$_POST['se_og_description']}', + se_datetime = '" . G5_TIME_YMDHIS . "'"; + sql_query($sql); +} else { + $sql = "INSERT INTO rb_seo + SET se_title = '{$_POST['se_title']}', + se_description = '{$_POST['se_description']}', + se_keywords = '{$_POST['se_keywords']}', + se_google_meta = '{$_POST['se_google_meta']}', + se_naver_meta = '{$_POST['se_naver_meta']}', + se_robots = '{$_POST['se_robots']}', + se_og_site_name = '{$_POST['se_og_site_name']}', + se_og_title = '{$_POST['se_og_title']}', + se_og_description = '{$_POST['se_og_description']}', + se_datetime = '" . G5_TIME_YMDHIS . "'"; + sql_query($sql); +} + +if ($favimg_name) { + rb_upload_files($favimg, 'favicon', G5_DATA_PATH . "/seo"); +} +if ($ogimg_name) { + rb_upload_files($ogimg, 'og_image', G5_DATA_PATH . "/seo"); +} + +// 파일이 있는지 체크 +$ogimg_in = G5_DATA_PATH . "/seo/og_image"; +if (file_exists($ogimg_in)) { + $sql = "UPDATE rb_seo SET se_og_image = 'og_image'"; + sql_query($sql); +} + +$favimg_in = G5_DATA_PATH . "/seo/favicon"; +if (file_exists($favimg_in)) { + $sql = "UPDATE rb_seo SET se_favicon = 'favicon'"; + sql_query($sql); +} + +// robots.txt 파일 생성 +if (isset($_POST['se_robots'])) { + // textarea에서 입력된 내용을 가져옴 + $robotsContent = $_POST['se_robots']; + + // robots.txt 파일의 경로를 정의함 + $filePath = G5_PATH . '/robots.txt'; + + // 쓰기 모드로 파일을 오픈 + if ($fileHandle = fopen($filePath, 'w')) { + // 파일에 내용을 저장함 + if (fwrite($fileHandle, $robotsContent) === false) { + echo "robots.txt 파일 쓰기에 실패 했습니다."; + } + // 파일 핸들을 닫음 + fclose($fileHandle); + } else { + echo "robots.txt 파일을 쓰기 위해 여는 데 실패했습니다."; + } +} + +update_rewrite_rules(); + +goto_url('./seo_form.php', false); +?> \ No newline at end of file diff --git a/adm/rb/shop/_common.php b/adm/rb/shop/_common.php new file mode 100644 index 000000000..f82b67fd8 --- /dev/null +++ b/adm/rb/shop/_common.php @@ -0,0 +1,10 @@ +'', +'it_skin'=>'', +'it_mobile_skin'=>'', +'it_name'=>'', +'it_basic'=>'', +'it_order'=>0, +'it_type1'=>0, +'it_type2'=>0, +'it_type3'=>0, +'it_type4'=>0, +'it_type5'=>0, +'it_brand'=>'', +'it_model'=>'', +'it_tel_inq'=>0, +'it_use'=>0, +'it_nocoupon'=>0, +'ec_mall_pid'=>'', +'it_mobile_explan'=>'', +'it_sell_email'=>'', +'it_shop_memo'=>'', +'it_info_gubun'=>'', +'it_explan'=>'', +'it_point_type'=>0, +'it_cust_price'=>0, +'it_option_subject'=>'', +'it_price'=>0, +'it_point'=>0, +'it_supply_point'=>0, +'it_soldout'=>0, +'it_stock_sms'=>0, +'it_stock_qty'=>0, +'it_noti_qty'=>0, +'it_buy_min_qty'=>0, +'it_buy_max_qty'=>0, +'it_notax'=>0, +'it_supply_subject'=>'', +'it_sc_type'=>0, +'it_sc_method'=>0, +'it_sc_price'=>0, +'it_sc_minimum'=>0, +'it_sc_qty'=>0, +'it_img1'=>'', +'it_img2'=>'', +'it_img3'=>'', +'it_img4'=>'', +'it_img5'=>'', +'it_img6'=>'', +'it_img7'=>'', +'it_img8'=>'', +'it_img9'=>'', +'it_img10'=>'', +'it_head_html'=>'', +'it_tail_html'=>'', +'it_mobile_head_html'=>'', +'it_mobile_tail_html'=>'', + +//rb +'it_types'=>'0', +'it_date_s'=>'', // 기간 +'it_date_e'=>'', // 기간 +'it_date_n'=>'', // 불가날짜 +'it_date_t'=>'', // 시간목록 +'it_date_j'=>'0', // 중복예약가능여부 +'it_date_g'=>'0', // 구간선택 여부 +'it_user_min'=>'0', // 최소인원 +'it_user_max'=>'0', // 최대인원 +'it_user_min1'=>'0', // 최소 +'it_user_max1'=>'0', // 최대 +'it_user_min2'=>'0', // 최소 +'it_user_max2'=>'0', // 최대 +'it_user_min3'=>'0', // 최소 +'it_user_max3'=>'0', // 최대 +'it_date_min'=>'0', // 최소일 +'it_date_max'=>'0', // 최대일 +'it_user_pri1'=>'0', // 성인 +'it_user_pri2'=>'0', // 아동 +'it_user_pri3'=>'0', // 유아 +'it_user_txt1'=>'', // 성인 +'it_user_txt2'=>'', // 아동 +'it_user_txt3'=>'', // 유아 +'it_user_use1'=>'0', // 성인 +'it_user_use2'=>'0', // 아동 +'it_user_use3'=>'0', // 유아 +'it_not_c'=>'0', +'it_not_d'=>'0', +'it_not_s'=>'0' +); + +for($i=0;$i<=10;$i++){ + $it['it_'.$i.'_subj'] = ''; + $it['it_'.$i] = ''; +} + +if ($w == "") +{ + $html_title .= "입력"; + + // 옵션은 쿠키에 저장된 값을 보여줌. 다음 입력을 위한것임 + //$it[ca_id] = _COOKIE[ck_ca_id]; + $it['ca_id'] = get_cookie("ck_ca_id"); + $it['ca_id2'] = get_cookie("ck_ca_id2"); + $it['ca_id3'] = get_cookie("ck_ca_id3"); + if (!$it['ca_id']) + { + $sql = " select ca_id from {$g5['g5_shop_category_table']} order by ca_order, ca_id limit 1 "; + $row = sql_fetch($sql); + if (! (isset($row['ca_id']) && $row['ca_id'])) + alert("등록된 분류가 없습니다. 우선 분류를 등록하여 주십시오.", '../../shop_admin/categorylist.php'); + $it['ca_id'] = $row['ca_id']; + } + //$it[it_maker] = stripslashes($_COOKIE[ck_maker]); + //$it[it_origin] = stripslashes($_COOKIE[ck_origin]); + $it['it_maker'] = stripslashes(get_cookie("ck_maker")); + $it['it_origin'] = stripslashes(get_cookie("ck_origin")); +} +else if ($w == "u") +{ + $html_title .= "수정"; + + if ($is_admin != 'super') + { + $sql = " select it_id from {$g5['g5_shop_item_table']} a, {$g5['g5_shop_category_table']} b + where a.it_id = '$it_id' + and a.ca_id = b.ca_id + and b.ca_mb_id = '{$member['mb_id']}' "; + $row = sql_fetch($sql); + if (!$row['it_id']) + alert("\'{$member['mb_id']}\' 님께서 수정 할 권한이 없는 상품입니다."); + } + + $it = get_shop_item($it_id); + + if(!$it) + alert('상품정보가 존재하지 않습니다.'); + + if (function_exists('check_case_exist_title')) check_case_exist_title($it, G5_SHOP_DIR, false); + + if (! (isset($ca_id) && $ca_id)) + $ca_id = $it['ca_id']; + + $sql = " select * from {$g5['g5_shop_category_table']} where ca_id = '$ca_id' "; + $ca = sql_fetch($sql); +} +else +{ + alert(); +} + +$qstr = $qstr.'&sca='.$sca.'&page='.$page; + +$g5['title'] = $html_title; +include_once (G5_ADMIN_PATH.'/admin.head.php'); + +// 분류리스트 +$category_select = ''; +$script = ''; +$sql = " select * from {$g5['g5_shop_category_table']} "; +if ($is_admin != 'super') + $sql .= " where ca_mb_id = '{$member['mb_id']}' "; +$sql .= " order by ca_order, ca_id "; +$result = sql_query($sql); +for ($i=0; $row=sql_fetch_array($result); $i++) +{ + $len = strlen($row['ca_id']) / 2 - 1; + + $nbsp = ""; + for ($i=0; $i<$len; $i++) + $nbsp .= "   "; + + $category_select .= "\n"; + + $script .= "ca_use['{$row['ca_id']}'] = {$row['ca_use']};\n"; + $script .= "ca_stock_qty['{$row['ca_id']}'] = {$row['ca_stock_qty']};\n"; + //$script .= "ca_explan_html['$row[ca_id]'] = $row[ca_explan_html];\n"; + $script .= "ca_sell_email['{$row['ca_id']}'] = '{$row['ca_sell_email']}';\n"; +} + +// 재입고알림 설정 필드 추가 +if(!sql_query(" select it_stock_sms from {$g5['g5_shop_item_table']} limit 1 ", false)) { + sql_query(" ALTER TABLE `{$g5['g5_shop_item_table']}` + ADD `it_stock_sms` tinyint(4) NOT NULL DEFAULT '0' AFTER `it_stock_qty` ", true); +} + +// 추가옵션 포인트 설정 필드 추가 +if(!sql_query(" select it_supply_point from {$g5['g5_shop_item_table']} limit 1 ", false)) { + sql_query(" ALTER TABLE `{$g5['g5_shop_item_table']}` + ADD `it_supply_point` int(11) NOT NULL DEFAULT '0' AFTER `it_point_type` ", true); +} + +// 상품메모 필드 추가 +if(!sql_query(" select it_shop_memo from {$g5['g5_shop_item_table']} limit 1 ", false)) { + sql_query(" ALTER TABLE `{$g5['g5_shop_item_table']}` + ADD `it_shop_memo` text NOT NULL AFTER `it_use_avg` ", true); +} + +// 지식쇼핑 PID 필드추가 +// 상품메모 필드 추가 +if(!sql_query(" select ec_mall_pid from {$g5['g5_shop_item_table']} limit 1 ", false)) { + sql_query(" ALTER TABLE `{$g5['g5_shop_item_table']}` + ADD `ec_mall_pid` varchar(255) NOT NULL AFTER `it_shop_memo` ", true); +} + +$pg_anchor =' +'; + + +// 쿠폰적용안함 설정 필드 추가 +if(!sql_query(" select it_nocoupon from {$g5['g5_shop_item_table']} limit 1", false)) { + sql_query(" ALTER TABLE `{$g5['g5_shop_item_table']}` + ADD `it_nocoupon` tinyint(4) NOT NULL DEFAULT '0' AFTER `it_use` ", true); +} + +// 스킨필드 추가 +if(!sql_query(" select it_skin from {$g5['g5_shop_item_table']} limit 1", false)) { + sql_query(" ALTER TABLE `{$g5['g5_shop_item_table']}` + ADD `it_skin` varchar(255) NOT NULL DEFAULT '' AFTER `ca_id3`, + ADD `it_mobile_skin` varchar(255) NOT NULL DEFAULT '' AFTER `it_skin` ", true); +} + +include_once(G5_PLUGIN_PATH.'/jquery-ui/datepicker.php'); +?> + +
          + + + + + + + + + +
          +

          상품분류

          + +
          +

          기본분류는 반드시 선택하셔야 합니다. 하나의 상품에 최대 3개의 다른 분류를 지정할 수 있습니다.

          +
          + +
          + + + + + + + + + + + + + + + + + + +
          상품분류 입력
          + + + +
          + + +
          +
          +
          + +
          +

          추가인원

          + +
          +

          연간회원권 상품의 추가인원 설정을 하실 수 있습니다.

          +
          + +
          + + + > + + + + + + + + + + + + + + + + + + + + + + + + +
          추가인원
          + 사용자가 추가 인원을 선택하는 경우 추가사용자 정보를 입력합니다."); ?> + +
          + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
          구분옵션
          항목명
          수량 1당 추가금액
          1회 최소선택 수량 + +
          1회 최대선택 수량 + +
          사용여부>
          +
          +
          +
          +
          + + + +
          +

          스킨설정

          + +
          +

          상품상세보기에서 사용할 스킨을 설정합니다.

          +
          + +
          + + + + + + + + + + + + + + + +
          스킨설정
          + + + + + + +
          + + + + + + +
          +
          +
          + + +
          +

          기본정보

          + +
          + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
          기본정보 입력
          상품코드 + + 직접 상품코드를 입력할 수도 있습니다.\n상품코드는 영문자, 숫자, - 만 입력 가능합니다."); ?> + + + + + 상품확인 + 사용후기 + 상품문의 + +
          + + " id="it_name" required class="frm_input required" size="95"> +
          + + + + + + + +
          + 입력하지 않으면 자동으로 출력됩니다."); ?> + + + + + + +
          상품유형 + + id="it_type1"> + + id="it_type2"> + + id="it_type3"> + + id="it_type4"> + + id="it_type5"> + + + + + + +
          + + + + + + + +
          + + + + + + + +
          + + + + + + + +
          + + + + + + + +
          + + > 예 + + + + + +
          + + > 예 + + + + + +
          + + > 예 + + + + + +
          + 일부 쇼핑몰의 경우 네이버쇼핑 상품ID 대신 쇼핑몰 상품ID를 입력해야 하는 경우가 있습니다.
          네이버페이 연동과정에서 이 부분에 대한 안내가 이뤄지니 안내받은 대로 값을 입력하시면 됩니다."); ?> + +
          상품설명
          모바일 상품설명
          + + + + + + + +
          + + + + +
          +
          +
          + + +
          +

          상품요약정보

          + +
          +

          전자상거래 등에서의 상품 등의 정보제공에 관한 고시에 따라 총 35개 상품군에 대해 상품 특성 등을 양식에 따라 입력할 수 있습니다.

          +
          + +
          + + +
          +
          +
          + + + + +
          +

          가격 및 재고

          + + +
          + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
          가격 및 재고 입력
          + 원 + + + + + +
          + + 원 + + + + + +
          + + + + + + + + +
          + + + + + + + +
          + + 점 + + + + + +
          + + > 예 + + + + + +
          + + > 예 +
          + 주문관리에서 상품별 상태 변경에 따라 자동으로 재고를 가감합니다. 재고는 규격/색상별이 아닌, 상품별로만 관리됩니다.
          재고수량을 0으로 설정하시면 품절상품으로 표시됩니다."); ?> + 개 +
          + + + + +
          + 옵션이 있는 상품은 개별 옵션의 통보수량이 적용됩니다."); ?> + 개 + + + + + +
          + + 개 + + + + + +
          + + 개 + + + + + +
          + + + + + + + +
          상품선택옵션 +
          + 옵션명과 옵션항목에 따옴표(\', ")는 입력할 수 없습니다.'); ?> + + + + + + + + + + + + + + + + + + + + +
          상품선택옵션 입력
          + + + + + +
          + + + + + +
          + + + + + +
          +
          + +
          +
          +
          + + +
          +
          +
          + + +
          +

          배송비

          + +
          +

          쇼핑몰설정 > 배송비유형 설정보다 개별상품 배송비설정이 우선 적용됩니다.

          +
          + +
          + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
          배송비 입력
          + + + + + + + +
          + +
          + + 원 +
          + 주문금액 이상 무료 배송 +
          + + 주문수량 마다 배송비 부과 +
          +
          + + +
          + + +
          +

          이미지

          + + +
          + + + + + + + + + + + + + + +
          이미지 업로드
          + + ', $it, $i); + ?> + + + + + + +
          +
          +
          + + +
          +

          관련상품

          + + +
          +

          + 등록된 전체상품 목록에서 상품분류를 선택하면 해당 상품 리스트가 연이어 나타납니다.
          + 상품리스트에서 관련 상품으로 추가하시면 선택된 관련상품 목록에 함께 추가됩니다.
          + 예를 들어, A 상품에 B 상품을 관련상품으로 등록하면 B 상품에도 A 상품이 관련상품으로 자동 추가되며, 확인 버튼을 누르셔야 정상 반영됩니다. +

          +
          + +
          +
          +

          등록된 전체상품 목록

          + + + + + + + +
          +

          상품의 분류를 선택하시거나 상품명을 입력하신 후 검색하여 주십시오.

          +
          + +
          + +
          +

          선택된 관련상품 목록

          + +
          + '; + ?> +
        • + +
          +
          +
        • + 0) + echo ''; + else + echo '

          선택된 상품이 없습니다.

          '; + ?> +
          + +
          + +
          + +
          + + +
          +

          관련이벤트

          + + +
          +
          +

          등록된 전체이벤트 목록

          +
          + '; + ?> +
        • + +
          +
          +
        • + 0) + echo ''; + else + echo '

          등록된 이벤트가 없습니다.

          '; + ?> +
          + +
          + +
          +

          선택된 관련이벤트 목록

          +
          + '; + ?> +
        • + +
          +
          +
        • + 0) + echo ''; + else + echo '

          선택된 이벤트가 없습니다.

          '; + ?> +
          + +
          +
          + +
          + + +
          +

          상세설명설정

          + + +
          + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
          상세설명설정
          상품상단내용 + + + + +
          상품하단내용 + + + + +
          모바일 상품상단내용 + + + + +
          모바일 상품하단내용 + + + + +
          +
          +
          + + +
          +

          여분필드 설정

          + + +
          + + + + + + + + + + + + + + + + + + + + + + + + + +
          여분필드 + + + + + + + + + +
          입력일시 + + +
          수정일시 + + +
          +
          +
          + + +
          + + + + + 99)) + alert("포인트 비율을 0과 99 사이의 값으로 입력해 주십시오."); + +// 관련상품을 우선 삭제함 +sql_query(" delete from {$g5['g5_shop_item_relation_table']} where it_id = '$it_id' "); + +// 관련상품의 반대도 삭제 +sql_query(" delete from {$g5['g5_shop_item_relation_table']} where it_id2 = '$it_id' "); + +// 이벤트상품을 우선 삭제함 +sql_query(" delete from {$g5['g5_shop_event_item_table']} where it_id = '$it_id' "); + +// 선택옵션 +sql_query(" delete from {$g5['g5_shop_item_option_table']} where io_type = '0' and it_id = '$it_id' "); // 기존선택옵션삭제 + +$option_count = (isset($_POST['opt_id']) && is_array($_POST['opt_id'])) ? count($_POST['opt_id']) : array(); +$it_option_subject = ''; +$it_supply_subject = ''; + +if($option_count) { + // 옵션명 + $opt1_cnt = $opt2_cnt = $opt3_cnt = 0; + for($i=0; $i<$option_count; $i++) { + $post_opt_id = isset($_POST['opt_id'][$i]) ? preg_replace(G5_OPTION_ID_FILTER, '', strip_tags($_POST['opt_id'][$i])) : ''; + + $opt_val = explode(chr(30), $post_opt_id); + if(isset($opt_val[0]) && $opt_val[0]) + $opt1_cnt++; + if(isset($opt_val[1]) && $opt_val[1]) + $opt2_cnt++; + if(isset($opt_val[2]) && $opt_val[2]) + $opt3_cnt++; + } + + if($opt1_subject && $opt1_cnt) { + $it_option_subject = $opt1_subject; + if($opt2_subject && $opt2_cnt) + $it_option_subject .= ','.$opt2_subject; + if($opt3_subject && $opt3_cnt) + $it_option_subject .= ','.$opt3_subject; + } +} + +// 추가옵션 +sql_query(" delete from {$g5['g5_shop_item_option_table']} where io_type = '1' and it_id = '$it_id' "); // 기존추가옵션삭제 + +$supply_count = (isset($_POST['spl_id']) && is_array($_POST['spl_id'])) ? count($_POST['spl_id']) : array(); +if($supply_count) { + // 추가옵션명 + $arr_spl = array(); + for($i=0; $i<$supply_count; $i++) { + $post_spl_id = isset($_POST['spl_id'][$i]) ? preg_replace(G5_OPTION_ID_FILTER, '', strip_tags($_POST['spl_id'][$i])) : ''; + + $spl_val = explode(chr(30), $post_spl_id); + if(!in_array($spl_val[0], $arr_spl)) + $arr_spl[] = $spl_val[0]; + } + + $it_supply_subject = implode(',', $arr_spl); +} + +// 상품요약정보 +$value_array = array(); +$count_ii_article = (isset($_POST['ii_article']) && is_array($_POST['ii_article'])) ? count($_POST['ii_article']) : 0; +for($i=0; $i<$count_ii_article; $i++) { + $key = isset($_POST['ii_article'][$i]) ? html_purifier($_POST['ii_article'][$i]) : ''; + $val = isset($_POST['ii_value'][$i]) ? html_purifier($_POST['ii_value'][$i]) : ''; + $value_array[$key] = $val; +} +$it_info_value = addslashes(serialize($value_array)); + +$it_name = isset($_POST['it_name']) ? strip_tags(clean_xss_attributes(trim($_POST['it_name']))) : ''; + +// KVE-2019-0708 +$check_sanitize_keys = array( +'it_order', // 출력순서 +'it_maker', // 제조사 +'it_origin', // 원산지 +'it_brand', // 브랜드 +'it_model', // 모델 +'it_tel_inq', // 전화문의 +'it_use', // 판매가능 +'it_nocoupon', // 쿠폰적용안함 +'ec_mall_pid', // 네이버쇼핑 상품ID +'it_sell_email', // 판매자 e-mail +'it_price', // 판매가격 +'it_cust_price', // 시중가격 +'it_point_type', // 포인트 유형 +'it_point', // 포인트 +'it_supply_point', // 추가옵션상품 포인트 +'it_soldout', // 상품품절 +'it_stock_sms', // 재입고SMS 알림 +'it_stock_qty', // 재고수량 +'it_noti_qty', // 재고 통보수량 +'it_buy_min_qty', // 최소구매수량 +'it_notax', // 상품과세 유형 +'it_sc_type', // 배송비 유형 +'it_sc_method', // 배송비 결제 +'it_sc_price', // 기본배송비 +'it_sc_minimum', // 배송비 상세조건 +'it_type1', // 상품유형(히트) +'it_type2', // 상품유형(추천) +'it_type3', // 상품유형(신상품) +'it_type4', // 상품유형(인기) +'it_type5', // 상품유형(할인) +'it_types', // 상품타입 +'it_date_s', // 기간 +'it_date_e', // 기간 +'it_date_n', // 불가날짜 +'it_date_t', // 시간목록 +'it_date_j', // 중복예약가능여부 +'it_date_g', // 구간선택 여부 +'it_user_min', // 최소인원 +'it_user_max', // 최대인원 +'it_date_min', // 최소일 +'it_date_max', // 최대일 +'it_user_pri1', // 성인 +'it_user_pri2', // 아동 +'it_user_pri3', // 유아 +'it_user_txt1', // 성인 +'it_user_txt2', // 아동 +'it_user_txt3', // 유아 +'it_user_use1', // 성인 +'it_user_use2', // 아동 +'it_user_use3', // 유아 +'it_not_c', // 마감조건 +'it_not_d', // 마감조건 +'it_not_s', // 마감조건 +); + +foreach( $check_sanitize_keys as $key ){ + $$key = isset($_POST[$key]) ? strip_tags(clean_xss_attributes($_POST[$key])) : ''; +} + +$it_basic = preg_replace('#(.*?)<\/script>#is', '', $it_basic); +$it_explan = isset($_POST['it_explan']) ? $_POST['it_explan'] : ''; + +if ($it_name == "") + alert("상품명을 입력해 주십시오."); + +$sql_common = " ca_id = '$ca_id', + ca_id2 = '$ca_id2', + ca_id3 = '$ca_id3', + it_skin = '$it_skin', + it_mobile_skin = '$it_mobile_skin', + it_name = '$it_name', + it_maker = '$it_maker', + it_origin = '$it_origin', + it_brand = '$it_brand', + it_model = '$it_model', + it_option_subject = '$it_option_subject', + it_supply_subject = '$it_supply_subject', + it_types = '$it_types', + it_type1 = '$it_type1', + it_type2 = '$it_type2', + it_type3 = '$it_type3', + it_type4 = '$it_type4', + it_type5 = '$it_type5', + it_date_s = '$it_date_s', + it_date_e = '$it_date_e', + it_date_n = '$it_date_n', + it_date_t = '$it_date_t', + it_date_j = '$it_date_j', + it_date_g = '$it_date_g', + it_user_min = '$it_user_min', + it_user_max = '$it_user_max', + it_user_min1 = '$it_user_min1', + it_user_max1 = '$it_user_max1', + it_user_min2 = '$it_user_min2', + it_user_max2 = '$it_user_max2', + it_user_min3 = '$it_user_min3', + it_user_max3 = '$it_user_max3', + it_date_min = '$it_date_min', + it_date_max = '$it_date_max', + it_user_pri1 = '$it_user_pri1', + it_user_pri2 = '$it_user_pri2', + it_user_pri3 = '$it_user_pri3', + it_user_txt1 = '$it_user_txt1', + it_user_txt2 = '$it_user_txt2', + it_user_txt3 = '$it_user_txt3', + it_user_use1 = '$it_user_use1', + it_user_use2 = '$it_user_use2', + it_user_use3 = '$it_user_use3', + it_not_c = '$it_not_c', + it_not_d = '$it_not_d', + it_not_s = '$it_not_s', + it_basic = '$it_basic', + it_explan = '$it_explan', + it_explan2 = '".strip_tags(trim(clean_xss_attributes($it_explan)))."', + it_mobile_explan = '$it_mobile_explan', + it_cust_price = '$it_cust_price', + it_price = '$it_price', + it_point = '$it_point', + it_point_type = '$it_point_type', + it_supply_point = '$it_supply_point', + it_notax = '$it_notax', + it_sell_email = '$it_sell_email', + it_use = '$it_use', + it_nocoupon = '$it_nocoupon', + it_soldout = '$it_soldout', + it_stock_qty = '$it_stock_qty', + it_stock_sms = '$it_stock_sms', + it_noti_qty = '$it_noti_qty', + it_sc_type = '$it_sc_type', + it_sc_method = '$it_sc_method', + it_sc_price = '$it_sc_price', + it_sc_minimum = '$it_sc_minimum', + it_sc_qty = '$it_sc_qty', + it_buy_min_qty = '$it_buy_min_qty', + it_buy_max_qty = '$it_buy_max_qty', + it_head_html = '$it_head_html', + it_tail_html = '$it_tail_html', + it_mobile_head_html = '$it_mobile_head_html', + it_mobile_tail_html = '$it_mobile_tail_html', + it_ip = '{$_SERVER['REMOTE_ADDR']}', + it_order = '$it_order', + it_tel_inq = '$it_tel_inq', + it_info_gubun = '$it_info_gubun', + it_info_value = '$it_info_value', + it_shop_memo = '$it_shop_memo', + ec_mall_pid = '$ec_mall_pid', + it_img1 = '$it_img1', + it_img2 = '$it_img2', + it_img3 = '$it_img3', + it_img4 = '$it_img4', + it_img5 = '$it_img5', + it_img6 = '$it_img6', + it_img7 = '$it_img7', + it_img8 = '$it_img8', + it_img9 = '$it_img9', + it_img10 = '$it_img10', + it_1_subj = '$it_1_subj', + it_2_subj = '$it_2_subj', + it_3_subj = '$it_3_subj', + it_4_subj = '$it_4_subj', + it_5_subj = '$it_5_subj', + it_6_subj = '$it_6_subj', + it_7_subj = '$it_7_subj', + it_8_subj = '$it_8_subj', + it_9_subj = '$it_9_subj', + it_10_subj = '$it_10_subj', + it_1 = '$it_1', + it_2 = '$it_2', + it_3 = '$it_3', + it_4 = '$it_4', + it_5 = '$it_5', + it_6 = '$it_6', + it_7 = '$it_7', + it_8 = '$it_8', + it_9 = '$it_9', + it_10 = '$it_10' + "; + + +if ($w == "") +{ + $it_id = isset($_POST['it_id']) ? $_POST['it_id'] : ''; + + if (!trim($it_id)) { + alert('상품 코드가 없으므로 상품을 추가하실 수 없습니다.'); + } + + $t_it_id = preg_replace("/[A-Za-z0-9\-_]/", "", $it_id); + if($t_it_id) + alert('상품 코드는 영문자, 숫자, -, _ 만 사용할 수 있습니다.'); + + $sql_common .= " , it_time = '".G5_TIME_YMDHIS."' "; + $sql_common .= " , it_update_time = '".G5_TIME_YMDHIS."' "; + $sql = " insert {$g5['g5_shop_item_table']} + set it_id = '$it_id', + $sql_common "; + sql_query($sql); +} +else if ($w == "u") +{ + $sql_common .= " , it_update_time = '".G5_TIME_YMDHIS."' "; + $sql = " update {$g5['g5_shop_item_table']} + set $sql_common + where it_id = '$it_id' "; + sql_query($sql); +} +/* +else if ($w == "d") +{ + if ($is_admin != 'super') + { + $sql = " select it_id from {$g5['g5_shop_item_table']} a, {$g5['g5_shop_category_table']} b + where a.it_id = '$it_id' + and a.ca_id = b.ca_id + and b.ca_mb_id = '{$member['mb_id']}' "; + $row = sql_fetch($sql); + if (!$row['it_id']) + alert("\'{$member['mb_id']}\' 님께서 삭제 할 권한이 없는 상품입니다."); + } + + itemdelete($it_id); +} +*/ + +if ($w == "" || $w == "u") +{ + // 관련상품 등록 + $it_id2 = explode(",", $it_list); + for ($i=0; $i"; +?> + diff --git a/adm/rb/shop/orderform.php b/adm/rb/shop/orderform.php new file mode 100644 index 000000000..eeb4cc752 --- /dev/null +++ b/adm/rb/shop/orderform.php @@ -0,0 +1,1329 @@ + +
        • 주문상품 목록
        • +
        • 주문결제 내역
        • +
        • 결제상세정보 확인
        • +
        • 결제상세정보 수정
        • +
        • 상점메모
        • +
        • 주문자
        • +
        • 사용자(수령자)
        • +'; + +$html_receipt_chk = ' +
          '; + +$qstr1 = "od_status=".urlencode($od_status)."&od_settle_case=".urlencode($od_settle_case)."&od_misu=$od_misu&od_cancel_price=$od_cancel_price&od_refund_price=$od_refund_price&od_receipt_point=$od_receipt_point&od_coupon=$od_coupon&fr_date=$fr_date&to_date=$to_date&sel_field=$sel_field&search=$search&save_search=$search"; +if($default['de_escrow_use']) + $qstr1 .= "&od_escrow=$od_escrow"; +$qstr = "$qstr1&sort1=$sort1&sort2=$sort2&page=$page"; + +// 상품목록 +$sql = " select it_id, + it_name, + cp_price, + ct_notax, + ct_send_cost, + it_sc_type + from {$g5['g5_shop_cart_table']} + where od_id = '{$od['od_id']}' + group by it_id + order by ct_id "; +$result = sql_query($sql); + +// 주소 참고항목 필드추가 +if(!isset($od['od_addr3'])) { + sql_query(" ALTER TABLE `{$g5['g5_shop_order_table']}` + ADD `od_addr3` varchar(255) NOT NULL DEFAULT '' AFTER `od_addr2`, + ADD `od_b_addr3` varchar(255) NOT NULL DEFAULT '' AFTER `od_b_addr2` ", true); +} + +// 배송목록에 참고항목 필드추가 +if(!sql_query(" select ad_addr3 from {$g5['g5_shop_order_address_table']} limit 1", false)) { + sql_query(" ALTER TABLE `{$g5['g5_shop_order_address_table']}` + ADD `ad_addr3` varchar(255) NOT NULL DEFAULT '' AFTER `ad_addr2` ", true); +} + +// 결제 PG 필드 추가 +if(!sql_query(" select od_pg from {$g5['g5_shop_order_table']} limit 1 ", false)) { + sql_query(" ALTER TABLE `{$g5['g5_shop_order_table']}` + ADD `od_pg` varchar(255) NOT NULL DEFAULT '' AFTER `od_mobile`, + ADD `od_casseqno` varchar(255) NOT NULL DEFAULT '' AFTER `od_escrow` ", true); + + // 주문 결제 PG kcp로 설정 + sql_query(" update {$g5['g5_shop_order_table']} set od_pg = 'kcp' "); +} + +// LG 현금영수증 JS +if($od['od_pg'] == 'lg') { + if($default['de_card_test']) { + echo ''.PHP_EOL; + } else { + echo ''.PHP_EOL; + } +} + +$print_od_deposit_name = $od['od_deposit_name']; +// nicepay 로 주문하고 가상계좌인 경우 +if ($od['od_pg'] === 'nicepay' && $od['od_settle_case'] === '가상계좌' && $od['od_deposit_name']){ + $print_od_deposit_name .= '_NICE'; +} + +// add_javascript('js 구문', 출력순서); 숫자가 작을 수록 먼저 출력됨 +add_javascript(G5_POSTCODE_JS, 0); //다음 주소 js +?> + +
          +

          주문상품 목록

          + +
          +

          + 현재 주문상태 + | + 주문일시 () + | + 주문총액 원 +

          +

          희망배송일은 () 입니다.

          + +

          모바일 쇼핑몰의 주문입니다.

          + +
          + +
          + + + + + + + + + + +
          + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
          주문 상품 목록
          상품명 + + + 옵션항목상태수량판매가소계쿠폰포인트배송비포인트반영재고반영운송장번호배송사배송일시
          + + + + + + + + + + + + + + + +
          + + + 예약 (일) + + 예약 ~ (일) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
          항목금액수량합계
          +
          + +
          + + + + + + + + " class="frm_input" maxlength="19" style="width:60%;"> + " onclick="chk_invoice_time_()"> + + + +
          +
          + +
          +

          + + 주문 및 장바구니 상태 변경 + + + + + + + + +

          +
          + +
          +

          예약건은 [준비] 또는 [배송] 단계를 제외 하셔도 됩니다.

          +

          주문, 입금, 준비, 배송, 완료는 장바구니와 주문서 상태를 모두 변경하지만, 취소, 반품, 품절은 장바구니의 상태만 변경하며, 주문서 상태는 변경하지 않습니다.

          +

          개별적인(이곳에서의) 상태 변경은 모든 작업을 수동으로 처리합니다. 예를 들어 주문에서 입금으로 상태 변경시 입금액(결제금액)을 포함한 모든 정보는 수동 입력으로 처리하셔야 합니다.

          +
          + +
          + + +
          +

          주문 수량변경 및 주문 전체취소 처리 내역

          +
          + +
          +
          + + +
          + + +
          주의) 이 주문은 테스트용으로 실제 결제가 이루어지지 않았으므로 절대 배송하시면 안됩니다.
          + + +
          주의) 이 주문은 결제취소된 내역이 있습니다. 이니시스 관리자 상점에서 반드시 재확인을 해 주세요.
          + + +
          +

          주문결제 내역

          + + + 0) + $s_receipt_way .= "+포인트"; + ?> + +
          + 미수금 + + + + + + + + + + + + + + + + + + + + + + + + + + + +
          주문결제 내역
          주문번호결제방법주문총액배송비포인트결제총결제액쿠폰주문취소
          +
          +
          + +
          +

          결제상세정보

          + + +
          + + + + + + + + + + + + +
          + +
          +

          결제상세정보 확인

          + +
          + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
          결제상세정보
          계좌번호
          입금액
          입금자
          입금확인일시 + 입금 확인일시를 체크해 주세요. + () + +
          휴대폰번호
          결제액
          결제 확인일시 + 결제 확인일시를 체크해 주세요. + () + +
          신용카드 결제금액 + 0원 + + +
          카드 승인일시 + 신용카드 결제 일시 정보가 없습니다. + + +
          KAKOPAY 결제금액 + 0원 + + +
          KAKAOPAY 승인일시 + 신용카드 결제 일시 정보가 없습니다. + + +
          결제금액 + 0원 + + +
          승인일시 + 결제 일시 정보가 없습니다. + + +
          결제대행사 링크 + {$pg_test}바로가기
          "; + } + //------------------------------------------------------------------------------ + ?> +
          과세공급가액
          과세부가세액
          비과세공급가액
          주문금액할인
          포인트
          결제취소/환불액
          배송회사
          운송장번호
          배송일시
          + 원 +
          배송비할인
          + 원 +
          현금영수증 + + 현금영수증 확인 + + 현금영수증 발급 + +
          +
          +
          + +
          +

          결제상세정보 수정

          + +
          + + + + + + + + + '.PHP_EOL; + $bank_account .= ''.PHP_EOL; + for ($i=0; $i'.$str[$i].''.PHP_EOL; + } + $bank_account .= ' '; + } + else if ($od['od_settle_case'] == '가상계좌') + $bank_account = $od['od_bank_account'].''; + else if ($od['od_settle_case'] == '계좌이체') + $bank_account = $od['od_settle_case']; + ?> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
          결제상세정보 수정
          + + 원 +
          + + + +
          + + +
          + " onclick="if (this.checked == true) this.form.od_receipt_time.value=this.form.od_bank_chk.value; else this.form.od_receipt_time.value = this.form.od_receipt_time.defaultValue;"> +
          + " id="od_receipt_time" class="frm_input" maxlength="19"> +
          휴대폰번호
          + + 원 +
          + " onclick="if (this.checked == true) this.form.od_receipt_time.value=this.form.od_hp_chk.value; else this.form.od_receipt_time.value = this.form.od_receipt_time.defaultValue;"> +
          + " id="op_receipt_time" class="frm_input" size="19" maxlength="19"> +
          + + 원 +
          + " onclick="if (this.checked == true) this.form.od_receipt_time.value=this.form.od_card_chk.value; else this.form.od_receipt_time.value = this.form.od_receipt_time.defaultValue;"> +
          + " id="od_receipt_time" class="frm_input" size="19" maxlength="19"> +
          + + 원 +
          + " onclick="if (this.checked == true) this.form.od_receipt_time.value=this.form.od_card_chk.value; else this.form.od_receipt_time.value = this.form.od_receipt_time.defaultValue;"> +
          + " id="od_receipt_time" class="frm_input" size="19" maxlength="19"> +
          + + 원 +
          + " onclick="if (this.checked == true) this.form.od_receipt_time.value=this.form.od_card_chk.value; else this.form.od_receipt_time.value = this.form.od_receipt_time.defaultValue;"> +
          + " id="od_receipt_time" class="frm_input" size="19" maxlength="19"> +
          + 원 +
          + + + +
          + + +
          + +
          + +
          + " onclick="chk_invoice_time()"> +
          + " class="frm_input" maxlength="19"> +
          + + 메일발송 +
          +
          +
          + +
          + +
          + + 0) { ?> + 개인결제추가 + + 0 && ($od['od_settle_case'] == '신용카드' || $od['od_settle_case'] == '계좌이체' || $od['od_settle_case'] == 'KAKAOPAY')) { ?> + 부분취소 + + 목록 +
          +
          +
          + +
          +

          상점메모

          + +
          +

          + 현재 열람 중인 주문에 대한 내용을 메모하는곳입니다.
          + 입금, 배송 내역을 메일로 발송할 경우 함께 기록됩니다. +

          +
          + +
          + + + + + + + + +
          + + +
          + +
          + +
          + +
          +
          + +
          +

          주문자/배송지 정보

          + + +
          + + + + + + + + +
          + +
          +

          주문자

          + +
          + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
          주문자/배송지 정보
          주문자 주소 + + +
          + + +
          + + +
          + + +
          +
          주문자 IP Address
          +
          +
          + +
          +

          사용자(수령자)

          + +
          + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
          사용자(수령자) 정보
          사용자(수령자) 주소 + + +
          + + + + + + +
          +
          + () +
          전달 메세지
          +
          +
          + +
          + +
          + + 목록 +
          + +
          +
          + + + + 태그로 반환 + * + * @param string $path 폴더 경로 + * @param string $select_name 셀렉트 태그의 name 속성 + * @param string $select_id 셀렉트 태그의 id 속성 + * @param string|null $selected_folder 기본 선택된 폴더명 + * @return string \n"; + + // 디렉토리 확인 + if (is_dir($path)) { + $folders = scandir($path); + + foreach ($folders as $folder) { + // '.'와 '..' 제외, 폴더인지 확인 + if ($folder !== '.' && $folder !== '..' && is_dir($path . '/' . $folder)) { + $folder_escaped = htmlspecialchars($folder, ENT_QUOTES, 'UTF-8'); + $selected = ($folder === $selected_folder) ? ' selected' : ''; + $select_html .= "\n"; + } + } + } else { + $select_html .= "\n"; + } + + $select_html .= "\n"; + return $select_html; +} diff --git a/extend/rb_core.extend.php b/extend/rb_core.extend.php new file mode 100644 index 000000000..464c40735 --- /dev/null +++ b/extend/rb_core.extend.php @@ -0,0 +1,1251 @@ +', -2); + $sh = ''.PHP_EOL; + $sh .= ''; + add_javascript($sh, 0); +} +function prism_tail_sub(){ + global $wr_id; + if($_SERVER['SCRIPT_NAME'] != '/bbs/board.php' || !$wr_id) return; + prism_script(); +} +function PrismJS($m) { + $str = isset($m[3]) ? $m[3] : ''; + if(!$str) + return; + $str = stripslashes($str); + $str = preg_replace("/(
          |
          ||

          )/i", "\n", $str); + $str = preg_replace("/(

          |<\/div>|<\/p>)/i", "", $str); + $str = str_replace(" ", " ", $str); + $str = str_replace("/
          '.$str.'
          '.PHP_EOL; +} +function prism_html_purifier_result($str){ + $content = preg_replace_callback("/(\[code\]|\[code=(.*)\])(.*)\[\/code\]/iUs", "PrismJS", $str); // PrismJS + return $content; +} + +// 문자 발송 함수 @SIR 플래토님 코드사용 출처 : https://sir.kr/g5_tip/8262 +function smsSend($sHp, $rHp, $msg) { + global $g5, $config; + $rtn = ""; + try { + $send_hp = str_replace("-","",$sHp); // - 제거 + $recv_hp = str_replace("-","",$rHp); // - 제거 + $SMS = new SMS; // SMS 객체 생성 + $SMS->SMS_con($config['cf_icode_server_ip'], $config['cf_icode_id'], $config['cf_icode_pw'], $config['cf_icode_server_port']); + $SMS->Add($recv_hp, $send_hp, $config['cf_icode_id'], iconv("utf-8", "euc-kr", stripslashes($msg)), ""); + $SMS->Send(); + $rtn = true; + } + catch(Exception $e) { + alert("처리중 문제가 발생했습니다.".$e->getMessage()); + $rtn = false; + } + return $rtn; +} + +// 새글에 NEW 아이콘 +function get_new_ico($bo_table, $ca_name) { + + global $g5; + + + $new_icon = ''; + $bbs = sql_fetch("select * from {$g5['board_table']} where bo_table = '{$bo_table}'"); + + + if($bbs && isset($bbs['bo_table'])) { + $write_table = $g5['write_prefix'].$bbs['bo_table']; + if(isset($ca_name) && !empty($ca_name)) { + $time = sql_fetch("select * from {$write_table} where wr_is_comment = 0 and ca_name = '{$ca_name}' order by wr_id desc limit 1"); + } else { + $time = sql_fetch("select * from {$write_table} where wr_is_comment = 0 order by wr_id desc limit 1"); + } + } + + + if (isset($bbs['bo_new']) && isset($time['wr_datetime']) && $time['wr_datetime'] >= date("Y-m-d H:i:s", G5_SERVER_TIME - ($bbs['bo_new'] * 3600))) { + $new_icon = 'n'; + } + + + return $new_icon; +} + + +// 전체 URL (SEO) +function getCurrentUrl() { + $protocol = (!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off' || $_SERVER['SERVER_PORT'] == 443) ? "https://" : "http://"; + $host = $_SERVER['HTTP_HOST']; + $requestUri = $_SERVER['REQUEST_URI']; + + return $protocol . $host . $requestUri; +} + + +// 안읽은 쪽지 +if ($is_member) { + if( isset($member['mb_memo_cnt']) ){ + $memo_not_read = $member['mb_memo_cnt']; + } else { + $memo_not_read = get_memo_not_read($member['mb_id']); + } +} + +// 날자계산 +function passing_time($datetime) { + $time_lag = time() - strtotime($datetime); + + if($time_lag < 60) { + $posting_time = "방금"; + } else if($time_lag >= 60 and $time_lag < 3600) { + $posting_time = floor($time_lag/60)."분 전"; + } else if($time_lag >= 3600 and $time_lag < 86400) { + $posting_time = floor($time_lag/3600)."시간 전"; + } else if($time_lag >= 86400 and $time_lag < 2419200) { + $posting_time = floor($time_lag/86400)."일 전"; + } else { + $posting_time = date("Y.m.d", strtotime($datetime)); + } + + return $posting_time; +} + +// 날자계산2 +function passing_time2($datetime) { + $time_lag = time() - strtotime($datetime); + + if($time_lag < 60) { + $posting_time = "방금
          ".date("Y.m.d", strtotime($datetime)); + } else if($time_lag >= 60 and $time_lag < 3600) { + $posting_time = floor($time_lag/60)."분 전
          ".date("Y.m.d", strtotime($datetime)); + } else if($time_lag >= 3600 and $time_lag < 86400) { + $posting_time = floor($time_lag/3600)."시간 전
          ".date("Y.m.d", strtotime($datetime)); + } else if($time_lag >= 86400 and $time_lag < 2419200) { + $posting_time = floor($time_lag/86400)."일 전
          ".date("Y.m.d", strtotime($datetime)); + } else { + $posting_time = "오래 전
          ".date("Y.m.d", strtotime($datetime)); + } + + return $posting_time; +} + +// 날자계산3 +function passing_time3($datetime) { + $time_lag = time() - strtotime($datetime); + + if($time_lag < 60) { + $posting_time = "방금"; + } else if($time_lag >= 60 and $time_lag < 3600) { + $posting_time = floor($time_lag/60)."분 전"; + } else if($time_lag >= 3600 and $time_lag < 86400) { + $posting_time = floor($time_lag/3600)."시간 전"; + } else if($time_lag >= 86400 and $time_lag < 2419200) { + $posting_time = floor($time_lag/86400)."일 전"; + } else { + $posting_time = "오래 전"; + } + + return $posting_time; +} + +// 회원 게시물 갯수 +function wr_cnt($mb_id, $type){ + global $g5; + + $wr_sum = 0; + $sql = sql_query(" select bo_table from {$g5['board_table']} "); + + while($row = sql_fetch_array($sql)) { + + $write_table = $g5['write_prefix'] . $row['bo_table']; + + if($type == "w") { + $sql2 = " select count(*) as cnt from {$write_table} where mb_id = '{$mb_id}' and wr_is_comment = 0 "; + } else if ($type == "c") { + $sql2 = " select count(*) as cnt from {$write_table} where mb_id = '{$mb_id}' and wr_is_comment = 1 "; + } + $wr = sql_fetch($sql2); + $wr_sum += $wr['cnt']; + } + + return $wr_sum; +} + + +// 생성된 게시판 목록조회 +function rb_board_list($bo_tables) { + global $g5; + + $str = ""; // 초기화 + + $sql = " select bo_table, bo_subject from {$g5['board_table']} group by bo_table order by bo_table asc"; + $result = sql_query($sql); + + for ($i=0; $row=sql_fetch_array($result); $i++) + { + if($bo_tables == $row['bo_table']) { + $str .= "