<%@ page contentType="text/html; charset=GBK" session="false"%>

<%@ taglib uri="/cmsTag" prefix="cms"%>
<%@ page contentType="text/html; charset=GBK"%>


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
   <head>
      <%
      	response.setHeader("Pragma", "No-cache");
      	response.setHeader("Cache-Control", "no-cache");
      	response.setDateHeader("Expires", 0);
      %>
      <title>添加模板</title>

      <link rel="stylesheet" type="text/css" href="../../style/default/main.css" />

      <!--加载 js -->

   </head>



   <body>
      <%--<!-- ui-dialog -->
		<div id="dialog" title="选择栏目">
			<iframe src="../../core/console/ListClass.jsp" frameBorder="no" height='300' width=250 style="top:0px">


			</iframe>

		</div>
		--%>
      <form method="post" action='../../templet/addTemplet.cmd' name='templetForm' id='templetForm'>
         <table width="100%" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#b5d6e6">
            <tr>

               <td height="22" class="head_title">
                  <img src="../../core/style/default/images/title_y.gif" />
                  <span class="STYLE1">添加模板</span>
               </td>

            </tr>

            <tr>
               <td>
                  <table width="100%" cellspacing=1 cellpadding=0 align=center border="0" bgcolor="#FFFFFF">
                     <tr>
                        <td>
                           <table width="100%" cellspacing=10 cellpadding=1 align=center border="0">
                              <tr>
                                 <td width="12%" class="title_td">
                                    所属站点:
                                 </td>
                                 <td width="88%">
                                    <select name="siteName" id="siteName">
                                       <option value="-9999">
                                          无（本站默认模板）
                                       </option>
                                       <%--<cms:DisplaySite />   --%>
                                       <option value="default">
                                          主站
                                       </option>

                                    </select>
                                    <%--<p>
													<a href="#" id="dialog_link" class="ui-state-default ui-corner-all"><span class="ui-icon ui-icon-newwin"></span>Open Dialog</a>
												</p>
											--%>
                                 </td>
                              </tr>
                              <tr>
                                 <td class="title_td" width="12%">
                                    模板名称:
                                 </td>
                                 <td width="88%">
                                    <input type="text" size="55" id="templetName" name="templetName" class="f_input"></input>
                                 </td>
                              </tr>
                              <tr>
                                 <td class="title_td" width="12%">
                                    子路径:
                                 </td>
                                 <td width="88%">
                                    <input type="text" size="55" id="templetPath" name="templetPath" class="f_input"></input>
                                 </td>
                              </tr>
                              <tr>
                                 <td class="title_td" width="12%">
                                    模板描叙:
                                 </td>
                                 <td width="88%">
                                    <textarea id="templetDesc" name="templetDesc" cols="53" rows="4" class="f_text"></textarea>
                                 </td>
                              </tr>
                              <tr>
                                 <td class="title_td" width="12%">
                                    模版类型:
                                 </td>
                                 <td width="88%">
                                    <span class="STYLE12">栏目展示页</span>
                                    <input id="templetType" name="templetType" type="radio" value="10" checked />
                                    &nbsp;
                                    <span class="STYLE12">内容显示页</span>
                                    <input id="templetType" name="templetType" type="radio" value="20" />

                                 </td>
                              </tr>
                              <tr>
                                 <td class="title_td" width="12%">
                                    模板文件：
                                 </td>
                                 <td width="88%">
                                    <iframe id="uploadFrame" name="uploadFrame" frameborder=0 src="uploadTempletFile.jsp" width="100%" height="75" scrolling=no></iframe>
                                 </td>
                              </tr>

                           </table>

                        </td>
                     </tr>
                  </table>
               </td>
            </tr>
            <tr>
               <td class="feet" colspan="2" />
            </tr>
         </table>


         <br>
         <br>
         <center>
            <button type="button" id="save" onClick="submitTemplet();">
               <img src="../../core/style/default/images/add-act.png" alt="" />
               确认
            </button>
            &nbsp;&nbsp;&nbsp;
            <button  type="reset">
               <img src="../../core/style/default/images/reset-act.png" alt="" />
               重置
            </button>
         </center>

         <input type="hidden" id="templetFileName" name="templetFileName" />


      </form>
   </body>

</html>

<script type="text/javascript">
<!--
function submitTemplet()
{  
   

if(document.all.uploadFrame.contentWindow.document.getElementById("templetFileName").value=='')
{
alert("没有上传任何模板");
return;
}
   document.all.templetFileName.value=document.all.uploadFrame.contentWindow.document.getElementById("templetFileName").value;


  
   templetForm.submit();



}
//-->
</script>
