첨부파일 이미지 크기 고정

첨부파일 이미지 크기 고정

QA

첨부파일 이미지 크기 고정

답변 1

본문

안녕하세요.
이미지를 첨부파일로 받아서 내용보기에서 크기를 고정 시키고 싶은데요...ㅜㅡ
게시판을 수정해서 사용하다보니 관리자페이지에서는 안먹이네요.

view.skin.php 에서 아래 소스로 파일을 불러오고 있습니다.
소스로 해결할 수 있는 방법이 있을까요?

<table width="100" height="150" border="0" cellpadding="0" cellspacing="0" style="border:1px solid #ddd; ">
    <tr>
    <td height="150" align="center" valign="middle">
        <?
                // 가변 파일
                $cnt = 0;
                for ($i=0; $i<count($view[file]); $i++) {
                    if ($view[file][$i][source] && !$view[file][$i][view]) {
                        $cnt++;
                        echo "<tr><td height=30 background=\"$board_skin_path/img/view_dot.gif\">";
                        echo "  <img src='{$board_skin_path}/img/icon_file.gif' align=absmiddle border='0'>";
                        echo "<a href=\"javascript:file_download('{$view[file][$i][href]}', '".urlencode($view[file][$i][source])."');\" title='{$view[file][$i][content]}'>";
                        echo " <span style=\"color:#888;\">{$view[file][$i][source]} ({$view[file][$i][size]})</span>";
                        echo " <span style=\"color:#ff6600; font-size:11px;\">[{$view[file][$i][download]}]</span>";
                        echo " <span style=\"color:#d3d3d3; font-size:11px;\">DATE : {$view[file][$i][datetime]}</span>";
                        echo "</a></td></tr>";
                    }
                }
                ?>
                <?
                // 파일 출력
                for ($i=0; $i<=count($view[file]); $i++) {
                    if ($view[file][$i][view])
                        echo $view[file][$i][view] . "<p>";
                }
                ?>
     </td>
     </tr>       
</table>

이 질문에 댓글 쓰기 :

답변 1

for ($i=0; $i<=count($view[file]); $i++) {
if ($view[file][$i][view]){
$file_url = $view[file][$i][path]."/".$view[file][$i][file];

$file_width = $view[file][$i][image_width];
if($file_width >  $board[bo_image_width]) $file_width = $board[bo_image_width];
echo '<table><tr>';
echo '<td><img src="'.$file_url.'" width="'.$file_width.'" osrc="'.$file_url.'" class="image ckshow_Img" /></td>';
if ($view[file][$i][bf_content]) 
echo '</tr><tr><td class="bf_content">'.$view[file][$i][bf_content].'</td>';
echo '</tr></table>';
답변을 작성하시기 전에 로그인 해주세요.
QA 내용 검색
질문등록
  • 질문이 없습니다.
전체 0
© SIRSOFT
현재 페이지 제일 처음으로