Files
firstgarden-web-gnu/skin/member/neo/formmail.skin.php
2012-12-06 11:40:00 +09:00

98 lines
3.0 KiB
PHP

<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
?>
<section>
<h1><?=$name?>님께 메일보내기</h1>
<form name="fformmail" method="post" onsubmit="return fformmail_submit(this);" enctype="multipart/form-data" style="margin:0px;">
<input type="hidden" name="to" value="<?=$email?>">
<input type="hidden" name="attach" value="2">
<input type="hidden" name="token" value="<?=$token?>">
<? if ($is_member) { // 회원이면 ?>
<input type="hidden" name="fnick" value="<?=$member[mb_nick]?>">
<input type="hidden" name="fmail" value="<?=$member[mb_email]?>">
<? } ?>
<table>
<caption>메일쓰기</caption>
<tbody>
<? if (!$is_member) { ?>
<tr>
<th scope="row"><label for="fnick">이름</label></th>
<td><input type="text" id="fnick" name="fnick" required></td>
</tr>
<tr>
<th scope="row"><label for="fmail">E-mail</label></th>
<td><input type="text" id="fmail" name="fmail" required></td>
</tr>
<? } ?>
<tr>
<th scope="row"><label for="subject">제목</label></th>
<td><input type=text id="subject" name="subject" required></td>
</tr>
<tr>
<th scope="row">형식</th>
<td>
<input type="radio" id="type_text" name="type" value="0" checked> <label for="type_text">TEXT</label>
<input type="radio" id="type_html" name="type" value="1" > <label for="type_html">HTML</label>
<input type="radio" id="type_both" name="type" value="2" > <label for="type_both">TEXT+HTML</label>
</td>
</tr>
<tr>
<th scope="row"><label for="content">내용</label></th>
<td><textarea id="content" name="content" required></textarea></td>
</tr>
<tr>
<th scope="row"><label for="file1">첨부 1</label></th>
<td><input type="file" id="file1" name="file1"></td>
</tr>
<tr>
<th scope="row"><label for="file2">첨부 2</label></th>
<td><input type="file" id="file2" name="file2"></td>
</tr>
</tbody>
</table>
<fieldset>
<legend>자동등록방지</legend>
<img id="kcaptcha_image" />
<input type="text" name="wr_key" title="자동등록방지" size="10" required>
왼쪽의 글자를 입력하세요.
</fieldset>
<div class="btn_confirm">
<input type="submit" id="btn_submit" value="메일발송">
<a href="javascript:window.close();">창닫기</a>
</div>
</form>
</section>
<script src="<?="$g4[path]/js/md5.js"?>"></script>
<script src="<?="$g4[path]/js/jquery.kcaptcha.js"?>"></script>
<script>
with (document.fformmail) {
if (typeof fname != "undefined")
fname.focus();
else if (typeof subject != "undefined")
subject.focus();
}
function fformmail_submit(f)
{
if (!check_kcaptcha(f.wr_key)) {
return false;
}
if (f.file1.value || f.file2.value) {
// 4.00.11
if (!confirm("첨부파일의 용량이 큰경우 전송시간이 오래 걸립니다.\n\n메일보내기가 완료되기 전에 창을 닫거나 새로고침 하지 마십시오."))
return false;
}
document.getElementById('btn_submit').disabled = true;
f.action = "./formmail_send.php";
return true;
}
</script>