<script>
/**
* 多值字段 上传图片
* Edit www.jb200.com
*/
function domvadd_duozhipic()
{
var i;
var str='';
var oldi=0;
var j=0;
var addnum=0;
addnum=parseInt(document.add.mvaddnum_duozhipic.value);
oldi=parseInt(document.add.mveditnum_duozhipic.value);
for(i=1;i<=addnum;i++)
{
j=i+oldi;
str=str+'<tr><td align="center"><input type="text" name="duozhipic_1[]" id="duozhipic_1_'+j+'" value=""><a onclick="window.open('e
cmseditor/FileMain.php?type=1&classid=<?=$classid?>&infoid=<?=$id?>&doing=1&field=duozhipic_1_'+j+'','','width=700,height=550,scrollbars=yes');" title="选择已上传的图片"><img src="../data/images/changeimg.gif" border="0" align="absbottom"></a></td></tr>';
}
document.getElementByIdx_x_x("mvadd_duozhipic").innerHTML="<table width='100%' border=0 cellspacing=1 cellpadding=3>"+str+"</table>";
}
</script>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td>
<table width="100%" border="0" cellpadding="3" cellspacing="1" bgcolor="#DBEAF5">
<tr><td align="center">设置1</td></tr>
</table>
</td>
</tr>
<tr>
<td>
<?php
if($ecmsfirstpost==1)
{
?>
<table width='100%' border=0 cellspacing=1 cellpadding=3>
<?php
$editnum=3;
for($i=1;$i<=$editnum;$i++)
{
?>
<tr><td align="center"><input type="text" name="duozhipic_1[]" id="duozhipic_1_<?=$i?>" value=""><a onclick="window.open('ecmseditor/FileMain.php?type=1&classid=<?=$classid?>&infoid=<?=$id?>&doing=1&field=duozhipic_1_<?=$i?>','','width=700,height=550,scrollbars=yes');" title="选择已上传的图片"><img src="../data/images/changeimg.gif" border="0" align="absbottom"></a></td></tr>
<?php
}
?>
</table>
<?php
}
else
{
$editnum=0;
if($r['duozhipic'])
{
$r['duozhipic']=stripSlashes($r['duozhipic']);
?>
<table width='100%' border=0 cellspacing=1 cellpadding=3>
<?php
//录入项
$j=0;
$mvf_record=explode('||||||',$r['duozhipic']);
$mvf_count=count($mvf_record);
for($i=0;$i<$mvf_count;$i++)
{
$j=$i+1;
$mvf_field=explode("::::::",$mvf_record[$i]);
?>
<tr><td align="center"><input type="text" name="duozhipic_1[]" id="duozhipic_1_<?=$j?>" value="<?=$mvf_field[0]?>"> <input type="hidden" name="duozhipic_mvid[]" id="duozhipic_mvid_<?=$j?>" value="<?=$j?>"><input type="checkbox" name="duozhipic_mvdelid[]" id="duozhipic_mvdelid_<?=$j?>" value="<?=$j?>">删</td></tr>
<?php
}
?>
</table>
<?php
$editnum=$j;
}
}
?>
</td>
</tr>
<tr>
<td height="25">扩展数量: <input name="mveditnum_duozhipic" type="hidden" id="mveditnum_duozhipic" value="<?=$editnum?>">
<input name="mvnum_duozhipic" type="hidden" id="mvnum_duozhipic" value="1">
<input name="mvmust_duozhipic" type="hidden" id="mvmust_duozhipic" value="1">
<input name="mvaddnum_duozhipic" type="text" id="mvaddnum_duozhipic" value="1" size="6"> <input type="button" name="Submit5" value="输出" onClick="javascript:domvadd_duozhipic();"></td>
</tr>
<tr>
<td id="mvadd_duozhipic"></td>
</tr>
</table>