묻고답하기

게시판의글
http://www.zeroboard.com/?mid=zb4_tip&page=10&sort_index=readed_count&order_type=desc&document_srl=850148
을 토대로 작업했습니다.


테스트로 http://www.digiloguemind.com/bbs/na_mail/index.php 로 입력하니



Parse error: syntax error, unexpected T_VARIABLE in /home/zalcom/public_html/bbs/na_mail/index.php on line 22



뜨는데  무엇이 잘못된거죠?

고수님들의 조언 부탁드립니다.


아래는
index.php입니다.

<html>
<head>
<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' leftmargin="5" marginwidth="5" topmargin="5" marginheight="5">

<?
$_zb_url="www.digiloguemind.com/bbs/";
$_zb_path = "/home/zalcom/public_html/bbs/";
include $_zb_path."outlogin.php"

$mail = base64_decode($str);     문제의 on line 22
$data=mysql_fetch_array(mysql_query("select * from $member_table where no='$member_no'"));

// Sendmail 폼
if(!$mailsend)
{
?>

<form method='post' enctype='multipart/form-data' action='<?=$PHP_SELF?>?mailsend=send'>

<table width="502" border="1" cellspacing="0" bordercolor="#CCCCCC" bordercolordark="white" bordercolorlight="#CCCCCC">
        <tr>
            <td width="496" align="left" nowrap bgcolor="#EAEAEA" colspan="2">
             <tt><span style="font-size:9pt;"><font face="굴림체"><b>받는사람</b></font></span></tt>
           </td>
         </tr>     
   <tr>
           <td width="42" align="left" nowrap bgcolor="#EAEAEA">
             <tt><span style="font-size:9pt;"><font face="굴림체">&nbsp;이 름</font></span></tt>
           </td>
           <td align="left"  width="450">
             
               <font><input name=to_name size="48" value="<?=$data[name]?>" style="border-color:rgb(204,204,204); border-style:none;"></font>
           </td>
         </tr>
         <tr>
           <td width="42" align="left" nowrap bgcolor="#EAEAEA">
             <tt><span style="font-size:9pt;"><font face="굴림체">&nbsp;메 일</font></span></tt>
           </td>
           <td align="left" width="450">
             
               <font><input name=to size="48" value="<?=$mail?>" style="border-color:rgb(204,204,204); border-style:none;"></font>
           </td>
         </tr>
        <tr>
            <td width="496" align="left" nowrap bgcolor="#EAEAEA" colspan="2">
             <tt><span style="font-size:9pt;"><font face="굴림체"><b>보내는사람</b></font></span></tt>
           </td>
         </tr>
         <tr>
           <td width="42" align="left" nowrap bgcolor="#EAEAEA">
             <tt><span style="font-size:9pt;"><font face="굴림체">&nbsp;이 름</font></span></tt>
           </td>
           <td align="left" width="450">
             
               <font><input name=from_name size="48" value='<?=$member[name]?>' style="border-color:rgb(204,204,204); border-style:none;"></font>
           </td>
         </tr>
         <tr>
           <td width="42" align="left" nowrap bgcolor="#EAEAEA">
             <tt><span style="font-size:9pt;"><font face="굴림체">&nbsp;메 일</font></span></tt>
           </td>
           <td align="left" width="450">
             
               <font><input name=from size="48" value='<?=$member[email]?>'  style="border-color:rgb(204,204,204); border-style:none;"></font>
           </td>
         </tr>
         <tr>
           <td width="42" align="left" nowrap bgcolor="#EAEAEA">
            
                <p style="line-height:100%; margin-top:0; margin-bottom:0;"><tt><span style="font-size:9pt;"><font face="굴림체">&nbsp;제 목</font></span></tt>
                      <td align="left" width="450">
             
              
                <p style="line-height:100%; margin-top:0; margin-bottom:0;"><font><input name=subject size="48" style="border-color:rgb(204,204,204); border-style:none;"></font>                    </tr>
         <tr>
           <td width="42" align="left" nowrap bgcolor="#EAEAEA">
             <tt><span style="font-size:9pt;"><font face="굴림체">&nbsp;내 용</font></span></tt>
           </td>
        <td align="left" width="450">
             
              
          
                    <textarea name=message rows="13" cols="65" style="border-color:rgb(204,204,204); border-style:none;"></textarea>
        

           </td>
         </tr>
         <tr>
           <td width="42" align="left" nowrap bgcolor="#EAEAEA">
             <tt><span style="font-size:9pt;"><font face="굴림체">&nbsp;첨 부</font></span></tt>
           </td>
           <td align="left" width="450">
             <input type=file size="50" name=userfile style="border-color:rgb(204,204,204); border-style:none;">
       
           </td>
         </tr>
<td colspan=2 align=center width="496" bgcolor="white">
             <input type=submit name=submit value='메일전송'>
           </td>
       </table>
       </form>
<?
   }

   // 메일 프로그램 시작
   if($mailsend==send)
   {
     // 에러
     if(!$to || !$subject)
     {
       echo("
         <script>
           window.alert('받는 사람의 메일주소나 제목은 반드시 입력해 주시기 바랍니다.')
           history.go(-1)
         </script>
       ");
     }
     else
     {
       // 받는 사람 처리
       $to = $to_name." <".$to.">";
      
       // 헤더부분
       $mailheader .= "Return-Path: $from\r\n";
       $mailheader .= "From: $from_name <$from>\r\n";
       $mailheader .= "X-Mailer: Gfew Interface\r\n";

        //첨부화일이 1개일경우
       if($userfile && $userfile_size)
       {
         $filename=basename($userfile_name);
         $fp = fopen($userfile,"r");
         $file = fread($fp,$userfile_size);
         fclose($fp);
         if ($userfile_type == "")
         {
           $userfile_type = "application/octet-stream";
         }
         $boundary = "--------" . uniqid("part");
         $mailheader .= "MIME-Version: 1.0\r\n";
         $mailheader .= "Content-Type: multipart/mixed; boundary=\"$boundary\"";
         $messages  = "This is a multi-part message in MIME format.\r\n\r\n";
         $messages .= "--$boundary\r\n";
         $messages .= "Content-Type: text/html; charset=euc-kr\r\n";
         $messages .= "Content-Transfer-Encoding: 8bit\r\n\r\n";
         $messages .= nl2br(addslashes($message)) . "\r\n";
         $messages .= "--$boundary\r\n";
         $messages .= "Content-Type: $userfile_type; name=\"$filename\"\r\n";
         $messages .= "Content-Transfer-Encoding: base64\r\n\r\n";
         $messages .= ereg_replace("(.{80})","\\1\r\n",base64_encode($file));
         $messages .= "\r\n--$boundary" . "\r\n";
       } 
     
       //첨부화일이 없을경우
       else
       {
         $mailheader .= "Content-Type: text/html; charset=euc-kr\r\n";
         $mailheader .= "Content-Transfer-Encoding: 8bit\r\n\r\n";

         $messages = $mail_head."\r\n";
         $messages .= nl2br(addslashes($message))."\r\n";
         $messages .= $mail_tail."\r\n";
       }
       mail($to,$subject,$messages,$mailheader);

       echo("
         <meta http-equiv='Refresh' content='0; URL=$PHP_SELF?mailsend=choice'>
       "); 
     }
   }
  
   // 메일 전송
   if($mailsend==choice)
   {
     echo("
       <table width=502 border=0>
         <tr>
           <td height=20>&nbsp;</td>
         </tr> 
         <tr>
           <td align=center>메일이 성공적으로 전송 되었습니다</td>
         </tr>
         <tr>
           <td height=20>&nbsp;</td>
         </tr>
       
         <tr>
           <td align=center>
    <a href='$PHP_SELF'>돌아가기</a>
                           
           </td>
 
         </tr>
       </table>
     ");
   } 
?>
</body>
</html>

글쓴이 제목 최종 글
XE 공지 글 쓰기,삭제 운영방식 변경 공지 [16] 2019.03.05 by 남기남
999 파일이 있는지 없는지 확인하려면 ? 어떻게 해야 할까요? [1] 2010.12.30
無眞™ 에디터 옵션중에 HTML편집기를 기본값으로 변경하려면..  
안지훈623 설치된 XE의 절대경로: 가 안나오네요 ㅠ [1] 2010.12.30 by Youne
듀리짱 파일을 찾을 수 없다는군요?  
보로봉봉 구글광고 페이지에 직접 삽입 불가 문제 (스크립트?)  
권지회 제로보드4->XE 마이그레이션 방법?  
gkgk2435 레이아웃에대해  
0976046303 게시판 제목 배경색 바꾸는 방법???  
포토메카 xe 설치에 대해서 [1] 2010.12.30 by HolyJohn
kwane csrf공격당한건가요? file  
한용길 도와주세요..팝업창 관리에서...  
michelle867 폰트를 바꾸고 싶어요 ^^ [1] 2010.12.30 by HolyJohn
승하킹 모듈에 관한 원천적인 질문( 모듈과 모듈연결?) [1] 2010.12.30 by 난다날아
sugarkane 다른 모듈의 데이타를 불러오기 [1] 2010.12.30 by 난다날아
우리아기 몇초남은지 보여주고 해당페이지 넘기기  
날아라치킨 글쓰기를 누르면 오류가 나옵니다 [4] 2010.12.30 by 날아라치킨
999 다운로드 횟수로 정렬하려면 ?  
고기잡이 xe 게시판 iframe문제 입니다. ㅠㅠ 3일째 매달리는게 모르겠네요 도와주세요 [1] file 2010.12.30 by 고기잡이
김창우740 XE 1.4.4.3 설치후 관리자 로그인 에러문제 [1] 2010.12.30 by 승하킹
영구만세 일정 기준으로 회원 목록 보기