그누보드4스킨

그누보드4스킨

QA

그누보드4스킨

본문

그누4스킨을 그누5에 사용하고 싶어서 리스트스킨부터 조금씩 수정해보는데 오류가 뜨네요.

 

list skin php

<?php
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가 

// 선택옵션으로 인해 셀합치기가 가변적으로 변함
$colspan = 5;
if ($is_category) $colspan++;
if ($is_checkbox) $colspan++;
if ($is_good) $colspan++;
if ($is_nogood) $colspan++;

// 제목이 두줄로 표시되는 경우 이 코드를 사용해 보세요.
// <nobr style='display:block; overflow:hidden; width:000px;'>제목</nobr>
?>

<!-- 게시판 목록 시작 -->
<table width="728" align=center cellpadding=0 cellspacing=0>
<tr><td style="padding:0 0 5 0;">
        <table width="100%" border="0" cellpadding="10" cellspacing="2" bgcolor="#EBEBEB">
          <tr>
            <td bgcolor="#FFFFFF">
            <strong>|<?php echo $board['bo_subject']?>|</strong>
            </td>
          </tr>
        </table>
</td></tr>


<tr><td>

<!-- 제목 -->
<form name="fboardlist" method="post" style="margin:0px;">
<input type="hidden" name="bo_table" value="<?php echo $bo_table?>">
<input type="hidden" name="sfl"  value="<?php echo $sfl?>">
<input type="hidden" name="stx"  value="<?php echo $stx?>">
<input type="hidden" name="spt"  value="<?php echo $spt?>">
<input type="hidden" name="page" value="<?php echo $page?>">
<input type="hidden" name="sw"   value="">
<table width=100% cellpadding=0 cellspacing=0>
<!--<tr><td colspan=<?php echo $colspan?> height=2 bgcolor=#FF9900></td></tr>
<tr bgcolor=#F8F8F9 height=30 align=center>
     <td width=50>번호</td>
    <?php if ($is_category) { ?><td width=70>분류</td><?}?>
    <?php if ($is_checkbox) { ?><td width=40><INPUT onclick="if (this.checked) all_checked(true); else all_checked(false);" type=checkbox></td><?}?>
    <td width=160>업체로고</td>
    <td width=120>업체명/사이트/소개글</a></td>
   <td width=40><?php echo subject_sort_link('wr_hit', $qstr2, 1)?>조회</a></td>
    <td width=100 ><?php echo subject_sort_link('wr_datetime', $qstr2, 1)?>등록일</a></td>
    <?php if ($is_good) { ?><td width=40><?php echo subject_sort_link('wr_good', $qstr2, 1)?>추천</a></td><?}?>
    <?php if ($is_nogood) { ?><td width=40><?php echo subject_sort_link('wr_nogood', $qstr2, 1)?>비추천</a></td><?}?>
    <td width=100>등록자</td>
</tr>
<tr><td colspan=<?php echo $colspan?> height=1 bgcolor=#FF9900></td></tr> -->

<!-- 목록 -->
<?php for ($i=0; $i<count($list); $i++) { 

?>
<tr height=28 align=center> 
    <?php if ($is_category) { ?><td><a href="<?php echo $list[$i][ca_name_href]?>"><font color=gray><span class=small><?php echo $list[$i][ca_name]?></span></font></a></td><?php } ?>
    <?php if ($is_checkbox) { ?><td><input type=checkbox name=chk_wr_id[] value="<?php echo $list[$i][wr_id]?>"></td><?php } ?>
    <td align=center style='word-break:break-all;'  height=80>
        <?php 
            //이미지보이기
            $img = G5_DATA_PATH/file/$bo_table/".urlencode($list[$i][file][0][file]);
            if (file_exists($img) && $list[$i][file][0][file])
            {     echo "<a href=\"{$list[$i][wr_link1]}\" target=\"_blank\"><img src=\"{$img}\" width=\"120\" height=\"40\" border=\"0\" style=\"border:1px solid #BBBBBB;\"></a>"; }
        ?></td>

    <td align=left style='word-break:break-all;'  height=80>
        <?php 
        echo $nobr_begin;
        echo $list[$i]['reply'];
        echo $list[$i]['icon_reply'];
        //echo "<a href='{$list[$i][href]}'>";
        if ($list[$i]['is_notice'])
            echo "<font color='#FF6600'><strong>{$list[$i][subject]}</strong></font>";
        else
        {
            $style1 = $style2 = "";
            if ($list[$i]['icon_new']) // 최신글은 검정
                $style1 = "color:#112222;";
            if (!$list[$i]['comment_cnt']) // 코멘트 없는것만 굵게
                $style2 = "";
            
            $list[$i]['wr_1'] = str_replace("http://","",$list[$i]['wr_1']);
            //echo "<span style='$style1 $style2'><B>{$list[$i][subject]}</B></span> (순서: {$list[$i]['wr_3']}";
            //if($list[$i]['wr_4']=="1") echo ", 사용)";
            //else echo ", 미사용)";
            if ($is_admin) {
            echo "업체명: <a href='{$list[$i]['href']}'>{$list[$i]['subject']}</a></span>";
            }else{
            echo "업체명: {$list[$i][subject]}</span>";
            }
            echo "<BR>사이트 : <a href=\"{$list[$i]['wr_link1']}\" target=\"_blank\" >{$list[$i]['wr_link1']}</a>";
        }
       // echo "</a>";

        if ($list[$i]['comment_cnt']) 
            echo " <a href=\"{$list[$i][comment_href]}\"><span style='font-size:7pt;'>{$list[$i][comment_cnt]}</span></a>";

        // if ($list[$i]['link']['count']) { echo "[{$list[$i]['link']['count']}]"; }
        // if ($list[$i]['file']['count']) { echo "<{$list[$i]['file']['count']}>"; }

        //echo " " . $list[$i][icon_new];
        //echo " " . $list[$i][icon_file];
        //echo " " . $list[$i][icon_link];
        //echo " " . $list[$i][icon_hot];
        //echo " " . $list[$i][icon_secret];
        echo $nobr_end;
        ?></td>

    <!-- <td><?php echo $list[$i][wr_hit]?></td> -->
<!--     <td><?php echo $list[$i][datetime2]?></td>
    <?php if ($is_good) { ?><td align="center"><?php echo $list[$i][wr_good]?></td><?php } ?>
    <?php if ($is_nogood) { ?><td align="center"><?php echo $list[$i][wr_nogood]?></td><?php } ?>
    <td><?php echo $list[$i][name]?></td> -->
</tr>
<tr><td colspan=<?php echo $colspan?> height=1 bgcolor=#E7E7E7></td></tr>
<?}?>


<!-- <tr><td colspan=<?php echo $colspan?> bgcolor=#5C86AD height=1></td></tr> -->
<tr><td colspan="<?php echo $colspan?>" height="40" align="center">
<?php if ($write_href) { ?><a href="<?php echo $write_href?>"><img src="<?php echo $board_skin_path?>/img/btn_write.gif" border="0"></a><?php } ?>
<?php if ($admin_href) { ?>
<a href="<?php echo $admin_href?>"><img src="<?php echo $board_skin_path?>/img/admin_button.gif" title="관리자" align="absmiddle"></a>
<a href="javascript:select_delete();"><img src="<?php echo $board_skin_path?>/img/btn_select_delete.gif" border="0"></a>
<a href="javascript:select_copy('copy');"><img src="<?php echo $board_skin_path?>/img/btn_select_copy.gif" border="0"></a>
<a href="javascript:select_copy('move');"><img src="<?php echo $board_skin_path?>/img/btn_select_move.gif" border="0"></a>
<?}?>
</td></tr>
</table>
</form>

</td></tr></table>

<script language="JavaScript">
if ("<?=$sca?>") document.fcategory.sca.value = "<?=$sca?>";
if ("<?=$stx?>") {
    document.fsearch.sfl.value = "<?=$sfl?>";
    document.fsearch.sop.value = "<?=$sop?>";
}
</script>

<?php if ($is_checkbox) { ?>
<script language="JavaScript">
function all_checked(sw)
{
    var f = document.fboardlist;

    for (var i=0; i<f.length; i++) {
        if (f.elements[i].name == "chk_wr_id[]")
            f.elements[i].checked = sw;
    }
}

function check_confirm(str)
{
    var f = document.fboardlist;
    var chk_count = 0;

    for (var i=0; i<f.length; i++) {
        if (f.elements[i].name == "chk_wr_id[]" && f.elements[i].checked)
            chk_count++;
    }

    if (!chk_count) {
        alert(str + "할 게시물을 하나 이상 선택하세요.");
        return false;
    }
    return true;
}

// 선택한 게시물 삭제
function select_delete()
{
    var f = document.fboardlist;

    str = "삭제";
    if (!check_confirm(str))
        return;

    if (!confirm("선택한 게시물을 정말 "+str+" 하시겠습니까?\n\n한번 "+str+"한 자료는 복구할 수 없습니다"))
        return;

    f.action = "./delete_all.php";
    f.submit();
}

// 선택한 게시물 복사 및 이동
function select_copy(sw)
{
    var f = document.fboardlist;

    if (sw == "copy")
        str = "복사";
    else
        str = "이동";
                       
    if (!check_confirm(str))
        return;

    var sub_win = window.open("", "move", "left=50, top=50, width=396, height=550, scrollbars=1");

    f.sw.value = sw;
    f.target = "move";
    f.action = "./move.php";
    f.submit();
}
</script>
<?php } ?>
<!-- 게시판 목록 끝 -->

 

아래 66번째줄에 이상이 있다고 오류 메세지가 뜨는데 도움좀 부탁합니다.

{     echo "<a href=\"{$list[$i][wr_link1]}\" target=\"_blank\"><img src=\"{$img}\" width=\"120\" height=\"40\" border=\"0\" style=\"border:1px solid #BBBBBB;\"></a>"; }

이 질문에 댓글 쓰기 :

답변 2



<?php 
            //이미지보이기
            $img = G5_DATA_PATH/file/$bo_table/".urlencode($list[$i][file][0][file]);
            if (file_exists($img) && $list[$i][file][0][file])
            {     echo "<a href=\"{$list[$i][wr_link1]}\" target=\"_blank\"><img src=\"{$img}\" width=\"120\" height=\"40\" border=\"0\" style=\"border:1px solid #BBBBBB;\"></a>"; }
        ?></td>

$img = G5_DATA_PATH/file/$bo_table/".urlencode($list[$i][file][0][file]); ---> ." 빠짐

$img = G5_DATA_PATH."/file/$bo_table/".urlencode($list[$i][file][0][file]);

답변을 작성하시기 전에 로그인 해주세요.
전체 0 | RSS
QA 내용 검색
  • 개별 목록 구성 제목 답변작성자조회작성일
  • 질문이 없습니다.

회원로그인

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