<!--
<?php
print <<<EOT
-->
<SCRIPT LANGUAGE="JavaScript">
 <!--
function upfile(url,name,size,label){
	document.getElementById(label).value=url;
	//ay=name.Split(".");
	//alert(narray);
	arr=name.split('.');
	document.getElementById("name_"+label).value=arr[0];
}
function sub(form){
	if(get_obj('batch_one').checked==true&&get_obj('title').value==''){
		alert("图片主题不能为空");
		form.title.focus();
		return false;
	}
	if(form.fid.value==''||form.fid.value=='0'){
		alert("请选择一个栏目");
		form.fid.focus();
		return false;
	}
}
 //-->
 </SCRIPT>
 <SCRIPT LANGUAGE="JavaScript">
//屏蔽可忽略的js脚本错误
function killErr(){
	return true;
}
window.onerror=killErr;
</SCRIPT>
<form id="form8" name="form8" method="post" action="index.php?lfj=$lfj&action=$job" onsubmit="return sub(this);">
<div class="MainCont">
	<div class="head"><div class="tag">快速发图</div><div class="more">&nbsp;</div></div>
    <table width='100%' cellspacing='0' cellpadding='0' class="FormTable">
    <tr> 
      <td class="tdL">系统分类:</td>
      <td class="tdR">$sort_fid</td>
    </tr>
    <tr id="title_tr" style="display:none;"> 
      <td class="tdL">图片主题名称:</td>
      <td class="tdR"> 
        <input type="text" name="title" id="title" size="30">
      </td>
    </tr>
    <tr> 
      <td class="tdL"> 
        <div style="display:;"><font color="#FF0000">注意:</font>请确认你的flash不低于版本10,否则,请点击下面的按钮用另一种方式上传
          <div style="display:none;"> 增加 
            <input type="text" size="3" name=nums value="1">
            项 </div>
          <input type="button" name="Submit2" value="增加" onClick="showinput()">
        </div>
      </td>
      <td class="tdR"> 
        <script type="text/javascript" src="$webdb[www_url]/images/default/jquery-1.2.6.min.js"></script>
        <script type="text/javascript" src="$webdb[www_url]/images/default/swfobject.js"></script>
        <div id="sapload"></div>
        <script type="text/javascript">
	var so = new SWFObject("$webdb[www_url]/images/default/uploadmore.swf", "sap_load", "450", "30", "9", "#ffffff");
	so.addParam('wmode','transparent');
	so.addVariable('config','$webdb[www_url]/do/swfuploadxml.php?filetype=jpg,png,gif');
	so.write("sapload");
	var titledb = new Array();
	var urldb = new Array();
	function showFiles(t){
		showinput();
		arr=t.split('|');
		urldb[totalnum]=arr[0];
		arr2=arr[1].split('.');
		titledb[totalnum]=arr2[0];
		for(var i=0;i<=totalnum;i++){
			if(document.getElementById("url"+i)!=null){
				document.getElementById("url"+i).value=urldb[i];
				document.getElementById("name_url"+i).value=titledb[i];
			}
		}
	}
</script>
        <div id="inputfile"></div>
      </td>
    </tr>
    <tr> 
      <td class="tdL">是否定义为组图</td>
      <td class="tdR"> 
        <input type="radio" name="batch" value="1" id="batch_one" onclick="posttype('one')">
        组图(同一篇文章,一张图占一页) 
        <input type="radio" name="batch" value="0" checked onclick="posttype('more')">
        非组图(指一张图一篇文章)</td>
    </tr>
    <tr> 
      <td class="tdL">&nbsp;</td>
      <td class="tdR"> 
        <input type="submit" name="Submit" value="提交">
        <script>
totalnum=0;
function showinput(){
	var str=document.getElementById("inputfile").innerHTML;
	var num=2;
	num=document.form8.nums.value;
	for(var i=1;i<=num;i++){
		totalnum=totalnum+i;
		str+=' <span class=t>标题</span>: <input type="text" name="namedb[]" size="30" id="name_url'+totalnum+'">  地址: <input type=text name=photodb[] size=40 id=url'+totalnum+'> [<a href=\'javascript:\' onClick=\'window.open("upfile.php?label=url'+totalnum+'","","width=350,height=50,top=200,left=400")\'><font color="#FF0000">点击上传图片</font></a>]<br>';
	}
	document.getElementById("inputfile").innerHTML=str;
	set_name();
}

function posttype(t){
	if(t=='more'){
		get_obj("title_tr").style.display='none';
	}else{
		get_obj("title_tr").style.display='';
	}
	set_name();
}
function set_name(){
	obj=document.body.getElementsByTagName("span");
	for(var i=0;i< obj.length;i++ ){
		if(obj[i].className=='t')
		{
			if(get_obj('batch_one').checked==true){
				obj[i].innerHTML="介绍";
			}else{
				obj[i].innerHTML="标题";
			}
			
		}
	}
}
</script>
        <input type="hidden" name="postdb[bak_id]" value="$bak_id">
      </td>
    </tr>
  </table>
</div>
</form>
<!--
EOT;
?>
-->
