관리자 따옴표 메일까지 작업

This commit is contained in:
chicpro
2012-11-02 17:53:37 +09:00
parent eae06035b0
commit 41b1e2d8db
9 changed files with 137 additions and 137 deletions

View File

@ -1,49 +1,49 @@
<? <?
$sub_menu = "200300"; $sub_menu = "200300";
include_once("./_common.php"); include_once('./_common.php');
auth_check($auth[$sub_menu], "r"); auth_check($auth[$sub_menu], 'r');
$token = get_token(); $token = get_token();
$html_title = "회원메일"; $html_title = '회원메일';
if ($w == "u") { if ($w == 'u') {
$html_title .= "수정"; $html_title .= '수정';
$readonly = " readonly"; $readonly = ' readonly';
$sql = " select * from $g4[mail_table] where ma_id = '$ma_id' "; $sql = " select * from {$g4['mail_table']} where ma_id = '$ma_id' ";
$ma = sql_fetch($sql); $ma = sql_fetch($sql);
if (!$ma[ma_id]) if (!$ma['ma_id'])
alert("등록된 자료가 없습니다."); alert('등록된 자료가 없습니다.');
} else { } else {
$html_title .= "입력"; $html_title .= '입력';
} }
$g4[title] = $html_title; $g4['title'] = $html_title;
include_once("./admin.head.php"); include_once('./admin.head.php');
?> ?>
<form name=fmailform method=post action="./mail_update.php" onsubmit="return fmailform_check(this);"> <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=w value='<?=$w?>'>
<input type=hidden name=ma_id value='<?=$ma[ma_id]?>'> <input type=hidden name=ma_id value='<?=$ma['ma_id']?>'>
<input type=hidden name=token value='<?=$token?>'> <input type=hidden name=token value='<?=$token?>'>
<table cellpadding=0 cellspacing=0 width=100%> <table cellpadding=0 cellspacing=0 width=100%>
<colgroup width=20% class='col1 pad1 bold right'> <colgroup width=20% class='col1 pad1 bold right'>
<colgroup width=80% class='col2 pad2'> <colgroup width=80% class='col2 pad2'>
<tr> <tr>
<td colspan=2 class=title align=left><img src='<?=$g4[admin_path]?>/img/icon_title.gif'> <?=$html_title?></td> <td colspan=2 class=title align=left><img src='<?=$g4['admin_path']?>/img/icon_title.gif'> <?=$html_title?></td>
</tr> </tr>
<tr><td colspan=2 class='line1'></td></tr> <tr><td colspan=2 class='line1'></td></tr>
<tr class='ht'> <tr class='ht'>
<td>메일 제목</td> <td>메일 제목</td>
<td><input type=text class='ed w99' name=ma_subject value='<?=$ma[ma_subject]?>' required itemname='메일 제목'></td> <td><input type=text class='ed w99' name=ma_subject value='<?=$ma['ma_subject']?>' required itemname='메일 제목'></td>
</tr> </tr>
<tr> <tr>
<td>메일 내용</td> <td>메일 내용</td>
<td class=lh> <td class=lh>
<?=textarea_size("ma_content")?> <?=textarea_size('ma_content')?>
<textarea id=ma_content name=ma_content rows=20 class='ed w99' required itemname='메일 내용'><?=$ma[ma_content]?></textarea> <textarea id=ma_content name=ma_content rows=20 class='ed w99' required itemname='메일 내용'><?=$ma['ma_content']?></textarea>
<br>{이름} , {별명} , {회원아이디} , {이메일} , {생일} <br>{이름} , {별명} , {회원아이디} , {이메일} , {생일}
<br>위와 같이 HTML 코드에 삽입하면 해당 내용에 맞게 변환하여 메일 발송합니다. <br>위와 같이 HTML 코드에 삽입하면 해당 내용에 맞게 변환하여 메일 발송합니다.
</td> </td>
@ -78,5 +78,5 @@ document.fmailform.ma_subject.focus();
</script> </script>
<? <?
include_once("./admin.tail.php"); include_once('./admin.tail.php');
?> ?>

View File

@ -4,19 +4,19 @@ include_once('./_common.php');
auth_check($auth[$sub_menu], 'r'); auth_check($auth[$sub_menu], 'r');
$sql_common = ' from $g4[mail_table] '; $sql_common = " from {$g4['mail_table']} ";
// 테이블의 전체 레코드수만 얻음 // 테이블의 전체 레코드수만 얻음
$sql = ' select COUNT(*) as cnt ' . $sql_common; $sql = " select COUNT(*) as cnt $sql_common ";
$row = sql_fetch($sql); $row = sql_fetch($sql);
$total_count = $row[cnt]; $total_count = $row['cnt'];
$page = 1; $page = 1;
$sql = 'select * $sql_common order by ma_id desc '; $sql = " select * $sql_common order by ma_id desc ";
$result = sql_query($sql); $result = sql_query($sql);
$g4[title] = '회원메일발송'; $g4['title'] = '회원메일발송';
include_once('./admin.head.php'); include_once('./admin.head.php');
$colspan = 6; $colspan = 6;
@ -26,7 +26,7 @@ $colspan = 6;
<tr> <tr>
<td width=20%>&nbsp;</td> <td width=20%>&nbsp;</td>
<td width=60% align=center>&nbsp;</td> <td width=60% align=center>&nbsp;</td>
<td width=20% align=right>건수 : <? echo $total_count ?>&nbsp;</td> <td width=20% align=right>건수 : <?=$total_count ?>&nbsp;</td>
</tr> </tr>
</table> </table>
@ -39,33 +39,33 @@ $colspan = 6;
<td width=120>작성일시</td> <td width=120>작성일시</td>
<td width=50>테스트</td> <td width=50>테스트</td>
<td width=50>보내기</td> <td width=50>보내기</td>
<td width=80><a href="./mail_form.php"><img src="<?=$g4["admin_path"]?>/img/icon_insert.gif" border=0></a></td> <td width=80><a href="./mail_form.php"><img src="<?=$g4['admin_path']?>/img/icon_insert.gif" border=0></a></td>
</tr> </tr>
<tr><td colspan="<?=$colspan?>" class="line2"></td></tr> <tr><td colspan="<?=$colspan?>" class="line2"></td></tr>
<? <?
for ($i=0; $row=mysql_fetch_array($result); $i++) { for ($i=0; $row=mysql_fetch_array($result); $i++) {
$s_mod = icon('수정', './mail_form.php?w=u&ma_id=$row[ma_id]'); $s_mod = icon('수정', './mail_form.php?w=u&ma_id='.$row['ma_id']);
//$s_del = icon('삭제', 'javascript:del("./mail_update.php?w=d&ma_id=$row[ma_id]");'); //$s_del = icon('삭제', 'javascript:del("./mail_update.php?w=d&ma_id=$row[ma_id]");');
$s_del = '<a href='javascript:post_delete("mail_update.php", "$row[ma_id]");'><img src="img/icon_delete.gif" border=0 title="삭제" align="absmiddle"></a>'; $s_del = '<a href="javascript:post_delete(\"mail_update.php\", '.$row['ma_id'].');"><img src="img/icon_delete.gif" border=0 title="삭제" align="absmiddle"></a>';
$s_vie = icon('보기', './mail_preview.php?ma_id=$row[ma_id]', '_blank'); $s_vie = icon('보기', './mail_preview.php?ma_id='.$row['ma_id'], '_blank');
$num = number_format($total_count - ($page - 1) * $config[cf_page_rows] - $i); $num = number_format($total_count - ($page - 1) * $config['cf_page_rows'] - $i);
$list = $i%2; $list = $i%2;
echo ' echo "
<tr class="list$list col1 ht center"> <tr class=\"list{$list} col1 ht center\">
<td>$num</td> <td>$num</td>
<td align=left>$row[ma_subject]</td> <td align=left>{$row['ma_subject']}</td>
<td>$row[ma_time]</td> <td>{$row['ma_time']}</td>
<td><a href="./mail_test.php?ma_id=$row[ma_id]">테스트</a></td> <td><a href=\"./mail_test.php?ma_id=$row[ma_id]\">테스트</a></td>
<td><a href="./mail_select_form.php?ma_id=$row[ma_id]">보내기</a></td> <td><a href=\"./mail_select_form.php?ma_id={$row['ma_id']}\">보내기</a></td>
<td>$s_mod $s_del $s_vie</td> <td>$s_mod $s_del $s_vie</td>
</tr>'; </tr>";
} }
if (!$i) if (!$i)
echo '<tr><td colspan="$colspan" height=100 align=center bgcolor="#FFFFFF">자료가 없습니다.</td></tr>'; echo "<tr><td colspan=\"$colspan\" height=100 align=center bgcolor=\"#FFFFFF\">자료가 없습니다.</td></tr>";
?> ?>
<tr><td colspan="<?=$colspan?>" class="line2"></td></tr> <tr><td colspan="<?=$colspan?>" class="line2"></td></tr>
</table> </table>

View File

@ -1,14 +1,14 @@
<? <?
$sub_menu = "200300"; $sub_menu = "200300";
include_once("./_common.php"); include_once('./_common.php');
include_once("$g4[path]/lib/mailer.lib.php"); include_once($g4['path'].'/lib/mailer.lib.php');
auth_check($auth[$sub_menu], "r"); auth_check($auth[$sub_menu], 'r');
$se = sql_fetch("select ma_subject, ma_content from $g4[mail_table] where ma_id = '$ma_id' "); $se = sql_fetch("select ma_subject, ma_content from {$g4['mail_table']} where ma_id = '$ma_id' ");
$subject = $se[ma_subject]; $subject = $se['ma_subject'];
$content = $se[ma_content] . "<hr size=0><p><span style='font-size:9pt; font-family:굴림'>▶ 더 이상 정보 수신을 원치 않으시면 [<a href='$g4[url]/$g4[bbs]/email_stop.php?mb_id=***&mb_md5=***' target='_blank'>수신거부</a>] 해 주십시오.</span></p>"; $content = $se['ma_content'] . "<hr size=0><p><span style='font-size:9pt; font-family:굴림'>▶ 더 이상 정보 수신을 원치 않으시면 [<a href='{$g4['url']}/{$g4['bbs']}/email_stop.php?mb_id=***&amp;mb_md5=***' target='_blank'>수신거부</a>] 해 주십시오.</span></p>";
echo "<span style='font-size:9pt;'>$subject</span>"; echo "<span style='font-size:9pt;'>$subject</span>";
echo "<hr size=0>"; echo "<hr size=0>";

View File

@ -1,28 +1,28 @@
<? <?
$sub_menu = "200300"; $sub_menu = "200300";
include_once("./_common.php"); include_once('./_common.php');
if (!$config[cf_email_use]) if (!$config['cf_email_use'])
alert("환경설정에서 \'메일발송 사용\'에 체크하셔야 메일을 발송할 수 있습니다."); alert('환경설정에서 \'메일발송 사용\'에 체크하셔야 메일을 발송할 수 있습니다.');
auth_check($auth[$sub_menu], "r"); auth_check($auth[$sub_menu], 'r');
$sql = "select * from $g4[mail_table] where ma_id = '$ma_id' "; $sql = "select * from {$g4['mail_table']} where ma_id = '$ma_id' ";
$ma = sql_fetch($sql); $ma = sql_fetch($sql);
if (!$ma[ma_id]) if (!$ma['ma_id'])
alert("보내실 내용을 선택하여 주십시오."); alert('보내실 내용을 선택하여 주십시오.');
// 전체회원수 // 전체회원수
$sql = "select COUNT(*) as cnt from $g4[member_table] "; $sql = "select COUNT(*) as cnt from {$g4['member_table']} ";
$row = sql_fetch($sql); $row = sql_fetch($sql);
$tot_cnt = $row[cnt]; $tot_cnt = $row['cnt'];
// 탈퇴대기회원수 // 탈퇴대기회원수
$sql = "select COUNT(*) as cnt from $g4[member_table] where mb_leave_date <> '' "; $sql = "select COUNT(*) as cnt from {$g4['member_table']} where mb_leave_date <> '' ";
$row = sql_fetch($sql); $row = sql_fetch($sql);
$finish_cnt = $row[cnt]; $finish_cnt = $row['cnt'];
$last_option = explode("||", $ma[ma_last_option]); $last_option = explode("||", $ma['ma_last_option']);
for ($i=0; $i<count($last_option); $i++) { for ($i=0; $i<count($last_option); $i++) {
$option = explode("=", $last_option[$i]); $option = explode("=", $last_option[$i]);
// 동적변수 // 동적변수
@ -37,8 +37,8 @@ if (!isset($mb_mailling)) $mb_mailling = 1;
if (!isset($mb_sex)) $mb_sex = 1; if (!isset($mb_sex)) $mb_sex = 1;
if (!isset($mb_area)) $mb_area = 1; if (!isset($mb_area)) $mb_area = 1;
$g4[title] = "회원메일발송"; $g4['title'] = '회원메일발송';
include_once("./admin.head.php"); include_once('./admin.head.php');
?> ?>
@ -165,11 +165,11 @@ include_once("./admin.head.php");
<select id=gr_id name=gr_id> <select id=gr_id name=gr_id>
<option value=''>전체 <option value=''>전체
<? <?
$sql = " select gr_id, gr_subject from $g4[group_table] order by gr_subject "; $sql = " select gr_id, gr_subject from {$g4['group_table']} order by gr_subject ";
$result = sql_query($sql); $result = sql_query($sql);
for ($i=0; $row=sql_fetch_array($result); $i++) for ($i=0; $row=sql_fetch_array($result); $i++)
{ {
echo "<option value='$row[gr_id]'>$row[gr_subject]"; echo "<option value='{$row['gr_id']}'>{$row['gr_subject']}";
} }
?> ?>
</select> </select>
@ -188,5 +188,5 @@ include_once("./admin.head.php");
<? <?
include_once("./admin.tail.php"); include_once('./admin.tail.php');
?> ?>

View File

@ -1,16 +1,16 @@
<? <?
$sub_menu = "200300"; $sub_menu = "200300";
include_once("./_common.php"); include_once('./_common.php');
auth_check($auth[$sub_menu], "r"); auth_check($auth[$sub_menu], 'r');
$token = get_token(); $token = get_token();
$html_title = "선택된 회원메일리스트"; $html_title = '선택된 회원메일리스트';
$ma_last_option = ""; $ma_last_option = "";
$sql_common = " from $g4[member_table] "; $sql_common = " from {$g4['member_table']} ";
$sql_where = " where (1) "; $sql_where = " where (1) ";
// 회원ID ..에서 ..까지 // 회원ID ..에서 ..까지
@ -45,16 +45,16 @@ if ($gr_id)
{ {
$group_member = ""; $group_member = "";
$comma = ""; $comma = "";
$sql2 = " select mb_id from $g4[group_member_table] where gr_id = '$gr_id' order by mb_id "; $sql2 = " select mb_id from {$g4['group_member_table']} where gr_id = '$gr_id' order by mb_id ";
$result2 = sql_query($sql2); $result2 = sql_query($sql2);
for ($k=0; $row2=sql_fetch_array($result2); $k++) for ($k=0; $row2=sql_fetch_array($result2); $k++)
{ {
$group_member .= "{$comma}'$row2[mb_id]'"; $group_member .= "{$comma}'{$row2['mb_id']}'";
$comma = ","; $comma = ",";
} }
if (!$group_member) if (!$group_member)
alert("선택하신 게시판 그룹회원이 한명도 없습니다."); alert('선택하신 게시판 그룹회원이 한명도 없습니다.');
$sql_where .= " and mb_id in ($group_member) "; $sql_where .= " and mb_id in ($group_member) ";
} }
@ -64,9 +64,9 @@ $sql_where .= " and mb_leave_date = '' and mb_intercept_date = '' ";
$sql = " select COUNT(*) as cnt $sql_common $sql_where "; $sql = " select COUNT(*) as cnt $sql_common $sql_where ";
$row = sql_fetch($sql); $row = sql_fetch($sql);
$cnt = $row[cnt]; $cnt = $row['cnt'];
if ($cnt == 0) if ($cnt == 0)
alert("선택하신 내용으로는 해당되는 회원자료가 없습니다."); alert('선택하신 내용으로는 해당되는 회원자료가 없습니다.');
// 마지막 옵션을 저장합니다. // 마지막 옵션을 저장합니다.
$ma_last_option .= "mb_id1=$mb_id1"; $ma_last_option .= "mb_id1=$mb_id1";
@ -82,10 +82,10 @@ $ma_last_option .= "||mb_level_from=$mb_level_from";
$ma_last_option .= "||mb_level_to=$mb_level_to"; $ma_last_option .= "||mb_level_to=$mb_level_to";
$ma_last_option .= "||gr_id=$gr_id"; $ma_last_option .= "||gr_id=$gr_id";
sql_query(" update $g4[mail_table] set ma_last_option = '$ma_last_option' where ma_id = '$ma_id' "); sql_query(" update {$g4['mail_table']} set ma_last_option = '$ma_last_option' where ma_id = '$ma_id' ");
include_once("./admin.head.php"); include_once('./admin.head.php');
?> ?>
<table width=500 align=center><tr><td> <table width=500 align=center><tr><td>
@ -110,8 +110,8 @@ include_once("./admin.head.php");
while ($row=sql_fetch_array($result)) while ($row=sql_fetch_array($result))
{ {
$i++; $i++;
echo "<option>$i . $row[mb_id] / $row[mb_name] / $row[mb_nick] / $row[mb_birth] / $row[mb_email]"; echo "<option>$i . {$row['mb_id']} / {$row['mb_name']} / {$row['mb_nick']} / {$row['mb_birth']} / {$row['mb_email']}";
$ma_list .= $cr . $row[mb_email] . "||" . $row[mb_id] . "||" . $row[mb_name] . "||" . $row[mb_nick] . "||" . $row[mb_birth] . "||" . $row[mb_datetime]; $ma_list .= $cr . $row['mb_email'] . "||" . $row['mb_id'] . "||" . $row['mb_name'] . "||" . $row['mb_nick'] . "||" . $row[mb_birth] . "||" . $row[mb_datetime];
$cr = "\n"; $cr = "\n";
} }
?> ?>
@ -137,5 +137,5 @@ function fmailselectlist_submit(f)
</script> </script>
<? <?
include_once("./admin.tail.php"); include_once('./admin.tail.php');
?> ?>

View File

@ -1,17 +1,17 @@
<? <?
$sub_menu = "200300"; $sub_menu = "200300";
include_once("./_common.php"); include_once('./_common.php');
auth_check($auth[$sub_menu], "w"); auth_check($auth[$sub_menu], 'w');
$html_title = "회원메일 발송"; $html_title = '회원메일 발송';
check_demo(); check_demo();
check_token(); check_token();
include_once("./admin.head.php"); include_once('./admin.head.php');
include_once("$g4[path]/lib/mailer.lib.php"); include_once($g4['path'].'/lib/mailer.lib.php');
$countgap = 10; // 몇건씩 보낼지 설정 $countgap = 10; // 몇건씩 보낼지 설정
$maxscreen = 500; // 몇건씩 화면에 보여줄건지? $maxscreen = 500; // 몇건씩 화면에 보여줄건지?
@ -25,24 +25,24 @@ echo "</span>";
<span id="cont"></span> <span id="cont"></span>
<? <?
include_once("./admin.tail.php"); include_once('./admin.tail.php');
?> ?>
<? <?
flush(); flush();
ob_flush(); ob_flush();
$ma_id = trim($_POST[ma_id]); $ma_id = trim($_POST['ma_id']);
$select_member_list = addslashes(trim($_POST[ma_list])); $select_member_list = addslashes(trim($_POST['ma_list']));
//print_r2($_POST); EXIT; //print_r2($_POST); EXIT;
$member_list = explode("\n", $select_member_list); $member_list = explode("\n", $select_member_list);
// 메일내용 가져오기 // 메일내용 가져오기
$sql = "select ma_subject, ma_content from $g4[mail_table] where ma_id = '$ma_id' "; $sql = "select ma_subject, ma_content from {$g4['mail_table']} where ma_id = '$ma_id' ";
$ma = sql_fetch($sql); $ma = sql_fetch($sql);
$subject = $ma[ma_subject]; $subject = $ma['ma_subject'];
$cnt = 0; $cnt = 0;
for ($i=0; $i<count($member_list); $i++) for ($i=0; $i<count($member_list); $i++)
@ -57,14 +57,14 @@ for ($i=0; $i<count($member_list); $i++)
$mb_md5 = md5($mb_id.$email.$datetime); $mb_md5 = md5($mb_id.$email.$datetime);
$content = $ma[ma_content]; $content = $ma['ma_content'];
$content = preg_replace("/{이름}/", $name, $content); $content = preg_replace("/{이름}/", $name, $content);
$content = preg_replace("/{별명}/", $nick, $content); $content = preg_replace("/{별명}/", $nick, $content);
$content = preg_replace("/{회원아이디}/", $mb_id, $content); $content = preg_replace("/{회원아이디}/", $mb_id, $content);
$content = preg_replace("/{이메일}/", $email, $content); $content = preg_replace("/{이메일}/", $email, $content);
$content = preg_replace("/{생일}/", (int)substr($birth,4,2).'월 '.(int)substr($birth,6,2).'일', $content); $content = preg_replace("/{생일}/", (int)substr($birth,4,2).'월 '.(int)substr($birth,6,2).'일', $content);
$content = $content . "<hr size=0><p><span style='font-size:9pt; font-familye:굴림'>▶ 더 이상 정보 수신을 원치 않으시면 [<a href='$g4[url]/$g4[bbs]/email_stop.php?mb_id=$mb_id&mb_md5=$mb_md5' target='_blank'>수신거부</a>] 해 주십시오.</span></p>"; $content = $content . "<hr size=0><p><span style='font-size:9pt; font-familye:굴림'>▶ 더 이상 정보 수신을 원치 않으시면 [<a href='{$g4['url']}/{$g4['bbs']}/email_stop.php?mb_id={$mb_id}&amp;mb_md5={$mb_md5}' target='_blank'>수신거부</a>] 해 주십시오.</span></p>";
/* /*
ob_start(); ob_start();
@ -74,7 +74,7 @@ for ($i=0; $i<count($member_list); $i++)
*/ */
//mailer($default[de_subject], $default[de_admin_email], $email, $subject, $content, 1); //mailer($default[de_subject], $default[de_admin_email], $email, $subject, $content, 1);
mailer($config[cf_title], $member[mb_email], $email, $subject, $content, 1); mailer($config['cf_title'], $member['mb_email'], $email, $subject, $content, 1);
echo "<script> document.all.cont.innerHTML += '$cnt. $email ($mb_id : $name)<br>'; </script>\n"; echo "<script> document.all.cont.innerHTML += '$cnt. $email ($mb_id : $name)<br>'; </script>\n";
//echo "+"; //echo "+";

View File

@ -1,41 +1,41 @@
<? <?
$sub_menu = "200300"; $sub_menu = "200300";
include_once("./_common.php"); include_once('./_common.php');
if (!$config[cf_email_use]) if (!$config['cf_email_use'])
alert("환경설정에서 \'메일발송 사용\'에 체크하셔야 메일을 발송할 수 있습니다."); alert('환경설정에서 \'메일발송 사용\'에 체크하셔야 메일을 발송할 수 있습니다.');
include_once("$g4[path]/lib/mailer.lib.php"); include_once($g4['path'].'/lib/mailer.lib.php');
auth_check($auth[$sub_menu], "w"); auth_check($auth[$sub_menu], 'w');
check_demo(); check_demo();
$g4[title] = "회원메일 테스트"; $g4[title] = '회원메일 테스트';
$name = $member[mb_name]; $name = $member['mb_name'];
$nick = $member[mb_nick]; $nick = $member['mb_nick'];
$mb_id = $member[mb_id]; $mb_id = $member['mb_id'];
$email = $member[mb_email]; $email = $member['mb_email'];
$birth = $member[mb_birth]; $birth = $member['mb_birth'];
$sql = "select ma_subject, ma_content from $g4[mail_table] where ma_id = '$ma_id' "; $sql = "select ma_subject, ma_content from {$g4['mail_table']} where ma_id = '$ma_id' ";
$ma = sql_fetch($sql); $ma = sql_fetch($sql);
$subject = $ma[ma_subject]; $subject = $ma['ma_subject'];
$content = $ma[ma_content]; $content = $ma['ma_content'];
$content = preg_replace("/{이름}/", $name, $content); $content = preg_replace("/{이름}/", $name, $content);
$content = preg_replace("/{별명}/", $nick, $content); $content = preg_replace("/{별명}/", $nick, $content);
$content = preg_replace("/{회원아이디}/", $mb_id, $content); $content = preg_replace("/{회원아이디}/", $mb_id, $content);
$content = preg_replace("/{이메일}/", $email, $content); $content = preg_replace("/{이메일}/", $email, $content);
$content = preg_replace("/{생일}/", (int)substr($birth,4,2).'월 '.(int)substr($birth,6,2).'일', $content); $content = preg_replace("/{생일}/", (int)substr($birth,4,2).'월 '.(int)substr($birth,6,2).'일', $content);
$mb_md5 = md5($member[mb_id].$member[mb_email].$member[mb_datetime]); $mb_md5 = md5($member['mb_id'].$member['mb_email'].$member['mb_datetime']);
$content = $content . "<hr size=0><p><span style='font-size:9pt; font-familye:굴림'>▶ 더 이상 정보 수신을 원치 않으시면 [<a href='$g4[url]/$g4[bbs]/email_stop.php?mb_id=$mb_id&mb_md5=$mb_md5' target='_blank'>수신거부</a>] 해 주십시오.</span></p>"; $content = $content . "<hr size=0><p><span style='font-size:9pt; font-familye:굴림'>▶ 더 이상 정보 수신을 원치 않으시면 [<a href='{$g4['url']}/{$g4['bbs']}/email_stop.php?mb_id={$mb_id}&amp;mb_md5={$mb_md5}' target='_blank'>수신거부</a>] 해 주십시오.</span></p>";
mailer($config[cf_title], $member[mb_email], $member[mb_email], $subject, $content, 1); mailer($config['cf_title'], $member['mb_email'], $member['mb_email'], $subject, $content, 1);
alert("$member[mb_nick]($member[mb_email])님께 테스트 메일을 발송하였습니다.\\n\\n확인하여 주십시오."); alert("{$member['mb_nick']}({$member['mb_email']})님께 테스트 메일을 발송하였습니다.\\n\\n확인하여 주십시오.");
?> ?>

View File

@ -1,39 +1,39 @@
<? <?
$sub_menu = "200300"; $sub_menu = "200300";
include_once("./_common.php"); include_once('./_common.php');
if ($w == 'u' || $w == 'd') if ($w == 'u' || $w == 'd')
check_demo(); check_demo();
auth_check($auth[$sub_menu], "w"); auth_check($auth[$sub_menu], 'w');
check_token(); check_token();
if ($w == "") if ($w == '')
{ {
$sql = " insert $g4[mail_table] $sql = " insert {$g4['mail_table']}
set ma_id = '$_POST[ma_id]', set ma_id = '{$_POST['ma_id']}',
ma_subject = '$_POST[ma_subject]', ma_subject = '{$_POST['ma_subject']}',
ma_content = '$_POST[ma_content]', ma_content = '{$_POST['ma_content']}',
ma_time = '$g4[time_ymdhis]', ma_time = '{$g4['time_ymdhis']}',
ma_ip = '$_SERVER[REMOTE_ADDR]' "; ma_ip = '{$_SERVER['REMOTE_ADDR']}' ";
sql_query($sql); sql_query($sql);
} }
else if ($w == "u") else if ($w == 'u')
{ {
$sql = " update $g4[mail_table] $sql = " update {$g4['mail_table']}
set ma_subject = '$_POST[ma_subject]', set ma_subject = '{$_POST['ma_subject']}',
ma_content = '$_POST[ma_content]', ma_content = '{$_POST['ma_content']}',
ma_time = '$g4[time_ymdhis]', ma_time = '{$g4['time_ymdhis']}',
ma_ip = '$_SERVER[REMOTE_ADDR]' ma_ip = '{$_SERVER['REMOTE_ADDR']}'
where ma_id = '$_POST[ma_id]' "; where ma_id = '{$_POST['ma_id']}' ";
sql_query($sql); sql_query($sql);
} }
else if ($w == "d") else if ($w == 'd')
{ {
$sql = " delete from $g4[mail_table] where ma_id = '$_POST[ma_id]' "; $sql = " delete from {$g4['mail_table']} where ma_id = '{$_POST['ma_id']}' ";
sql_query($sql); sql_query($sql);
} }
goto_url("./mail_list.php"); goto_url('./mail_list.php');
?> ?>

View File