<%@ page language="C#" masterpagefile="AdminIndexMaster.master" autoeventwireup="true" inherits="HL_Admin_Admin_AddLabel, WebApp_deploy" title="Untitled Page" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">

<table class="adminheading">                       
   <tr>
      <th class="edit">标签管理</th> 
      <td align="right"><div style="width:50px"><a href="Admin_Lable.aspx">返回</a></div></td>
      <td class="rtdw"></td>
   </tr>                        
</table>

<table class="nick">
       <tr>
           <td class="tit" colspan="2">编辑标签</td>
       </tr>
       <tr>
           <td class="ltd">标签名称：</td>
           <td class="rtd"><asp:TextBox ID="LabelName"　 runat="server" Width="200px" />
           <asp:Label id="LabelNameErr" runat="server"></asp:Label>
               <asp:RequiredFieldValidator ID="RequiredFieldValidator1" ControlToValidate="LabelName" runat="server" ErrorMessage="<font color='red'>请输入标签名称！</font>"></asp:RequiredFieldValidator>
           </td>
       </tr>
        <tr>
           <td class="ltd">标签分类：</td>
           <td class="rtd">
                <asp:TextBox ID="LabelClass"　 runat="server" Width="200px" />
                <asp:DropDownList ID="LabelClassSelect" runat="server"  AppendDataBoundItems="true">
                   <asp:ListItem Text="全部分类" Value="全部分类" />
                </asp:DropDownList><asp:Label id="LabelClassErr" runat="server"></asp:Label>
                <asp:RequiredFieldValidator ID="RequiredFieldValidator2" ControlToValidate="LabelClass" runat="server" ErrorMessage="<font color='red'>请输入标签分类，方便查找！</font>"></asp:RequiredFieldValidator>
            </td>
       </tr>
        <tr>
           <td class="ltd">数据设置：</td>
           <td class="rtd">
                <asp:DropDownList ID="LabelDataSourceSet" runat="server">
                   <asp:ListItem Value="static" Text="无" />
                   <asp:ListItem Value="sql_sysquery" Text="系统数据库查询" />
                   <asp:ListItem Value="sql_sysstorequery" Text="系统数据库存储过程" />
                   <asp:ListItem Value="sql_outquery" Text="外部数据库查询" />
                   <asp:ListItem Value="mdb" Text="Access数据源" />
                   <asp:ListItem Value="xml" Text="XML数据源" />
                   <asp:ListItem Value="mysql" Text="mySQL数据源" />
                </asp:DropDownList>
                <div id="LabelTemplateShow" style="display:none;">                    
                    <div id="div_datasourceshow">
                       数据源连接字符串：<asp:TextBox ID="LabelDataSourceConn" runat="server" Width="200px" />
                    </div>
                </div>
                
            </td>
       </tr>
        <tr>
           <td class="ltd">标签模板处理方式：</td>
           <td class="rtd"><asp:RadioButtonList ID="LabelTemplateType" runat="server" RepeatDirection="Horizontal" RepeatLayout="Flow">
                            <asp:ListItem Text="HTML静态模板标签" Value="simple" />
                            <asp:ListItem Text="纯编程模板标签" Value="programe" />
                            <asp:ListItem Text="带数据源可编程模板标签" Value="data_programe" />
                            <asp:ListItem Text="XML数据" Value="xml" />
                            <asp:ListItem Text="单一数据" Value="text" />
                        </asp:RadioButtonList>
           </td>
       </tr>
       <tr>
           <td class="ltd">生成标签内容方式：</td>
           <td class="rtd"><asp:DropDownList ID="LabelOutPutType" runat="server">
                    <asp:ListItem Text="静态标签页" Value="static" />
                    <asp:ListItem Text="动态标签页" Value="activity" />  
               </asp:DropDownList>
           </td>
       </tr>
       <tr id="label_static">
           <td class="ltd">静态标签生成类型：</td>
           <td class="rtd">生成名称 ：<asp:TextBox ID="StaticLabelOutPutName" runat="server" />．
               <asp:DropDownList ID="StaticLabelOutPutType" runat="server">
                    <asp:ListItem Text="Html" Value="html" Selected="True" />
                    <asp:ListItem Text="Txt" Value="txt" />
                    <asp:ListItem Text="Js" Value="js" /> 
               </asp:DropDownList>             
           </td>
       </tr>
        <tr id="label_activity">
            <td class="ltd">缓存时间单位５秒：</td>
            <td class="rtd"><asp:TextBox ID="LabelCacheTime" runat="server" Text="0" Width="200px" />
                       <select name="LabelCacheTimeSelect"  onchange="javascript:document.getElementById('ctl00_ContentPlaceHolder1_LabelCacheTime').value=this.value">
		                    <option selected="selected" value="0">不缓存</option>
		                    <option value="12">1分钟</option>
		                    <option value="720">1小时</option>
		                    <option value="17280">1天</option>		            
	                    </select></td>
       </tr>
       <tr>
            <td class="ltd">标签说明：</td>
            <td class="rtd"><asp:TextBox ID="LabelIntro" TextMode="MultiLine" runat="server" Rows="5" Width="400"/></td>
       </tr>
       <tr>
            <td class="btm" colspan="2">
       <asp:Button ID="NextStep" runat="server" Text="下一步" OnClick="NextSetp_Click" />&nbsp;
       <asp:Button ID="SaveButton" runat="server" Text="保　存" OnClick="SaveButton_Click"  Visible="false"/>
       <input id="BtnCancel" type="button"  value="取　消" onclick="window.location.href='Admin_Lable.aspx'" />&nbsp;&nbsp;&nbsp;&nbsp;
       <asp:DropDownList ID="GoToStep" Visible="false" runat="server"/> 
            </td>	
       </tr>
</table>

<script type="text/javascript">
function display_labelTemplate(objValue,ctlTextID)
{   
   var showObj=document.getElementById("LabelTemplateShow");
   if(objValue=="static")
   {
     showObj.style.display="none";
   }
   else
   {   
       var datasourceshowObj=document.getElementById("div_datasourceshow");
       var datasourceText=document.getElementById(ctlTextID);
       showObj.style.display="block";
       switch(objValue)
       {
          case "sql_sysquery":
              datasourceshowObj.style.display="none";
              break;
          case "sql_outquery":
               datasourceshowObj.style.display="block";
               datasourceText.value="Server=;Database=;uid=;pwd=";
               break;
          case "sql_sysstorequery":
               datasourceshowObj.style.display="block";
               datasourceText.value="存储过程名称";
               break;
          case "mdb":
               datasourceshowObj.style.display="block";
               datasourceText.value="temp/test.mdb";
               break;          
          case "xml":
               datasourceshowObj.style.display="block";
               datasourceText.value="temp/test.xml";
               break;            
          
       }
   }

}
function ShowLabelType(objValue)
{
   var _static=document.getElementById("label_static");
   var _activity=document.getElementById("label_activity");
   if(_static!=null && _activity!=null)
   { 
       _static.style.display=_activity.style.display="none";
       document.getElementById("label_"+objValue).style.display="";    
   }
   

}
</script>
<asp:Literal ID="show_label_type_js" runat="server" />
</asp:Content>

