폼메일에서 첨부파일 항목 집어 넣는 방법에 대해 궁금합니다. 채택완료
아래 '파일 첨부 항목'이 빠져있는 폼메일 글쓰기 페이지 소스에서
파일첨부 항목을 추가하려면 어떻게 해야 할까요?
그리고 view페이지에서도 첨부된 파일 노출되는 법이 궁금합니다.
고수님들의 도움 절실히 부탁드립니다.^^
--------------------------------------------------------------------------------
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
if ($is_dhtml_editor) {
include_once("$g4[path]/lib/cheditor4.lib.php");
echo "";
echo cheditor1('wr_content', '100%', '250');
}
?>
function OnlyNumber(obj, chkint){
if(isNaN(obj.value)){
alert("숫자만 입력 가능합니다.");
obj.value="";
obj.focus();
return false;
}
if(obj.value > Number(chkint)) {
alert(chkint+"이하의 숫자만 가능합니다.");
obj.value="";
obj.focus();
return false;
}
}
.write_head { height:30px; text-align:center; color:#8492A0; }
.field { border:1px solid #ccc; }
.head {
height:40px;
width:130px;
text-align:left;
color:#12432d;
}
.head2 { height:25px; text-align:left; background-color:#FAFAFA; }
.head3 { height:10px; width:130px; padding-top:10px; padding-bottom:0px;text-align:left; color:#4c4c4c; }
.head4 {
height:10px;
width:90px;
padding-top:4px;
padding-bottom:0px;
text-align:left;
color:#4c4c4c;
}
.right { }
.nayana {
font-weight: bold;
color: #090;
}
// 글자수 제한
var char_min = parseInt(=$write_min?>); // 최소
var char_max = parseInt(=$write_max?>); // 최대
with (document.fwrite)
{
if (typeof(wr_subject) != "undefined")
wr_subject.focus();
else if (typeof(wr_name) != "undefined")
wr_name.focus();
else if (typeof(wr_1) != "undefined")
wr_1.focus();
if (typeof(ca_name) != "undefined")
if (w.value == "u")
ca_name.value = "=$write[ca_name]?>";
}
function html_auto_br(obj)
{
if (obj.checked) {
result = confirm("자동 줄바꿈을 하시겠습니까?\n\n자동 줄바꿈은 게시물 내용중 줄바뀐 곳을 태그로 변환하는 기능입니다.");
if (result)
obj.value = "html2";
else
obj.value = "html1";
}
else
obj.value = "";
}
function fwrite_submit(f)
{
if ($g4[https_url])
echo "f.action = '$g4[https_url]/$g4[bbs]/write_update.php';";
else
echo "f.action = './write_update.php';";
?>
/*
var s = "";
if (s = word_filter_check(f.wr_subject.value)) {
alert("제목에 금지단어('"+s+"')가 포함되어있습니다");
return false;
}
if (s = word_filter_check(f.wr_content.value)) {
alert("내용에 금지단어('"+s+"')가 포함되어있습니다");
return false;
}
*/
if (document.getElementById('char_count')) {
if (char_min > 0 || char_max > 0) {
var cnt = parseInt(document.getElementById('char_count').innerHTML);
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;
}
}
}
if ($is_dhtml_editor) echo cheditor3('wr_content');
?>
var subject = "";
var content = "";
$.ajax({
url: "=$board_skin_path?>/ajax.filter.php",
type: "POST",
data: {
"content": f.wr_content.value
},
dataType: "json",
async: false,
cache: false,
success: function(data, textStatus) {
content = data.content;
}
});
if (content) {
alert("내용에 금지단어('"+content+"')가 포함되어있습니다");
if (typeof(ed_wr_content) != "undefined")
ed_wr_content.returnFalse();
else
f.wr_content.focus();
return false;
}
if (!check_kcaptcha(f.wr_key)) {
return false;
}
document.getElementById('btn_submit').disabled = true;
document.getElementById('btn_cancel').disabled = true;
return true;
}
답변 1개
답변을 작성하려면 로그인이 필요합니다.
로그인