파일 첨부 필드를 추가 하고 싶은데요... 정보
파일 첨부 필드를 추가 하고 싶은데요...본문
디자이너는 디자인만 해야 하는건데..ㅜㅜ 프로그램까지 넘보려니 너무너무 힘이 드네요~
이재필님의 부동산스킨을 사용했구요..
사진 첨부 이외에 동영상파일 첨부를 추가 하고 싶거든요..
<table width="100%" cellpadding="5" cellspacing="1" bgcolor="#cccccc" >
<? if ($is_file) { ?>
<tr>
<td width="12%" align="center" bgcolor="F0F1F2" class="blue">사진정보</td>
<td colspan="3" valign="top" bgcolor="ffffff"><table width="100%" >
<tr>
<td><table id="variableFiles">
</table>
<script language="JavaScript">
function add_file(delete_code)
{
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=input size=20 name='bf_file[]'>";
if (delete_code)
objCell.innerHTML += delete_code;
else
{
<? if ($is_file_content) { ?>
objCell.innerHTML += "<br><input type='text' class=input size=50 name='bf_content[]'> 파일설명";
<? } ?>
;
}
}
<?
if ($file_length<5)
for ($i=$file_length+1; $i<5; $i++)
$file_script .= "add_file('');\n";
?>
<?=$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);
}
</script></td>
<? if ($w == '') {?>
<td align="center"><table cellpadding="0" cellspacing="2" bgcolor="eeeeee" >
<tr>
<td><span class="blue">
<!--img src="<?=$board_skin_path?>/img/car_s.gif" align="absmiddle"-->
</span></td>
</tr>
</table></td>
<? }?>
</tr>
</table></td>
</tr>
<tr>
<td align="center" bgcolor="F0F1F2" class="blue">동영상</td>
<td colspan="3" valign="top" bgcolor="ffffff">이부분에 어떤 소스를 넣어야할지..ㅠㅠ</td>
</tr>
<? } ?>
</table>
여분필드 이용하는 방법도 다 해봤는데 안되네요..사진 첨부에 5개 필드랑 같이 먹혀버려요..
고수님들 도와 주세요..어흑
이재필님의 부동산스킨을 사용했구요..
사진 첨부 이외에 동영상파일 첨부를 추가 하고 싶거든요..
<table width="100%" cellpadding="5" cellspacing="1" bgcolor="#cccccc" >
<? if ($is_file) { ?>
<tr>
<td width="12%" align="center" bgcolor="F0F1F2" class="blue">사진정보</td>
<td colspan="3" valign="top" bgcolor="ffffff"><table width="100%" >
<tr>
<td><table id="variableFiles">
</table>
<script language="JavaScript">
function add_file(delete_code)
{
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=input size=20 name='bf_file[]'>";
if (delete_code)
objCell.innerHTML += delete_code;
else
{
<? if ($is_file_content) { ?>
objCell.innerHTML += "<br><input type='text' class=input size=50 name='bf_content[]'> 파일설명";
<? } ?>
;
}
}
<?
if ($file_length<5)
for ($i=$file_length+1; $i<5; $i++)
$file_script .= "add_file('');\n";
?>
<?=$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);
}
</script></td>
<? if ($w == '') {?>
<td align="center"><table cellpadding="0" cellspacing="2" bgcolor="eeeeee" >
<tr>
<td><span class="blue">
<!--img src="<?=$board_skin_path?>/img/car_s.gif" align="absmiddle"-->
</span></td>
</tr>
</table></td>
<? }?>
</tr>
</table></td>
</tr>
<tr>
<td align="center" bgcolor="F0F1F2" class="blue">동영상</td>
<td colspan="3" valign="top" bgcolor="ffffff">이부분에 어떤 소스를 넣어야할지..ㅠㅠ</td>
</tr>
<? } ?>
</table>
여분필드 이용하는 방법도 다 해봤는데 안되네요..사진 첨부에 5개 필드랑 같이 먹혀버려요..
고수님들 도와 주세요..어흑
댓글 전체