<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>发布图集</title>
<link href="newskin.css" rel="stylesheet" type="text/css">
<script language='javascript' src='main.js'></script>	
<script language="javascript">
<!--
function checkSubmit()
{
if(document.form1.title.value==""){
	 alert("图集标题不能为空！");
	 document.form1.title.focus();
	 return false;
}

if(document.form1.typeid.value==0){
	 alert("图集隶属栏目必须选择！");
	 return false;
}

if(document.form1.typeid.options[document.form1.typeid.selectedIndex].className!='option3')
{
	alert("图集隶属栏目必须选择白色背景的项目！");
	return false;
}

if(document.form1.vdcode.value==""){
 document.form1.vdcode.focus();
 alert("验证码不能为空！");
 return false;
}
}

var startNum = 1;
function MakeUpload(mnum)
{
   var endNum = 0;
   var upfield = document.getElementById("uploadfield");
   var pnumObj = document.getElementById("picnum");
   var fhtml = "";
 
   if(mnum==0) endNum = startNum + Number(pnumObj.value);
   else endNum = mnum;
   if(endNum>120) endNum = 120;
   
   for(startNum;startNum < endNum;startNum++){
	   fhtml = "";
	   fhtml += "<table width='580' align=\"center\"><tr><td><input type='checkbox' name='isokcheck"+startNum+"' id='isokcheck"+startNum+"' value='1' class='np' onClick='CheckSelTable("+startNum+")'>显示/隐藏图片["+startNum+"]的选框</td></tr></table>";
	   fhtml += "<table width=\"580\" border=\"0\" id=\"seltb"+startNum+"\" cellpadding=\"1\" cellspacing=\"1\" bgcolor=\"#E8F5D6\" style=\"margin-bottom:6px;\" align=\"center\"><tobdy>";
	   fhtml += "<tr bgcolor=\"#F4F9DD\">\r\n";
	   fhtml += "<td height=\"25\" colspan=\"2\">　<strong>图片"+startNum+"：</strong></td>";
	   fhtml += "</tr>";
	   fhtml += "<tr bgcolor=\"#FFFFFF\"> ";
	   fhtml += "<td width=\"410\" height=\"25\"> 　本地上传： ";
	   fhtml += "<?php if($cfg_mb_upload=='是'){?><input type=\"file\" name='imgfile"+startNum+"' style=\"width:330px\"  onChange=\"SeePic(document.picview"+startNum+",document.form1.imgfile"+startNum+");\"><?php }else{ echo "系统禁止了文件上传功能！";}?></td>";
	   fhtml += "<td width=\"164\" rowspan=\"3\" align=\"center\"><img src=\"img/pview.gif\" width=\"150\" id=\"picview"+startNum+"\" name=\"picview"+startNum+"\"></td>";
	   fhtml += "</tr>";
	   fhtml += "<tr bgcolor=\"#FFFFFF\"> ";
	   fhtml += "<td height=\"25\"> 　指定网址： ";
	   fhtml += "<input type=\"text\" name='imgurl"+startNum+"' value='http://' style=\"width:260px\"> ";
	   fhtml += "</td></tr>";
	   fhtml += "<tr bgcolor=\"#FFFFFF\"> ";
	   fhtml += "<td height=\"56\">　图片简介： ";
	   fhtml += "<textarea name='imgmsg"+startNum+"' style=\"height:46px;width:330px\"></textarea> </td>";
	   fhtml += "</tr></tobdy></table>\r\n";
	   upfield.innerHTML += fhtml;
  }
}

function CheckSelTable(nnum){
	var cbox = $Obj('isokcheck'+nnum);
	var seltb = $Obj('seltb'+nnum);
	if(cbox.checked) seltb.style.display = 'none';
	else seltb.style.display = 'block';
}
-->
</script>
</head>
<body leftmargin="0" topmargin="0">
<div align="center">
<?php  include(dirname(__FILE__)."/head.htm"); ?>
<table width="900" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr> 
    <td width="160" height="216" valign="top"> 
      <?php include(dirname(__FILE__)."/menu.php");?>
    </td>
    <td width="10">&nbsp;</td>
    <td valign="top">
	<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
        <tr> 
          <td background="img/nnnbg.gif" height="25" class="gdt2">
		  <font color="#333333"> 
            <strong>　&nbsp;发布新图集：</strong>		  </font>		</td>
        </tr>
        <tr>
		  <form action="album_add_action.php" method="post" enctype="multipart/form-data" name="form1" onSubmit="return checkSubmit();">
            <input type="hidden" name="dopost" value="addArc"> 
            <input type="hidden" name="channelid" value="2">
          <td height="183" valign="top" style="padding-top:3px">
		  <table width="100%" border="0" cellpadding="2" cellspacing="1" bgcolor="#D9EDC0" style="margin-bottom:6px">
                <tr bgcolor="#F0FBE3"> 
                  <td height="24" colspan="4" bgcolor="#F0FBE3">　<strong>◆常规参数：</strong></td>
                </tr>
                <tr> 
                  <td width="19%" height="28" align="center" bgcolor="#FFFFFF">图集名称：</td>
                  <td width="81%" colspan="3" bgcolor="#FFFFFF"> <input name="title" type="text" id="title" size="30" class="nb">
                    <font color="#FF0000">*</font></td>
                </tr>
                <tr bgcolor="#F7FDF0">
                  <td height="28" align="center" bgcolor="#F7FDF0">图片来源：</td>
                  <td colspan="3" bgcolor="#F7FDF0"><input name="source" type="text" id="source" size="30" class="nb">
　作者：
  <input name="writer" type="text" id="writer" size="15" class="nb" value="<?php echo $cfg_ml->M_UserName?>"></td>
                </tr>
                <tr bgcolor="#F7FDF0">
                  <td height="28" align="center" bgcolor="#FFFFFF">隶属栏目：</td>
                  <td colspan="3" bgcolor="#FFFFFF"><?php 
           	 $selname = '请选择...';
           	 $delv = '0';
           	 if(!empty($cid)){
           	 	 $crow = $dsql->GetOne("Select ID,typename From #@__arctype where ID='$cid' ");
           	 	 $selname = $crow['typename'];
           	 	 $selv = $crow['ID'];
           	 }
           	 echo GetTypeidSelMember('form1','typeid','selbt1',2,$selv,$selname,false);
			       ?></td>
                </tr>
                <tr bgcolor="#F7FDF0">
                  <td height="28" align="center" bgcolor="#F7FDF0">验证码：</td>
                  <td colspan="3"><table width="200" border="0" cellspacing="0" cellpadding="0">
                    <tr>
                      <td width="84"><input name="vdcode" type="text" id="vdcode2" size="10"></td>
                      <td width="116"><img src='../include/vdimgck.php' width='50' height='20'></td>
                    </tr>
                  </table></td>
                </tr>
                
                <tr bgcolor="#FFFFFF"> 
                  <td height="28" align="center" bgcolor="#FFFFFF">我的分类：</td>
                  <td height="28" colspan="3"> <select name="mtype" id="mtype" style="width:200">
                      <option value='0'>--请选择分类--</option>
                      <?php 
$dsql->SetQuery("Select * From #@__member_arctype where  memberid='".$cfg_ml->M_ID."' And channelid='1';");
$dsql->Execute();
while($row = $dsql->GetObject()){
  echo "<option value='".$row->aid."'>".$row->typename."</option>\r\n";
}
?>
                    </select></td>
                </tr>
                <tr bgcolor="#FFFFFF">
                  <td height="60" align="center" bgcolor="#F7FDF0">图集简介：</td>
                  <td  bgcolor="#F7FDF0">
				  <textarea name="description" id="description" style="width:80%;height:50"></textarea>				  </td>
                  </tr>
                <tr bgcolor="#FFFFFF"> 
                  <td height="28" align="center" bgcolor="#FFFFFF">关键字：</td>
                  <td bgcolor="#FFFFFF">
				  <input name="keywords" type="text" id="keywords" style="width:50%;" value="">
				  (多个关键字用空格分开)				  </td>
                  </tr>
                <tr> 
                  <td height="28" align="center" bgcolor="#F7FDF0">缩略图：</td>
                  <td colspan="3" bgcolor="#F7FDF0">
<input name="litpic" type="file" id="litpic" style="width:300" onChange="SeePic($Obj('picview'),$Obj('litpic'),$Obj('picarea'));"></td>
                </tr>
                <tr id="picarea" style="display:none"> 
                  <td colspan="4" align="center" bgcolor="#FFFFFF">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
                      <tr>
                        <td width="18%" height="110">&nbsp;</td>
                        <td width="82%"><img src="img/pview.gif" id="picview" width="150" height="120"></td>
                      </tr>
                    </table>
                  </td>
                </tr>
              </table>
				
				
              <table width="100%" border="0" cellpadding="2" cellspacing="1" bgcolor="#D9EDC0">
                <tr bgcolor="#F0FBE3">
                  <td height="24" colspan="4">　<strong>◆图集内容：</strong></td>
                </tr>
                <tr bgcolor="#F0FBE3"> 
                  <td width="100%" height="24" colspan="4" bgcolor="#FFFFFF"><table width="100%" border="0" cellspacing="0" cellpadding="0">
                      <tr>
                        <td height="24">宽度限制：</td>
                        <td><input name="maxwidth" type="text" id="maxwidth" value="<?php echo $cfg_album_width?>" size="8">
                          像素（图片太大会撑坏版面美观，可以在此设定限制）</td>
                      </tr>
                      <tr> 
                        <td width="19%" height="24">&nbsp;图片：</td>
                        <td width="81%"> <input name="picnum" type="text" id="picnum" size="8" value="5"> 
                          <input name='kkkup' type='button' id='kkkup2' value='增加上传框' onClick="MakeUpload(0);">
                          （注：最大60幅） </td>
                      </tr>
                    </table></td>
                </tr>
                <tr> 
                  <td height="250" colspan="4" align="center" valign="top" bgcolor="#FFFFFF"> 
                    <span id='uploadfield'></span> 
                    <script language="JavaScript">
	         MakeUpload(4);
	      </script> </td>
                </tr>
                <tr bgcolor="#F7FDF0"> 
                  <td height="45" colspan="4" align="center"> <input name="imageField" type="image" src="img/button_save.gif" width="60" height="22" border="0"> 
                    &nbsp;&nbsp;&nbsp; <img src="img/button_reset.gif" width="60" height="22" style="cursor:hand" onClick="location.reload();"> 
                  </td>
                </tr>
              </table></td>
			</form>
        </tr>
        <tr> 
          <td height="10"></td>
        </tr>
      </table> </td>
  </tr>
</table>
<?php  include(dirname(__FILE__)."/foot.htm"); ?>
</div>
</body>
</html>
