Áö±Ý ÀÌ¿ëÇÏ°íÀִ ȣ½ºÆà ¾÷ü¿¡¼ php cgi Áö¿øÇÏ´Â »óÇ°À» ¸ø¹Þ¾Æ¼
asp·Î Æû¸ÞÀÏÀ» È°¿ëÇÏ°í ½ÍÀºµ¥ ¿©±â ¼Ò½ºÀÚ·á½Ç¿¡¼ ¼Ò½º¸¦ ¹Þ¾Æ¼ ¼³Ä¡ ±îÁö´Â Çߴµ¥
¹Þ´Â »ç¶÷ À̸á ÁÖ¼Ò¸¦ °íÁ¤Çؼ ȸé»ó¿¡ ³ªÅ¸³ª°Ô ÇÏ´Â ¹æ¹ýÀº ¾ø³ª¿ä??
Áö±Ý ¾²°íÀմ°ÍÀº ¹Ø¿¡ °ÅÀÔ´Ï´Ù ~ºü¸¥´äº¯ ºÎŹµå¸³´Ï´Ù ^^
<%
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
' Name : HAPPYMAIL '
' Version : 1.0 .*"""*.*"""*. '
' Data : 2001/07/25 */(*'')¢½(''*)* '
' Copyright : Kim Bong-Gwan *.ILOVEYOU!.* '
' Homepage : http://www.happyasp.com "*. .*" '
' E-mail/MSN Messenger: webmaster@happyasp.com '.' '
' ICQ : #102188366 '
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
send = request("send")
sendname = request("sendname")
poem = request("poem")
rec = request("rec")
title = request("title")
userfile = request("userfiles")
format = request("format")
view = request("view")
content = request("content")
IF sendname = "À̸§" Then
sendname = "¾Æ¹«°³"
End IF
IF view = "no" Then 'º¸³»±â
set objmail = server.createobject("cdonts.newmail")
objmail.from = sendname & "<" & send & ">"
objmail.to = rec '¹ÞÀ»»ç¶÷
'objmail.Cc = ccmail 'ÂüÁ¶
objmail.Bcc = poem '¼ûÀº ÂüÁ¶
objmail.subject = title 'Á¦¸ñ
IF format = "text" Then
objmail.bodyformat = 1 '¸ÞÀÏ ÇüÅ TEXT // 1ÀÏ °æ¿ì Text·Î ÀúÀå
objmail.mailformat = 1 '¸ÞÀÏ ÇüÅ TEXT // 1ÀÏ °æ¿ì Text·Î ÀúÀå
ElseIf format = "html" Then
objmail.bodyformat = 0 '¸ÞÀÏ ÇüÅ HTML // 1ÀÏ °æ¿ì Text·Î ÀúÀå
objmail.mailformat = 0 '¸ÞÀÏ ÇüÅ HTML // 1ÀÏ °æ¿ì Text·Î ÀúÀå
Else
objmail.bodyformat = 0 '¸ÞÀÏ ÇüÅ HTML // 1ÀÏ °æ¿ì Text·Î ÀúÀå
objmail.mailformat = 0 '¸ÞÀÏ ÇüÅ HTML // 1ÀÏ °æ¿ì Text·Î ÀúÀå
End if
objmail.body = content 'º¸³»´Â ³»¿ë
IF userfile = "" Then
Else
objMail.attachFile(userfile) '÷ºÎÆÄÀÏ
End if
objmail.send
set objmail = nothing
%>
<HTML>
<HEAD>
<TITLE>¸ÞÀÏ¹ß¼Û ¿Ï·á</TITLE>
<meta http-equiv="content-type" content="text/html; charset=euc-kr">
<meta http-equiv="refresh" content="3; url=happymail.asp">
</HEAD>
<BODY>
<TABLE border=0 align=center>
<TR>
<TD style="FONT-SIZE: 9pt"><BR>
ÆíÁö°¡ ¼º°øÀûÀ¸·Î º¸³»¾î Á³½À´Ï´Ù.<BR>
3ÃÊÈÄ ÀÚµ¿À¸·Î óÀ½À¸·Î À̵¿ÇÕ´Ï´Ù.<BR>
</TD>
</TR>
</TABLE>
</BODY>
</HTML>
<%
ElseIf view = "yes" Then '¹Ì¸®º¸±â
%>
<HTML>
<TITLE>¹Ì¸®º¸±â</TITLE>
<meta http-equiv="content-type" content="text/html; charset=euc-kr">
<style type='text/css'>
.ad{border:1 solid black}
</style>
<body leftmargin=2 marginwidth=2 topmargin=2 marginheight=2 bgcolor=#ffffff text=black link=blue vlink=purple alink=red>
<center><br>
<TABLE border=0 bgColor=#839eb7 cellPadding=3 cellSpacing=1>
<TR><TD bgColor=#e1e0e0 height=20 style="FONT-SIZE: 9pt" align=right><B>º¸³»´Â »ç¶÷</B></TD>
<TD bgColor=#e9f6f4 height=20 style="FONT-SIZE: 9pt">
<%= send %><<%= sendname %>></TD>
</TR>
<TR><TD bgColor=#e1e0e0 height=20 style="FONT-SIZE: 9pt" align=right><B>¹Þ´Â »ç¶÷</B></TD>
<TD bgColor=white height=20 style="FONT-SIZE: 9pt">
<%= rec %></TD></TR>
<%
IF poem = "" Then
Else
%>
<TR><TD bgColor=#e1e0e0 height=20 style="FONT-SIZE: 9pt" align=right><B>¼ûÀº ÂüÁ¶</B></TD>
<TD bgColor=white height=20 style="FONT-SIZE: 9pt">
<%= poem %></TD></TR>
<%
End If
%>
<TR><TD bgColor=#e1e0e0 style="FONT-SIZE: 9pt" align=right><B>Á¦ ¸ñ</B></TD>
<TD bgColor=#e9f6f4 style="FONT-SIZE: 9pt">
<%= title %></TD></TR>
<TR><TD bgColor=#ffffff colspan="2">
<table border=0 cellpadding=4 cellspacing=0 width=100%>
<td>
<%
IF format = "text" Then
%>
<PRE><%= content %></PRE>
<%
ElseIf format = "html" Then
%>
<%= content %>
<%
Else
End If
%>
</td>
</tr></table>
</td></tr>
<%
IF userfile = "" Then
Else
%>
<TR><TD bgColor=#e1e0e0 height=20 style="FONT-SIZE: 9pt" align=right><B>ÆÄÀÏ÷ºÎ</B></TD>
<TD bgColor=#e9f6f4 height=20 style="FONT-SIZE: 9pt">
<%= userfile %></TD></TR>
<%
End If
%>
</table>
<table border=0>
<tr><form method=post action=happymail.asp>
<INPUT TYPE="hidden" name='send' value='<%= send %>'>
<INPUT TYPE="hidden" name='sendname' value='<%= sendname %>'>
<INPUT TYPE="hidden" name='poem' value='<%= poem %>'>
<INPUT TYPE="hidden" name='rec' value='<%= rec %>'>
<INPUT TYPE="hidden" name='title' value='<%= title %>'>
<INPUT TYPE="hidden" name='userfiles' value='<%= userfile %>'>
<INPUT TYPE="hidden" name='format' value='<%= format %>'>
<INPUT TYPE="hidden" name='content' value='<%= content%>'>
<INPUT TYPE="hidden" name='view' value='no'>
<td><input type=submit value='¸Þ ÀÏ º¸ ³¿' CLASS=ad></td>
<td><input type=button value='µ¹ ¾Æ °¡ ±â' CLASS=ad onClick=javascript:history.go(-1)></td>
</form></tr>
</table>
</center>
</BODY>
</HTML>
<%
Else
%>
<HTML>
<head>
<title>¸ÞÀÏ º¸³»±â</title>
<meta http-equiv="content-type" content="text/html; charset=euc-kr">
<style type='text/css'>
p,td {font-size:9pt;font-family:±¼¸²;}
.ad{border:1 solid black}
.adf{background-color:#ECF5FF;border:1 solid black}
</style>
<SCRIPT LANGUAGE="JavaScript">
function OnEnter( field ) { if( field.value == field.defaultValue ) { field.value = ""; } }
function OnExit( field ) { if( field.value == "" ) { field.value = field.defaultValue; } }
function save()
{
document.msg.view.value = "no";
check_email()
}
function Preview()
{
document.msg.view.value = "yes";
check_email()
}
function check_email()
{
if(document.msg.rec.value == '') {
alert("¹Þ´Â »ç¶÷ E-mailÁÖ¼Ò°¡ ¾ø½À´Ï´Ù.");
}
else if(document.msg.send.value == '') {
alert("º¸³»´Â »ç¶÷ E-mailÁÖ¼Ò°¡ ¾ø½À´Ï´Ù.");
}
else if(document.msg.send.value.length < 4 || document.msg.rec.value.length < 4) {
alert("E-mail ÁÖ¼Ò°¡ ºÎÁ¤È®ÇÕ´Ï´Ù.");
}
else if(document.msg.title.value == '') {
alert("Á¦¸ñÀÌ ÁöÁ¤µÇ¾î ÀÖÁö ¾Ê½À´Ï´Ù");
}
else {
if(check_char()) {
}
else {
document.msg.submit()
}
}
}
function check_char()
{
if(document.msg.send.value !="")
{
var special = "\"\'~!#$%^&*(){}?/][}{ ";
var check_send = document.msg.send.value;
var len = check_send.length;
for(i = 0; i < len; i++)
{
if(special.indexOf(check_send.substring(i, i + 1)) >= 0)
{
alert("¹ß½Å E-mail¿¡ Çã¿ëµÇÁö ¾Ê´Â ¹®ÀÚ°¡ ÀÖ½À´Ï´Ù.")
document.msg.send.value = "";
document.msg.send.focus();
return 1;
}
}
}
if(document.msg.rec.value !="")
{
var special = "\"\'~!#$%^&*(){}?/][}{ ";
var check_rec = document.msg.rec.value;
var len = check_rec.length;
for(i = 0; i < len; i++)
{
if(special.indexOf(check_rec.substring(i, i + 1)) >= 0)
{
alert("¼ö½Å E-mail¿¡ Çã¿ëµÇÁö ¾Ê´Â ¹®ÀÚ°¡ ÀÖ½À´Ï´Ù.")
return 1;
}
}
}
if(document.msg.poem.value !="")
{
var special = "\"\'~!#$%^&*(){}?/][}{ ";
var check_poem = document.msg.poem.value;
var len = check_poem.length;
for(i = 0; i < len; i++)
{
if(special.indexOf(check_poem.substring(i, i + 1)) >= 0)
{
alert("¼ûÀºÂüÁ¶¿¡ Çã¿ëµÇÁö ¾Ê´Â ¹®ÀÚ°¡ ÀÖ½À´Ï´Ù.")
return 1;
}
}
}
}
</SCRIPT>
</head>
<body bgcolor=white text=#000000>
<form name=msg method=post action=happymail.asp>
<input type=hidden name=action value=save>
<br><table border=0 cellpadding=0 cellspacing=0 width=362 align=center><tr><td bgcolor=#FA8983>
<table border=0 cellpadding=3 cellspacing=1 width=100%>
<tr>
<td width=70 align=right bgcolor=#FEE0DE style=PADDING-RIGHT: 3px>º¸³»´Â »ç¶÷</td>
<td width=250 bgcolor=white>
<input type=text name=send size=25 CLASS='ad' onBlur=this.className='ad' onFocus=this.className='adf'>
<input type=text name=sendname size=6 CLASS='ad' onBlur=OnExit(this) onFocus=OnEnter(this) value='À̸§'>
</td>
</tr>
<tr>
<td width=70 align=right bgcolor=#FEE0DE style=PADDING-RIGHT: 3px>¹Þ´Â »ç¶÷</td>
<td width=250 bgcolor=white>
<input type=text name=rec size=25 CLASS='ad' onBlur=this.className='ad' onFocus=this.className='adf'>
<br>* ¿©·¯¸í¿¡°Ô º¸³¾ ¶§ °¢ ÁÖ¼Ò¸¦ , ·Î ±¸ºÐ</td>
</tr>
<tr>
<td width=70 align=right bgcolor=#FEE0DE style=PADDING-RIGHT: 3px>¼ûÀº ÂüÁ¶</td>
<td width=250 bgcolor=white>
<input type=text name=poem size=25 CLASS=ad onBlur=this.className='ad' onFocus=this.className='adf'>
</td>
</tr>
<tr>
<td width=70 align=right bgcolor=#FEE0DE style=PADDING-RIGHT: 3px>Á¦¸ñ</td>
<td width=250 bgcolor=white>
<input type=text name=title maxlength=100 size=35 onblur=this.className='ad' onfocus=this.className='adf' class=ad></td>
</tr>
<tr><td width=70 align=right bgcolor=#FEE0DE style=PADDING-RIGHT: 3px>³»¿ë</td>
<td width=250 bgcolor=#FFF5F4>
<textarea name=content rows=6 cols=35 CLASS=ad onBlur=this.className='ad' onFocus=this.className='adf'></textarea></td>
</tr>
<tr>
<td align=right bgcolor=#FEE0DE>ÆÄÀÏ÷ºÎ</td>
<td bgcolor=white>
<input type=file name=userfiles size=20 CLASS=ad CLASS=ad onBlur=this.className='ad' onFocus=this.className='adf'></td>
</tr>
<tr>
<td align=right bgcolor=#FEE0DE>Çü½Ä¼±ÅÃ</td>
<td width=250 bgcolor=#FFF5F4>
<input type="radio" name="format" value="text" checked>Text
<input type="radio" name="format" value="html">HTML
</td></tr></table>
</td>
</tr></table>
<br>
<table border=0 align=center>
<tr>
<INPUT TYPE="hidden" name="view" value="no">
<td><input type=button value='¸Þ ÀÏ º¸ ³¿' CLASS=ad onClick=save()></td>
<td><input type=button value='¹Ì ¸® º¸ ±â' CLASS=ad onClick=Preview()></td>
<td><input type=reset value='»õ ·Î ÀÛ ¼º' CLASS=ad></td>
</tr>
</table>
</form>
</body>
</html>
<%
End If
%>