Compare commits

...
64 Commits
Author SHA1 Message Date
thisgun 2ede89f338 Merge branch 'master' of github.com:gnuboard/g5 2021-03-16 15:02:05 +09:00
thisgun 5b97b57957 버전 5.4.5.2 수정 2021-03-16 12:27:07 +09:00
thisgun 38571d552f 동일 게시글 복사시 첨부파일명 길이가 늘어나는 문제 수정 2021-03-16 12:17:52 +09:00
thisgun 0139d91ac9 [KVE-2021-0172,0329,0330] 그누보드 다중 취약점 수정 2021-03-16 11:09:42 +09:00
thisgun 086a1738d9 [KVE-2020-1616]그누보드 메인화면 XSS 취약점 수정 2021-03-15 16:24:32 +09:00
thisgun 1aedb8f805 [KVE-2020-1617]그누보드 Cross Site Scripting(XSS) 취약점 수정 2021-03-15 14:30:00 +09:00
thisgun d0b2d6811e 새글 페이지와 썸네일 파일의 잘못된 코드 수정 2021-03-15 10:34:22 +09:00
thisgun 5a308040f1 소셜로그인 회원가입시 닉네임을 받아오지 못했을 때 SQL QUERY량이 증가하는 문제점 수정 2021-03-02 13:57:39 +09:00
thisgun 6365717c0d 오타 코드 및 잘못된 위치에 있는 코드 수정 2021-02-23 18:29:30 +09:00
thisgun bc37a2cd59 게시판 스킨에서 문제가 되는 download attribute 제거 2021-02-15 10:33:16 +09:00
thisgun 12132598b4 Merge branch 'master' of github.com:gnuboard/g5 2021-02-05 17:17:51 +09:00
thisgun e7a0555bf7 버전 5.4.5.1 수정 2021-02-05 17:11:33 +09:00
thisgun 13c2494569 g5_delete_cache_by_prefix 함수내 잘못된 코드 수정 2021-02-05 17:10:51 +09:00
thisgun 1c3cf4771a Merge branch 'master' of github.com:gnuboard/g5 2021-02-05 14:08:27 +09:00
thisgun 5ff8d4ce71 버전 5.4.5 수정 2021-02-05 12:20:20 +09:00
thisgun b703ce435b HOOK 이벤트 삭제 코드 오류 수정 2021-02-05 12:19:24 +09:00
thisgun 184172a5a6 캐시 라이브러리 파일에 일부 hook 이벤트 추가 2021-02-05 11:54:14 +09:00
thisgun 21db2b46e3 회원메일발송 선택삭제가 안되는 오류 수정 2021-02-05 11:40:10 +09:00
thisgun 178d32ec18 그누보드5 설치시 최고관리자 닉네임 생성일 기록하기 2021-02-04 18:40:17 +09:00
thisgun 8523bb5747 Merge branch 'master' of github.com:gnuboard/g5 2021-01-26 10:51:12 +09:00
thisgun f5cfbc1346 게시판그룹관리에서 여분필드 작성이 안되는 오류 수정 2021-01-26 10:50:19 +09:00
thisgun cde27ea510 Merge branch 'master' of github.com:gnuboard/g5 2021-01-26 10:13:06 +09:00
thisgun 35d4c2f3b1 IIS 서버에서 서버변수 SERVER_ADDR 이 없을 경우 처리 2021-01-26 10:07:51 +09:00
thisgun 96c8437d15 버전 5.4.4.9 수정 2021-01-25 14:15:17 +09:00
thisgun 359b20606e PHP8 에서 경고문이 나올수 있는 코드 수정 2021-01-25 14:14:41 +09:00
thisgun 682f6620cb cheditor5 특정 이미지 업로드시 검게 출력되는 문제 수정 2021-01-25 12:26:28 +09:00
thisgun 9a61ea2d59 Merge branch 'master' of github.com:gnuboard/g5 2021-01-19 14:20:06 +09:00
thisgun ddde0d7641 버전 5.4.4.8 수정 2021-01-19 14:17:00 +09:00
thisgun b3157550b4 메일 함수내 hook 함수 추가 2021-01-19 14:16:44 +09:00
thisgun 594cbf76f7 새글 삭제시 게시글 카운트 값이 정확하지 않게 줄어드는 오류 수정 2021-01-19 14:09:22 +09:00
thisgun dd2834167a Merge branch 'master' of github.com:gnuboard/g5 2021-01-14 10:23:28 +09:00
thisgun bfcd66c6c9 버전 5.4.4.7.1 수정 2021-01-14 10:22:31 +09:00
thisgun 9db6d7a1da PHP 각 버전에 호환 되도록 일부코드 수정 2021-01-14 10:21:37 +09:00
thisgun aa86ac0c30 Merge branch 'master' of github.com:gnuboard/g5 2021-01-13 15:35:54 +09:00
thisgun 031949528b 버전 5.4.4.7 수정 2021-01-13 15:28:43 +09:00
thisgun be4517f0aa 최신글 스킨 글 링크를 짧은 주소 함수 코드로 수정 2021-01-13 15:14:03 +09:00
thisgun 102715421f [KVE-2020-1597, 2021-0016] 그누보드 다중 취약점 수정 2021-01-13 11:48:34 +09:00
thisgun ddd7090801 Merge branch 'master' of github.com:gnuboard/g5 2021-01-11 14:52:19 +09:00
thisgun b01e04a91e 버전 5.4.4.6 수정 2021-01-11 14:47:49 +09:00
thisgun 85697e71b0 PHP8에서 삭제된 함수 대체 및 짧은 주소 잘못된 코드 수정 2021-01-11 14:43:27 +09:00
thisgun aceb0a2751 Merge branch 'master' of github.com:gnuboard/g5 2021-01-09 23:28:56 +09:00
thisgun 233966fb4c 관리자 -> 팝업 레이어 삭제 안되는 오류 수정 2021-01-09 23:23:25 +09:00
thisgun 5c13b8c200 Merge branch 'master' of github.com:gnuboard/g5 2021-01-09 17:23:26 +09:00
thisgun 977a6de93b 게시판에서 이전글 다음글이 나오지 않는 오류 수정 2021-01-09 16:42:30 +09:00
thisgun e927f15282 버전 5.4.4.5 수정 2021-01-09 16:12:52 +09:00
thisgun 051aff0e8e 관리자에서 FAQ 삭제 안되는 오류 수정 2021-01-09 16:12:24 +09:00
thisgun bc0be66aad PHP8 버전에서 경고문 뜨는 코드 추가 수정 2021-01-09 16:10:42 +09:00
thisgun ab7ba78fd2 Merge branch 'master' of github.com:gnuboard/g5 2021-01-08 15:54:28 +09:00
thisgun 8e679ee4da 버전 5.4.4.4 수정 2021-01-08 15:46:33 +09:00
thisgun be2f27a7fa PHP8 버전에서 경고코드가 표시되는 코드 수정 2021-01-08 15:45:55 +09:00
thisgun 18bc64ab0a Merge branch 'master' of github.com:gnuboard/g5 2021-01-06 14:24:51 +09:00
thisgun 5e5cd396c4 잘못 수정한 회원가입완료 코드 재수정 2021-01-06 13:43:00 +09:00
thisgun 24268f70b8 Merge branch 'master' of github.com:gnuboard/g5 2021-01-06 10:43:21 +09:00
thisgun 15ad2b6b35 버전 5.4.4.3 수정 2021-01-06 10:28:42 +09:00
thisgun 2d1ef8b7bb 기존 스킨 또는 테마 title 에서 불필요한 | 문자열이 들어가 PHP8 버전 조건문 추가 2021-01-06 10:27:25 +09:00
thisgun e5ab7456f2 PHP80 버전에서 경고문이 나오는 코드 및 글 이동시 오류 현상 수정 2021-01-06 09:59:33 +09:00
thisgun 3eb07bdfa0 Merge branch 'master' of github.com:gnuboard/g5 2021-01-05 20:34:02 +09:00
thisgun 242eed5b35 head.sub.php 파일의 상태바 타이틀 코드 수정 2021-01-05 20:29:00 +09:00
thisgun caf16b5d6a 버전 5.4.4.2 2021-01-05 20:14:57 +09:00
thisgun c5c8924b42 1:1 문의 답변 오류 및 스킨 코드 수정 2021-01-05 20:14:30 +09:00
lupin_latte e6764f4a7c Merge branch 'master' of github.com:gnuboard/g5 2021-01-05 16:04:40 +09:00
thisgun 6368a5b638 PHP8 버전에서 경고문이 나오는 코드 추가 수정 2021-01-05 15:37:00 +09:00
thisgun 12c836104a 버전 5.4.4.1 수정 2021-01-05 14:13:05 +09:00
thisgun c77a001355 관리자 < 내용관리 삭제가 안되는 오류수정 및 PHP8 경고메시지 뜨는 코드 추가 수정 2021-01-05 14:12:04 +09:00
96 changed files with 2966 additions and 550 deletions
+1 -1
View File
@@ -130,7 +130,7 @@ function imageview(id, w, h)
foreach($amenu as $key=>$value) {
$href1 = $href2 = '';
if ($menu['menu'.$key][0][2]) {
if (isset($menu['menu'.$key][0][2]) && $menu['menu'.$key][0][2]) {
$href1 = '<a href="'.$menu['menu'.$key][0][2].'" class="gnb_1da">';
$href2 = '</a>';
} else {
+1 -1
View File
@@ -184,7 +184,7 @@ function get_theme_config_value($dir, $key='*')
} else {
$keys = array_map('trim', explode(',', $key));
foreach($keys as $v) {
$tconfig[$v] = trim($theme_config[$v]);
$tconfig[$v] = isset($theme_config[$v]) ? trim($theme_config[$v]) : '';
}
}
}
+4 -4
View File
@@ -21,9 +21,9 @@ if (!$gr_subject) alert('그룹 제목을 입력하세요.');
$posts = array();
$check_keys = array(
'gr_subject',
'gr_device',
'gr_admin'
'gr_subject'=>'',
'gr_device'=>'',
'gr_admin'=>'',
);
for($i=1;$i<=10;$i++){
@@ -31,7 +31,7 @@ for($i=1;$i<=10;$i++){
$check_keys['gr_'.$i] = isset($_POST['gr_'.$i]) ? $_POST['gr_'.$i] : '';
}
foreach( $check_keys as $key ){
foreach( $check_keys as $key=>$value ){
if( $key === 'gr_subject' ){
$posts[$key] = isset($_POST[$key]) ? strip_tags(clean_xss_attributes($_POST[$key])) : '';
} else {
+73 -73
View File
@@ -339,14 +339,14 @@ if ($config['cf_sms_use'] && $config['cf_icode_id'] && $config['cf_icode_pw']) {
<th scope="row"><label for="cf_admin_email">관리자 메일 주소<strong class="sound_only">필수</strong></label></th>
<td colspan="3">
<?php echo help('관리자가 보내고 받는 용도로 사용하는 메일 주소를 입력합니다. (회원가입, 인증메일, 테스트, 회원메일발송 등에서 사용)') ?>
<input type="text" name="cf_admin_email" value="<?php echo $config['cf_admin_email'] ?>" id="cf_admin_email" required class="required email frm_input" size="40">
<input type="text" name="cf_admin_email" value="<?php echo get_sanitize_input($config['cf_admin_email']); ?>" id="cf_admin_email" required class="required email frm_input" size="40">
</td>
</tr>
<tr>
<th scope="row"><label for="cf_admin_email_name">관리자 메일 발송이름<strong class="sound_only">필수</strong></label></th>
<td colspan="3">
<?php echo help('관리자가 보내고 받는 용도로 사용하는 메일의 발송이름을 입력합니다. (회원가입, 인증메일, 테스트, 회원메일발송 등에서 사용)') ?>
<input type="text" name="cf_admin_email_name" value="<?php echo $config['cf_admin_email_name'] ?>" id="cf_admin_email_name" required class="required frm_input" size="40">
<input type="text" name="cf_admin_email_name" value="<?php echo get_sanitize_input($config['cf_admin_email_name']); ?>" id="cf_admin_email_name" required class="required frm_input" size="40">
</td>
</tr>
<tr>
@@ -357,79 +357,79 @@ if ($config['cf_sms_use'] && $config['cf_icode_id'] && $config['cf_icode_pw']) {
<th scope="row"><label for="cf_login_point">로그인시 포인트<strong class="sound_only">필수</strong></label></th>
<td>
<?php echo help('회원이 로그인시 하루에 한번만 적립') ?>
<input type="text" name="cf_login_point" value="<?php echo $config['cf_login_point'] ?>" id="cf_login_point" required class="required frm_input" size="5"> 점
<input type="text" name="cf_login_point" value="<?php echo (int) $config['cf_login_point'] ?>" id="cf_login_point" required class="required frm_input" size="5"> 점
</td>
<th scope="row"><label for="cf_memo_send_point">쪽지보낼시 차감 포인트<strong class="sound_only">필수</strong></label></th>
<td>
<?php echo help('양수로 입력하십시오. 0점은 쪽지 보낼시 포인트를 차감하지 않습니다.') ?>
<input type="text" name="cf_memo_send_point" value="<?php echo $config['cf_memo_send_point'] ?>" id="cf_memo_send_point" required class="required frm_input" size="5"> 점
<input type="text" name="cf_memo_send_point" value="<?php echo (int) $config['cf_memo_send_point']; ?>" id="cf_memo_send_point" required class="required frm_input" size="5"> 점
</td>
</tr>
<tr>
<th scope="row"><label for="cf_cut_name">이름(닉네임) 표시</label></th>
<td colspan="3">
<input type="text" name="cf_cut_name" value="<?php echo $config['cf_cut_name'] ?>" id="cf_cut_name" class="frm_input" size="5"> 자리만 표시
<input type="text" name="cf_cut_name" value="<?php echo (int) $config['cf_cut_name'] ?>" id="cf_cut_name" class="frm_input" size="5"> 자리만 표시
</td>
</tr>
<tr>
<th scope="row"><label for="cf_nick_modify">닉네임 수정</label></th>
<td>수정하면 <input type="text" name="cf_nick_modify" value="<?php echo $config['cf_nick_modify'] ?>" id="cf_nick_modify" class="frm_input" size="3"> 일 동안 바꿀 수 없음</td>
<td>수정하면 <input type="text" name="cf_nick_modify" value="<?php echo (int) $config['cf_nick_modify'] ?>" id="cf_nick_modify" class="frm_input" size="3"> 일 동안 바꿀 수 없음</td>
<th scope="row"><label for="cf_open_modify">정보공개 수정</label></th>
<td>수정하면 <input type="text" name="cf_open_modify" value="<?php echo $config['cf_open_modify'] ?>" id="cf_open_modify" class="frm_input" size="3"> 일 동안 바꿀 수 없음</td>
<td>수정하면 <input type="text" name="cf_open_modify" value="<?php echo (int) $config['cf_open_modify'] ?>" id="cf_open_modify" class="frm_input" size="3"> 일 동안 바꿀 수 없음</td>
</tr>
<tr>
<th scope="row"><label for="cf_new_del">최근게시물 삭제</label></th>
<td>
<?php echo help('설정일이 지난 최근게시물 자동 삭제') ?>
<input type="text" name="cf_new_del" value="<?php echo $config['cf_new_del'] ?>" id="cf_new_del" class="frm_input" size="5"> 일
<input type="text" name="cf_new_del" value="<?php echo (int) $config['cf_new_del'] ?>" id="cf_new_del" class="frm_input" size="5"> 일
</td>
<th scope="row"><label for="cf_memo_del">쪽지 삭제</label></th>
<td>
<?php echo help('설정일이 지난 쪽지 자동 삭제') ?>
<input type="text" name="cf_memo_del" value="<?php echo $config['cf_memo_del'] ?>" id="cf_memo_del" class="frm_input" size="5"> 일
<input type="text" name="cf_memo_del" value="<?php echo (int) $config['cf_memo_del'] ?>" id="cf_memo_del" class="frm_input" size="5"> 일
</td>
</tr>
<tr>
<th scope="row"><label for="cf_visit_del">접속자로그 삭제</label></th>
<td>
<?php echo help('설정일이 지난 접속자 로그 자동 삭제') ?>
<input type="text" name="cf_visit_del" value="<?php echo $config['cf_visit_del'] ?>" id="cf_visit_del" class="frm_input" size="5"> 일
<input type="text" name="cf_visit_del" value="<?php echo (int) $config['cf_visit_del'] ?>" id="cf_visit_del" class="frm_input" size="5"> 일
</td>
<th scope="row"><label for="cf_popular_del">인기검색어 삭제</label></th>
<td>
<?php echo help('설정일이 지난 인기검색어 자동 삭제') ?>
<input type="text" name="cf_popular_del" value="<?php echo $config['cf_popular_del'] ?>" id="cf_popular_del" class="frm_input" size="5"> 일
<input type="text" name="cf_popular_del" value="<?php echo (int) $config['cf_popular_del'] ?>" id="cf_popular_del" class="frm_input" size="5"> 일
</td>
</tr>
<tr>
<th scope="row"><label for="cf_login_minutes">현재 접속자</label></th>
<td>
<?php echo help('설정값 이내의 접속자를 현재 접속자로 인정') ?>
<input type="text" name="cf_login_minutes" value="<?php echo $config['cf_login_minutes'] ?>" id="cf_login_minutes" class="frm_input" size="3"> 분
<input type="text" name="cf_login_minutes" value="<?php echo (int) $config['cf_login_minutes'] ?>" id="cf_login_minutes" class="frm_input" size="3"> 분
</td>
<th scope="row"><label for="cf_new_rows">최근게시물 라인수</label></th>
<td>
<?php echo help('목록 한페이지당 라인수') ?>
<input type="text" name="cf_new_rows" value="<?php echo $config['cf_new_rows'] ?>" id="cf_new_rows" class="frm_input" size="3"> 라인
<input type="text" name="cf_new_rows" value="<?php echo (int) $config['cf_new_rows'] ?>" id="cf_new_rows" class="frm_input" size="3"> 라인
</td>
</tr>
<tr>
<th scope="row"><label for="cf_page_rows">한페이지당 라인수</label></th>
<td>
<?php echo help('목록(리스트) 한페이지당 라인수') ?>
<input type="text" name="cf_page_rows" value="<?php echo $config['cf_page_rows'] ?>" id="cf_page_rows" class="frm_input" size="3"> 라인
<input type="text" name="cf_page_rows" value="<?php echo (int) $config['cf_page_rows'] ?>" id="cf_page_rows" class="frm_input" size="3"> 라인
</td>
<th scope="row"><label for="cf_mobile_page_rows">모바일 한페이지당 라인수</label></th>
<td>
<?php echo help('모바일 목록 한페이지당 라인수') ?>
<input type="text" name="cf_mobile_page_rows" value="<?php echo $config['cf_mobile_page_rows'] ?>" id="cf_mobile_page_rows" class="frm_input" size="3"> 라인
<input type="text" name="cf_mobile_page_rows" value="<?php echo (int) $config['cf_mobile_page_rows'] ?>" id="cf_mobile_page_rows" class="frm_input" size="3"> 라인
</td>
</tr>
<tr>
<th scope="row"><label for="cf_write_pages">페이지 표시 수<strong class="sound_only">필수</strong></label></th>
<td><input type="text" name="cf_write_pages" value="<?php echo $config['cf_write_pages'] ?>" id="cf_write_pages" required class="required numeric frm_input" size="3"> 페이지씩 표시</td>
<td><input type="text" name="cf_write_pages" value="<?php echo (int) $config['cf_write_pages'] ?>" id="cf_write_pages" required class="required numeric frm_input" size="3"> 페이지씩 표시</td>
<th scope="row"><label for="cf_mobile_pages">모바일 페이지 표시 수<strong class="sound_only">필수</strong></label></th>
<td><input type="text" name="cf_mobile_pages" value="<?php echo $config['cf_mobile_pages'] ?>" id="cf_mobile_pages" required class="required numeric frm_input" size="3"> 페이지씩 표시</td>
<td><input type="text" name="cf_mobile_pages" value="<?php echo (int) $config['cf_mobile_pages'] ?>" id="cf_mobile_pages" required class="required numeric frm_input" size="3"> 페이지씩 표시</td>
</tr>
<tr>
<th scope="row"><label for="cf_new_skin">최근게시물 스킨<strong class="sound_only">필수</strong></label></th>
@@ -516,13 +516,13 @@ if ($config['cf_sms_use'] && $config['cf_icode_id'] && $config['cf_icode_pw']) {
<th scope="row"><label for="cf_recaptcha_site_key">구글 reCAPTCHA Site key</label></th>
<td colspan="3">
<?php echo help('reCAPTCHA V2와 Invisible reCAPTCHA 캡챠의 sitekey 와 secret 키는 동일하지 않고, 서로 발급받는 키가 다릅니다.') ?>
<input type="text" name="cf_recaptcha_site_key" value="<?php echo $config['cf_recaptcha_site_key']; ?>" id="cf_recaptcha_site_key" class="frm_input" size="52"> <a href="https://www.google.com/recaptcha/admin" target="_blank" class="btn_frmline">reCAPTCHA 등록하기</a>
<input type="text" name="cf_recaptcha_site_key" value="<?php echo get_sanitize_input($config['cf_recaptcha_site_key']); ?>" id="cf_recaptcha_site_key" class="frm_input" size="52"> <a href="https://www.google.com/recaptcha/admin" target="_blank" class="btn_frmline">reCAPTCHA 등록하기</a>
</td>
</tr>
<tr>
<th scope="row"><label for="cf_recaptcha_secret_key">구글 reCAPTCHA Secret key</label></th>
<td colspan="3">
<input type="text" name="cf_recaptcha_secret_key" value="<?php echo $config['cf_recaptcha_secret_key']; ?>" id="cf_recaptcha_secret_key" class="frm_input" size="52">
<input type="text" name="cf_recaptcha_secret_key" value="<?php echo get_sanitize_input($config['cf_recaptcha_secret_key']); ?>" id="cf_recaptcha_secret_key" class="frm_input" size="52">
</td>
</tr>
<tr>
@@ -536,33 +536,33 @@ if ($config['cf_sms_use'] && $config['cf_icode_id'] && $config['cf_icode_pw']) {
<th scope="row"><label for="cf_point_term">포인트 유효기간</label></th>
<td colspan="3">
<?php echo help('기간을 0으로 설정시 포인트 유효기간이 적용되지 않습니다.') ?>
<input type="text" name="cf_point_term" value="<?php echo $config['cf_point_term']; ?>" id="cf_point_term" required class="required frm_input" size="5"> 일
<input type="text" name="cf_point_term" value="<?php echo (int) $config['cf_point_term']; ?>" id="cf_point_term" required class="required frm_input" size="5"> 일
</td>
</tr>
<tr>
<th scope="row"><label for="cf_possible_ip">접근가능 IP</label></th>
<td>
<?php echo help('입력된 IP의 컴퓨터만 접근할 수 있습니다.<br>123.123.+ 도 입력 가능. (엔터로 구분)') ?>
<textarea name="cf_possible_ip" id="cf_possible_ip"><?php echo $config['cf_possible_ip'] ?></textarea>
<textarea name="cf_possible_ip" id="cf_possible_ip"><?php echo get_sanitize_input($config['cf_possible_ip']); ?></textarea>
</td>
<th scope="row"><label for="cf_intercept_ip">접근차단 IP</label></th>
<td>
<?php echo help('입력된 IP의 컴퓨터는 접근할 수 없음.<br>123.123.+ 도 입력 가능. (엔터로 구분)') ?>
<textarea name="cf_intercept_ip" id="cf_intercept_ip"><?php echo $config['cf_intercept_ip'] ?></textarea>
<textarea name="cf_intercept_ip" id="cf_intercept_ip"><?php echo get_sanitize_input($config['cf_intercept_ip']); ?></textarea>
</td>
</tr>
<tr>
<th scope="row"><label for="cf_analytics">방문자분석 스크립트</label></th>
<td colspan="3">
<?php echo help('방문자분석 스크립트 코드를 입력합니다. 예) 구글 애널리틱스'); ?>
<textarea name="cf_analytics" id="cf_analytics"><?php echo $config['cf_analytics']; ?></textarea>
<textarea name="cf_analytics" id="cf_analytics"><?php echo get_text($config['cf_analytics']); ?></textarea>
</td>
</tr>
<tr>
<th scope="row"><label for="cf_add_meta">추가 메타태그</label></th>
<td colspan="3">
<?php echo help('추가로 사용하실 meta 태그를 입력합니다.'); ?>
<textarea name="cf_add_meta" id="cf_add_meta"><?php echo $config['cf_add_meta']; ?></textarea>
<textarea name="cf_add_meta" id="cf_add_meta"><?php echo get_text($config['cf_add_meta']); ?></textarea>
</td>
</tr>
<tr>
@@ -570,14 +570,14 @@ if ($config['cf_sms_use'] && $config['cf_icode_id'] && $config['cf_icode_pw']) {
<td colspan="3">
<?php if (!function_exists('curl_init')) echo help('<b>경고) curl이 지원되지 않아 네이버 신디케이션을 사용할수 없습니다.</b>'); ?>
<?php echo help('네이버 신디케이션 연동키(token)을 입력하면 네이버 신디케이션을 사용할 수 있습니다.<br>연동키는 <a href="http://webmastertool.naver.com/" target="_blank"><u>네이버 웹마스터도구</u></a> -> 네이버 신디케이션에서 발급할 수 있습니다.') ?>
<input type="text" name="cf_syndi_token" value="<?php echo get_sanitize_input($config['cf_syndi_token']); ?>" id="cf_syndi_token" class="frm_input" size="70">
<input type="text" name="cf_syndi_token" value="<?php echo isset($config['cf_syndi_token']) ? get_sanitize_input($config['cf_syndi_token']) : ''; ?>" id="cf_syndi_token" class="frm_input" size="70">
</td>
</tr>
<tr>
<th scope="row"><label for="cf_syndi_except">네이버 신디케이션 제외게시판</label></th>
<td colspan="3">
<?php echo help('네이버 신디케이션 수집에서 제외할 게시판 아이디를 | 로 구분하여 입력하십시오. 예) notice|adult<br>참고로 그룹접근사용 게시판, 글읽기 권한 2 이상 게시판, 비밀글은 신디케이션 수집에서 제외됩니다.') ?>
<input type="text" name="cf_syndi_except" value="<?php echo get_sanitize_input($config['cf_syndi_except']); ?>" id="cf_syndi_except" class="frm_input" size="70">
<input type="text" name="cf_syndi_except" value="<?php echo isset($config['cf_syndi_except']) ? get_sanitize_input($config['cf_syndi_except']) : ''; ?>" id="cf_syndi_except" class="frm_input" size="70">
</td>
</tr>
</tbody>
@@ -605,7 +605,7 @@ if ($config['cf_sms_use'] && $config['cf_icode_id'] && $config['cf_icode_pw']) {
<tbody>
<tr>
<th scope="row"><label for="cf_delay_sec">글쓰기 간격<strong class="sound_only">필수</strong></label></th>
<td><input type="text" name="cf_delay_sec" value="<?php echo $config['cf_delay_sec'] ?>" id="cf_delay_sec" required class="required numeric frm_input" size="3"> 초 지난후 가능</td>
<td><input type="text" name="cf_delay_sec" value="<?php echo (int) $config['cf_delay_sec'] ?>" id="cf_delay_sec" required class="required numeric frm_input" size="3"> 초 지난후 가능</td>
<th scope="row"><label for="cf_link_target">새창 링크</label></th>
<td>
<?php echo help('글내용중 자동 링크되는 타켓을 지정합니다.') ?>
@@ -619,46 +619,46 @@ if ($config['cf_sms_use'] && $config['cf_icode_id'] && $config['cf_icode_pw']) {
</tr>
<tr>
<th scope="row"><label for="cf_read_point">글읽기 포인트<strong class="sound_only">필수</strong></label></th>
<td><input type="text" name="cf_read_point" value="<?php echo $config['cf_read_point'] ?>" id="cf_read_point" required class="required frm_input" size="3"> 점</td>
<td><input type="text" name="cf_read_point" value="<?php echo (int) $config['cf_read_point'] ?>" id="cf_read_point" required class="required frm_input" size="3"> 점</td>
<th scope="row"><label for="cf_write_point">글쓰기 포인트</label></th>
<td><input type="text" name="cf_write_point" value="<?php echo $config['cf_write_point'] ?>" id="cf_write_point" required class="required frm_input" size="3"> 점</td>
<td><input type="text" name="cf_write_point" value="<?php echo (int) $config['cf_write_point'] ?>" id="cf_write_point" required class="required frm_input" size="3"> 점</td>
</tr>
<tr>
<th scope="row"><label for="cf_comment_point">댓글쓰기 포인트</label></th>
<td><input type="text" name="cf_comment_point" value="<?php echo $config['cf_comment_point'] ?>" id="cf_comment_point" required class="required frm_input" size="3"> 점</td>
<td><input type="text" name="cf_comment_point" value="<?php echo (int) $config['cf_comment_point'] ?>" id="cf_comment_point" required class="required frm_input" size="3"> 점</td>
<th scope="row"><label for="cf_download_point">다운로드 포인트</label></th>
<td><input type="text" name="cf_download_point" value="<?php echo $config['cf_download_point'] ?>" id="cf_download_point" required class="required frm_input" size="3"> 점</td>
<td><input type="text" name="cf_download_point" value="<?php echo (int) $config['cf_download_point'] ?>" id="cf_download_point" required class="required frm_input" size="3"> 점</td>
</tr>
<tr>
<th scope="row"><label for="cf_search_part">검색 단위</label></th>
<td colspan="3"><input type="text" name="cf_search_part" value="<?php echo $config['cf_search_part'] ?>" id="cf_search_part" class="frm_input" size="4"> 건 단위로 검색</td>
<td colspan="3"><input type="text" name="cf_search_part" value="<?php echo (int) $config['cf_search_part'] ?>" id="cf_search_part" class="frm_input" size="4"> 건 단위로 검색</td>
</tr>
<tr>
<th scope="row"><label for="cf_image_extension">이미지 업로드 확장자</label></th>
<td colspan="3">
<?php echo help('게시판 글작성시 이미지 파일 업로드 가능 확장자. | 로 구분') ?>
<input type="text" name="cf_image_extension" value="<?php echo $config['cf_image_extension'] ?>" id="cf_image_extension" class="frm_input" size="70">
<input type="text" name="cf_image_extension" value="<?php echo get_sanitize_input($config['cf_image_extension']); ?>" id="cf_image_extension" class="frm_input" size="70">
</td>
</tr>
<tr>
<th scope="row"><label for="cf_flash_extension">플래쉬 업로드 확장자</label></th>
<td colspan="3">
<?php echo help('게시판 글작성시 플래쉬 파일 업로드 가능 확장자. | 로 구분') ?>
<input type="text" name="cf_flash_extension" value="<?php echo $config['cf_flash_extension'] ?>" id="cf_flash_extension" class="frm_input" size="70">
<input type="text" name="cf_flash_extension" value="<?php echo get_sanitize_input($config['cf_flash_extension']); ?>" id="cf_flash_extension" class="frm_input" size="70">
</td>
</tr>
<tr>
<th scope="row"><label for="cf_movie_extension">동영상 업로드 확장자</label></th>
<td colspan="3">
<?php echo help('게시판 글작성시 동영상 파일 업로드 가능 확장자. | 로 구분') ?>
<input type="text" name="cf_movie_extension" value="<?php echo $config['cf_movie_extension'] ?>" id="cf_movie_extension" class="frm_input" size="70">
<input type="text" name="cf_movie_extension" value="<?php echo get_sanitize_input($config['cf_movie_extension']); ?>" id="cf_movie_extension" class="frm_input" size="70">
</td>
</tr>
<tr>
<th scope="row"><label for="cf_filter">단어 필터링</label></th>
<td colspan="3">
<?php echo help('입력된 단어가 포함된 내용은 게시할 수 없습니다. 단어와 단어 사이는 ,로 구분합니다.') ?>
<textarea name="cf_filter" id="cf_filter" rows="7"><?php echo $config['cf_filter'] ?></textarea>
<textarea name="cf_filter" id="cf_filter" rows="7"><?php echo get_sanitize_input($config['cf_filter']); ?></textarea>
</td>
</tr>
</tbody>
@@ -733,11 +733,11 @@ if ($config['cf_sms_use'] && $config['cf_icode_id'] && $config['cf_icode_pw']) {
<th scope="row"><label for="cf_register_level">회원가입시 권한</label></th>
<td><?php echo get_member_level_select('cf_register_level', 1, 9, $config['cf_register_level']) ?></td>
<th scope="row"><label for="cf_register_point">회원가입시 포인트</label></th>
<td><input type="text" name="cf_register_point" value="<?php echo $config['cf_register_point'] ?>" id="cf_register_point" class="frm_input" size="5"> 점</td>
<td><input type="text" name="cf_register_point" value="<?php echo (int) $config['cf_register_point'] ?>" id="cf_register_point" class="frm_input" size="5"> 점</td>
</tr>
<tr>
<th scope="row" id="th310"><label for="cf_leave_day">회원탈퇴후 삭제일</label></th>
<td colspan="3"><input type="text" name="cf_leave_day" value="<?php echo $config['cf_leave_day'] ?>" id="cf_leave_day" class="frm_input" size="2"> 일 후 자동 삭제</td>
<td colspan="3"><input type="text" name="cf_leave_day" value="<?php echo (int) $config['cf_leave_day'] ?>" id="cf_leave_day" class="frm_input" size="2"> 일 후 자동 삭제</td>
</tr>
<tr>
<th scope="row"><label for="cf_use_member_icon">회원아이콘 사용</label></th>
@@ -754,25 +754,25 @@ if ($config['cf_sms_use'] && $config['cf_icode_id'] && $config['cf_icode_pw']) {
</tr>
<tr>
<th scope="row"><label for="cf_member_icon_size">회원아이콘 용량</label></th>
<td><input type="text" name="cf_member_icon_size" value="<?php echo $config['cf_member_icon_size'] ?>" id="cf_member_icon_size" class="frm_input" size="10"> 바이트 이하</td>
<td><input type="text" name="cf_member_icon_size" value="<?php echo (int) $config['cf_member_icon_size'] ?>" id="cf_member_icon_size" class="frm_input" size="10"> 바이트 이하</td>
<th scope="row">회원아이콘 사이즈</th>
<td>
<label for="cf_member_icon_width">가로</label>
<input type="text" name="cf_member_icon_width" value="<?php echo $config['cf_member_icon_width'] ?>" id="cf_member_icon_width" class="frm_input" size="2">
<input type="text" name="cf_member_icon_width" value="<?php echo (int) $config['cf_member_icon_width'] ?>" id="cf_member_icon_width" class="frm_input" size="2">
<label for="cf_member_icon_height">세로</label>
<input type="text" name="cf_member_icon_height" value="<?php echo $config['cf_member_icon_height'] ?>" id="cf_member_icon_height" class="frm_input" size="2">
<input type="text" name="cf_member_icon_height" value="<?php echo (int) $config['cf_member_icon_height'] ?>" id="cf_member_icon_height" class="frm_input" size="2">
픽셀 이하
</td>
</tr>
<tr>
<th scope="row"><label for="cf_member_img_size">회원이미지 용량</label></th>
<td><input type="text" name="cf_member_img_size" value="<?php echo $config['cf_member_img_size'] ?>" id="cf_member_img_size" class="frm_input" size="10"> 바이트 이하</td>
<td><input type="text" name="cf_member_img_size" value="<?php echo (int) $config['cf_member_img_size'] ?>" id="cf_member_img_size" class="frm_input" size="10"> 바이트 이하</td>
<th scope="row">회원이미지 사이즈</th>
<td>
<label for="cf_member_img_width">가로</label>
<input type="text" name="cf_member_img_width" value="<?php echo $config['cf_member_img_width'] ?>" id="cf_member_img_width" class="frm_input" size="2">
<input type="text" name="cf_member_img_width" value="<?php echo (int) $config['cf_member_img_width'] ?>" id="cf_member_img_width" class="frm_input" size="2">
<label for="cf_member_img_height">세로</label>
<input type="text" name="cf_member_img_height" value="<?php echo $config['cf_member_img_height'] ?>" id="cf_member_img_height" class="frm_input" size="2">
<input type="text" name="cf_member_img_height" value="<?php echo (int) $config['cf_member_img_height'] ?>" id="cf_member_img_height" class="frm_input" size="2">
픽셀 이하
</td>
</tr>
@@ -780,27 +780,27 @@ if ($config['cf_sms_use'] && $config['cf_icode_id'] && $config['cf_icode_pw']) {
<th scope="row"><label for="cf_use_recommend">추천인제도 사용</label></th>
<td><input type="checkbox" name="cf_use_recommend" value="1" id="cf_use_recommend" <?php echo $config['cf_use_recommend']?'checked':''; ?>> 사용</td>
<th scope="row"><label for="cf_recommend_point">추천인 포인트</label></th>
<td><input type="text" name="cf_recommend_point" value="<?php echo $config['cf_recommend_point'] ?>" id="cf_recommend_point" class="frm_input"> 점</td>
<td><input type="text" name="cf_recommend_point" value="<?php echo (int) $config['cf_recommend_point'] ?>" id="cf_recommend_point" class="frm_input"> 점</td>
</tr>
<tr>
<th scope="row"><label for="cf_prohibit_id">아이디,닉네임 금지단어</label></th>
<td>
<?php echo help('회원아이디, 닉네임으로 사용할 수 없는 단어를 정합니다. 쉼표 (,) 로 구분') ?>
<textarea name="cf_prohibit_id" id="cf_prohibit_id" rows="5"><?php echo $config['cf_prohibit_id'] ?></textarea>
<textarea name="cf_prohibit_id" id="cf_prohibit_id" rows="5"><?php echo get_sanitize_input($config['cf_prohibit_id']); ?></textarea>
</td>
<th scope="row"><label for="cf_prohibit_email">입력 금지 메일</label></th>
<td>
<?php echo help('입력 받지 않을 도메인을 지정합니다. 엔터로 구분 ex) hotmail.com') ?>
<textarea name="cf_prohibit_email" id="cf_prohibit_email" rows="5"><?php echo $config['cf_prohibit_email'] ?></textarea>
<textarea name="cf_prohibit_email" id="cf_prohibit_email" rows="5"><?php echo get_sanitize_input($config['cf_prohibit_email']); ?></textarea>
</td>
</tr>
<tr>
<th scope="row"><label for="cf_stipulation">회원가입약관</label></th>
<td colspan="3"><textarea name="cf_stipulation" id="cf_stipulation" rows="10"><?php echo $config['cf_stipulation'] ?></textarea></td>
<td colspan="3"><textarea name="cf_stipulation" id="cf_stipulation" rows="10"><?php echo html_purifier($config['cf_stipulation']); ?></textarea></td>
</tr>
<tr>
<th scope="row"><label for="cf_privacy">개인정보처리방침</label></th>
<td colspan="3"><textarea id="cf_privacy" name="cf_privacy" rows="10"><?php echo $config['cf_privacy'] ?></textarea></td>
<td colspan="3"><textarea id="cf_privacy" name="cf_privacy" rows="10"><?php echo html_purifier($config['cf_privacy']); ?></textarea></td>
</tr>
</tbody>
</table>
@@ -862,7 +862,7 @@ if ($config['cf_sms_use'] && $config['cf_icode_id'] && $config['cf_icode_pw']) {
<th scope="row" class="cf_cert_service"><label for="cf_cert_kcb_cd">코리아크레딧뷰로<br>KCB 회원사ID</label></th>
<td class="cf_cert_service">
<?php echo help('KCB 회원사ID를 입력해 주십시오.<br>서비스에 가입되어 있지 않다면, KCB와 계약체결 후 회원사ID를 발급 받으실 수 있습니다.<br>이용하시려는 서비스에 대한 계약을 아이핀, 휴대폰 본인확인 각각 체결해주셔야 합니다.<br>아이핀 본인확인 테스트의 경우에는 KCB 회원사ID가 필요 없으나,<br>휴대폰 본인확인 테스트의 경우 KCB 에서 따로 발급 받으셔야 합니다.') ?>
<input type="text" name="cf_cert_kcb_cd" value="<?php echo $config['cf_cert_kcb_cd'] ?>" id="cf_cert_kcb_cd" class="frm_input" size="20"> <a href="http://sir.kr/main/service/b_ipin.php" target="_blank" class="btn_frmline">KCB 아이핀 서비스 신청페이지</a>
<input type="text" name="cf_cert_kcb_cd" value="<?php echo get_sanitize_input($config['cf_cert_kcb_cd']); ?>" id="cf_cert_kcb_cd" class="frm_input" size="20"> <a href="http://sir.kr/main/service/b_ipin.php" target="_blank" class="btn_frmline">KCB 아이핀 서비스 신청페이지</a>
<a href="http://sir.kr/main/service/b_cert.php" target="_blank" class="btn_frmline">KCB 휴대폰 본인확인 서비스 신청페이지</a>
</td>
</tr>
@@ -871,7 +871,7 @@ if ($config['cf_sms_use'] && $config['cf_icode_id'] && $config['cf_icode_pw']) {
<td class="cf_cert_service">
<?php echo help('SM으로 시작하는 5자리 사이트 코드중 뒤의 3자리만 입력해 주십시오.<br>서비스에 가입되어 있지 않다면, 본인확인 서비스 신청페이지에서 서비스 신청 후 사이트코드를 발급 받으실 수 있습니다.') ?>
<span class="sitecode">SM</span>
<input type="text" name="cf_cert_kcp_cd" value="<?php echo $config['cf_cert_kcp_cd'] ?>" id="cf_cert_kcp_cd" class="frm_input" size="3"> <a href="http://sir.kr/main/service/p_cert.php" target="_blank" class="btn_frmline">NHN KCP 휴대폰 본인확인 서비스 신청페이지</a>
<input type="text" name="cf_cert_kcp_cd" value="<?php echo get_sanitize_input($config['cf_cert_kcp_cd']); ?>" id="cf_cert_kcp_cd" class="frm_input" size="3"> <a href="http://sir.kr/main/service/p_cert.php" target="_blank" class="btn_frmline">NHN KCP 휴대폰 본인확인 서비스 신청페이지</a>
</td>
</tr>
<tr>
@@ -879,21 +879,21 @@ if ($config['cf_sms_use'] && $config['cf_icode_id'] && $config['cf_icode_pw']) {
<td class="cf_cert_service">
<?php echo help('LG유플러스 상점아이디 중 si_를 제외한 나머지 아이디만 입력해 주십시오.<br>서비스에 가입되어 있지 않다면, 본인확인 서비스 신청페이지에서 서비스 신청 후 상점아이디를 발급 받으실 수 있습니다.<br><strong>LG유플러스 휴대폰본인확인은 ActiveX 설치가 필요하므로 Internet Explorer 에서만 사용할 수 있습니다.</strong>') ?>
<span class="sitecode">si_</span>
<input type="text" name="cf_lg_mid" value="<?php echo $config['cf_lg_mid'] ?>" id="cf_lg_mid" class="frm_input" size="20"> <a href="http://sir.kr/main/service/lg_cert.php" target="_blank" class="btn_frmline">LG유플러스 본인확인 서비스 신청페이지</a>
<input type="text" name="cf_lg_mid" value="<?php echo get_sanitize_input($config['cf_lg_mid']); ?>" id="cf_lg_mid" class="frm_input" size="20"> <a href="http://sir.kr/main/service/lg_cert.php" target="_blank" class="btn_frmline">LG유플러스 본인확인 서비스 신청페이지</a>
</td>
</tr>
<tr>
<th scope="row" class="cf_cert_service"><label for="cf_lg_mert_key">LG유플러스 MERT KEY</label></th>
<td class="cf_cert_service">
<?php echo help('LG유플러스 상점MertKey는 상점관리자 -> 계약정보 -> 상점정보관리에서 확인하실 수 있습니다.') ?>
<input type="text" name="cf_lg_mert_key" value="<?php echo $config['cf_lg_mert_key'] ?>" id="cf_lg_mert_key" class="frm_input" size="40">
<input type="text" name="cf_lg_mert_key" value="<?php echo get_sanitize_input($config['cf_lg_mert_key']); ?>" id="cf_lg_mert_key" class="frm_input" size="40">
</td>
</tr>
<tr>
<th scope="row" class="cf_cert_service"><label for="cf_cert_limit">본인확인 이용제한</label></th>
<td class="cf_cert_service">
<?php echo help('하루동안 아이핀과 휴대폰 본인확인 인증 이용회수를 제한할 수 있습니다.<br>회수제한은 실서비스에서 아이핀과 휴대폰 본인확인 인증에 개별 적용됩니다.<br>0 으로 설정하시면 회수제한이 적용되지 않습니다.'); ?>
<input type="text" name="cf_cert_limit" value="<?php echo $config['cf_cert_limit']; ?>" id="cf_cert_limit" class="frm_input" size="3"> 회
<input type="text" name="cf_cert_limit" value="<?php echo (int) $config['cf_cert_limit']; ?>" id="cf_cert_limit" class="frm_input" size="3"> 회
</td>
</tr>
<tr>
@@ -1138,73 +1138,73 @@ include_once('_rewrite_config_form.php');
<tr>
<th scope="row"><label for="cf_naver_clientid">네이버 Client ID</label></th>
<td>
<input type="text" name="cf_naver_clientid" value="<?php echo $config['cf_naver_clientid'] ?>" id="cf_naver_clientid" class="frm_input" size="40"> <a href="https://developers.naver.com/apps/#/register" target="_blank" class="btn_frmline">앱 등록하기</a>
<input type="text" name="cf_naver_clientid" value="<?php echo get_sanitize_input($config['cf_naver_clientid']); ?>" id="cf_naver_clientid" class="frm_input" size="40"> <a href="https://developers.naver.com/apps/#/register" target="_blank" class="btn_frmline">앱 등록하기</a>
</td>
<th scope="row"><label for="cf_naver_secret">네이버 Client Secret</label></th>
<td>
<input type="text" name="cf_naver_secret" value="<?php echo $config['cf_naver_secret'] ?>" id="cf_naver_secret" class="frm_input" size="45">
<input type="text" name="cf_naver_secret" value="<?php echo get_sanitize_input($config['cf_naver_secret']); ?>" id="cf_naver_secret" class="frm_input" size="45">
</td>
</tr>
<tr>
<th scope="row"><label for="cf_facebook_appid">페이스북 앱 ID</label></th>
<td>
<input type="text" name="cf_facebook_appid" value="<?php echo $config['cf_facebook_appid'] ?>" id="cf_facebook_appid" class="frm_input" size="40"> <a href="https://developers.facebook.com/apps" target="_blank" class="btn_frmline">앱 등록하기</a>
<input type="text" name="cf_facebook_appid" value="<?php echo get_sanitize_input($config['cf_facebook_appid']); ?>" id="cf_facebook_appid" class="frm_input" size="40"> <a href="https://developers.facebook.com/apps" target="_blank" class="btn_frmline">앱 등록하기</a>
</td>
<th scope="row"><label for="cf_facebook_secret">페이스북 앱 Secret</label></th>
<td>
<input type="text" name="cf_facebook_secret" value="<?php echo $config['cf_facebook_secret'] ?>" id="cf_facebook_secret" class="frm_input" size="45">
<input type="text" name="cf_facebook_secret" value="<?php echo get_sanitize_input($config['cf_facebook_secret']); ?>" id="cf_facebook_secret" class="frm_input" size="45">
</td>
</tr>
<tr>
<th scope="row"><label for="cf_twitter_key">트위터 컨슈머 Key</label></th>
<td>
<input type="text" name="cf_twitter_key" value="<?php echo $config['cf_twitter_key'] ?>" id="cf_twitter_key" class="frm_input" size="40"> <a href="https://developer.twitter.com/en/apps" target="_blank" class="btn_frmline">앱 등록하기</a>
<input type="text" name="cf_twitter_key" value="<?php echo get_sanitize_input($config['cf_twitter_key']); ?>" id="cf_twitter_key" class="frm_input" size="40"> <a href="https://developer.twitter.com/en/apps" target="_blank" class="btn_frmline">앱 등록하기</a>
</td>
<th scope="row"><label for="cf_twitter_secret">트위터 컨슈머 Secret</label></th>
<td>
<input type="text" name="cf_twitter_secret" value="<?php echo $config['cf_twitter_secret'] ?>" id="cf_twitter_secret" class="frm_input" size="45">
<input type="text" name="cf_twitter_secret" value="<?php echo get_sanitize_input($config['cf_twitter_secret']); ?>" id="cf_twitter_secret" class="frm_input" size="45">
</td>
</tr>
<tr>
<th scope="row"><label for="cf_google_clientid">구글 Client ID</label></th>
<td>
<input type="text" name="cf_google_clientid" value="<?php echo $config['cf_google_clientid'] ?>" id="cf_google_clientid" class="frm_input" size="40"> <a href="https://console.developers.google.com" target="_blank" class="btn_frmline">앱 등록하기</a>
<input type="text" name="cf_google_clientid" value="<?php echo get_sanitize_input($config['cf_google_clientid']); ?>" id="cf_google_clientid" class="frm_input" size="40"> <a href="https://console.developers.google.com" target="_blank" class="btn_frmline">앱 등록하기</a>
</td>
<th scope="row"><label for="cf_google_secret">구글 Client Secret</label></th>
<td>
<input type="text" name="cf_google_secret" value="<?php echo $config['cf_google_secret'] ?>" id="cf_google_secret" class="frm_input" size="45">
<input type="text" name="cf_google_secret" value="<?php echo get_sanitize_input($config['cf_google_secret']); ?>" id="cf_google_secret" class="frm_input" size="45">
</td>
</tr>
<tr>
<th scope="row"><label for="cf_googl_shorturl_apikey">구글 짧은주소 API Key</label></th>
<td colspan="3">
<input type="text" name="cf_googl_shorturl_apikey" value="<?php echo $config['cf_googl_shorturl_apikey'] ?>" id="cf_googl_shorturl_apikey" class="frm_input" size="40"> <a href="http://code.google.com/apis/console/" target="_blank" class="btn_frmline">API Key 등록하기</a>
<input type="text" name="cf_googl_shorturl_apikey" value="<?php echo get_sanitize_input($config['cf_googl_shorturl_apikey']); ?>" id="cf_googl_shorturl_apikey" class="frm_input" size="40"> <a href="http://code.google.com/apis/console/" target="_blank" class="btn_frmline">API Key 등록하기</a>
</td>
</tr>
<tr>
<th scope="row"><label for="cf_kakao_rest_key">카카오 REST API 키</label></th>
<td>
<input type="text" name="cf_kakao_rest_key" value="<?php echo $config['cf_kakao_rest_key'] ?>" id="cf_kakao_rest_key" class="frm_input" size="40"> <a href="https://developers.kakao.com/product/kakaoLogin" target="_blank" class="btn_frmline">앱 등록하기</a>
<input type="text" name="cf_kakao_rest_key" value="<?php echo get_sanitize_input($config['cf_kakao_rest_key']); ?>" id="cf_kakao_rest_key" class="frm_input" size="40"> <a href="https://developers.kakao.com/product/kakaoLogin" target="_blank" class="btn_frmline">앱 등록하기</a>
</td>
<th scope="row"><label for="cf_kakao_client_secret">카카오 Client Secret</label></th>
<td>
<input type="text" name="cf_kakao_client_secret" value="<?php echo $config['cf_kakao_client_secret'] ?>" id="cf_kakao_client_secret" class="frm_input" size="45">
<input type="text" name="cf_kakao_client_secret" value="<?php echo get_sanitize_input($config['cf_kakao_client_secret']); ?>" id="cf_kakao_client_secret" class="frm_input" size="45">
</td>
</tr>
<tr>
<th scope="row"><label for="cf_kakao_js_apikey">카카오 JavaScript 키</label></th>
<td colspan="3">
<input type="text" name="cf_kakao_js_apikey" value="<?php echo $config['cf_kakao_js_apikey'] ?>" id="cf_kakao_js_apikey" class="frm_input" size="45">
<input type="text" name="cf_kakao_js_apikey" value="<?php echo get_sanitize_input($config['cf_kakao_js_apikey']); ?>" id="cf_kakao_js_apikey" class="frm_input" size="45">
</td>
</tr>
<tr>
<th scope="row"><label for="cf_payco_clientid">페이코 Client ID</label></th>
<td>
<input type="text" name="cf_payco_clientid" value="<?php echo $config['cf_payco_clientid']; ?>" id="cf_payco_clientid" class="frm_input" size="40"> <a href="https://developers.payco.com/guide" target="_blank" class="btn_frmline">앱 등록하기</a>
<input type="text" name="cf_payco_clientid" value="<?php echo get_sanitize_input($config['cf_payco_clientid']); ?>" id="cf_payco_clientid" class="frm_input" size="40"> <a href="https://developers.payco.com/guide" target="_blank" class="btn_frmline">앱 등록하기</a>
</td>
<th scope="row"><label for="cf_payco_secret">페이코 Secret</label></th>
<td>
<input type="text" name="cf_payco_secret" value="<?php echo $config['cf_payco_secret']; ?>" id="cf_payco_secret" class="frm_input" size="45">
<input type="text" name="cf_payco_secret" value="<?php echo get_sanitize_input($config['cf_payco_secret']); ?>" id="cf_payco_secret" class="frm_input" size="45">
</td>
</tr>
</tbody>
@@ -1276,20 +1276,20 @@ include_once('_rewrite_config_form.php');
<th scope="row"><label for="cf_icode_id">아이코드 회원아이디<br>(구버전)</label></th>
<td>
<?php echo help("아이코드에서 사용하시는 회원아이디를 입력합니다."); ?>
<input type="text" name="cf_icode_id" value="<?php echo $config['cf_icode_id']; ?>" id="cf_icode_id" class="frm_input" size="20">
<input type="text" name="cf_icode_id" value="<?php echo get_sanitize_input($config['cf_icode_id']); ?>" id="cf_icode_id" class="frm_input" size="20">
</td>
</tr>
<tr class="icode_old_version">
<th scope="row"><label for="cf_icode_pw">아이코드 비밀번호<br>(구버전)</label></th>
<td>
<?php echo help("아이코드에서 사용하시는 비밀번호를 입력합니다."); ?>
<input type="password" name="cf_icode_pw" value="<?php echo $config['cf_icode_pw']; ?>" id="cf_icode_pw" class="frm_input">
<input type="password" name="cf_icode_pw" value="<?php echo get_sanitize_input($config['cf_icode_pw']); ?>" id="cf_icode_pw" class="frm_input">
</td>
</tr>
<tr class="icode_old_version <?php if(!(isset($userinfo['payment']) && $userinfo['payment'])){ echo 'cf_tr_hide'; } ?>">
<th scope="row">요금제<br>(구버전)</th>
<td>
<input type="hidden" name="cf_icode_server_ip" value="<?php echo $config['cf_icode_server_ip']; ?>">
<input type="hidden" name="cf_icode_server_ip" value="<?php echo get_sanitize_input($config['cf_icode_server_ip']); ?>">
<?php
if ($userinfo['payment'] == 'A') {
echo '충전제';
@@ -1309,7 +1309,7 @@ include_once('_rewrite_config_form.php');
<th scope="row">충전 잔액<br>(구버전)</th>
<td>
<?php echo number_format($userinfo['coin']); ?> 원.
<a href="http://www.icodekorea.com/smsbiz/credit_card_amt.php?icode_id=<?php echo $config['cf_icode_id']; ?>&amp;icode_passwd=<?php echo $config['cf_icode_pw']; ?>" target="_blank" class="btn_frmline">충전하기</a>
<a href="http://www.icodekorea.com/smsbiz/credit_card_amt.php?icode_id=<?php echo get_text($config['cf_icode_id']); ?>&amp;icode_passwd=<?php echo get_text($config['cf_icode_pw']); ?>" target="_blank" class="btn_frmline">충전하기</a>
</td>
</tr>
<?php } ?>
@@ -1317,7 +1317,7 @@ include_once('_rewrite_config_form.php');
<th scope="row"><label for="cf_icode_token_key">아이코드 토큰키<br>(JSON버전)</label></th>
<td>
<?php echo help("아이코드 JSON 버전의 경우 아이코드 토큰키를 입력시 실행됩니다.<br>SMS 전송유형을 LMS로 설정시 90바이트 이내는 SMS, 90 ~ 2000 바이트는 LMS 그 이상은 절삭 되어 LMS로 발송됩니다."); ?>
<input type="text" name="cf_icode_token_key" value="<?php echo $config['cf_icode_token_key']; ?>" id="cf_icode_token_key" class="frm_input" size="40">
<input type="text" name="cf_icode_token_key" value="<?php echo isset($config['cf_icode_token_key']) ? get_sanitize_input($config['cf_icode_token_key']) : ''; ?>" id="cf_icode_token_key" class="frm_input" size="40">
<?php echo help("아이코드 사이트 -> 토큰키관리 메뉴에서 생성한 토큰키를 입력합니다."); ?>
<br>
서버아이피 : <?php echo $_SERVER['SERVER_ADDR']; ?>
+5 -1
View File
@@ -162,7 +162,11 @@ foreach( $check_keys as $k => $v ){
if( $v === 'int' ){
$posts[$key] = $_POST[$k] = isset($_POST[$k]) ? (int) $_POST[$k] : 0;
} else {
$posts[$key] = $_POST[$k] = isset($_POST[$k]) ? $_POST[$k] : '';
if(in_array($k, array('cf_analytics', 'cf_add_meta', 'cf_add_script', 'cf_stipulation', 'cf_privacy'))){
$posts[$key] = $_POST[$k] = isset($_POST[$k]) ? $_POST[$k] : '';
} else {
$posts[$key] = $_POST[$k] = isset($_POST[$k]) ? strip_tags(clean_xss_attributes($_POST[$k])) : '';
}
}
}
+14 -7
View File
@@ -12,24 +12,31 @@ else
check_admin_token();
$co_row = array('co_id'=>'', 'co_include_head'=>'', 'co_include_tail'=>'');
if ($w == "" || $w == "u")
{
if(isset($_POST['co_id']) && preg_match("/[^a-z0-9_]/i", $_POST['co_id'])) alert("ID 는 영문자, 숫자, _ 만 가능합니다.");
if(isset($_REQUEST['co_id']) && preg_match("/[^a-z0-9_]/i", $_REQUEST['co_id'])) alert("ID 는 영문자, 숫자, _ 만 가능합니다.");
$sql = " select * from {$g5['content_table']} where co_id = '$co_id' ";
$co_row = sql_fetch($sql);
}
$co_id = isset($_POST['co_id']) ? preg_replace('/[^a-z0-9_]/i', '', $_POST['co_id']) : '';
$co_subject = strip_tags(clean_xss_attributes($co_subject));
$co_include_head = preg_replace(array("#[\\\]+$#", "#(<\?php|<\?)#i"), "", substr($co_include_head, 0, 255));
$co_include_tail = preg_replace(array("#[\\\]+$#", "#(<\?php|<\?)#i"), "", substr($co_include_tail, 0, 255));
$co_id = isset($_REQUEST['co_id']) ? preg_replace('/[^a-z0-9_]/i', '', $_REQUEST['co_id']) : '';
$co_subject = isset($_POST['co_subject']) ? strip_tags(clean_xss_attributes($_POST['co_subject'])) : '';
$co_include_head = isset($_POST['co_include_head']) ? preg_replace(array("#[\\\]+$#", "#(<\?php|<\?)#i"), "", substr($_POST['co_include_head'], 0, 255)) : '';
$co_include_tail = isset($_POST['co_include_tail']) ? preg_replace(array("#[\\\]+$#", "#(<\?php|<\?)#i"), "", substr($_POST['co_include_tail'], 0, 255)) : '';
$co_tag_filter_use = isset($_POST['co_tag_filter_use']) ? (int) $_POST['co_tag_filter_use'] : 1;
$co_himg_del = (isset($_POST['co_himg_del']) && $_POST['co_himg_del']) ? 1 : 0;
$co_timg_del = (isset($_POST['co_timg_del']) && $_POST['co_timg_del']) ? 1 : 0;
$co_html = isset($_POST['co_html']) ? (int) $_POST['co_html'] : 0;
$co_content = isset($_POST['co_content']) ? $_POST['co_content'] : '';
$co_mobile_content = isset($_POST['co_mobile_content']) ? $_POST['co_mobile_content'] : '';
$co_skin = isset($_POST['co_skin']) ? clean_xss_tags($_POST['co_skin'], 1, 1) : '';
$co_mobile_skin = isset($_POST['co_mobile_skin']) ? clean_xss_tags($_POST['co_mobile_skin'], 1, 1) : '';
// 관리자가 자동등록방지를 사용해야 할 경우
if (($co_row['co_include_head'] !== $co_include_head || $co_row['co_include_tail'] !== $co_include_tail) && function_exists('get_admin_captcha_by') && get_admin_captcha_by()){
if ((( isset($co_row['co_include_head']) && $co_row['co_include_head'] !== $co_include_head ) || ( isset($co_row['co_include_tail']) && $co_row['co_include_tail'] !== $co_include_tail )) && function_exists('get_admin_captcha_by') && get_admin_captcha_by()){
include_once(G5_CAPTCHA_PATH.'/captcha.lib.php');
if (!chk_captcha()) {
@@ -94,7 +101,7 @@ $sql_common = " co_include_head = '$co_include_head',
if ($w == "")
{
$row = $co_row;
if ($row['co_id'])
if (isset($row['co_id']) && $row['co_id'])
alert("이미 같은 ID로 등록된 내용이 있습니다.");
$sql = " insert {$g5['content_table']}
+2 -2
View File
@@ -12,11 +12,11 @@ else
check_admin_token();
$fm_id = isset($_POST['fm_id']) ? (int) $_POST['fm_id'] : 0;
$fm_id = isset($_REQUEST['fm_id']) ? (int) $_REQUEST['fm_id'] : 0;
$fa_id = isset($_REQUEST['fa_id']) ? (int) $_REQUEST['fa_id'] : 0;
$fa_subject = isset($_POST['fa_subject']) ? $_POST['fa_subject'] : '';
$fa_content = isset($_POST['fa_content']) ? $_POST['fa_content'] : '';
$fa_order = isset($_POST['fa_order']) ? (int) $_POST['fa_order'] : 0;
$fa_id = isset($_POST['fa_id']) ? (int) $_POST['fa_id'] : 0;
$sql_common = " fa_subject = '$fa_subject',
fa_content = '$fa_content',
+1 -1
View File
@@ -15,7 +15,7 @@ check_admin_token();
@mkdir(G5_DATA_PATH."/faq", G5_DIR_PERMISSION);
@chmod(G5_DATA_PATH."/faq", G5_DIR_PERMISSION);
$fm_id = isset($_POST['fm_id']) ? (int) $_POST['fm_id'] : 0;
$fm_id = isset($_REQUEST['fm_id']) ? (int) $_REQUEST['fm_id'] : 0;
$fm_himg_del = isset($_POST['fm_himg_del']) ? (int) $_POST['fm_himg_del'] : 0;
$fm_timg_del = isset($_POST['fm_timg_del']) ? (int) $_POST['fm_timg_del'] : 0;
$fm_subject = isset($_POST['fm_subject']) ? strip_tags(clean_xss_attributes($_POST['fm_subject'])) : '';
+2 -2
View File
@@ -10,10 +10,10 @@ check_admin_token();
$post_count_chk = (isset($_POST['chk']) && is_array($_POST['chk'])) ? count($_POST['chk']) : 0;
if(!$count)
if(! $post_count_chk)
alert('삭제할 메일목록을 1개이상 선택해 주세요.');
for($i=0; $i<$count; $i++) {
for($i=0; $i<$post_count_chk; $i++) {
$ma_id = isset($_POST['chk'][$i]) ? (int) $_POST['chk'][$i] : 0;
$sql = " delete from {$g5['mail_table']} where ma_id = '$ma_id' ";
+1
View File
@@ -8,6 +8,7 @@ if ($is_admin != 'super')
$g5['title'] = '메뉴 추가';
include_once(G5_PATH.'/head.sub.php');
$new = isset($_GET['new']) ? clean_xss_tags($_GET['new'], 1, 1) : '';
$code = isset($_GET['code']) ? preg_replace('/[^0-9a-zA-Z]/', '', $_GET['code']) : '';
// 코드
+5 -1
View File
@@ -21,7 +21,11 @@ for ($i=0; $i<$count; $i++)
{
$_POST = array_map_deep('trim', $_POST);
$_POST['me_link'][$i] = is_array($_POST['me_link']) ? clean_xss_tags(clean_xss_attributes($_POST['me_link'][$i], 1)) : '';
if(preg_match('/^javascript/i', preg_replace('/[ ]{1,}|[\t]/', '', $_POST['me_link'][$i]))){
$_POST['me_link'][$i] = G5_URL;
}
$_POST['me_link'][$i] = is_array($_POST['me_link']) ? clean_xss_tags(clean_xss_attributes(preg_replace('/[ ]{2,}|[\t]/', '', $_POST['me_link'][$i]), 1)) : '';
$code = is_array($_POST['code']) ? strip_tags($_POST['code'][$i]) : '';
$me_name = is_array($_POST['me_name']) ? strip_tags($_POST['me_name'][$i]) : '';
+1 -1
View File
@@ -2,7 +2,7 @@
$sub_menu = '100310';
include_once('./_common.php');
$nw_id = isset($_POST['nw_id']) ? preg_replace('/[^0-9]/', '', $_POST['nw_id']) : 0;
$nw_id = isset($_REQUEST['nw_id']) ? preg_replace('/[^0-9]/', '', $_REQUEST['nw_id']) : 0;
if ($w == "u" || $w == "d")
check_demo();
+9 -1
View File
@@ -61,9 +61,17 @@ if( function_exists('filter_input_include_path') ){
$qa_include_tail = filter_input_include_path($qa_include_tail);
}
// 분류에 & 나 = 는 사용이 불가하므로 2바이트로 바꾼다.
$src_char = array('&', '=');
$dst_char = array('&', '〓');
$qa_category = str_replace($src_char, $dst_char, $_POST['qa_category']);
//https://github.com/gnuboard/gnuboard5/commit/f5f4925d4eb28ba1af728e1065fc2bdd9ce1da58 에 따른 조치
$qa_category = preg_replace("/[\<\>\'\"\\\'\\\"\%\=\(\)\/\^\*]/", "", $qa_category);
$sql = " update {$g5['qa_config_table']}
set qa_title = '{$_POST['qa_title']}',
qa_category = '{$_POST['qa_category']}',
qa_category = '{$qa_category}',
qa_skin = '{$_POST['qa_skin']}',
qa_mobile_skin = '{$_POST['qa_mobile_skin']}',
qa_use_email = '{$_POST['qa_use_email']}',
+7 -8
View File
@@ -1,4 +1,5 @@
<?php
$sub_menu = "900600";
include_once('./_common.php');
auth_check_menu($auth, $sub_menu, "r");
@@ -46,18 +47,16 @@ if ($sw == 'move')
$msg = '해당 이모티콘을 선택한 그룹으로 이동 하였습니다.';
$opener_href = './form_list.php?page='.$page;
echo <<<HEREDOC
?>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<script>
alert("$msg");
opener.document.location.href = "$opener_href";
alert("<?php echo $msg; ?>");
opener.document.location.href = "<?php echo $opener_href; ?>";
window.close();
</script>
<noscript>
<p>
"$msg"
<?php echo $msg; ?>
</p>
<a href="$opener_href">돌아가기</a>
</noscript>
HEREDOC;
<a href="<?php echo $opener_href; ?>">돌아가기</a>
</noscript>
+1 -1
View File
@@ -136,7 +136,7 @@ function grouplist_submit(f)
</td>
<td class="td_left">
<label for="fg_name_<?php echo $i; ?>" class="sound_only">그룹명</label>
<input type="text" name="fg_name[<?php echo $i; ?>]" value="<?php echo $group[$i]['fg_name']?>" id="fg_name_<?php echo $i; ?>" class="frm_input">
<input type="text" name="fg_name[<?php echo $i; ?>]" value="<?php echo get_sanitize_input($group[$i]['fg_name']); ?>" id="fg_name_<?php echo $i; ?>" class="frm_input">
<input type="checkbox" name="fg_member[<?php echo $i; ?>]" value="1" id="fg_member_<?php echo $i; ?>" <?php if ($group[$i]['fg_member']) echo 'checked';?>>
<label for="fg_member_<?php echo $i; ?>">회원</label>
</td>
+3 -3
View File
@@ -13,7 +13,7 @@ if ($w == 'u') // 업데이트
// 실제 번호를 넘김
$k = $post_cnk[$i];
$fg_no = isset($_POST['fg_no'][$k]) ? (int) $_POST['fg_no'][$k] : 0;
$fg_name = isset($_POST['fg_name'][$k]) ? addslashes(strip_tags($_POST['fg_name'][$k])) : '';
$fg_name = isset($_POST['fg_name'][$k]) ? addslashes(strip_tags(clean_xss_attributes($_POST['fg_name'][$k]))) : '';
$fg_member = isset($_POST['fg_member'][$k]) ? addslashes(strip_tags($_POST['fg_member'][$k])) : '';
if (!is_numeric($fg_no))
@@ -82,11 +82,11 @@ else if ($w == 'no')
}
else // 등록
{
$fg_name = isset($_POST['fg_name']) ? addslashes(strip_tags(clean_xss_attributes($_POST['fg_name']))) : '';
if (!strlen(trim($fg_name)))
alert('그룹명을 입력해주세요');
$fg_name = addslashes(strip_tags($fg_name));
$res = sql_fetch("select fg_name from {$g5['sms5_form_group_table']} where fg_name = '$fg_name'");
if ($res)
alert('같은 그룹명이 존재합니다.');
+5 -4
View File
@@ -34,7 +34,7 @@ if ($st == 'all') {
}
$total_res = sql_fetch("select count(*) as cnt from {$g5['sms5_form_table']} where 1 $sql_group $sql_search");
$total_count = $total_res['cnt'];
$total_count = isset($total_res['cnt']) ? $total_res['cnt'] : 0;
$total_page = (int)($total_count/$page_size) + ($total_count%$page_size==0 ? 0 : 1);
$page_start = $page_size * ( $page - 1 );
@@ -46,7 +46,7 @@ $qry = sql_query("select * from {$g5['sms5_form_group_table']} order by fg_name"
while ($res = sql_fetch_array($qry)) array_push($group, $res);
$res = sql_fetch("select count(*) as cnt from {$g5['sms5_form_table']} where fg_no=0");
$no_count = $res['cnt'];
$no_count = isset($res['cnt']) ? $res['cnt'] : 0;
include_once(G5_ADMIN_PATH.'/admin.head.php');
?>
@@ -146,6 +146,7 @@ function multi_update(sel)
<form name="emoticonlist" id="emoticonlist" method="post" action="./form_multi_update.php" onsubmit="return emoticonlist_submit(this);" >
<input type="hidden" name="page" value="<?php echo $page; ?>">
<input type="hidden" name="token" value="<?php echo $token; ?>">
<input type="hidden" name="fg_no" value="<?php echo $fg_no; ?>">
<input type="hidden" name="sw" value="">
<input type="hidden" name="atype" value="del">
<ul id="sms5_preset" class="sms5_box">
@@ -234,7 +235,7 @@ function select_copy(sw, f) {
}
</script>
<?php echo get_paging(G5_IS_MOBILE ? $config['cf_mobile_pages'] : $config['cf_write_pages'], $page, $total_page, $_SERVER['SCRIPT_NAME']."?fg_no=$fg_no&amp;st=$st&amp;sv=$sv&amp;page="); ?>
<?php
echo get_paging(G5_IS_MOBILE ? $config['cf_mobile_pages'] : $config['cf_write_pages'], $page, $total_page, $_SERVER['SCRIPT_NAME']."?fg_no=$fg_no&amp;st=$st&amp;sv=$sv&amp;page=");
include_once(G5_ADMIN_PATH.'/admin.tail.php');
+2 -1
View File
@@ -8,6 +8,7 @@ check_admin_token();
$post_fo_no = (isset($_POST['fo_no']) && is_array($_POST['fo_no'])) ? $_POST['fo_no'] : array();
$atype = isset($_POST['atype']) ? clean_xss_tags($_POST['atype'], 1, 1) : '';
$fg_no = isset($_POST['fg_no']) ? (int) $_POST['fg_no'] : 0;
if($atype == "del"){
$count = count($post_fo_no);
@@ -27,4 +28,4 @@ if($atype == "del"){
sql_query("update {$g5['sms5_form_group_table']} set fg_count = fg_count - 1 where fg_no='{$res['fg_no']}'");
}
}
goto_url('./form_list.php');
goto_url('./form_list.php?fg_no='.$fg_no);
+1
View File
@@ -7,6 +7,7 @@ auth_check_menu($auth, $sub_menu, "w");
$fo_name = isset($_REQUEST['fo_name']) ? strip_tags(clean_xss_attributes($_REQUEST['fo_name'])) : '';
$fo_content = isset($_REQUEST['fo_content']) ? strip_tags(clean_xss_attributes($_REQUEST['fo_content'])) : '';
$fo_receipt = isset($_REQUEST['fo_receipt']) ? clean_xss_tags($_REQUEST['fo_receipt'], 1, 1) : '';
$get_fg_no = '';
$g5['title'] = "이모티콘 업데이트";
+2 -1
View File
@@ -2,6 +2,7 @@
include_once('./_common.php');
$call = isset($_REQUEST['call']) ? strtolower(preg_replace('/[^a-z0-9_]/i', '', $_REQUEST['call'])) : '';
$token = isset($_REQUEST['token']) ? clean_xss_tags($_REQUEST['token'], 1, 1) : '';
if( ! $call ){
return;
@@ -10,7 +11,7 @@ if( ! $call ){
if( ! $is_admin ){
$sql = " select count(*) as cnt from {$g5['auth_table']} where mb_id = '{$member['mb_id']}' ";
$row = sql_fetch($sql);
if ( ! $row['cnt']) {
if (! (isset($row['cnt']) && $row['cnt'])) {
return;
}
}
+16 -15
View File
@@ -2,6 +2,7 @@
include_once('./_common.php');
$co_id = isset($_GET['co_id']) ? preg_replace('/[^a-z0-9_]/i', '', $_GET['co_id']) : 0;
$co_seo_title = isset($_GET['co_seo_title']) ? clean_xss_tags($_GET['co_seo_title'], 1, 1) : '';
//dbconfig파일에 $g5['content_table'] 배열변수가 있는지 체크
if( !isset($g5['content_table']) ){
@@ -11,12 +12,12 @@ if( !isset($g5['content_table']) ){
// 내용
if($co_seo_title){
$co = get_content_by_field($g5['content_table'], 'content', 'co_seo_title', generate_seo_title($co_seo_title));
$co_id = $co['co_id'];
$co_id = isset($co['co_id']) ? $co['co_id'] : 0;
} else {
$co = get_content_db($co_id);
}
if( ! (isset($co['co_seo_title']) && $co['co_seo_title']) && $co['co_id'] ){
if( ! (isset($co['co_seo_title']) && $co['co_seo_title']) && isset($co['co_id']) && $co['co_id'] ){
seo_title_update($g5['content_table'], $co['co_id'], 'content');
}
@@ -25,7 +26,7 @@ if (G5_IS_MOBILE) {
return;
}
if (!$co['co_id'])
if (! (isset($co['co_id']) && $co['co_id']))
alert('등록된 내용이 없습니다.');
$g5['title'] = $co['co_subject'];
@@ -45,29 +46,29 @@ $src[] = "/{{쇼핑몰명}}|{{홈페이지제목}}/";
$dst[] = $config['cf_title'];
if(isset($default) && isset($default['de_admin_company_name'])){
$src[] = "/{{회사명}}|{{상호}}/";
$dst[] = $default['de_admin_company_name'];
$dst[] = isset($default['de_admin_company_name']) ? $default['de_admin_company_name'] : '';
$src[] = "/{{대표자명}}/";
$dst[] = $default['de_admin_company_owner'];
$dst[] = isset($default['de_admin_company_owner']) ? $default['de_admin_company_owner'] : '';
$src[] = "/{{사업자등록번호}}/";
$dst[] = $default['de_admin_company_saupja_no'];
$dst[] = isset($default['de_admin_company_saupja_no']) ? $default['de_admin_company_saupja_no'] : '';
$src[] = "/{{대표전화번호}}/";
$dst[] = $default['de_admin_company_tel'];
$dst[] = isset($default['de_admin_company_tel']) ? $default['de_admin_company_tel'] : '';
$src[] = "/{{팩스번호}}/";
$dst[] = $default['de_admin_company_fax'];
$dst[] = isset($default['de_admin_company_fax']) ? $default['de_admin_company_fax'] : '';
$src[] = "/{{통신판매업신고번호}}/";
$dst[] = $default['de_admin_company_tongsin_no'];
$dst[] = isset($default['de_admin_company_tongsin_no']) ? $default['de_admin_company_tongsin_no'] : '';
$src[] = "/{{사업장우편번호}}/";
$dst[] = $default['de_admin_company_zip'];
$dst[] = isset($default['de_admin_company_zip']) ? $default['de_admin_company_zip'] : '';
$src[] = "/{{사업장주소}}/";
$dst[] = $default['de_admin_company_addr'];
$dst[] = isset($default['de_admin_company_addr']) ? $default['de_admin_company_addr'] : '';
$src[] = "/{{운영자명}}|{{관리자명}}/";
$dst[] = $default['de_admin_name'];
$dst[] = isset($default['de_admin_name']) ? $default['de_admin_name'] : '';
$src[] = "/{{운영자e-mail}}|{{관리자e-mail}}/i";
$dst[] = $default['de_admin_email'];
$dst[] = isset($default['de_admin_email']) ? $default['de_admin_email'] : '';
$src[] = "/{{정보관리책임자명}}/";
$dst[] = $default['de_admin_info_name'];
$dst[] = isset($default['de_admin_info_name']) ? $default['de_admin_info_name'] : '';
$src[] = "/{{정보관리책임자e-mail}}|{{정보책임자e-mail}}/i";
$dst[] = $default['de_admin_info_email'];
$dst[] = isset($default['de_admin_info_email']) ? $default['de_admin_info_email'] : '';
}
$str = preg_replace($src, $dst, $str);
+1 -1
View File
@@ -25,7 +25,7 @@ else {
$count_chk_wr_id = (isset($_POST['chk_wr_id']) && is_array($_POST['chk_wr_id'])) ? count($_POST['chk_wr_id']) : 0;
for ($i=0; $i<count($count_chk_wr_id); $i++) {
for ($i=0; $i<$count_chk_wr_id; $i++) {
$wr_id_val = isset($_POST['chk_wr_id'][$i]) ? preg_replace('/[^0-9]/', '', $_POST['chk_wr_id'][$i]) : 0;
$wr_id_list .= $comma . $wr_id_val;
$comma = ',';
+22 -11
View File
@@ -130,7 +130,20 @@ while ($row = sql_fetch_array($result))
{
// 원본파일을 복사하고 퍼미션을 변경
// 제이프로님 코드제안 적용
$copy_file_name = ($bo_table !== $move_bo_table) ? $row3['bf_file'] : $row2['wr_id'].'_copy_'.$insert_id.'_'.$row3['bf_file'];
$copy_file_name = $row3['bf_file'];
if($bo_table === $move_bo_table){
if(preg_match('/_copy(\d+)?_(\d+)_/', $copy_file_name, $match)){
$number = isset($match[1]) ? (int) $match[1] : 0;
$replace_str = '_copy'.($number + 1).'_'.$insert_id.'_';
$copy_file_name = preg_replace('/_copy(\d+)?_(\d+)_/', $replace_str, $copy_file_name);
} else {
$copy_file_name = $row2['wr_id'].'_copy_'.$insert_id.'_'.$row3['bf_file'];
}
}
$is_exist_file = is_file($src_dir.'/'.$row3['bf_file']) && file_exists($src_dir.'/'.$row3['bf_file']);
if( $is_exist_file ){
@copy($src_dir.'/'.$row3['bf_file'], $dst_dir.'/'.$copy_file_name);
@@ -193,12 +206,12 @@ while ($row = sql_fetch_array($result))
$save[$cnt]['wr_id'] = $row2['wr_parent'];
$cnt++;
run_event('bbs_move_copy', $row2, $move_bo_table, $insert_id, $next_wr_num, $sw);
}
sql_query(" update {$g5['board_table']} set bo_count_write = bo_count_write + '$count_write' where bo_table = '$move_bo_table' ");
sql_query(" update {$g5['board_table']} set bo_count_comment = bo_count_comment + '$count_comment' where bo_table = '$move_bo_table' ");
run_event('bbs_move_copy', $row2, $move_bo_table, $insert_id, $next_wr_num, $sw);
delete_cache_latest($move_bo_table);
}
@@ -242,18 +255,16 @@ $opener_href = get_pretty_url($bo_table,'','&amp;page='.$page.'&amp;'.$qstr);
$opener_href1 = str_replace('&amp;', '&', $opener_href);
run_event('bbs_move_update', $bo_table, $chk_bo_table, $wr_id_list, $opener_href);
echo <<<HEREDOC
?>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<script>
alert("$msg");
opener.document.location.href = "$opener_href1";
alert("<?php echo $msg; ?>");
opener.document.location.href = "<?php echo $opener_href1; ?>";
window.close();
</script>
<noscript>
<p>
"$msg"
<?php echo $msg; ?>
</p>
<a href="$opener_href">돌아가기</a>
</noscript>
HEREDOC;
<a href="<?php echo $opener_href; ?>">돌아가기</a>
</noscript>
+17 -8
View File
@@ -10,7 +10,6 @@ $board = array('bo_table'=>'');
$save_bo_table = array();
$save_wr_id = array();
$count_chk_bn_id = (isset($_POST['chk_bn_id']) && is_array($_POST['chk_bn_id'])) ? count($_POST['chk_bn_id']) : 0;
$count_write = 0;
for($i=0;$i<$count_chk_bn_id;$i++)
{
@@ -19,6 +18,8 @@ for($i=0;$i<$count_chk_bn_id;$i++)
$bo_table = isset($_POST['bo_table'][$k]) ? preg_replace('/[^a-z0-9_]/i', '', $_POST['bo_table'][$k]) : '';
$wr_id = isset($_POST['wr_id'][$k]) ? preg_replace('/[^0-9]/i', '', $_POST['wr_id'][$k]) : 0;
$count_write = $count_comment = 0;
$save_bo_table[$i] = $bo_table;
$save_wr_id[$i] = $wr_id;
@@ -52,9 +53,17 @@ for($i=0;$i<$count_chk_bn_id;$i++)
// 업로드된 파일이 있다면 파일삭제
$sql2 = " select * from {$g5['board_file_table']} where bo_table = '$bo_table' and wr_id = '{$row['wr_id']}' ";
$result2 = sql_query($sql2);
while ($row2 = sql_fetch_array($result2))
@unlink(G5_DATA_PATH.'/file/'.$bo_table.'/'.$row2['bf_file']);
while ($row2 = sql_fetch_array($result2)){
$delete_file = run_replace('delete_file_path', G5_DATA_PATH.'/file/'.$bo_table.'/'.str_replace('../', '', $row2['bf_file']), $row2);
if( file_exists($delete_file) ){
@unlink(G5_DATA_PATH.'/file/'.$bo_table.'/'.$row2['bf_file']);
}
// 이미지파일이면 썸네일삭제
if(preg_match("/\.({$config['cf_image_extension']})$/i", $row2['bf_file'])) {
delete_board_thumbnail($bo_table, $row2['bf_file']);
}
}
// 파일테이블 행 삭제
sql_query(" delete from {$g5['board_file_table']} where bo_table = '$bo_table' and wr_id = '{$row['wr_id']}' ");
@@ -62,9 +71,9 @@ for($i=0;$i<$count_chk_bn_id;$i++)
}
else
{
// 코멘트 포인트 삭제
if (!delete_point($row['mb_id'], $bo_table, $row['wr_id'], '코멘트'))
insert_point($row['mb_id'], $board['bo_comment_point'] * (-1), "{$board['bo_subject']} {$write['wr_id']}-{$row['wr_id']} 코멘트삭제");
// 댓글 포인트 삭제
if (!delete_point($row['mb_id'], $bo_table, $row['wr_id'], '댓글'))
insert_point($row['mb_id'], $board['bo_comment_point'] * (-1), "{$board['bo_subject']} {$write['wr_id']}-{$row['wr_id']} 댓글삭제");
$count_comment++;
}
@@ -119,8 +128,8 @@ for($i=0;$i<$count_chk_bn_id;$i++)
$comment_reply = substr($write['wr_comment_reply'], 0, $len);
// 코멘트 삭제
if (!delete_point($write['mb_id'], $bo_table, $comment_id, '코멘트')) {
insert_point($write['mb_id'], $board['bo_comment_point'] * (-1), "{$board['bo_subject']} {$write['wr_parent']}-{$comment_id} 코멘트삭제");
if (!delete_point($write['mb_id'], $bo_table, $comment_id, '댓글')) {
insert_point($write['mb_id'], $board['bo_comment_point'] * (-1), "{$board['bo_subject']} {$write['wr_parent']}-{$comment_id} 댓글삭제");
}
// 코멘트 삭제
+11
View File
@@ -21,6 +21,17 @@ $total_page = ceil($total_count / $rows); // 전체 페이지 계산
if ($page < 1) { $page = 1; } // 페이지가 없으면 첫 페이지 (1 페이지)
$from_record = ($page - 1) * $rows; // 시작 열을 구함
$sql = " select *
{$sql_common}
{$sql_order}
limit {$from_record}, {$rows} ";
$result = sql_query($sql);
for ($i=0; $row=sql_fetch_array($result); $i++) {
$list[] = $row;
}
include_once($member_skin_path.'/point.skin.php');
include_once(G5_PATH.'/tail.sub.php');
+2 -2
View File
@@ -45,7 +45,7 @@ for($i=0; $i<$count; $i++) {
// 첨부파일 삭제
for($k=1; $k<=2; $k++) {
@unlink(G5_DATA_PATH.'/qa/'.$row['qa_file'.$k]);
@unlink(G5_DATA_PATH.'/qa/'.clean_relative_paths($row['qa_file'.$k]));
// 썸네일삭제
if(preg_match("/\.({$config['cf_image_extension']})$/i", $row['qa_file'.$k])) {
delete_qa_thumbnail($row['qa_file'.$k]);
@@ -60,7 +60,7 @@ for($i=0; $i<$count; $i++) {
$row2 = sql_fetch(" select qa_content, qa_file1, qa_file2 from {$g5['qa_content_table']} where qa_parent = '$qa_id' ");
// 첨부파일 삭제
for($k=1; $k<=2; $k++) {
@unlink(G5_DATA_PATH.'/qa/'.$row2['qa_file'.$k]);
@unlink(G5_DATA_PATH.'/qa/'.clean_relative_paths($row2['qa_file'.$k]));
// 썸네일삭제
if(preg_match("/\.({$config['cf_image_extension']})$/i", $row2['qa_file'.$k])) {
delete_qa_thumbnail($row2['qa_file'.$k]);
+4 -4
View File
@@ -19,7 +19,7 @@ $token = isset($_POST['token']) ? clean_xss_tags($_POST['token'], 1, 1) : '';
//모든 회원의 토큰을 검사합니다.
if (!($token && $write_token === $token))
alert('토큰 에러로 삭제 불가합니다.');
alert('올바른 방법으로 이용해 주십시오.');
// 1:1문의 설정값
$qaconfig = get_qa_config();
@@ -157,7 +157,7 @@ for ($i=1; $i<=$upload_count; $i++) {
// 삭제에 체크가 되어있다면 파일을 삭제합니다.
if (isset($_POST['bf_file_del'][$i]) && $_POST['bf_file_del'][$i]) {
$upload[$i]['del_check'] = true;
@unlink(G5_DATA_PATH.'/qa/'.$write['qa_file'.$i]);
@unlink(G5_DATA_PATH.'/qa/'.clean_relative_paths($write['qa_file'.$i]));
// 썸네일삭제
if(preg_match("/\.({$config['cf_image_extension']})$/i", $write['qa_file'.$i])) {
delete_qa_thumbnail($write['qa_file'.$i]);
@@ -204,7 +204,7 @@ for ($i=1; $i<=$upload_count; $i++) {
if ($w == 'u') {
// 존재하는 파일이 있다면 삭제합니다.
@unlink(G5_DATA_PATH.'/qa/'.$write['qa_file'.$i]);
@unlink(G5_DATA_PATH.'/qa/'.clean_relative_paths($write['qa_file'.$i]));
// 이미지파일이면 썸네일삭제
if(preg_match("/\.({$config['cf_image_extension']})$/i", $write['qa_file'.$i])) {
delete_qa_thumbnail($row['qa_file'.$i]);
@@ -244,7 +244,7 @@ if($w == '' || $w == 'a' || $w == 'r') {
$qa_num = $write['qa_num'];
$qa_parent = $write['qa_id'];
$qa_related = $write['qa_related'];
$qa_category = $write['qa_category'];
$qa_category = addslashes($write['qa_category']);
$qa_type = 1;
$qa_status = 1;
}
+4 -4
View File
@@ -34,8 +34,8 @@ if(!$mb_id)
$mb_password = isset($_POST['mb_password']) ? trim($_POST['mb_password']) : '';
$mb_password_re = isset($_POST['mb_password_re']) ? trim($_POST['mb_password_re']) : '';
$mb_name = isset($_POST['mb_name']) ? trim($_POST['mb_name']) : '';
$mb_nick = isset($_POST['mb_name']) ? trim($_POST['mb_nick']) : '';
$mb_email = isset($_POST['mb_name']) ? trim($_POST['mb_email']) : '';
$mb_nick = isset($_POST['mb_nick']) ? trim($_POST['mb_nick']) : '';
$mb_email = isset($_POST['mb_email']) ? trim($_POST['mb_email']) : '';
$mb_sex = isset($_POST['mb_sex']) ? trim($_POST['mb_sex']) : "";
$mb_birth = isset($_POST['mb_birth']) ? trim($_POST['mb_birth']) : "";
$mb_homepage = isset($_POST['mb_homepage']) ? trim($_POST['mb_homepage']) : "";
@@ -512,8 +512,8 @@ if ($config['cf_use_email_certify'] && $old_email != $mb_email) {
if(isset($_SESSION['ss_cert_type'])) unset($_SESSION['ss_cert_type']);
if(isset($_SESSION['ss_cert_no'])) unset($_SESSION['ss_cert_no']);
if(isset($_SESSION['ss_cert_hash'])) unset($_SESSION['ss_cert_hash']);
if(isset($_SESSION['ss_cert_hash'])) unset($_SESSION['ss_cert_birth']);
if(isset($_SESSION['ss_cert_hash'])) unset($_SESSION['ss_cert_adult']);
if(isset($_SESSION['ss_cert_birth'])) unset($_SESSION['ss_cert_birth']);
if(isset($_SESSION['ss_cert_adult'])) unset($_SESSION['ss_cert_adult']);
if ($msg)
echo '<script>alert(\''.$msg.'\');</script>';
+7 -9
View File
@@ -11,7 +11,7 @@ if (!$is_member)
}
// 게시글 존재하는지
if(!$write['wr_id'])
if(! (isset($write['wr_id']) && $write['wr_id']))
alert_close('스크랩하시려는 게시글이 존재하지 않습니다.');
$sql = " select count(*) as cnt from {$g5['scrap_table']}
@@ -19,7 +19,7 @@ $sql = " select count(*) as cnt from {$g5['scrap_table']}
and bo_table = '$bo_table'
and wr_id = '$wr_id' ";
$row = sql_fetch($sql);
if ($row['cnt'])
if (isset($row['cnt']) && $row['cnt'])
{
echo '
<script>
@@ -43,7 +43,7 @@ if ($wr_content && ($member['mb_level'] >= $board['bo_comment_level']))
{
$wr = get_write($write_table, $wr_id);
// 원글이 존재한다면
if ($wr['wr_id'])
if (isset($wr['wr_id']) && $wr['wr_id'])
{
// 세션의 시간 검사
@@ -105,16 +105,14 @@ $sql = " update `{$g5['member_table']}` set mb_scrap_cnt = '".get_scrap_totals($
sql_query($sql);
delete_cache_latest($bo_table);
echo <<<HEREDOC
?>
<script>
if (confirm('이 글을 스크랩 하였습니다.\\n\\n지금 스크랩을 확인하시겠습니까?'))
document.location.href = './scrap.php';
if (confirm("이 글을 스크랩 하였습니다.\n\n지금 스크랩을 확인하시겠습니까?"))
document.location.href = "./scrap.php";
else
window.close();
</script>
<noscript>
<p>이 글을 스크랩 하였습니다.</p>
<a href="./scrap.php">스크랩 확인하기</a>
</noscript>
HEREDOC;
</noscript>
+2 -2
View File
@@ -151,7 +151,7 @@ if ($stx) {
for ($i=0; $i<count($search_table); $i++) {
if ($from_record < $search_table_count[$i]) {
$table_index = $i;
$from_record = $from_record - $search_table_count[$i-1];
$from_record = $from_record - ($i > 0 ? $search_table_count[$i-1] : 0);
break;
}
}
@@ -183,7 +183,7 @@ if ($stx) {
}
// 비밀글은 검색 불가
if (strstr($row['wr_option'].$row2['wr_option'], 'secret'))
if (strstr($row['wr_option'].(isset($row2['wr_option']) ? $row2['wr_option'] : ''), 'secret'))
$row['wr_content'] = '[비밀글 입니다.]';
$subject = get_text($row['wr_subject']);
+2 -2
View File
@@ -28,7 +28,7 @@ if (!$board['bo_use_list_view']) {
$sql = " select wr_id, wr_subject, wr_datetime from {$write_table} where wr_is_comment = 0 and wr_num = '{$write['wr_num']}' and wr_reply < '{$write['wr_reply']}' {$sql_search} order by wr_num desc, wr_reply desc limit 1 ";
$prev = sql_fetch($sql);
// 위의 쿼리문으로 값을 얻지 못했다면
if (isset($prev['wr_id']) && !$prev['wr_id']) {
if (! (isset($prev['wr_id']) && $prev['wr_id'])) {
$sql = " select wr_id, wr_subject, wr_datetime from {$write_table} where wr_is_comment = 0 and wr_num < '{$write['wr_num']}' {$sql_search} order by wr_num desc, wr_reply desc limit 1 ";
$prev = sql_fetch($sql);
}
@@ -37,7 +37,7 @@ if (!$board['bo_use_list_view']) {
$sql = " select wr_id, wr_subject, wr_datetime from {$write_table} where wr_is_comment = 0 and wr_num = '{$write['wr_num']}' and wr_reply > '{$write['wr_reply']}' {$sql_search} order by wr_num, wr_reply limit 1 ";
$next = sql_fetch($sql);
// 위의 쿼리문으로 값을 얻지 못했다면
if (isset($next['wr_id']) && !$next['wr_id']) {
if (! (isset($next['wr_id']) && $next['wr_id'])) {
$sql = " select wr_id, wr_subject, wr_datetime from {$write_table} where wr_is_comment = 0 and wr_num > '{$write['wr_num']}' {$sql_search} order by wr_num, wr_reply limit 1 ";
$next = sql_fetch($sql);
}
+6 -1
View File
@@ -57,6 +57,10 @@ include_once($g5_path['path'].'/config.php'); // 설정 파일
unset($g5_path);
// IIS 에서 SERVER_ADDR 서버변수가 없다면
if(! isset($_SERVER['SERVER_ADDR'])) {
$_SERVER['SERVER_ADDR'] = isset($_SERVER['LOCAL_ADDR']) ? $_SERVER['LOCAL_ADDR'] : '';
}
// multi-dimensional array에 사용자지정 함수적용
function array_map_deep($fn, $array)
@@ -126,7 +130,8 @@ $config = array();
$member = array('mb_id'=>'', 'mb_level'=> 1, 'mb_name'=> '', 'mb_point'=> 0, 'mb_certify'=>'', 'mb_email'=>'', 'mb_open'=>'', 'mb_homepage'=>'', 'mb_tel'=>'', 'mb_hp'=>'', 'mb_zip1'=>'', 'mb_zip2'=>'', 'mb_addr1'=>'', 'mb_addr2'=>'', 'mb_addr3'=>'', 'mb_addr_jibeon'=>'', 'mb_signature'=>'', 'mb_profile'=>'');
$board = array('bo_table'=>'', 'bo_skin'=>'', 'bo_mobile_skin'=>'', 'bo_upload_count' => 0, 'bo_use_dhtml_editor'=>'', 'bo_subject'=>'', 'bo_image_width'=>0);
$group = array('gr_device'=>'', 'gr_subject'=>'');
$g5 = array('title'=>'');
$g5 = array();
if( version_compare( phpversion(), '8.0.0', '>=' ) ) { $g5 = array('title'=>''); }
$qaconfig = array();
$g5_debug = array('php'=>array(),'sql'=>array());
+1 -1
View File
@@ -5,7 +5,7 @@
********************/
define('G5_VERSION', '그누보드5');
define('G5_GNUBOARD_VER', '5.4.4');
define('G5_GNUBOARD_VER', '5.4.5.2');
// 이 상수가 정의되지 않으면 각각의 개별 페이지는 별도로 실행될 수 없음
define('_GNUBOARD_', true);
+1 -1
View File
@@ -14,7 +14,7 @@ function show_debug_bar() {
}
$memory_usage = function_exists( 'memory_get_peak_usage' ) ? memory_get_peak_usage() : memory_get_usage();
$php_run_time = get_microtime()-$g5_debug['php']['begin_time'];
$php_run_time = (isset($g5_debug['php']) && isset($g5_debug['php']['begin_time'])) ? ( get_microtime() - $g5_debug['php']['begin_time'] ) : 0;
include_once( G5_PLUGIN_PATH.'/debugbar/debugbar.php' );
}
+2 -2
View File
@@ -15,8 +15,8 @@ if (!isset($g5['title'])) {
$g5_head_title = $g5['title'];
}
else {
$g5_head_title = $g5['title']; // 상태바에 표시될 제목
$g5_head_title .= " | ".$config['cf_title'];
// 상태바에 표시될 제목
$g5_head_title = implode(' | ', array_filter(array($g5['title'], $config['cf_title'])));
}
$g5['title'] = strip_tags($g5['title']);
+2
View File
@@ -55,6 +55,7 @@ if (!$dblink) {
exit;
}
$g5['connect_db'] = $dblink;
$select_db = sql_select_db($mysql_db, $dblink);
if (!$select_db) {
?>
@@ -199,6 +200,7 @@ $sql = " insert into `{$table_prefix}member`
mb_level = '10',
mb_mailling = '1',
mb_open = '1',
mb_nick_date = '".G5_TIME_YMDHIS."',
mb_email_certify = '".G5_TIME_YMDHIS."',
mb_datetime = '".G5_TIME_YMDHIS."',
mb_ip = '{$_SERVER['REMOTE_ADDR']}'
+10 -8
View File
@@ -130,10 +130,11 @@ Class GML_Hook extends Hook {
if (isset($that->callback_filters[$tag]) && isset($that->callback_filters[$tag][$priority]) ) {
$found_key = array_search($func, array_column($that->callback_filters[$tag][$priority], 'function'));
if( $found_key !== false ){
unset($that->callback_filters[$tag][$priority][$found_key]);
foreach((array) $that->callback_filters[$tag][$priority] as $key=>$value){
if(isset($value['function']) && $value['function'] === $func) {
unset($that->callback_filters[$tag][$priority][$key]);
$is_remove = true;
}
}
}
@@ -148,10 +149,11 @@ Class GML_Hook extends Hook {
if (isset($that->callbacks[$tag]) && isset($that->callbacks[$tag][$priority]) ) {
$found_key = array_search($func, array_column($that->callbacks[$tag][$priority], 'function'));
if( $found_key !== false ){
unset($that->callbacks[$tag][$priority][$found_key]);
foreach((array) $that->callbacks[$tag][$priority] as $key=>$value){
if(isset($value['function']) && $value['function'] === $func) {
unset($that->callbacks[$tag][$priority][$key]);
$is_remove = true;
}
}
}
+24 -6
View File
@@ -8,6 +8,8 @@ function get_cachemanage_instance(){
static $instance = null;
if( ! (defined('G5_USE_CACHE') && G5_USE_CACHE) ) return $instance;
$instance = run_replace('get_cachemanage_instance', $instance);
if( $instance === null ){
$options = array(
@@ -48,14 +50,22 @@ function g5_latest_cache_data($bo_table, $cache_list=array(), $find_wr_id=0){
function g5_set_cache($key, $save_data, $ttl = null){
if( $cache = get_cachemanage_instance() ){
$cache->save($key, $save_data, $ttl);
run_event('g5_set_cache_event', $cache, $key, $save_data, $ttl);
if( (is_object($cache) && get_class($cache) === 'FileCache') ){
$cache->save($key, $save_data, $ttl);
}
}
}
function g5_get_cache($key, $expired_time=0){
if( $cache = get_cachemanage_instance() ){
return $cache->get($key, $expired_time);
if( (is_object($cache) && get_class($cache) === 'FileCache') ){
return $cache->get($key, $expired_time);
}
return run_replace('g5_get_cache_replace', false, $cache, $key, $expired_time);
}
return false;
@@ -82,13 +92,21 @@ function g5_delete_all_cache(){
}
function g5_delete_cache_by_prefix($key){
$files = glob(G5_DATA_PATH.'/cache/'.$key.'*');
foreach( (array) $files as $filename){
if(empty($filename)) continue;
$cache = get_cachemanage_instance();
$files = null;
unlink($filename);
if( (is_object($cache) && get_class($cache) === 'FileCache') ) {
$files = glob(G5_DATA_PATH.'/cache/'.$key.'*');
foreach( (array) $files as $filename){
if(empty($filename)) continue;
unlink($filename);
}
}
$files = run_replace('g5_delete_cache_by_prefix', $files, $key, $cache);
return ($files) ? true : false;
}
+7 -4
View File
@@ -1644,6 +1644,8 @@ function sql_fetch($sql, $error=G5_DISPLAY_SQL_ERROR, $link=null)
// 결과값에서 한행 연관배열(이름으로)로 얻는다.
function sql_fetch_array($result)
{
if( ! $result) return array();
if(function_exists('mysqli_fetch_assoc') && G5_MYSQLI_USE)
$row = @mysqli_fetch_assoc($result);
else
@@ -2042,17 +2044,18 @@ function bad_tag_convert($code)
global $view;
global $member, $is_admin;
if ($is_admin && $member['mb_id'] != $view['mb_id']) {
if ($is_admin && $member['mb_id'] !== $view['mb_id']) {
//$code = preg_replace_callback("#(\<(embed|object)[^\>]*)\>(\<\/(embed|object)\>)?#i",
// embed 또는 object 태그를 막지 않는 경우 필터링이 되도록 수정
$code = preg_replace_callback("#(\<(embed|object)[^\>]*)\>?(\<\/(embed|object)\>)?#i",
create_function('$matches', 'return "<div class=\"embedx\">보안문제로 인하여 관리자 아이디로는 embed 또는 object 태그를 볼 수 없습니다. 확인하시려면 관리권한이 없는 다른 아이디로 접속하세요.</div>";'),
$code);
$code = preg_replace_callback("#(\<(embed|object)[^\>]*)\>?(\<\/(embed|object)\>)?#i", '_callback_bad_tag_convert', $code);
}
return preg_replace("/\<([\/]?)(script|iframe|form)([^\>]*)\>?/i", "&lt;$1$2$3&gt;", $code);
}
function _callback_bad_tag_convert($matches){
return "<div class=\"embedx\">보안문제로 인하여 관리자 아이디로는 embed 또는 object 태그를 볼 수 없습니다. 확인하시려면 관리권한이 없는 다른 아이디로 접속하세요.</div>";
}
// 토큰 생성
function _token()
+35 -35
View File
@@ -96,48 +96,48 @@ function get_menu_db($use_mobile=0, $is_cache=false){
global $g5;
static $cache = array();
$cache = run_replace('get_menu_db_cache', $cache, $use_mobile, $is_cache);
$key = md5($use_mobile);
$cache = run_replace('get_menu_db_cache', $cache, $use_mobile, $is_cache);
$key = md5($use_mobile);
if( $is_cache && isset($cache[$key]) ){
return $cache[$key];
}
$where = $use_mobile ? "me_mobile_use = '1'" : "me_use = '1'";
if( !($cache[$key] = run_replace('get_menu_db', array(), $use_mobile)) ){
$sql = " select *
from {$g5['menu_table']}
where $where
and length(me_code) = '2'
order by me_order, me_id ";
$result = sql_query($sql, false);
$where = $use_mobile ? "me_mobile_use = '1'" : "me_use = '1'";
for ($i=0; $row=sql_fetch_array($result); $i++) {
$row['ori_me_link'] = $row['me_link'];
$row['me_link'] = short_url_clean($row['me_link']);
if( !($cache[$key] = run_replace('get_menu_db', array(), $use_mobile)) ){
$sql = " select *
from {$g5['menu_table']}
where $where
and length(me_code) = '2'
order by me_order, me_id ";
$result = sql_query($sql, false);
for ($i=0; $row=sql_fetch_array($result); $i++) {
$row['ori_me_link'] = $row['me_link'];
$row['me_link'] = short_url_clean($row['me_link']);
$row['sub'] = isset($row['sub']) ? $row['sub'] : array();
$cache[$key][$i] = $row;
$cache[$key][$i] = $row;
$sql2 = " select *
from {$g5['menu_table']}
where $where
and length(me_code) = '4'
and substring(me_code, 1, 2) = '{$row['me_code']}'
order by me_order, me_id ";
$result2 = sql_query($sql2);
for ($k=0; $row2=sql_fetch_array($result2); $k++) {
$row2['ori_me_link'] = $row2['me_link'];
$row2['me_link'] = short_url_clean($row2['me_link']);
$cache[$key][$i]['sub'][$k] = $row2;
}
}
}
$sql2 = " select *
from {$g5['menu_table']}
where $where
and length(me_code) = '4'
and substring(me_code, 1, 2) = '{$row['me_code']}'
order by me_order, me_id ";
$result2 = sql_query($sql2);
for ($k=0; $row2=sql_fetch_array($result2); $k++) {
$row2['ori_me_link'] = $row2['me_link'];
$row2['me_link'] = short_url_clean($row2['me_link']);
$cache[$key][$i]['sub'][$k] = $row2;
}
}
}
return $cache[$key];
return $cache[$key];
}
// 게시판 테이블에서 하나의 행을 읽음
@@ -465,7 +465,7 @@ function get_memo_not_read($mb_id, $add_where='')
$sql = " SELECT count(*) as cnt FROM {$g5['memo_table']} WHERE me_recv_mb_id = '$mb_id' and me_type= 'recv' and me_read_datetime like '0%' $add_where ";
$row = sql_fetch($sql, false);
return $row['cnt'];
return isset($row['cnt']) ? $row['cnt'] : 0;
}
function get_scrap_totals($mb_id=''){
@@ -476,5 +476,5 @@ function get_scrap_totals($mb_id=''){
$sql = " select count(*) as cnt from {$g5['scrap_table']} where 1=1 $add_where";
$row = sql_fetch($sql, false);
return $row['cnt'];
return isset($row['cnt']) ? $row['cnt'] : 0;
}
+2 -2
View File
@@ -37,7 +37,7 @@ function latest($skin_dir='', $bo_table, $rows=10, $subject_len=40, $cache_time=
if(G5_USE_CACHE) {
$cache_file_name = "latest-{$bo_table}-{$skin_dir}-{$rows}-{$subject_len}-".g5_cache_secret_key();
$caches = g5_get_cache($cache_file_name, $time_unit * $cache_time);
$caches = g5_get_cache($cache_file_name, (int) $time_unit * (int) $cache_time);
$cache_list = isset($caches['list']) ? $caches['list'] : array();
g5_latest_cache_data($bo_table, $cache_list);
}
@@ -98,7 +98,7 @@ function latest($skin_dir='', $bo_table, $rows=10, $subject_len=40, $cache_time=
'bo_subject' => sql_escape_string($bo_subject),
);
g5_set_cache($cache_file_name, $caches, $time_unit * $cache_time);
g5_set_cache($cache_file_name, $caches, (int) $time_unit * (int) $cache_time);
}
} else {
$list = $cache_list;
+6
View File
@@ -16,6 +16,12 @@ function mailer($fname, $fmail, $to, $subject, $content, $type=0, $file="", $cc=
if ($type != 1)
$content = nl2br($content);
$result = run_replace('mailer', $fname, $fmail, $to, $subject, $content, $type, $file, $cc, $bcc);
if( isset($result['return']) ){
return $result['return'];
}
$mail = new PHPMailer(); // defaults to using php "mail()"
if (defined('G5_SMTP') && G5_SMTP) {
$mail->IsSMTP(); // telling the class to use SMTP
+1 -1
View File
@@ -227,7 +227,7 @@ function thumbnail($filename, $source_path, $target_path, $thumb_width, $thumb_h
return;
$size = @getimagesize($source_file);
if($size[2] < 1 || $size[2] > 3) // gif, jpg, png 에 대해서만 적용
if(!isset($size[2]) || $size[2] < 1 || $size[2] > 3) // gif, jpg, png 에 대해서만 적용
return;
if (!is_dir($target_path)) {
+5 -5
View File
@@ -28,7 +28,7 @@ function get_pretty_url($folder, $no='', $query_string='', $action='')
if( $config['cf_bbs_rewrite'] > 1 ){
$get_content = get_content_db( $no , true);
$segments[2] = $get_content['co_seo_title'] ? urlencode($get_content['co_seo_title']).'/' : urlencode($no);
$segments[2] = (isset($get_content['co_seo_title']) && $get_content['co_seo_title']) ? urlencode($get_content['co_seo_title']).'/' : urlencode($no);
} else {
$segments[2] = urlencode($no);
@@ -44,7 +44,7 @@ function get_pretty_url($folder, $no='', $query_string='', $action='')
$get_write = get_write( $g5['write_prefix'].$folder, $no , true);
$segments[2] = $get_write['wr_seo_title'] ? urlencode($get_write['wr_seo_title']).'/' : urlencode($no);
$segments[2] = (isset($get_write['wr_seo_title']) && $get_write['wr_seo_title']) ? urlencode($get_write['wr_seo_title']).'/' : urlencode($no);
} else {
$segments[2] = urlencode($no);
@@ -91,7 +91,7 @@ function get_pretty_url($folder, $no='', $query_string='', $action='')
$url .= ($folder === 'content') ? '?co_id='. $no : '?'. $no;
}
if($query_string) {
$url .= ($no ? '?' : '&amp;'). $query_string;
$url .= (!$no ? '?' : '&amp;'). $query_string;
}
}
@@ -282,7 +282,7 @@ function seo_title_update($db_table, $pk_id, $type='bbs'){
if( $type === 'bbs' ){
$write = get_write($db_table, $pk_id, true);
if( ! $write['wr_seo_title'] && $write['wr_subject'] ){
if( ! (isset($write['wr_seo_title']) && $write['wr_seo_title']) && (isset($write['wr_subject']) && $write['wr_subject']) ){
$wr_seo_title = exist_seo_title_recursive('bbs', generate_seo_title($write['wr_subject']), $db_table, $pk_id);
$sql = " update `{$db_table}` set wr_seo_title = '{$wr_seo_title}' where wr_id = '{$pk_id}' ";
@@ -291,7 +291,7 @@ function seo_title_update($db_table, $pk_id, $type='bbs'){
} else if ( $type === 'content' ){
$co = get_content_db($pk_id, true);
if( ! $co['co_seo_title'] && $co['co_subject'] ){
if( ! (isset($co['co_seo_title']) && $co['co_seo_title']) && (isset($co['co_subject']) && $co['co_subject']) ){
$co_seo_title = exist_seo_title_recursive('content', generate_seo_title($co['co_subject']), $db_table, $pk_id);
$sql = " update `{$db_table}` set co_seo_title = '{$co_seo_title}' where co_id = '{$pk_id}' ";
+12 -12
View File
@@ -16,29 +16,29 @@ $src[] = "/{{쇼핑몰명}}|{{홈페이지제목}}/";
$dst[] = $config['cf_title'];
if(isset($default) && isset($default['de_admin_company_name'])){
$src[] = "/{{회사명}}|{{상호}}/";
$dst[] = $default['de_admin_company_name'];
$dst[] = isset($default['de_admin_company_name']) ? $default['de_admin_company_name'] : '';
$src[] = "/{{대표자명}}/";
$dst[] = $default['de_admin_company_owner'];
$dst[] = isset($default['de_admin_company_owner']) ? $default['de_admin_company_owner'] : '';
$src[] = "/{{사업자등록번호}}/";
$dst[] = $default['de_admin_company_saupja_no'];
$dst[] = isset($default['de_admin_company_saupja_no']) ? $default['de_admin_company_saupja_no'] : '';
$src[] = "/{{대표전화번호}}/";
$dst[] = $default['de_admin_company_tel'];
$dst[] = isset($default['de_admin_company_tel']) ? $default['de_admin_company_tel'] : '';
$src[] = "/{{팩스번호}}/";
$dst[] = $default['de_admin_company_fax'];
$dst[] = isset($default['de_admin_company_fax']) ? $default['de_admin_company_fax'] : '';
$src[] = "/{{통신판매업신고번호}}/";
$dst[] = $default['de_admin_company_tongsin_no'];
$dst[] = isset($default['de_admin_company_tongsin_no']) ? $default['de_admin_company_tongsin_no'] : '';
$src[] = "/{{사업장우편번호}}/";
$dst[] = $default['de_admin_company_zip'];
$dst[] = isset($default['de_admin_company_zip']) ? $default['de_admin_company_zip'] : '';
$src[] = "/{{사업장주소}}/";
$dst[] = $default['de_admin_company_addr'];
$dst[] = isset($default['de_admin_company_addr']) ? $default['de_admin_company_addr'] : '';
$src[] = "/{{운영자명}}|{{관리자명}}/";
$dst[] = $default['de_admin_name'];
$dst[] = isset($default['de_admin_name']) ? $default['de_admin_name'] : '';
$src[] = "/{{운영자e-mail}}|{{관리자e-mail}}/i";
$dst[] = $default['de_admin_email'];
$dst[] = isset($default['de_admin_email']) ? $default['de_admin_email'] : '';
$src[] = "/{{정보관리책임자명}}/";
$dst[] = $default['de_admin_info_name'];
$dst[] = isset($default['de_admin_info_name']) ? $default['de_admin_info_name'] : '';
$src[] = "/{{정보관리책임자e-mail}}|{{정보책임자e-mail}}/i";
$dst[] = $default['de_admin_info_email'];
$dst[] = isset($default['de_admin_info_email']) ? $default['de_admin_info_email'] : '';
}
$str = preg_replace($src, $dst, $str);
+1 -1
View File
@@ -16,7 +16,7 @@ $result = sql_query($sql, false);
for ($i=0; $nw=sql_fetch_array($result); $i++)
{
// 이미 체크 되었다면 Continue
if ($_COOKIE["hd_pops_{$nw['nw_id']}"])
if (isset($_COOKIE["hd_pops_{$nw['nw_id']}"]) && $_COOKIE["hd_pops_{$nw['nw_id']}"])
continue;
?>
+1 -1
View File
@@ -143,7 +143,7 @@ jQuery(function($){
if (isset($view['file'][$i]['source']) && $view['file'][$i]['source'] && !$view['file'][$i]['view']) {
?>
<li>
<a href="<?php echo $view['file'][$i]['href']; ?>" class="view_file_download" download>
<a href="<?php echo $view['file'][$i]['href']; ?>" class="view_file_download">
<i class="fa fa-download" aria-hidden="true"></i>
<strong><?php echo $view['file'][$i]['source'] ?></strong>
<?php echo $view['file'][$i]['content'] ?> (<?php echo $view['file'][$i]['size'] ?>)
+1 -1
View File
@@ -145,7 +145,7 @@ jQuery(function($){
if (isset($view['file'][$i]['source']) && $view['file'][$i]['source'] && !$view['file'][$i]['view']) {
?>
<li>
<a href="<?php echo $view['file'][$i]['href']; ?>" class="view_file_download" download>
<a href="<?php echo $view['file'][$i]['href']; ?>" class="view_file_download">
<i class="fa fa-download" aria-hidden="true"></i>
<strong><?php echo $view['file'][$i]['source'] ?></strong>
<?php echo $view['file'][$i]['content'] ?> (<?php echo $view['file'][$i]['size'] ?>)
+4 -3
View File
@@ -28,7 +28,8 @@ $is_show_next_prev = ($list_count > 4) ? 1 : 0;
$thumb = get_list_thumbnail($bo_table, $list[$i]['wr_id'], $thumb_width, $thumb_height, false, true);
$img = $thumb['src'] ? $thumb['src'] : '';
$img_content = $img ? '<img src="'.$img.'" alt="'.$thumb['alt'].'" >' : '';
$wr_href = get_pretty_url($bo_table, $list[$i]['wr_id']);
$echo_ul = ( $i && (($i % $divisor_count) === 0) ) ? '</ul><ul class="item">'.PHP_EOL : '';
echo $echo_ul;
@@ -38,10 +39,10 @@ $is_show_next_prev = ($list_count > 4) ? 1 : 0;
//echo $list[$i]['icon_reply']." ";
if( $img_content ){
echo "<a href=\"".$list[$i]['href']."\" class=\"lt_thumb\">".run_replace('thumb_image_tag', $img_content, $thumb)."</a> ";
echo "<a href=\"".$wr_href."\" class=\"lt_thumb\">".run_replace('thumb_image_tag', $img_content, $thumb)."</a> ";
}
echo "<a href=\"".$list[$i]['href']."\" class=\"lt_tit\">";
echo "<a href=\"".$wr_href."\" class=\"lt_tit\">";
if ($list[$i]['icon_secret']) echo "<i class=\"fa fa-lock\" aria-hidden=\"true\"></i> ";
if ($list[$i]['is_notice'])
echo "<strong>".$list[$i]['subject']."</strong>";
+1 -1
View File
@@ -15,7 +15,7 @@ $list_count = (is_array($list) && $list) ? count($list) : 0;
<li>
<span class="cm_lt_nick"><?php echo get_member_profile_img($member['mb_id']); ?></span>
<div class="cm_lt_info">
<a href="<?php echo $list[$i]['href']; ?>" class="over"><?php echo $list[$i]['subject']; ?></a>
<a href="<?php echo get_pretty_url($bo_table, $list[$i]['wr_id']); ?>" class="over"><?php echo $list[$i]['subject']; ?></a>
<br>
<span class="lt_nick"><?php echo $list[$i]['name'] ?></span>
<span class="lt_date"><?php echo $list[$i]['datetime2'] ?></span>
+1 -1
View File
@@ -16,7 +16,7 @@ $list_count = (is_array($list) && $list) ? count($list) : 0;
if ($list[$i]['icon_secret']) echo "<span class=\"lock_icon\"><i class=\"fa fa-lock\" aria-hidden=\"true\"></i></span> ";
if ($list[$i]['icon_new']) echo "<span class=\"new_icon\">N<span class=\"sound_only\">새글</span></span>";
//echo $list[$i]['icon_reply']." ";
echo "<a href=\"".$list[$i]['href']."\">";
echo "<a href=\"".get_pretty_url($bo_table, $list[$i]['wr_id'])."\">";
if ($list[$i]['is_notice'])
echo "<strong>".$list[$i]['subject']."</strong>";
else
+5 -8
View File
@@ -18,13 +18,9 @@ add_stylesheet('<link rel="stylesheet" href="'.$member_skin_url.'/style.css">',
<ul class="point_list">
<?php
$sum_point1 = $sum_point2 = $sum_point3 = 0;
$sql = " select *
{$sql_common}
{$sql_order}
limit {$from_record}, {$rows} ";
$result = sql_query($sql);
for ($i=0; $row=sql_fetch_array($result); $i++) {
$i = 0;
foreach((array) $list as $row){
$point1 = $point2 = 0;
$point_use_class = '';
if ($row['po_point'] > 0) {
@@ -55,7 +51,8 @@ add_stylesheet('<link rel="stylesheet" href="'.$member_skin_url.'/style.css">',
</span>
</li>
<?php
}
$i++;
} // end foreach
if ($i == 0)
echo '<li class="empty_list">자료가 없습니다.</li>';
+7 -7
View File
@@ -5,6 +5,12 @@ if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
add_stylesheet('<link rel="stylesheet" href="'.$qa_skin_url.'/style.css">', 0);
?>
<form name="fqalist" id="fqalist" action="./qadelete.php" onsubmit="return fqalist_submit(this);" method="post">
<input type="hidden" name="stx" value="<?php echo $stx; ?>">
<input type="hidden" name="sca" value="<?php echo $sca; ?>">
<input type="hidden" name="page" value="<?php echo $page; ?>">
<input type="hidden" name="token" value="<?php echo get_text($token); ?>">
<?php if ($admin_href || $write_href) { ?>
<ul class="btn_top top btn_bo_user">
<?php if ($admin_href) { ?><li><a href="<?php echo $admin_href ?>" class="btn_admin btn"><i class="fa fa-cog fa-spin fa-fw"></i><span class="sound_only">관리자</span></a></li><?php } ?>
@@ -41,12 +47,6 @@ add_stylesheet('<link rel="stylesheet" href="'.$qa_skin_url.'/style.css">', 0);
<!-- } 카테고리 끝 -->
<?php } ?>
<form name="fqalist" id="fqalist" action="./qadelete.php" onsubmit="return fqalist_submit(this);" method="post">
<input type="hidden" name="stx" value="<?php echo $stx; ?>">
<input type="hidden" name="sca" value="<?php echo $sca; ?>">
<input type="hidden" name="page" value="<?php echo $page; ?>">
<input type="hidden" name="token" value="<?php echo get_text($token); ?>">
<?php if ($is_checkbox) { ?>
<div class="all_chk chk_box">
<input type="checkbox" id="chkall" onclick="if (this.checked) all_checked(true); else all_checked(false);" class="selec_chk">
@@ -93,8 +93,8 @@ add_stylesheet('<link rel="stylesheet" href="'.$qa_skin_url.'/style.css">', 0);
<?php if ($i == 0) { echo '<li class="empty_list">게시물이 없습니다.</li>'; } ?>
</ul>
</div>
</form>
</div>
</form>
<?php if($is_checkbox) { ?>
<noscript>
+19 -1
View File
@@ -9,12 +9,13 @@ if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
?>
<h2>답변등록</h2>
<form name="fanswer" method="post" action="./qawrite_update.php" autocomplete="off">
<form name="fanswer" method="post" action="./qawrite_update.php" onsubmit="return fwrite_submit(this);" autocomplete="off">
<input type="hidden" name="qa_id" value="<?php echo $view['qa_id']; ?>">
<input type="hidden" name="w" value="a">
<input type="hidden" name="sca" value="<?php echo $sca ?>">
<input type="hidden" name="stx" value="<?php echo $stx; ?>">
<input type="hidden" name="page" value="<?php echo $page; ?>">
<input type="hidden" name="token" value="<?php echo $token ?>">
<?php
$option = '';
$option_hidden = '';
@@ -104,6 +105,23 @@ if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
return false;
}
$.ajax({
type: "POST",
url: g5_bbs_url+"/ajax.write.token.php",
data: { 'token_case' : 'qa_write' },
cache: false,
async: false,
dataType: "json",
success: function(data) {
if (typeof data.token !== "undefined") {
token = data.token;
if(typeof f.token === "undefined")
$(f).prepend('<input type="hidden" name="token" value="">');
$(f).find("input[name=token]").val(token);
}
}
});
document.getElementById("btn_submit").disabled = "disabled";
return true;
+1 -1
View File
@@ -16,8 +16,8 @@ add_stylesheet('<link rel="stylesheet" href="'.$qa_skin_url.'/style.css">', 0);
<li>
<button type="button" class="btn_more_opt btn_b03 btn"><i class="fa fa-ellipsis-v" aria-hidden="true"></i><span class="sound_only">게시판 리스트 옵션</span></button>
<ul class="more_opt">
<?php if ($update_href) { ?><li><a href="<?php echo $update_href ?>"><i class="fa fa-pencil-square-o" aria-hidden="true"></i> 수정</a></li><?php } ?>
<?php if ($delete_href) { ?><li><a href="<?php echo $delete_href ?>" onclick="del(this.href); return false;"><i class="fa fa-trash-o" aria-hidden="true"></i> 삭제</a></li><?php } ?>
<?php if ($update_href) { ?><li><a href="<?php echo $update_href ?>"><i class="fa fa-pencil-square-o" aria-hidden="true"></i> 수정</a></li><?php } ?>
</ul>
</li>
</ul>
+14 -79
View File
@@ -1,9 +1,9 @@
// ================================================================
// CHEditor 5.1.9.3
// CHEditor 5.1.9.3-p4
// ----------------------------------------------------------------
// Homepage: http://www.chcode.com
// EMail: support@chcode.com
// Copyright (c) 1997-2016 CHSOFT
// Copyright (c) 1997-2020 CHSOFT
// ================================================================
var GB = {
colors: ['#000000','#313131','#434343','#535353','#666666','#999999','#a0a0a0','#b5b5b5','#c0c0c0','#dcdcdc','#eeeeee','#ffffff',
@@ -517,7 +517,7 @@ function setConfig() {
useModifyTable : true,
useMap : true,
useTextBlock : true,
useFullScreen : true,
useFullScreen : false,
usePageBreak : false
},
base, elem, i, editorUri, locationAbs;
@@ -557,9 +557,9 @@ function setConfig() {
this.currentRS = {};
this.resizeEditor = {};
this.setFullScreenMode = false;
this.modalElementZIndex = 1001;
this.modalElementZIndex = 10001;
this.config = config;
this.templateFile = 'template.xml';
this.templateFile = this.undefined(this.browser.mobile) ? 'template.xml' : 'template-mobile.xml';
this.templatePath = config.editorPath + this.templateFile;
this.W3CRange = !(this.undefined(window.getSelection));
this.inputForm = 'textAreaId';
@@ -1082,31 +1082,10 @@ cheditor.prototype = {
showError('현재 브라우저에서 ' + self.templateFile + ' 파일을 사용할 수 없습니다.');
}
},
/*
getCDATASection : function (node) {
var elem, data;
if (node.hasChildNodes()) {
elem = node.firstChild;
while (elem && elem.nodeType !== GB.node.cdata_section) {
elem = elem.nextSibling;
}
if (elem && elem.nodeType === GB.node.cdata_section) {
data = elem.data;
data = data.replace(/\n/g, '');
data = data.replace(/(\s+?)<([^>]*)>/g, '<$2>');
data = this.trimSpace(data);
return data;
}
}
return null;
},
*/
getCDATASection : function (node) {
var text = node.textContent || node.text;
text = text.replace(/\n/g, '');
text = text.replace(/(\s+?)<([^>]*)>/g, '<$2>');
text = this.trimSpace(text);
return text;
return this.trimSpace(text.replace(/\n/g, '').replace(/(\s+?)<([^>]*)>/g, '<$2>'));
},
setToolbarBgPosition : function (elem, attr) {
@@ -2044,7 +2023,7 @@ cheditor.prototype = {
container.style.width = self.config.editorWidth;
self.cheditor.container = container;
},
/*
loadTemplate : function (xmlDoc) {
var self = this,
tmpl = xmlDoc.getElementsByTagName('Template').item(0),
@@ -2091,55 +2070,6 @@ cheditor.prototype = {
self.cheditor.htmlEditable.style.visibility = 'hidden';
container.appendChild(self.cheditor.htmlEditable);
},
*/
loadTemplate : function (xmlDoc) {
var cdata, container, dragHandle, html, modalFrame, popupWindow, tmpDiv, tmpl, toolbar;
tmpl = xmlDoc.getElementsByTagName('Template').item(0);
if (!tmpl) {
throw 'Template 노드를 설정할 수 없습니다.';
}
cdata = tmpl.getElementsByTagName('Container').item(0).getElementsByTagName('Html').item(0);
if (!cdata) {
throw 'XML CDATA 오류';
}
html = this.getCDATASection(cdata);
tmpDiv = document.createElement('div');
tmpDiv.innerHTML = html;
container = tmpDiv.firstChild;
toolbar = tmpl.getElementsByTagName('Toolbar').item(0);
this.createEditorElement(container, toolbar);
cdata = tmpl.getElementsByTagName('PopupWindow').item(0).getElementsByTagName('Html').item(0);
if (!cdata) {
throw 'XML CDATA 오류';
}
html = this.getCDATASection(cdata);
tmpDiv.innerHTML = html;
popupWindow = tmpDiv.firstChild;
this.cheditor.popupElem = popupWindow;
dragHandle = popupWindow.firstChild;
this.cheditor.dragHandle = dragHandle;
this.cheditor.popupTitle = dragHandle.getElementsByTagName('label')[0];
this.cheditor.popupFrameWrapper = dragHandle.nextSibling;
container.appendChild(popupWindow);
modalFrame = document.createElement('div');
modalFrame.className = 'cheditor-modalPopupTransparent';
this.cheditor.modalBackground = modalFrame;
this.cheditor.modalBackground.id = 'popupModalBackground';
this.cheditor.modalBackground.className = 'cheditor-popupModalBackground';
container.parentNode.insertBefore(modalFrame, container);
this.cheditor.htmlEditable = document.createElement('iframe');
this.cheditor.htmlEditable.style.display = 'none';
this.cheditor.htmlEditable.style.width = '1px';
this.cheditor.htmlEditable.style.height = '1px';
this.cheditor.htmlEditable.style.visibility = 'hidden';
container.appendChild(this.cheditor.htmlEditable);
},
imageEvent : function (img, action) {
var self = this,
@@ -5063,7 +4993,12 @@ cheditor.prototype = {
if (!(this.undefined(GB.popupWindow[popupName]))) {
var popup = GB.popupWindow[popupName];
if (popupName === 'ImageUpload' && window.File && window.FileReader && window.FileList && window.Blob) {
popup.tmpl = 'image.html5.html';
if (this.browser.mobile) {
popup.tmpl = 'image.html5.m.html';
popup.width = 450; // 팝업 윈도우 가로 폭 크기(px)
} else {
popup.tmpl = 'image.html5.html';
}
}
this.popupWinLoad(popup);
} else {
@@ -133,4 +133,15 @@ body {
line-height: 1em;
font-family: 'Malgun Gothic', gulim, tahoma, helvetica;
font-size: 12px;
}
.webgl_logo_wrapper {
text-align: center;
margin-top: 40px;
border-top: #cccccc 1px solid;
}
.webgl_logo_wrapper img {
width: 50px;
height: 50px;
vertical-align: middle;
}
@@ -0,0 +1,136 @@
#uploadWindow {
display: none;
}
.clear { clear: both; }
#container {
padding: 0;
}
.imageListWrapperHtml5, .imageListWrapper, .dragOver {
background-color: #fff;
position: absolute;
height: 250px;
width: 255px;
overflow-y: scroll;
border-radius: 4px;
border: 2px #66b2ff solid;
}
/* .imageListWrapperHtml5 {
border: 2px #66b2ff dashed;
} */
.imageListWrapper {
border: 1px #aaa solid;
box-shadow: 0 0 3px #aaa;
}
.dragOver {
border: 2px #ff3399 dashed;
}
#imageInfoBox {
position: absolute;
left: 300px;
}
.imageInfoTitle {
text-align: center;
background-color: #e0e0e0;
width: 130px;
font-family: "Malgun Gothic",gulim;
font-weight: bold;
font-size: 12px;
}
.imageInfoTitle span {
display: inline-block;
margin-top: -1px;
line-height: 22px;
}
.remove-button {
width: 93px;
height: 22px;
cursor: pointer;
vertical-align: middle;
}
.imageBox, .imageBoxHighlighted {
width: 120px;
height: 90px;
margin: 3px 3px;
float: left;
}
.imageBox_theImage,.imageBox_theImage_over {
width: 100%;
height: 100%;
position: relative;
display: block;
background-color: #fff;
}
.imageBox .imageBox_theImage{
border: 1px solid #e0e0e0;
background-image: url('../icons/dot.gif');
background-position: center center;
background-repeat: no-repeat;
}
.imageBox .imageBox_theImage_over {
border: 1px solid #a0a0a0;
background-image: url('../icons/dot.gif');
background-position: center center;
background-repeat: no-repeat;
cursor: pointer;
}
.imageBoxHighlighted .imageBox_theImage {
border: 1px solid #ff6600;
}
.imageBoxHighlighted .imageBox_theImage_over {
border: 1px solid #ff6600;
background-image: url('../icons/dot.gif');
background-position: center center;
background-repeat: no-repeat;
}
.removeButton, .removeButton_over {
display: none;
position: absolute;
cursor: pointer;
background-image: url(../icons/imageUpload/cross-small.png);
background-repeat: no-repeat;
background-position: center center;
}
.removeButton {
border: 1px solid #a0a0a0;
}
.removeButton_over {
border: 1px solid #808080;
}
#insertionMarker {
height: 102px;
width: 6px;
position: absolute;
display: none;
}
#insertionMarker img {
float: left;
}
#dragDropContent{
position: absolute;
z-index: 10;
display: none;
}
.button {
width: 64px;
height: 22px;
margin: 0 2px;
cursor: pointer;
vertical-align: middle;
}
body {
margin: 0;
padding: 0;
overflow: hidden;
background-color: #fff;
line-height: 1em;
font-family: 'Malgun Gothic', gulim, tahoma, helvetica;
font-size: 12px;
}
+8 -3
View File
@@ -14,6 +14,8 @@ a.cheditor-tag-path-elem:hover {
border-top: 1px #ccc solid;
position: relative;
text-align: left;
-webkit-box-sizing: content-box;
box-sizing: content-box;
}
.cheditor-tb-wrapper {
border-right: 1px #ccc solid;
@@ -21,11 +23,10 @@ a.cheditor-tag-path-elem:hover {
border-bottom: 1px #ccc solid;
position: relative;
display: block;
-webkit-box-sizing: inherit;
box-sizing: inherit;
background-color: #f0f0f0;
zoom:1;
height:auto ! important;
}
.cheditor-tb-wrapper:after{display:block;visibility:hidden;clear:both;content:""}
.cheditor-tb-wrapper-readonly {
border-right: 1px #ccc solid;
border-left: 1px #ccc solid;
@@ -423,6 +424,8 @@ a.cheditor-tag-path-elem:hover {
box-shadow: 0 0 10px #bbb;
padding: 0;
overflow: hidden;
-webkit-box-sizing: content-box;
box-sizing: content-box;
}
.cheditor-popup-cmd-button {
width: 64px;
@@ -437,6 +440,8 @@ a.cheditor-tag-path-elem:hover {
padding: 10px;
border: none;
text-align: center;
-webkit-box-sizing: content-box;
box-sizing: content-box;
}
.cheditor-popup-cframe iframe {
Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

@@ -6,7 +6,7 @@
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<link rel="stylesheet" type="text/css" href="../css/imageupload.css" />
<script src="js/dialog.js" type="text/javascript"></script>
<script src="js/image.html5.js" type="text/javascript"></script>
<script src="js/image.html5.js" type="text/javascript"></script>
</head>
<body>
<div id="uploadWindow">
@@ -65,9 +65,7 @@
<div style="margin-top:5px;font-size: 12px">
<input type="checkbox" name="use_spacer" value="1" checked="checked" />사진 여백 넣기
</div>
<div style="text-align:center;margin-top:15px">
<span style="font-size:12px;font-family:Malgun Gothic,dotum,tahoma;">(전체 사진에 적용됨)</span>
</div>
<div id="webgl_logo_wrapper" class="webgl_logo_wrapper"></div>
</form>
</div>
</div>
@@ -0,0 +1,78 @@
<!DOCTYPE html>
<html>
<head>
<title>CHEditor</title>
<meta name="robots" content="noindex, nofollow" />
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<link rel="stylesheet" type="text/css" href="../css/imageupload.m.css" />
<script src="js/dialog.js" type="text/javascript"></script>
<script src="js/image.html5.m.js" type="text/javascript"></script>
</head>
<body>
<div id="uploadWindow">
<div id="container">
<div style="margin: 0px 0px 10px 0px;">
<img src="../icons/imageUpload/remove_all.gif" class="remove-button" onclick="removeImages();"
alt="" style="vertical-align: middle" />
<input type="file" name="imageUpload[]" accept="image/jpeg,image/png,image/gif" id="inputImageUpload" multiple="multiple"
onchange="selectedFiles(event)" style="vertical-align: middle; visibility: hidden; width: 0px"/>
<img id="fileSelectButton" src="../icons/imageUpload/add.gif" alt="image button" onclick="inputImageUpload.click()"
style="vertical-align: middle; margin-left: -5px; cursor: pointer"/>
<span style="left:308px; top:5px;position:absolute;"><span id="imageCount">0</span>장 / 최대 <span id="maxImageNum"></span>장 사진</span>
</div>
<div id="imageListWrapper" class="imageListWrapperHtml5"></div>
<div id="imageInfoBox">
<div>
<div class="imageInfoTitle"><span>크기 줄이기</span></div>
<div style="text-align:left;font-size:12px;margin-top:7px;line-height:1.4em; padding-left: 5px">
<div>
<span style="vertical-align: middle">가로:</span>
<select name="resizeSelectBox" id="idResizeSelectBox" style="font-size: 12px; vertical-align: middle"></select>
<span style="vertical-align: middle">픽셀</span>
<div style="margin-top: 5px; display:none" id="idUserInputWrapper">
<span style="vertical-align: middle">입력:</span>
<input type="text" maxlength="4"
style="font-size: 12px; width:40px; vertical-align: middle" name="resizeWidth" id="idResizeWidth" />
<span style="vertical-align: middle">픽셀</span>
</div>
</div>
<div style="margin-top: 10px">사진 높이는 자동으로 설정됩니다.</div>
</div>
</div>
<div style="margin-top: 20px">
<div class="imageInfoTitle"><span>정렬</span></div>
<form name="fm_alignment" id="id_alignment" style="display: inline">
<table style="margin:7px auto 10px auto;border:0;padding:0;border-spacing:0">
<tr>
<td style="text-align: center">
<img src="../icons/image_align_left.png" alt="" /><br />
<input type="radio" name="alignment" value="left" checked="checked" />
</td>
<td style="text-align: center">
<img src="../icons/image_align_center.png" style="margin: 0px 5px" alt="" /><br />
<input type="radio" name="alignment" value="center" />
</td>
<td style="text-align: center">
<img src="../icons/image_align_right.png" alt="" /><br />
<input type="radio" name="alignment" value="right" />
</td>
</tr>
</table>
<div style="margin-top:5px;font-size: 12px">
<input type="checkbox" name="para" value="1" checked="checked" />한줄에 한 장씩 넣기
</div>
<div style="margin-top:5px;font-size: 12px">
<input type="checkbox" name="use_spacer" value="1" checked="checked" />사진 여백 넣기
</div>
</form>
</div>
</div>
</div>
<div class="clear"></div>
<div style="text-align:center;top:310px;width:100%;position:absolute;" id="buttonWrapper"></div>
</div>
<div id="dragDropContent"></div>
<div id="removeImageButton" class="removeButton" style="width:13px;height:13px"></div>
<div id="insertionMarker"></div>
</body>
</html>
@@ -0,0 +1,75 @@
// -------------------------------------------------------
// CHEditor WebGL Fragment Shader
// -------------------------------------------------------
precision highp float;
uniform sampler2D u_image;
uniform vec2 u_resolution;
uniform vec2 u_srcResolution;
vec4 getTextureColor(vec2 loc) {
return texture2D(u_image, loc / u_srcResolution);
}
void main() {
vec2 ratio = u_srcResolution / u_resolution;
vec2 ratioHalf = ceil(ratio / 1.0);
vec2 loc = gl_FragCoord.xy;
loc.y = u_resolution.y - loc.y;
float weight = 0.0;
float weights = 0.0;
float weights_alpha = 0.0;
vec3 gx_rgb = vec3(0.0);
float gx_a = 0.0;
float center_y = (loc.y + 0.5) * ratio.y;
float y = floor(loc.y * ratio.y);
float y_length = (loc.y + 1.0) * ratio.y;
for (int i = 0; i < 5000; i++) {
if (y >= y_length) {
break;
}
float dy = abs(center_y - (y + 0.5)) / ratioHalf.y;
float center_x = (loc.x + 0.5) * ratio.x;
float part_w = dy * dy;
float x = floor(loc.x * ratio.x);
float x_length = (loc.x + 1.0) * ratio.x;
for (int j = 0; j < 5000; j++) {
if (x >= x_length) {
break;
}
float dx = abs(center_x - (x + 0.5)) / ratioHalf.x;
float w = sqrt(part_w + dx * dx);
if (w >= -1.0 && w <= 1.0) {
// Hermite 필터
weight = 2.0 * w * w * w - 3.0 * w * w + 1.0;
if (weight > 0.0) {
vec4 pixel = getTextureColor(vec2(x, y)) * 255.0;
// 알파 채널
gx_a += weight * pixel.a;
weights_alpha += weight;
if (pixel.a < 255.0) {
weight = weight * pixel.a / 250.0;
}
gx_rgb += weight * pixel.rgb;
weights += weight;
}
}
x++;
}
y++;
}
gx_rgb = (gx_rgb / weights) / 255.0;
gx_a = (gx_a / weights_alpha) / 255.0;
gl_FragColor = vec4(gx_rgb, gx_a);
}
+362 -126
View File
@@ -1,6 +1,7 @@
// ================================================================
// CHEditor 5
// ================================================================
var activeImage = null,
browser = null,
button,
@@ -29,14 +30,160 @@ var activeImage = null,
offsetX_marker = -3,
offsetY_marker = -3,
readyToMove = false,
selectedFilesNum = 0,
showThumbnailSize = { width: 120, height: 90 },
tmpLeft = 0,
tmpTop = 0,
uploadImagePath = '',
uploadMaxNumber = 12,
uploadScript;
// deleteScript;
uploadScript,
useWebGL = false;
if (ArrayBuffer && !ArrayBuffer.prototype.slice) {
ArrayBuffer.prototype.slice = function (start, end) {
var len = this.byteLength;
start || isFinite(start) && 0 < start && start < len || (start = 0);
end || (isFinite(end && start < end && end < len) || (end = len - 1));
return new DataView(this, start, end).buffer;
};
}
function GLScale(options) {
if (!(this instanceof GLScale)) {
return new GLScale(options);
}
this.precompile(options);
return this.scale.bind(this);
}
GLScale.prototype.precompile = function (options) {
var ctxOptions, vertex, fragment, resolutionLocation, positionLocation;
this.canvas = document.createElement('canvas');
this.canvas.width = options.width;
this.canvas.height = options.height;
ctxOptions = {preserveDrawingBuffer: true};
this.gl = this.canvas.getContext('webgl', ctxOptions) || this.canvas.getContext('experimental-webgl', ctxOptions);
if (!this.gl) {
throw new Error('Could not initialize webgl context');
}
vertex = GLScale.compileShader(this.gl, GLScale.Hermite.vertex, this.gl.VERTEX_SHADER);
fragment = GLScale.compileShader(this.gl, GLScale.Hermite.fragment, this.gl.FRAGMENT_SHADER);
this.program = GLScale.createProgram(this.gl, vertex, fragment);
this.gl.useProgram(this.program);
this.gl.bindTexture(this.gl.TEXTURE_2D, this.gl.createTexture());
this.gl.texParameteri(this.gl.TEXTURE_2D, this.gl.TEXTURE_WRAP_S, this.gl.CLAMP_TO_EDGE);
this.gl.texParameteri(this.gl.TEXTURE_2D, this.gl.TEXTURE_WRAP_T, this.gl.CLAMP_TO_EDGE);
this.gl.texParameteri(this.gl.TEXTURE_2D, this.gl.TEXTURE_MIN_FILTER, this.gl.NEAREST);
this.gl.texParameteri(this.gl.TEXTURE_2D, this.gl.TEXTURE_MAG_FILTER, this.gl.NEAREST);
resolutionLocation = this.gl.getUniformLocation(this.program, 'u_resolution');
this.gl.uniform2f(resolutionLocation, options.width, options.height);
this.gl.bindBuffer(this.gl.ARRAY_BUFFER, this.gl.createBuffer());
positionLocation = this.gl.getAttribLocation(this.program, 'a_position');
this.gl.enableVertexAttribArray(positionLocation);
this.gl.vertexAttribPointer(positionLocation, 2, this.gl.FLOAT, false, 0, 0);
};
GLScale.prototype.scale = function (image, cb) {
var srcResolutionLocation;
if (typeof image === 'string') {
return this.loadImage(image, function (err, image) {
if (!err) {
return this.scale(image, cb);
}
});
}
this.gl.texImage2D(this.gl.TEXTURE_2D, 0, this.gl.RGBA, this.gl.RGBA, this.gl.UNSIGNED_BYTE, image);
srcResolutionLocation = this.gl.getUniformLocation(this.program, 'u_srcResolution');
this.gl.uniform2f(srcResolutionLocation, image.width, image.height);
this.setRectangle(0, 0, image.width, image.height);
this.gl.drawArrays(this.gl.TRIANGLES, 0, 6);
this.gl.finish();
if (cb) {
cb(this.canvas);
}
return this;
};
GLScale.prototype.setRectangle = function (x, y, width, height) {
var x1 = x,
x2 = x + width,
y1 = y,
y2 = y + height;
this.gl.bufferData(this.gl.ARRAY_BUFFER, new Float32Array([
x1, y1,
x2, y1,
x1, y2,
x1, y2,
x2, y1,
x2, y2
]), this.gl.STATIC_DRAW);
};
GLScale.loadImage = function (url, cb) {
var image = new Image();
image.onload = cb.bind(this, null, image);
image.onerror = cb.bind(this);
image.src = url;
return this;
};
GLScale.prototype.loadImage = GLScale.loadImage;
GLScale.toBlob = (function toBlob() {
var CanvasPrototype = window.HTMLCanvasElement.prototype;
if (CanvasPrototype.toBlob) {
return CanvasPrototype.toBlob;
}
return function (callback, type, quality) {
var binStr = atob(this.toDataURL(type, quality).split(',')[1]),
len = binStr.length,
arr = new Uint8Array(len), i = 0;
for (; i < len; i++) {
arr[i] = binStr.charCodeAt(i);
}
callback(new Blob([arr], {type: type || 'image/png'}));
};
})();
GLScale.compileShader = function (gl, shaderSource, shaderType) {
var shader = gl.createShader(shaderType);
gl.shaderSource(shader, shaderSource);
gl.compileShader(shader);
if (!gl.getShaderParameter(shader, gl.COMPILE_STATUS)) {
throw new Error('Could not compile shader: ' + gl.getShaderInfoLog(shader));
}
return shader;
};
GLScale.createProgram = function (gl, vertexShader, fragmentShader) {
var program = gl.createProgram();
gl.attachShader(program, vertexShader);
gl.attachShader(program, fragmentShader);
gl.linkProgram(program);
if (!gl.getProgramParameter(program, gl.LINK_STATUS)) {
throw new Error('Program failed to link: ' + gl.getProgramInfoLog (program));
}
return program;
};
function createInsertionMaker() {
var wrapper = document.getElementById('insertionMarker'),
@@ -76,7 +223,7 @@ function showContents() {
spacerNo = 1, i, imgBox, theImg, lastSpacer;
for (i = 0; i < uploadMaxNumber; i++) {
if (i > 0 && ((i % 4) === 0)) {
if (i > 0 && i % 4 === 0) {
imageListWrapper.appendChild(spacer(spacerNo++));
}
@@ -89,7 +236,7 @@ function showContents() {
imgBox.appendChild(theImg);
imageListWrapper.appendChild(imgBox);
if (i === (uploadMaxNumber - 1)) {
if (i === uploadMaxNumber - 1) {
lastSpacer = spacer(spacerNo);
lastSpacer.style.height = "7px";
imageListWrapper.appendChild(lastSpacer);
@@ -130,7 +277,7 @@ function getTopPos(inputObj) {
inputObj = inputObj.offsetParent;
while (inputObj) {
if (inputObj.tagName.toLowerCase() !== 'html') {
returnValue += (inputObj.offsetTop - inputObj.scrollTop);
returnValue += inputObj.offsetTop - inputObj.scrollTop;
if (browser.msie) {
returnValue += inputObj.clientTop;
}
@@ -182,7 +329,7 @@ function reOrder() {
imgBox[i].className = 'imageBox';
imgBox[i].firstChild.className = 'imageBox_theImage';
if (imgNum > 0 && (imgNum % 4) === 0) {
if (imgNum > 0 && imgNum % 4 === 0) {
breakline.push(imgBox[i].id);
}
@@ -199,28 +346,6 @@ function reOrder() {
}
}
function img_delete_post(el){
if( el.firstChild.tagName.toLowerCase() === 'img' ){
var src = el.firstChild.getAttribute('src'),
filesrc = src.replace(/^.*[\\\/]/, ''),
data = "filesrc="+filesrc;
var xhr = new XMLHttpRequest();
xhr.open('POST', deleteScript, true);
//Send the proper header information along with the request
xhr.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
xhr.addEventListener("error", function (evt) {
try {
console.log("파일 전송 중 오류: " + evt.target.error.code);
} catch(ex) {
}
}, false);
xhr.send(data);
}
}
function showDelete() {
var self = this, btn;
@@ -231,7 +356,7 @@ function showDelete() {
getDivCoordinates();
self.className = 'imageBox_theImage_over';
btn = document.getElementById('removeImageButton');
btn.style.left = (showThumbnailSize.width - parseInt(btn.style.width, 10) - 1) + 'px';
btn.style.left = showThumbnailSize.width - parseInt(btn.style.width, 10) - 1 + 'px';
btn.style.top = '-1px';
self.appendChild(btn);
@@ -250,7 +375,6 @@ function showDelete() {
var images = self.getElementsByTagName('img'), i, moveobj, target;
for (i = 0; i < images.length; i++) {
img_delete_post(self);
self.removeChild(images[i]);
}
@@ -279,6 +403,7 @@ function showDelete() {
this.style.display = 'none';
document.body.appendChild(ev.target);
oEditor.removeEvent(self, 'mouseover', showDelete);
self.removeAttribute('title');
};
}
@@ -318,16 +443,16 @@ function imgComplete(img, imgSize, boxId) {
if (imgSize.width > showThumbnailSize.width || imgSize.height > showThumbnailSize.height) {
if (imgSize.width > imgSize.height) {
resizeW = (imgSize.width > showThumbnailSize.width) ? showThumbnailSize.width : imgSize.width;
resizeH = Math.round((imgSize.height * resizeW) / imgSize.width);
resizeW = imgSize.width > showThumbnailSize.width ? showThumbnailSize.width : imgSize.width;
resizeH = Math.round(imgSize.height * resizeW / imgSize.width);
} else {
resizeH = (imgSize.height > showThumbnailSize.height) ? showThumbnailSize.height : imgSize.height;
resizeW = Math.round((imgSize.width * resizeH) / imgSize.height);
resizeH = imgSize.height > showThumbnailSize.height ? showThumbnailSize.height : imgSize.height;
resizeW = Math.round(imgSize.width * resizeH / imgSize.height);
}
if (resizeH > showThumbnailSize.height) {
resizeH = (imgSize.height > showThumbnailSize.height) ? showThumbnailSize.height : imgSize.height;
resizeW = Math.round((imgSize.width * resizeH) / imgSize.height);
resizeH = imgSize.height > showThumbnailSize.height ? showThumbnailSize.height : imgSize.height;
resizeW = Math.round(imgSize.width * resizeH / imgSize.height);
}
} else {
@@ -357,6 +482,7 @@ function imgComplete(img, imgSize, boxId) {
}
elem.style.backgroundImage = "url('" + uploadImagePath + "/dot.gif')";
setElemTitle(elem, imgSize.width, imgSize.height);
oEditor.addEvent(elem, 'mouseover', showDelete);
elem.onmouseout = function () {
this.className = 'imageBox_theImage';
@@ -366,26 +492,30 @@ function imgComplete(img, imgSize, boxId) {
setImageCount();
}
function setElemTitle(elem, width, height) {
elem.setAttribute('title', 'Width: ' + width + 'px, Height: ' + height + 'px');
}
function showUploadWindow() {
// ----------------------------------------------------------------------------------
var uploadWindow = document.getElementById("uploadWindow"),
uploadWindowWidth = 700,
winWidth, el, i, j, imgBox, img;
if (!(oEditor.undefined(window.innerWidth))) {
if (!oEditor.undefined(window.innerWidth)) {
winWidth = window.innerWidth;
} else if (document.documentElement &&
(!(oEditor.undefined(document.documentElement.clientWidth))) &&
!oEditor.undefined(document.documentElement.clientWidth) &&
document.documentElement.clientWidth !== 0) {
winWidth = document.documentElement.clientWidth;
} else if (document.body && (!(oEditor.undefined(document.body.clientWidth)))) {
} else if (document.body && !oEditor.undefined(document.body.clientWidth)) {
winWidth = document.body.clientWidth;
} else {
alert('현재 브라우저를 지원하지 않습니다.');
return;
}
uploadWindow.style.left = winWidth / 2 - (uploadWindowWidth / 2) + 'px';
uploadWindow.style.left = winWidth / 2 - uploadWindowWidth / 2 + 'px';
uploadWindow.style.display = "block";
uploadWindow.style.width = uploadWindowWidth + 'px';
@@ -401,11 +531,9 @@ function showUploadWindow() {
if (imgBox.className !== 'imageBox_theImage') {
continue;
}
if (imgBox.firstChild && (imgBox.firstChild.src === modifyImages[i])) {
if (imgBox.firstChild && imgBox.firstChild.src === modifyImages[i]) {
break;
}
if (imgBox.firstChild === null) {
img = new Image();
img.src = modifyImages[i];
@@ -439,11 +567,11 @@ function removeImages() {
remove = img.getElementsByTagName('img');
for (j = 0; j < remove.length; j++) {
img_delete_post(img);
img.removeChild(remove[j]);
}
img.parentNode.className = 'imageBox';
img.removeAttribute('title');
oEditor.removeEvent(img, 'mouseover', showDelete);
}
}
@@ -491,7 +619,7 @@ function startMoveTimer() {
if (moveTimer >= 0 && moveTimer < 10) {
moveTimer++;
setTimeout('startMoveTimer()', 8);
setTimeout(startMoveTimer(), 8);
}
if (moveTimer === 5) {
@@ -524,7 +652,7 @@ function getMouseButtn(e) {
if (code) {
if (browser.msie && browser.version < 9) {
code = code === 1 ? 0 : (code === 4 ? 1 : code);
code = code === 1 ? 0 : code === 4 ? 1 : code;
}
}
@@ -644,9 +772,9 @@ function dragDropMove(e) {
}
if (divXPositions[prop] < leftPos &&
(divXPositions[prop] + divWidth[prop] * 0.7) > leftPos &&
divXPositions[prop] + divWidth[prop] * 0.7 > leftPos &&
divYPositions[prop] < topPos &&
(divYPositions[prop] + divWidth[prop]) > topPos) {
divYPositions[prop] + divWidth[prop] > topPos) {
if (browser.msie) {
offsetX = offsetX_marker;
offsetY = offsetY_marker;
@@ -912,8 +1040,8 @@ DoUpload.prototype = {
offset += 2;
for (i = 0; i < tags; i++) {
if (view.getUint16(offset + (i * 12), little) === 0x0112) {
return view.getUint16(offset + (i * 12) + 8, little);
if (view.getUint16(offset + i * 12, little) === 0x0112) {
return view.getUint16(offset + i * 12 + 8, little);
}
}
} else if ((marker & 0xff00) !== 0xff00) {
@@ -951,62 +1079,140 @@ DoUpload.prototype = {
},
imageResize : function (image, filetype, resizeWidth, orientation, addWaterMark) {
var canvas = document.createElement("canvas"),
width = image.width,
height = image.height,
bitmapData, ctx, rotateImg, rotateW, rotateH, angle, step, offcanvas, offctx, dHeight, dWidth;
// 카메라를 돌려서 찍은 경우, 높이를 가로 사이즈로 정한 다음 리사이징 처리. 이 경우, 파일 크기와 처리 속도가
// 증가한다.
// if (orientation === 6 || orientation === 8) {
// var ratio = resizeWidth / height;
// dHeight = height * ratio;
// dWidth = width * ratio;
// } else {
dHeight = Math.ceil(resizeWidth / width * height);
dWidth = resizeWidth;
// }
canvas.width = dWidth;
canvas.height = dHeight;
ctx = canvas.getContext("2d");
step = Math.ceil(Math.log(image.width / resizeWidth) / Math.log(2));
if (step > 1) {
offcanvas = document.createElement('canvas');
offctx = offcanvas.getContext('2d');
offcanvas.width = width / 2;
offcanvas.height = height / 2;
offctx.drawImage(image, 0, 0, offcanvas.width, offcanvas.height);
offctx.drawImage(offcanvas, 0, 0, offcanvas.width / 2, offcanvas.height / 2);
ctx.drawImage(offcanvas, 0, 0, offcanvas.width / 2, offcanvas.height / 2, 0, 0, dWidth, dHeight);
} else {
ctx.drawImage(image, 0, 0, dWidth, dHeight);
}
if (orientation === 6 || orientation === 8 || orientation === 3) {
angle = orientation === 6 ? Math.PI / 2 : (orientation === 8 ? -Math.PI / 2 : 180 * Math.PI / 2);
bitmapData = canvas.toDataURL(filetype, oEditor.config.imgJpegQuality);
rotateImg = new Image();
rotateImg.src = bitmapData;
rotateW = orientation !== 3 ? dHeight : dWidth;
rotateH = orientation !== 3 ? dWidth : dHeight;
canvas.width = rotateW;
canvas.height = rotateH;
var canvas, source_w = image.width, source_h = image.height,
resize_h, resize_w, ratio_w, ratio_h, ratio_w_half, ratio_h_half,
source_img, resize_img, source_data, resize_data, j, i,
x2, weight, weights, weights_alpha, gx_a, gx_b, gx_g, gx_r, center_x, center_y, x_start, x_stop,
y_start, y_stop, y, dy, part_w, x, dx, w, pos_x,
ctx, gl, imageData = null;
// 카메라 로테이션 보정
if (orientation > 0) {
canvas = document.createElement("canvas");
canvas.width = source_w;
canvas.height = source_h;
ctx = canvas.getContext("2d");
ctx.clearRect(0, 0, canvas.width, canvas.height);
ctx.save();
ctx.translate(canvas.width / 2, canvas.height / 2);
ctx.rotate(angle);
ctx.drawImage(rotateImg, -dWidth / 2, -dHeight / 2);
switch (orientation) {
case 2 :
ctx.translate(-1, 0, 0, 1, canvas.width, 0); break;
case 3 :
ctx.translate(-1, 0, 0, -1, canvas.width, canvas.height); break;
case 4 :
ctx.translate(1, 0, 0, -1, 0, canvas.height); break;
case 5 :
ctx.translate(0, 1, 1, 0, 0, 0); break;
case 6 :
ctx.translate(0, 1, -1, 0, canvas.height, 0); break;
case 7 :
ctx.translate(0, -1, -1, 0, canvas.height, canvas.width); break;
case 8 :
ctx.translate(0, -1, 1, 0, 0, canvas.width); break;
default: break;
}
ctx.drawImage(image, 0, 0);
imageData = ctx.getImageData(0, 0, canvas.width, canvas.height);
ctx.restore();
source_w = canvas.width;
source_h = canvas.height;
}
if (source_w > resizeWidth) {
resize_w = resizeWidth;
resize_h = Math.ceil(resize_w / source_w * source_h);
try {
gl = GLScale({
width: resize_w, height: resize_h
});
gl(imageData || image, function (gl_canvas) {
canvas = gl_canvas;
});
} catch (ignore) {
canvas = document.createElement("canvas");
ctx = canvas.getContext("2d");
canvas.width = source_w;
canvas.height = source_h;
if (imageData) {
ctx.putImageData(imageData, 0, 0);
} else {
ctx.drawImage(image, 0, 0);
}
ratio_w = source_w / resize_w;
ratio_h = source_h / resize_h;
ratio_w_half = Math.ceil(ratio_w / 2);
ratio_h_half = Math.ceil(ratio_h / 2);
source_img = ctx.getImageData(0, 0, source_w, source_h);
resize_img = ctx.createImageData(resize_w, resize_h);
source_data = source_img.data;
resize_data = resize_img.data;
for (j = 0; j < resize_h; j++) {
for (i = 0; i < resize_w; i++) {
x2 = (i + j * resize_w) * 4;
weight = weights = weights_alpha = 0;
gx_r = gx_g = gx_b = gx_a = 0;
center_y = (j + 0.5) * ratio_h;
x_start = Math.floor(i * ratio_w);
x_stop = Math.ceil((i + 1) * ratio_w);
y_start = Math.floor(j * ratio_h);
y_stop = Math.ceil((j + 1) * ratio_h);
x_stop = Math.min(x_stop, source_w);
y_stop = Math.min(y_stop, source_h);
for (y = y_start; y < y_stop; y++) {
dy = Math.abs(center_y - (y + 0.5)) / ratio_h_half;
center_x = (i + 0.5) * ratio_w;
part_w = dy * dy;
for (x = x_start; x < x_stop; x++) {
dx = Math.abs(center_x - (x + 0.5)) / ratio_w_half;
w = Math.sqrt(part_w + dx * dx);
if (w >= 1) {
continue;
}
// Hermite 필터
weight = 2 * w * w * w - 3 * w * w + 1;
pos_x = 4 * (x + y * source_w);
// 알파 채널
gx_a += weight * source_data[pos_x + 3];
weights_alpha += weight;
if (source_data[pos_x + 3] < 255) {
weight = weight * source_data[pos_x + 3] / 250;
}
gx_r += weight * source_data[pos_x];
gx_g += weight * source_data[pos_x + 1];
gx_b += weight * source_data[pos_x + 2];
weights += weight;
}
}
resize_data[x2] = gx_r / weights;
resize_data[x2 + 1] = gx_g / weights;
resize_data[x2 + 2] = gx_b / weights;
resize_data[x2 + 3] = gx_a / weights_alpha;
}
}
canvas.width = resize_w;
canvas.height = resize_h;
ctx.putImageData(resize_img, 0, 0);
}
} else {
canvas = document.createElement("canvas"),
canvas.width = source_w; canvas.height = source_h;
ctx = canvas.getContext("2d");
ctx.drawImage(image, 0, 0);
resize_h = source_h;
resize_w = source_w;
}
if (this.reader.watermark && addWaterMark) {
@@ -1014,14 +1220,15 @@ DoUpload.prototype = {
ctx.drawImage(this.reader.watermark,
canvas.width - this.reader.watermark.width, canvas.height - this.reader.watermark.height);
}
return canvas.toDataURL(filetype, oEditor.config.imgJpegQuality);
},
canvasToBlob : function (bitmapData, mimetype) {
var raw = atob(bitmapData.split(',')[1]),
var i = 0,
intArray = [],
len = bitmapData.length,
i = 0;
raw = atob(bitmapData.split(',')[1]);
for (; i < len; i++) {
intArray.push(raw.charCodeAt(i));
@@ -1030,8 +1237,7 @@ DoUpload.prototype = {
},
makeThumbnail : function (image, type, name, orientation) {
var canvas = document.createElement("canvas"),
width,
var width,
xhr = new XMLHttpRequest(),
data = new FormData(),
bitmapData, file;
@@ -1041,11 +1247,10 @@ DoUpload.prototype = {
bitmapData = this.imageResize(image, type, width, orientation);
file = this.canvasToBlob(bitmapData, type);
data.append(inputFileName, file, 'thumb_' + name); // RFC Level 2
xhr.addEventListener("loadend", function () {
// loadend
}, false);
xhr.addEventListener("error", function () {
@@ -1060,20 +1265,19 @@ DoUpload.prototype = {
filename = evt.target.file.name,
filetype = evt.target.file.type,
file = evt.target.file,
blob, image, orientation = 1;
blob, image, orientation = 1, slice = 64 * 1024;
if (slice > file.size - 1) {
slice = file.size;
}
if (evt.target.readyState === FileReader.DONE) {
blob = new self.MyBlob(self.NewBlob(evt.target.result, filetype));
try {
orientation = self.getOrientation(evt.target.result.slice(0, 64 * 1024));
} catch(err) {
orientation = self.getOrientation(evt.target.result.slice(0, slice));
}
image = new Image();
image.onload = function () {
var bitmapData = null,
canvas = document.createElement("canvas"),
data = new FormData(),
fileFormat,
imgBox = file.boxElem,
@@ -1083,7 +1287,7 @@ DoUpload.prototype = {
xhr.open('POST', uploadScript, true);
if (imageResizeWidth > 0 && this.width > imageResizeWidth) {
if (imageResizeWidth > 0) {
bitmapData = self.imageResize(this, filetype, imageResizeWidth, orientation, true);
file = self.canvasToBlob(bitmapData, filetype);
}
@@ -1099,7 +1303,7 @@ DoUpload.prototype = {
}
xhr.addEventListener("error", function (evt) {
alert("파일 전송 중 오류: " + evt.target.error.code);
alert("파일 전송 중 오류: " + evt.toString());
}, false);
xhr.addEventListener("loadend", function onLoadendImageHandler(xhrevt) {
@@ -1132,7 +1336,6 @@ DoUpload.prototype = {
height: img.height,
width: img.width
};
imageCompletedList[imgBox.id] = imgInfo;
imgComplete(this, imgInfo, imgBox.id);
imgBox.appendChild(img);
@@ -1263,13 +1466,14 @@ function setResizeWidth() {
imageResizeWidth = value;
} else {
imageResizeInput.value = '';
imageResizeWidth = oEditor.config.imgMaxWidth;
imageResizeInput.setAttribute('placeholder', oEditor.config.imgMaxWidth.toString());
}
}
}
function init(dialog) {
var dlg, i, elem, input, select, value, name;
var dlg, i, elem, input, select, value, name, xhr_f, xhr_v, tmpcanvas, glicon;
oEditor = this;
oEditor.dialog = dialog;
@@ -1279,14 +1483,12 @@ function init(dialog) {
uploadImagePath = oEditor.config.iconPath + 'imageUpload';
uploadMaxNumber = oEditor.config.imgUploadNumber;
uploadScript = oEditor.config.editorPath + 'imageUpload/upload.php';
deleteScript = oEditor.config.editorPath + 'imageUpload/delete.php';
imageListWrapper = document.getElementById("imageListWrapper");
imageResizeWidth = oEditor.config.imgMaxWidth;
imageResizeInput = document.getElementById('idResizeWidth');
select = document.getElementById('idResizeSelectBox');
if (imageResizeWidth > 0) {
if (oEditor.config.imgMaxWidth > 0) {
imageResizeWidth = oEditor.config.imgMaxWidth;
for (i = 0; i < oEditor.config.imgResizeValue.length; i++) {
name = value = oEditor.config.imgResizeValue[i];
if (value > oEditor.config.imgMaxWidth) {
@@ -1300,6 +1502,9 @@ function init(dialog) {
select.onchange = function () {
if (this.value < 0) {
document.getElementById('idUserInputWrapper').style.display = '';
imageResizeInput.value = '';
imageResizeWidth = oEditor.config.imgMaxWidth;
imageResizeInput.focus();
} else {
document.getElementById('idUserInputWrapper').style.display = 'none';
imageResizeWidth = this.value;
@@ -1326,7 +1531,6 @@ function init(dialog) {
initGallery();
showUploadWindow();
createInsertionMaker();
selectedFilesNum = 0;
oEditor.addEvent(imageListWrapper, 'dragover', dragOver);
oEditor.addEvent(imageListWrapper, 'dragleave', dragOut);
@@ -1343,6 +1547,38 @@ function init(dialog) {
if (browser.mobile) {
input = document.getElementById('inputImageUpload');
input.setAttribute('capture', 'gallery');
input.setAttribute('capture', 'filesystem');
}
tmpcanvas = document.createElement('canvas');
if (tmpcanvas.getContext('webgl', {preserveDrawingBuffer: true}) ||
tmpcanvas.getContext('experimental-webgl', {preserveDrawingBuffer: true}))
{
useWebGL = true;
GLScale.Hermite = { vertex: '', fragment: '' };
xhr_v = new XMLHttpRequest();
xhr_f = new XMLHttpRequest();
xhr_f.open('POST', 'js/fragment-shader.glsl', true);
xhr_f.addEventListener("load", function (evt) {
if (evt.target.status === 200) {
GLScale.Hermite.fragment = this.responseText;
} else {
useWebGL = false;
}
});
xhr_v.open('POST', 'js/vertex-shader.glsl', true);
xhr_v.addEventListener("load", function (evt) {
if (evt.target.status === 200) {
GLScale.Hermite.vertex = this.responseText;
} else {
useWebGL = false;
}
});
xhr_f.send();
xhr_v.send();
}
glicon = new Image();
glicon.className = 'webgl_logo';
glicon.src = uploadImagePath + (useWebGL ? "/webgl.png" : "/webgl-off.png");
document.getElementById('webgl_logo_wrapper').appendChild(glicon);
}
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,10 @@
// -------------------------------------------------------
// CHEditor WebGL Vertex Shader
// -------------------------------------------------------
attribute vec2 a_position;
uniform vec2 u_resolution;
void main() {
vec2 clipSpace = (a_position / u_resolution * 2.0) - 1.0;
gl_Position = vec4(clipSpace * vec2(1, -1), 0, 1);
}
+175
View File
@@ -0,0 +1,175 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
// ================================================================
// CHEditor Template
// ================================================================
-->
<Template>
<Container>
<Html>
<![CDATA[
<div class="cheditor-container">
<div id="toolbar" style="padding:4px;height:47px"></div>
<div id="editWrapper" class="cheditor-editarea-wrapper" style="clear:left">
<iframe frameborder="0" class="cheditor-editarea"></iframe>
<textarea class="cheditor-editarea-text-content" spellcheck="false"></textarea>
</div>
<div id="modifyBlock" class="cheditor-modify-block"></div>
<div id="tagPath" class="cheditor-tag-path">
<span class="cheditor-status-bar">&lt;html&gt; </span>
</div>
<div id="resizeBar" class="cheditor-resizebar"></div>
<div id="viewMode" class="cheditor-viewmode">
<div id="rich" class="cheditor-tab-rich" title="입력 모드" alt="">&#160;</div>
<div id="code" class="cheditor-tab-code-off" title="HTML 편집" alt="">&#160;</div>
<div id="preview" class="cheditor-tab-preview-off" title="미리 보기" alt="">&#160;</div>
</div>
</div>
]]>
</Html>
</Container>
<PopupWindow>
<Html>
<![CDATA[
<div class="cheditor-popup-window" onselectstart="return false">
<div class="cheditor-popup-drag-handle">
<div class="cheditor-popup-titlebar">
<span><label class="cheditor-popup-title"></label></span>
</div>
</div>
<div class="cheditor-popup-cframe" id="cheditor-popup-cframe"></div>
</div>
]]>
</Html>
</PopupWindow>
<Toolbar>
<Image file="toolbar.png" />
<Group name="Format">
<Button name="Bold" tooltip="진하게">
<Attribute class="cheditor-tb-bg" width="24" height="23" check="1">
<Icon position="144" width="16" class="cheditor-tb-icon" margin="4px" />
<Execution method="doCmd" value="Bold" />
</Attribute>
</Button>
<Button name="Italic" tooltip="기울임">
<Attribute class="cheditor-tb-bg" width="23" height="23" check="1">
<Icon position="160" width="16" class="cheditor-tb-icon" />
<Execution method="doCmd" value="Italic" />
</Attribute>
</Button>
<Button name="Underline" tooltip="밑줄">
<Attribute class="cheditor-tb-bg" width="23" height="23" check="1">
<Icon position="176" width="16" class="cheditor-tb-icon" />
<Execution method="doCmd" value="Underline" />
</Attribute>
</Button>
</Group>
<Group name="Alignment">
<Button name="JustifyLeft" tooltip="왼쪽 정렬">
<Attribute class="cheditor-tb-bg" width="24" height="23" check="1">
<Icon position="286" width="16" class="cheditor-tb-icon" margin="4px" />
<Execution method="doCmd" value="JustifyLeft" />
</Attribute>
</Button>
<Button name="JustifyCenter" tooltip="가운데 정렬">
<Attribute class="cheditor-tb-bg" width="23" height="23" check="1">
<Icon position="302" width="16" class="cheditor-tb-icon" />
<Execution method="doCmd" value="JustifyCenter" />
</Attribute>
</Button>
<Button name="JustifyRight" tooltip="오른쪽 정렬">
<Attribute class="cheditor-tb-bg" width="23" height="23" check="1">
<Icon position="318" width="16" class="cheditor-tb-icon" />
<Execution method="doCmd" value="JustifyRight" />
</Attribute>
</Button>
<Button name="JustifyFull" tooltip="양쪽 정렬">
<Attribute class="cheditor-tb-bg" width="23" height="23" check="1">
<Icon position="334" width="16" class="cheditor-tb-icon" />
<Execution method="doCmd" value="JustifyFull" />
</Attribute>
</Button>
</Group>
<Group name="List">
<Button name="OrderedList" tooltip="문단 번호">
<Attribute class="cheditor-tb-bg" width="24" height="23" check="1" type="combo">
<Icon position="350" width="16" class="cheditor-tb-icon" margin="4px" />
<Execution method="doCmd" value="InsertOrderedList" />
</Attribute>
</Button>
<Button name="OrderedListCombo" tooltip="문단 번호 확장">
<Attribute class="cheditor-tb-bgcombo" width="10" height="23" type="combobox" node="OrderedList">
<Icon width="10" class="cheditor-tb-combo" margin="0px" />
<Execution method="showPulldown" value="OrderedList" />
</Attribute>
</Button>
<Button name="UnOrderedList" tooltip="글 머리표">
<Attribute class="cheditor-tb-bg" width="23" height="23" check="1" type="combo">
<Icon position="366" width="16" class="cheditor-tb-icon" />
<Execution method="doCmd" value="InsertUnOrderedList" />
</Attribute>
</Button>
<Button name="UnOrderedListCombo" tooltip="글 머리표 확장">
<Attribute class="cheditor-tb-bgcombo" width="10" height="23" type="combobox" node="UnOrderedList">
<Icon width="10" class="cheditor-tb-combo" margin="0px" />
<Execution method="showPulldown" value="UnOrderedList" />
</Attribute>
</Button>
</Group>
<Group name="Split">
</Group>
<Group name="FontName">
<Button name="FontName" tooltip="글꼴">
<Attribute class="cheditor-tb-bg55" width="55" height="23" check="1">
<Icon class="cheditor-tb-text" alt="굴림" />
<Execution method="showPulldown" value="FontName" />
</Attribute>
</Button>
</Group>
<Group name="FontSize">
<Button name="FontSize" tooltip="글꼴 크기">
<Attribute class="cheditor-tb-bg40" width="41" height="23" check="1">
<Icon class="cheditor-tb-text" alt="9pt" />
<Execution method="showPulldown" value="FontSize" />
</Attribute>
</Button>
</Group>
<Group name="Link">
<Button name="Link" tooltip="하이퍼링크">
<Attribute class="cheditor-tb-bg" width="24" height="23">
<Icon position="558" width="16" class="cheditor-tb-icon" margin="4px" />
<Execution method="windowOpen" value="Link" />
</Attribute>
</Button>
<Button name="UnLink" tooltip="하이퍼링크 없애기">
<Attribute class="cheditor-tb-bg" width="23" height="23" check="1">
<Icon position="574" width="16" class="cheditor-tb-icon" />
<Execution method="doCmd" value="UnLink" />
</Attribute>
</Button>
</Group>
<Group name="ImageUpload">
<Button name="Image" tooltip="내 PC 사진 넣기">
<Attribute class="cheditor-tb-bg44" width="50" height="23">
<Icon position="590" width="36" class="cheditor-tb-icon36" margin="6px" />
<Execution method="windowOpen" value="ImageUpload" />
</Attribute>
</Button>
</Group>
<Group name="Media">
<Button name="Flash" tooltip="플래쉬 동영상">
<Attribute class="cheditor-tb-bg" width="24" height="23">
<Icon position="662" width="16" class="cheditor-tb-icon" margin="4px" />
<Execution method="windowOpen" value="FlashMovie" />
</Attribute>
</Button>
<Button name="SmileyIcon" tooltip="표정 아이콘">
<Attribute class="cheditor-tb-bg" width="23" height="23">
<Icon position="494" width="16" class="cheditor-tb-icon" />
<Execution method="windowOpen" value="EmotionIcon" />
</Attribute>
</Button>
</Group>
</Toolbar>
</Template>
+13 -1
View File
@@ -10,7 +10,7 @@
<![CDATA[
<div class="cheditor-container">
<div id="toolbar" style="padding:4px;height:47px"></div>
<div id="editWrapper" class="cheditor-editarea-wrapper">
<div id="editWrapper" class="cheditor-editarea-wrapper" style="clear:left">
<iframe frameborder="0" class="cheditor-editarea"></iframe>
<textarea class="cheditor-editarea-text-content" spellcheck="false"></textarea>
</div>
@@ -73,6 +73,18 @@
</Button>
</Group>
<Group name="Edit">
<Button name="Copy" tooltip="복사하기">
<Attribute class="cheditor-tb-bg" width="24" height="23" check="1">
<Icon position="64" width="16" class="cheditor-tb-icon" margin="4px" />
<Execution method="doCmd" value="Copy" />
</Attribute>
</Button>
<Button name="Cut" tooltip="오려두기">
<Attribute class="cheditor-tb-bg" width="23" height="23" check="1">
<Icon position="80" width="16" class="cheditor-tb-icon" />
<Execution method="doCmd" value="Cut" />
</Attribute>
</Button>
<Button name="Paste" tooltip="텍스트로 붙이기">
<Attribute class="cheditor-tb-bg" width="23" height="23">
<Icon position="96" width="16" class="cheditor-tb-icon" />
+5
View File
@@ -26,6 +26,11 @@ $user_nick = social_relace_nick($user_profile->displayName);
$user_email = isset($user_profile->emailVerified) ? $user_profile->emailVerified : $user_profile->email;
$user_id = $user_profile->sid ? preg_replace("/[^0-9a-z_]+/i", "", $user_profile->sid) : get_social_convert_id($user_profile->identifier, $provider_name);
if(! $user_nick) {
$tmp = explode('_', $user_id);
$user_nick = $tmp[1];
}
//$is_exists_id = exist_mb_id($user_id);
//$is_exists_name = exist_mb_nick($user_nick, '');
$user_id = exist_mb_id_recursive($user_id);
+1 -1
View File
@@ -161,7 +161,7 @@ add_stylesheet('<link rel="stylesheet" href="'.$board_skin_url.'/style.css">', 0
?>
<li>
<i class="fa fa-folder-open" aria-hidden="true"></i>
<a href="<?php echo $view['file'][$i]['href']; ?>" class="view_file_download" download>
<a href="<?php echo $view['file'][$i]['href']; ?>" class="view_file_download">
<strong><?php echo $view['file'][$i]['source'] ?></strong> <?php echo $view['file'][$i]['content'] ?> (<?php echo $view['file'][$i]['size'] ?>)
</a>
<br>
+1 -1
View File
@@ -161,7 +161,7 @@ add_stylesheet('<link rel="stylesheet" href="'.$board_skin_url.'/style.css">', 0
?>
<li>
<i class="fa fa-folder-open" aria-hidden="true"></i>
<a href="<?php echo $view['file'][$i]['href']; ?>" class="view_file_download" download>
<a href="<?php echo $view['file'][$i]['href']; ?>" class="view_file_download">
<strong><?php echo $view['file'][$i]['source'] ?></strong> <?php echo $view['file'][$i]['content'] ?> (<?php echo $view['file'][$i]['size'] ?>)
</a>
<br>
+1 -1
View File
@@ -14,7 +14,7 @@ $list_count = (is_array($list) && $list) ? count($list) : 0;
<?php
if ($list[$i]['icon_secret']) echo "<i class=\"fa fa-lock\" aria-hidden=\"true\"></i><span class=\"sound_only\">비밀글</span> ";
echo "<a href=\"".$list[$i]['href']."\"> ";
echo "<a href=\"".get_pretty_url($bo_table, $list[$i]['wr_id'])."\"> ";
if ($list[$i]['is_notice'])
echo "<strong>".$list[$i]['subject']."</strong>";
else
+1 -1
View File
@@ -16,7 +16,7 @@ $list_count = (is_array($list) && $list) ? count($list) : 0;
if ($list[$i]['icon_secret']) echo "<span class=\"lock_icon\"><i class=\"fa fa-lock\" aria-hidden=\"true\"></i></span> ";
if ($list[$i]['icon_new']) echo "<span class=\"new_icon\">N<span class=\"sound_only\">새글</span></span>";
//echo $list[$i]['icon_reply']." ";
echo "<a href=\"".$list[$i]['href']."\">";
echo "<a href=\"".get_pretty_url($bo_table, $list[$i]['wr_id'])."\">";
if ($list[$i]['is_notice'])
echo "<strong>".$list[$i]['subject']."</strong>";
else
+3 -2
View File
@@ -23,13 +23,14 @@ $list_count = (is_array($list) && $list) ? count($list) : 0;
$thumb['alt'] = '이미지가 없습니다.';
}
$img_content = '<img src="'.$img.'" alt="'.$thumb['alt'].'" >';
$wr_href = get_pretty_url($bo_table, $list[$i]['wr_id']);
?>
<li class="gallery_li">
<a href="<?php echo $list[$i]['href'] ?>" class="lt_img"><?php echo run_replace('thumb_image_tag', $img_content, $thumb); ?></a>
<a href="<?php echo $wr_href; ?>" class="lt_img"><?php echo run_replace('thumb_image_tag', $img_content, $thumb); ?></a>
<?php
if ($list[$i]['icon_secret']) echo "<i class=\"fa fa-lock\" aria-hidden=\"true\"></i><span class=\"sound_only\">비밀글</span> ";
echo "<a href=\"".$list[$i]['href']."\"> ";
echo "<a href=\"".$wr_href."\"> ";
if ($list[$i]['is_notice'])
echo "<strong>".$list[$i]['subject']."</strong>";
else
+4 -2
View File
@@ -17,6 +17,8 @@ $list_count = (is_array($list) && $list) ? count($list) : 0;
$img_link_html = '';
$wr_href = get_pretty_url($bo_table, $list[$i]['wr_id']);
if( $i === 0 ) {
$thumb = get_list_thumbnail($bo_table, $list[$i]['wr_id'], $thumb_width, $thumb_height, false, true);
@@ -27,7 +29,7 @@ $list_count = (is_array($list) && $list) ? count($list) : 0;
$thumb['alt'] = '이미지가 없습니다.';
}
$img_content = '<img src="'.$img.'" alt="'.$thumb['alt'].'" >';
$img_link_html = '<a href="'.$list[$i]['href'].'" class="lt_img" >'.run_replace('thumb_image_tag', $img_content, $thumb).'</a>';
$img_link_html = '<a href="'.$wr_href.'" class="lt_img" >'.run_replace('thumb_image_tag', $img_content, $thumb).'</a>';
}
?>
<li>
@@ -35,7 +37,7 @@ $list_count = (is_array($list) && $list) ? count($list) : 0;
<?php
if ($list[$i]['icon_secret']) echo "<i class=\"fa fa-lock\" aria-hidden=\"true\"></i><span class=\"sound_only\">비밀글</span> ";
echo "<a href=\"".$list[$i]['href']."\" class=\"pic_li_tit\"> ";
echo "<a href=\"".$wr_href."\" class=\"pic_li_tit\"> ";
if ($list[$i]['is_notice'])
echo "<strong>".$list[$i]['subject']."</strong>";
else
+5 -8
View File
@@ -18,13 +18,9 @@ add_stylesheet('<link rel="stylesheet" href="'.$member_skin_url.'/style.css">',
<ul class="point_list">
<?php
$sum_point1 = $sum_point2 = $sum_point3 = 0;
$sql = " select *
{$sql_common}
{$sql_order}
limit {$from_record}, {$rows} ";
$result = sql_query($sql);
for ($i=0; $row=sql_fetch_array($result); $i++) {
$i = 0;
foreach((array) $list as $row){
$point1 = $point2 = 0;
$point_use_class = '';
if ($row['po_point'] > 0) {
@@ -55,7 +51,8 @@ add_stylesheet('<link rel="stylesheet" href="'.$member_skin_url.'/style.css">',
</span>
</li>
<?php
}
$i++;
} // end foreach
if ($i == 0)
echo '<li class="empty_li">자료가 없습니다.</li>';
+18
View File
@@ -15,6 +15,7 @@ if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
<input type="hidden" name="sca" value="<?php echo $sca ?>">
<input type="hidden" name="stx" value="<?php echo $stx; ?>">
<input type="hidden" name="page" value="<?php echo $page; ?>">
<input type="hidden" name="token" value="<?php echo $token ?>">
<?php
$option = '';
$option_hidden = '';
@@ -106,6 +107,23 @@ if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
return false;
}
$.ajax({
type: "POST",
url: g5_bbs_url+"/ajax.write.token.php",
data: { 'token_case' : 'qa_write' },
cache: false,
async: false,
dataType: "json",
success: function(data) {
if (typeof data.token !== "undefined") {
token = data.token;
if(typeof f.token === "undefined")
$(f).prepend('<input type="hidden" name="token" value="">');
$(f).find("input[name=token]").val(token);
}
}
});
document.getElementById("btn_submit").disabled = "disabled";
return true;
+2 -2
View File
@@ -9,8 +9,8 @@ if (!isset($g5['title'])) {
$g5_head_title = $g5['title'];
}
else {
$g5_head_title = $g5['title']; // 상태바에 표시될 제목
$g5_head_title .= " | ".$config['cf_title'];
// 상태바에 표시될 제목
$g5_head_title = implode(' | ', array_filter(array($g5['title'], $config['cf_title'])));
}
$g5['title'] = strip_tags($g5['title']);
@@ -143,7 +143,7 @@ jQuery(function($){
if (isset($view['file'][$i]['source']) && $view['file'][$i]['source'] && !$view['file'][$i]['view']) {
?>
<li>
<a href="<?php echo $view['file'][$i]['href']; ?>" class="view_file_download" download>
<a href="<?php echo $view['file'][$i]['href']; ?>" class="view_file_download">
<i class="fa fa-download" aria-hidden="true"></i>
<strong><?php echo $view['file'][$i]['source'] ?></strong>
<?php echo $view['file'][$i]['content'] ?> (<?php echo $view['file'][$i]['size'] ?>)
@@ -145,7 +145,7 @@ jQuery(function($){
if (isset($view['file'][$i]['source']) && $view['file'][$i]['source'] && !$view['file'][$i]['view']) {
?>
<li>
<a href="<?php echo $view['file'][$i]['href']; ?>" class="view_file_download" download>
<a href="<?php echo $view['file'][$i]['href']; ?>" class="view_file_download">
<i class="fa fa-download" aria-hidden="true"></i>
<strong><?php echo $view['file'][$i]['source'] ?></strong>
<?php echo $view['file'][$i]['content'] ?> (<?php echo $view['file'][$i]['size'] ?>)
@@ -28,7 +28,8 @@ $is_show_next_prev = ($list_count > 4) ? 1 : 0;
$thumb = get_list_thumbnail($bo_table, $list[$i]['wr_id'], $thumb_width, $thumb_height, false, true);
$img = $thumb['src'] ? $thumb['src'] : '';
$img_content = $img ? '<img src="'.$img.'" alt="'.$thumb['alt'].'" >' : '';
$wr_href = get_pretty_url($bo_table, $list[$i]['wr_id']);
$echo_ul = ( $i && (($i % $divisor_count) === 0) ) ? '</ul><ul class="item">'.PHP_EOL : '';
echo $echo_ul;
@@ -38,10 +39,10 @@ $is_show_next_prev = ($list_count > 4) ? 1 : 0;
//echo $list[$i]['icon_reply']." ";
if( $img_content ){
echo "<a href=\"".$list[$i]['href']."\" class=\"lt_thumb\">".run_replace('thumb_image_tag', $img_content, $thumb)."</a> ";
echo "<a href=\"".$wr_href."\" class=\"lt_thumb\">".run_replace('thumb_image_tag', $img_content, $thumb)."</a> ";
}
echo "<a href=\"".$list[$i]['href']."\" class=\"lt_tit\">";
echo "<a href=\"".$wr_href."\" class=\"lt_tit\">";
if ($list[$i]['icon_secret']) echo "<i class=\"fa fa-lock\" aria-hidden=\"true\"></i> ";
if ($list[$i]['is_notice'])
echo "<strong>".$list[$i]['subject']."</strong>";
@@ -15,7 +15,7 @@ $list_count = (is_array($list) && $list) ? count($list) : 0;
<li>
<span class="cm_lt_nick"><?php echo get_member_profile_img($member['mb_id']); ?></span>
<div class="cm_lt_info">
<a href="<?php echo $list[$i]['href']; ?>" class="over"><?php echo $list[$i]['subject']; ?></a>
<a href="<?php echo get_pretty_url($bo_table, $list[$i]['wr_id']); ?>" class="over"><?php echo $list[$i]['subject']; ?></a>
<br>
<span class="lt_nick"><?php echo $list[$i]['name'] ?></span>
<span class="lt_date"><?php echo $list[$i]['datetime2'] ?></span>
@@ -16,7 +16,7 @@ $list_count = (is_array($list) && $list) ? count($list) : 0;
if ($list[$i]['icon_secret']) echo "<span class=\"lock_icon\"><i class=\"fa fa-lock\" aria-hidden=\"true\"></i></span> ";
if ($list[$i]['icon_new']) echo "<span class=\"new_icon\">N<span class=\"sound_only\">새글</span></span>";
//echo $list[$i]['icon_reply']." ";
echo "<a href=\"".$list[$i]['href']."\">";
echo "<a href=\"".get_pretty_url($bo_table, $list[$i]['wr_id'])."\">";
if ($list[$i]['is_notice'])
echo "<strong>".$list[$i]['subject']."</strong>";
else
@@ -19,12 +19,8 @@ add_stylesheet('<link rel="stylesheet" href="'.$member_skin_url.'/style.css">',
<?php
$sum_point1 = $sum_point2 = $sum_point3 = 0;
$sql = " select *
{$sql_common}
{$sql_order}
limit {$from_record}, {$rows} ";
$result = sql_query($sql);
for ($i=0; $row=sql_fetch_array($result); $i++) {
$i = 0;
foreach((array) $list as $row){
$point1 = $point2 = 0;
$point_use_class = '';
if ($row['po_point'] > 0) {
@@ -55,7 +51,8 @@ add_stylesheet('<link rel="stylesheet" href="'.$member_skin_url.'/style.css">',
</span>
</li>
<?php
}
$i++;
} // end foreach
if ($i == 0)
echo '<li class="empty_list">자료가 없습니다.</li>';
@@ -5,6 +5,12 @@ if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
add_stylesheet('<link rel="stylesheet" href="'.$qa_skin_url.'/style.css">', 0);
?>
<form name="fqalist" id="fqalist" action="./qadelete.php" onsubmit="return fqalist_submit(this);" method="post">
<input type="hidden" name="stx" value="<?php echo $stx; ?>">
<input type="hidden" name="sca" value="<?php echo $sca; ?>">
<input type="hidden" name="page" value="<?php echo $page; ?>">
<input type="hidden" name="token" value="<?php echo get_text($token); ?>">
<?php if ($admin_href || $write_href) { ?>
<ul class="btn_top top btn_bo_user">
<?php if ($admin_href) { ?><li><a href="<?php echo $admin_href ?>" class="btn_admin btn"><i class="fa fa-cog fa-spin fa-fw"></i><span class="sound_only">관리자</span></a></li><?php } ?>
@@ -41,12 +47,6 @@ add_stylesheet('<link rel="stylesheet" href="'.$qa_skin_url.'/style.css">', 0);
<!-- } 카테고리 끝 -->
<?php } ?>
<form name="fqalist" id="fqalist" action="./qadelete.php" onsubmit="return fqalist_submit(this);" method="post">
<input type="hidden" name="stx" value="<?php echo $stx; ?>">
<input type="hidden" name="sca" value="<?php echo $sca; ?>">
<input type="hidden" name="page" value="<?php echo $page; ?>">
<input type="hidden" name="token" value="<?php echo get_text($token); ?>">
<?php if ($is_checkbox) { ?>
<div class="all_chk chk_box">
<input type="checkbox" id="chkall" onclick="if (this.checked) all_checked(true); else all_checked(false);" class="selec_chk">
@@ -93,8 +93,8 @@ add_stylesheet('<link rel="stylesheet" href="'.$qa_skin_url.'/style.css">', 0);
<?php if ($i == 0) { echo '<li class="empty_list">게시물이 없습니다.</li>'; } ?>
</ul>
</div>
</form>
</div>
</form>
<?php if($is_checkbox) { ?>
<noscript>
@@ -9,12 +9,13 @@ if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
?>
<h2>답변등록</h2>
<form name="fanswer" method="post" action="./qawrite_update.php" autocomplete="off">
<form name="fanswer" method="post" action="./qawrite_update.php" onsubmit="return fwrite_submit(this);" autocomplete="off">
<input type="hidden" name="qa_id" value="<?php echo $view['qa_id']; ?>">
<input type="hidden" name="w" value="a">
<input type="hidden" name="sca" value="<?php echo $sca ?>">
<input type="hidden" name="stx" value="<?php echo $stx; ?>">
<input type="hidden" name="page" value="<?php echo $page; ?>">
<input type="hidden" name="token" value="<?php echo $token ?>">
<?php
$option = '';
$option_hidden = '';
@@ -104,6 +105,23 @@ if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
return false;
}
$.ajax({
type: "POST",
url: g5_bbs_url+"/ajax.write.token.php",
data: { 'token_case' : 'qa_write' },
cache: false,
async: false,
dataType: "json",
success: function(data) {
if (typeof data.token !== "undefined") {
token = data.token;
if(typeof f.token === "undefined")
$(f).prepend('<input type="hidden" name="token" value="">');
$(f).find("input[name=token]").val(token);
}
}
});
document.getElementById("btn_submit").disabled = "disabled";
return true;
@@ -15,15 +15,10 @@ add_stylesheet('<link rel="stylesheet" href="'.$qa_skin_url.'/style.css">', 0);
<?php } ?>
<li>
<button type="button" class="btn_more_opt btn_b03 btn"><i class="fa fa-ellipsis-v" aria-hidden="true"></i><span class="sound_only">게시판 리스트 옵션</span></button>
<?php ob_start(); ?>
<ul class="more_opt">
<?php if ($update_href) { ?><li><a href="<?php echo $update_href ?>"><i class="fa fa-pencil-square-o" aria-hidden="true"></i> 수정</a></li><?php } ?>
<?php if ($delete_href) { ?><li><a href="<?php echo $delete_href ?>" onclick="del(this.href); return false;"><i class="fa fa-trash-o" aria-hidden="true"></i> 삭제</a></li><?php } ?>
<?php if ($update_href) { ?><li><a href="<?php echo $update_href ?>"><i class="fa fa-pencil-square-o" aria-hidden="true"></i> 수정</a></li><?php } ?>
</ul>
<?php
$link_buttons = ob_get_contents();
ob_end_flush();
?>
</li>
</ul>
<script>
@@ -113,8 +108,8 @@ $(".btn_more_opt").on("click", function() {
<?php if ($prev_href || $next_href) { ?>
<ul class="bo_v_nb">
<?php if ($prev_href) { ?><li class="bo_v_prev"><a href="<?php echo $prev_href ?>"><i class="fa fa-chevron-up" aria-hidden="true"></i><span class="sound_only">이전글</span> <?php echo $prev_wr_subject;?></a></li><?php } ?>
<?php if ($next_href) { ?><li class="bo_v_next"><a href="<?php echo $next_href ?>"><i class="fa fa-chevron-down" aria-hidden="true"></i><span class="sound_only">다음글</span> <?php echo $next_wr_subject;?></a></li><?php } ?>
<?php if ($prev_href) { ?><li class="bo_v_prev"><a href="<?php echo $prev_href ?>"><i class="fa fa-chevron-up" aria-hidden="true"></i><span class="sound_only">이전글</span> <?php echo $prev_qa_subject;?></a></li><?php } ?>
<?php if ($next_href) { ?><li class="bo_v_next"><a href="<?php echo $next_href ?>"><i class="fa fa-chevron-down" aria-hidden="true"></i><span class="sound_only">다음글</span> <?php echo $next_qa_subject;?></a></li><?php } ?>
</ul>
<?php } ?>
</article>
+1 -1
View File
@@ -161,7 +161,7 @@ add_stylesheet('<link rel="stylesheet" href="'.$board_skin_url.'/style.css">', 0
?>
<li>
<i class="fa fa-folder-open" aria-hidden="true"></i>
<a href="<?php echo $view['file'][$i]['href']; ?>" class="view_file_download" download>
<a href="<?php echo $view['file'][$i]['href']; ?>" class="view_file_download">
<strong><?php echo $view['file'][$i]['source'] ?></strong> <?php echo $view['file'][$i]['content'] ?> (<?php echo $view['file'][$i]['size'] ?>)
</a>
<br>
+1 -1
View File
@@ -161,7 +161,7 @@ add_stylesheet('<link rel="stylesheet" href="'.$board_skin_url.'/style.css">', 0
?>
<li>
<i class="fa fa-folder-open" aria-hidden="true"></i>
<a href="<?php echo $view['file'][$i]['href']; ?>" class="view_file_download" download>
<a href="<?php echo $view['file'][$i]['href']; ?>" class="view_file_download">
<strong><?php echo $view['file'][$i]['source'] ?></strong> <?php echo $view['file'][$i]['content'] ?> (<?php echo $view['file'][$i]['size'] ?>)
</a>
<br>
@@ -14,7 +14,7 @@ $list_count = (is_array($list) && $list) ? count($list) : 0;
<?php
if ($list[$i]['icon_secret']) echo "<i class=\"fa fa-lock\" aria-hidden=\"true\"></i><span class=\"sound_only\">비밀글</span> ";
echo "<a href=\"".$list[$i]['href']."\"> ";
echo "<a href=\"".get_pretty_url($bo_table, $list[$i]['wr_id'])."\"> ";
if ($list[$i]['is_notice'])
echo "<strong>".$list[$i]['subject']."</strong>";
else
@@ -16,7 +16,7 @@ $list_count = (is_array($list) && $list) ? count($list) : 0;
if ($list[$i]['icon_secret']) echo "<span class=\"lock_icon\"><i class=\"fa fa-lock\" aria-hidden=\"true\"></i></span> ";
if ($list[$i]['icon_new']) echo "<span class=\"new_icon\">N<span class=\"sound_only\">새글</span></span>";
//echo $list[$i]['icon_reply']." ";
echo "<a href=\"".$list[$i]['href']."\">";
echo "<a href=\"".get_pretty_url($bo_table, $list[$i]['wr_id'])."\">";
if ($list[$i]['is_notice'])
echo "<strong>".$list[$i]['subject']."</strong>";
else
@@ -23,13 +23,14 @@ $list_count = (is_array($list) && $list) ? count($list) : 0;
$thumb['alt'] = '이미지가 없습니다.';
}
$img_content = '<img src="'.$img.'" alt="'.$thumb['alt'].'" >';
$wr_href = get_pretty_url($bo_table, $list[$i]['wr_id']);
?>
<li class="galley_li">
<a href="<?php echo $list[$i]['href'] ?>" class="lt_img"><?php echo run_replace('thumb_image_tag', $img_content, $thumb); ?></a>
<a href="<?php echo $wr_href; ?>" class="lt_img"><?php echo run_replace('thumb_image_tag', $img_content, $thumb); ?></a>
<?php
if ($list[$i]['icon_secret']) echo "<i class=\"fa fa-lock\" aria-hidden=\"true\"></i><span class=\"sound_only\">비밀글</span> ";
echo "<a href=\"".$list[$i]['href']."\"> ";
echo "<a href=\"".$wr_href."\"> ";
if ($list[$i]['is_notice'])
echo "<strong>".$list[$i]['subject']."</strong>";
else
@@ -16,6 +16,8 @@ $list_count = (is_array($list) && $list) ? count($list) : 0;
for ($i=0; $i<$list_count; $i++) {
$img_link_html = '';
$wr_href = get_pretty_url($bo_table, $list[$i]['wr_id']);
if( $i === 0 ) {
$thumb = get_list_thumbnail($bo_table, $list[$i]['wr_id'], $thumb_width, $thumb_height, false, true);
@@ -27,7 +29,7 @@ $list_count = (is_array($list) && $list) ? count($list) : 0;
$thumb['alt'] = '이미지가 없습니다.';
}
$img_content = '<img src="'.$img.'" alt="'.$thumb['alt'].'" >';
$img_link_html = '<a href="'.$list[$i]['href'].'" class="lt_img" >'.run_replace('thumb_image_tag', $img_content, $thumb).'</a>';
$img_link_html = '<a href="'.$wr_href.'" class="lt_img" >'.run_replace('thumb_image_tag', $img_content, $thumb).'</a>';
}
?>
<li>
@@ -35,7 +37,7 @@ $list_count = (is_array($list) && $list) ? count($list) : 0;
<?php
if ($list[$i]['icon_secret']) echo "<i class=\"fa fa-lock\" aria-hidden=\"true\"></i><span class=\"sound_only\">비밀글</span> ";
echo "<a href=\"".$list[$i]['href']."\" class=\"pic_li_tit\"> ";
echo "<a href=\"".$wr_href."\" class=\"pic_li_tit\"> ";
if ($list[$i]['is_notice'])
echo "<strong>".$list[$i]['subject']."</strong>";
else
+4 -7
View File
@@ -19,12 +19,8 @@ add_stylesheet('<link rel="stylesheet" href="'.$member_skin_url.'/style.css">',
<?php
$sum_point1 = $sum_point2 = $sum_point3 = 0;
$sql = " select *
{$sql_common}
{$sql_order}
limit {$from_record}, {$rows} ";
$result = sql_query($sql);
for ($i=0; $row=sql_fetch_array($result); $i++) {
$i = 0;
foreach((array) $list as $row){
$point1 = $point2 = 0;
$point_use_class = '';
if ($row['po_point'] > 0) {
@@ -55,7 +51,8 @@ add_stylesheet('<link rel="stylesheet" href="'.$member_skin_url.'/style.css">',
</span>
</li>
<?php
}
$i++;
} // end foreach
if ($i == 0)
echo '<li class="empty_li">자료가 없습니다.</li>';
@@ -15,6 +15,7 @@ if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
<input type="hidden" name="sca" value="<?php echo $sca ?>">
<input type="hidden" name="stx" value="<?php echo $stx; ?>">
<input type="hidden" name="page" value="<?php echo $page; ?>">
<input type="hidden" name="token" value="<?php echo $token ?>">
<?php
$option = '';
$option_hidden = '';
@@ -106,6 +107,23 @@ if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
return false;
}
$.ajax({
type: "POST",
url: g5_bbs_url+"/ajax.write.token.php",
data: { 'token_case' : 'qa_write' },
cache: false,
async: false,
dataType: "json",
success: function(data) {
if (typeof data.token !== "undefined") {
token = data.token;
if(typeof f.token === "undefined")
$(f).prepend('<input type="hidden" name="token" value="">');
$(f).find("input[name=token]").val(token);
}
}
});
document.getElementById("btn_submit").disabled = "disabled";
return true;