새글이 올라오면 관리자에게 메일 발송

새글이 올라오면 관리자에게 메일 발송

QA

새글이 올라오면 관리자에게 메일 발송

본문

새글이 올라오면 관리자에게 메일 발송을 하고 싶은데요 

기본 게시판 스킨으로 세탕 하면 잘 오는데,

예약 스킨을 쓰면 메일이 안 옵니다

 

소스 첨부해 봅니다

 

write.skin..php

*************************************************

<?php

if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가

 

// add_stylesheet('css 구문', 출력순서); 숫자가 작을 수록 먼저 출력됨

add_stylesheet('<link rel="stylesheet" href="'.$board_skin_url.'/style.css">', 0);

 

$arr_wr_1 = explode("|",$write['wr_1']);

$arr_wr_2 = explode("|",$write['wr_2']);

$arr_wr_3 = explode("|",$write['wr_3']);

$arr_wr_4 = explode("|",$write['wr_4']);

$arr_wr_5 = explode("|",$write['wr_5']);

?>

 

<?

//==============================================================================

// jquery date picker

//------------------------------------------------------------------------------

// 참고) ie 에서는 년, 월 select box 를 두번씩 클릭해야 하는 오류가 있습니다.

//------------------------------------------------------------------------------

// jquery-ui.css 의 테마를 변경해서 사용할 수 있습니다.

// base, black-tie, blitzer, cupertino, dark-hive, dot-luv, eggplant, excite-bike, flick, hot-sneaks, humanity, le-frog, mint-choc, overcast, pepper-grinder, redmond, smoothness, south-street, start, sunny, swanky-purse, trontastic, ui-darkness, ui-lightness, vader

// 아래 css 는 date picker 의 화면을 맞추는 코드입니다.

?>

 

<link rel="stylesheet" href="https://ajax.googleapis.com/ajax/libs/jqueryui/1.11.4/themes/smoothness/jquery-ui.css">

<style type="text/css">

<!--

.ui-datepicker { font:12px dotum; }

.ui-datepicker select.ui-datepicker-month,

.ui-datepicker select.ui-datepicker-year { width: 70px;}

.ui-datepicker-trigger { margin:0 0 -5px 2px; }

-->

</style>

<script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.11.4/jquery-ui.min.js"></script>

<script type="text/javascript">

/* Korean initialisation for the jQuery calendar extension. */

/* Written by DaeKwon Kang (*** 개인정보보호를 위한 이메일주소 노출방지 ***). */

jQuery(function($){

$.datepicker.regional['ko'] = {

closeText: '닫기',

prevText: '이전달',

nextText: '다음달',

currentText: '오늘',

monthNames: ['1월(JAN)','2월(FEB)','3월(MAR)','4월(APR)','5월(MAY)','6월(JUN)',

'7월(JUL)','8월(AUG)','9월(SEP)','10월(OCT)','11월(NOV)','12월(DEC)'],

monthNamesShort: ['1월','2월','3월','4월','5월','6월',

'7월','8월','9월','10월','11월','12월'],

dayNames: ['일','월','화','수','목','금','토'],

dayNamesShort: ['일','월','화','수','목','금','토'],

dayNamesMin: ['일','월','화','수','목','금','토'],

weekHeader: 'Wk',

dateFormat: 'yy-mm-dd',

firstDay: 0,

isRTL: false,

showMonthAfterYear: true,

yearSuffix: ''};

$.datepicker.setDefaults($.datepicker.regional['ko']);

 

$('#wr_3_0').datepicker({

showOn: 'both',

//buttonImage: '//jqueryui.com/resources/demos/datepicker/images/calendar.gif',

//buttonImageOnly: true,

buttonText: "달력",

changeMonth: true,

changeYear: true,

showButtonPanel: true,

yearRange: 'c-99:c+99',

minDate: '+0d'

});

});

</script>

 

<section id="bo_w">

 

 

<!-- 게시물 작성/수정 시작 { -->

<form name="fwrite" id="fwrite" action="<?php echo $action_url ?>" onsubmit="return fwrite_submit(this);" method="post" enctype="multipart/form-data" autocomplete="off" style="width:<?php echo $width; ?>">

<input type="hidden" name="uid" value="<?php echo get_uniqid(); ?>">

<input type="hidden" name="w" value="<?php echo $w ?>">

<input type="hidden" name="bo_table" value="<?php echo $bo_table ?>">

<input type="hidden" name="wr_id" value="<?php echo $wr_id ?>">

<input type="hidden" name="sca" value="<?php echo $sca ?>">

<input type="hidden" name="sfl" value="<?php echo $sfl ?>">

<input type="hidden" name="stx" value="<?php echo $stx ?>">

<input type="hidden" name="spt" value="<?php echo $spt ?>">

<input type="hidden" name="sst" value="<?php echo $sst ?>">

<input type="hidden" name="sod" value="<?php echo $sod ?>">

<input type="hidden" name="page" value="<?php echo $page ?>">

<?php

$option = '';

$option_hidden = '';

if ($is_notice || $is_html || $is_secret || $is_mail) {

$option = '';

if ($is_notice) {

$option .= "\n".'<input type="checkbox" id="notice" name="notice" value="1" '.$notice_checked.'>'."\n".'<label for="notice">공지</label>';

}

 

if ($is_html) {

if ($is_dhtml_editor) {

$option_hidden .= '<input type="hidden" value="html1" name="html">';

} else {

$option .= "\n".'<input type="checkbox" id="html" name="html" onclick="html_auto_br(this);" value="'.$html_value.'" '.$html_checked.'>'."\n".'<label for="html">html</label>';

}

}

 

if ($is_secret) {

if ($is_admin || $is_secret==1) {

$option .= "\n".'<input type="checkbox" id="secret" name="secret" value="secret" '.$secret_checked.'>'."\n".'<label for="secret">비밀글</label>';

} else {

$option_hidden .= '<input type="hidden" name="secret" value="secret">';

}

}

 

if ($is_mail) {

$option .= "\n".'<input type="checkbox" id="mail" name="mail" value="mail" '.$recv_email_checked.'>'."\n".'<label for="mail">답변메일받기</label>';

}

 

echo $option_hidden;

?>

 

<div class="tbl_frm01 tbl_wrap">

<table>

<tbody>

 

 

<tr>

<th scope="row"><label for="wr_subject">제목<strong class="sound_only">필수</strong></label></th>

<td>

<div id="autosave_wrapper">

<input type="text" name="wr_subject" value="<?php echo $subject ?>" id="wr_subject" required class="frm_input required" size="50" maxlength="255">

<?php if ($is_member) { // 임시 저장된 글 기능 ?>

<script src="<?php echo G5_JS_URL; ?>/autosave.js"></script>

<button type="button" id="btn_autosave" class="btn_frmline">임시 저장된 글 (<span id="autosave_count"><?php echo $autosave_count; ?></span>)</button>

<div id="autosave_pop">

<strong>임시 저장된 글 목록</strong>

<div><button type="button" class="autosave_close"><img src="<?php echo $board_skin_url; ?>/img/btn_close.gif" alt="닫기"></button></div>

<ul></ul>

<div><button type="button" class="autosave_close"><img src="<?php echo $board_skin_url; ?>/img/btn_close.gif" alt="닫기"></button></div>

</div>

<?php } ?>

</div>

</td>

</tr>

<?php if ($is_name) { ?>

<tr>

<th scope="row"><label for="wr_name">신청자<strong class="sound_only">필수</strong></label></th>

<td><input type="text" name="wr_name" value="<?php echo $name ?>" id="wr_name" required class="frm_input required" size="10" maxlength="20"></td>

</tr>

<?php } ?>

 

<?php if ($is_password) { ?>

<tr>

<th scope="row"><label for="wr_password">비밀번호<strong class="sound_only">필수</strong></label></th>

<td><input type="password" name="wr_password" id="wr_password" <?php echo $password_required ?> class="frm_input <?php echo $password_required ?>" maxlength="20"></td>

</tr>

<?php } ?>

 

<?php if ($is_category) { ?>

<tr>

<th scope="row"><label for="ca_name">분류<strong class="sound_only">필수</strong></label></th>

<td>

<select name="ca_name" id="ca_name" required class="required" >

<option value="">선택하세요</option>

<?php echo $category_option ?>

</select>

</td>

</tr>

<?php } ?>

 

 

 

<tr>

<th scope="row"><label for="wr_1_0">아기이름</label></th>

<td><input type="text" name="wr_1_0" value="<?php echo htmlspecialchars($arr_wr_1[0],ENT_QUOTES) ?>" id="wr_1_0" class="frm_input" size="20"></td>

</tr>

<th scope="row"><label for="wr_5">아기성별</label></th>

<td>

<label><input type="checkbox" name="wr_5_0" id="wr_5_0" value="남자" <?php if($arr_wr_5[0] == "남자") echo "checked"; ?>><font color="#ffffff"> 남자  </font></label>

<label><input type="checkbox" name="wr_5_1" id="wr_5_1" value="여자" <?php if($arr_wr_5[1] == "여자") echo "checked"; ?>><font color="#ffffff"> 여자  </font></label>

</td>

</tr>

<tr>

<th scope="row"><label for="wr_1_1">형제관계</label></th>

<td><input type="text" name="wr_1_1" value="<?php echo htmlspecialchars($arr_wr_1[0],ENT_QUOTES) ?>" id="wr_1_1" class="frm_input" size="20"></td>

</tr>

<tr>

<th scope="row"><label for="wr_1_2">연락처</label></th>

<td><input required type="text" name="wr_1_2" value="<?php echo htmlspecialchars($arr_wr_1[2],ENT_QUOTES) ?>" id="wr_1_2" class="frm_input" size="20"></td>

</tr>

<!-- <tr>

<th scope="row"><label for="wr_1_3">휴대전화</label></th>

<td><input type="text" name="wr_1_3" value="<?php echo htmlspecialchars($arr_wr_1[3],ENT_QUOTES) ?>" id="wr_1_3" class="frm_input" size="20"></td>

</tr> -->

 

<?php //if ($is_email) { ?>

<tr>

<th scope="row"><label for="wr_email">이메일</label></th>

<td><input type="text" name="wr_email" value="<?php echo $email ?>" id="wr_email" class="frm_input email" size="50" maxlength="100"></td>

</tr>

<?php //} ?>

 

<tr>

<th scope="row"><label for="wr_3_0">행사날짜</label></th>

<td><input type="text" name="wr_3_0" value="<?php echo htmlspecialchars($arr_wr_3[0],ENT_QUOTES) ?>" id="wr_3_0" class="frm_input" size="12"></td>

</tr>

<tr>

<th scope="row"><label for="wr_3_1">행사시간</label></th>

<td><input type="text" name="wr_3_1" value="<?php echo htmlspecialchars($arr_wr_3[1],ENT_QUOTES) ?>" id="wr_3_1" class="frm_input" size="50"></td>

</tr>

<tr>

<th scope="row"><label for="wr_3_2">행사장소</label></th>

<td><input type="text" name="wr_3_2" value="<?php echo htmlspecialchars($arr_wr_3[2],ENT_QUOTES) ?>" id="wr_3_2" class="frm_input" size="50"><font color="#ffffff"> * 홀까지 정확하게 기재해 주세요</font></td>

</tr>

<tr>

<th scope="row"><label for="wr_3_3">예약금 입금자명</label></th>

<td><input type="text" name="wr_3_3" value="<?php echo htmlspecialchars($arr_wr_3[3],ENT_QUOTES) ?>" id="wr_3_3" class="frm_input" size="50"></td>

</tr>

<tr>

<th scope="row"><label for="wr_1_4">메이크업 시간/장소</label></th>

<td><input type="text" name="wr_1_4" value="<?php echo htmlspecialchars($arr_wr_1[4],ENT_QUOTES) ?>" id="wr_3_5" class="frm_input" size="50"></td>

</tr>

 

<tr>

<th scope="row"><label for="wr_3_4">상품받을주소</label></th>

<td><input type="text" name="wr_3_4" value="<?php echo htmlspecialchars($arr_wr_3[4],ENT_QUOTES) ?>" id="wr_3_4" class="frm_input" size="80"></td>

</tr>

<tr>

<th scope="row"><label for="wr_2">상품선택</label></th>

<td><font color="#fff">

<label><input type="checkbox" name="wr_2_1" id="wr_2_1" value="돌스냅" <?php if($arr_wr_2[1] == "돌스냅") echo "checked"; ?>><font color="#ffffff"> 돌스냅  </font></label>

<label><input type="checkbox" name="wr_2_2" id="wr_2_2" value="홈스냅" <?php if($arr_wr_2[2] == "홈스냅") echo "checked"; ?>><font color="#ffffff"> 홈스냅  </font></label>

<label><input type="checkbox" name="wr_2_3" id="wr_2_3" value="야외스냅" <?php if($arr_wr_2[3] == "야외스냅") echo "checked"; ?>><font color="#ffffff"> 야외스냅  </font></label>

</font>

</td>

</tr>

<tr>

<th scope="row"><label for="wr_4">상품종류</label></th>

<td><font color="#fff">

<label><input type="checkbox" name="wr_4_1" id="wr_4_1" value="파일형" <?php if($arr_wr_4[1] == "파일형") echo "checked"; ?>><font color="#ffffff"> 파일형  </font></label>

<label><input type="checkbox" name="wr_4_2" id="wr_4_2" value="인화형" <?php if($arr_wr_4[2] == "인화형") echo "checked"; ?>><font color="#ffffff"> 인화형  </font></label>

<label><input type="checkbox" name="wr_4_3" id="wr_4_3" value="앨범형 일반" <?php if($arr_wr_4[3] == "앨범형 일반") echo "checked"; ?>><font color="#ffffff"> 앨범형 일반  </font></label>

<label><input type="checkbox" name="wr_4_4" id="wr_4_4" value="앨범형 고급" <?php if($arr_wr_4[4] == "앨범형 고급") echo "checked"; ?>><font color="#ffffff"> 앨범형 고급  </font></label>

</font>

</td>

</tr>

<tr>

<th scope="row"><label for="wr_5_2"><font color="#ffffff">약관에 동의</font></label></th>

<td>

<label><input type="checkbox" name="wr_5_2" id="wr_5_2" required class="required"  value="Y" <?php if($arr_wr_5[2] == "Y") echo "checked"; ?>>

<font color="#ffffff">

아래의 공지사항을 읽고 이에 동의합니다<br><br><br>

<br> 공지사항<br><br>

■ 예약 이후 돌잔치 장소 및 시간이 변경 될 경우 예약이 취소됩니다.<br><br>

■ 변경 및 계약취소로 인한 예약금 환불은 불가합니다.<br><br>

■ 예약금 환불은 입금 후 3일 이내에만 가능합니다. 3일 이후 에는 예약금 환불이 되지 않음을 알려드립니다.<br><br>

■ 심각한 건강상의 사유 및 천재지변을 비롯한 불가항력적인 사유로 촬영을 진행하지 못하게 되었을 때, 계약한 상품 총가격의 20%를 위약금으로 배상합니다. <br><br>

■ 또한 촬영원본의 멸실 등의 사고가 발생한 경우, 손실 정도에 따라 상호 합의하에 위약금의 2배까지 배상합니다.<br><br>

■ 사진보정은 기본적인 색감보정 외에 원형을 변경하는 보정은 하지 않습니다. (몸매, 성형 보정 등)<br><br>

■ 촬영한 사진은 작가의 포트폴리오용으로 사이트에 게시됨을 원칙으로 합니다.<br><br>

■ 상품 배송은 행사 종료일로부터 약 두 달 정도가 소요됩니다. 정성이 소요되는 시간이므로 더 일찍 보내드리지 못하는 점 양해바랍니다.<br><br>

■ 원본은 배송 후 약 한 달 이후에 삭제합니다. 따라서 원본 CD는 상품을 받으시고 별도로 백업해주시기 바랍니다. <br><br>

■ 배송 후 한 달 이후의 상품관련 문제에 대해서는 책임지지 않습니다.<br><br>

■ 행사 1주일 전 예약 취소 시 계약금의 50% 추가 위약금이 발생합니다.<br><br>

<br><br> </font>

</label>

</td>

</tr>

<tr>

<th scope="row"><label for="wr_content">내용<strong class="sound_only">필수</strong></label></th>

<td class="wr_content">

<?php if($write_min || $write_max) { ?>

<!-- 최소/최대 글자 수 사용 시 -->

<p id="char_count_desc">이 게시판은 최소 <strong><?php echo $write_min; ?></strong>글자 이상, 최대 <strong><?php echo $write_max; ?></strong>글자 이하까지 글을 쓰실 수 있습니다.</p>

<?php } ?>

<?php echo $editor_html; // 에디터 사용시는 에디터로, 아니면 textarea 로 노출 ?>

<?php if($write_min || $write_max) { ?>

<!-- 최소/최대 글자 수 사용 시 -->

<div id="char_count_wrap"><span id="char_count"></span>글자</div>

<?php } ?>

</td>

</tr>

 

<?php for ($i=1; $is_link && $i<=G5_LINK_COUNT; $i++) { ?>

<tr>

<th scope="row"><label for="wr_link<?php echo $i ?>">링크 #<?php echo $i ?></label></th>

<td><input type="text" name="wr_link<?php echo $i ?>" value="<?php if($w=="u"){echo$write['wr_link'.$i];} ?>" id="wr_link<?php echo $i ?>" class="frm_input" size="50"></td>

</tr>

<?php } ?>

 

<?php for ($i=0; $is_file && $i<$file_count; $i++) { ?>

<tr>

<th scope="row">파일 #<?php echo $i+1 ?></th>

<td>

<input type="file" name="bf_file[]" title="파일첨부 <?php echo $i+1 ?> : 용량 <?php echo $upload_max_filesize ?> 이하만 업로드 가능" class="frm_file frm_input">

<?php if ($is_file_content) { ?>

<input type="text" name="bf_content[]" value="<?php echo ($w == 'u') ? $file[$i]['bf_content'] : ''; ?>" title="파일 설명을 입력해주세요." class="frm_file frm_input" size="50">

<?php } ?>

<?php if($w == 'u' && $file[$i]['file']) { ?>

<input type="checkbox" id="bf_file_del<?php echo $i ?>" name="bf_file_del[<?php echo $i;  ?>]" value="1"> <label for="bf_file_del<?php echo $i ?>"><?php echo $file[$i]['source'].'('.$file[$i]['size'].')';  ?> 파일 삭제</label>

<?php } ?>

</td>

</tr>

<?php } ?>

 

<?php if ($option) { ?>

<tr>

<th scope="row">옵션</th>

<td><?php echo $option ?></td>

</tr>

<?php } ?>

 

 

</tbody>

</table>

</div>

 

<div class="btn_confirm">

<input type="submit" value="작성완료" id="btn_submit" accesskey="s" class="btn_submit">

<a href="./board.php?bo_table=<?php echo $bo_table ?>" class="btn_cancel">취소</a>

</div>

</form>

 

<script>

<?php if($write_min || $write_max) { ?>

// 글자수 제한

var char_min = parseInt(<?php echo $write_min; ?>); // 최소

var char_max = parseInt(<?php echo $write_max; ?>); // 최대

check_byte("wr_content", "char_count");

 

$(function() {

$("#wr_content").on("keyup", function() {

check_byte("wr_content", "char_count");

});

});

 

<?php } ?>

function html_auto_br(obj)

{

if (obj.checked) {

result = confirm("자동 줄바꿈을 하시겠습니까?\n\n자동 줄바꿈은 게시물 내용중 줄바뀐 곳을<br>태그로 변환하는 기능입니다.");

if (result)

obj.value = "html2";

else

obj.value = "html1";

}

else

obj.value = "";

}

 

function fwrite_submit(f)

{

<?php echo $editor_js; // 에디터 사용시 자바스크립트에서 내용을 폼필드로 넣어주며 내용이 입력되었는지 검사함   ?>

 

var subject = "";

var content = "";

$.ajax({

url: g5_bbs_url+"/ajax.filter.php",

type: "POST",

data: {

"subject": f.wr_subject.value,

"content": f.wr_content.value

},

dataType: "json",

async: false,

cache: false,

success: function(data, textStatus) {

subject = data.subject;

content = data.content;

}

});

 

if (subject) {

alert("제목에 금지단어('"+subject+"')가 포함되어있습니다");

f.wr_subject.focus();

return false;

}

 

if (content) {

alert("내용에 금지단어('"+content+"')가 포함되어있습니다");

if (typeof(ed_wr_content) != "undefined")

ed_wr_content.returnFalse();

else

f.wr_content.focus();

return false;

}

 

if (document.getElementById("char_count")) {

if (char_min > 0 || char_max > 0) {

var cnt = parseInt(check_byte("wr_content", "char_count"));

if (char_min > 0 && char_min > cnt) {

alert("내용은 "+char_min+"글자 이상 쓰셔야 합니다.");

return false;

}

else if (char_max > 0 && char_max < cnt) {

alert("내용은 "+char_max+"글자 이하로 쓰셔야 합니다.");

return false;

}

}

}

 

 

<?php echo $captcha_js; // 캡챠 사용시 자바스크립트에서 입력된 캡챠를 검사함  ?>

 

document.getElementById("btn_submit").disabled = "disabled";

 

return true;

}

</script>

</section>

<!-- } 게시물 작성/수정 끝 -->

********************************

 

 

 

 

 

write_update.skin.php

************************************

<?

if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가

 

$wr_1 = "$wr_1_0|$wr_1_1|$wr_1_2|$wr_1_3|$wr_1_4";

$sql1 = " update {$write_table} set wr_1 = '{$wr_1}' where wr_id = '{$wr_id}' ";

sql_query($sql1);

 

$wr_2 = "$wr_2_0|$wr_2_1|$wr_2_2|$wr_2_3|$wr_2_4";

$sql2 = " update {$write_table} set wr_2 = '{$wr_2}' where wr_id = '{$wr_id}' ";

sql_query($sql2);

 

$wr_3 = "$wr_3_0|$wr_3_1|$wr_3_2|$wr_3_3|$wr_3_4";

$sql3 = " update {$write_table} set wr_3 = '{$wr_3}' where wr_id = '{$wr_id}' ";

sql_query($sql3);

 

$wr_4 = "$wr_4_0|$wr_4_1|$wr_4_2|$wr_4_3|$wr_4_4";

$sql4 = " update {$write_table} set wr_4 = '{$wr_4}' where wr_id = '{$wr_id}' ";

sql_query($sql4);

 

$wr_5 = "$wr_5_0|$wr_5_1|$wr_5_2|$wr_5_3|$wr_5_4";

$sql5 = " update {$write_table} set wr_5 = '{$wr_5}' where wr_id = '{$wr_id}' ";

sql_query($sql5);

 

?>

 *************************************

 

 

왜 그럴까요 ?

알수가 없군요

 

이 질문에 댓글 쓰기 :

답변 1

다른거없구여
write_update.php
파일에서 메일보내는 함수에서
값이 누락되었을가능성이 큼니다
스킨이 바꼇으니 메일함수에서 필요한값이
바뀌었을수 있겟네여
mail함수 부분에서 값찍어보세여
답변을 작성하시기 전에 로그인 해주세요.
전체 207
QA 내용 검색

회원로그인

(주)에스아이알소프트 / 대표:홍석명 / (06211) 서울특별시 강남구 역삼동 707-34 한신인터밸리24 서관 1404호 / E-Mail: admin@sir.kr
사업자등록번호: 217-81-36347 / 통신판매업신고번호:2014-서울강남-02098호 / 개인정보보호책임자:김민섭(minsup@sir.kr)
© SIRSOFT