Merge branch 'master' of github.com:gnuboard/g4s

This commit is contained in:
gnuboard
2013-01-16 16:11:49 +09:00
23 changed files with 426 additions and 359 deletions

View File

@ -7,8 +7,17 @@ if ($is_admin != "super")
$g4['title'] = "세션파일 일괄삭제";
include_once("./admin.head.php");
echo "'완료' 메세지가 나오기 전에 프로그램의 실행을 중지하지 마십시오.<br><br>";
echo "<span id='ct'></span>";
?>
<div id="session_del">
<p>
완료 메세지가 나오기 전에 프로그램의 실행을 중지하지 마십시오.
<p>
<span id="ct">
</span>
</div>
<?
include_once("./admin.tail.php");
flush();
@ -19,28 +28,28 @@ if (!$dir=@opendir($session_path)) {
$cnt=0;
while($file=readdir($dir)) {
if (!strstr($file,'sess_')) {
continue;
}
continue;
}
if (strpos($file,'sess_')!=0) {
continue;
}
continue;
}
if (!$atime=@fileatime("$session_path/$file")) {
continue;
}
if (time() > $atime + (3600 * 6)) { // 지난시간을 초로 계산해서 적어주시면 됩니다. default : 6시간전
if (!$atime=@fileatime("$session_path/$file")) {
continue;
}
if (time() > $atime + (3600 * 6)) { // 지난시간을 초로 계산해서 적어주시면 됩니다. default : 6시간전
$cnt++;
$return = unlink("$session_path/$file");
echo "<script>document.getElementById('ct').innerHTML += '$session_path/$file<br/>';</script>\n";
$return = unlink("$session_path/$file");
echo "<script>document.getElementById('ct').innerHTML += '$session_path/$file<br/>';</script>\n";
flush();
if ($cnt%10==0)
echo "<script>document.getElementById('ct').innerHTML = '';</script>\n";
}
}
}
echo "<script>document.getElementById('ct').innerHTML += '<br><br>세션데이터 {$cnt}건 삭제 완료.<br><br>프로그램의 실행을 끝마치셔도 좋습니다.';</script>\n";
?>
echo "<script>document.getElementById('ct').innerHTML += '세션데이터 {$cnt}건 삭제 완료.<br><br>프로그램의 실행을 끝마치셔도 좋습니다.';</script>\n";
?>

View File

@ -3,7 +3,7 @@ include_once('./_common.php');
if ($is_admin)
{
if (!($token && get_session('ss_delete_token') == $token))
if (!($token && get_session('ss_delete_token') == $token))
alert('토큰 에러로 삭제 불가합니다.');
}
@ -14,49 +14,49 @@ if ($is_admin)
if ($is_admin == 'super') // 최고관리자 통과
;
else if ($is_admin == 'group') { // 그룹관리자
$mb = get_member($write[mb_id]);
if ($member[mb_id] != $group[gr_admin]) // 자신이 관리하는 그룹인가?
$mb = get_member($write['mb_id']);
if ($member['mb_id'] != $group['gr_admin']) // 자신이 관리하는 그룹인가?
alert('자신이 관리하는 그룹의 게시판이 아니므로 삭제할 수 없습니다.');
else if ($member[mb_level] < $mb[mb_level]) // 자신의 레벨이 크거나 같다면 통과
else if ($member['mb_level'] < $mb['mb_level']) // 자신의 레벨이 크거나 같다면 통과
alert('자신의 권한보다 높은 권한의 회원이 작성한 글은 삭제할 수 없습니다.');
} else if ($is_admin == 'board') { // 게시판관리자이면
$mb = get_member($write[mb_id]);
if ($member[mb_id] != $board[bo_admin]) // 자신이 관리하는 게시판인가?
$mb = get_member($write['mb_id']);
if ($member['mb_id'] != $board['bo_admin']) // 자신이 관리하는 게시판인가?
alert('자신이 관리하는 게시판이 아니므로 삭제할 수 없습니다.');
else if ($member[mb_level] < $mb[mb_level]) // 자신의 레벨이 크거나 같다면 통과
else if ($member['mb_level'] < $mb['mb_level']) // 자신의 레벨이 크거나 같다면 통과
alert('자신의 권한보다 높은 권한의 회원이 작성한 글은 삭제할 수 없습니다.');
} else if ($member[mb_id]) {
if ($member[mb_id] != $write[mb_id])
} else if ($member['mb_id']) {
if ($member['mb_id'] != $write['mb_id'])
alert('자신의 글이 아니므로 삭제할 수 없습니다.');
} else {
if ($write[mb_id])
if ($write['mb_id'])
alert('로그인 후 삭제하세요.', './login.php?url='.urlencode('./board.php?bo_table='.$bo_table.'&amp;wr_id='.$wr_id));
else if (sql_password($wr_password) != $write[wr_password])
alert('패스워드가 틀리므로 삭제할 수 없습니다.');
else if (sql_password($wr_password) != $write['wr_password'])
alert('패스워드가 틀리므로 삭제할 수 없습니다.');
}
$len = strlen($write[wr_reply]);
if ($len < 0) $len = 0;
$reply = substr($write[wr_reply], 0, $len);
$len = strlen($write['wr_reply']);
if ($len < 0) $len = 0;
$reply = substr($write['wr_reply'], 0, $len);
// 원글만 구한다.
$sql = " select count(*) as cnt from {$write_table}
where wr_reply like '{$reply}%'
and wr_id <> '{$write[wr_id]}'
and wr_num = '{$write[wr_num]}'
$sql = " select count(*) as cnt from $write_table
where wr_reply like '$reply%'
and wr_id <> '{$write['wr_id']}'
and wr_num = '{$write['wr_num']}'
and wr_is_comment = 0 ";
$row = sql_fetch($sql);
if ($row[cnt] && !$is_admin)
alert('이 글과 관련된 답변글이 존재하므로 삭제 할 수 없습니다..PHP_EOL.PHP_EOL.우선 답변글부터 삭제하여 주십시오.');
if ($row['cnt'] && !$is_admin)
alert('이 글과 관련된 답변글이 존재하므로 삭제 할 수 없습니다.'."\n\n".'우선 답변글부터 삭제하여 주십시오.');
// 코멘트 달린 원글의 삭제 여부
$sql = " select count(*) as cnt from {$write_table}
where wr_parent = '{$wr_id}'
and mb_id <> '{$member[mb_id]}'
$sql = " select count(*) as cnt from $write_table
where wr_parent = '$wr_id'
and mb_id <> '{$member['mb_id']}'
and wr_is_comment = 1 ";
$row = sql_fetch($sql);
if ($row[cnt] >= $board[bo_count_delete] && !$is_admin)
alert('이 글과 관련된 코멘트가 존재하므로 삭제 할 수 없습니다.'.PHP_EOL.PHP_EOL.'코멘트가 '.$board[bo_count_delete].'건 이상 달린 원글은 삭제할 수 없습니다.');
if ($row['cnt'] >= $board['bo_count_delete'] && !$is_admin)
alert('이 글과 관련된 코멘트가 존재하므로 삭제 할 수 없습니다.'."\n\n".'코멘트가 '.$board['bo_count_delete'].'건 이상 달린 원글은 삭제할 수 없습니다.');
// 사용자 코드 실행
@ -65,59 +65,59 @@ if ($row[cnt] >= $board[bo_count_delete] && !$is_admin)
// 나라오름님 수정 : 원글과 코멘트수가 정상적으로 업데이트 되지 않는 오류를 잡아 주셨습니다.
//$sql = " select wr_id, mb_id, wr_comment from $write_table where wr_parent = '$write[wr_id]' order by wr_id ";
$sql = " select wr_id, mb_id, wr_is_comment from {$write_table} where wr_parent = '{$write[wr_id]}' order by wr_id ";
$sql = " select wr_id, mb_id, wr_is_comment from $write_table where wr_parent = '{$write['wr_id']}' order by wr_id ";
$result = sql_query($sql);
while ($row = sql_fetch_array($result))
while ($row = sql_fetch_array($result))
{
// 원글이라면
if (!$row[wr_is_comment])
if (!$row['wr_is_comment'])
{
// 원글 포인트 삭제
if (!delete_point($row[mb_id], $bo_table, $row[wr_id], '쓰기'))
insert_point($row[mb_id], $board[bo_write_point] * (-1), "{$board[bo_subject]} {$row[wr_id]} 글삭제");
if (!delete_point($row['mb_id'], $bo_table, $row['wr_id'], '쓰기'))
insert_point($row['mb_id'], $board['bo_write_point'] * (-1), "{$board['bo_subject']} {$row['wr_id']} 글삭제");
// 업로드된 파일이 있다면 파일삭제
$sql2 = " select * from {$g4[board_file_table]} where bo_table = '{$bo_table}' and wr_id = '{$row[wr_id]}' ";
$sql2 = " select * from {$g4['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($g4['path'].'/data/file/'.$bo_table.'/'.$row2[bf_file]);
@unlink($g4['path'].'/data/file/'.$bo_table.'/'.$row2['bf_file']);
// 파일테이블 행 삭제
sql_query(" delete from {$g4[board_file_table]} where bo_table = '{$bo_table}' and wr_id = '{$row[wr_id]}' ");
sql_query(" delete from {$g4['board_file_table']} where bo_table = '$bo_table' and wr_id = '{$row['wr_id']}' ");
$count_write++;
}
else
}
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++;
}
}
// 게시글 삭제
sql_query(" delete from {$write_table} where wr_parent = '{$write[wr_id]}' ");
sql_query(" delete from $write_table where wr_parent = '{$write['wr_id']}' ");
// 최근게시물 삭제
sql_query(" delete from {$g4[board_new_table]} where bo_table = '{$bo_table}' and wr_parent = '{$write[wr_id]}' ");
sql_query(" delete from {$g4['board_new_table']} where bo_table = '$bo_table' and wr_parent = '{$write['wr_id']}' ");
// 스크랩 삭제
sql_query(" delete from {$g4[scrap_table]} where bo_table = '{$bo_table}' and wr_id = '{$write[wr_id]}' ");
sql_query(" delete from {$g4['scrap_table']} where bo_table = '$bo_table' and wr_id = '{$write['wr_id']}' ");
// 공지사항 삭제
$notice_array = explode("\n", trim($board[bo_notice]));
$notice_array = explode("\n", trim($board['bo_notice']));
$bo_notice = "";
for ($k=0; $k<count($notice_array); $k++)
if ((int)$write[wr_id] != (int)$notice_array[$k])
$bo_notice .= $notice_array[$k] . "\n";
$bo_notice = trim($bo_notice);
sql_query(" update {$g4[board_table]} set bo_notice = '{$bo_notice}' where bo_table = '{$bo_table}' ");
sql_query(" update {$g4['board_table']} set bo_notice = '$bo_notice' where bo_table = '$bo_table' ");
// 글숫자 감소
if ($count_write > 0 || $count_comment > 0)
sql_query(" update {$g4[board_table]} set bo_count_write = bo_count_write - '{$count_write}', bo_count_comment = bo_count_comment - '{$count_comment}' where bo_table = '{$bo_table}' ");
sql_query(" update {$g4['board_table']} set bo_count_write = bo_count_write - '$count_write', bo_count_comment = bo_count_comment - '$count_comment' where bo_table = '$bo_table' ");
@include_once($board_skin_path.'/delete.tail.skin.php');

View File

@ -151,7 +151,6 @@ function captcha_html($class="captcha")
$html .= '<legend class="sound_only">스팸방지</legend>';
$html .= '<img src="'.captcha_file('.png').'" alt="스팸방지 숫자">';
$html .= '<a href="'.captcha_file('.wav').'" id="captcha_wav"><img src="'.$g4['bbs_path'].'/gcaptcha/img/sound.gif" alt="숫자를 음성으로 듣기"></a>';
$html .= '<a href="'.$g4['gcaptcha_path'].'/down.php?file='.abs_ip2long().'_'.$_COOKIE['PHPSESSID'].'.wav'.'" id="captcha_wav">다운로드</a>';
$html .= '<input type="text" id="captcha_key" name="captcha_key" class="captcha_box fieldset_input" size="6" maxlength="6" required title="스팸방지 숫자 입력">';
$html .= '<p class="sound_only">스팸방지 숫자를 순서대로 입력하세요.</p>';
$html .= '</fieldset>';

View File

@ -176,14 +176,20 @@ if ($sw == "move")
}
$msg = '해당 게시물을 선택한 게시판으로 '.$act.' 하였습니다.';
$opener_href = './board.php?bo_table='.$bo_table.'&amp;page='.$page.'&amp;$qstr';
$opener_href = './board.php?bo_table='.$bo_table.'&amp;page='.$page.'&amp;'.$qstr;
echo <<<HEREDOC
<meta http-equiv='content-type' content='text/html; charset={$g4['charset']}'>
<meta http-equiv="content-type" content="text/html; charset={$g4['charset']}">
<script>
alert("{$msg}");
opener.document.location.href = "{$opener_href}";
alert("$msg");
opener.document.location.href = "$opener_href";
window.close();
</script>
<noscript>
<p>
"$msg"
</p>
<a href="$opener_href">돌아가기</a>
</noscript>
HEREDOC;
?>

View File

@ -105,7 +105,7 @@ for($i=0; $row=sql_fetch_array($result); $i++) {
<?=get_paging($config[cf_write_pages], $page, $total_page, $_SERVER[PHP_SELF].'?'.$qstr.'&amp;page=');?>
</div>
<div class="btn_window">
<div class="btn_win">
<a href="javascript:window.close();">창닫기</a>
</div>
</div>

View File

@ -1,34 +1,34 @@
<?
include_once('./_common.php');
if (!$member[mb_id])
if (!$is_member)
alert_close('회원만 조회하실 수 있습니다.');
$g4['title'] = $member[mb_nick].'님의 스크랩';
$g4['title'] = $member['mb_nick'].'님의 스크랩';
include_once($g4['path'].'/head.sub.php');
$list = array();
$sql_common = " from {$g4[scrap_table]} where mb_id = '{$member[mb_id]}' ";
$sql_common = " from {$g4['scrap_table']} where mb_id = '{$member['mb_id']}' ";
$sql_order = " order by ms_id desc ";
$sql = " select count(*) as cnt {$sql_common} ";
$sql = " select count(*) as cnt $sql_common ";
$row = sql_fetch($sql);
$total_count = $row[cnt];
$total_count = $row['cnt'];
$rows = $config[cf_page_rows];
$rows = $config['cf_page_rows'];
$total_page = ceil($total_count / $rows); // 전체 페이지 계산
if (!$page) $page = 1; // 페이지가 없으면 첫 페이지 (1 페이지)
$from_record = ($page - 1) * $rows; // 시작 열을 구함
$list = array();
$sql = " select *
{$sql_common}
{$sql_order}
limit {$from_record}, {$rows} ";
$sql = " select *
$sql_common
$sql_order
limit $from_record, $rows ";
$result = sql_query($sql);
for ($i=0; $row=sql_fetch_array($result); $i++)
for ($i=0; $row=sql_fetch_array($result); $i++)
{
$list[$i] = $row;
@ -36,27 +36,27 @@ for ($i=0; $row=sql_fetch_array($result); $i++)
$num = $total_count - ($page - 1) * $rows - $i;
// 게시판 제목
$sql2 = " select bo_subject from {$g4[board_table]} where bo_table = '{$row[bo_table]}' ";
$sql2 = " select bo_subject from {$g4['board_table']} where bo_table = '{$row['bo_table']}' ";
$row2 = sql_fetch($sql2);
if (!$row2[bo_subject]) $row2[bo_subject] = '[게시판 없음]';
if (!$row2['bo_subject']) $row2['bo_subject'] = '[게시판 없음]';
// 게시물 제목
$tmp_write_table = $g4[write_prefix] . $row[bo_table];
$sql3 = " select wr_subject from {$tmp_write_table} where wr_id = '{$row[wr_id]}' ";
$tmp_write_table = $g4['write_prefix'] . $row['bo_table'];
$sql3 = " select wr_subject from $tmp_write_table where wr_id = '{$row['wr_id']}' ";
$row3 = sql_fetch($sql3, FALSE);
$subject = get_text(cut_str($row3[wr_subject], 100));
if (!$row3[wr_subject])
$row3[wr_subject] = '[글 없음]';
$subject = get_text(cut_str($row3['wr_subject'], 100));
if (!$row3['wr_subject'])
$row3['wr_subject'] = '[글 없음]';
$list[$i][num] = $num;
$list[$i][opener_href] = './board.php?bo_table='.$row[bo_table];
$list[$i][opener_href_wr_id] = './board.php?bo_table='.$row[bo_table].'&amp;wr_id='.$row[wr_id];
$list[$i][bo_subject] = $row2[bo_subject];
$list[$i][subject] = $subject;
$list[$i][del_href] = './scrap_delete.php?ms_id='.$row[ms_id].'&amp;page='.$page;
$list[$i]['num'] = $num;
$list[$i]['opener_href'] = './board.php?bo_table='.$row['bo_table'];
$list[$i]['opener_href_wr_id'] = './board.php?bo_table='.$row['bo_table'].'&amp;wr_id='.$row['wr_id'];
$list[$i]['bo_subject'] = $row2['bo_subject'];
$list[$i]['subject'] = $subject;
$list[$i]['del_href'] = './scrap_delete.php?ms_id='.$row['ms_id'].'&amp;page='.$page;
}
$member_skin_path = $g4['path'].'/skin/member/'.$config[cf_member_skin];
$member_skin_path = $g4['path'].'/skin/member/'.$config['cf_member_skin'];
include_once($member_skin_path.'/scrap.skin.php');
include_once($g4['path'].'/tail.sub.php');

View File

@ -1,10 +1,10 @@
<?
include_once('./_common.php');
if (!$member[mb_id])
if (!$is_member)
alert('회원만 이용하실 수 있습니다.');
$sql = " delete from {$g4[scrap_table]} where mb_id = '{$member[mb_id]}' and ms_id = '{$ms_id}' ";
$sql = " delete from {$g4['scrap_table']} where mb_id = '{$member['mb_id']}' and ms_id = '$ms_id' ";
sql_query($sql);
goto_url('./scrap.php?page='.$page);

View File

@ -3,7 +3,7 @@ include_once('./_common.php');
include_once($g4['path'].'/head.sub.php');
if (!$member[mb_id]) {
if (!$is_member) {
$href = './login.php?'.$qstr.'&amp;url='.urlencode('./board.php?bo_table='.$bo_table.'&amp;wr_id='.$wr_id);
echo <<<HEREDOC
<script>
@ -11,6 +11,10 @@ if (!$member[mb_id]) {
opener.location.href = '$href';
window.close();
</script>
<noscript>
<p>회원만 접근 가능합니다.</p>
<a href="$href">로그인하기</a>
</noscript>
HEREDOC;
exit;
}
@ -24,27 +28,32 @@ echo <<<HEREDOC
</script>
HEREDOC;
if ($write[wr_is_comment])
if ($write['wr_is_comment'])
alert_close('코멘트는 스크랩 할 수 없습니다.');
$sql = " select count(*) as cnt from {$g4[scrap_table]}
where mb_id = '{$member[mb_id]}'
and bo_table = '{$bo_table}'
and wr_id = '{$wr_id}' ";
$sql = " select count(*) as cnt from {$g4['scrap_table']}
where mb_id = '{$member['mb_id']}'
and bo_table = '$bo_table'
and wr_id = '$wr_id' ";
$row = sql_fetch($sql);
if ($row[cnt]) {
if ($row['cnt']) {
echo <<<HEREDOC
<script>
if (confirm('이미 스크랩하신 글 입니다.'.PHP_EOL.PHP_EOL.'지금 스크랩을 확인하시겠습니까?'))
if (confirm('이미 스크랩하신 글 입니다.\\n\\n지금 스크랩을 확인하시겠습니까?'))
document.location.href = './scrap.php';
else
window.close();
</script>
<noscript>
<p>이미 스크랩하신 글 입니다.</p>
<a href="./scrap.php">스크랩 확인하기</a>
<a href="./board.php?bo_table={$bo_table}&amp;wr_id=$wr_id">돌아가기</a>
</noscript>
HEREDOC;
exit;
}
$member_skin_path = $g4['path'].'/skin/member/'.$config[cf_member_skin];
$member_skin_path = $g4['path'].'/skin/member/'.$config['cf_member_skin'];
include_once($member_skin_path.'/scrap_popin.skin.php');
include_once($g4['path'].'/tail.sub.php');

View File

@ -3,93 +3,102 @@ include_once('./_common.php');
include_once($g4['path'].'/head.sub.php');
if (!$member[mb_id])
if (!$is_member)
{
$href = './login.php?'.$qstr.'&amp;url='.urlencode('./board.php?bo_table='.$bo_table.'&amp;wr_id='.$wr_id);
echo '<script> alert(\'회원만 접근 가능합니다.\'); top.location.href = \''.$href.'\'; </script>';
exit;
}
$sql = " select count(*) as cnt from $g4[scrap_table]
where mb_id = '$member[mb_id]'
$sql = " select count(*) as cnt from {$g4['scrap_table']}
where mb_id = '{$member['mb_id']}'
and bo_table = '$bo_table'
and wr_id = '$wr_id' ";
$row = sql_fetch($sql);
if ($row[cnt])
if ($row['cnt'])
{
echo '
<script>
if (confirm(\'이미 스크랩하신 글 입니다.'.PHP_EOL.PHP_EOL.'지금 스크랩을 확인하시겠습니까?\'))
<script>
if (confirm(\'이미 스크랩하신 글 입니다.'."\n\n".'지금 스크랩을 확인하시겠습니까?\'))
document.location.href = \'./scrap.php\';
else
window.close();
</script>';
</script>
<noscript>
<p>이미 스크랩하신 글 입니다.</p>
<a href="./scrap.php">스크랩 확인하기</a>
<a href="./board.php?bo_table='.$bo_table.'&amp;wr_id='.$wr_id.'">돌아가기</a>
</noscript>';
exit;
}
// 덧글이 넘어오고 코멘트를 쓸 권한이 있다면
if ($wr_content && ($member[mb_level] >= $board[bo_comment_level]))
if ($wr_content && ($member['mb_level'] >= $board['bo_comment_level']))
{
$wr = get_write($write_table, $wr_id);
// 원글이 존재한다면
if ($wr[wr_id])
if ($wr['wr_id'])
{
$mb_id = $member[mb_id];
$wr_name = $member[mb_nick];
$wr_password = $member[mb_password];
$wr_email = $member[mb_email];
$wr_homepage = $member[mb_homepage];
$mb_id = $member['mb_id'];
$wr_name = $member['mb_nick'];
$wr_password = $member['mb_password'];
$wr_email = $member['mb_email'];
$wr_homepage = $member['mb_homepage'];
$sql = " select max(wr_comment) as max_comment from {$write_table}
where wr_parent = '{$wr_id}' and wr_is_comment = 1 ";
$sql = " select max(wr_comment) as max_comment from $write_table
where wr_parent = '$wr_id' and wr_is_comment = '1' ";
$row = sql_fetch($sql);
$row[max_comment] += 1;
$row['max_comment'] += 1;
$sql = " insert into $write_table
set ca_name = '{$wr[ca_name]}',
set ca_name = '{$wr['ca_name']}',
wr_option = '',
wr_num = '{$wr[wr_num]}',
wr_num = '{$wr['wr_num']}',
wr_reply = '',
wr_parent = '{$wr_id}',
wr_is_comment = 1,
wr_comment = '{$row[max_comment]}',
wr_content = '{$wr_content}',
mb_id = '{$mb_id}',
wr_password = '{$wr_password}',
wr_name = '{$wr_name}',
wr_email = '{$wr_email}',
wr_homepage = '{$wr_homepage}',
wr_datetime = '{$g4[time_ymdhis]}',
wr_ip = '{$_SERVER[REMOTE_ADDR]}' ";
wr_parent = '$wr_id',
wr_is_comment = '1',
wr_comment = '{$row['max_comment']}',
wr_content = '$wr_content',
mb_id = '$mb_id',
wr_password = '$wr_password',
wr_name = '$wr_name',
wr_email = '$wr_email',
wr_homepage = '$wr_homepage',
wr_datetime = '{$g4['time_ymdhis']}',
wr_ip = '{$_SERVER['REMOTE_ADDR']}' ";
sql_query($sql);
$comment_id = mysql_insert_id();
// 원글에 코멘트수 증가
sql_query(" update {$write_table} set wr_comment = wr_comment + 1 where wr_id = '{$wr_id}' ");
sql_query(" update $write_table set wr_comment = wr_comment + 1 where wr_id = '$wr_id' ");
// 새글 INSERT
//sql_query(" insert into $g4[board_new_table] ( bo_table, wr_id, wr_parent, bn_datetime ) values ( '$bo_table', '$comment_id', '$wr_id', '$g4[time_ymdhis]' ) ");
sql_query(" insert into {$g4[board_new_table]} ( bo_table, wr_id, wr_parent, bn_datetime, mb_id ) values ( '{$bo_table}', '{$comment_id}', '{$wr_id}', '{$g4[time_ymdhis]}', '{$member[mb_id]}' ) ");
sql_query(" insert into {$g4['board_new_table']} ( bo_table, wr_id, wr_parent, bn_datetime, mb_id ) values ( '$bo_table', '$comment_id', '$wr_id', '{$g4['time_ymdhis']}', '{$member['mb_id']}' ) ");
// 코멘트 1 증가
sql_query(" update {$g4[board_table]} set bo_count_comment = bo_count_comment + 1 where bo_table = '{$bo_table}' ");
sql_query(" update {$g4['board_table']} set bo_count_comment = bo_count_comment + 1 where bo_table = '$bo_table' ");
// 포인트 부여
insert_point($member[mb_id], $board[bo_comment_point], '{$board[bo_subject]} {$wr_id}-{$comment_id} 코멘트쓰기', $bo_table, $comment_id, '코멘트');
insert_point($member['mb_id'], $board['bo_comment_point'], "{$board['bo_subject']} {$wr_id}-{$comment_id} 코멘트쓰기", $bo_table, $comment_id, '코멘트');
}
}
$sql = " insert into {$g4[scrap_table]} ( mb_id, bo_table, wr_id, ms_datetime )
values ( '{$member[mb_id]}', '{$bo_table}', '{$wr_id}', '{$g4[time_ymdhis]}' ) ";
$sql = " insert into {$g4['scrap_table']} ( mb_id, bo_table, wr_id, ms_datetime )
values ( '{$member['mb_id']}', '$bo_table', '$wr_id', '{$g4['time_ymdhis']}' ) ";
sql_query($sql);
echo <<<HEREDOC
<script>
if (confirm('이 글을 스크랩 하였습니다.'.PHP_EOL.PHP_EOL.'지금 스크랩을 확인하시겠습니까?'))
if (confirm('이 글을 스크랩 하였습니다.\\n\\n지금 스크랩을 확인하시겠습니까?'))
document.location.href = './scrap.php';
else
window.close();
</script>
<noscript>
<p>이 글을 스크랩 하였습니다.</p>
<a href="./scrap.php">스크랩 확인하기</a>
</noscript>
HEREDOC;
?>

View File

@ -129,7 +129,11 @@ if ($stx) {
$sql2 = " select bo_subject from {$g4['board_table']} where bo_table = '{$g4_search['tables'][$i]}' ";
$row2 = sql_fetch($sql2);
$str_board_list .= '<li><a href="'.$_SERVER['PHP_SELF'].'?'.$search_query.'&amp;gr_id='.$gr_id.'&amp;onetable='.$g4_search[tables][$i].'">'.$row2[bo_subject].'</a> ('.$row[cnt].')';
$sch_class = "";
$sch_all = "";
if ($onetable == $g4_search['tables'][$i]) $sch_class = "class=sch_on";
else $sch_all = "class=sch_on";
$str_board_list .= '<li><a href="'.$_SERVER['PHP_SELF'].'?'.$search_query.'&amp;gr_id='.$gr_id.'&amp;onetable='.$g4_search['tables'][$i].'" '.$sch_class.'>'.$row2['bo_subject'].PHP_EOL.'<span class="sound_only">갯수</span><span class="cnt_cmt">'.$row['cnt'].'</span></a>';
}
}
@ -162,37 +166,37 @@ if ($stx) {
for ($i=0; $row=sql_fetch_array($result); $i++) {
// 검색어까지 링크되면 게시판 부하가 일어남
$list[$idx][$i] = $row;
$list[$idx][$i][href] = './board.php?bo_table='.$search_table[$idx].'&amp;wr_id='.$row[wr_parent];
$list[$idx][$i][href] = './board.php?bo_table='.$search_table[$idx].'&amp;wr_id='.$row['wr_parent'];
if ($row[wr_is_comment])
if ($row['wr_is_comment'])
{
$link .= '#c'.$row[wr_id];
$sql2 = " select wr_subject, wr_option from {$tmp_write_table} where wr_id = '{$row[wr_parent]}' ";
$link .= '#c'.$row['wr_id'];
$sql2 = " select wr_subject, wr_option from {$tmp_write_table} where wr_id = '{$row['wr_parent']}' ";
$row2 = sql_fetch($sql2);
//$row[wr_subject] = $row2[wr_subject];
$row[wr_subject] = get_text($row2[wr_subject]);
//$row['wr_subject'] = $row2['wr_subject'];
$row['wr_subject'] = get_text($row2['wr_subject']);
}
// 비밀글은 검색 불가
if (strstr($row[wr_option].$row2[wr_option], 'secret'))
$row[wr_content] = '[비밀글 입니다.]';
if (strstr($row['wr_option'].$row2['wr_option'], 'secret'))
$row['wr_content'] = '[비밀글 입니다.]';
$subject = get_text($row[wr_subject]);
$subject = get_text($row['wr_subject']);
if (strstr($sfl, 'wr_subject'))
$subject = search_font($stx, $subject);
if ($read_level[$idx] <= $member[mb_level])
if ($read_level[$idx] <= $member['mb_level'])
{
$content = cut_str(get_text($row[wr_content]),300,"");
$content = cut_str(get_text($row['wr_content']),300,"");
if (strstr($sfl, 'wr_content'))
$content = search_font($stx, $content);
}
else
$content = '';
$list[$idx][$i][subject] = $subject;
$list[$idx][$i][content] = $content;
$list[$idx][$i][name] = get_sideview($row[mb_id], cut_str($row[wr_name], $config[cf_cut_name]), $row[wr_email], $row[wr_homepage]);
$list[$idx][$i]['subject'] = $subject;
$list[$idx][$i]['content'] = $content;
$list[$idx][$i]['name'] = get_sideview($row['mb_id'], cut_str($row['wr_name'], $config['cf_cut_name']), $row['wr_email'], $row['wr_homepage']);
$k++;
if ($k >= $rows)

View File

@ -72,11 +72,11 @@ $update_href = $delete_href = '';
// 로그인중이고 자신의 글이라면 또는 관리자라면 패스워드를 묻지 않고 바로 수정, 삭제 가능
if (($member['mb_id'] && ($member['mb_id'] == $write['mb_id'])) || $is_admin) {
$update_href = './write.php?w=u&amp;bo_table='.$bo_table.'&amp;wr_id='.$wr_id.'&amp;page='.$page.$qstr;
$delete_href = 'javascript:del(\'./delete.php?bo_table='.$bo_table.'&amp;wr_id='.$wr_id.'&amp;page='.$page.urldecode($qstr).'\');';
if ($is_admin)
$delete_href = './delete.php?bo_table='.$bo_table.'&amp;wr_id='.$wr_id.'&amp;page='.$page.urldecode($qstr);
if ($is_admin)
{
set_session("ss_delete_token", $token = uniqid(time()));
$delete_href = 'javascript:del(\'./delete.php?bo_table='.$bo_table.'&amp;wr_id='.$wr_id.'&amp;token='.$token.'&amp;page='.$page.urldecode($qstr).'\');';
$delete_href ='./delete.php?bo_table='.$bo_table.'&amp;wr_id='.$wr_id.'&amp;token='.$token.'&amp;page='.$page.urldecode($qstr);
}
}
else if (!$write['mb_id']) { // 회원이 쓴 글이 아니라면
@ -87,8 +87,8 @@ else if (!$write['mb_id']) { // 회원이 쓴 글이 아니라면
// 최고, 그룹관리자라면 글 복사, 이동 가능
$copy_href = $move_href = '';
if ($write['wr_reply'] == '' && ($is_admin == 'super' || $is_admin == 'group')) {
$copy_href = 'javascript:win_open(\'./move.php?sw=copy&amp;bo_table='.$bo_table.'&amp;wr_id='.$wr_id.'&amp;page='.$page.$qstr.'\', \'boardcopy\', \'left=50, top=50, width=500, height=550, scrollbars=1\');';
$move_href = 'javascript:win_open(\'./move.php?sw=move&amp;bo_table='.$bo_table.'&amp;wr_id='.$wr_id.'&amp;page='.$page.$qstr.'\', \'boardmove\', \'left=50, top=50, width=500, height=550, scrollbars=1\');';
$copy_href = './move.php?sw=copy&amp;bo_table='.$bo_table.'&amp;wr_id='.$wr_id.'&amp;page='.$page.$qstr;
$move_href = './move.php?sw=move&amp;bo_table='.$bo_table.'&amp;wr_id='.$wr_id.'&amp;page='.$page.$qstr;
}
$scrap_href = '';

View File

@ -51,7 +51,7 @@ h1 {margin-bottom:20px;color:#333;font-size:1.5em;font-family:"verdana","dotum";
.btn_confirm {margin-bottom:20px;text-align:center}
.btn_confirm button {padding:0 15px;height:30px;border:0;background:#74868b;color:#fff;font-size:0.875em;line-height:2.2em;vertical-align:middle}
.btn_confirm button:focus {padding:0 15px;height:30px;background:#555;color:#fff;font-size:0.875em;line-height:2.2em;vertical-align:middle}
.btn_submit {padding:0 15px;height:30px;border:0;background:#ff6633;color:#fff;font-size:0.875em;line-height:2.2em;vertical-align:middle}
.btn_submit {padding:0 15px;height:30px;border:0;background:#ff3061;color:#fff;font-size:0.875em;line-height:2.2em;vertical-align:middle}
.btn_submit:focus {padding:0 15px;height:30px;border:0;background:#555;color:#fff;font-size:0.875em;line-height:2.2em;vertical-align:middle}
.btn_list input, .btn_list button {padding:0 15px;height:30px;background:#74868b;color:#fff;font-size:0.875em;line-height:2.2em;vertical-align:middle}
@ -60,7 +60,7 @@ h1 {margin-bottom:20px;color:#333;font-size:1.5em;font-family:"verdana","dotum";
.btn_list a:focus {background:#555}
#btn_add {margin-bottom:10px;text-align:center}
#btn_add a {display:inline-block;padding:0 15px;height:30px;border:0;background:#ff6633;color:#fff;font-size:0.875em;text-decoration:none;line-height:2.2em;vertical-align:middle}
#btn_add a {display:inline-block;padding:0 15px;height:30px;border:0;background:#ff3061;color:#fff;font-size:0.875em;text-decoration:none;line-height:2.2em;vertical-align:middle}
/* 폼 */
label {vertical-align:middle}
@ -147,6 +147,10 @@ td {padding:10px}
.visit_bar {position:relative}
.visit_bar span {position:absolute;top:-8px;left:0;height:15px;background:#ddd}
/* 메일 테스트, 세션파일일괄삭제 */
#fsendmailtest p,
#session_del p {margin-bottom:20px;padding:13px;border:1px solid #ced9de;background:#fff;font-size:0.75em}
/* pagination */
.pg {clear:both;margin:0 0 10px;padding-top:20px;font-size:0.75em;text-align:center}
.pg_wrap {display:inline-block;border:1px solid #c7cfd5;letter-spacing:-4px}

View File

@ -3,7 +3,7 @@
/* 초기화 */
html {overflow-y:scroll}
body {margin:0;padding:0;background:#fff;font-size:1em}
html, body, h1, h2, h3, h4, h5, h6 {margin:0 0 0;padding:0}
html, body, h1, h2, h3, h4, h5, h6, form {margin:0;padding:0}
h1, h2, h3, h4, h5, h6 {font-family:"verdana","dotum"}
article, aside, details, figcaption, figure, footer, header, hgroup, menu, nav, section {display:block}
header ul, nav ul {margin:0;padding:0;list-style:none}
@ -13,7 +13,7 @@ input {margin:0;padding:0;font-family:"verdana","dotum"}
p {margin:5px 0;padding:10px 0;line-height:1.5em}
hr {display:none}
/* 웹접근성 스킬 */
/* 웹접근성 스킬 --- 기본 block 속성에는 적용 안됨*/
.sound_only {display:inline-block;margin:0;padding:0;width:0;height:0;border:0;overflow:hidden}
/* 본문 바로가기 */
#to_content a {z-index:100000000;display:block;position:absolute;top:0;left:0;height:0;overflow:hidden}
@ -81,12 +81,11 @@ a {color:#000;text-decoration:none}
#tnb li {float:left}
#tnb a {display:inline-block;padding:0 10px;height:30px;border-right:1px solid #dadada;font-family:"dotum";font-size:0.7em;text-decoration:none;line-height:2.7em}
/* 전체검색 */
#hdsch {z-index:3;position:absolute;top:-31px;right:0;margin:0;padding:0;width:219px;border:0;border-left:1px solid #bbb;background:url('../img/search_bg.jpg') #fff bottom left repeat-x}
/* 상단 전체검색 */
#hdsch {z-index:3;position:absolute;top:-31px !important;top:-33px;right:0;margin:0;padding:0;width:219px;border:0;border-left:1px solid #bbb;background:url('../img/search_bg.jpg') #fff bottom left repeat-x}
#hdsch legend {position:absolute;padding:0;width:0;height:0;border:0;overflow:hidden}
#hdsch_stx {margin:5px 0 5px 5px;padding:0 5px;height:20px;width:170px;border:0;background:transparent;font-size:1em;line-height:1.4em}
#hdsch_stx:focus {background:#464649;color:#fff}
#hdsch_submit {position:relative}
/* 사이드 네비게이션: 아웃로그인, 설문조사 등 */
#snb {z-index:3;position:absolute;top:111px;right:0;font-family:"verdana","dotum"}
@ -100,17 +99,18 @@ a {color:#000;text-decoration:none}
#ol_before fieldset {margin:0;padding:0;border:0;background:transparent}
#ol_before legend {position:absolute;padding:0;width:0;height:0;border:0;background:transparent;overflow:hidden}
#ol_before input:focus {background:#333;color:#fff}
#ol_mb_id{display:block;margin-bottom:3px;padding:0 5px;width:185px;height:22px;border:1px solid #d7d7d7;background:#fff;line-height:1.6em}
#ol_mb_id_label {z-index:2;position:absolute;top:23px;left:20px;color:#696969}
#ol_mb_pw {display:block;padding:0 5px;width:120px;height:22px;border:1px solid #d7d7d7;background:#fff;line-height:1.6em}
#ol_mb_pw_label {z-index:2;position:absolute;top:50px;left:20px;color:#696969}
#auto_login {position:absolute;top:74px;left:13px}
#auto_login_label {position:absolute;top:76px;left:30px;color:#696969;letter-spacing:-0.1em}
#ol_before ul {position:relative;top:0;left:112px;margin:10px 0;width:90px;zoom:1}
#ol_id {display:block;margin-bottom:3px;padding:0 5px;width:185px;height:22px;border:1px solid #d7d7d7;background:#fff;line-height:1.6em}
.ol_idlabel {position:absolute;top:23px;left:20px;color:#696969}
#ol_pw {display:block;margin-bottom:3px;padding:0 5px;width:185px;height:22px;border:1px solid #d7d7d7;background:#fff;line-height:1.6em}
.ol_pwlabel {position:absolute;top:50px;left:20px;color:#696969}
#auto_login {}
#auto_login_label {color:#696969;letter-spacing:-0.1em}
#ol_submit {width:60px;height:24px;border:1px solid #b7b7b7;background:#fff;font-size:1em;font-weight:bold;letter-spacing:-0.1em;line-height:2em}
#ol_before ul {float:right;margin:10px 0;width:199px;zoom:1}
#ol_before ul:after {display:block;visibility:hidden;clear:both;content:""}
#ol_before li {float:left;margin-right:5px}
#ol_before li {float:right;margin-right:5px;padding-top:2px}
#ol_before #ol_auto {float:left;margin:0;padding:0}
#ol_before a {color:#696969;letter-spacing:-0.1em}
#ol_submit {position:absolute;top:42px;right:12px;width:60px;height:24px;border:1px solid #b7b7b7;background:#fff;font-size:1em;font-weight:bold;letter-spacing:-0.1em;line-height:2em}
/* 아웃로그인 후 */
#ol_after {width:219px;color:#000;font-size:0.75em}
#ol_after_hd {position:relative;padding:15px 10px 11px}
@ -120,7 +120,7 @@ a {color:#000;text-decoration:none}
#ol_after li {float:left}
#ol_after_rec {background:#fff}
#ol_after_rec a {display:inline-block;position:relative;width:60px;height:50px;font-size:0.9em;vertical-align:top}
#ol_after_rec span {position:absolute;top:0;left:0;width:100%;height:100%;text-align:center;line-height:7em}
#ol_after_rec span {position:absolute;top:0;left:0;padding-top:30px;width:100%;height:20px;text-align:center}
#ol_after_rec #ol_after_pt {width:97px;border-right:1px solid #ddd;border-left:1px solid #ddd}
#ol_after_memo span {background:url('../img/ol_after_bg.jpg')}
#ol_after_memo:focus span,
@ -175,7 +175,7 @@ a {color:#000;text-decoration:none}
#wrapper h1 {font-size:1em}
/* 레이아웃 하단 */
#footer {z-index:1;position:relative;padding:15px 0 20px;border-top:1px solid #666;color:#595959;font-size:0.75em}
#footer {z-index:1;position:relative;padding:15px 0 20px;border-top:1px solid #bbb;color:#595959;font-size:0.75em}
#footer h1 {margin:0;height:0;overflow:hidden}
#footer section {margin-left:20px}
#footer h2 {margin:0;width:100px;color:#000;font-size:1em}
@ -210,6 +210,8 @@ a {color:#000;text-decoration:none}
/* ##################################################################### 스킨 및 컨텐츠 */
/* 공통 */
.cnt_cmt {display:inline-block;margin-left:10px;color:#ff3061}
.readonly {background:#ff3061}
.highlight {font-weight:bold;color:#ff3061}
/* 버튼 */
.btn01 {display:inline-block;padding:0 10px;height:24px;border:1px solid #ff5e1c;background:#ff3061;color:#fff;font-size:0.75em;text-decoration:none;line-height:2.2em}
@ -244,8 +246,6 @@ a {color:#000;text-decoration:none}
.frm_tbl #captcha {margin:0;padding:0;border:0;background:transparent}
.frm_tbl #captcha input {margin-left:5px}
.readonly {background:#ff3061}
/* 최신글 */
.latest {clear:both;position:relative;margin-bottom:30px;padding:0 0 20px;border-bottom:1px solid #ccc;font-size:0.75em}
.latest strong {display:block;margin-bottom:15px;padding:0 10px 10px;border-bottom:1px solid #eee;font-size:1.1em}
@ -274,17 +274,34 @@ a {color:#000;text-decoration:none}
#current_connect_tbl .td_name {text-align:center}
/* 전체검색 */
#sch_result_hd {margin:0;border:1px solid #ddd;background:#fff}
#sch_result_hd dt {padding:10px;background:#f5f5f2}
#sch_result_hd dd {margin:0;padding:0}
.sch_result {}
.sch_result dt {font-weight:bold}
.sch_result dd {margin-bottom:30px}
.sch_result ul {padding:0}
.sch_result li {padding:10px 0;border-bottom:1px solid #ddd}
.sch_result p {margin:5px 0;padding:0;font-size:0.75em}
.sch_sideview {display:inline-block;font-size:0.75em}
.sch_datetime {font-size:0.75em}
#sch_result_detail {margin:0;padding:15px 0;border:0;text-align:right}
#sch_result_detail label {font-size:0.75em}
#sch_result {position:relative;padding:10px 0 0 200px;border-top:1px solid #ddd;border-bottom:1px solid #ddd;background:url('../img/sch_result_bg.jpg') repeat-y}
#sch_result dl {padding:0}
#sch_result ul {margin:0;padding:0;list-style:none}
#sch_result p {margin:5px 0;padding:0;font-size:0.75em}
#sch_result_hd {margin:0 0 20px;border-bottom:1px solid #eee;background:#fff;font-size:0.75em;zoom:1}
#sch_result_hd:after {display:block;visibility:hidden;clear:both;content:""}
#sch_result_hd dt {float:left;padding:10px 0 15px}
#sch_result_hd dd {float:right;margin:0;padding:10px 0 15px}
#sch_result_hd ul {float:left;padding:0;list-style:none}
#sch_result_hd li {float:left;padding:0 10px;border-right:1px solid #ddd}
#sch_result_bo {position:absolute;top:0;left:0;margin:0;width:170px;font-size:0.875em}
#sch_result_bo dt {margin:0;padding:0;height:0;border:0;overflow:hidden}
#sch_result_bo dd {margin:0}
#sch_result_bo li {position:relative;margin-top:-1px}
#sch_result_bo a {display:inline-block;padding:10px 0 10px 10px;width:160px;border:1px solid #ddd;background:#eee}
#sch_result_bo .sch_on {width:161px;border-right:0;background:#fff;font-weight:bold}
#sch_result_bo .cnt_cmt {color:#000}
#sch_result_atc dt a {display:inline-block;margin-bottom:15px;font-size:0.75em}
#sch_result_atc dd {margin:0 0 30px;border-bottom:1px solid #ddd}
#sch_result_atc li {padding:10px 0}
#sch_result_atc li a {font-size:0.875em}
#sch_result_atc p {margin-top:15px}
.sch_more {padding:10px 0 15px;font-size:0.75em;text-align:right}
.sch_more a {color:#818385}
.sch_sideview {display:inline-block;font-size:0.875em}
.sch_datetime {color:#818385;font-size:0.75em}
/* 게시판 목록 */
#btn_bo_adm {text-align:center}
@ -427,7 +444,7 @@ a {color:#000;text-decoration:none}
.new_win_ul a:hover,
.new_win_ul a:focus {background:#faf9f5}
.btn_win {clear:both;margin-bottom:20px;text-align:center} /* 새창용 */
.btn_win a {display:inline-block;padding:0 10px;height:28px;border:1px solid #ccc;background:#fafafa;color:#000;font-size:0.75em;text-decoration:none;line-height:2.5em}
.btn_win a {display:inline-block;padding:0 10px;height:28px;border:1px solid #ccc;background:#fafafa;color:#000;font-size:0.75em;text-decoration:none;line-height:2.5em;cursor:pointer}
/* 포인트 내역 */
#point table {margin-bottom:0}
@ -436,6 +453,7 @@ a {color:#000;text-decoration:none}
/* 쪽지 */
/* 스크랩 */
#scrap .td_datetime {width:150px}
#scrap_do table {margin-bottom:10px}
#scrap_do textarea {height:100px}
#scrap_do p {margin:0 auto 20px;width:90%;font-size:0.875em}

BIN
img/sch_result_bg.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.5 KiB

View File

@ -1,7 +1,7 @@
var wrestMsg = "";
var wrestFld = null;
var wrestFldDefaultColor = "";
var wrestFldBackColor = "#FFE4E1";
var wrestFldBackColor = "#ff3061";
// subject 속성값을 얻어 return, 없으면 tag의 name을 넘김
function wrestItemname(fld)

View File

@ -104,9 +104,9 @@ function set_cookie($cookie_name, $value, $expire)
function get_cookie($cookie_name)
{
$cookie = md5($cookie_name);
if (array_key_exists($cookie, $_COOKIE))
if (array_key_exists($cookie, $_COOKIE))
return base64_decode($_COOKIE[md5($cookie_name)]);
else
else
return "";
}
@ -803,7 +803,7 @@ function get_skin_select($skin_gubun, $id, $name, $selected='', $event='')
function option_selected($value, $selected, $text='')
{
if (!$text) $text = $value;
if ($value == $selected)
if ($value == $selected)
return "<option value=\"$value\" selected=\"selected\">$text</option>\n";
else
return "<option value=\"$value\">$text</option>\n";
@ -1589,7 +1589,7 @@ function convert_charset($from_charset, $to_charset, $str)
// mysql_real_escape_string 의 alias 기능을 한다.
function escape_trim($field)
{
return mysql_real_escape_string(htmlentities(trim($field)));
return mysql_real_escape_string(trim($field));
}
@ -1620,7 +1620,7 @@ function abs_ip2long($ip='')
}
function get_selected($field, $value, $first=false)
function get_selected($field, $value, $first=false)
{
$selected = ($field==$value) ? ' selected="selected"' : '';
if ($first && !$selected)

View File

@ -84,9 +84,9 @@ if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
?>
<ul class="bo_v_com">
<? if ($update_href) { ?><li><a href="<?=$update_href?>" class="btn02">수정</a></li><? } ?>
<? if ($delete_href) { ?><li><a href="<?=$delete_href?>" class="btn02">삭제</a></li><? } ?>
<? if ($copy_href) { ?><li><a href="<?=$copy_href?>" class="btn03">복사</a></li><? } ?>
<? if ($move_href) { ?><li><a href="<?=$move_href?>" class="btn03">이동</a></li><? } ?>
<? if ($delete_href) { ?><li><a href="<?=$delete_href?>" onclick="del(this.href); return false;" class="btn02">삭제</a></li><? } ?>
<? if ($copy_href) { ?><li><a href="<?=$copy_href?>" onclick="board_move(this.href); return false;" class="btn03">복사</a></li><? } ?>
<? if ($move_href) { ?><li><a href="<?=$move_href?>" onclick="board_move(this.href); return false;" class="btn03">이동</a></li><? } ?>
<? if ($search_href) { ?><li><a href="<?=$search_href?>" class="btn02">검색</a></li><? } ?>
<li><a href="<?=$list_href?>" class="btn02">목록</a></li>
<? if ($reply_href) { ?><li><a href="<?=$reply_href?>" class="btn02">답변</a></li><? } ?>
@ -120,7 +120,7 @@ if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
<? if ($scrap_href || $good_href || $nogood_href) { ?>
<div id="bo_v_act">
<? if ($scrap_href) { ?><a href="javascript:;" class="btn02" onclick="win_scrap('<?=$scrap_href?>');">스크랩</a><? } ?>
<? if ($scrap_href) { ?><a href="<? echo $scrap_href; ?>" onclick="win_scrap(this.href); return false;" target="_blank" class="btn02">스크랩</a><? } ?>
<? if ($good_href) {?><a href="<?=$good_href?>" class="btn02" target="hiddenframe">추천 <strong><?=number_format($view['wr_good'])?></strong></a><? } ?>
<? if ($nogood_href) {?><a href="<?=$nogood_href?>" class="btn02" target="hiddenframe">비추천 <strong><?=number_format($view['wr_nogood'])?></strong></a><? } ?>
</div>
@ -152,6 +152,11 @@ function file_download(link, file) {
<? if ($board['bo_download_point'] < 0) { ?>if (confirm("'"+decodeURIComponent(file)+"' 파일을 다운로드 하시면 포인트가 차감(<?=number_format($board['bo_download_point'])?>점)됩니다.\n\n포인트는 게시물당 한번만 차감되며 다음에 다시 다운로드 하셔도 중복하여 차감하지 않습니다.\n\n그래도 다운로드 하시겠습니까?"))<?}?>
document.location.href=link;
}
function board_move(href)
{
window.open(href, "boardmove", "left=50, top=50, width=500, height=550, scrollbars=1");
}
</script>
<script src="<?=$g4['path']?>/js/board.js"></script>

View File

@ -35,13 +35,7 @@ if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
</tbody>
</table>
<<<<<<< HEAD
<?=captcha_html();?>
<div class="btn_window btn_confirm">
=======
<div class="btn_win">
>>>>>>> 41f59fa9ae589fc22660fde7d19293f195aede31
<input type="submit" id="btn_submit" class="btn_submit" value="보내기">
<a href="javascript:window.close();">창닫기</a>
</div>

View File

@ -1,8 +1,8 @@
<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
?>
<form name="fboardpassword" method="post" onsubmit="return fboardpassword_submit(this);">
<form name="fboardpassword" method="post" action="<? echo $action; ?>">
<input type="hidden" name="w" value="<?=$w?>">
<input type="hidden" name="bo_table" value="<?=$bo_table?>">
<input type="hidden" name="wr_id" value="<?=$wr_id?>">
@ -23,10 +23,4 @@ if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
<script>
document.fboardpassword.wr_password.focus();
function fboardpassword_submit(f)
{
f.action = "<?=$action?>";
return true;
}
</script>

View File

@ -1,5 +1,5 @@
<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
?>
<div id="scrap" class="new_win">
@ -19,11 +19,11 @@ if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
<tbody>
<? for ($i=0; $i<count($list); $i++) { ?>
<tr>
<td class="td_num"><?=$list[$i][num]?></td>
<td class="td_board"><a href="javascript:;" onclick="opener.document.location.href='<?=$list[$i][opener_href]?>';"><?=$list[$i][bo_subject]?></a></td>
<td><a href="javascript:;" onclick="opener.document.location.href='<?=$list[$i][opener_href_wr_id]?>';"><?=$list[$i][subject]?></a></td>
<td class="td_datetime"><?=$list[$i][ms_datetime]?></td>
<td class="td_mng"><a href="javascript:del('<?=$list[$i][del_href]?>');">삭제</a></td>
<td class="td_num"><?=$list[$i]['num']?></td>
<td class="td_board"><a href="<?=$list[$i]['opener_href']?>" target="_blank" onclick="opener.document.location.href='<?=$list[$i]['opener_href']?>'; return false;"><?=$list[$i]['bo_subject']?></a></td>
<td><a href="<?=$list[$i]['opener_href_wr_id']?>" target="_blank" onclick="opener.document.location.href='<?=$list[$i]['opener_href_wr_id']?>'; return false;"><?=$list[$i]['subject']?></a></td>
<td class="td_datetime"><?=$list[$i]['ms_datetime']?></td>
<td class="td_mng"><a href="<? echo $list[$i]['del_href']; ?>" onclick="del(this.href); return false;">삭제</a></td>
</tr>
<? } ?>
@ -32,10 +32,16 @@ if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
</table>
<div class="pg">
<?=get_paging($config[cf_write_pages], $page, $total_page, "?$qstr&amp;page=");?>
<?=get_paging($config['cf_write_pages'], $page, $total_page, "?$qstr&amp;page=");?>
</div>
</div>
<div class="btn_win">
<a href="javascript:window.close();">창닫기</a>
</div>
</div>
<script>
$(function() {
$("div#scrap").append("<div class=\"btn_win\"><a>창닫기</a></div>");
$("div.btn_win a").click(function() {
window.close();
});
});
</script>

View File

@ -1,5 +1,5 @@
<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
?>
<div id="scrap_do" class="new_win">
@ -14,7 +14,7 @@ if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
<tbody>
<tr>
<th scope="row">제목</th>
<td><?=get_text(cut_str($write[wr_subject], 255))?></td>
<td><?=get_text(cut_str($write['wr_subject'], 255))?></td>
</tr>
<tr>
<th scope="row"><label for="wr_content">댓글</label></th>
@ -23,8 +23,6 @@ if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
</tbody>
</table>
</form>
<p>
스크랩을 하시면서 감사 혹은 격려의 댓글을 남기실 수 있습니다.
</p>
@ -32,4 +30,5 @@ if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
<div class="btn_win">
<input type="submit" value="스크랩">
</div>
</form>
</div>

View File

@ -8,14 +8,16 @@ if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
<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 title="회원아이디">
<label for="ol_mb_pw" id="ol_mb_pw_label">패스워드</label>
<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>
<label for="ol_id" id="ol_idlabel">회원아이디</label>
<input type="text" id="ol_id" name="mb_id" maxlength="20" required title="회원아이디">
<label for="ol_pw" id="ol_pwlabel">패스워드</label>
<input type="password" id="ol_pw" name="mb_password" maxlength="20" required title="패스워드">
<input type="submit" id="ol_submit" value="로그인">
<ul>
<li id="ol_auto">
<input type="checkbox" id="auto_login" name="auto_login" value="1">
<label for="auto_login" id="auto_login_label">자동로그인</label>
</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>
@ -25,10 +27,14 @@ if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
<script>
$(function(){
$omi = $('#ol_mb_id');
$omp = $('#ol_mb_pw');
$omi_label = $('#ol_mb_id_label');
$omp_label = $('#ol_mb_pw_label');
$omi = $('#ol_id');
$omp = $('#ol_pw');
$omp.css('display','inline-block');
$omp.css('width',121);
$omi_label = $('#ol_idlabel');
$omp_label = $('#ol_pwlabel');
$omi_label.addClass('ol_idlabel');
$omp_label.addClass('ol_pwlabel');
$omi.focus(function() {
$omi_label.css('visibility','hidden');
});
@ -37,11 +43,11 @@ $(function(){
});
$omi.blur(function() {
$this = $(this);
if($this.attr('id') == "ol_mb_id" && $this.attr('value') == "") $omi_label.css('visibility','visible');
if($this.attr('id') == "ol_id" && $this.attr('value') == "") $omi_label.css('visibility','visible');
});
$omp.blur(function() {
$this = $(this);
if($this.attr('id') == "ol_mb_pw" && $this.attr('value') == "") $omp_label.css('visibility','visible');
if($this.attr('id') == "ol_pw" && $this.attr('value') == "") $omp_label.css('visibility','visible');
});
$("#auto_login").click(function(){

View File

@ -2,127 +2,132 @@
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
?>
<? if ($stx) { ?>
<? if ($board_count) { ?>
<dl id="sch_result_hd">
<dt>검색어 <strong><?=$stx?></strong>에 대한 결과입니다.</dt>
<dd>
<ul>
<li><span class="span_highlight"><?=$board_count?></span>개의 게시판</li>
<li><span class="span_highlight"><?=number_format($total_count)?></span>개의 게시글</li>
<li>현재 <?=number_format($page)?>/<?=number_format($total_page)?> 페이지 열람 중</li>
</ul>
</dd>
</dl>
<? } ?>
<? } ?>
<?
if ($stx) {
if ($board_count) {
?>
<dl class="sch_result">
<dt>검색결과가 있는 게시판 목록</dt>
<dd>
<ul>
<? if ($onetable) { ?>
<li><a href="?<?=$search_query?>&amp;gr_id=<?=$gr_id?>">전체게시판 검색</a>
<? } ?>
<?=$str_board_list;?>
</ul>
</dd>
</dl>
<?
} else {
?>
<p>검색된 자료가 하나도 없습니다.</p>
<? } } ?>
<hr>
<? if ($stx && $board_count) { ?><dl class="sch_result"><? } ?>
<?
$k=0;
for ($idx=$table_index, $k=0; $idx<count($search_table) && $k<$rows; $idx++) {
$comment_href = "";
?>
<dt><a href="./board.php?bo_table=<?=$search_table[$idx]?>&amp;<?=$search_query?>"><?=$bo_subject[$idx]?></a>에서의 검색결과</dt>
<dd>
<ul>
<?
for ($i=0; $i<count($list[$idx]) && $k<$rows; $i++, $k++) {
if ($list[$idx][$i][wr_is_comment])
{
echo "댓글 ";
$comment_href = "#c_".$list[$idx][$i][wr_id];
}
?>
<li>
<a href="<?=$list[$idx][$i][href]?><?=$comment_href?>"><?=$list[$idx][$i][subject]?></a>
<a href="<?=$list[$idx][$i][href]?><?=$comment_href?>" target="_blank">새창</a>
<p><?=$list[$idx][$i][content]?></p>
<div class="sch_sideview"><?=$list[$idx][$i][name]?></div>
<span class="sch_datetime"><?=$list[$idx][$i][wr_datetime]?></span>
</li>
<? } ?>
</ul>
</dd>
<? } ?>
<? if ($stx && $board_count) { ?></dl><? } ?>
<div class="pg">
<?=$write_pages?>
</div>
<form name="fsearch" method="get" onsubmit="return fsearch_submit(this);">
<input type="hidden" name="srows" value="<?=$srows?>">
<fieldset>
<legend>상세검색</legend>
<?=$group_select?>
<script>document.getElementById("gr_id").value = "<?=$gr_id?>";</script>
<fieldset id="sch_result_detail">
<legend class="sound_only">상세검색</legend>
<?=$group_select?>
<script>document.getElementById("gr_id").value = "<?=$gr_id?>";</script>
<select name="sfl" title="검색조건">
<option value="wr_subject||wr_content">제목+내용</option>
<option value="wr_subject">제목</option>
<option value="wr_content">내용</option>
<option value="mb_id">회원아이디</option>
<option value="wr_name">이름</option>
</select>
<select name="sfl" title="검색조건">
<option value="wr_subject||wr_content">제목+내용</option>
<option value="wr_subject">제목</option>
<option value="wr_content">내용</option>
<option value="mb_id">회원아이디</option>
<option value="wr_name">이름</option>
</select>
<input type="text" name="stx" class="fieldset_input" class="required" value="<?=$text_stx?>" maxlength="20" required title="검색어">
<input type="text" name="stx" class="fieldset_input" class="required" value="<?=$text_stx?>" maxlength="20" required title="검색어">
<input type="submit" class="fieldset_submit" value="검색">
<input type="submit" class="fieldset_submit" value="검색">
<script>
document.fsearch.sfl.value = "<?=$sfl?>";
function fsearch_submit(f)
{
if (f.stx.value.length < 2) {
alert("검색어는 두글자 이상 입력하십시오.");
f.stx.select();
f.stx.focus();
return false;
}
// 검색에 많은 부하가 걸리는 경우 이 주석을 제거하세요.
var cnt = 0;
for (var i=0; i<f.stx.value.length; i++) {
if (f.stx.value.charAt(i) == ' ')
cnt++;
}
if (cnt > 1) {
alert("빠른 검색을 위하여 검색어에 공백은 한개만 입력할 수 있습니다.");
f.stx.select();
f.stx.focus();
return false;
}
f.action = "";
return true;
<script>
document.fsearch.sfl.value = "<?=$sfl?>";
function fsearch_submit(f)
{
if (f.stx.value.length < 2) {
alert("검색어는 두글자 이상 입력하십시오.");
f.stx.select();
f.stx.focus();
return false;
}
</script>
<input type="radio" id="sop_or" name="sop" value="or" <?=($sop == "or") ? "checked" : "";?>> <label for="sop_or">OR</label>
<input type="radio" id="sop_and" name="sop" value="and" <?=($sop == "and") ? "checked" : "";?>> <label for="sop_and">AND</label>
</fieldset>
// 검색에 많은 부하가 걸리는 경우 이 주석을 제거하세요.
var cnt = 0;
for (var i=0; i<f.stx.value.length; i++) {
if (f.stx.value.charAt(i) == ' ')
cnt++;
}
if (cnt > 1) {
alert("빠른 검색을 위하여 검색어에 공백은 한개만 입력할 수 있습니다.");
f.stx.select();
f.stx.focus();
return false;
}
f.action = "";
return true;
}
</script>
<input type="radio" id="sop_or" name="sop" value="or" <?=($sop == "or") ? "checked" : "";?>>
<label for="sop_or">OR</label>
<input type="radio" id="sop_and" name="sop" value="and" <?=($sop == "and") ? "checked" : "";?>>
<label for="sop_and">AND</label>
</fieldset>
</form>
<div id="sch_result">
<? if ($stx) { ?>
<? if ($board_count) { ?>
<dl id="sch_result_hd">
<dt><strong><?=$stx?></strong>에 대한 검색 결과입니다.</dt>
<dd>
<ul>
<li><span style="color:<?=$config['cf_search_color']?>"><?=$board_count?></span>개의 게시판</li>
<li><span style="color:<?=$config['cf_search_color']?>"><?=number_format($total_count)?></span>개의 게시물</li>
<li>현재 <?=number_format($page)?>/<?=number_format($total_page)?> 페이지 열람 중</li>
</ul>
</dd>
</dl>
<? } ?>
<? } ?>
<?
if ($stx) {
if ($board_count) {
?>
<dl id="sch_result_bo">
<dt>검색결과가 있는 게시판 목록</dt>
<dd>
<ul>
<li><a href="?<?=$search_query?>&amp;gr_id=<?=$gr_id?>" <?=$sch_all?>>전체게시판</a>
<?=$str_board_list;?>
</ul>
</dd>
</dl>
<?
} else {
?>
<p>검색된 자료가 하나도 없습니다.</p>
<? } } ?>
<hr>
<? if ($stx && $board_count) { ?><dl id="sch_result_atc"><? } ?>
<?
$k=0;
for ($idx=$table_index, $k=0; $idx<count($search_table) && $k<$rows; $idx++) {
$comment_href = "";
?>
<dt><a href="./board.php?bo_table=<?=$search_table[$idx]?>&amp;<?=$search_query?>"><?=$bo_subject[$idx]?>에서</a></dt>
<dd>
<ul>
<?
for ($i=0; $i<count($list[$idx]) && $k<$rows; $i++, $k++) {
if ($list[$idx][$i][wr_is_comment])
{
echo "댓글 ";
$comment_href = "#c_".$list[$idx][$i][wr_id];
}
?>
<li>
<a href="<?=$list[$idx][$i][href]?><?=$comment_href?>"><b><?=$list[$idx][$i][subject]?></b></a>
<span class="sch_datetime"><?=$list[$idx][$i][wr_datetime]?></span>
<a href="<?=$list[$idx][$i][href]?><?=$comment_href?>" target="_blank">새창</a>
<p><?=$list[$idx][$i][content]?></p>
<div class="sch_sideview"><?=$list[$idx][$i][name]?></div>
</li>
<? } ?>
</ul>
<div class="sch_more"><a href="./board.php?bo_table=<?=$search_table[$idx]?>&amp;<?=$search_query?>"><?=$bo_subject[$idx]?> 더보기</a></div>
</dd>
<? } ?>
<? if ($stx && $board_count) { ?></dl><? } ?>
<div class="pg">
<?=$write_pages?>
</div>
</div>