Merge branch 'master' of github.com:gnuboard/g4s
This commit is contained in:
47
bbs/alert_close.php
Normal file
47
bbs/alert_close.php
Normal file
@ -0,0 +1,47 @@
|
||||
<?
|
||||
include_once('./_common.php');
|
||||
include_once($g4['path'].'/head.sub.php');
|
||||
|
||||
$msg2 = str_replace("\\n", "<br>", $msg);
|
||||
|
||||
if($error) {
|
||||
$header2 = "다음 항목에 오류가 있습니다.";
|
||||
$msg3 = "새창을 닫으시고 이전 작업을 다시 시도해 주세요.";
|
||||
} else {
|
||||
$header2 = "다음 내용을 확인해 주세요.";
|
||||
$msg3 = "새창을 닫으신 후 서비스를 이용해 주세요.";
|
||||
}
|
||||
?>
|
||||
|
||||
<script>
|
||||
alert("<? echo $msg; ?>");
|
||||
window.close();
|
||||
</script>
|
||||
|
||||
<noscript>
|
||||
<article id="validation_check">
|
||||
<header>
|
||||
<hgroup>
|
||||
<!-- <h1>회원가입 정보 입력 확인</h1> --> <!-- 수행 중이던 작업 내용 -->
|
||||
<h1><?=$header?></h1> <!-- 수행 중이던 작업 내용 -->
|
||||
<h2><?=$header2?></h2>
|
||||
</hgroup>
|
||||
</header>
|
||||
<p>
|
||||
<!-- <strong>항목</strong> 오류내역 -->
|
||||
<!--
|
||||
<strong>이름</strong> 필수 입력입니다. 한글만 입력할 수 있습니다.<br>
|
||||
<strong>이메일</strong> 올바르게 입력하지 않았습니다.<br>
|
||||
-->
|
||||
<?=$msg2?>
|
||||
</p>
|
||||
<p>
|
||||
<?=$msg3?>
|
||||
</p>
|
||||
|
||||
</article>
|
||||
</noscript>
|
||||
|
||||
<?
|
||||
include_once($g4['path'].'/tail.sub.php');
|
||||
?>
|
||||
@ -66,5 +66,5 @@ for ($i=0; $i<count($member_list['id']); $i++) {
|
||||
|
||||
$str_nick_list = implode(',', $member_list['nick']);
|
||||
|
||||
alert($str_nick_list.' 님께 쪽지를 전달하였습니다.', './memo.php?kind=send');
|
||||
alert($str_nick_list.' 님께 쪽지를 전달하였습니다.', './memo.php?kind=send', false);
|
||||
?>
|
||||
@ -2,12 +2,15 @@
|
||||
include_once('./_common.php');
|
||||
|
||||
$po = sql_fetch(" select * from {$g4['poll_table']} where po_id = '{$_POST['po_id']}' ");
|
||||
if (!$po['po_id'])
|
||||
if (!$po['po_id'])
|
||||
alert('po_id 값이 제대로 넘어오지 않았습니다.');
|
||||
|
||||
if ($member['mb_level'] < $po['po_level'])
|
||||
if ($member['mb_level'] < $po['po_level'])
|
||||
alert_close('권한 '.$po['po_level'].' 이상 회원만 투표에 참여하실 수 있습니다.');
|
||||
|
||||
if(!$gb_poll)
|
||||
alert_close('항목을 선택하세요.');
|
||||
|
||||
// 쿠키에 저장된 투표번호가 없다면
|
||||
if (get_cookie('ck_po_id') != $po['po_id']) {
|
||||
// 투표했던 ip들 중에서 찾아본다
|
||||
|
||||
@ -45,7 +45,7 @@ if ($w == '') {
|
||||
if ($is_member) {
|
||||
$tmp_point = ($member['mb_point'] > 0) ? $member['mb_point'] : 0;
|
||||
if ($tmp_point + $board['bo_write_point'] < 0 && !$is_admin) {
|
||||
alert('보유하신 포인트('.number_format($member['mb_point']).')가 없거나 모자라서 글쓰기('.number_format($board['bo_write_point']).')가 불가합니다.'.PHP_EOL.PHP_EOL.'포인트를 적립하신 후 다시 글쓰기 해 주십시오.');
|
||||
alert('보유하신 포인트('.number_format($member['mb_point']).')가 없거나 모자라서 글쓰기('.number_format($board['bo_write_point']).')가 불가합니다.\\n\\n포인트를 적립하신 후 다시 글쓰기 해 주십시오.');
|
||||
}
|
||||
}
|
||||
|
||||
@ -59,7 +59,7 @@ if ($w == '') {
|
||||
if ($member['mb_id']) {
|
||||
alert('글을 수정할 권한이 없습니다.');
|
||||
} else {
|
||||
alert('글을 수정할 권한이 없습니다.'.PHP_EOL.PHP_EOL.'회원이시라면 로그인 후 이용해 보십시오.', './login.php?'.$qstr.'&url='.urlencode($_SERVER['PHP_SELF'].'?bo_table='.$bo_table));
|
||||
alert('글을 수정할 권한이 없습니다.\\n\\n회원이시라면 로그인 후 이용해 보십시오.', './login.php?'.$qstr.'&url='.urlencode($_SERVER['PHP_SELF'].'?bo_table='.$bo_table));
|
||||
}
|
||||
}
|
||||
|
||||
@ -75,7 +75,7 @@ if ($w == '') {
|
||||
and wr_is_comment = 0 ";
|
||||
$row = sql_fetch($sql);
|
||||
if ($row['cnt'] && !$is_admin)
|
||||
alert('이 글과 관련된 답변글이 존재하므로 수정 할 수 없습니다.'.PHP_EOL.PHP_EOL.'답변글이 있는 원글은 수정할 수 없습니다.');
|
||||
alert('이 글과 관련된 답변글이 존재하므로 수정 할 수 없습니다.\\n\\n답변글이 있는 원글은 수정할 수 없습니다.');
|
||||
|
||||
// 코멘트 달린 원글의 수정 여부
|
||||
$sql = " select count(*) as cnt from {$write_table}
|
||||
@ -84,7 +84,7 @@ if ($w == '') {
|
||||
and wr_is_comment = 1 ";
|
||||
$row = sql_fetch($sql);
|
||||
if ($row['cnt'] >= $board['bo_count_modify'] && !$is_admin)
|
||||
alert('이 글과 관련된 코멘트가 존재하므로 수정 할 수 없습니다.'.PHP_EOL.PHP_EOL.'코멘트가 '.$board['bo_count_modify'].'건 이상 달린 원글은 수정할 수 없습니다.');
|
||||
alert('이 글과 관련된 코멘트가 존재하므로 수정 할 수 없습니다.\\n\\n코멘트가 '.$board['bo_count_modify'].'건 이상 달린 원글은 수정할 수 없습니다.');
|
||||
|
||||
$title_msg = '글수정';
|
||||
} else if ($w == 'r') {
|
||||
@ -92,12 +92,12 @@ if ($w == '') {
|
||||
if ($member['mb_id'])
|
||||
alert('글을 답변할 권한이 없습니다.');
|
||||
else
|
||||
alert('글을 답변할 권한이 없습니다.'.PHP_EOL.PHP_EOL.'회원이시라면 로그인 후 이용해 보십시오.', './login.php?$qstr&url='.urlencode($_SERVER['PHP_SELF'].'?bo_table='.$bo_table));
|
||||
alert('글을 답변할 권한이 없습니다.\\n\\n회원이시라면 로그인 후 이용해 보십시오.', './login.php?$qstr&url='.urlencode($_SERVER['PHP_SELF'].'?bo_table='.$bo_table));
|
||||
}
|
||||
|
||||
$tmp_point = isset($member['mb_point']) ? $member['mb_point'] : 0;
|
||||
if ($tmp_point + $board['bo_write_point'] < 0 && !$is_admin)
|
||||
alert('보유하신 포인트('.number_format($member['mb_point']).')가 없거나 모자라서 글답변('.number_format($board['bo_comment_point']).')가 불가합니다.'.PHP_EOL.PHP_EOL.'포인트를 적립하신 후 다시 글답변 해 주십시오.');
|
||||
alert('보유하신 포인트('.number_format($member['mb_point']).')가 없거나 모자라서 글답변('.number_format($board['bo_comment_point']).')가 불가합니다.\\n\\n포인트를 적립하신 후 다시 글답변 해 주십시오.');
|
||||
|
||||
//if (preg_match("/[^0-9]{0,1}{$wr_id}[\r]{0,1}/",$board['bo_notice']))
|
||||
if (in_array((int)$wr_id, $notice_array))
|
||||
@ -128,7 +128,7 @@ if ($w == '') {
|
||||
|
||||
// 최대 답변은 테이블에 잡아놓은 wr_reply 사이즈만큼만 가능합니다.
|
||||
if (strlen($reply_array['wr_reply']) == 10)
|
||||
alert('더 이상 답변하실 수 없습니다.'.PHP_EOL.PHP_EOL.'답변은 10단계 까지만 가능합니다.');
|
||||
alert('더 이상 답변하실 수 없습니다.\\n\\n답변은 10단계 까지만 가능합니다.');
|
||||
|
||||
$reply_len = strlen($reply_array['wr_reply']) + 1;
|
||||
if ($board['bo_reply_order']) {
|
||||
@ -148,7 +148,7 @@ if ($w == '') {
|
||||
if (!$row['reply'])
|
||||
$reply_char = $begin_reply_char;
|
||||
else if ($row['reply'] == $end_reply_char) // A~Z은 26 입니다.
|
||||
alert('더 이상 답변하실 수 없습니다.'.PHP_EOL.PHP_EOL.'답변은 26개 까지만 가능합니다.');
|
||||
alert('더 이상 답변하실 수 없습니다.\\n\\n답변은 26개 까지만 가능합니다.');
|
||||
else
|
||||
$reply_char = chr(ord($row['reply']) + $reply_number);
|
||||
|
||||
@ -170,7 +170,7 @@ if (!empty($group['gr_use_access'])) {
|
||||
$sql = " select gr_id from {$g4['group_member_table']} where gr_id = '{$board['gr_id']}' and mb_id = '{$member['mb_id']}' ";
|
||||
$row = sql_fetch($sql);
|
||||
if (!$row['gr_id'])
|
||||
alert('접근 권한이 없으므로 글쓰기가 불가합니다.'.PHP_EOL.PHP_EOL.'궁금하신 사항은 관리자에게 문의 바랍니다.');
|
||||
alert('접근 권한이 없으므로 글쓰기가 불가합니다.\\n\\n궁금하신 사항은 관리자에게 문의 바랍니다.');
|
||||
}
|
||||
}
|
||||
|
||||
@ -324,11 +324,11 @@ if ($w == '') {
|
||||
$content = $board['bo_insert_content'];
|
||||
} else if ($w == 'r') {
|
||||
if (!strstr($write['wr_option'], 'html')) {
|
||||
$content = "\\n\\n\\n > "
|
||||
."\\n > "
|
||||
."\\n > ".preg_replace("/\n/", "\n> ", get_text($write['wr_content'], 0))
|
||||
."\\n > "
|
||||
."\\n > ";
|
||||
$content = "\n\n\n > "
|
||||
."\n > "
|
||||
."\n > ".preg_replace("/\n/", "\n> ", get_text($write['wr_content'], 0))
|
||||
."\n > "
|
||||
."\n > ";
|
||||
|
||||
}
|
||||
} else {
|
||||
@ -343,7 +343,7 @@ if ($width <= 100)
|
||||
|
||||
$captcha_html = "";
|
||||
if ($is_guest) {
|
||||
$captcha_html = captcha_html();
|
||||
$captcha_html = captcha_html();
|
||||
}
|
||||
|
||||
include_once($g4['path'].'/head.sub.php');
|
||||
|
||||
@ -142,13 +142,21 @@ function alert($msg='', $url='', $error=true)
|
||||
|
||||
|
||||
// 경고메세지 출력후 창을 닫음
|
||||
function alert_close($msg)
|
||||
function alert_close($msg, $error=true)
|
||||
{
|
||||
global $g4;
|
||||
|
||||
/*
|
||||
echo "<meta http-equiv=\"content-type\" content=\"text/html; charset={$g4['charset']}\">";
|
||||
echo "<script> alert('$msg'); window.close(); </script>";
|
||||
exit;
|
||||
*/
|
||||
$header = '';
|
||||
if (isset($g4['title'])) {
|
||||
$header = $g4['title'];
|
||||
}
|
||||
include_once("{$g4['bbs_path']}/alert_close.php");
|
||||
exit;
|
||||
}
|
||||
|
||||
// confirm 창
|
||||
|
||||
@ -140,7 +140,7 @@ var char_max = parseInt(<?=$comment_max?>); // 최대
|
||||
var subject = "";
|
||||
var content = "";
|
||||
$.ajax({
|
||||
url: bbs_path+"/filter.ajax.php",
|
||||
url: g4_bbs_path+"/filter.ajax.php",
|
||||
type: "POST",
|
||||
data: {
|
||||
"subject": "",
|
||||
|
||||
Reference in New Issue
Block a user