관리자 따옴표 메일까지 작업
This commit is contained in:
@ -1,51 +1,51 @@
|
||||
<?
|
||||
$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();
|
||||
|
||||
$html_title = "회원메일";
|
||||
$html_title = '회원메일';
|
||||
|
||||
if ($w == "u") {
|
||||
$html_title .= "수정";
|
||||
$readonly = " readonly";
|
||||
if ($w == 'u') {
|
||||
$html_title .= '수정';
|
||||
$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);
|
||||
if (!$ma[ma_id])
|
||||
alert("등록된 자료가 없습니다.");
|
||||
if (!$ma['ma_id'])
|
||||
alert('등록된 자료가 없습니다.');
|
||||
} else {
|
||||
$html_title .= "입력";
|
||||
$html_title .= '입력';
|
||||
}
|
||||
|
||||
$g4[title] = $html_title;
|
||||
include_once("./admin.head.php");
|
||||
$g4['title'] = $html_title;
|
||||
include_once('./admin.head.php');
|
||||
?>
|
||||
|
||||
<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=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>
|
||||
<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>
|
||||
<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_size("ma_content")?>
|
||||
<textarea id=ma_content name=ma_content rows=20 class='ed w99' required itemname='메일 내용'><?=$ma[ma_content]?></textarea>
|
||||
<?=textarea_size('ma_content')?>
|
||||
<textarea id=ma_content name=ma_content rows=20 class='ed w99' required itemname='메일 내용'><?=$ma['ma_content']?></textarea>
|
||||
<br>{이름} , {별명} , {회원아이디} , {이메일} , {생일}
|
||||
<br>위와 같이 HTML 코드에 삽입하면 해당 내용에 맞게 변환하여 메일 발송합니다.
|
||||
<br>위와 같이 HTML 코드에 삽입하면 해당 내용에 맞게 변환하여 메일 발송합니다.
|
||||
</td>
|
||||
</tr>
|
||||
<tr><td colspan=2 class='line1'></td></tr>
|
||||
@ -58,7 +58,7 @@ include_once("./admin.head.php");
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
function fmailform_check(f)
|
||||
function fmailform_check(f)
|
||||
{
|
||||
errmsg = "";
|
||||
errfld = "";
|
||||
@ -78,5 +78,5 @@ document.fmailform.ma_subject.focus();
|
||||
</script>
|
||||
|
||||
<?
|
||||
include_once("./admin.tail.php");
|
||||
include_once('./admin.tail.php');
|
||||
?>
|
||||
|
||||
@ -4,19 +4,19 @@ include_once('./_common.php');
|
||||
|
||||
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);
|
||||
$total_count = $row[cnt];
|
||||
$total_count = $row['cnt'];
|
||||
|
||||
$page = 1;
|
||||
|
||||
$sql = 'select * $sql_common order by ma_id desc ';
|
||||
$sql = " select * $sql_common order by ma_id desc ";
|
||||
$result = sql_query($sql);
|
||||
|
||||
$g4[title] = '회원메일발송';
|
||||
$g4['title'] = '회원메일발송';
|
||||
include_once('./admin.head.php');
|
||||
|
||||
$colspan = 6;
|
||||
@ -26,7 +26,7 @@ $colspan = 6;
|
||||
<tr>
|
||||
<td width=20%> </td>
|
||||
<td width=60% align=center> </td>
|
||||
<td width=20% align=right>건수 : <? echo $total_count ?> </td>
|
||||
<td width=20% align=right>건수 : <?=$total_count ?> </td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
@ -39,33 +39,33 @@ $colspan = 6;
|
||||
<td width=120>작성일시</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><td colspan="<?=$colspan?>" class="line2"></td></tr>
|
||||
|
||||
<?
|
||||
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 = '<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_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');
|
||||
|
||||
$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;
|
||||
echo '
|
||||
<tr class="list$list col1 ht center">
|
||||
echo "
|
||||
<tr class=\"list{$list} col1 ht center\">
|
||||
<td>$num</td>
|
||||
<td align=left>$row[ma_subject]</td>
|
||||
<td>$row[ma_time]</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 align=left>{$row['ma_subject']}</td>
|
||||
<td>{$row['ma_time']}</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>$s_mod $s_del $s_vie</td>
|
||||
</tr>';
|
||||
</tr>";
|
||||
}
|
||||
|
||||
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>
|
||||
</table>
|
||||
|
||||
@ -1,14 +1,14 @@
|
||||
<?
|
||||
$sub_menu = "200300";
|
||||
include_once("./_common.php");
|
||||
include_once("$g4[path]/lib/mailer.lib.php");
|
||||
include_once('./_common.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];
|
||||
$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>";
|
||||
$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>";
|
||||
|
||||
echo "<span style='font-size:9pt;'>$subject</span>";
|
||||
echo "<hr size=0>";
|
||||
|
||||
@ -1,28 +1,28 @@
|
||||
<?
|
||||
$sub_menu = "200300";
|
||||
include_once("./_common.php");
|
||||
include_once('./_common.php');
|
||||
|
||||
if (!$config[cf_email_use])
|
||||
alert("환경설정에서 \'메일발송 사용\'에 체크하셔야 메일을 발송할 수 있습니다.");
|
||||
if (!$config['cf_email_use'])
|
||||
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);
|
||||
if (!$ma[ma_id])
|
||||
alert("보내실 내용을 선택하여 주십시오.");
|
||||
if (!$ma['ma_id'])
|
||||
alert('보내실 내용을 선택하여 주십시오.');
|
||||
|
||||
// 전체회원수
|
||||
$sql = "select COUNT(*) as cnt from $g4[member_table] ";
|
||||
$sql = "select COUNT(*) as cnt from {$g4['member_table']} ";
|
||||
$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);
|
||||
$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++) {
|
||||
$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_area)) $mb_area = 1;
|
||||
|
||||
$g4[title] = "회원메일발송";
|
||||
include_once("./admin.head.php");
|
||||
$g4['title'] = '회원메일발송';
|
||||
include_once('./admin.head.php');
|
||||
?>
|
||||
|
||||
|
||||
@ -55,7 +55,7 @@ include_once("./admin.head.php");
|
||||
<colgroup width=80% class='col2 pad2'>
|
||||
<tr>
|
||||
<td></td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr><td colspan='2' class='line1'></td></tr>
|
||||
<tr class='ht'>
|
||||
@ -64,7 +64,7 @@ include_once("./admin.head.php");
|
||||
<input type=radio name='mb_id1' value='1' onclick="mb_id1_click(1);" <?=$mb_id1?"checked":"";?>> 전체
|
||||
<input type=radio name='mb_id1' value='0' onclick="mb_id1_click(0);" <?=!$mb_id1?"checked":"";?>> 구간
|
||||
<br>
|
||||
<input type=text class=ed id=mb_id1_from name=mb_id1_from value="<?=$mb_id1_from?>"> 에서
|
||||
<input type=text class=ed id=mb_id1_from name=mb_id1_from value="<?=$mb_id1_from?>"> 에서
|
||||
<input type=text class=ed id=mb_id1_to name=mb_id1_to value="<?=$mb_id1_to?>"> 까지
|
||||
|
||||
<script type="text/javascript">
|
||||
@ -89,7 +89,7 @@ include_once("./admin.head.php");
|
||||
<tr class='ht'>
|
||||
<td>생일</td>
|
||||
<td>
|
||||
<input type=text name='mb_birth_from' size=4 maxlength=4 class=ed value="<?=$mb_birth_from?>"> 부터
|
||||
<input type=text name='mb_birth_from' size=4 maxlength=4 class=ed value="<?=$mb_birth_from?>"> 부터
|
||||
<input type=text name='mb_birth_to' size=4 maxlength=4 class=ed value="<?=$mb_birth_to?>"> 까지 (예 : 5월5일 인 경우, 0505 와 같이 입력 , 둘다 입력해야함)</td>
|
||||
</tr>
|
||||
<tr class='ht'>
|
||||
@ -149,7 +149,7 @@ include_once("./admin.head.php");
|
||||
<? for ($i=1; $i<=10; $i++) { ?>
|
||||
<option value='<? echo $i ?>'><? echo $i ?>
|
||||
<? } ?>
|
||||
</select> 에서
|
||||
</select> 에서
|
||||
<select id=mb_level_to name=mb_level_to>
|
||||
<? for ($i=1; $i<=10; $i++) { ?>
|
||||
<option value='<? echo $i ?>'><? echo $i ?>
|
||||
@ -165,11 +165,11 @@ include_once("./admin.head.php");
|
||||
<select id=gr_id name=gr_id>
|
||||
<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);
|
||||
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>
|
||||
@ -188,5 +188,5 @@ include_once("./admin.head.php");
|
||||
|
||||
|
||||
<?
|
||||
include_once("./admin.tail.php");
|
||||
include_once('./admin.tail.php');
|
||||
?>
|
||||
|
||||
@ -1,16 +1,16 @@
|
||||
<?
|
||||
$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();
|
||||
|
||||
$html_title = "선택된 회원메일리스트";
|
||||
$html_title = '선택된 회원메일리스트';
|
||||
|
||||
$ma_last_option = "";
|
||||
|
||||
$sql_common = " from $g4[member_table] ";
|
||||
$sql_common = " from {$g4['member_table']} ";
|
||||
$sql_where = " where (1) ";
|
||||
|
||||
// 회원ID ..에서 ..까지
|
||||
@ -45,16 +45,16 @@ if ($gr_id)
|
||||
{
|
||||
$group_member = "";
|
||||
$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);
|
||||
for ($k=0; $row2=sql_fetch_array($result2); $k++)
|
||||
{
|
||||
$group_member .= "{$comma}'$row2[mb_id]'";
|
||||
$group_member .= "{$comma}'{$row2['mb_id']}'";
|
||||
$comma = ",";
|
||||
}
|
||||
|
||||
if (!$group_member)
|
||||
alert("선택하신 게시판 그룹회원이 한명도 없습니다.");
|
||||
alert('선택하신 게시판 그룹회원이 한명도 없습니다.');
|
||||
|
||||
$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 ";
|
||||
$row = sql_fetch($sql);
|
||||
$cnt = $row[cnt];
|
||||
$cnt = $row['cnt'];
|
||||
if ($cnt == 0)
|
||||
alert("선택하신 내용으로는 해당되는 회원자료가 없습니다.");
|
||||
alert('선택하신 내용으로는 해당되는 회원자료가 없습니다.');
|
||||
|
||||
// 마지막 옵션을 저장합니다.
|
||||
$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 .= "||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>
|
||||
@ -107,11 +107,11 @@ include_once("./admin.head.php");
|
||||
$i=0;
|
||||
$ma_list = "";
|
||||
$cr = "";
|
||||
while ($row=sql_fetch_array($result))
|
||||
while ($row=sql_fetch_array($result))
|
||||
{
|
||||
$i++;
|
||||
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];
|
||||
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];
|
||||
$cr = "\n";
|
||||
}
|
||||
?>
|
||||
@ -128,7 +128,7 @@ include_once("./admin.head.php");
|
||||
|
||||
</td></tr></table>
|
||||
|
||||
<script type='text/javascript'>
|
||||
<script type='text/javascript'>
|
||||
function fmailselectlist_submit(f)
|
||||
{
|
||||
f.action = "./mail_select_update.php";
|
||||
@ -137,5 +137,5 @@ function fmailselectlist_submit(f)
|
||||
</script>
|
||||
|
||||
<?
|
||||
include_once("./admin.tail.php");
|
||||
include_once('./admin.tail.php');
|
||||
?>
|
||||
|
||||
@ -1,17 +1,17 @@
|
||||
<?
|
||||
$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_token();
|
||||
|
||||
include_once("./admin.head.php");
|
||||
include_once("$g4[path]/lib/mailer.lib.php");
|
||||
include_once('./admin.head.php');
|
||||
include_once($g4['path'].'/lib/mailer.lib.php');
|
||||
|
||||
$countgap = 10; // 몇건씩 보낼지 설정
|
||||
$maxscreen = 500; // 몇건씩 화면에 보여줄건지?
|
||||
@ -25,46 +25,46 @@ echo "</span>";
|
||||
<span id="cont"></span>
|
||||
|
||||
<?
|
||||
include_once("./admin.tail.php");
|
||||
include_once('./admin.tail.php');
|
||||
?>
|
||||
|
||||
<?
|
||||
flush();
|
||||
ob_flush();
|
||||
|
||||
$ma_id = trim($_POST[ma_id]);
|
||||
$select_member_list = addslashes(trim($_POST[ma_list]));
|
||||
$ma_id = trim($_POST['ma_id']);
|
||||
$select_member_list = addslashes(trim($_POST['ma_list']));
|
||||
|
||||
//print_r2($_POST); EXIT;
|
||||
$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);
|
||||
|
||||
$subject = $ma[ma_subject];
|
||||
$subject = $ma['ma_subject'];
|
||||
|
||||
$cnt = 0;
|
||||
for ($i=0; $i<count($member_list); $i++)
|
||||
for ($i=0; $i<count($member_list); $i++)
|
||||
{
|
||||
list($email, $mb_id, $name, $nick, $birth, $datetime) = explode("||", trim($member_list[$i]));
|
||||
|
||||
$sw = preg_match("/[0-9a-zA-Z_]+(\.[0-9a-zA-Z_]+)*@[0-9a-zA-Z_]+(\.[0-9a-zA-Z_]+)*/", $email);
|
||||
// 올바른 메일 주소만
|
||||
if ($sw == true)
|
||||
if ($sw == true)
|
||||
{
|
||||
$cnt++;
|
||||
|
||||
$mb_md5 = md5($mb_id.$email.$datetime);
|
||||
|
||||
$content = $ma[ma_content];
|
||||
$content = $ma['ma_content'];
|
||||
$content = preg_replace("/{이름}/", $name, $content);
|
||||
$content = preg_replace("/{별명}/", $nick, $content);
|
||||
$content = preg_replace("/{회원아이디}/", $mb_id, $content);
|
||||
$content = preg_replace("/{이메일}/", $email, $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}&mb_md5={$mb_md5}' target='_blank'>수신거부</a>] 해 주십시오.</span></p>";
|
||||
|
||||
/*
|
||||
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($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 "+";
|
||||
@ -82,7 +82,7 @@ for ($i=0; $i<count($member_list); $i++)
|
||||
ob_flush();
|
||||
ob_end_flush();
|
||||
usleep($sleepsec);
|
||||
if ($cnt % $countgap == 0)
|
||||
if ($cnt % $countgap == 0)
|
||||
{
|
||||
echo "<script> document.all.cont.innerHTML += '<br>'; document.body.scrollTop += 1000; </script>\n";
|
||||
}
|
||||
|
||||
@ -1,41 +1,41 @@
|
||||
<?
|
||||
$sub_menu = "200300";
|
||||
include_once("./_common.php");
|
||||
include_once('./_common.php');
|
||||
|
||||
if (!$config[cf_email_use])
|
||||
alert("환경설정에서 \'메일발송 사용\'에 체크하셔야 메일을 발송할 수 있습니다.");
|
||||
if (!$config['cf_email_use'])
|
||||
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();
|
||||
|
||||
$g4[title] = "회원메일 테스트";
|
||||
$g4[title] = '회원메일 테스트';
|
||||
|
||||
$name = $member[mb_name];
|
||||
$nick = $member[mb_nick];
|
||||
$mb_id = $member[mb_id];
|
||||
$email = $member[mb_email];
|
||||
$birth = $member[mb_birth];
|
||||
$name = $member['mb_name'];
|
||||
$nick = $member['mb_nick'];
|
||||
$mb_id = $member['mb_id'];
|
||||
$email = $member['mb_email'];
|
||||
$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);
|
||||
|
||||
$subject = $ma[ma_subject];
|
||||
$subject = $ma['ma_subject'];
|
||||
|
||||
$content = $ma[ma_content];
|
||||
$content = $ma['ma_content'];
|
||||
$content = preg_replace("/{이름}/", $name, $content);
|
||||
$content = preg_replace("/{별명}/", $nick, $content);
|
||||
$content = preg_replace("/{회원아이디}/", $mb_id, $content);
|
||||
$content = preg_replace("/{이메일}/", $email, $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}&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확인하여 주십시오.");
|
||||
?>
|
||||
|
||||
@ -1,39 +1,39 @@
|
||||
<?
|
||||
$sub_menu = "200300";
|
||||
include_once("./_common.php");
|
||||
include_once('./_common.php');
|
||||
|
||||
if ($w == 'u' || $w == 'd')
|
||||
check_demo();
|
||||
|
||||
auth_check($auth[$sub_menu], "w");
|
||||
auth_check($auth[$sub_menu], 'w');
|
||||
|
||||
check_token();
|
||||
|
||||
if ($w == "")
|
||||
if ($w == '')
|
||||
{
|
||||
$sql = " insert $g4[mail_table]
|
||||
set ma_id = '$_POST[ma_id]',
|
||||
ma_subject = '$_POST[ma_subject]',
|
||||
ma_content = '$_POST[ma_content]',
|
||||
ma_time = '$g4[time_ymdhis]',
|
||||
ma_ip = '$_SERVER[REMOTE_ADDR]' ";
|
||||
$sql = " insert {$g4['mail_table']}
|
||||
set ma_id = '{$_POST['ma_id']}',
|
||||
ma_subject = '{$_POST['ma_subject']}',
|
||||
ma_content = '{$_POST['ma_content']}',
|
||||
ma_time = '{$g4['time_ymdhis']}',
|
||||
ma_ip = '{$_SERVER['REMOTE_ADDR']}' ";
|
||||
sql_query($sql);
|
||||
}
|
||||
else if ($w == "u")
|
||||
}
|
||||
else if ($w == 'u')
|
||||
{
|
||||
$sql = " update $g4[mail_table]
|
||||
set ma_subject = '$_POST[ma_subject]',
|
||||
ma_content = '$_POST[ma_content]',
|
||||
ma_time = '$g4[time_ymdhis]',
|
||||
ma_ip = '$_SERVER[REMOTE_ADDR]'
|
||||
where ma_id = '$_POST[ma_id]' ";
|
||||
$sql = " update {$g4['mail_table']}
|
||||
set ma_subject = '{$_POST['ma_subject']}',
|
||||
ma_content = '{$_POST['ma_content']}',
|
||||
ma_time = '{$g4['time_ymdhis']}',
|
||||
ma_ip = '{$_SERVER['REMOTE_ADDR']}'
|
||||
where ma_id = '{$_POST['ma_id']}' ";
|
||||
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);
|
||||
}
|
||||
|
||||
goto_url("./mail_list.php");
|
||||
goto_url('./mail_list.php');
|
||||
?>
|
||||
|
||||
Reference in New Issue
Block a user