ÆÄÀÏ÷ºÎ Æû¸ÞÀÏÀÔ´Ï´Ù. Á¦°¡ ±âº»ÀûÀÎ ÆÄÀÏ÷ºÎ Æû¸ÞÀÏ¿¡ ȸ»ç¸í, ¿¬¶ôó, À̸ÞÀÏ, ȨÆäÀÌÁö¸¦ Ãß°¡ÇÏ¿´½À´Ï´Ù.
±Ùµ¥ ¸ÞÀÏÀ» º¸³»¸é Ãß°¡ÇÑ ºÎºÐÀÇ ³»¿ëµµ °°ÀÌ º¸³»Áú ¼ö ÀÖµµ·Ï ¼öÁ¤Á» µµ¿ÍÁÖ¼ÌÀ¸¸é ÇÕ´Ï´Ù.
php¿¡ Àß ¸ô¶ó¼ ¼öÁ¤ÇغÁµµ ÀÚ²Ù ¿¡·¯°¡ »ý±â³×¿ä...
ºÎŹµå¸³´Ï´Ù.
<html> <head> <title>php3·Î ±¸ÇöÇÑ À¥¸ÞÀÏ</title> <meta http-equiv='Content-Type' content='text/html; charset=euc-kr'> <STYLE TYPE="text/css"> <!-- A:link {text-decoration:none; color:darkblue} A:visited{text-decoration:none; color:663399} A:hover {text-decoration:none; color:red} A:active {text-decoration:none; color:red} TD {font-size:9pt} --> </STYLE> </head>
<body bgcolor='#FFFFFF'>
<?
//================== // ¸ÞÀÏ º¸³»±â //==================
if($mode=='mailsend') { if(!$company) { echo(" <script> window.alert('ȸ»ç¸íÀ» ÀÔ·ÂÇÏ¼Å¾ß ¸ÞÀÏÀ» º¸³»½Ç ¼ö°¡ ÀÖ½À´Ï´Ù.') history.go(-1) </script> "); exit; }
if(!$subject) { echo(" <script> window.alert('Á¦ÈÞÁ¦¸ñÀ» ÀÔ·ÂÇÏ¼Å¾ß ¸ÞÀÏÀ» º¸³»½Ç ¼ö°¡ ÀÖ½À´Ï´Ù.') history.go(-1) </script> "); exit; }
if(!$tel) { echo(" <script> window.alert('¿¬¶ôó¸¦ ÀÔ·ÂÇÏ¼Å¾ß ¸ÞÀÏÀ» º¸³»½Ç ¼ö°¡ ÀÖ½À´Ï´Ù.') history.go(-1) </script> "); exit; }
if(!$from) { echo(" <script> window.alert('º¸³»½Ã´Â ºÐÀÇ ¸ÞÀÏ°èÁ¤À» ÀÔ·ÂÇÏ¼Å¾ß ¸ÞÀÏÀ» º¸³»½Ç ¼ö°¡ ÀÖ½À´Ï´Ù.') history.go(-1) </script> "); exit; }
//echo(" $userfile $userfile_size ");
// $body = stripslashes($body); // $mailheaders .= "To: " . $to . "\r\n"; // $mailheaders .= "Subject: " . $subject . "\r\n"; $mailheaders .= "Return-Path: $from\r\n"; $mailheaders .= "From: $rn <$from>\r\n"; $mailheaders .= "X-Mailer: Gfew Interface\r\n"; // $mailheaders .= "Reply-To: $from \r\n";
if ($userfile && $userfile_size) {
$filename=basename($userfile_name); $result=fopen($userfile,"r"); $file=fread($result,$userfile_size); fclose($result);
if ($userfile_type == "") { $userfile_type = "application/octet-stream"; }
$boundary = "--------" . uniqid("part");
$mailheaders .= "MIME-Version: 1.0\r\n"; $mailheaders .= "Content-Type: multipart/mixed; boundary=\"$boundary\"";
$bodytext = "This is a multi-part message in MIME format.\r\n\r\n"; $bodytext .= "--$boundary\r\n";
$bodytext .= "Content-Type: text/html; charset=euc-kr\r\n"; $bodytext .= "Content-Transfer-Encoding: 8bit\r\n\r\n";
// $bodytext .= "Content-Type: text/plain; charset=euc-kr\r\n"; // $bodytext .= "Content-Transfer-Encoding: 8bit\r\n\r\n"; // $bodytext .= "Content-Type: text/plain; charset=us-ascii\r\n"; // $bodytext .= "Content-Transfer-Encoding: 7bit\r\n\r\n"; $bodytext .= nl2br(stripslashes($body)) . "\r\n\r\n"; $bodytext .= "--$boundary\r\n"; $bodytext .= "Content-Type: $userfile_type; name=\"$filename\"\r\n"; $bodytext .= "Content-Transfer-Encoding: base64\r\n\r\n"; $bodytext .= ereg_replace("(.{80})","\\1\r\n",base64_encode($file)); $bodytext .= "\r\n--$boundary" . "\r\n"; } else { $bodytext = stripslashes($body); }
mail("ozpc@ozpc.co.kr",$subject, $bodytext,$mailheaders);
echo(" <meta http-equiv='Refresh' content='0; URL=./mailsuccess.php3'>"); exit;
//echo("$Ext , $bodytext"); // #778899 #e0e0e0
}
echo("
<form enctype='multipart/form-data' method='post' action='$PHP_SELF?mode=mailsend'> <table border=0 cellspacing=1 align='center' cellpadding='1' bgcolor='#6B7BAD'>
<tr> <td align=center bgcolor='#6B7BAD' nowrap> <font color='#ffffff'> ȸ»ç¸í </font> </td> <td bgcolor='ghostwhite'> <font color='#000000' size=-1> <input name=company size=68 value=''> </font> </td> </tr>
<tr> <td align=center bgcolor='#6B7BAD' nowrap> <font color='#ffffff'> Á¦ÈÞÁ¦¸ñ </font> </td> <td bgcolor='ghostwhite'> <font color='#000000' size=-1> <input name=subject size=68 value=''> </font> </td> </tr>
<tr> <td align=center bgcolor='#6B7BAD' nowrap> <font color='#ffffff'> ¿¬¶ôó </font> </td> <td bgcolor='ghostwhite'> <font color='#000000' size=-1> <input name=tel size=68 value=''> </font> </td> </tr>
<tr> <td align=center bgcolor='#6B7BAD' nowrap> <font color='#ffffff'> ´ã´çÀÚ e-mail </font> </td> <td bgcolor='ghostwhite'> <font color='#000000' size=-1> <input name=from size=68 value=''> </font> </td> </tr>
<tr> <td align=center bgcolor='#6B7BAD' nowrap> <font color='#ffffff'> ȸ»çȨÆäÀÌÁö </font> </td> <td bgcolor='ghostwhite'> <font color='#000000' size=-1> <input name=home size=68 value=''> </font> </td> </tr>
<tr> <td align=center bgcolor='#6B7BAD' nowrap> <font color='#ffffff'> Àü¼ÛÇÒ ÆÄÀÏ </font> </td> <td bgcolor='ghostwhite'> <font color='#000000' size=-1> <input type=file name=userfile size=53 value=''> </font> </td> </tr> <tr> <td colspan=2 bgcolor='ghostwhite'> <textarea name=body cols=78 rows=10 wrap=hard></textarea> </td> </tr> <tr> <td colspan=2 bgcolor='ghostwhite'> <div align='center'><font size=-1> <input type=submit name=action value='¸ÞÀÏÀü¼ÛÇϱâ'> <input type='reset' name='Reset' value='Ãë¼ÒÇϱâ'> </font> </div> </td> </tr> </table> </form>
"); ?>
</body> </html>
|