<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>新增频道</title>
<script language="javascript" src="js/main.js"></script>
<script language="javascript" src="js/diy.js"></script>
<script language="javascript">
<!--

function CheckSubmit()
{
	if(document.form1.name.value=='')
	{
		alert("自定义表单名称不能为空！");
		return false;
	}
	return true;
}
-->
</script>
<link href="img/base.css" rel="stylesheet" type="text/css" />
<style type="text/css">
<!--
.STYLE1 {color: #FF0000}
td{ padding:2px; padding-left:6px; line-height:150%; }
.STYLE2 {color: #666666; display:none; }
-->
</style>
</head>
<body background='img/allbg.gif' leftmargin='8' topmargin='8'>
<table width="98%" border="0" cellpadding="1" cellspacing="1" align="center" class="tbtitle" style="background:#E2F5BC;">
  <form name="form1" action="diy_add.php?action=add" method="post" onSubmit="return CheckSubmit();">
    <tr bgcolor="#E2F5BC"> 
      <td height="28" colspan="2" bgcolor="#EDF9D5" background='img/tbg.gif'>
      	<b>&nbsp;<a href="diy_main.php"><u>自定义表单管理</u></a> &gt; 新增自定义表单：</b>
      </td>
    </tr>
    <tr> 
      <td width="35%" height="28" align="left" bgcolor="#FFFFFF">
      	diyid：<br />
        <span class="STYLE2" id='help1'>　　数字，创建后不可更改，并具有唯一性。推荐使用默认值</span>
      </td>
      <td width="65%" bgcolor="#FFFFFF">
      	<input name="diyid" type="text" id="diyid" size="10" value="<?php echo $newdiyid?>" class='pubinputs' style='width:60px' />
      * <img src="img/help.gif" alt="帮助" width="16" height="16" border="0" style="cursor:hand" onclick="ShowHide2('help1')" />
      </td>
    </tr>
    <tr> 
      <td height="28" align="left" bgcolor="#FFFFFF">
      	自定义表单名称：<br />
        <span class="STYLE2" id="help3">　　自定义表单的中文名称，在后台管理，前台发布等均使用此名字。</span>
       </td>
      <td bgcolor="#FFFFFF">
	    <input name="name" type="text" id="name" style="width:180px" value="自定义表单<?php echo $newdiyid;?>" class='pubinputs' />
      *<img src="img/help.gif" alt="帮助" width="16" height="16" border="0" style="cursor:hand" onclick="ShowHide2('help3')" />
     </td>
    </tr>
    <tr> 
      <td height="28" align="left" bgcolor="#FFFFFF">数据表：<br />
        <span class="STYLE2" id="help5">　　必须由英文、数字、下划线组成，用于保存自定义表单数据，不能和已有表名重复，创建后不可修改表名。</span></td>
      <td bgcolor="#FFFFFF">
	    <input name="table" type="text" id="table"  style="width:180px" value="<?php echo $cfg_dbprefix; ?>diyform<?php echo $newdiyid; ?>" class='pubinputs'/>
        *<img src="img/help.gif" alt="帮助" width="16" height="16" border="0" style="cursor:hand" onclick="ShowHide2('help5')" />
      </td>
    </tr>
    <tr>
      <td height="28" align="left" bgcolor="#FFFFFF">字段配置：</td>
      <td bgcolor="#FFFFFF"><span class="STYLE1">建立自定义表单后在“更改”自定义表单的地方添加字段即可。</span></td>
    </tr>
    <tr>
      <td height="28" align="left" bgcolor="#FFFFFF">列表模板：</td>
      <td bgcolor="#FFFFFF"><input name="listtemplate" type="text" id="listtemplate" style="width:180px" value="list_diyform<?php echo $newdiyid;?>.htm" class='pubinputs' /></td>
    </tr>
    <tr>
      <td height="28" align="left" bgcolor="#FFFFFF">内容模板：</td>
      <td bgcolor="#FFFFFF"><input name="viewtemplate" type="text" id="viewtemplate" style="width:180px" value="view_diyform<?php echo $newdiyid;?>.htm" class='pubinputs' /></td>
    </tr>
    <tr>
      <td height="28" align="left" bgcolor="#FFFFFF">发布模板：</td>
      <td bgcolor="#FFFFFF"><input name="posttemplate" type="text" id="posttemplate" style="width:180px" value="post_diyform<?php echo $newdiyid;?>.htm" class='pubinputs' /></td>
    </tr>
    <tr>
      <td height="28" align="left" bgcolor="#FFFFFF">前台列表和内容页公开？：</td>
      <td bgcolor="#FFFFFF">
      <label><input name="public" type="radio" value="2" class='np' />完全公开</label>
      <label><input name="public" type="radio" value="1" class='np' checked='1' />公开审核过的</label>
      <label><input name="public" type="radio" value="0" class='np' />不公开</label>
      </td>
    </tr>
    <tr bgcolor="#F9FDF0"> 
      <td height="28" colspan="2">
      	<table width="100%" border="0" cellspacing="0" cellpadding="0">
          <tr> 
            <td width="26%" height="45">&nbsp;</td>
            <td width="15%">
            	<input type="submit" name="button" id="button" value="确定"  class="np coolbg"/>
            </td>
            <td width="59%">
            	<input name="按钮" type="button" class="np coolbg"  id="button2" onclick="location='mychannel_main.php';" value="返回"/>
            </td>
          </tr>
        </table>
       </td>
    </tr>
  </form>
</table>
</body>
</html>