[제나플러스] 첨부파일을 일정갯수만큼 미리 입력창 보여주기 > 팁앤테크

본문 바로가기
사이트 내 전체검색

팁앤테크

[제나플러스] 첨부파일을 일정갯수만큼 미리 입력창 보여주기

페이지 정보

본문

# 첨부파일을 일정갯수만큼 미리 입력창 보여주기 ... 내용이 없는거 같아서 도움이 될까 올립니다.
위의 스킨에서 인용하였습니다.  ^^


스킨 / wirte.skin.php 의 아래 내용을

<tr>
    <td style='padding-left:20px; height:30px;'><table cellpadding=0 cellspacing=0><tr><td style=" padding-top: 10px;">· 파일 <span onclick="add_file();" style='cursor:pointer; font-family:tahoma; font-size:12pt;'>+</span> <span onclick="del_file();" style='cursor:pointer; font-family:tahoma; font-size:12pt;'>-</span></td></tr></table></td>
    <td style='padding:5 0 5 0;'><table id="variableFiles" cellpadding=0 cellspacing=0></table><?// print_r2($file); ?>
        <script language="Javascript">
        var flen = 0;
        function add_file(delete_code)
        {
            var upload_count = <?=(int)$board[bo_upload_count]?>;
            if (upload_count && flen >= upload_count)
            {
                alert("이 게시판은 "+upload_count+"개 까지만 파일 업로드가 가능합니다.");
                return;
            }

            var objTbl;
            var objRow;
            var objCell;
            if (document.getElementById)
                objTbl = document.getElementById("variableFiles");
            else
                objTbl = document.all["variableFiles"];

            objRow = objTbl.insertRow(objTbl.rows.length);
            objCell = objRow.insertCell(0);

            objCell.innerHTML = "<input type='file' class=ed name='bf_file[]' title='파일 용량 <?=$upload_max_filesize?> 이하만 업로드 가능'>";
            if (delete_code)
                objCell.innerHTML += delete_code;
            else
            {
                <? if ($is_file_content) { ?>
                objCell.innerHTML += "<br><input type='text' class=ed size=50 name='bf_content[]' title='업로드 이미지 파일에 해당 되는 내용을 입력하세요.'>";
                <? } ?>
                ;
            }

            flen++;
        }

        <?=$file_script; //수정시에 필요한 스크립트?>

        function del_file()
        {
            // file_length 이하로는 필드가 삭제되지 않아야 합니다.
            var file_length = <?=(int)$file_length?>;
            var objTbl = document.getElementById("variableFiles");
            if (objTbl.rows.length - 1 > file_length)
            {
                objTbl.deleteRow(objTbl.rows.length - 1);
                flen--;
            }
        }
        </script></td>
</tr>


아래의 내용으로 교체합니다.


                <tr>
                  <td style='padding-left:20px; height:30px;'>·  파일1</td>
                  <td style='padding:5 0 5 0;'><input class="box" type="file" name='bf_file[]' /> (필수입력)
                        <?if($file[0][href]){
                        echo "<input type='checkbox' name='bf_file_del[0]' value='1'><a href='{$file[0][href]}'>{$file[0][source]}({$file[0][size]})</a> 파일 삭제";
                        }
                        ?></td>
                </tr>
                <tr>
                  <td style='padding-left:20px; height:30px;'>·  파일2</td>
                  <td style='padding:5 0 5 0;'><input class="box" type="file" name='bf_file[]' />
                        <?if($file[1][href]){
                        echo "<input type='checkbox' name='bf_file_del[1]' value='1'><a href='{$file[1][href]}'>{$file[1][source]}({$file[1][size]})</a> 파일 삭제";
                        }
                        ?></td>
                </tr>
                <tr>
                  <td style='padding-left:20px; height:30px;'>·  파일3</td>
                  <td style='padding:5 0 5 0;'><input class="box" type="file" name='bf_file[]' />
                        <?if($file[2][href]){
                        echo "<input type='checkbox' name='bf_file_del[2]' value='1'><a href='{$file[2][href]}'>{$file[2][source]}({$file[2][size]})</a> 파일 삭제";
                        }
                        ?></td>
                </tr>
                <tr>
                  <td style='padding-left:20px; height:30px;'>·  파일4</td>
                  <td style='padding:5 0 5 0;'><input class="box" type="file" name='bf_file[]' />
                        <?if($file[3][href]){
                        echo "<input type='checkbox' name='bf_file_del[3]' value='1'><a href='{$file[3][href]}'>{$file[3][source]}({$file[3][size]})</a> 파일 삭제";
                        }
                        ?></td>
                </tr>
                <tr>
                  <td style='padding-left:20px; height:30px;'>·  파일5</td>
                  <td style='padding:5 0 5 0;'><input class="box" type="file" name='bf_file[]' />
                        <?if($file[4][href]){
                        echo "<input type='checkbox' name='bf_file_del[4]' value='1'><a href='{$file[4][href]}'>{$file[3][source]}({$file[4][size]})</a> 파일 삭제";
                        }
                        ?></td>
                </tr>
                <tr>
                  <td style='padding-left:20px; height:30px;'>·  파일6</td>
                  <td style='padding:5 0 5 0;'><input class="box" type="file" name='bf_file[]' />
                        <?if($file[5][href]){
                        echo "<input type='checkbox' name='bf_file_del[5]' value='1'><a href='{$file[5][href]}'>{$file[3][source]}({$file[5][size]})</a> 파일 삭제";
                        }
                        ?></td>
                </tr>
추천0

댓글목록

등록된 댓글이 없습니다.

Total 270건 4 페이지
  • RSS
팁앤테크 목록
번호 제목 글쓴이 조회 추천 날짜
195 제로쪽지보내기 메일보내기 홈페이지 자기소개 아이디로 검색 전체게시물 13635 0 11-26
194 제로쪽지보내기 메일보내기 홈페이지 자기소개 아이디로 검색 전체게시물 39014 0 09-19
193 제로쪽지보내기 메일보내기 홈페이지 자기소개 아이디로 검색 전체게시물 16120 0 10-16
192 제로쪽지보내기 메일보내기 홈페이지 자기소개 아이디로 검색 전체게시물 13720 0 01-12
191 제로쪽지보내기 메일보내기 홈페이지 자기소개 아이디로 검색 전체게시물 15020 0 03-21
190 제로쪽지보내기 메일보내기 홈페이지 자기소개 아이디로 검색 전체게시물 13457 0 05-02
189 제로쪽지보내기 메일보내기 홈페이지 자기소개 아이디로 검색 전체게시물 14545 0 05-31
188 제로쪽지보내기 메일보내기 홈페이지 자기소개 아이디로 검색 전체게시물 12510 0 10-27
187 제로쪽지보내기 메일보내기 홈페이지 자기소개 아이디로 검색 전체게시물 12412 0 12-18
186 제로쪽지보내기 메일보내기 홈페이지 자기소개 아이디로 검색 전체게시물 13520 0 04-14
185 제로쪽지보내기 메일보내기 홈페이지 자기소개 아이디로 검색 전체게시물 12722 0 05-06
184 제로쪽지보내기 메일보내기 홈페이지 자기소개 아이디로 검색 전체게시물 12954 0 07-31
183 제로쪽지보내기 메일보내기 홈페이지 자기소개 아이디로 검색 전체게시물 11354 0 09-17
182 제로쪽지보내기 메일보내기 홈페이지 자기소개 아이디로 검색 전체게시물 12725 0 12-09
181 제로쪽지보내기 메일보내기 홈페이지 자기소개 아이디로 검색 전체게시물 14504 0 11-28
180 제로쪽지보내기 메일보내기 홈페이지 자기소개 아이디로 검색 전체게시물 11767 0 05-18
179 제로쪽지보내기 메일보내기 홈페이지 자기소개 아이디로 검색 전체게시물 12772 0 11-26
178 제로쪽지보내기 메일보내기 홈페이지 자기소개 아이디로 검색 전체게시물 13014 0 05-04
177 제로쪽지보내기 메일보내기 홈페이지 자기소개 아이디로 검색 전체게시물 38097 0 10-04
176 제로쪽지보내기 메일보내기 홈페이지 자기소개 아이디로 검색 전체게시물 15302 0 11-08
175 제로쪽지보내기 메일보내기 홈페이지 자기소개 아이디로 검색 전체게시물 14702 0 01-14
174 제로쪽지보내기 메일보내기 홈페이지 자기소개 아이디로 검색 전체게시물 14099 0 03-30
173 제로쪽지보내기 메일보내기 홈페이지 자기소개 아이디로 검색 전체게시물 15183 0 05-02
172 제로쪽지보내기 메일보내기 홈페이지 자기소개 아이디로 검색 전체게시물 13003 0 06-03
171 제로쪽지보내기 메일보내기 홈페이지 자기소개 아이디로 검색 전체게시물 16308 0 10-29

검색

회원로그인

회원가입

사이트 정보

株式会社YHPLUS / 대표 : ZERO
〒140-0011 東京都品川区東大井2-5-9-203
050-5539-7787
오픈카카오톡 (YHPLUS) :
https://open.kakao.com/o/slfDj15d

접속자집계

오늘
729
어제
7,888
최대
8,233
전체
1,555,645
Copyright (c) 株式会社YHPLUS. All rights reserved.