겸손한 javascript 로 수정중
This commit is contained in:
@ -1,4 +1,5 @@
|
||||
<?php
|
||||
define('_CAPTCHA_', 1);
|
||||
include_once("./_common.php");
|
||||
|
||||
echo chk_captcha();
|
||||
|
||||
@ -11,7 +11,7 @@ if ((isset($p['scheme']) && $p['scheme']) ||
|
||||
}
|
||||
|
||||
// 이미 로그인 중이라면
|
||||
if ($member['mb_id']) {
|
||||
if ($is_member) {
|
||||
if ($url)
|
||||
goto_url($url);
|
||||
else
|
||||
@ -23,6 +23,31 @@ if ($url)
|
||||
else
|
||||
$urlencode = urlencode($_SERVER['REQUEST_URI']);
|
||||
|
||||
if ($g4['https_url']) {
|
||||
$login_url = $_GET['url'];
|
||||
if ($login_url) {
|
||||
if (preg_match("/^\.\.\//", $url)) {
|
||||
$login_url = urlencode($g4['url']."/".preg_replace("/^\.\.\//", "", $login_url));
|
||||
} else {
|
||||
$purl = parse_url($g4['url']);
|
||||
if ($purl['path']) {
|
||||
$path = urlencode($purl['path']);
|
||||
$urlencode = preg_replace("/".$path."/", "", $urlencode);
|
||||
}
|
||||
$login_url = $g4[url].$urlencode;
|
||||
}
|
||||
} else {
|
||||
$login_url = $g4[url];
|
||||
}
|
||||
} else {
|
||||
$login_url = $urlencode;
|
||||
}
|
||||
|
||||
if ($g4['https_url'])
|
||||
$login_action_url = "{$g4['https_url']}/$g4[bbs]/login_check.php";
|
||||
else
|
||||
$login_action_url = "{$g4['bbs_url']}/login_check.php";
|
||||
|
||||
$member_skin_path = $g4['path'].'/skin/member/'.$config['cf_member_skin'];
|
||||
|
||||
include_once($member_skin_path.'/login.skin.php');
|
||||
|
||||
@ -1,24 +0,0 @@
|
||||
<?
|
||||
die('이 프로그램은 더 이상 사용하지 않습니다. 그누보드 4.32.09 를 참고하세요.');
|
||||
include_once('./_common.php');
|
||||
|
||||
if ($member[mb_id])
|
||||
{
|
||||
echo <<<HEREDOC
|
||||
<script>
|
||||
alert('이미 로그인중입니다.');
|
||||
window.close();
|
||||
opener.document.location.reload();
|
||||
</script>
|
||||
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');
|
||||
?>
|
||||
@ -1,36 +0,0 @@
|
||||
<?
|
||||
die("이 프로그램은 더 이상 사용하지 않습니다. 그누보드 4.32.09 를 참고하세요.");
|
||||
include_once('./_common.php');
|
||||
|
||||
// 토큰 생성
|
||||
$token = md5(uniqid(rand(), true));
|
||||
set_session("ss_token", $token);
|
||||
$norobot_key = substr($token, 0, rand(4,6));
|
||||
set_session("ss_norobot_key", $norobot_key);
|
||||
|
||||
if ($_POST[pass_mb_id])
|
||||
$sql = " select mb_id, mb_password_q from {$g4[member_table]} where mb_id = '{$_POST[pass_mb_id]}' ";
|
||||
else if ($_POST[mb_name] && $_POST[mb_jumin])
|
||||
$sql = " select mb_id, mb_password_q from {$g4[member_table]} where mb_name = '{$_POST[mb_name]}' and mb_jumin = '".sql_password($_POST[mb_jumin])."' ";
|
||||
else if ($_POST[mb_name] && $_POST[mb_email])
|
||||
$sql = " select mb_id, mb_password_q from {$g4[member_table]} where mb_name = '{$_POST[mb_name]}' and mb_email = '{$_POST[mb_email]}' ";
|
||||
else
|
||||
alert('올바른 방법으로 접근하여 주십시오.');
|
||||
|
||||
$mb = sql_fetch($sql);
|
||||
if (!$mb[mb_id])
|
||||
alert('입력하신 내용으로는 회원정보가 존재하지 않습니다.');
|
||||
else if (is_admin($mb[mb_id]))
|
||||
alert('관리자 아이디는 접근 불가합니다.');
|
||||
|
||||
$g4['title'] = '패스워드 찾기 2단계';
|
||||
include_once($g4['path'].'/head.sub.php');
|
||||
|
||||
// 081022 : CSRF 보안 결함으로 인한 코드 수정
|
||||
$mb[mb_password_q] = get_text($mb[mb_password_q]);
|
||||
|
||||
$member_skin_path = $g4['path'].'/skin/member/'.$config[cf_member_skin];
|
||||
include_once($member_skin_path.'/password_forget2.skin.php');
|
||||
|
||||
include_once($g4['path'].'/tail.sub.php');
|
||||
?>
|
||||
@ -1,46 +0,0 @@
|
||||
<?
|
||||
die("이 프로그램은 더 이상 사용하지 않습니다. 그누보드 4.32.09 를 참고하세요.");
|
||||
include_once('./_common.php');
|
||||
|
||||
/*
|
||||
$wr_key = trim($_POST[wr_key]);
|
||||
if (!($wr_key && $wr_key == get_session('ss_norobot_key'))) {
|
||||
alert('정상적인 접근이 아닌것 같습니다.');
|
||||
}
|
||||
*/
|
||||
|
||||
$key = get_session("captcha_keystring");
|
||||
if (!($key && $key == $_POST[wr_key])) {
|
||||
session_unregister("captcha_keystring");
|
||||
alert_close('정상적인 접근이 아닌것 같습니다.');
|
||||
}
|
||||
|
||||
$sql = " select mb_id, mb_nick, mb_password_a, mb_email from {$g4[member_table]} where mb_id = '{$_POST[pass_mb_id]}' ";
|
||||
$mb = sql_fetch($sql);
|
||||
if (!$mb[mb_id])
|
||||
alert('존재하지 않는 회원입니다.');
|
||||
else if ($mb_password_a !== $mb[mb_password_a])
|
||||
alert('패스워드 분실 시 답변이 틀립니다.');
|
||||
else if (is_admin($mb[mb_id]))
|
||||
alert('관리자 아이디는 접근 불가합니다.');
|
||||
|
||||
$g4['title'] = '패스워드 찾기 3단계';
|
||||
include_once($g4['path'].'/head.sub.php');
|
||||
|
||||
// 난수 발생
|
||||
list($usec, $sec) = explode(' ', microtime());
|
||||
$seed = (float)$sec + ((float)$usec * 100000);
|
||||
srand($seed);
|
||||
$randval = rand(4, 6);
|
||||
|
||||
$change_password = substr(md5(get_microtime()), 0, $randval);
|
||||
$sql = " update {$g4[member_table]}
|
||||
set mb_password = '".sql_password($change_password)."'
|
||||
where mb_id = '{$mb[mb_id]}' ";
|
||||
sql_query($sql);
|
||||
|
||||
$member_skin_path = $g4['path'].'/skin/member/'.$config[cf_member_skin];
|
||||
include_once($member_skin_path.'/password_forget3.skin.php');
|
||||
|
||||
include_once($g4['path'].'/tail.sub.php');
|
||||
?>
|
||||
@ -1,22 +1,20 @@
|
||||
<?
|
||||
define('_CAPTCHA_', 1);
|
||||
include_once('./_common.php');
|
||||
|
||||
if ($member[mb_id])
|
||||
{
|
||||
?>
|
||||
<script>
|
||||
alert('이미 로그인중입니다.');
|
||||
window.close();
|
||||
opener.document.location.reload();
|
||||
</script>
|
||||
<?
|
||||
exit;
|
||||
if ($is_member) {
|
||||
alert("이미 로그인중입니다.");
|
||||
}
|
||||
|
||||
$g4['title'] = '회원아이디/패스워드 찾기';
|
||||
include_once($g4['path'].'/head.sub.php');
|
||||
|
||||
$member_skin_path = $g4['path'].'/skin/member/'.$config[cf_member_skin];
|
||||
if ($g4['https_url'])
|
||||
$action_url = "{$g4['https_url']}/{$g4['bbs']}/password_lost2.php";
|
||||
else
|
||||
$action_url = "{$g4['bbs_url']}/password_lost2.php";
|
||||
|
||||
$member_skin_path = $g4['path'].'/skin/member/'.$config['cf_member_skin'];
|
||||
include_once($member_skin_path.'/password_lost.skin.php');
|
||||
|
||||
include_once($g4['path'].'/tail.sub.php');
|
||||
|
||||
@ -1,23 +1,14 @@
|
||||
<?
|
||||
define('_CAPTCHA_', 1);
|
||||
include_once('./_common.php');
|
||||
include_once($g4['path'].'/lib/mailer.lib.php');
|
||||
|
||||
if ($member[mb_id])
|
||||
{
|
||||
?>
|
||||
<script>
|
||||
alert('이미 로그인중입니다.');
|
||||
window.close();
|
||||
opener.document.location.reload();
|
||||
</script>
|
||||
<?
|
||||
exit;
|
||||
if ($is_member) {
|
||||
alert("이미 로그인중입니다.");
|
||||
}
|
||||
|
||||
$key = get_session("captcha_keystring");
|
||||
if (!($key && $key == $_POST[wr_key])) {
|
||||
session_unregister("captcha_keystring");
|
||||
alert_close('정상적인 접근이 아닌것 같습니다.');
|
||||
if (!chk_captcha()) {
|
||||
alert('스팸방지에 입력한 숫자가 틀렸습니다.');
|
||||
}
|
||||
|
||||
$email = trim($_POST['mb_email']);
|
||||
@ -25,16 +16,16 @@ $email = trim($_POST['mb_email']);
|
||||
if (!$email)
|
||||
alert_close('메일주소 오류입니다.');
|
||||
|
||||
$sql = " select count(*) as cnt from {$g4[member_table]} where mb_email = '{$email}' ";
|
||||
$sql = " select count(*) as cnt from {$g4['member_table']} where mb_email = '{$email}' ";
|
||||
$row = sql_fetch($sql);
|
||||
if ($row[cnt] > 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('관리자 아이디는 접근 불가합니다.');
|
||||
|
||||
// 난수 발생
|
||||
|
||||
@ -1,72 +1,70 @@
|
||||
<?
|
||||
include_once('./_common.php');
|
||||
|
||||
$po = sql_fetch(" select * from {$g4[poll_table]} where po_id = '{$po_id}' ");
|
||||
if (!$po[po_id])
|
||||
alert_close('설문조사 정보가 없습니다.');
|
||||
$po = sql_fetch(" select * from {$g4['poll_table']} where po_id = '{$po_id}' ");
|
||||
if (!$po['po_id'])
|
||||
alert('설문조사 정보가 없습니다.');
|
||||
|
||||
$g4['title'] = '설문조사 결과';
|
||||
|
||||
$po_subject = $po[po_subject];
|
||||
$po_subject = $po['po_subject'];
|
||||
|
||||
$max = 1;
|
||||
$total_po_cnt = 0;
|
||||
for ($i=1; $i<=9; $i++)
|
||||
{
|
||||
for ($i=1; $i<=9; $i++) {
|
||||
$poll = $po['po_poll'.$i];
|
||||
if ($poll == '') { break; }
|
||||
$total_po_cnt += $po[po_cnt.$i];
|
||||
if ($poll == '') break;
|
||||
|
||||
if ($po[po_cnt.$i] > $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] = '<a href="javascript:del(\'./poll_etc_update.php?w=d&pc_id='.$row[pc_id].'&po_id='.$po_id.'\');">';
|
||||
$list2[$i]['del'] = '';
|
||||
if ($is_admin == 'super' || ($row['mb_id'] == $member['mb_id'] && $row['mb_id']))
|
||||
$list2[$i]['del'] = '<a href="'.$g4['bbs_url'].'/poll_etc_update.php?w=d&pc_id='.$row['pc_id'].'&po_id='.$po_id.'\');">';
|
||||
}
|
||||
|
||||
// 기타의견 입력
|
||||
$is_etc = false;
|
||||
if ($po[po_etc])
|
||||
{
|
||||
if ($po['po_etc']) {
|
||||
$is_etc = true;
|
||||
$po_etc = $po[po_etc];
|
||||
if ($member[mb_id])
|
||||
$name = '<b>'.$member[mb_nick].'</b> <input type="hidden" name="pc_name" value="'.$member[mb_nick].'">';
|
||||
$po_etc = $po['po_etc'];
|
||||
if ($member['mb_id'])
|
||||
$name = '<b>'.$member['mb_nick'].'</b> <input type="hidden" name="pc_name" value="'.$member['mb_nick'].'">';
|
||||
else
|
||||
$name = '<input type="text" name="pc_name" size="10" class="input" required>';
|
||||
}
|
||||
@ -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 '<script src="'.$g4['path'].'/js/sideview.js"></script>';
|
||||
|
||||
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');
|
||||
|
||||
@ -1,23 +1,20 @@
|
||||
<?
|
||||
include_once('./_common.php');
|
||||
|
||||
$po = sql_fetch(" select * from {$g4[poll_table]} where po_id = '{$_POST[po_id]}' ");
|
||||
if (!$po[po_id])
|
||||
alert_close('po_id 값이 제대로 넘어오지 않았습니다.');
|
||||
$po = sql_fetch(" select * from {$g4['poll_table']} where po_id = '{$_POST['po_id']}' ");
|
||||
if (!$po['po_id'])
|
||||
alert('po_id 값이 제대로 넘어오지 않았습니다.');
|
||||
|
||||
if ($member[mb_level] < $po[po_level])
|
||||
alert_close('권한 '.$po[po_level].' 이상 회원만 투표에 참여하실 수 있습니다.');
|
||||
if ($member['mb_level'] < $po['po_level'])
|
||||
alert_close('권한 '.$po['po_level'].' 이상 회원만 투표에 참여하실 수 있습니다.');
|
||||
|
||||
// 쿠키에 저장된 투표번호가 없다면
|
||||
if (get_cookie('ck_po_id') != $po[po_id])
|
||||
{
|
||||
if (get_cookie('ck_po_id') != $po['po_id']) {
|
||||
// 투표했던 ip들 중에서 찾아본다
|
||||
$search_ip = false;
|
||||
$ips = explode(',', trim($po[po_ips]));
|
||||
for ($i=0; $i<count($ips); $i++)
|
||||
{
|
||||
if ($_SERVER[REMOTE_ADDR] == trim($ips[$i]))
|
||||
{
|
||||
$ips = explode(',', trim($po['po_ips']));
|
||||
for ($i=0; $i<count($ips); $i++) {
|
||||
if ($_SERVER['REMOTE_ADDR'] == trim($ips[$i])) {
|
||||
$search_ip = true;
|
||||
break;
|
||||
}
|
||||
@ -25,13 +22,10 @@ if (get_cookie('ck_po_id') != $po[po_id])
|
||||
|
||||
// 투표했던 회원아이디들 중에서 찾아본다
|
||||
$search_mb_id = false;
|
||||
if ($is_member)
|
||||
{
|
||||
$ids = explode(',', trim($po[mb_ids]));
|
||||
for ($i=0; $i<count($ids); $i++)
|
||||
{
|
||||
if ($member[mb_id] == trim($ids[$i]))
|
||||
{
|
||||
if ($is_member) {
|
||||
$ids = explode(',', trim($po['mb_ids']));
|
||||
for ($i=0; $i<count($ids); $i++) {
|
||||
if ($member['mb_id'] == trim($ids[$i])) {
|
||||
$search_mb_id = true;
|
||||
break;
|
||||
}
|
||||
@ -39,20 +33,20 @@ if (get_cookie('ck_po_id') != $po[po_id])
|
||||
}
|
||||
|
||||
// 없다면 선택한 투표항목을 1증가 시키고 ip, id를 저장
|
||||
if (!($search_ip || $search_mb_id))
|
||||
{
|
||||
$po_ips = $po[po_ips] . $_SERVER[REMOTE_ADDR].",";
|
||||
$mb_ids = $po[mb_ids];
|
||||
if ($member[mb_id])
|
||||
$mb_ids .= $member[mb_id].',';
|
||||
sql_query(" update {$g4[poll_table]} set po_cnt{$gb_poll} = po_cnt{$gb_poll} + 1, po_ips = '{$po_ips}', mb_ids = '{$mb_ids}' where po_id = '{$po_id}' ");
|
||||
if (!($search_ip || $search_mb_id)) {
|
||||
$po_ips = $po['po_ips'] . $_SERVER['REMOTE_ADDR'].",";
|
||||
$mb_ids = $po['mb_ids'];
|
||||
if ($member['mb_id'])
|
||||
$mb_ids .= $member['mb_id'].',';
|
||||
sql_query(" update {$g4['poll_table']} set po_cnt{$gb_poll} = po_cnt{$gb_poll} + 1, po_ips = '{$po_ips}', mb_ids = '{$mb_ids}' where po_id = '{$po_id}' ");
|
||||
}
|
||||
|
||||
if (!$search_mb_id)
|
||||
insert_point($member[mb_id], $po[po_point], $po[po_id] . '. ' . cut_str($po[po_subject],20) . ' 투표 참여 ', '{@poll}', $po[po_id], '투표');
|
||||
insert_point($member['mb_id'], $po['po_point'], $po['po_id'] . '. ' . cut_str($po['po_subject'],20) . ' 투표 참여 ', '{@poll}', $po['po_id'], '투표');
|
||||
}
|
||||
|
||||
set_cookie('ck_po_id', $po[po_id], 86400 * 15); // 투표 쿠키 보름간 저장
|
||||
set_cookie('ck_po_id', $po['po_id'], 86400 * 15); // 투표 쿠키 보름간 저장
|
||||
|
||||
goto_url('./poll_result.php?po_id='.$po_id.'&skin_dir='.$skin_dir);
|
||||
//goto_url($g4['bbs_url'].'/poll_result.php?po_id='.$po_id.'&skin_dir='.$skin_dir);
|
||||
goto_url("{$g4['bbs_url']}/poll_result.php?po_id=$po_id&skin_dir={$_POST['skin_dir']}");
|
||||
?>
|
||||
|
||||
917
js/common.js
917
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<s.length; i++)
|
||||
{
|
||||
if ((fld.value = trim(fld.value)) == "")
|
||||
error_field(fld, msg);
|
||||
else
|
||||
clear_field(fld);
|
||||
return;
|
||||
}
|
||||
|
||||
// 필드 오류 표시
|
||||
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<s.length; i++)
|
||||
{
|
||||
if (s.charAt(i) == ' ')
|
||||
continue;
|
||||
else
|
||||
{
|
||||
from_pos = i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
for (i=s.length; 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<data.length; i++)
|
||||
{
|
||||
number = number + data.charAt(i);
|
||||
|
||||
if (i < data.length - 1)
|
||||
{
|
||||
k++;
|
||||
if ((k % cutlen) == 0)
|
||||
{
|
||||
number = number + comma;
|
||||
k = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
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<data.length; i++)
|
||||
{
|
||||
if (data.charAt(i) != comma)
|
||||
tmp += data.charAt(i);
|
||||
}
|
||||
return tmp;
|
||||
}
|
||||
|
||||
// 삭제 검사 확인
|
||||
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 = "<script type='text/javascript'> \n";
|
||||
js_url += "<!-- \n";
|
||||
js_url += "var ie=document.all; \n";
|
||||
js_url += "var nn6=document.getElementById&&!document.all; \n";
|
||||
js_url += "var isdrag=false; \n";
|
||||
js_url += "var x,y; \n";
|
||||
js_url += "var dobj; \n";
|
||||
js_url += "function movemouse(e) \n";
|
||||
js_url += "{ \n";
|
||||
js_url += " if (isdrag) \n";
|
||||
js_url += " { \n";
|
||||
js_url += " dobj.style.left = nn6 ? tx + e.clientX - x : tx + event.clientX - x; \n";
|
||||
js_url += " dobj.style.top = nn6 ? ty + e.clientY - y : ty + event.clientY - y; \n";
|
||||
js_url += " return false; \n";
|
||||
js_url += " } \n";
|
||||
js_url += "} \n";
|
||||
js_url += "function selectmouse(e) \n";
|
||||
js_url += "{ \n";
|
||||
js_url += " var fobj = nn6 ? e.target : event.srcElement; \n";
|
||||
js_url += " var topelement = nn6 ? 'HTML' : 'BODY'; \n";
|
||||
js_url += " while (fobj.tagName != topelement && fobj.className != 'dragme') \n";
|
||||
js_url += " { \n";
|
||||
js_url += " fobj = nn6 ? fobj.parentNode : fobj.parentElement; \n";
|
||||
js_url += " } \n";
|
||||
js_url += " if (fobj.className=='dragme') \n";
|
||||
js_url += " { \n";
|
||||
js_url += " isdrag = true; \n";
|
||||
js_url += " dobj = fobj; \n";
|
||||
js_url += " tx = parseInt(dobj.style.left+0); \n";
|
||||
js_url += " ty = parseInt(dobj.style.top+0); \n";
|
||||
js_url += " x = nn6 ? e.clientX : event.clientX; \n";
|
||||
js_url += " y = nn6 ? e.clientY : event.clientY; \n";
|
||||
js_url += " document.onmousemove=movemouse; \n";
|
||||
js_url += " return false; \n";
|
||||
js_url += " } \n";
|
||||
js_url += "} \n";
|
||||
js_url += "document.onmousedown=selectmouse; \n";
|
||||
js_url += "document.onmouseup=new Function('isdrag=false'); \n";
|
||||
js_url += "//--> \n";
|
||||
js_url += "</"+"script> \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 ("<html><head> \n<meta http-equiv='imagetoolbar' CONTENT='no'> \n<meta http-equiv='content-type' content='text/html; charset="+g4_charset+"'>\n");
|
||||
var size = "이미지 사이즈 : "+w+" x "+h;
|
||||
win.document.write ("<title>"+size+"</title> \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 ("<style>.dragme{position:relative;}</style> \n");
|
||||
win.document.write ("</head> \n\n");
|
||||
win.document.write ("<body leftmargin=0 topmargin=0 bgcolor=#dddddd style='cursor:arrow;'> \n");
|
||||
win.document.write ("<table width=100% height=100% cellpadding=0 cellspacing=0><tr><td align=center valign=middle><img src='"+img.src+"' width='"+w+"' height='"+h+"' border=0 class='dragme' "+click+"></td></tr></table>");
|
||||
win.document.write ("</body></html>");
|
||||
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<data.length; i++)
|
||||
{
|
||||
document.getElementById(id).rows = row;
|
||||
}
|
||||
|
||||
function textarea_increase(id, row)
|
||||
{
|
||||
document.getElementById(id).rows += row;
|
||||
}
|
||||
|
||||
// 글숫자 검사
|
||||
function check_byte(content, target)
|
||||
{
|
||||
var i = 0;
|
||||
var cnt = 0;
|
||||
var ch = '';
|
||||
var cont = document.getElementById(content).value;
|
||||
|
||||
for (i=0; i<cont.length; i++) {
|
||||
ch = cont.charAt(i);
|
||||
if (escape(ch).length > 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<data.length; i++)
|
||||
{
|
||||
var parentObj = null;
|
||||
var clientObj = obj;
|
||||
//var left = obj.offsetLeft + document.body.clientLeft;
|
||||
var left = obj.offsetLeft;
|
||||
|
||||
while((parentObj=clientObj.offsetParent) != null)
|
||||
{
|
||||
left = left + parentObj.offsetLeft;
|
||||
clientObj = parentObj;
|
||||
}
|
||||
|
||||
return left;
|
||||
if (data.charAt(i) != comma)
|
||||
tmp += data.charAt(i);
|
||||
}
|
||||
return tmp;
|
||||
}
|
||||
|
||||
// 브라우저에서 오브젝트의 상단 좌표
|
||||
function get_top_pos(obj)
|
||||
{
|
||||
var parentObj = null;
|
||||
var clientObj = obj;
|
||||
//var top = obj.offsetTop + document.body.clientTop;
|
||||
var top = obj.offsetTop;
|
||||
|
||||
while((parentObj=clientObj.offsetParent) != null)
|
||||
{
|
||||
top = top + parentObj.offsetTop;
|
||||
clientObj = parentObj;
|
||||
}
|
||||
|
||||
return top;
|
||||
}
|
||||
|
||||
function flash_movie(src, ids, width, height, wmode)
|
||||
{
|
||||
var wh = "";
|
||||
if (parseInt(width) && parseInt(height))
|
||||
wh = " width='"+width+"' height='"+height+"' ";
|
||||
return "<object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0' "+wh+" id="+ids+"><param name=wmode value="+wmode+"><param name=movie value="+src+"><param name=quality value=high><embed src="+src+" quality=high wmode="+wmode+" type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/shockwave/download/index.cgi?p1_prod_version=shockwaveflash' "+wh+"></embed></object>";
|
||||
}
|
||||
|
||||
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 "<embed src='"+src+"' "+wh+" autostart='"+autostart+"'></embed>";
|
||||
}
|
||||
|
||||
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 = "<script type='text/javascript'> \n";
|
||||
js_url += "<!-- \n";
|
||||
js_url += "var ie=document.all; \n";
|
||||
js_url += "var nn6=document.getElementById&&!document.all; \n";
|
||||
js_url += "var isdrag=false; \n";
|
||||
js_url += "var x,y; \n";
|
||||
js_url += "var dobj; \n";
|
||||
js_url += "function movemouse(e) \n";
|
||||
js_url += "{ \n";
|
||||
js_url += " if (isdrag) \n";
|
||||
js_url += " { \n";
|
||||
js_url += " dobj.style.left = nn6 ? tx + e.clientX - x : tx + event.clientX - x; \n";
|
||||
js_url += " dobj.style.top = nn6 ? ty + e.clientY - y : ty + event.clientY - y; \n";
|
||||
js_url += " return false; \n";
|
||||
js_url += " } \n";
|
||||
js_url += "} \n";
|
||||
js_url += "function selectmouse(e) \n";
|
||||
js_url += "{ \n";
|
||||
js_url += " var fobj = nn6 ? e.target : event.srcElement; \n";
|
||||
js_url += " var topelement = nn6 ? 'HTML' : 'BODY'; \n";
|
||||
js_url += " while (fobj.tagName != topelement && fobj.className != 'dragme') \n";
|
||||
js_url += " { \n";
|
||||
js_url += " fobj = nn6 ? fobj.parentNode : fobj.parentElement; \n";
|
||||
js_url += " } \n";
|
||||
js_url += " if (fobj.className=='dragme') \n";
|
||||
js_url += " { \n";
|
||||
js_url += " isdrag = true; \n";
|
||||
js_url += " dobj = fobj; \n";
|
||||
js_url += " tx = parseInt(dobj.style.left+0); \n";
|
||||
js_url += " ty = parseInt(dobj.style.top+0); \n";
|
||||
js_url += " x = nn6 ? e.clientX : event.clientX; \n";
|
||||
js_url += " y = nn6 ? e.clientY : event.clientY; \n";
|
||||
js_url += " document.onmousemove=movemouse; \n";
|
||||
js_url += " return false; \n";
|
||||
js_url += " } \n";
|
||||
js_url += "} \n";
|
||||
js_url += "document.onmousedown=selectmouse; \n";
|
||||
js_url += "document.onmouseup=new Function('isdrag=false'); \n";
|
||||
js_url += "//--> \n";
|
||||
js_url += "</"+"script> \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 ("<html><head> \n<meta http-equiv='imagetoolbar' CONTENT='no'> \n<meta http-equiv='content-type' content='text/html; charset="+g4_charset+"'>\n");
|
||||
var size = "이미지 사이즈 : "+w+" x "+h;
|
||||
win.document.write ("<title>"+size+"</title> \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 더블 클릭하면 닫혀요. '";
|
||||
}
|
||||
else
|
||||
var click = "onclick='window.close();' style='cursor:pointer' title=' "+size+" \n\n 클릭하면 닫혀요. '";
|
||||
win.document.write ("<style>.dragme{position:relative;}</style> \n");
|
||||
win.document.write ("</head> \n\n");
|
||||
win.document.write ("<body leftmargin=0 topmargin=0 bgcolor=#dddddd style='cursor:arrow;'> \n");
|
||||
win.document.write ("<table width=100% height=100% cellpadding=0 cellspacing=0><tr><td align=center valign=middle><img src='"+img.src+"' width='"+w+"' height='"+h+"' border=0 class='dragme' "+click+"></td></tr></table>");
|
||||
win.document.write ("</body></html>");
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
||||
function textarea_decrease(id, row)
|
||||
{
|
||||
if (document.getElementById(id).rows - row > 0)
|
||||
document.getElementById(id).rows -= row;
|
||||
}
|
||||
|
||||
function textarea_original(id, row)
|
||||
{
|
||||
document.getElementById(id).rows = row;
|
||||
}
|
||||
|
||||
function textarea_increase(id, row)
|
||||
{
|
||||
document.getElementById(id).rows += row;
|
||||
}
|
||||
|
||||
// 글숫자 검사
|
||||
function check_byte(content, target)
|
||||
{
|
||||
var i = 0;
|
||||
var cnt = 0;
|
||||
var ch = '';
|
||||
var cont = document.getElementById(content).value;
|
||||
|
||||
for (i=0; i<cont.length; i++) {
|
||||
ch = cont.charAt(i);
|
||||
if (escape(ch).length > 4) {
|
||||
cnt += 2;
|
||||
} else {
|
||||
cnt += 1;
|
||||
}
|
||||
}
|
||||
// 숫자를 출력
|
||||
document.getElementById(target).innerHTML = cnt;
|
||||
|
||||
return cnt;
|
||||
}
|
||||
|
||||
// 브라우저에서 오브젝트의 왼쪽 좌표
|
||||
function get_left_pos(obj)
|
||||
{
|
||||
var parentObj = null;
|
||||
var clientObj = obj;
|
||||
//var left = obj.offsetLeft + document.body.clientLeft;
|
||||
var left = obj.offsetLeft;
|
||||
|
||||
while((parentObj=clientObj.offsetParent) != null)
|
||||
{
|
||||
left = left + parentObj.offsetLeft;
|
||||
clientObj = parentObj;
|
||||
}
|
||||
|
||||
return left;
|
||||
}
|
||||
|
||||
// 브라우저에서 오브젝트의 상단 좌표
|
||||
function get_top_pos(obj)
|
||||
{
|
||||
var parentObj = null;
|
||||
var clientObj = obj;
|
||||
//var top = obj.offsetTop + document.body.clientTop;
|
||||
var top = obj.offsetTop;
|
||||
|
||||
while((parentObj=clientObj.offsetParent) != null)
|
||||
{
|
||||
top = top + parentObj.offsetTop;
|
||||
clientObj = parentObj;
|
||||
}
|
||||
|
||||
return top;
|
||||
}
|
||||
|
||||
function flash_movie(src, ids, width, height, wmode)
|
||||
{
|
||||
var wh = "";
|
||||
if (parseInt(width) && parseInt(height))
|
||||
wh = " width='"+width+"' height='"+height+"' ";
|
||||
return "<object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0' "+wh+" id="+ids+"><param name=wmode value="+wmode+"><param name=movie value="+src+"><param name=quality value=high><embed src="+src+" quality=high wmode="+wmode+" type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/shockwave/download/index.cgi?p1_prod_version=shockwaveflash' "+wh+"></embed></object>";
|
||||
}
|
||||
|
||||
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 "<embed src='"+src+"' "+wh+" autostart='"+autostart+"'></embed>";
|
||||
}
|
||||
|
||||
function doc_write(cont)
|
||||
{
|
||||
document.write(cont);
|
||||
}
|
||||
|
||||
var win_password_lost = function(href) {
|
||||
window.open(href, "win_password_lost", "left=50, top=50, width=617, height=330, scrollbars=1");
|
||||
}
|
||||
|
||||
$(document).ready(function(){
|
||||
$("#login_password_lost, #ol_password_lost").click(function(){
|
||||
win_password_lost(this.href);
|
||||
return false;
|
||||
});
|
||||
});
|
||||
@ -68,7 +68,8 @@ function print_r2($var)
|
||||
function goto_url($url)
|
||||
{
|
||||
$url = str_replace("&", "&", $url);
|
||||
echo "<script> location.replace('$url'); </script>";
|
||||
//echo "<script> location.replace('$url'); </script>";
|
||||
header("Location:$url");
|
||||
exit;
|
||||
}
|
||||
|
||||
|
||||
@ -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');
|
||||
|
||||
@ -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 "<!-- po_id를 찾을 수 없습니다. -->";
|
||||
|
||||
@ -218,7 +218,7 @@ function fwrite_submit(f)
|
||||
return false;
|
||||
}
|
||||
|
||||
<? if ($is_guest) { echo chk_captcha(); } ?>
|
||||
<? if ($is_guest) { echo chk_captcha_js(); } ?>
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -1,44 +1,16 @@
|
||||
<?
|
||||
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
|
||||
|
||||
if ($g4['https_url']) {
|
||||
$login_url = $_GET['url'];
|
||||
if ($login_url) {
|
||||
if (preg_match("/^\.\.\//", $url)) {
|
||||
$login_url = urlencode($g4[url]."/".preg_replace("/^\.\.\//", "", $login_url));
|
||||
}
|
||||
else {
|
||||
$purl = parse_url($g4[url]);
|
||||
if ($purl[path]) {
|
||||
$path = urlencode($purl[path]);
|
||||
$urlencode = preg_replace("/".$path."/", "", $urlencode);
|
||||
}
|
||||
$login_url = $g4[url].$urlencode;
|
||||
}
|
||||
}
|
||||
else {
|
||||
$login_url = $g4[url];
|
||||
}
|
||||
}
|
||||
else {
|
||||
$login_url = $urlencode;
|
||||
}
|
||||
|
||||
if ($g4['https_url'])
|
||||
$action_url = "{$g4['https_url']}/$g4[bbs]/login_check.php";
|
||||
else
|
||||
$action_url = "{$g4['bbs_path']}/login_check.php";
|
||||
?>
|
||||
|
||||
<form name="flogin" method="post" action="<?=$action_url?>" onsubmit="return flogin_submit(this);">
|
||||
<form name="flogin" method="post" action="<?=$login_action_url?>" onsubmit="return flogin_submit(this);">
|
||||
<input type="hidden" name="url" value='<?=$login_url?>'>
|
||||
|
||||
<fieldset>
|
||||
<label for="login_mb_id">아이디</label>
|
||||
<input type="text" id="login_mb_id" name="mb_id" maxLength="20" size="15" required>
|
||||
<label for="login_mb_id">회원아이디</label>
|
||||
<input type="text" id="login_mb_id" name="mb_id" maxLength="20" size="15" required title="회원아이디">
|
||||
<label for="login_mb_password">패스워드</label>
|
||||
<input type="password" id="login_mb_password" name="mb_password" maxLength="20" size="15" required>
|
||||
<input type="checkbox" id="login_auto_login" name="auto_login" onclick="if (this.checked) { if (confirm('자동로그인을 사용하시면 다음부터 회원아이디와 패스워드를 입력하실 필요가 없습니다.\n\n\공공장소에서는 개인정보가 유출될 수 있으니 사용을 자제하여 주십시오.\n\n자동로그인을 사용하시겠습니까?')) { this.checked = true; } else { this.checked = false;} }">
|
||||
<input type="password" id="login_mb_password" name="mb_password" maxLength="20" size="15" required title="패스워드">
|
||||
<input type="checkbox" id="login_auto_login" name="auto_login">
|
||||
<label for="login_auto_login">자동로그인</label>
|
||||
<input type="submit" value="로그인">
|
||||
</fieldset>
|
||||
@ -49,14 +21,20 @@ else
|
||||
회원아이디 및 패스워드가 기억 안나실 때는 아이디/패스워드 찾기를 이용하십시오.<br>
|
||||
아직 회원이 아니시라면 회원으로 가입 후 이용해 주십시오.
|
||||
</p>
|
||||
<a href="javascript:;" onclick="win_password_lost();">아이디/패스워드 찾기</a>
|
||||
<a href="<?=$g4['bbs_url']?>/password_lost.php" id="login_password_lost" target="win_password_lost">아이디/패스워드 찾기</a>
|
||||
<a href="./register.php">회원가입</a>
|
||||
</section>
|
||||
|
||||
</form>
|
||||
|
||||
<script>
|
||||
document.flogin.mb_id.focus();
|
||||
$(document).ready(function(){
|
||||
$("#login_auto_login").click(function(){
|
||||
if (this.checked) {
|
||||
this.checked = confirm("자동로그인을 사용하시면 다음부터 회원아이디와 패스워드를 입력하실 필요가 없습니다.\n\n공공장소에서는 개인정보가 유출될 수 있으니 사용을 자제하여 주십시오.\n\n자동로그인을 사용하시겠습니까?");
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function flogin_submit(f)
|
||||
{
|
||||
|
||||
@ -4,36 +4,24 @@ if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
|
||||
|
||||
<h1>아이디/패스워드 찾기</h1>
|
||||
|
||||
<form name="fpasswordlost" method="post" onsubmit="return fpasswordlost_submit(this);" autocomplete="off">
|
||||
<form name="fpasswordlost" method="post" action="<?=$action_url?>" onsubmit="return fpasswordlost_submit(this);" autocomplete="off">
|
||||
<fieldset>
|
||||
<legend>이메일 주소 입력</legend>
|
||||
<p>회원가입 시 등록하신 이메일 주소를 입력해 주시면, 해당 이메일로 아이디와 패스워드 정보를 보내드립니다.</p>
|
||||
<label for="mb_email">이메일 주소</label>
|
||||
<input type="text" id="mb_email" name="mb_email" required size="45">
|
||||
<img id="kcaptcha_image">
|
||||
<input type="text" name="wr_key" size="10" required>
|
||||
<label for="mb_email">E-mail 주소</label>
|
||||
<input type="text" id="mb_email" name="mb_email" class="email" required size="45" title="E-mail 주소">
|
||||
</fieldset>
|
||||
<? echo captcha_html(); ?>
|
||||
<div class="btn_confirm">
|
||||
<input type="submit" value="확인">
|
||||
<a href="javascript:window.close();">창닫기</a>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<script src="<?="$g4[path]/js/md5.js"?>"></script>
|
||||
<script src="<?="$g4[path]/js/jquery.kcaptcha.js"?>"></script>
|
||||
<script>
|
||||
function fpasswordlost_submit(f)
|
||||
{
|
||||
if (!check_kcaptcha(f.wr_key)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
<?
|
||||
if ($g4[https_url])
|
||||
echo "f.action = '$g4[https_url]/$g4[bbs]/password_lost2.php';";
|
||||
else
|
||||
echo "f.action = './password_lost2.php';";
|
||||
?>
|
||||
<? echo chk_captcha_js(); ?>
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -1,52 +1,23 @@
|
||||
<?
|
||||
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
|
||||
|
||||
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'])
|
||||
$action_url = "{$g4['https_url']}/$g4[bbs]/login_check.php";
|
||||
else
|
||||
$action_url = "{$g4['bbs_path']}/login_check.php";
|
||||
?>
|
||||
|
||||
<section id="ol_before" class="outlogin">
|
||||
<h2>멤버쉽</h2>
|
||||
<!-- 로그인 전 외부로그인 시작 -->
|
||||
<form name="fhead" method="post" action="<?=$action_url?>" onsubmit="return fhead_submit(this);" autocomplete="off">
|
||||
<!-- 로그인 전 외부로그인 시작 -->
|
||||
<form name="foutlogin" method="post" action="<?=$outlogin_action_url?>" onsubmit="return fhead_submit(this);" autocomplete="off">
|
||||
<fieldset>
|
||||
<input type="hidden" name="url" value="<?=$outlogin_url?>">
|
||||
<label for="ol_mb_id" id="ol_mb_id_label">아이디</label>
|
||||
<input type="text" id="ol_mb_id" name="mb_id" maxlength="20" required>
|
||||
<label for="ol_mb_id" id="ol_mb_id_label">회원아이디</label>
|
||||
<input type="text" id="ol_mb_id" name="mb_id" maxlength="20" required title="회원아이디">
|
||||
<label for="ol_mb_pw" id="ol_mb_pw_label">패스워드</label>
|
||||
<input type="password" id="ol_mb_pw" name="mb_password" maxlength="20">
|
||||
<input type="checkbox" id="auto_login" name="auto_login" value="1" onclick="if (this.checked) { if (confirm('자동로그인을 사용하시면 다음부터 회원아이디와 패스워드를 입력하실 필요가 없습니다.\n\n\공공장소에서는 개인정보가 유출될 수 있으니 사용을 자제하여 주십시오.\n\n자동로그인을 사용하시겠습니까?')) { this.checked = true; } else { this.checked = false; } }">
|
||||
<input type="password" id="ol_mb_pw" name="mb_password" maxlength="20" required title="패스워드">
|
||||
<input type="checkbox" id="auto_login" name="auto_login" value="1">
|
||||
<label for="auto_login" id="auto_login_label">자동로그인</label>
|
||||
<input type="submit" id="ol_submit" value="로그인">
|
||||
<ul>
|
||||
<li><a href="<?=$g4['bbs_path']?>/register.php">회원가입</a></li>
|
||||
<li><a href="javascript:win_password_lost();">정보찾기</a></li>
|
||||
<li><a href="<?=$g4['bbs_url']?>/register.php">회원가입</a></li>
|
||||
<li><a href="<?=$g4['bbs_url']?>/password_lost.php" id="ol_password_lost">정보찾기</a></li>
|
||||
</ul>
|
||||
</fieldset>
|
||||
</form>
|
||||
@ -72,6 +43,12 @@ $(document).ready(function(){
|
||||
$this = $(this);
|
||||
if($this.attr('id') == "ol_mb_pw" && $this.attr('value') == "") $omp_label.css('visibility','visible');
|
||||
});
|
||||
|
||||
$("#auto_login").click(function(){
|
||||
if (this.checked) {
|
||||
this.checked = confirm("자동로그인을 사용하시면 다음부터 회원아이디와 패스워드를 입력하실 필요가 없습니다.\n\n공공장소에서는 개인정보가 유출될 수 있으니 사용을 자제하여 주십시오.\n\n자동로그인을 사용하시겠습니까?");
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
|
||||
@ -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' ");
|
||||
?>
|
||||
|
||||
<form name="fpoll" method="post" action="<?=$g4[bbs_path]?>/poll_update.php" onsubmit="return fpoll_submit(this);" target="winPoll">
|
||||
<form name="fpoll" method="post" action="<?=$g4['bbs_url']?>/poll_update.php" onsubmit="return fpoll_submit(this);" target="win_poll">
|
||||
<input type="hidden" name="po_id" value="<?=$po_id?>">
|
||||
<input type="hidden" name="skin_dir" value="<?=$skin_dir?>">
|
||||
<section id="poll">
|
||||
<header>
|
||||
<h2>설문조사</h2>
|
||||
<? if ($is_admin == "super") { ?><a href="<?=$g4[admin_path]?>/poll_form.php?w=u&po_id=<?=$po_id?>">설문조사 관리</a><? } ?>
|
||||
<? if ($is_admin == "super") { ?><a href="<?=$g4['admin_url']?>/poll_form.php?w=u&po_id=<?=$po_id?>">설문조사 관리</a><? } ?>
|
||||
<p><?=$po['po_subject']?></p>
|
||||
</header>
|
||||
<ul>
|
||||
@ -30,7 +29,7 @@ $po = sql_fetch(" select * from $g4[poll_table] where po_id = '$po_id' ");
|
||||
</ul>
|
||||
<footer>
|
||||
<input type="submit" value="투표하기">
|
||||
<a href="javascript:;" onclick="poll_result('<?=$po_id?>');">결과보기</a>
|
||||
<a href="<?="{$g4['bbs_url']}/poll_result.php?po_id={$po_id}&skin_dir={$skin_dir}";?>" target="win_poll">결과보기</a>
|
||||
</footer>
|
||||
</section>
|
||||
</form>
|
||||
|
||||
@ -15,11 +15,11 @@ if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
|
||||
<? for ($i=1; $i<=count($list); $i++) { ?>
|
||||
<li>
|
||||
<p>
|
||||
<?=$list[$i][content]?>
|
||||
<span><?=$list[$i][cnt]?>표 <?=number_format($list[$i][rate], 1)?>%</span>
|
||||
<?=$list[$i]['content']?>
|
||||
<span><?=$list[$i]['cnt']?>표 <?=number_format($list[$i]['rate'], 1)?>%</span>
|
||||
</p>
|
||||
<div class="poll_result_graph">
|
||||
<span style="width:<?=number_format($list[$i][rate], 1)?>%"></span>
|
||||
<span style="width:<?=number_format($list[$i]['rate'], 1)?>%"></span>
|
||||
</div>
|
||||
</li>
|
||||
<? } ?>
|
||||
@ -35,17 +35,17 @@ if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
|
||||
<? for ($i=0; $i<count($list2); $i++) { ?>
|
||||
<article>
|
||||
<header>
|
||||
<h1><?=$list2[$i][name]?>님의 의견</h1>
|
||||
<span class="poll_datetime"><?=$list2[$i][datetime]?></span>
|
||||
<span class="poll_del"><? if ($list2[$i][del]) { echo $list2[$i][del]."삭제</a>"; } ?></span>
|
||||
<h1><?=$list2[$i]['name']?>님의 의견</h1>
|
||||
<span class="poll_datetime"><?=$list2[$i]['datetime']?></span>
|
||||
<span class="poll_del"><? if ($list2[$i]['del']) { echo $list2[$i]['del']."삭제</a>"; } ?></span>
|
||||
</header>
|
||||
<p>
|
||||
<?=$list2[$i][idea]?>
|
||||
<?=$list2[$i]['idea']?>
|
||||
</p>
|
||||
</article>
|
||||
<? } ?>
|
||||
|
||||
<? if ($member[mb_level] >= $po[po_level]) { ?>
|
||||
<? if ($member['mb_level'] >= $po['po_level']) { ?>
|
||||
<form name="fpollresult" method="post" onsubmit="return fpollresult_submit(this);" autocomplete="off">
|
||||
<input type=hidden name="po_id" value="<?=$po_id?>">
|
||||
<input type=hidden name="w" value="">
|
||||
@ -55,8 +55,8 @@ if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
|
||||
<p><?=$po_etc?></p>
|
||||
<?
|
||||
$comment_size = "";
|
||||
if ($member[mb_id]) { $comment_size = 52; ?>
|
||||
<input type="hidden" name="pc_name" value="<?=cut_str($member[mb_nick],255)?>">
|
||||
if ($is_member) { $comment_size = 52; ?>
|
||||
<input type="hidden" name="pc_name" value="<?=cut_str($member['mb_nick'],255)?>">
|
||||
<? } else { $comment_size = 32; ?>
|
||||
<label for="pc_name">이름</label>
|
||||
<input type='text' id="pc_name" name="pc_name" class="fieldset_input required" size="10" required>
|
||||
@ -81,7 +81,7 @@ if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
|
||||
<section id="poll_result_another">
|
||||
<h2>다른 투표 결과 보기</h2>
|
||||
<ul>
|
||||
<? for ($i=0; $i<count($list3); $i++) { ?><li><a href="./poll_result.php?po_id=<?=$list3[$i][po_id]?>&skin_dir=<?=$skin_dir?>">[<?=$list3[$i][date]?>] <?=$list3[$i][subject]?></a></li><? } ?>
|
||||
<? for ($i=0; $i<count($list3); $i++) { ?><li><a href="./poll_result.php?po_id=<?=$list3[$i]['po_id']?>&skin_dir=<?=$skin_dir?>">[<?=$list3[$i]['date']?>] <?=$list3[$i]['subject']?></a></li><? } ?>
|
||||
</ul>
|
||||
</section>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user