묻고답하기

게시판의글
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 남기남
이병현161 index.php [1] 2011.07.05 by 김구고
대웅 황당한 db 용량 해결법 좀 알려주세요. [1] 2011.07.05 by 모조키
이진영302 php 파일에서 로그인 정보 얻기.. [1] 2011.07.05
이병현161 게시물 추출 외 질문 몇가지..  
정하엄마 제로보드4에서 글쓰기 후에 이동페이지 설정방법 [1] 2011.07.05 by ezi
YuYu_ XE 설치 시 HTTP 404 에러가 납니다.  
후르방 배너/통합검색/자바 관련 질문입니다!!  
영구만세 카테고리를 선택하면 부메뉴가 깨지는 현상 [1] 2011.07.05 by 영구만세
라펠 공식사이트 홈페이지자랑게시판 모바일 사진크기 [1] 2011.07.05 by 김구고
H-BNB 도움좀 부탁합니다. [1] 2011.07.04 by 날개!
나의해 초보질문. 제대로 인식을 못해요 [2] 2011.07.04 by 모조키
곰돌이3 xe 사이트 운영중인데요. 로그인이 되지 않아요. [1] 2011.07.04 by 김구고
배정호310 구글 광고넣기...고수분들은 보면아실거같은대..도와주세요 [1] 2011.07.04 by 김구고
토드정 썸네일 출력이 안됩니다. [3] 2011.07.04 by 토드정
H-BNB 송동우님 읽어봐주세요.  
배정호310 제발 아무나 답변좀해주세요 몇일째 이러고잇어요 ㅜㅜㅜㅜㅜㅜㅜㅜ  
이호상627 DB 선택창에서 mySql 을 선택할 수 없습니다.  
H-BNB 모조키님 읽어봐주세요 [2] 2011.07.04 by 모조키
율리안 제로보드 가운데 정렬ㅠㅠ [1] 2011.07.04 by ForHanbi
alljoy 서버요청중.....메세지 [1] 2011.07.04 by 낮은 자
jjjnnn 회원가입폼이 내용에 박히게?하려면 어떻게 하나요 [1] 2011.07.04 by 모조키
H-BNB 송동우님 읽어봐주세요.(감사합니다) [1] 2011.07.04 by 모조키
낮은 자 레이아웃의 문제입니다. [1] 2011.07.04 by ForHanbi
아냐저자랴져여 [최근글, 인기글, 최근댓글 위젯] 문제 해결해주세요~ [1] 2011.07.04 by 낮은 자
안수완 게시판의 리스트에서 제목을 클릭시  
오대영582 이미지 여러개 올릴때 [3] 2011.07.04 by 낮은 자
rocktizen 업데이트후 레이아웃이... [1] 2011.07.04 by 낮은 자
금강초롱™ XE를 삭제 할려고 합니다. [1] 2011.07.04 by 모조키
Mavin 로그인이 안됩니다. [1] 2011.07.04 by 낮은 자
초천재501 [부탁] 글쓰기시 에디터에 파일 자동으로 추가하기