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

Conflicts:
	adm/board_list.php
	bbs/memo.php
	bbs/memo_form_update.php
	bbs/memo_view.php
	head.sub.php
This commit is contained in:
gnuboard
2013-01-18 10:04:16 +09:00
47 changed files with 743 additions and 534 deletions

4
bbs/_head.sub.php Normal file
View File

@ -0,0 +1,4 @@
<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
include_once($g4['path'].'/head.sub.php');
?>

4
bbs/_tail.sub.php Normal file
View File

@ -0,0 +1,4 @@
<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
include_once($g4['path'].'/tail.sub.php');
?>

View File

@ -21,27 +21,44 @@ include_once($g4['path'].'/head.sub.php');
// 이미지 파일이 아닙니다..gif .jpg .png 파일만 가능합니다.
// 파일만 가능합니다.
// 공백이 없어야 합니다.
$msg2 = str_replace("\\n", "<br>", $msg);
if (!$url) $url = $_SERVER['HTTP_REFERER'];
if($error) {
$header2 = "다음 항목에 오류가 있습니다.";
} else {
$header2 = "다음 내용을 확인해 주세요.";
}
?>
<script>
alert("<? echo $msg; ?>");
document.location.href = "<? echo $url; ?>";
</script>
<noscript>
<article id="validation_check">
<header>
<hgroup>
<!-- <h1>회원가입 정보 입력 확인</h1> --> <!-- 수행 중이던 작업 내용 -->
<h1><?=$header?></h1> <!-- 수행 중이던 작업 내용 -->
<h2>다음 항목<!-- 을 입력하지 않으셨거나 입력 -->에 오류가 있습니다.</h2>
<h2><?=$header2?></h2>
</hgroup>
</header>
<p>
<!-- <strong>항목</strong> 오류내역 -->
<!--
<!--
<strong>이름</strong> 필수 입력입니다. 한글만 입력할 수 있습니다.<br>
<strong>이메일</strong> 올바르게 입력하지 않았습니다.<br>
-->
<?=$msg?>
<?=$msg2?>
</p>
<a href="<?=$url?>">돌아가기</a>
</article>
</noscript>
<?
include_once($g4['path'].'/tail.sub.php');

24
bbs/confirm.php Normal file
View File

@ -0,0 +1,24 @@
<?
include_once('./_common.php');
include_once($g4['path'].'/head.sub.php');
?>
<article id="confirm_check">
<header>
<hgroup>
<h1><? echo $header; ?></h1> <!-- 수행 중이던 작업 내용 -->
<h2>아래 내용을 확인해 주세요.</h2>
</hgroup>
</header>
<p>
<? echo $msg; ?>
</p>
<a href="<? echo $url1; ?>">확인</a>
<a href="<? echo $url2; ?>">취소</a><br><br>
<a href="<? echo $url3; ?>">돌아가기</a>
</article>
<?
include_once($g4['path'].'/tail.sub.php');
?>

View File

@ -15,6 +15,17 @@ $file = sql_fetch($sql);
if (!$file['bf_file'])
alert_close('파일 정보가 존재하지 않습니다.');
// JavaScript 불가일 때
if($confirm != 'yes' && $board['bo_download_point'] < 0) {
$msg = $file['bf_source'].' 파일을 다운로드 하시면 포인트가 차감('.number_format($board['bo_download_point']).'점)됩니다.\\n포인트는 게시물당 한번만 차감되며 다음에 다시 다운로드 하셔도 중복하여 차감하지 않습니다.\\n그래도 다운로드 하시겠습니까?';
$url1 = './download.php?'.$_SERVER['QUERY_STRING'].'&amp;confirm=yes';
$url2 = $_SERVER['HTTP_REFERER'];
//$url1 = 확인link, $url2=취소link
// 특정주소로 이동시키려면 $url3 이용
confirm($msg, $url1, $url2);
}
if ($member['mb_level'] < $board['bo_download_level']) {
$alert_msg = '다운로드 권한이 없습니다.';
if ($member['mb_id'])

View File

@ -1,44 +0,0 @@
<?php
include_once('./_common.php');
include_once($g4['path'].'/head.sub.php');
$no = (int)$no;
// 쿠키에 저장된 ID값과 넘어온 ID값을 비교하여 같지 않을 경우 오류 발생
// 다른곳에서 링크 거는것을 방지하기 위한 코드
if (!get_session('ss_view_'.$bo_table.'_'.$wr_id))
alert('잘못된 접근입니다.');
$sql = " select bf_source from {$g4['board_file_table']} where bo_table = '$bo_table' and wr_id = '$wr_id' and bf_no = '$no' ";
$file = sql_fetch($sql);
$board_href = 'bo_table='.$bo_table;
if($wr_id)
$board_href .= '&amp;wr_id='.$wr_id;
if($qstr)
$board_href .= $qstr;
if($board['bo_download_point'] < 0) {
echo '
<article>
<header>
<hgroup>
<h1>파일다운로드</h1>
<h2>아래 내용을 확인해 주세요.</h2>
</hgroup>
</header>
<p>
'.$file['bf_source'].' 파일을 다운로드 하시면 포인트가 차감('.number_format($board['bo_download_point']).'점)됩니다.<br />
포인트는 게시물당 한번만 차감되며 다음에 다시 다운로드 하셔도 중복하여 차감하지 않습니다.<br />
그래도 다운로드 하시겠습니까?
</p>
<a href="./download.php?'.$_SERVER['QUERY_STRING'].'">파일다운로드</a>
<a href="./board.php?'.$board_href.'">다운로드안함</a>
';
} else {
goto_url('./download.php?'.$_SERVER['QUERY_STRING']);
}
include_once($g4['path'].'/tail.sub.php');
?>

View File

@ -2,7 +2,7 @@
include_once('./_common.php');
$g4['title'] = '로그인';
include_once('./_head.php');
include_once('./_head.sub.php');
$p = parse_url($url);
if ((isset($p['scheme']) && $p['scheme']) ||
@ -50,5 +50,5 @@ else
include_once($member_skin_path.'/login.skin.php');
include_once('./_tail.php');
include_once('./_tail.sub.php');
?>

View File

@ -1,16 +1,21 @@
<?
include_once('./_common.php');
<<<<<<< HEAD
if ($is_guest)
=======
if (!$member[mb_id])
>>>>>>> fca2c7be504cccbd5466136a893f3d3ed875554c
alert_close('회원만 이용하실 수 있습니다.');
$g4['title'] = '내 쪽지함';
include_once($g4['path'].'/head.sub.php');
// 설정일이 지난 메모 삭제
$sql = " delete from {$g4[memo_table]}
where me_recv_mb_id = '{$member[mb_id]}'
and me_send_datetime < '".date("Y-m-d H:i:s", $g4[server_time] - (86400 * $config[cf_memo_del]))."' ";
$sql = " delete from {$g4['memo_table']}
where me_recv_mb_id = '{$member['mb_id']}'
and me_send_datetime < '".date("Y-m-d H:i:s", $g4['server_time'] - (86400 * $config['cf_memo_del']))."' ";
sql_query($sql);
if (!$kind) $kind = 'recv';
@ -22,17 +27,17 @@ else if ($kind == 'send')
else
alert(''.$kind .'값을 넘겨주세요.');
$sql = " select count(*) as cnt from {$g4[memo_table]} where me_{$kind}_mb_id = '{$member[mb_id]}' ";
$sql = " select count(*) as cnt from {$g4['memo_table']} where me_{$kind}_mb_id = '{$member['mb_id']}' ";
$row = sql_fetch($sql);
$total_count = number_format($row[cnt]);
$total_count = number_format($row['cnt']);
if ($kind == 'recv')
{
$kind_title = '받은';
$recv_img = 'on';
$send_img = 'off';
}
else
}
else
{
$kind_title = '보낸';
$recv_img = 'off';
@ -41,41 +46,45 @@ else
$list = array();
$sql = " select a.*, b.mb_id, b.mb_nick, b.mb_email, b.mb_homepage
from {$g4[memo_table]} a
left join {$g4[member_table]} b on (a.me_{$unkind}_mb_id = b.mb_id)
where a.me_{$kind}_mb_id = '{$member[mb_id]}'
$sql = " select a.*, b.mb_id, b.mb_nick, b.mb_email, b.mb_homepage
from {$g4['memo_table']} a
left join {$g4['member_table']} b on (a.me_{$unkind}_mb_id = b.mb_id)
where a.me_{$kind}_mb_id = '{$member['mb_id']}'
order by a.me_id desc ";
$result = sql_query($sql);
for ($i=0; $row=sql_fetch_array($result); $i++)
{
$list[$i] = $row;
$mb_id = $row['me_'.$unkind.'_mb_id'];
$mb_id = $row["me_{$unkind}_mb_id"];
if ($row[mb_nick])
$mb_nick = $row[mb_nick];
if ($row['mb_nick'])
$mb_nick = $row['mb_nick'];
else
$mb_nick = '정보없음';
$name = get_sideview($row[mb_id], $row[mb_nick], $row[mb_email], $row[mb_homepage]);
$name = get_sideview($row['mb_id'], $row['mb_nick'], $row['mb_email'], $row['mb_homepage']);
if (substr($row[me_read_datetime],0,1) == 0)
if (substr($row['me_read_datetime'],0,1) == 0)
$read_datetime = '아직 읽지 않음';
else
$read_datetime = substr($row[me_read_datetime],2,14);
$read_datetime = substr($row['me_read_datetime'],2,14);
$send_datetime = substr($row[me_send_datetime],2,14);
$send_datetime = substr($row['me_send_datetime'],2,14);
$list[$i][name] = $name;
$list[$i][send_datetime] = $send_datetime;
$list[$i][read_datetime] = $read_datetime;
$list[$i][view_href] = './memo_view.php?me_id='.$row[me_id].'&amp;kind='.$kind;
$list[$i][del_href] = './memo_delete.php?me_id='.$row[me_id].'&amp;kind='.$kind;
$list[$i]['name'] = $name;
$list[$i]['send_datetime'] = $send_datetime;
$list[$i]['read_datetime'] = $read_datetime;
$list[$i]['view_href'] = './memo_view.php?me_id='.$row['me_id'].'&amp;kind='.$kind;
$list[$i]['del_href'] = './memo_delete.php?me_id='.$row['me_id'].'&amp;kind='.$kind;
}
echo '<script src="'.$g4['path'].'/js/sideview.js"></script>';
<<<<<<< HEAD
=======
$member_skin_path = $g4['path'].'/skin/member/'.$config['cf_member_skin'];
>>>>>>> fca2c7be504cccbd5466136a893f3d3ed875554c
include_once($member_skin_path.'/memo.skin.php');
include_once($g4['path'].'/tail.sub.php');

View File

@ -2,10 +2,17 @@
define('_CAPTCHA_', 1);
include_once('./_common.php');
<<<<<<< HEAD
if ($is_guest)
alert('회원만 이용하실 수 있습니다.');
if (!chk_captcha()) {
=======
if (!$is_member)
alert('회원만 이용하실 수 있습니다.');
if ($is_guest && !chk_captcha()) {
>>>>>>> fca2c7be504cccbd5466136a893f3d3ed875554c
alert('스팸방지에 입력한 숫자가 틀렸습니다.');
}
@ -15,52 +22,52 @@ $msg = '';
$error_list = array();
$member_list = array();
for ($i=0; $i<count($recv_list); $i++) {
$row = sql_fetch(" select mb_id, mb_nick, mb_open, mb_leave_date, mb_intercept_date from {$g4[member_table]} where mb_id = '{$recv_list[$i]}' ");
$row = sql_fetch(" select mb_id, mb_nick, mb_open, mb_leave_date, mb_intercept_date from {$g4['member_table']} where mb_id = '{$recv_list[$i]}' ");
// 관리자가 아니면서
// 가입된 회원이 아니거나 정보공개를 하지 않았거나 탈퇴한 회원이거나 차단된 회원에게 쪽지를 보내는것은 에러
if ((!$row[mb_id] || !$row[mb_open] || $row[mb_leave_date] || $row[mb_intercept_date]) && !$is_admin) {
if ((!$row['mb_id'] || !$row['mb_open'] || $row['mb_leave_date'] || $row['mb_intercept_date']) && !$is_admin) {
$error_list[] = $recv_list[$i];
} else {
$member_list['id'][] = $row[mb_id];
$member_list['nick'][] = $row[mb_nick];
$member_list['id'][] = $row['mb_id'];
$member_list['nick'][] = $row['mb_nick'];
}
}
$error_msg = implode(",", $error_list);
if ($error_msg && !$is_admin)
alert('회원아이디 \''.$error_msg.'\' 은(는) 존재(또는 정보공개)하지 않는 회원아이디 이거나 탈퇴, 접근차단된 회원아이디 입니다.'.PHP_EOL.PHP_EOL.'쪽지를 발송하지 않았습니다.');
alert('회원아이디 \''.$error_msg.'\' 은(는) 존재(또는 정보공개)하지 않는 회원아이디 이거나 탈퇴, 접근차단된 회원아이디 입니다.\\n\\n쪽지를 발송하지 않았습니다.');
if (!$is_admin) {
if (count($member_list['id'])) {
$point = (int)$config[cf_memo_send_point] * count($member_list['id']);
$point = (int)$config['cf_memo_send_point'] * count($member_list['id']);
if ($point) {
if ($member[mb_point] - $point < 0) {
alert('보유하신 포인트('.number_format($member[mb_point]).'점)가 모자라서 쪽지를 보낼 수 없습니다.');
}
if ($member['mb_point'] - $point < 0) {
alert('보유하신 포인트('.number_format($member['mb_point']).'점)가 모자라서 쪽지를 보낼 수 없습니다.');
}
}
}
}
for ($i=0; $i<count($member_list['id']); $i++) {
$tmp_row = sql_fetch(" select max(me_id) as max_me_id from {$g4[memo_table]} ");
$me_id = $tmp_row[max_me_id] + 1;
$tmp_row = sql_fetch(" select max(me_id) as max_me_id from {$g4['memo_table']} ");
$me_id = $tmp_row['max_me_id'] + 1;
$recv_mb_id = $member_list['id'][$i];
$recv_mb_nick = get_text($member_list['nick'][$i]);
// 쪽지 INSERT
$sql = " insert into $g4[memo_table]
$sql = " insert into {$g4['memo_table']}
( me_id, me_recv_mb_id, me_send_mb_id, me_send_datetime, me_memo )
values ( '{$me_id}', '{$recv_mb_id}', '{$member[mb_id]}', '{$g4[time_ymdhis]}', '{$_POST[me_memo]}' ) ";
values ( '$me_id', '$recv_mb_id', '{$member['mb_id']}', '{$g4['time_ymdhis']}', '{$_POST['me_memo']}' ) ";
sql_query($sql);
// 실시간 쪽지 알림 기능
$sql = " update {$g4[member_table]} set mb_memo_call = '{$member[mb_id]}' where mb_id = '{$recv_mb_id}' ";
$sql = " update {$g4['member_table']} set mb_memo_call = '{$member['mb_id']}' where mb_id = '$recv_mb_id' ";
sql_query($sql);
if (!$is_admin) {
insert_point($member[mb_id], (int)$config[cf_memo_send_point] * (-1), '{$recv_mb_nick}({$recv_mb_id})님께 쪽지 발송', '{@memo}', $recv_mb_id, $me_id);
insert_point($member['mb_id'], (int)$config['cf_memo_send_point'] * (-1), $recv_mb_nick.'('.$recv_mb_id.')님께 쪽지 발송', '{@memo}', $recv_mb_id, $me_id);
}
}

View File

@ -1,27 +1,27 @@
<?
include_once('./_common.php');
if (!$member[mb_id])
if (!$is_member)
alert('회원만 이용하실 수 있습니다.');
if ($kind == 'recv')
if ($kind == 'recv')
{
$t = '받은';
$unkind = 'send';
$sql = " update {$g4[memo_table]}
set me_read_datetime = '{$g4[time_ymdhis]}'
where me_id = '{$me_id}'
and me_recv_mb_id = '{$member[mb_id]}'
$sql = " update {$g4['memo_table']}
set me_read_datetime = '{$g4['time_ymdhis']}'
where me_id = '$me_id'
and me_recv_mb_id = '{$member['mb_id']}'
and me_read_datetime = '0000-00-00 00:00:00' ";
sql_query($sql);
}
else if ($kind == 'send')
}
else if ($kind == 'send')
{
$t = '보낸';
$unkind = 'recv';
}
else
else
{
alert($kind.' 값을 넘겨주세요.');
}
@ -29,22 +29,23 @@ else
$g4['title'] = $t.' 쪽지 보기';
include_once($g4['path'].'/head.sub.php');
$sql = " select * from {$g4[memo_table]}
where me_id = '{$me_id}'
and me_{$kind}_mb_id = '{$member[mb_id]}' ";
$sql = " select * from {$g4['memo_table']}
where me_id = '$me_id'
and me_{$kind}_mb_id = '{$member['mb_id']}' ";
$memo = sql_fetch($sql);
// 이전 쪽지
$sql = " select * from {$g4[memo_table]}
$sql = " select * from {$g4['memo_table']}
where me_id > '{$me_id}'
and me_{$kind}_mb_id = '{$member[mb_id]}'
and me_{$kind}_mb_id = '{$member['mb_id']}'
order by me_id asc
limit 1 ";
$prev = sql_fetch($sql);
if ($prev[me_id])
$prev_link = './memo_view.php?kind='.$kind.'&amp;me_id='.$prev[me_id];
if ($prev['me_id'])
$prev_link = './memo_view.php?kind='.$kind.'&amp;me_id='.$prev['me_id'];
else
$prev_link = 'javascript:alert(\'쪽지의 처음입니다.\');';
//$prev_link = 'javascript:alert(\'쪽지의 처음입니다.\');';
$prev_link = '';
// 다음 쪽지
@ -57,12 +58,17 @@ $next = sql_fetch($sql);
if ($next[me_id])
$next_link = './memo_view.php?kind='.$kind.'&amp;me_id='.$next[me_id];
else
$next_link = 'javascript:alert(\'쪽지의 마지막입니다.\');';
//$next_link = 'javascript:alert(\'쪽지의 마지막입니다.\');';
$next_link = '';
$mb = get_member($memo['me_'.$unkind.'_mb_id']);
echo '<script src="'.$g4['path'].'/js/sideview.js"></script>';
<<<<<<< HEAD
=======
$member_skin_path = $g4['path'].'/skin/member/'.$config['cf_member_skin'];
>>>>>>> fca2c7be504cccbd5466136a893f3d3ed875554c
include_once($member_skin_path.'/memo_view.skin.php');
include_once($g4['path'].'/tail.sub.php');

View File

@ -85,13 +85,20 @@ for ($i=0; $row=sql_fetch_array($result); $i++)
<div class="btn_win btn_confirm">
<input type="submit" id="btn_submit" class="btn_submit" value="<?=$act?>">
<a href="javascript:window.close();" class="btn_cancel">창닫기</a>
</div>
</form>
</div>
<script>
$(function() {
$(".btn_win").append("<a class=\"btn_cancel\">창닫기</a>");
$(".btn_win a").click(function() {
window.close();
});
});
function fboardmoveall_submit(f)
{
var check = false;

View File

@ -104,12 +104,18 @@ for($i=0; $row=sql_fetch_array($result); $i++) {
<div class="pg">
<?=get_paging($config[cf_write_pages], $page, $total_page, $_SERVER[PHP_SELF].'?'.$qstr.'&amp;page=');?>
</div>
<div class="btn_win">
<a href="javascript:window.close();">창닫기</a>
</div>
</div>
<script>
$(function() {
$("#point").append("<div class=\"btn_win\"><a>창닫기</a></div>");
$(".btn_win a").click(function() {
window.close();
});
});
</script>
<?
include_once($g4['path'].'/tail.sub.php');
?>

View File

@ -2,9 +2,12 @@
include_once('./_common.php');
$po = sql_fetch(" select * from {$g4['poll_table']} where po_id = '{$po_id}' ");
if (!$po['po_id'])
if (!$po['po_id'])
alert('설문조사 정보가 없습니다.');
if ($member['mb_level'] < $po['po_level'])
alert('권한 '.$po['po_level'].' 이상의 회원만 결과를 보실 수 있습니다.');
$g4['title'] = '설문조사 결과';
$po_subject = $po['po_subject'];
@ -31,11 +34,11 @@ for ($i=1; $i<=9; $i++) {
$list[$i]['content'] = $poll;
$list[$i]['cnt'] = $po['po_cnt'.$i];
if ($total_po_cnt > 0)
if ($total_po_cnt > 0)
$list[$i]['rate'] = ($list[$i]['cnt'] / $total_po_cnt) * 100;
$bar = (int)($list[$i]['cnt'] / $max * 100);
$list[$i]['bar'] = $bar;
$list[$i]['num'] = $i;
}
@ -54,8 +57,8 @@ for ($i=0; $row=sql_fetch_array($result); $i++) {
$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="'.$g4['bbs_url'].'/poll_etc_update.php?w=d&amp;pc_id='.$row['pc_id'].'&amp;po_id='.$po_id.'\');">';
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&amp;pc_id='.$row['pc_id'].'&amp;po_id='.$po_id.'&amp;skin_dir='.$skin_dir.'">';
}
// 기타의견 입력
@ -63,9 +66,9 @@ $is_etc = false;
if ($po['po_etc']) {
$is_etc = true;
$po_etc = $po['po_etc'];
if ($member['mb_id'])
if ($member['mb_id'])
$name = '<b>'.$member['mb_nick'].'</b> <input type="hidden" name="pc_name" value="'.$member['mb_nick'].'">';
else
else
$name = '<input type="text" name="pc_name" size="10" class="input" required>';
}

View File

@ -12,7 +12,7 @@ if (!($w == '' || $w == 'u')) {
}
if ($w == 'u' && $is_admin == 'super') {
if (file_exists($g4['path'].'/DEMO'))
if (file_exists($g4['path'].'/DEMO'))
alert('데모 화면에서는 하실(보실) 수 없는 작업입니다.');
}
@ -22,6 +22,7 @@ if (!chk_captcha()) {
$mb_id = escape_trim($_POST['mb_id']);
$mb_password = escape_trim($_POST['mb_password']);
$mb_password_re = escape_trim($_POST['mb_password_re']);
$mb_name = escape_trim($_POST['mb_name']);
$mb_nick = escape_trim($_POST['mb_nick']);
$mb_email = escape_trim($_POST['mb_email']);
@ -54,8 +55,10 @@ if ($w == '' || $w == 'u') {
if ($msg = empty_mb_id($mb_id)) alert($msg);
if ($w == '' && !$mb_password)
if ($w == '' && !$mb_password)
alert('패스워드가 넘어오지 않았습니다.');
if($w == '' && $mb_password != $mb_password_re)
alert('패스워드가 일치하지 않습니다.');
if ($msg = empty_mb_name($mb_id)) alert($msg);
if ($msg = empty_mb_nick($mb_nick)) alert($msg);
@ -189,19 +192,19 @@ if ($w == '') {
$mb_md5 = md5($mb_id.$mb_email.$g4['time_ymdhis']);
$certify_href = $g4['url'].'/'.$g4['bbs'].'/email_certify.php?mb_id='.$mb_id.'&amp;mb_md5='.$mb_md5;
ob_start();
include_once ('./register_form_update_mail1.php');
$content = ob_get_contents();
ob_end_clean();
mailer($admin['mb_nick'], $admin['mb_email'], $mb_email, $subject, $content, 1);
}
// 최고관리자님께 메일 발송
if ($config['cf_email_mb_super_admin']) {
$subject = $mb_nick .' 님께서 회원으로 가입하셨습니다.';
ob_start();
include_once ('./register_form_update_mail2.php');
$content = ob_get_contents();
@ -211,7 +214,7 @@ if ($w == '') {
}
// 메일인증 사용하지 않는 경우에만 로그인
if (!$config['cf_use_email_certify'])
if (!$config['cf_use_email_certify'])
set_session('ss_mb_id', $mb_id);
set_session('ss_mb_reg', $mb_id);
@ -290,12 +293,12 @@ if ($w == '') {
$mb_md5 = md5($mb_id.$mb_email.$member['mb_datetime']);
$certify_href = $g4['url'].'/'.$g4['bbs'].'/email_certify.php?mb_id='.$mb_id.'&amp;mb_md5='.$mb_md5;
ob_start();
include_once ('./register_form_update_mail3.php');
$content = ob_get_contents();
ob_end_clean();
mailer($admin['mb_nick'], $admin['mb_email'], $mb_email, $subject, $content, 1);
}
}
@ -305,7 +308,7 @@ if ($w == '') {
@include_once ($g4['path'].'/skin/member/'.$config['cf_member_skin'].'/register_update.skin.php');
if ($msg)
if ($msg)
echo '<script>alert(\''.$msg.'\');</script>';
if ($w == "") {

View File

@ -50,7 +50,7 @@ $notice_array = explode(',', trim($board['bo_notice']));
if ($w == 'u' || $w == 'r') {
$wr = get_write($write_table, $wr_id);
if (!$wr['wr_id']) {
alert("글이 존재하지 않습니다.\\n글이 삭제되었거나 이동하였을 수 있습니다.");
alert("글이 존재하지 않습니다.\\n글이 삭제되었거나 이동하였을 수 있습니다.");
}
}
@ -60,7 +60,6 @@ if (!$is_admin && !$board['bo_use_secret'] && $secret) {
}
// 외부에서 글을 등록할 수 있는 버그가 존재하므로 비밀글 무조건 사용일때는 관리자를 제외(공지)하고 무조건 비밀글로 등록
$secret = '';
if (!$is_admin && $board['bo_use_secret'] == 2) {
$secret = 'secret';
}
@ -146,7 +145,7 @@ if ($w == '' || $w == 'u') {
$reply = $reply_array['wr_reply'] . $reply_char;
} else {
alert('w 값이 제대로 넘어오지 않았습니다.');
alert('w 값이 제대로 넘어오지 않았습니다.');
}
if ($is_guest && !chk_captcha()) {
@ -155,15 +154,15 @@ if ($is_guest && !chk_captcha()) {
if ($w == '' || $w == 'r') {
if (isset($_SESSION['ss_datetime'])) {
if ($_SESSION['ss_datetime'] >= ($g4['server_time'] - $config['cf_delay_sec']) && !$is_admin)
if ($_SESSION['ss_datetime'] >= ($g4['server_time'] - $config['cf_delay_sec']) && !$is_admin)
alert('너무 빠른 시간내에 게시물을 연속해서 올릴 수 없습니다.');
}
set_session("ss_datetime", $g4['server_time']);
}
}
if (!isset($_POST['wr_subject']) || !trim($_POST['wr_subject']))
alert('제목을 입력하여 주십시오.');
if (!isset($_POST['wr_subject']) || !trim($_POST['wr_subject']))
alert('제목을 입력하여 주십시오.');
// 디렉토리가 없다면 생성합니다. (퍼미션도 변경하구요.)
@mkdir($g4['path'].'/data/file/'.$bo_table, 0707);
@ -248,14 +247,14 @@ for ($i=0; $i<count($_FILES['bf_file']['name']); $i++) {
// 접미사를 붙인 파일명
//$upload[$i]['file'] = abs(ip2long($_SERVER['REMOTE_ADDR'])).'_'.substr(md5(uniqid($g4['server_time'])),0,8).'_'.urlencode($filename);
// 달빛온도님 수정 : 한글파일은 urlencode($filename) 처리를 할경우 '%'를 붙여주게 되는데 '%'표시는 미디어플레이어가 인식을 못하기 때문에 재생이 안됩니다. 그래서 변경한 파일명에서 '%'부분을 빼주면 해결됩니다.
//$upload[$i]['file'] = abs(ip2long($_SERVER['REMOTE_ADDR'])).'_'.substr(md5(uniqid($g4['server_time'])),0,8).'_'.str_replace('%', '', urlencode($filename));
// 달빛온도님 수정 : 한글파일은 urlencode($filename) 처리를 할경우 '%'를 붙여주게 되는데 '%'표시는 미디어플레이어가 인식을 못하기 때문에 재생이 안됩니다. 그래서 변경한 파일명에서 '%'부분을 빼주면 해결됩니다.
//$upload[$i]['file'] = abs(ip2long($_SERVER['REMOTE_ADDR'])).'_'.substr(md5(uniqid($g4['server_time'])),0,8).'_'.str_replace('%', '', urlencode($filename));
shuffle($chars_array);
$shuffle = implode('', $chars_array);
// 첨부파일 첨부시 첨부파일명에 공백이 포함되어 있으면 일부 PC에서 보이지 않거나 다운로드 되지 않는 현상이 있습니다. (길상여의 님 090925)
//$upload[$i]['file'] = abs(ip2long($_SERVER['REMOTE_ADDR'])).'_'.substr($shuffle,0,8).'_'.str_replace('%', '', urlencode($filename));
$upload[$i]['file'] = abs(ip2long($_SERVER['REMOTE_ADDR'])).'_'.substr($shuffle,0,8).'_'.str_replace('%', '', urlencode(str_replace(' ', '_', $filename)));
//$upload[$i]['file'] = abs(ip2long($_SERVER['REMOTE_ADDR'])).'_'.substr($shuffle,0,8).'_'.str_replace('%', '', urlencode($filename));
$upload[$i]['file'] = abs(ip2long($_SERVER['REMOTE_ADDR'])).'_'.substr($shuffle,0,8).'_'.str_replace('%', '', urlencode(str_replace(' ', '_', $filename)));
$dest_file = $g4['path'].'/data/file/'.$bo_table.'/'.$upload[$i]['file'];
@ -289,7 +288,7 @@ if ($w == '' || $w == 'r') {
if ($w == 'r') {
// 답변의 원글이 비밀글이라면 패스워드는 원글과 동일하게 넣는다.
if ($secret)
if ($secret)
$wr_password = $wr['wr_password'];
$wr_id = $wr_id . $reply;
@ -300,45 +299,45 @@ if ($w == '' || $w == 'r') {
$wr_reply = '';
}
$sql = " insert into {$write_table}
set wr_num = '{$wr_num}',
wr_reply = '{$wr_reply}',
$sql = " insert into $write_table
set wr_num = '$wr_num',
wr_reply = '$wr_reply',
wr_comment = 0,
ca_name = '{$ca_name}',
wr_option = '{$html},{$secret},{$mail}',
wr_subject = '{$wr_subject}',
wr_content = '{$wr_content}',
wr_link1 = '{$wr_link1}',
wr_link2 = '{$wr_link2}',
ca_name = '$ca_name',
wr_option = '$html,$secret,$mail',
wr_subject = '$wr_subject',
wr_content = '$wr_content',
wr_link1 = '$wr_link1',
wr_link2 = '$wr_link2',
wr_link1_hit = 0,
wr_link2_hit = 0,
wr_hit = 0,
wr_good = 0,
wr_nogood = 0,
mb_id = '{$member['mb_id']}',
wr_password = '{$wr_password}',
wr_name = '{$wr_name}',
wr_email = '{$wr_email}',
wr_homepage = '{$wr_homepage}',
wr_password = '$wr_password',
wr_name = '$wr_name',
wr_email = '$wr_email',
wr_homepage = '$wr_homepage',
wr_datetime = '{$g4['time_ymdhis']}',
wr_last = '{$g4['time_ymdhis']}',
wr_ip = '{$_SERVER['REMOTE_ADDR']}',
wr_1 = '{$wr_1}',
wr_2 = '{$wr_2}',
wr_3 = '{$wr_3}',
wr_4 = '{$wr_4}',
wr_5 = '{$wr_5}',
wr_6 = '{$wr_6}',
wr_7 = '{$wr_7}',
wr_8 = '{$wr_8}',
wr_9 = '{$wr_9}',
wr_10 = '{$wr_10}' ";
wr_1 = '$wr_1',
wr_2 = '$wr_2',
wr_3 = '$wr_3',
wr_4 = '$wr_4',
wr_5 = '$wr_5',
wr_6 = '$wr_6',
wr_7 = '$wr_7',
wr_8 = '$wr_8',
wr_9 = '$wr_9',
wr_10 = '$wr_10' ";
sql_query($sql);
$wr_id = mysql_insert_id();
// 부모 아이디에 UPDATE
sql_query(" update {$write_table} set wr_parent = '{$wr_id}' where wr_id = '{$wr_id}' ");
sql_query(" update $write_table set wr_parent = '$wr_id' 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', '$wr_id', '$wr_id', '$g4['time_ymdhis']' ) ");
@ -444,7 +443,7 @@ if ($w == '' || $w == 'r') {
sql_query($sql);
if ($notice) {
//if (!preg_match("/[^0-9]{0,1}{$wr_id}[\r]{0,1}/",$board['bo_notice']))
//if (!preg_match("/[^0-9]{0,1}{$wr_id}[\r]{0,1}/",$board['bo_notice']))
if (!in_array((int)$wr_id, $notice_array)) {
$bo_notice = $wr_id . '\n' . $board['bo_notice'];
sql_query(" update {$g4['board_table']} set bo_notice = '{$bo_notice}' where bo_table = '{$bo_table}' ");
@ -464,18 +463,18 @@ if ($w == '' || $w == 'r') {
//------------------------------------------------------------------------------
// 가변 파일 업로드
// 나중에 테이블에 저장하는 이유는 $wr_id 값을 저장해야 하기 때문입니다.
for ($i=0; $i<count($upload); $i++)
for ($i=0; $i<count($upload); $i++)
{
if (!get_magic_quotes_gpc()) {
$upload[$i]['source'] = addslashes($upload[$i]['source']);
}
$row = sql_fetch(" select count(*) as cnt from {$g4['board_file_table']} where bo_table = '{$bo_table}' and wr_id = '{$wr_id}' and bf_no = '{$i}' ");
if ($row['cnt'])
if ($row['cnt'])
{
// 삭제에 체크가 있거나 파일이 있다면 업데이트를 합니다.
// 그렇지 않다면 내용만 업데이트 합니다.
if ($upload[$i]['del_check'] || $upload[$i]['file'])
if ($upload[$i]['del_check'] || $upload[$i]['file'])
{
$sql = " update {$g4['board_file_table']}
set bf_source = '{$upload[$i]['source']}',
@ -490,18 +489,18 @@ for ($i=0; $i<count($upload); $i++)
and wr_id = '{$wr_id}'
and bf_no = '{$i}' ";
sql_query($sql);
}
else
}
else
{
$sql = " update {$g4['board_file_table']}
set bf_content = '{$bf_content[$i]}'
set bf_content = '{$bf_content[$i]}'
where bo_table = '{$bo_table}'
and wr_id = '{$wr_id}'
and bf_no = '{$i}' ";
sql_query($sql);
}
}
else
}
else
{
$sql = " insert into {$g4['board_file_table']}
set bo_table = '{$bo_table}',
@ -523,7 +522,7 @@ for ($i=0; $i<count($upload); $i++)
// 업로드된 파일 내용에서 가장 큰 번호를 얻어 거꾸로 확인해 가면서
// 파일 정보가 없다면 테이블의 내용을 삭제합니다.
$row = sql_fetch(" select max(bf_no) as max_bf_no from {$g4['board_file_table']} where bo_table = '{$bo_table}' and wr_id = '{$wr_id}' ");
for ($i=(int)$row['max_bf_no']; $i>=0; $i--)
for ($i=(int)$row['max_bf_no']; $i>=0; $i--)
{
$row2 = sql_fetch(" select bf_file from {$g4['board_file_table']} where bo_table = '{$bo_table}' and wr_id = '{$wr_id}' and bf_no = '{$i}' ");
@ -536,7 +535,7 @@ for ($i=(int)$row['max_bf_no']; $i>=0; $i--)
//------------------------------------------------------------------------------
// 비밀글이라면 세션에 비밀글의 아이디를 저장한다. 자신의 글은 다시 패스워드를 묻지 않기 위함
if ($secret)
if ($secret)
set_session("ss_secret_{$bo_table}_{$wr_num}", TRUE);
// 메일발송 사용 (수정글은 발송하지 않음)