첨부파일 이미지 크기 고정

첨부파일 이미지 크기 고정

QA

첨부파일 이미지 크기 고정

본문

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

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

회원로그인

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