영화 게시판 이미지 더 추가하는 방법 > 그누4 질문답변

그누4 질문답변

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

영화 게시판 이미지 더 추가하는 방법 정보

영화 게시판 이미지 더 추가하는 방법

첨부파일

view.skin.php (11.3K) 3회 다운로드 2013-10-05 11:34:07
write.skin.php (11.9K) 2회 다운로드 2013-10-05 11:34:07

본문

안녕하세요?

영화 게시판 사진 첨부시... 총 3개만 사진이 나옵니다. ( 검정색으로 된 부분만 나오고 )

아래 부분은 안나옵니다..

3개 이상 이미지 추가가 본문에 안나옵니다 ㅠㅠ

원하는 겟수만큼 나오도록 하는 방법 없을까요..?

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

<!-- 게시글 보기 시작 -->
<table width="<?=$width?>" align="center" cellpadding="0" cellspcing="0"><tr><td>

<!-- 링크 버튼 -->
<?
ob_start();
?>
<script language="javascript">
<!--
 function view(what) {
var imgwin = window.open("",'WIN','scrollbars=no,status=no,toolbar=no,resizable=no,location=no,menu=no,width=10,height=10');
imgwin.focus();
imgwin.document.open();
imgwin.document.write("<html>\n");
imgwin.document.write("<head>\n");
imgwin.document.write("<title>그림을 클릭함 창이 닫혀요..</title>\n"); //오픈창 타이틀 이름 지정하는 부분

imgwin.document.write("<sc"+"ript>\n");
imgwin.document.write("function resize() {\n");
imgwin.document.write("pic = document.il;\n");
//imgwin.document.write("alert(eval(pic).height);\n");
imgwin.document.write("if (eval(pic).height) { var name = navigator.appName\n");
imgwin.document.write(" if (name == 'Microsoft Internet Explorer') { myHeight = eval(pic).height +20; myWidth = eval(pic).width + 0;\n");
imgwin.document.write(" } else { myHeight = eval(pic).height + 9; myWidth = eval(pic).width; }\n");
imgwin.document.write(" clearTimeout();\n");
imgwin.document.write(" var height = screen.height;\n");
imgwin.document.write(" var width = screen.width;\n");
imgwin.document.write(" var leftpos = width / 2 - myWidth / 2;\n");
imgwin.document.write(" var toppos = height / 2 - myHeight / 2; \n");
imgwin.document.write(" self.moveTo(leftpos, toppos);\n");
imgwin.document.write(" self.resizeTo(myWidth, myHeight);\n");
imgwin.document.write("}else setTimeOut(resize(), 100);}\n");
imgwin.document.write("</sc"+"ript>\n");

imgwin.document.write("</head>\n");
imgwin.document.write('<body topmargin="0" leftmargin="0" marginheight="0" marginwidth="0" bgcolor="black">\n');

imgwin.document.write("<img border=0 src="+what+" xwidth=100 xheight=9 name=il onload='resize();' onclick='window.close();' style='cursor:pointer'>\n");
imgwin.document.write("</body>\n");
imgwin.document.close();
}
-->
</script>
<table width='100%' cellpadding=0 cellspacing=0>
<tr height=35>
    <td width=75%>
        <? if ($search_href) { echo "<a href=\"$search_href\"><img src='$board_skin_path/img/btn_search_list.gif' border='0' align='absmiddle'></a> "; } ?>
        <? echo "<a href=\"$list_href\"><img src='$board_skin_path/img/btn_list.gif' border='0' align='absmiddle'></a> "; ?>

        <? if ($write_href) { echo "<a href=\"$write_href\"><img src='$board_skin_path/img/btn_write.gif' border='0' align='absmiddle'></a> "; } ?>
        <? if ($reply_href) { echo "<a href=\"$reply_href\"><img src='$board_skin_path/img/btn_reply.gif' border='0' align='absmiddle'></a> "; } ?>

        <? if ($update_href) { echo "<a href=\"$update_href\"><img src='$board_skin_path/img/btn_update.gif' border='0' align='absmiddle'></a> "; } ?>
        <? if ($delete_href) { echo "<a href=\"$delete_href\"><img src='$board_skin_path/img/btn_delete.gif' border='0' align='absmiddle'></a> "; } ?>

        <? if ($good_href) { echo "<a href=\"$good_href\" target='hiddenframe'><img src='$board_skin_path/img/btn_good.gif' border='0' align='absmiddle'></a> "; } ?>
        <? if ($nogood_href) { echo "<a href=\"$nogood_href\" target='hiddenframe'><img src='$board_skin_path/img/btn_nogood.gif' border='0' align='absmiddle'></a> "; } ?>

        <? if ($scrap_href) { echo "<a href=\"javascript:;\" onclick=\"win_scrap('$scrap_href');\"><img src='$board_skin_path/img/btn_scrap.gif' border='0' align='absmiddle'></a> "; } ?>

        <? if ($copy_href) { echo "<a href=\"$copy_href\"><img src='$board_skin_path/img/btn_copy.gif' border='0' align='absmiddle'></a> "; } ?>
        <? if ($move_href) { echo "<a href=\"$move_href\"><img src='$board_skin_path/img/btn_move.gif' border='0' align='absmiddle'></a> "; } ?>
    </td>
    <td width=25% align=right>
        <? if ($prev_href) { echo "<a href=\"$prev_href\" title=\"$prev_wr_subject\"><img src='$board_skin_path/img/btn_prev.gif' border='0' align='absmiddle'></a>&nbsp;"; } ?>
        <? if ($next_href) { echo "<a href=\"$next_href\" title=\"$next_wr_subject\"><img src='$board_skin_path/img/btn_next.gif' border='0' align='absmiddle'></a>&nbsp;"; } ?>
    </td>
</tr>
</table>
<?
$link_buttons = ob_get_contents();
ob_end_flush();
?>


<table width="100%" cellspacing="0" cellpadding="0">
<tr><td height=2 bgcolor=#B0ADF5></td></tr>
<tr><td height=30 bgcolor=#F8F8F9 style="padding:5 0 5 0;">&nbsp;&nbsp;<strong><? if ($is_category) { echo ($category_name ? "[$view[ca_name]] " : ""); } ?><font size=4><?=$view[subject]?></font></strong></td></tr>
  <tr><td height=30>&nbsp;&nbsp;<font color=#7A8FDB>글쓴이</font> : <?=$view[name]?><? if ($is_ip_view) { echo "&nbsp;($ip)"; } ?>&nbsp;&nbsp;&nbsp;&nbsp;
      <font color=#7A8FDB>날짜</font> : <?=substr($view[wr_datetime],2,14)?>&nbsp;&nbsp;&nbsp;&nbsp;
      <font color=#7A8FDB>조회</font> : <?=$view[wr_hit]?>&nbsp;&nbsp;&nbsp;&nbsp;
      <? if ($is_good) { ?><font color=#7A8FDB>추천</font> : <?=$view[wr_good]?>&nbsp;&nbsp;&nbsp;&nbsp;<?}?>
      <? if ($is_nogood) { ?><font color=#7A8FDB>비추천</font> : <?=$view[wr_nogood]?>&nbsp;&nbsp;&nbsp;&nbsp;<?}?></td></tr>
<tr><td height=1 bgcolor=#E7E7E7></td></tr>

<? if ($trackback_url) { ?>
<tr><td height=30>&nbsp;&nbsp;트랙백 주소 : <a href="javascript:clipboard_trackback('<?=$trackback_url?>');" style="letter-spacing:0;" title='이 글을 소개할 때는 이 주소를 사용하세요'><?=$trackback_url?></a>
<script language="JavaScript">
function clipboard_trackback(str)
{
    if (g4_is_gecko)
        prompt("이 글의 고유주소입니다. Ctrl+C를 눌러 복사하세요.", str);
    else if (g4_is_ie) {
        window.clipboardData.setData("Text", str);
        alert("트랙백 주소가 복사되었습니다.\n\n<?=$trackback_url?>");
    }
}
</script></td></tr>
<?}?>

<?
// 가변 파일
$cnt = 0;
for ($i=0; $i<count($view[file]); $i++)
{
    if ($view[file][$i][source] && !$view[file][$i][view])
    {
        $cnt++;
        //echo "<tr><td height=22>&nbsp;&nbsp;<img src='{$board_skin_path}/img/icon_file.gif' align=absmiddle> <a href='{$view[file][$i][href]}' title='{$view[file][$i][content]}'><strong>{$view[file][$i][source]}</strong> ({$view[file][$i][size]}), Down : {$view[file][$i][download]}, {$view[file][$i][datetime]}</a></td></tr>";
        echo "<tr><td height=22>&nbsp;&nbsp;<img src='{$board_skin_path}/img/icon_file.gif' align=absmiddle> <a href=\"javascript:file_download('{$view[file][$i][href]}', '{$view[file][$i][source]}');\" title='{$view[file][$i][content]}'><strong>{$view[file][$i][source]}</strong> ({$view[file][$i][size]}), Down : {$view[file][$i][download]}, {$view[file][$i][datetime]}</a></td></tr>";
    }
}
?>

<tr><td height=1 bgcolor=#E7E7E7></td></tr>
<tr>
<td>
<table border=0 cellpadding=0 cellspacing=0 width=100%>
<tr>
<td width=200 align=center>
<?
if($view[file][0][file]){
$image = $view[file][0][file];
$file1_v= "<img src='$g4[path]/data/file/$board[bo_table]/$image' width='180' height='230' align='center' onclick=\"view('$g4[path]/data/file/$bo_table/$image')\" >";}
else{echo "<center>메인이미지 지정안함</center>";}
for ($i=0; $i<=count; $i++){
if ($view[file][$i]){
echo "<a href='javascript:;'>$file1_v</a>";}
}
?> </td>
<td>
<table border=0 cellpadding=0 cellspacing=0 width=100%>
<tr height=30>
<td><font color=cf4911>감독</font> : <?=$view[wr_1]?></td>
</tr>
<tr>
<td><font color=cf4911>출연</font> : <?=$view[wr_2]?></td>
</tr>
<tr height=30>
<td><font color=cf4911>장르/기타</font> : <?=$view[wr_3]?></td>
</tr>
<?if($view[link][$i]){?>
<tr>
<td><font color=cf4911>공식홈</font> :
<?// 링크
$cnt = 0;
for ($i=1; $i<=$g4[link_count]; $i++)
{
if ($view[link][$i])
{
$cnt++;
$link = cut_str($view[link][$i], 70);
echo "&nbsp;&nbsp;<img src='{$board_skin_path}/img/icon_link.gif' align=absmiddle> <a href='{$view[link_href][$i]}' target=_blank><strong>{$link}</strong> ({$view[link_hit][$i]})</a>";
}}?>
</td>
</tr>
<?}?>
<tr>
<td height=140>
<?

$image1 = $view[file][1][file];
$image2 = $view[file][2][file];
$image3 = $view[file][3][file];
$file1= "<img src='$g4[path]/data/file/$board[bo_table]/$image1' width='100' height='120' align='center' onclick=\"view('$g4[path]/data/file/$bo_table/$image1')\">";
$file2= "<img src='$g4[path]/data/file/$board[bo_table]/$image2' width='100' height='120' align='center' onclick=\"view('$g4[path]/data/file/$bo_table/$image2')\">";
$file3= "<img src='$g4[path]/data/file/$board[bo_table]/$image3' width='100' height='120' align='center' onclick=\"view('$g4[path]/data/file/$bo_table/$image3')\">";
if ($view[file][1][view]){
echo "<a href='javascript:;'>$file1</a>";
}
if ($view[file][2][view]){
echo "&nbsp;&nbsp;<a href='javascript:;'>$file2</a>";
}
if ($view[file][3][view]){
echo "&nbsp;&nbsp;<a href='javascript:;'>$file3</a>";
}
else if(!$view[file][1][file] && !$view[file][2][file] && !$view[file][3][file])
echo "추가이미지없음";
?>


</td>
</tr>
</table>
</td>
</tr></table>
</td>
</tr>
<tr>
    <td height="150" style='word-break:break-all; padding:10px;' bgcolor=#F8F8F9>
        <!--
<?
        // 파일 출력
        for ($i=0; $i<=count($view[file]); $i++) {
            if ($view[file][$i][view])
                echo $view[file][$i][view] . "<p>";
        }
        ?>
-->

        <span class="ct lh"><?=$view[content];?></span>
        <?//echo $view[rich_content]; // 과 같은 코드를 사용할 경우?>
        <!-- 테러 태그 방지용 --></xml></xmp><a href=""></a><a href=''></a>
       
        <? if ($is_signature) { echo "<br>$signature<br><br>"; } // 서명 출력 ?></td>
</tr>
</table><br>


<?
include_once("./view_comment.php");
?>

<?=$link_buttons?>

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

<script language="JavaScript">
// HTML 로 넘어온 <img ... > 태그의 폭이 테이블폭보다 크다면 테이블폭을 적용한다.
function resize_image()
{
    var target = document.getElementsByName('target_resize_image[]');
    var image_width = parseInt('<?=$board[bo_image_width]?>');
    var image_height = 0;

    for(i=0; i<target.length; i++) {
        // 원래 사이즈를 저장해 놓는다
        target[i].tmp_width  = target[i].width;
        target[i].tmp_height = target[i].height;
        // 이미지 폭이 테이블 폭보다 크다면 테이블폭에 맞춘다
        if(target[i].width > image_width) {
            image_height = parseFloat(target[i].width / target[i].height)
            target[i].width = image_width;
            target[i].height = parseInt(image_width / image_height);
        }
    }
}

window.onload = resize_image;

function file_download(link, file)
{
<? if ($board[bo_download_point] < 0) { ?>if (confirm("'"+file+"' 파일을 다운로드 하시면 포인트가 차감(<?=number_format($board[bo_download_point])?>점)됩니다.\n\n포인트는 게시물당 한번만 차감되며 다음에 다시 다운로드 하셔도 중복하여 차감하지 않습니다.\n\n그래도 다운로드 하시겠습니까?"))<?}?>
document.location.href = link;
}
</script>
<!-- 게시글 보기 끝 -->
  • 복사

댓글 전체

$image1 = $view[file][1][file];
$image2 = $view[file][2][file];
$image3 = $view[file][3][file];
$image4 = $view[file][4][file];

$file1= "<img src='$g4[path]/data/file/$board[bo_table]/$image1' width='100' height='120' align='center' onclick=\"view('$g4[path]/data/file/$bo_table/$image1')\">";
$file2= "<img src='$g4[path]/data/file/$board[bo_table]/$image2' width='100' height='120' align='center' onclick=\"view('$g4[path]/data/file/$bo_table/$image2')\">";
$file3= "<img src='$g4[path]/data/file/$board[bo_table]/$image3' width='100' height='120' align='center'
onclick=\"view('$g4[path]/data/file/$bo_table/$image3')\">";
$file4= "<img src='$g4[path]/data/file/$board[bo_table]/$image4' width='100' height='120' align='center' onclick=\"view('$g4[path]/data/file/$bo_table/$image4')\">";
if ($view[file][1][view]){
echo "<a href='javascript:;'>$file1</a>";
}
if ($view[file][2][view]){
echo "&nbsp;&nbsp;<a href='javascript:;'>$file2</a>";
}
if ($view[file][3][view]){
echo "&nbsp;&nbsp;<a href='javascript:;'>$file3</a>";
}
if ($view[file][4][view]){
echo "&nbsp;&nbsp;<a href='javascript:;'>$file4</a>";
}
else if(!$view[file][1][file] && !$view[file][2][file] && !$view[file][3][file] && !$view[file][4][file])
echo "추가이미지없음";



위 내용에서 숫자 4 들어간 곳 체크
© SIRSOFT
현재 페이지 제일 처음으로