diff --git a/bbs/gcaptcha/get.php b/bbs/gcaptcha/get.php index 09898e9d3..faacdcacd 100644 --- a/bbs/gcaptcha/get.php +++ b/bbs/gcaptcha/get.php @@ -1,4 +1,5 @@ - alert('이미 로그인중입니다.'); - window.close(); - opener.document.location.reload(); - -HEREDOC; - exit; -} - -$g4['title'] = '회원아이디/패스워드 찾기'; -include_once($g4['path'].'/head.sub.php'); - -$member_skin_path = $g4['path'].'/skin/member/'.$config[cf_member_skin]; -include_once($member_skin_path.'/password_forget.skin.php'); - -include_once($g4['path'].'/tail.sub.php'); -?> \ No newline at end of file diff --git a/bbs/password_forget2.php b/bbs/password_forget2.php deleted file mode 100644 index db682a754..000000000 --- a/bbs/password_forget2.php +++ /dev/null @@ -1,36 +0,0 @@ - \ No newline at end of file diff --git a/bbs/password_forget3.php b/bbs/password_forget3.php deleted file mode 100644 index edeb4a598..000000000 --- a/bbs/password_forget3.php +++ /dev/null @@ -1,46 +0,0 @@ - \ No newline at end of file diff --git a/bbs/password_lost.php b/bbs/password_lost.php index 945139787..2be67f14a 100644 --- a/bbs/password_lost.php +++ b/bbs/password_lost.php @@ -1,22 +1,20 @@ - - - - 1) +if ($row['cnt'] > 1) alert('동일한 메일주소가 2개 이상 존재합니다.\n\n관리자에게 문의하여 주십시오.'); -$sql = " select mb_no, mb_id, mb_name, mb_nick, mb_email, mb_datetime from {$g4[member_table]} where mb_email = '{$email}' "; +$sql = " select mb_no, mb_id, mb_name, mb_nick, mb_email, mb_datetime from {$g4['member_table']} where mb_email = '{$email}' "; $mb = sql_fetch($sql); -if (!$mb[mb_id]) +if (!$mb['mb_id']) alert('존재하지 않는 회원입니다.'); -else if (is_admin($mb[mb_id])) +else if (is_admin($mb['mb_id'])) alert('관리자 아이디는 접근 불가합니다.'); // 난수 발생 diff --git a/bbs/poll_result.php b/bbs/poll_result.php index 8f2e91e3e..b1f9a1434 100644 --- a/bbs/poll_result.php +++ b/bbs/poll_result.php @@ -1,72 +1,70 @@ $max) - $max = $po[po_cnt.$i]; + $count = $po['po_cnt'.$i]; + $total_po_cnt += $count; + + if ($count > $max) + $max = $count; } $nf_total_po_cnt = number_format($total_po_cnt); $list = array(); -for ($i=1; $i<=9; $i++) -{ +for ($i=1; $i<=9; $i++) { $poll = $po['po_poll'.$i]; if ($poll == '') { break; } - $list[$i][content] = $poll; - $list[$i][cnt] = $po[po_cnt.$i]; + $list[$i]['content'] = $poll; + $list[$i]['cnt'] = $po['po_cnt'.$i]; if ($total_po_cnt > 0) - $list[$i][rate] = ($list[$i][cnt] / $total_po_cnt) * 100; + $list[$i]['rate'] = ($list[$i]['cnt'] / $total_po_cnt) * 100; - $bar = (int)($list[$i][cnt] / $max * 100); + $bar = (int)($list[$i]['cnt'] / $max * 100); - $list[$i][bar] = $bar; - $list[$i][num] = $i; + $list[$i]['bar'] = $bar; + $list[$i]['num'] = $i; } $list2 = array(); // 기타의견 리스트 $sql = " select a.*, b.mb_open - from {$g4[poll_etc_table]} a - left join {$g4[member_table]} b on (a.mb_id = b.mb_id) + from {$g4['poll_etc_table']} a + left join {$g4['member_table']} b on (a.mb_id = b.mb_id) where po_id = '{$po_id}' order by pc_id desc "; $result = sql_query($sql); -for ($i=0; $row=sql_fetch_array($result); $i++) -{ - $list2[$i][name] = get_sideview($row[mb_id], cut_str($row[pc_name],10), '', '', $row[mb_open]); - $list2[$i][idea] = get_text(cut_str($row[pc_idea], 255)); - $list2[$i][datetime] = $row[pc_datetime]; +for ($i=0; $row=sql_fetch_array($result); $i++) { + $list2[$i]['name'] = get_sideview($row['mb_id'], cut_str($row['pc_name'],10), '', '', $row['mb_open']); + $list2[$i]['idea'] = get_text(cut_str($row['pc_idea'], 255)); + $list2[$i]['datetime'] = $row['pc_datetime']; - $list2[$i][del] = ''; - if ($is_admin == 'super' || ($row[mb_id] == $member[mb_id] && $row[mb_id])) - $list2[$i][del] = ''; + $list2[$i]['del'] = ''; + if ($is_admin == 'super' || ($row['mb_id'] == $member['mb_id'] && $row['mb_id'])) + $list2[$i]['del'] = ''; } // 기타의견 입력 $is_etc = false; -if ($po[po_etc]) -{ +if ($po['po_etc']) { $is_etc = true; - $po_etc = $po[po_etc]; - if ($member[mb_id]) - $name = ''.$member[mb_nick].' '; + $po_etc = $po['po_etc']; + if ($member['mb_id']) + $name = ''.$member['mb_nick'].' '; else $name = ''; } @@ -74,20 +72,19 @@ if ($po[po_etc]) $list3 = array(); // 다른투표 -$sql = " select po_id, po_subject, po_date from {$g4[poll_table]} order by po_id desc "; +$sql = " select po_id, po_subject, po_date from {$g4['poll_table']} order by po_id desc "; $result = sql_query($sql); -for ($i=0; $row2=sql_fetch_array($result); $i++) -{ - $list3[$i][po_id] = $row2[po_id]; - $list3[$i][date] = substr($row2[po_date],2,8); - $list3[$i][subject] = cut_str($row2[po_subject],60,"…"); +for ($i=0; $row2=sql_fetch_array($result); $i++) { + $list3[$i]['po_id'] = $row2['po_id']; + $list3[$i]['date'] = substr($row2['po_date'],2,8); + $list3[$i]['subject'] = cut_str($row2['po_subject'],60,"…"); } include_once($g4['path'].'/head.sub.php'); echo ''; -if (!$skin_dir) $skin_dir = 'basic'; +$skin_dir = isset($_GET['skin_dir']) ? $_GET['skin_dir'] : 'basic'; $poll_skin_path = $g4['path'].'/skin/poll/'.$skin_dir; if (!file_exists($poll_skin_path.'/poll_result.skin.php')) die('skin error'); include_once ($poll_skin_path.'/poll_result.skin.php'); diff --git a/bbs/poll_update.php b/bbs/poll_update.php index 035dad5ab..954f12f3b 100644 --- a/bbs/poll_update.php +++ b/bbs/poll_update.php @@ -1,23 +1,20 @@ diff --git a/js/common.js b/js/common.js index 9c4b589ca..b6def5d00 100644 --- a/js/common.js +++ b/js/common.js @@ -1,475 +1,482 @@ -if (typeof(COMMON_JS) == 'undefined') { // 한번만 실행 - var COMMON_JS = true; +// 전역 변수 +var errmsg = ""; +var errfld; - // 전역 변수 - var errmsg = ""; - var errfld; +// 필드 검사 +function check_field(fld, msg) +{ + if ((fld.value = trim(fld.value)) == "") + error_field(fld, msg); + else + clear_field(fld); + return; +} - // 필드 검사 - function check_field(fld, msg) +// 필드 오류 표시 +function error_field(fld, msg) +{ + if (msg != "") + errmsg += msg + "\n"; + if (!errfld) errfld = fld; + fld.style.background = "#BDDEF7"; +} + +// 필드를 깨끗하게 +function clear_field(fld) +{ + fld.style.background = "#FFFFFF"; +} + +function trim(s) +{ + var t = ""; + var from_pos = to_pos = 0; + + for (i=0; i=0; i--) - { - if (s.charAt(i-1) == ' ') - continue; - else - { - to_pos = i; - break; - } - } - - t = s.substring(from_pos, to_pos); - // alert(from_pos + ',' + to_pos + ',' + t+'.'); - return t; - } - - // 자바스크립트로 PHP의 number_format 흉내를 냄 - // 숫자에 , 를 출력 - function number_format(data) - { - - var tmp = ''; - var number = ''; - var cutlen = 3; - var comma = ','; - var i; - - len = data.length; - mod = (len % cutlen); - k = cutlen - mod; - for (i=0; i \n"; - js_url += " \n"; - js_url += " \n"; - - var settings; - - if (g4_is_gecko) { - settings ='width='+(w+10)+','; - settings +='height='+(h+10)+','; - } else { - settings ='width='+w+','; - settings +='height='+h+','; - } - settings +='top='+wint+','; - settings +='left='+winl+','; - settings +='scrollbars=no,'; - settings +='resizable=yes,'; - settings +='status=no'; - - - win=window.open("","image_window",settings); - win.document.open(); - win.document.write (" \n \n\n"); - var size = "이미지 사이즈 : "+w+" x "+h; - win.document.write (""+size+" \n"); - if(w >= screen.width || h >= screen.height) { - win.document.write (js_url); - var click = "ondblclick='window.close();' style='cursor:move' title=' "+size+" \n\n 이미지 사이즈가 화면보다 큽니다. \n 왼쪽 버튼을 클릭한 후 마우스를 움직여서 보세요. \n\n 더블 클릭하면 닫혀요. '"; - } + if (s.charAt(i) == ' ') + continue; else - var click = "onclick='window.close();' style='cursor:pointer' title=' "+size+" \n\n 클릭하면 닫혀요. '"; - win.document.write (" \n"); - win.document.write (" \n\n"); - win.document.write (" \n"); - win.document.write ("
"); - win.document.write (""); - win.document.close(); - - if(parseInt(navigator.appVersion) >= 4){win.window.focus();} - } - - // a 태그에서 onclick 이벤트를 사용하지 않기 위해 - function win_open(url, name, option) - { - var popup = window.open(url, name, option); - popup.focus(); - } - - // 우편번호 창 - function win_zip(frm_name, frm_zip1, frm_zip2, frm_addr1, frm_addr2) - { - url = g4_path + "/" + g4_bbs + "/zip.php?frm_name="+frm_name+"&frm_zip1="+frm_zip1+"&frm_zip2="+frm_zip2+"&frm_addr1="+frm_addr1+"&frm_addr2="+frm_addr2; - win_open(url, "winZip", "left=50,top=50,width=616,height=460,scrollbars=1"); - } - - // 쪽지 창 - function win_memo(url) - { - if (!url) - url = g4_path + "/" + g4_bbs + "/memo.php"; - win_open(url, "winMemo", "left=50,top=50,width=620,height=460,scrollbars=1"); - } - - // 포인트 창 - function win_point(url) - { - win_open(g4_path + "/" + g4_bbs + "/point.php", "winPoint", "left=20, top=20, width=616, height=635, scrollbars=1"); - } - - // 스크랩 창 - function win_scrap(url) - { - if (!url) - url = g4_path + "/" + g4_bbs + "/scrap.php"; - win_open(url, "scrap", "left=20, top=20, width=616, height=500, scrollbars=1"); - } - - // 새로운 패스워드 분실 창 : 100902 - function win_password_lost() - { - win_open(g4_path + "/" + g4_bbs + "/password_lost.php", 'winPasswordLost', 'left=50, top=50, width=617, height=330, scrollbars=1'); - } - - // 패스워드 분실 창 - function win_password_forget() - { - win_open(g4_path + "/" + g4_bbs + "/password_forget.php", 'winPasswordForget', 'left=50, top=50, width=616, height=500, scrollbars=1'); - } - - // 코멘트 창 - function win_comment(url) - { - win_open(url, "winComment", "left=50, top=50, width=800, height=600, scrollbars=1"); - } - - // 폼메일 창 - function win_formmail(mb_id, name, email) - { - if (g4_charset.toLowerCase() == 'euc-kr') - win_open(g4_path+"/" + g4_bbs + "/formmail.php?mb_id="+mb_id+"&name="+name+"&email="+email, "winFormmail", "left=50, top=50, width=600, height=500, scrollbars=0"); - else - win_open(g4_path+"/" + g4_bbs + "/formmail.php?mb_id="+mb_id+"&name="+encodeURIComponent(name)+"&email="+email, "winFormmail", "left=50, top=50, width=600, height=480, scrollbars=0"); - } - - // 설문조사 창 - function win_poll(url) - { - if (!url) - url = ""; - win_open(url, "winPoll", "left=50, top=50, width=616, height=500, scrollbars=1"); - } - - // 자기소개 창 - function win_profile(mb_id) - { - win_open(g4_path+"/" + g4_bbs + "/profile.php?mb_id="+mb_id, 'winProfile', 'left=50,top=50,width=620,height=510,scrollbars=1'); - } - - var last_id = null; - function menu(id) - { - if (id != last_id) { - if (last_id != null) - document.getElementById(last_id).style.display = "none"; - document.getElementById(id).style.display = "block"; - last_id = id; - } - else - { - document.getElementById(id).style.display = "none"; - last_id = null; + from_pos = i; + break; } } - function textarea_decrease(id, row) + for (i=s.length; i>=0; i--) { - if (document.getElementById(id).rows - row > 0) - document.getElementById(id).rows -= row; - } + if (s.charAt(i-1) == ' ') + continue; + else + { + to_pos = i; + break; + } + } - function textarea_original(id, row) + t = s.substring(from_pos, to_pos); + // alert(from_pos + ',' + to_pos + ',' + t+'.'); + return t; +} + +// 자바스크립트로 PHP의 number_format 흉내를 냄 +// 숫자에 , 를 출력 +function number_format(data) +{ + + var tmp = ''; + var number = ''; + var cutlen = 3; + var comma = ','; + var i; + + len = data.length; + mod = (len % cutlen); + k = cutlen - mod; + for (i=0; i 4) { - cnt += 2; - } else { - cnt += 1; + number = number + data.charAt(i); + + if (i < data.length - 1) + { + k++; + if ((k % cutlen) == 0) + { + number = number + comma; + k = 0; } } - // 숫자를 출력 - document.getElementById(target).innerHTML = cnt; - - return cnt; } - // 브라우저에서 오브젝트의 왼쪽 좌표 - function get_left_pos(obj) + return number; +} + +// 새 창 +function popup_window(url, winname, opt) +{ + window.open(url, winname, opt); +} + + +// 폼메일 창 +function popup_formmail(url) +{ + opt = 'scrollbars=yes,width=417,height=385,top=10,left=20'; + popup_window(url, "wformmail", opt); +} + +// , 를 없앤다. +function no_comma(data) +{ + var tmp = ''; + var comma = ','; + var i; + + for (i=0; i"; - } - - function obj_movie(src, ids, width, height, autostart) - { - var wh = ""; - if (parseInt(width) && parseInt(height)) - wh = " width='"+width+"' height='"+height+"' "; - if (!autostart) autostart = false; - return ""; - } - - function doc_write(cont) - { - document.write(cont); +// 삭제 검사 확인 +function del(href) +{ + if(confirm("한번 삭제한 자료는 복구할 방법이 없습니다.\n\n정말 삭제하시겠습니까?")) { + if (g4_charset.toUpperCase() == 'EUC-KR') + document.location.href = href; + else + document.location.href = encodeURI(href); } } + +// 쿠키 입력 +function set_cookie(name, value, expirehours, domain) +{ + var today = new Date(); + today.setTime(today.getTime() + (60*60*1000*expirehours)); + document.cookie = name + "=" + escape( value ) + "; path=/; expires=" + today.toGMTString() + ";"; + if (domain) { + document.cookie += "domain=" + domain + ";"; + } +} + +// 쿠키 얻음 +function get_cookie(name) +{ + var find_sw = false; + var start, end; + var i = 0; + + for (i=0; i<= document.cookie.length; i++) + { + start = i; + end = start + name.length; + + if(document.cookie.substring(start, end) == name) + { + find_sw = true + break + } + } + + if (find_sw == true) + { + start = end + 1; + end = document.cookie.indexOf(";", start); + + if(end < start) + end = document.cookie.length; + + return document.cookie.substring(start, end); + } + return ""; +} + +// 쿠키 지움 +function delete_cookie(name) +{ + var today = new Date(); + + today.setTime(today.getTime() - 1); + var value = get_cookie(name); + if(value != "") + document.cookie = name + "=" + value + "; path=/; expires=" + today.toGMTString(); +} + +// 이미지의 크기에 따라 새창의 크기가 변경됩니다. +// zzzz님께서 알려주셨습니다. 2005/04/12 +function image_window(img) +{ + var w = img.tmp_width; + var h = img.tmp_height; + var winl = (screen.width-w)/2; + var wint = (screen.height-h)/3; + + if (w >= screen.width) { + winl = 0; + h = (parseInt)(w * (h / w)); + } + + if (h >= screen.height) { + wint = 0; + w = (parseInt)(h * (w / h)); + } + + var js_url = ""; + //echo ""; + header("Location:$url"); exit; } diff --git a/lib/outlogin.lib.php b/lib/outlogin.lib.php index 9fd969a1e..e6ff92be9 100644 --- a/lib/outlogin.lib.php +++ b/lib/outlogin.lib.php @@ -28,6 +28,34 @@ function outlogin($skin_dir='basic') $is_auth = true; } + if ($g4['https_url']) { + $outlogin_url = $_GET['url']; + if ($outlogin_url) { + if (preg_match("/^\.\.\//", $outlogin_url)) { + $outlogin_url = urlencode($g4[url]."/".preg_replace("/^\.\.\//", "", $outlogin_url)); + } + else { + $purl = parse_url($g4[url]); + if ($purl['path']) { + $path = urlencode($purl['path']); + $urlencode = preg_replace("/".$path."/", "", $urlencode); + } + $outlogin_url = $g4['url'].$urlencode; + } + } + else { + $outlogin_url = $g4['url']; + } + } + else { + $outlogin_url = $urlencode; + } + + if ($g4['https_url']) + $outlogin_action_url = "{$g4['https_url']}/$g4[bbs]/login_check.php"; + else + $outlogin_action_url = "{$g4['bbs_url']}/login_check.php"; + ob_start(); if ($is_member) include_once ($outlogin_skin_path.'/outlogin.skin.2.php'); diff --git a/lib/poll.lib.php b/lib/poll.lib.php index 1bf8a6be0..d8029f21d 100644 --- a/lib/poll.lib.php +++ b/lib/poll.lib.php @@ -7,8 +7,7 @@ function poll($skin_dir='basic', $po_id=false) global $config, $member, $g4; // 투표번호가 넘어오지 않았다면 가장 큰(최근에 등록한) 투표번호를 얻는다 - if (empty($po_id)) - { + if (empty($po_id)) { $po_id = $config['cf_max_po_id']; if (empty($po_id)) return ""; diff --git a/skin/board/neo/write.skin.php b/skin/board/neo/write.skin.php index 3425a0d27..6489dfd67 100644 --- a/skin/board/neo/write.skin.php +++ b/skin/board/neo/write.skin.php @@ -218,7 +218,7 @@ function fwrite_submit(f) return false; } - + return true; } diff --git a/skin/member/neo/login.skin.php b/skin/member/neo/login.skin.php index 108cc31d7..55621ecbe 100644 --- a/skin/member/neo/login.skin.php +++ b/skin/member/neo/login.skin.php @@ -1,44 +1,16 @@ -
+
- - + + - - + +
@@ -49,14 +21,20 @@ else 회원아이디 및 패스워드가 기억 안나실 때는 아이디/패스워드 찾기를 이용하십시오.
아직 회원이 아니시라면 회원으로 가입 후 이용해 주십시오.

-
아이디/패스워드 찾기 + 아이디/패스워드 찾기 회원가입
- diff --git a/skin/poll/neo/poll.skin.php b/skin/poll/neo/poll.skin.php index ed89d33ac..609f221a7 100644 --- a/skin/poll/neo/poll.skin.php +++ b/skin/poll/neo/poll.skin.php @@ -4,23 +4,22 @@ if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가 global $is_admin; // 투표번호가 넘어오지 않았다면 가장 큰(최근에 등록한) 투표번호를 얻는다 -if (!$po_id) -{ - $po_id = $config[cf_max_po_id]; +if (!$po_id) { + $po_id = $config['cf_max_po_id']; if (!$po_id) return; } -$po = sql_fetch(" select * from $g4[poll_table] where po_id = '$po_id' "); +$po = sql_fetch(" select * from {$g4['poll_table']} where po_id = '$po_id' "); ?> -
+

설문조사

- 설문조사 관리 + 설문조사 관리

diff --git a/skin/poll/neo/poll_result.skin.php b/skin/poll/neo/poll_result.skin.php index b0d0a52c5..b72ef26b2 100644 --- a/skin/poll/neo/poll_result.skin.php +++ b/skin/poll/neo/poll_result.skin.php @@ -15,11 +15,11 @@ if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
  • - - % + + %

    - +
  • @@ -35,17 +35,17 @@ if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
    -

    님의 의견

    - - "; } ?> +

    님의 의견

    + + "; } ?>

    - +

    - = $po[po_level]) { ?> + = $po['po_level']) { ?>
    @@ -55,8 +55,8 @@ if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가

    - + if ($is_member) { $comment_size = 52; ?> + @@ -81,7 +81,7 @@ if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가

    다른 투표 결과 보기