관리자페이지 회원메일 발송에 에디터삽입하기!

 
회원에게 메일을 보낼때 텍스트밖에 안되서 불편했는데
저도 이것저것 해보다가 알게된거라 같이 공유하고싶어서요^^
 
adm/mail_form.php파일에 파란색 부분을 추가하시면됩니다
 
 
추가해야할부분이 총 4군데입니다.
 
<?
$sub_menu = "200300";
include_once("./_common.php");
include_once ("$g4[path]/lib/cheditor4.lib.php");
auth_check($auth[$sub_menu], "r");
 
$token = get_token();
 
$html_title = "회원메일";
 
if ($w == "u") {
    $html_title .= "수정";
    $readonly = " readonly";
 
    $sql = " select * from $g4[mail_table] where ma_id = '$ma_id' ";
    $ma = sql_fetch($sql);
    if (!$ma[ma_id])
        alert("등록된 자료가 없습니다.");
} else {
    $html_title .= "입력";
}
 
$g4[title] = $html_title;
include_once("./admin.head.php");
?>

<script src="<?=$g4[cheditor4_path]?>/cheditor.js"></script>
<?=cheditor1('ma_content', '100%', '250');?>
<form name=fmailform method=post action="./mail_update.php" onsubmit="return fmailform_check(this);">
<input type=hidden name=w     value='<?=$w?>'>
<input type=hidden name=ma_id value='<?=$ma[ma_id]?>'>
<input type=hidden name=token value='<?=$token?>'>
<table cellpadding=0 cellspacing=0 width=100%>
<colgroup width=20% class='col1 pad1 bold right'>
<colgroup width=80% class='col2 pad2'>
<tr>
    <td colspan=2 class=title align=left><img src='<?=$g4[admin_path]?>/img/icon_title.gif'> <?=$html_title?></td>
</tr>
<tr><td colspan=2 class='line1'></td></tr>
<tr class='ht'>
    <td>메일 제목</td>
    <td><input type=text class='ed w99' name=ma_subject value='<?=$ma[ma_subject]?>' required itemname='메일 제목'></td>
</tr>
<tr>
    <td>메일 내용</td>
    <td class=lh>
      
      <!--<textarea id=ma_content name=ma_content rows=20 class='ed w99'  required itemname='메일 내용'><?=$ma[ma_content]?></textarea>-->

<?=cheditor2('ma_content', $ma[ma_content]);?>
        <br>{이름} , {별명} , {회원아이디} , {이메일} , {생일}
        <br>위와 같이 HTML 코드에 삽입하면 해당 내용에 맞게 변환하여 메일 발송합니다.
    </td>
</tr>
<tr><td colspan=2 class='line1'></td></tr>
</table>
 
<p align=center>
    <input type=submit class=btn1 accesskey='s' value='  확  인  '>
</form>
 
 
 
<script type="text/javascript">
function fmailform_check(f)
{

<?=cheditor3('ma_content')."\n";?>
    errmsg = "";
    errfld = "";
 
    check_field(f.ma_subject, "제목을 입력하세요.");
    check_field(f.ma_content, "내용을 입력하세요.");
 

    if (errmsg != "") {
        alert(errmsg);
        errfld.focus();
        return false;
    }

    return true;
}
document.fmailform.ma_subject.focus();
</script>
 
<?
include_once("./admin.tail.php");
?>
|

댓글 9개

http://sir.co.kr/bbs/board.php?bo_table=g4_qa&wr_id=197158
필요한 기능인데..감사합니다.
이제는 잘되네요 감사합니다...
감사합니다. 추천..
좋은 내용입니다. 감사합니다.
사진 첨부할때 오류가 나네요 음
전 아주 잘됩니다. 너무 감사합니다~ (사진도 잘되요~)
댓글을 작성하시려면 로그인이 필요합니다. 로그인

그누4 팁자료실

그누보드4와 관련된 팁을 여러분들과 함께 공유하세요. 나누면 즐거움이 커집니다.

+
제목 글쓴이 날짜 조회
14년 전 조회 6,907
14년 전 조회 7,094
14년 전 조회 3,842
14년 전 조회 6,047
14년 전 조회 4,668
14년 전 조회 8,725
14년 전 조회 4,826
14년 전 조회 7,831
14년 전 조회 7,932
14년 전 조회 6,056
14년 전 조회 7,702
14년 전 조회 5,206
14년 전 조회 5,041
14년 전 조회 3,958
14년 전 조회 5,873
14년 전 조회 1.6만
14년 전 조회 9,440
14년 전 조회 4,193
14년 전 조회 8,419
14년 전 조회 5,093
🐛 버그신고