묻고답하기

게시판의글
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 남기남
RulruRalra 서브도메인 질문좀 드릴께요..  
웰즈 xe로 홈페이지 2개 운영 or 한 계정에 제로보드 2개설치 가능한가요? [6] 2009.01.30 by 웰즈
유타 최신 업그레이드후 글쓰기 안되네요... [4] 2009.01.30 by 중고전자
왕초보 게시판에 단 움직이는 배너.... [2] 2009.01.30 by 만쓰별(정만)
haru 업데이트후 글쓰기폼이 안나와요 [1] file 2009.01.30 by Habile
byte01 설치 중 초기화면에서 에러 메세지가 뜹니다. [1] 2009.01.30 by Habile
멜로딕 위젯 스킨 적용이 안됩니다.. [2] file 2009.01.30 by 멜로딕
이민식225 언어 설정에 따라 다른 테이블이 보이도록... 질문합니다.  
싴신 금지아이디 설정 처럼 금지닉네임 설정은 못하나요...? [1] 2009.01.30 by 지연아빠
최돈용 게시판 추가에서....이게 뭔가요? [1] file 2009.01.30 by 444
ammaket 글씨가 반으로 작아졌다 [3] file 2009.01.30 by 지연아빠
초보자 XE 설치 질문 [3] 2009.01.30 by 지연아빠
기쁨중독 카테고리별 문서출력에서...하위 카테고리 글까지 가져오는방법  
이효상839 회원가입 제목 바꾸기...도와주삼.. [2] 2009.01.30 by 의문이
Kelvin 분류를 보이게 할 수 있나요? [2] file 2009.01.30 by Kelvin
중고전자 회원정보박스 줄여주세요^^ [2] 2009.01.30 by 중고아트
흑묘백묘 버추얼 홈페이지에서 공용게시판?은 사용불가한죠? [5] 2009.01.31 by 주상태
맹물™ XE 1.1.5 로 업한후 나타난증상. [1] file 2009.01.31 by 주상태
Kelvin 분류를 보이고 싶어요 ㅠㅠ file  
구퍼 에디터의 확장컴포넌트에 있는 code highlighter를 쓰고 싶은데요.. [1] 2009.01.31 by 애치티
Com.Com Software 로그인 DB를 연동 하고 싶은데..ㄷㄷ 어케 해야 하는지.. [9] 2009.01.31 by 뮤랑이
사슴483 메뉴순서 바꿀수있나요? [1] 2009.01.31 by VICSTONE
확깨는아이 티스토리블로그에 xe게시판 달기  
청개굴이 메인화면이 꽉찬 느낌이 들게 하려면 어카면 될까요..? [5] file 2009.01.31 by 만쓰별(정만)
청개굴이 어도브레디란 프로그램 아시는분..?  
블루파티 메인메뉴 폰트색 흰색으로 해도 FF나 크롬에선 검정색인 현상 [3] 2009.01.31 by 만쓰별(정만)
정기영208 폼메일을 설치하려고... [1] 2009.01.31 by 만쓰별(정만)
present2 플래시 삽입 방법 중에 좀 알려주세요~~ [3] 2009.01.31 by 만쓰별(정만)
피키4 [질문] xe에서 첨부파일 다운및 업로드할때 속도저하  
eJungHyun 블로그 카테고리 설정 문제 [1] file 2009.01.31 by eJungHyun