list.skin.php 에서 첨부파일 받을 수 있도록 하고싶습니다. > 그누4 질문답변

그누4 질문답변

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

list.skin.php 에서 첨부파일 받을 수 있도록 하고싶습니다. 정보

list.skin.php 에서 첨부파일 받을 수 있도록 하고싶습니다.

본문

여러가지 코드르 써봤는데. 리스트에서 첨부파일이 나타나지않습니다.

어떤 코드를 삽입해야할지 도움좀 부탁드립니다.




list.skin.php


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

// $image_width  = 250; // 이미지 폭
// $image_height = 200; // 이미지 높이

if (!$skin_no) $skin_no = "01";
?>

<!-- 게시판 목록 시작 -->
<table width="<?=$width?>" align=center cellpadding=0 cellspacing=0><tr><td>


<!-- 박스 시작-->
<table width="100%" cellspacing="0" cellpadding="0">
 
  <tr>
<td></td>
<td>
      <!-- 게시물 리스트 시작 -->

<!-- 제목 -->
<?
// 번호에 이미지를 사용할 경우는 아래의 주석을 제거하고 $list[$i][num]의 내용을 수정후 사용하세요.
// if (!is_int($list[$i][num])) { $list[$i][num] = "<img src='$board_skin/img/arrow.gif'>"; }
?>
<? for ($i=0; $i<count($list); $i++) { ?>
<table width=100% border=0 cellpadding=5 cellspacing=0 align="center" bgcolor=ffffff>
<tr align=center>

    <td align=center valign=top>
          <?
    $image = urlencode($list[$i][file][0][file]); // 첫번째 파일이 이미지라면
            if (preg_match("/\.(gif|jpg|png)$/i", $image) && file_exists("$g4[path]/data/file/$bo_table/$image")) {
                echo "<img src='$g4[path]/data/file/$bo_table/$image' border='0'>&nbsp;&nbsp;";
}
    else if (file_exists($list[$i][file_image1])) { $gznews_img = "border=0)'><br>"; }
 
      else if (preg_match("/\.(swf|wma|asf)$/i", $image) && file_exists("$g4[path]/data/file/$bo_table/$image")) {
                echo "<embed src='$g4[path]/data/file/$bo_table/$image' width='700' height='200' border='0' wmode='transparent'></embed>&nbsp;&nbsp;";
}
 
?>
<a href='<?="./board.php?&bo_table=$bo_table&wr_id={$list[$i][wr_id]}"?>'></a>
   
   
      </td>
    </tr>
   
    <tr>
   
    <td align=left>
        <table width="100%"  border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td ><font class=aaaa>
              <?=$list[$i][wr_content]?>
              <br>
              <? if ($admin_href) { ?><a href="<?=$list[$i][href]?>"><img src="<?=$board_skin_path?>/img/btn_update.gif" border=0></a><?}?>
              </font>
              </td>
          </tr>
        </table></td>

 
</tr>
</table>

<? } ?>

<? if (count($list) == 0) { echo "<tr><td colspan=6 align=center height=100 class='content contentbg'>자료가 없습니다.</td></tr>"; } ?>

</form>

<!-- 게시물 리스트 끝 -->
</td>
<td></td>
  </tr>

</table>
<!-- 박스 끝-->
<!-- 페이징 부분 삭제 -->

<!-- 버튼 링크 -->
<form name=fsearch method=get style="margin:0px;">
<input type=hidden name=bo_table value="<?=$bo_table?>">
<input type=hidden name=sca      value="<?=$sca?>">


<!-- 관리자화면 링크, 분류 셀렉트 박스, 게시물 몇건  -->


<table width=100% cellpadding=0 cellspacing=0 border=0>
<tr>
    <td width="50%" height="10">
        <? if ($list_href) { ?><a href="<?=$list_href?>"><img src="<?=$board_skin_path?>/img/btn_list.gif" border="0"></a><? } ?>
        <? if ($write_href) { ?><a href="<?=$write_href?>"><img src="<?=$board_skin_path?>/img/btn_write.gif" border="0"></a><? } ?>
    </td>
 
 
  <td align="right">
      <? if ($admin_href) { ?><a href="<?=$admin_href?>"><img src="<?=$board_skin_path?>/img/admin_button.gif" title="관리자" width="63" height="22" border="0" align="absmiddle"></a><?}?>
  </td>
         
           
</tr>
</table>
</form>

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



<table width="100%" cellspacing="0" cellpadding="0">
  <tr>
<td>
<?
      $ss_name = "ss_view_{$bo_table}_{$list[$i][wr_id]}";
      session_register($ss_name);
      $$ss_name = $HTTP_SESSION_VARS[$ss_name] = TRUE;


if($list[$i][file][0]) {
$down_link0 = "download.php?bo_table=" . $bo_table . "&wr_id=" . $list[$i][wr_id] . "&no=0";
echo "<a href='$down_link0'>";
echo "1번파일링크";
echo "</a>";
}
if($list[$i][file][1]) {
$down_link1 = "download.php?bo_table=" . $bo_table . "&wr_id=" . $list[$i][wr_id] . "&no=1";
echo "<a href='$down_link1'>";
echo "2번파일링크";
echo "</a>";
}
?>
</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>

<? 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>
<? } ?>
<!-- 게시판 목록 끝 -->
  • 복사

댓글 전체

© SIRSOFT
현재 페이지 제일 처음으로