급해서 다시 올립니다. > 그누4 질문답변

그누4 질문답변

그누보드4 관련 질문은 QA 로 이전됩니다. QA 그누보드4 바로가기
기존 게시물은 열람만 가능합니다.

급해서 다시 올립니다. 정보

급해서 다시 올립니다.

본문

고수님들 아래 소스 한번만 봐주세요..
설치하니까 아래와 같은 오류문구가 뜨네요
꼭,좀 부탁드립니다.

-----------아래------------

Parse error: syntax error, unexpected T_STRING in /home/ccdm/public_html/bbs/skin/latest/news/latest.skin.php on line 89


--------------소스---------------------

if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가

$cols  = 90; //  이미지 가로갯수 //  이미지 세로 갯수는 메인에서 지정(총 이미지 수)
$image_h  = 0; // 이미지 상하 간격
$col_width = (int)(99 / $cols);

$img_width = 80; //썸네일 가로길이
$img_height = 50; //썸네일 세로길이
$img_quality = 60; //퀼리티 100이하로 설정

//$subject_size= 60; //제목 보여질 글자수
//$content_size= 210; //내용 보여질 글자수

if (!function_exists("imagecopyresampled")) alert("GD 2.0.1 이상 버전이 설치되어 있어야 사용할 수 있는 갤러리 게시판 입니다.");

$data_path = $g4[path]."/data/file/$bo_table";
$thumb_path = $data_path.'/thumb_news'; //썸네일 이미지 생성 디렉토리

@mkdir($thumb_path, 0707);
@chmod($thumb_path, 0707);

?>
<table width="100%" border="0" cellspacing="0" cellpadding="2">
  <? for ($i=0; $i<count($list); $i++)  if ($i==0 || $i==1) {
    $img = "<img src='$g4_path/img/noimage.gif' border=1 width='$img_width' height='$img_height' title='이미지 없음' align=left style='margin-right:5px; border:1 #222222 solid;'>";
    $thumb = $thumb_path.'/'.$list[$i][wr_id].'.gif';
    // 썸네일 이미지가 존재하지 않는다면
    if (!file_exists($thumb)) {

        if ($list[$i][file][1][file]) { //두번째 파일이 이미지라면
            $file = $list[$i][file][1][path] .'/'. $list[$i][file][1][file];
}else if ($list[$i][file][0][file]) { //첫번째 파일이 이미지라면
            $file = $list[$i][file][0][path] .'/'. $list[$i][file][0][file];
}

        // 업로드된 파일이 이미지라면
        if (preg_match("/\.(jp[e]?g|gif|png|btm)$/i", $file) && file_exists($file)) {
            $size = getimagesize($file);
            if ($size[2] == 1)
                $src = imagecreatefromgif($file);
            else if ($size[2] == 2)
                $src = imagecreatefromjpeg($file);
            else if ($size[2] == 3)
                $src = imagecreatefrompng($file);
            else
                break;

            $rate = $img_width / $size[0];
            $height = (int)($size[1] * $rate);

            // 계산된 썸네일 이미지의 높이가 설정된 이미지의 높이보다 작다면
            if ($height < $img_height)
                // 계산된 이미지 높이로 복사본 이미지 생성
                $dst = imagecreatetruecolor($img_width, $height);
            else
                // 설정된 이미지 높이로 복사본 이미지 생성
                $dst = imagecreatetruecolor($img_width, $img_height);
            imagecopyresampled($dst, $src, 0, 0, 0, 0, $img_width, $height, $size[0], $size[1]);
            imagepng($dst, $thumb_path.'/'.$list[$i][wr_id].'.gif', $img_quality);
            chmod($thumb_path.'/'.$list[$i][wr_id].'.gif', 0606);
        }
    }

    if (file_exists($thumb))
        $img = "<img src='$thumb' border=1 align=left style='margin-right:5px; border:1 #222222 solid;'>";

        $datetime = substr($list[$i][wr_datetime],0,10);
        $datetime2 = $list[$i][wr_datetime];
       
        if ($list[$i]['wr_datetime'] >= date("Y-m-d H:i:s", $g4['server_time'] - ($row['bo_new'] * 3600))) $comment_new = "new";

        if ($datetime == $g4[time_ymd])
            $datetime2 = substr($datetime2,11,5);
        else
            $datetime2 = substr($datetime2,5,5);

    $list[$i][datetime] = $datetime;
    $list[$i][datetime2] = $datetime2;
   
    $a[$i] = array(
      "wr_date"=>$datetime2,
);

 $rw_subject = cut_str(stripslashes($list[$i][subject]),$subject_size,'..');
 $a_link="<a href='{$list[$i][href]}'>$rw_subject</a>";
 $a_img="<a href='{$list[$i][href]}'>$img</a>";
 $a_comment="<a href=\"{$list[$i][comment_href]}\"><span class='commentFont'>{$list[$i]['comment_cnt']}</span></a>";
if ($list[$i][file][0][file] || $list[$i][file][1][file]) { $wr_content = ""<a href='{$list[$i][href]}'>".Shorten_String(strip_tags($list[$i][wr_content]), 180, '&nbsp;&nbsp;&nbsp;..more')."</a>";// 이미지가 있으면 130글자


 }else{ $wr_content = "<a href='{$list[$i][href]}'>".Shorten_String(strip_tags($list[$i][wr_content]), 180, '&nbsp;&nbsp;&nbsp;..more')."</a>"; } // 이미지가 없으면 180글자
?>
  <tr>
    <td height="22">
      <? if (strstr($list[$i][wr_option], "adult")) { echo "<img src='$latest_skin_path/img/icon_19.gif' align='absmiddle'>&nbsp;"; }?>
      <a href='<?=$list[$i][href]?>'><span style='font:normal 14px 돋움;color:#666666;'><b><?=$list[$i]['subject']?></b></span></a></td>
  </tr>
  <tr>
    <td>
      <table width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr>
          <? if ($list[$i][file][0][file] || $list[$i][file][1][file]) {?>
          <td width="<?=$img_width ?>"><?=$a_img?></td>
          <?}?>
          <td style="padding-left:5"><?=$wr_content?></td>
        </tr>
      </table>
    </td>
  </tr>
  <tr>
    <td height="5"></td>
  </tr>
  <tr>
    <td background="<?=$latest_skin_path?>/img/dot_line.gif" height="1"></td>
  </tr>
  <tr>
    <td height="5"></td>
  </tr>
  <?} for ($i=2; $i<count($list); $i++) { //세번째 글부터는 제목만 출력 ?>
  <tr>
    <td>ㆍ
      <? if (strstr($list[$i][wr_option], "adult")) { echo "<img src='$latest_skin_path/img/icon_19.gif' align='absmiddle'>&nbsp;"; }?>
      <a href='<?=$list[$i][href]?>'><?=$list[$i]['subject']?></a></td>
  </tr>
  <?}?>
</table>


------참고로 여러고수님들의 조언에 따라 아래와 같이도 변경을 해서 테스트를 했지만 결과는 똑 같았습니다.----------

89라인에 $wr_content = ""<a href='{$list[$i][href]}'>".
=> $wr_content = "<a href='{$list[$i][href]}'>".

댓글 전체

전체 66,554 |RSS
그누4 질문답변 내용 검색

회원로그인

(주)에스아이알소프트 / 대표:홍석명 / (06211) 서울특별시 강남구 역삼동 707-34 한신인터밸리24 서관 1402호 / E-Mail: admin@sir.kr
사업자등록번호: 217-81-36347 / 통신판매업신고번호:2014-서울강남-02098호 / 개인정보보호책임자:김민섭(minsup@sir.kr)
© SIRSOFT