그누보드 [G5] 전체쪽지 보내기
페이지 정보
본문
레벨(등급)에 해당하는 회원에게 일괄 쪽지를 보내는 방법입니다.
Ⅰ. 그누보드 5.3
1. 그누보드5.3 / bbs / memo_allform.php 만들기
<?php
include_once('./_common.php');
include_once(G5_CAPTCHA_PATH.'/captcha.lib.php');
if ($is_admin != 'super') {
alert_close('관리자만 이용하실 수 있습니다.');
exit;
}
$content = "";
// 탈퇴한 회원에게 쪽지 보낼 수 없음
if ($me_recv_mb_id)
{
$mb = get_member($me_recv_mb_id);
if (!$mb['mb_id'])
alert_close('회원정보가 존재하지 않습니다.\\n\\n탈퇴하였을 수 있습니다.');
if (!$mb['mb_open'] && $is_admin != 'super')
alert_close('정보공개를 하지 않았습니다.');
// 4.00.15
$row = sql_fetch(" select me_memo from {$g5['memo_table']} where me_id = '{$me_id}' and (me_recv_mb_id = '{$member['mb_id']}' or me_send_mb_id = '{$member['mb_id']}') ");
if ($row['me_memo'])
{
$content = "\n\n\n".' >'
."\n".' >'
."\n".' >'.str_replace("\n", "\n> ", get_text($row['me_memo'], 0))
."\n".' >'
.' >';
}
}
$g5['title'] = '쪽지 보내기';
include_once(G5_PATH.'/head.sub.php');
$memo_action_url = G5_HTTPS_BBS_URL."/memo_form_update.php";
include_once($member_skin_path.'/memo_allform.skin.php');
include_once(G5_PATH.'/tail.sub.php');
?>
2. 그누보드5.3 / skin / member / 폴더 / memo_allform.skin.php 만들기
<?php
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
if ($is_admin != 'super') {
alert_close('관리자만 이용하실 수 있습니다.');
exit;
}
$qryAll = sql_query("select mb_id from {$g5['member_table']} where mb_level>='2' order by mb_name");
while($row = sql_fetch_array($qryAll)){
$me_recv_mb_idAll .= $deliAll.$row['mb_id'];
$deliAll = ',';
};
$qry2 = sql_query("select mb_id from {$g5['member_table']} where mb_level='2' order by mb_name");
while($row2 = sql_fetch_array($qry2)){
$me_recv_mb_id2 .= $deli2.$row2['mb_id'];
$deli2 = ',';
};
$qry3 = sql_query("select mb_id from {$g5['member_table']} where mb_level='3' order by mb_name");
while($row3 = sql_fetch_array($qry3)){
$me_recv_mb_id3 .= $deli3.$row3['mb_id'];
$deli3 = ',';
};
$qry4 = sql_query("select mb_id from {$g5['member_table']} where mb_level='4' order by mb_name");
while($row4 = sql_fetch_array($qry4)){
$me_recv_mb_id4 .= $deli4.$row4['mb_id'];
$deli4 = ',';
};
$qry5 = sql_query("select mb_id from {$g5['member_table']} where mb_level='5' order by mb_name");
while($row5 = sql_fetch_array($qry5)){
$me_recv_mb_id5 .= $deli5.$row5['mb_id'];
$deli5 = ',';
};
$qry6 = sql_query("select mb_id from {$g5['member_table']} where mb_level='6' order by mb_name");
while($row6 = sql_fetch_array($qry6)){
$me_recv_mb_id6 .= $deli6.$row6['mb_id'];
$deli6 = ',';
};
$qry7 = sql_query("select mb_id from {$g5['member_table']} where mb_level='7' order by mb_name");
while($row7 = sql_fetch_array($qry7)){
$me_recv_mb_id7 .= $deli7.$row7['mb_id'];
$deli7 = ',';
};
$qry8 = sql_query("select mb_id from {$g5['member_table']} where mb_level='8' order by mb_name");
while($row8 = sql_fetch_array($qry8)){
$me_recv_mb_id8 .= $deli8.$row8['mb_id'];
$deli8 = ',';
};
$qry9 = sql_query("select mb_id from {$g5['member_table']} where mb_level='9' order by mb_name");
while($row9 = sql_fetch_array($qry9)){
$me_recv_mb_id9 .= $deli9.$row9['mb_id'];
$deli9 = ',';
};
$qry10 = sql_query("select mb_id from {$g5['member_table']} where mb_level='10' order by mb_name");
while($row10 = sql_fetch_array($qry10)){
$me_recv_mb_id10 .= $deli10.$row10['mb_id'];
$deli10 = ',';
};
// add_stylesheet('css 구문', 출력순서); 숫자가 작을 수록 먼저 출력됨
add_stylesheet('<link rel="stylesheet" href="{$member_skin_url}/style.css">', 0);
?>
<style>
<?php if ($is_admin) {?>
.new_win .win_ul li{width:25%;}
<?php } ?>
</style>
<!-- 쪽지 보내기 시작 { -->
<div id="memo_write" class="new_win">
<h1 id="win_title"><i class="fa fa-envelope-o" aria-hidden="true"></i> 전체쪽지 보내기</h1>
<div class="new_win_con">
<ul class="win_ul">
<li><a href="<?php echo G5_BBS_URL; ?>/memo.php?kind=recv">받은쪽지</a></li>
<li><a href="<?php echo G5_BBS_URL; ?>/memo.php?kind=send">보낸쪽지</a></li>
<li><a href="<?php echo G5_BBS_URL; ?>/memo_form.php">쪽지쓰기</a></li>
<li class="selected"><a href="<?php echo G5_BBS_URL; ?>/memo_allform.php?kind=allform">전체쪽지</a></li>
</ul>
<form name="fmemoform" action="<?php echo $memo_action_url; ?>" onsubmit="return fmemoform_submit(this);" method="post" autocomplete="off">
<div class="form_01">
<h2 class="sound_only">쪽지쓰기</h2>
<ul>
<li>
<label for="me_recv_mb_id" class="sound_only">받는 회원레벨<strong class="sound_only">필수</strong></label>
<select name="me_recv_mb_id" id="me_recv_mb_id" class="frm_input">
<option value="<?php echo $me_recv_mb_idAll; ?>">레벨2~레벨10</option>
<option value="<?php echo $me_recv_mb_id2; ?>">레벨2</option>
<option value="<?php echo $me_recv_mb_id3; ?>">레벨3</option>
<option value="<?php echo $me_recv_mb_id4; ?>">레벨4</option>
<option value="<?php echo $me_recv_mb_id5; ?>">레벨5</option>
<option value="<?php echo $me_recv_mb_id6; ?>">레벨6</option>
<option value="<?php echo $me_recv_mb_id7; ?>">레벨7</option>
<option value="<?php echo $me_recv_mb_id8; ?>">레벨8</option>
<option value="<?php echo $me_recv_mb_id9; ?>">레벨9</option>
<option value="<?php echo $me_recv_mb_id10; ?>">레벨10</option>
</select>
</li>
<li>
<label for="me_memo" class="sound_only">내용</label>
<textarea name="me_memo" id="me_memo" required class="required"><?php echo $content ?></textarea>
</li>
<li>
<span class="sound_only">자동등록방지</span>
<?php echo captcha_html(); ?>
</li>
</ul>
</div>
<div class="win_btn">
<input type="submit" value="보내기" id="btn_submit" class="btn_submit">
<button type="button" onclick="window.close();" class="btn_close">창닫기</button>
</div>
</div>
</form>
</div>
<script>
function fmemoform_submit(f)
{
<?php echo chk_captcha_js(); ?>
return true;
}
</script>
<!-- } 쪽지 보내기 끝 -->
3-1. 그누보드5.3 / 수정
그누보드5.3 / skin / member / 폴더 / memo.skin.php
그누보드5.3 / skin / member / 폴더 / memo_form.skin.php
그누보드5.3 / skin / member / 폴더 / memo_view.skin.php
add_stylesheet('<link rel="stylesheet" href="'.$member_skin_url.'/style.css">', 0);
?>
아래에 아래와 같이 style 추가
add_stylesheet('<link rel="stylesheet" href="'.$member_skin_url.'/style.css">', 0);
?>
<style>
<?php if ($is_admin) {?>
.new_win .win_ul li{width:25%;}
<?php } ?>
</style>
3-2. 그누보드5.3 / 수정
그누보드5.3 / skin / member / 폴더 / memo.skin.php
그누보드5.3 / skin / member / 폴더 / memo_form.skin.php
그누보드5.3 / skin / member / 폴더 / memo_view.skin.php
메뉴를 추가합니다.
<?php if ($is_admin) {?>
<li><a href="<?php echo G5_BBS_URL; ?>/memo_allform.php?kind=allform">전체쪽지</a></li>
<?php } ?>
Ⅱ. 그누보드 5.2
1. 그누보드5.2 / bbs / memo_allform.php 만들기
<?php
include_once('./_common.php');
include_once(G5_CAPTCHA_PATH.'/captcha.lib.php');
if ($is_admin != 'super') {
alert_close('관리자만 이용하실 수 있습니다.');
exit;
}
$content = "";
// 탈퇴한 회원에게 쪽지 보낼 수 없음
if ($me_recv_mb_id)
{
$mb = get_member($me_recv_mb_id);
if (!$mb['mb_id'])
alert_close('회원정보가 존재하지 않습니다.\\n\\n탈퇴하였을 수 있습니다.');
if (!$mb['mb_open'] && $is_admin != 'super')
alert_close('정보공개를 하지 않았습니다.');
// 4.00.15
$row = sql_fetch(" select me_memo from ".$g5['memo_table']." where me_id = '".$me_id."' and (me_recv_mb_id = '".$member['mb_id']."' or me_send_mb_id = '".$member['mb_id']."') ");
if ($row['me_memo'])
{
$content = "\n\n\n".' >'
."\n".' >'
."\n".' >'.str_replace("\n", "\n> ", get_text($row['me_memo'], 0))
."\n".' >'
.' >';
}
}
$g5['title'] = '쪽지 보내기';
include_once(G5_PATH.'/head.sub.php');
$memo_action_url = G5_HTTPS_BBS_URL."/memo_form_update.php";
include_once($member_skin_path.'/memo_allform.skin.php');
include_once(G5_PATH.'/tail.sub.php');
?>
2. 그누보드5.2 / skin / member / 폴더 / memo_allform.skin.php 만들기
<?php
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
if ($is_admin != 'super') {
alert_close('관리자만 이용하실 수 있습니다.');
exit;
}
$qryAll = sql_query("select mb_id from {$g5['member_table']} where mb_level>='2' order by mb_name");
while($row = sql_fetch_array($qryAll)){
$me_recv_mb_idAll .= $deliAll.$row['mb_id'];
$deliAll = ',';
};
$qry2 = sql_query("select mb_id from {$g5['member_table']} where mb_level='2' order by mb_name");
while($row2 = sql_fetch_array($qry2)){
$me_recv_mb_id2 .= $deli2.$row2['mb_id'];
$deli2 = ',';
};
$qry3 = sql_query("select mb_id from {$g5['member_table']} where mb_level='3' order by mb_name");
while($row3 = sql_fetch_array($qry3)){
$me_recv_mb_id3 .= $deli3.$row3['mb_id'];
$deli3 = ',';
};
$qry4 = sql_query("select mb_id from {$g5['member_table']} where mb_level='4' order by mb_name");
while($row4 = sql_fetch_array($qry4)){
$me_recv_mb_id4 .= $deli4.$row4['mb_id'];
$deli4 = ',';
};
$qry5 = sql_query("select mb_id from {$g5['member_table']} where mb_level='5' order by mb_name");
while($row5 = sql_fetch_array($qry5)){
$me_recv_mb_id5 .= $deli5.$row5['mb_id'];
$deli5 = ',';
};
$qry6 = sql_query("select mb_id from {$g5['member_table']} where mb_level='6' order by mb_name");
while($row6 = sql_fetch_array($qry6)){
$me_recv_mb_id6 .= $deli6.$row6['mb_id'];
$deli6 = ',';
};
$qry7 = sql_query("select mb_id from {$g5['member_table']} where mb_level='7' order by mb_name");
while($row7 = sql_fetch_array($qry7)){
$me_recv_mb_id7 .= $deli7.$row7['mb_id'];
$deli7 = ',';
};
$qry8 = sql_query("select mb_id from {$g5['member_table']} where mb_level='8' order by mb_name");
while($row8 = sql_fetch_array($qry8)){
$me_recv_mb_id8 .= $deli8.$row8['mb_id'];
$deli8 = ',';
};
$qry9 = sql_query("select mb_id from {$g5['member_table']} where mb_level='9' order by mb_name");
while($row9 = sql_fetch_array($qry9)){
$me_recv_mb_id9 .= $deli9.$row9['mb_id'];
$deli9 = ',';
};
$qry10 = sql_query("select mb_id from {$g5['member_table']} where mb_level='10' order by mb_name");
while($row10 = sql_fetch_array($qry10)){
$me_recv_mb_id10 .= $deli10.$row10['mb_id'];
$deli10 = ',';
};
// add_stylesheet('css 구문', 출력순서); 숫자가 작을 수록 먼저 출력됨
add_stylesheet('<link rel="stylesheet" href="'.$member_skin_url.'/style.css">', 0);
?>
<!-- 쪽지 보내기 시작 { -->
<div id="memo_write" class="new_win mbskin">
<h1 id="win_title">전체쪽지 보내기</h1>
<ul class="win_ul">
<li><a href="<?php echo G5_BBS_URL; ?>/memo.php?kind=recv">받은쪽지</a></li>
<li><a href="<?php echo G5_BBS_URL; ?>/memo.php?kind=send">보낸쪽지</a></li>
<li><a href="<?php echo G5_BBS_URL; ?>/memo_form.php">쪽지쓰기</a></li>
<?php if ($is_admin) {?>
<li class="selected"><a href="<?php echo G5_BBS_URL; ?>/memo_allform.php?kind=allform">전체쪽지</a></li>
<?php } ?>
</ul>
<form name="fmemoform" action="<?php echo $memo_action_url; ?>" onsubmit="return fmemoform_submit(this);" method="post" autocomplete="off">
<div class="tbl_frm01 tbl_wrap">
<table>
<caption>쪽지쓰기</caption>
<tbody>
<tr>
<th scope="row"><label for="me_recv_mb_id">받는 회원아이디<strong class="sound_only">필수</strong></label></th>
<td>
<!--input type="text" name="me_recv_mb_id" value="<?php echo $me_recv_mb_id ?>" id="me_recv_mb_id" required class="frm_input required" size="47"-->
<select name="me_recv_mb_id" id="me_recv_mb_id" class="frm_input">
<option value="<?php echo $me_recv_mb_idAll; ?>">전체 (레벨2~레벨10)</option>
<option value="<?php echo $me_recv_mb_id2; ?>">레벨2</option>
<option value="<?php echo $me_recv_mb_id3; ?>">레벨3</option>
<option value="<?php echo $me_recv_mb_id4; ?>">레벨4</option>
<option value="<?php echo $me_recv_mb_id5; ?>">레벨5</option>
<option value="<?php echo $me_recv_mb_id6; ?>">레벨6</option>
<option value="<?php echo $me_recv_mb_id7; ?>">레벨7</option>
<option value="<?php echo $me_recv_mb_id8; ?>">레벨8</option>
<option value="<?php echo $me_recv_mb_id9; ?>">레벨9</option>
<option value="<?php echo $me_recv_mb_id10; ?>">레벨10</option>
</select>
<span class="frm_info">여러 회원에게 보낼때는 컴마(,)로 구분하세요.</span>
</td>
</tr>
<tr>
<th scope="row"><label for="me_memo">내용</label></th>
<td><textarea name="me_memo" id="me_memo" required class="required"><?php echo $content ?></textarea></td>
</tr>
<tr>
<th scope="row">자동등록방지</th>
<td>
<?php echo captcha_html(); ?>
</td>
</tr>
</tbody>
</table>
</div>
<div class="win_btn">
<input type="submit" value="보내기" id="btn_submit" class="btn_submit">
<button type="button" onclick="window.close();">창닫기</button>
</div>
</form>
</div>
<script>
function fmemoform_submit(f)
{
<?php echo chk_captcha_js(); ?>
return true;
}
</script>
<!-- } 쪽지 보내기 끝 -->
3. 그누보드5.2 / 수정
그누보드5 / skin / member / 폴더 / memo.skin.php
그누보드5 / skin / member / 폴더 / memo_form.skin.php
그누보드5 / skin / member / 폴더 / memo_view.skin.php
메뉴를 추가합니다.
<?php if ($is_admin) {?>
<li><a href="<?php echo G5_BBS_URL; ?>/memo_allform.php?kind=allform">전체쪽지</a></li>
<?php } ?>
참고자료
https://sir.kr/g5_skin/13111
Ⅰ. 그누보드 5.3
1. 그누보드5.3 / bbs / memo_allform.php 만들기
<?php
include_once('./_common.php');
include_once(G5_CAPTCHA_PATH.'/captcha.lib.php');
if ($is_admin != 'super') {
alert_close('관리자만 이용하실 수 있습니다.');
exit;
}
$content = "";
// 탈퇴한 회원에게 쪽지 보낼 수 없음
if ($me_recv_mb_id)
{
$mb = get_member($me_recv_mb_id);
if (!$mb['mb_id'])
alert_close('회원정보가 존재하지 않습니다.\\n\\n탈퇴하였을 수 있습니다.');
if (!$mb['mb_open'] && $is_admin != 'super')
alert_close('정보공개를 하지 않았습니다.');
// 4.00.15
$row = sql_fetch(" select me_memo from {$g5['memo_table']} where me_id = '{$me_id}' and (me_recv_mb_id = '{$member['mb_id']}' or me_send_mb_id = '{$member['mb_id']}') ");
if ($row['me_memo'])
{
$content = "\n\n\n".' >'
."\n".' >'
."\n".' >'.str_replace("\n", "\n> ", get_text($row['me_memo'], 0))
."\n".' >'
.' >';
}
}
$g5['title'] = '쪽지 보내기';
include_once(G5_PATH.'/head.sub.php');
$memo_action_url = G5_HTTPS_BBS_URL."/memo_form_update.php";
include_once($member_skin_path.'/memo_allform.skin.php');
include_once(G5_PATH.'/tail.sub.php');
?>
2. 그누보드5.3 / skin / member / 폴더 / memo_allform.skin.php 만들기
<?php
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
if ($is_admin != 'super') {
alert_close('관리자만 이용하실 수 있습니다.');
exit;
}
$qryAll = sql_query("select mb_id from {$g5['member_table']} where mb_level>='2' order by mb_name");
while($row = sql_fetch_array($qryAll)){
$me_recv_mb_idAll .= $deliAll.$row['mb_id'];
$deliAll = ',';
};
$qry2 = sql_query("select mb_id from {$g5['member_table']} where mb_level='2' order by mb_name");
while($row2 = sql_fetch_array($qry2)){
$me_recv_mb_id2 .= $deli2.$row2['mb_id'];
$deli2 = ',';
};
$qry3 = sql_query("select mb_id from {$g5['member_table']} where mb_level='3' order by mb_name");
while($row3 = sql_fetch_array($qry3)){
$me_recv_mb_id3 .= $deli3.$row3['mb_id'];
$deli3 = ',';
};
$qry4 = sql_query("select mb_id from {$g5['member_table']} where mb_level='4' order by mb_name");
while($row4 = sql_fetch_array($qry4)){
$me_recv_mb_id4 .= $deli4.$row4['mb_id'];
$deli4 = ',';
};
$qry5 = sql_query("select mb_id from {$g5['member_table']} where mb_level='5' order by mb_name");
while($row5 = sql_fetch_array($qry5)){
$me_recv_mb_id5 .= $deli5.$row5['mb_id'];
$deli5 = ',';
};
$qry6 = sql_query("select mb_id from {$g5['member_table']} where mb_level='6' order by mb_name");
while($row6 = sql_fetch_array($qry6)){
$me_recv_mb_id6 .= $deli6.$row6['mb_id'];
$deli6 = ',';
};
$qry7 = sql_query("select mb_id from {$g5['member_table']} where mb_level='7' order by mb_name");
while($row7 = sql_fetch_array($qry7)){
$me_recv_mb_id7 .= $deli7.$row7['mb_id'];
$deli7 = ',';
};
$qry8 = sql_query("select mb_id from {$g5['member_table']} where mb_level='8' order by mb_name");
while($row8 = sql_fetch_array($qry8)){
$me_recv_mb_id8 .= $deli8.$row8['mb_id'];
$deli8 = ',';
};
$qry9 = sql_query("select mb_id from {$g5['member_table']} where mb_level='9' order by mb_name");
while($row9 = sql_fetch_array($qry9)){
$me_recv_mb_id9 .= $deli9.$row9['mb_id'];
$deli9 = ',';
};
$qry10 = sql_query("select mb_id from {$g5['member_table']} where mb_level='10' order by mb_name");
while($row10 = sql_fetch_array($qry10)){
$me_recv_mb_id10 .= $deli10.$row10['mb_id'];
$deli10 = ',';
};
// add_stylesheet('css 구문', 출력순서); 숫자가 작을 수록 먼저 출력됨
add_stylesheet('<link rel="stylesheet" href="{$member_skin_url}/style.css">', 0);
?>
<style>
<?php if ($is_admin) {?>
.new_win .win_ul li{width:25%;}
<?php } ?>
</style>
<!-- 쪽지 보내기 시작 { -->
<div id="memo_write" class="new_win">
<h1 id="win_title"><i class="fa fa-envelope-o" aria-hidden="true"></i> 전체쪽지 보내기</h1>
<div class="new_win_con">
<ul class="win_ul">
<li><a href="<?php echo G5_BBS_URL; ?>/memo.php?kind=recv">받은쪽지</a></li>
<li><a href="<?php echo G5_BBS_URL; ?>/memo.php?kind=send">보낸쪽지</a></li>
<li><a href="<?php echo G5_BBS_URL; ?>/memo_form.php">쪽지쓰기</a></li>
<li class="selected"><a href="<?php echo G5_BBS_URL; ?>/memo_allform.php?kind=allform">전체쪽지</a></li>
</ul>
<form name="fmemoform" action="<?php echo $memo_action_url; ?>" onsubmit="return fmemoform_submit(this);" method="post" autocomplete="off">
<div class="form_01">
<h2 class="sound_only">쪽지쓰기</h2>
<ul>
<li>
<label for="me_recv_mb_id" class="sound_only">받는 회원레벨<strong class="sound_only">필수</strong></label>
<select name="me_recv_mb_id" id="me_recv_mb_id" class="frm_input">
<option value="<?php echo $me_recv_mb_idAll; ?>">레벨2~레벨10</option>
<option value="<?php echo $me_recv_mb_id2; ?>">레벨2</option>
<option value="<?php echo $me_recv_mb_id3; ?>">레벨3</option>
<option value="<?php echo $me_recv_mb_id4; ?>">레벨4</option>
<option value="<?php echo $me_recv_mb_id5; ?>">레벨5</option>
<option value="<?php echo $me_recv_mb_id6; ?>">레벨6</option>
<option value="<?php echo $me_recv_mb_id7; ?>">레벨7</option>
<option value="<?php echo $me_recv_mb_id8; ?>">레벨8</option>
<option value="<?php echo $me_recv_mb_id9; ?>">레벨9</option>
<option value="<?php echo $me_recv_mb_id10; ?>">레벨10</option>
</select>
</li>
<li>
<label for="me_memo" class="sound_only">내용</label>
<textarea name="me_memo" id="me_memo" required class="required"><?php echo $content ?></textarea>
</li>
<li>
<span class="sound_only">자동등록방지</span>
<?php echo captcha_html(); ?>
</li>
</ul>
</div>
<div class="win_btn">
<input type="submit" value="보내기" id="btn_submit" class="btn_submit">
<button type="button" onclick="window.close();" class="btn_close">창닫기</button>
</div>
</div>
</form>
</div>
<script>
function fmemoform_submit(f)
{
<?php echo chk_captcha_js(); ?>
return true;
}
</script>
<!-- } 쪽지 보내기 끝 -->
3-1. 그누보드5.3 / 수정
그누보드5.3 / skin / member / 폴더 / memo.skin.php
그누보드5.3 / skin / member / 폴더 / memo_form.skin.php
그누보드5.3 / skin / member / 폴더 / memo_view.skin.php
add_stylesheet('<link rel="stylesheet" href="'.$member_skin_url.'/style.css">', 0);
?>
아래에 아래와 같이 style 추가
add_stylesheet('<link rel="stylesheet" href="'.$member_skin_url.'/style.css">', 0);
?>
<style>
<?php if ($is_admin) {?>
.new_win .win_ul li{width:25%;}
<?php } ?>
</style>
3-2. 그누보드5.3 / 수정
그누보드5.3 / skin / member / 폴더 / memo.skin.php
그누보드5.3 / skin / member / 폴더 / memo_form.skin.php
그누보드5.3 / skin / member / 폴더 / memo_view.skin.php
메뉴를 추가합니다.
<?php if ($is_admin) {?>
<li><a href="<?php echo G5_BBS_URL; ?>/memo_allform.php?kind=allform">전체쪽지</a></li>
<?php } ?>
Ⅱ. 그누보드 5.2
1. 그누보드5.2 / bbs / memo_allform.php 만들기
<?php
include_once('./_common.php');
include_once(G5_CAPTCHA_PATH.'/captcha.lib.php');
if ($is_admin != 'super') {
alert_close('관리자만 이용하실 수 있습니다.');
exit;
}
$content = "";
// 탈퇴한 회원에게 쪽지 보낼 수 없음
if ($me_recv_mb_id)
{
$mb = get_member($me_recv_mb_id);
if (!$mb['mb_id'])
alert_close('회원정보가 존재하지 않습니다.\\n\\n탈퇴하였을 수 있습니다.');
if (!$mb['mb_open'] && $is_admin != 'super')
alert_close('정보공개를 하지 않았습니다.');
// 4.00.15
$row = sql_fetch(" select me_memo from ".$g5['memo_table']." where me_id = '".$me_id."' and (me_recv_mb_id = '".$member['mb_id']."' or me_send_mb_id = '".$member['mb_id']."') ");
if ($row['me_memo'])
{
$content = "\n\n\n".' >'
."\n".' >'
."\n".' >'.str_replace("\n", "\n> ", get_text($row['me_memo'], 0))
."\n".' >'
.' >';
}
}
$g5['title'] = '쪽지 보내기';
include_once(G5_PATH.'/head.sub.php');
$memo_action_url = G5_HTTPS_BBS_URL."/memo_form_update.php";
include_once($member_skin_path.'/memo_allform.skin.php');
include_once(G5_PATH.'/tail.sub.php');
?>
2. 그누보드5.2 / skin / member / 폴더 / memo_allform.skin.php 만들기
<?php
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
if ($is_admin != 'super') {
alert_close('관리자만 이용하실 수 있습니다.');
exit;
}
$qryAll = sql_query("select mb_id from {$g5['member_table']} where mb_level>='2' order by mb_name");
while($row = sql_fetch_array($qryAll)){
$me_recv_mb_idAll .= $deliAll.$row['mb_id'];
$deliAll = ',';
};
$qry2 = sql_query("select mb_id from {$g5['member_table']} where mb_level='2' order by mb_name");
while($row2 = sql_fetch_array($qry2)){
$me_recv_mb_id2 .= $deli2.$row2['mb_id'];
$deli2 = ',';
};
$qry3 = sql_query("select mb_id from {$g5['member_table']} where mb_level='3' order by mb_name");
while($row3 = sql_fetch_array($qry3)){
$me_recv_mb_id3 .= $deli3.$row3['mb_id'];
$deli3 = ',';
};
$qry4 = sql_query("select mb_id from {$g5['member_table']} where mb_level='4' order by mb_name");
while($row4 = sql_fetch_array($qry4)){
$me_recv_mb_id4 .= $deli4.$row4['mb_id'];
$deli4 = ',';
};
$qry5 = sql_query("select mb_id from {$g5['member_table']} where mb_level='5' order by mb_name");
while($row5 = sql_fetch_array($qry5)){
$me_recv_mb_id5 .= $deli5.$row5['mb_id'];
$deli5 = ',';
};
$qry6 = sql_query("select mb_id from {$g5['member_table']} where mb_level='6' order by mb_name");
while($row6 = sql_fetch_array($qry6)){
$me_recv_mb_id6 .= $deli6.$row6['mb_id'];
$deli6 = ',';
};
$qry7 = sql_query("select mb_id from {$g5['member_table']} where mb_level='7' order by mb_name");
while($row7 = sql_fetch_array($qry7)){
$me_recv_mb_id7 .= $deli7.$row7['mb_id'];
$deli7 = ',';
};
$qry8 = sql_query("select mb_id from {$g5['member_table']} where mb_level='8' order by mb_name");
while($row8 = sql_fetch_array($qry8)){
$me_recv_mb_id8 .= $deli8.$row8['mb_id'];
$deli8 = ',';
};
$qry9 = sql_query("select mb_id from {$g5['member_table']} where mb_level='9' order by mb_name");
while($row9 = sql_fetch_array($qry9)){
$me_recv_mb_id9 .= $deli9.$row9['mb_id'];
$deli9 = ',';
};
$qry10 = sql_query("select mb_id from {$g5['member_table']} where mb_level='10' order by mb_name");
while($row10 = sql_fetch_array($qry10)){
$me_recv_mb_id10 .= $deli10.$row10['mb_id'];
$deli10 = ',';
};
// add_stylesheet('css 구문', 출력순서); 숫자가 작을 수록 먼저 출력됨
add_stylesheet('<link rel="stylesheet" href="'.$member_skin_url.'/style.css">', 0);
?>
<!-- 쪽지 보내기 시작 { -->
<div id="memo_write" class="new_win mbskin">
<h1 id="win_title">전체쪽지 보내기</h1>
<ul class="win_ul">
<li><a href="<?php echo G5_BBS_URL; ?>/memo.php?kind=recv">받은쪽지</a></li>
<li><a href="<?php echo G5_BBS_URL; ?>/memo.php?kind=send">보낸쪽지</a></li>
<li><a href="<?php echo G5_BBS_URL; ?>/memo_form.php">쪽지쓰기</a></li>
<?php if ($is_admin) {?>
<li class="selected"><a href="<?php echo G5_BBS_URL; ?>/memo_allform.php?kind=allform">전체쪽지</a></li>
<?php } ?>
</ul>
<form name="fmemoform" action="<?php echo $memo_action_url; ?>" onsubmit="return fmemoform_submit(this);" method="post" autocomplete="off">
<div class="tbl_frm01 tbl_wrap">
<table>
<caption>쪽지쓰기</caption>
<tbody>
<tr>
<th scope="row"><label for="me_recv_mb_id">받는 회원아이디<strong class="sound_only">필수</strong></label></th>
<td>
<!--input type="text" name="me_recv_mb_id" value="<?php echo $me_recv_mb_id ?>" id="me_recv_mb_id" required class="frm_input required" size="47"-->
<select name="me_recv_mb_id" id="me_recv_mb_id" class="frm_input">
<option value="<?php echo $me_recv_mb_idAll; ?>">전체 (레벨2~레벨10)</option>
<option value="<?php echo $me_recv_mb_id2; ?>">레벨2</option>
<option value="<?php echo $me_recv_mb_id3; ?>">레벨3</option>
<option value="<?php echo $me_recv_mb_id4; ?>">레벨4</option>
<option value="<?php echo $me_recv_mb_id5; ?>">레벨5</option>
<option value="<?php echo $me_recv_mb_id6; ?>">레벨6</option>
<option value="<?php echo $me_recv_mb_id7; ?>">레벨7</option>
<option value="<?php echo $me_recv_mb_id8; ?>">레벨8</option>
<option value="<?php echo $me_recv_mb_id9; ?>">레벨9</option>
<option value="<?php echo $me_recv_mb_id10; ?>">레벨10</option>
</select>
<span class="frm_info">여러 회원에게 보낼때는 컴마(,)로 구분하세요.</span>
</td>
</tr>
<tr>
<th scope="row"><label for="me_memo">내용</label></th>
<td><textarea name="me_memo" id="me_memo" required class="required"><?php echo $content ?></textarea></td>
</tr>
<tr>
<th scope="row">자동등록방지</th>
<td>
<?php echo captcha_html(); ?>
</td>
</tr>
</tbody>
</table>
</div>
<div class="win_btn">
<input type="submit" value="보내기" id="btn_submit" class="btn_submit">
<button type="button" onclick="window.close();">창닫기</button>
</div>
</form>
</div>
<script>
function fmemoform_submit(f)
{
<?php echo chk_captcha_js(); ?>
return true;
}
</script>
<!-- } 쪽지 보내기 끝 -->
3. 그누보드5.2 / 수정
그누보드5 / skin / member / 폴더 / memo.skin.php
그누보드5 / skin / member / 폴더 / memo_form.skin.php
그누보드5 / skin / member / 폴더 / memo_view.skin.php
메뉴를 추가합니다.
<?php if ($is_admin) {?>
<li><a href="<?php echo G5_BBS_URL; ?>/memo_allform.php?kind=allform">전체쪽지</a></li>
<?php } ?>
참고자료
https://sir.kr/g5_skin/13111
댓글목록
등록된 댓글이 없습니다.