회원메일발송에서 자바스크립트 오류 해결하고, 생일, 성별, 지역 구분 삭제

This commit is contained in:
gnuboard
2013-01-21 18:48:23 +09:00
parent 05bc1fda26
commit 96fabfd7de
5 changed files with 6 additions and 75 deletions

View File

@ -38,7 +38,7 @@ include_once('./admin.head.php');
<tr>
<th scope="row"><label for="ma_content">메일 내용<strong class="sound_only">필수</strong></label></th>
<td>
<?=help('{이름} , {별명} , {회원아이디} , {이메일} , {생일} 처럼 HTML 코드에 삽입하면 해당 내용에 맞게 변환하여 메일 발송합니다.')?>
<?=help('{이름} , {별명} , {회원아이디} , {이메일} 처럼 HTML 코드에 삽입하면 해당 내용에 맞게 변환하여 메일 발송합니다.')?>
<?=textarea_size('ma_content')?>
<textarea id="ma_content" name="ma_content" rows="20" class="required" required title="메일내용"><?=$ma['ma_content']?></textarea>
</td>

View File

@ -34,8 +34,6 @@ if (!isset($mb_id1)) $mb_id1 = 1;
if (!isset($mb_level_from)) $mb_level_from = 1;
if (!isset($mb_level_to)) $mb_level_to = 10;
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');
@ -59,58 +57,12 @@ include_once('./admin.head.php');
<input type="radio" id="mb_id1_section" name="mb_id1" value="0" <?=!$mb_id1?"checked":"";?>> <label for="mb_id1_section">구간</label>
<input type="text" id="mb_id1_from" name="mb_id1_from" value="<?=$mb_id1_from?>" title="시작구간"> 에서
<input type="text" id="mb_id1_to" name="mb_id1_to" value="<?=$mb_id1_to?>" title="종료구간"> 까지
<script>document.onLoad=mb_id1_click(<?=(int)$mb_id1?>);</script>
</td>
</tr>
<tr>
<th scope="row"><label for="mb_birth_from">생일</label></th>
<td>
<?=help('5월5일 인 경우, 0505 와 같이 입력 , 둘다 입력해야함')?>
<input type="text" id="mb_birth_from" name="mb_birth_from" maxlength="4" value="<?=$mb_birth_from?>" title="생일구간 시작일" size="6"> 부터
<input type="text" id="mb_birth_to" name="mb_birth_to" maxlength="4" value="<?=$mb_birth_to?>" title="생일구간 종료일" size="6"> 까지
</td>
</tr>
<tr>
<th scope="row"><label for="mb_email">E-mail</label></th>
<td><input type="text" id="mb_email" name="mb_email" value="<?=$mb_email?>" size="50"> 단어 포함 (예 : @sir.co.kr)</td>
</tr>
<tr>
<th scope="row"><label for="mb_sex">성별</label></th>
<td>
<select id="mb_sex" name="mb_sex">
<option value="">전체</option>
<option value="F">여자</option>
<option value="M">남자</option>
</select>
<script> document.getElementById('mb_sex').value = '<?=$mb_sex?>'; </script>
</td>
</tr>
<tr>
<th scope="row"><label for="mb_area">지역</label></th>
<td>
<select id="mb_area" name="mb_area">
<option value="">전체</option>
<option value="서울">서울</option>
<option value="부산">부산</option>
<option value="대구">대구</option>
<option value="인천">인천</option>
<option value="광주">광주</option>
<option value="대전">대전</option>
<option value="울산">울산</option>
<option value="강원">강원</option>
<option value="경기">경기</option>
<option value="경남">경남</option>
<option value="경북">경북</option>
<option value="전남">전남</option>
<option value="전북">전북</option>
<option value="제주">제주</option>
<option value="충남">충남</option>
<option value="충북">충북</option>
</select>
<script> document.getElementById('mb_area').value = '<?=$mb_area?>'; </script>
</td>
</tr>
<tr>
<th scope="row"><label for="mb_mailling">메일링</label></th>
<td>

View File

@ -19,18 +19,6 @@ if ($mb_id1 != 1)
if ($mb_email != "")
$sql_where .= " and mb_email like '%{$mb_email}%' ";
// 성별
if ($mb_sex != "")
$sql_where .= " and mb_sex = '{$mb_sex}' ";
// 생일
if ($mb_birth_from && $mb_birth_to)
$sql_where .= " and substring(mb_birth,5,4) between '{$mb_birth_from}' and '{$mb_birth_to}' ";
// 지역
if ($mb_area != "")
$sql_where .= " and mb_addr1 like '{$mb_area}%' ";
// 메일링
if ($mb_mailling != "")
$sql_where .= " and mb_mailling = '{$mb_mailling}' ";
@ -39,14 +27,12 @@ if ($mb_mailling != "")
$sql_where .= " and mb_level between '{$mb_level_from}' and '{$mb_level_to}' ";
// 게시판그룹회원
if ($gr_id)
{
if ($gr_id) {
$group_member = "";
$comma = "";
$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++)
{
for ($k=0; $row2=sql_fetch_array($result2); $k++) {
$group_member .= "{$comma}'{$row2['mb_id']}'";
$comma = ",";
}
@ -71,10 +57,6 @@ $ma_last_option .= "mb_id1={$mb_id1}";
$ma_last_option .= "||mb_id1_from={$mb_id1_from}";
$ma_last_option .= "||mb_id1_to={$mb_id1_to}";
$ma_last_option .= "||mb_email={$mb_email}";
$ma_last_option .= "||mb_sex={$mb_sex}";
$ma_last_option .= "||mb_birth_from={$mb_birth_from}";
$ma_last_option .= "||mb_birth_to={$mb_birth_to}";
$ma_last_option .= "||mb_area={$mb_area}";
$ma_last_option .= "||mb_mailling={$mb_mailling}";
$ma_last_option .= "||mb_level_from={$mb_level_from}";
$ma_last_option .= "||mb_level_to={$mb_level_to}";
@ -103,7 +85,7 @@ include_once('./admin.head.php');
</thead>
<tbody>
<?
$sql = " select mb_id, mb_name, mb_nick, mb_email, mb_birth, mb_datetime $sql_common $sql_where order by mb_id ";
$sql = " select mb_id, mb_name, mb_nick, mb_email, mb_datetime $sql_common $sql_where order by mb_id ";
$result = sql_query($sql);
$i=0;
$ma_list = "";
@ -111,7 +93,7 @@ $cr = "";
while ($row=sql_fetch_array($result))
{
$i++;
$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_datetime'];
$cr = PHP_EOL;
?>
<tr>

View File

@ -47,7 +47,7 @@ $subject = $ma['ma_subject'];
$cnt = 0;
for ($i=0; $i<count($member_list); $i++)
{
list($email, $mb_id, $name, $nick, $birth, $datetime) = explode("||", trim($member_list[$i]));
list($email, $mb_id, $name, $nick, $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);
// 올바른 메일 주소만
@ -62,7 +62,6 @@ for ($i=0; $i<count($member_list); $i++)
$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}&amp;mb_md5={$mb_md5}' target='_blank'>수신거부</a>] 해 주십시오.</span></p>";

View File

@ -17,7 +17,6 @@ $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}' ";
$ma = sql_fetch($sql);
@ -29,7 +28,6 @@ $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']);