운영자님겔러리스킨 zzalbang 리스트.php 질문좀올립니다. > 그누4 질문답변

그누4 질문답변

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

운영자님겔러리스킨 zzalbang 리스트.php 질문좀올립니다. 정보

운영자님겔러리스킨 zzalbang 리스트.php 질문좀올립니다.

본문

list.php 일부올려봅니다.
 
 
<form name="fboardlist" method="post" style="margin:0px;">
<input type="hidden" name="bo_table" value="<?=$bo_table?>">
<input type="hidden" name="sfl"  value="<?=$sfl?>">
<input type="hidden" name="stx"  value="<?=$stx?>">
<input type="hidden" name="spt"  value="<?=$spt?>">
<input type="hidden" name="page" value="<?=$page?>">
<input type="hidden" name="sw"   value="">
<table width=100% cellpadding=0 cellspacing=0>
<tr><td colspan='<?=$mod?>' height=2 bgcolor=#B0ADF5></td></tr>
<tr>
<?
for ($i=0; $i<count($list); $i++)
{
    if ($i && $i%$mod==0)
        echo "</tr><tr>";
    $img = "<img src='$board_skin_path/img/noimage.gif' border=0 width='$board[bo_1]' title='이미지 없음'>";
    $thumb = $thumb_path.'/'.$list[$i][wr_id];
    if (!file_exists($thumb))
    {
        $file = $list[$i][file][0][path] .'/'. $list[$i][file][0][file];
        if (preg_match("/\.(jp[e]?g|gif|png)$/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
                continue;
            $rate = $board[bo_1] / $size[0];
            $height = (int)($size[1] * $rate);
            if ($height < $board[bo_2])
                $dst = imagecreatetruecolor($board[bo_1], $height);
            else
                $dst = imagecreatetruecolor($board[bo_1], $board[bo_2]);
            imagecopyresampled($dst, $src, 0, 0, 0, 0, $board[bo_1], $height, $size[0], $size[1]);
            imagepng($dst, $thumb_path.'/'.$list[$i][wr_id], $board[bo_3]);
            chmod($thumb_path.'/'.$list[$i][wr_id], 0606);
        }
    }
    if (file_exists($thumb))
        $img = "<img src='$thumb' border=0 style='border:1px solid #999999;'>";
    $style = "";
    if ($list[$i][icon_new])
        $style = " style='font-weight:bold;' ";
    $subject = "<span $style>".cut_str($list[$i][subject],20)."</span>";
    $comment_cnt = "";
    if ($list[$i][comment_cnt])
        $comment_cnt = " <a href=\"{$list[$i][comment_href]}\"><span style='font-size:7pt;'>{$list[$i][comment_cnt]}</span></a>";
    echo "<td width='{$td_width}%' valign=bottom style='word-break:break-all;'>";
    echo "<table width=100%>";
    echo "<tr><td height=5></td></tr>";
    echo "<tr><td align=center><a href='{$list[$i][href]}'>$img</a></td></tr>";
    echo "<tr><td align=center><a href='{$list[$i][href]}'>$subject</a>{$comment_cnt}</td></tr>";
    if ($is_category) echo "<tr><td align=center><a href='{$list[$i][ca_name_href]}'><font color=#cccccc>[{$list[$i][ca_name]}]</font></a></td></tr>";
    if ($is_checkbox) echo "<tr><td align=center><input type=checkbox name=chk_wr_id[] value='{$list[$i][wr_id]}'></td></tr>";
    echo "<tr><td height=5></td></tr>";
    echo "</table></td>\n";
}
// 나머지 td
$cnt = $i%$mod;
 
리스트에 제목아래에 글쓴이 이름을 출력시킬려고 하는데 까막눈이라서 아무리 해도 안되네요;;
요부분 좀알려주시면 고맙겠습니다.
이걸루 족히 두시간이상 눈빠지게 하다보니 이젠 염치불구하고 질문올려봅니다.ㅋㅋ
부디염치없다 욕하지마시고 초보좀 도와주세요.
그리고 모든분들 행복하시구요;;
  • 복사

댓글 전체

rolo 님감사합니다.
시간이 없어서 이제야 글확인했습니다.
답변에 너무고맙구요.
아직 해보진 않았지만 저정도로 콕 집어넣어주셔서  감사;;
얼른실력을 키워서 초보를 위한답변도 달아봐야겠는데 언제나될런지^^
행복하시기를....
© SIRSOFT
현재 페이지 제일 처음으로