<%@ page language="C#" autoeventwireup="true" inherits="HL_Admin_admin_lablePa, WebApp_deploy" enableEventValidation="false" %> 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>请输入参数</title>
    <base target="_self"></base>
    <link href="Css/template_css.css?version=1.1" type="text/css" rel="stylesheet" />
    <script language="JavaScript" type="text/JavaScript">
<!--
  function backpag()
  {  
      var mytable=document.getElementById('mytable');
      var textbox=document.getElementById('Text1');
      var textboxvalue=textbox.value;
      var parameter ='';  
      for (var i=0;i<mytable.rows.length;i++)
      {
           var Mytextbox=document.getElementById('textbox'+i);
           parameter+=Mytextbox.value+','; 
      } 
      if(parameter.length >=1)
      {
          var index= textboxvalue.indexOf('}');
          var index1=parameter.lastIndexOf(',');
          parameter=parameter.substr(0,index1); 
          textboxvalue= textboxvalue.substr(0,index) +'('+ parameter+')' + textboxvalue.substr(index,             textboxvalue.length);
       }  
       window.parent.returnValue=' '+textboxvalue+' ';
       window.parent.close();
  }
    
  function  cancel()
  {
      var mytable=document.getElementById('mytable'); 
       for (var i=0;i<mytable.rows.length;i++)
       {
           var Mytextbox=document.getElementById('textbox'+i);
           Mytextbox.value='';
       } 
  }
  
  function ChangeSize()
  {
     var w_height;
     var w_width;
     w_height=document.body.scrollHeight+100;
     w_width=document.body.scrollWidth+100; 
     if(w_height>150 && w_width>150)
     { 
        window.dialogHeight=w_height+"px";
        window.dialogWidth=w_width+"px";
     }
     
    
  }
  
  function ShowFlagPreview(objID,objValue)
  {
    var divObj=document.getElementById(objID);
    if(objValue!="")
    {
       
       divObj.innerHTML="&nbsp;图片：&nbsp;<img src=\"../Images/front_icon/"+objValue+"\"/>";
    }
    else
    {
       divObj.innerHTML="";
    }   
    
  
  }
var showCode=false;
function ShowCode()
{
   var showCodeButton=document.getElementById("showCode");
   if(!showCode)
   {
      htmlContent=document.getElementById("LabelPreviewContent_div").innerHTML;
      document.getElementById("LabelPreviewContent_div").innerHTML=HTMLEncode(htmlContent);
      showCodeButton.innerText="查看效果";
      showCode=true;
   } 
   else
   {
       htmlContent=document.getElementById("LabelPreviewContent_div").innerHTML;
       document.getElementById("LabelPreviewContent_div").innerHTML=HTMLDecode(htmlContent);
       showCodeButton.innerText="查看源码";
       showCode=false;
   }  
   
}
function HTMLEncode(strHTML)
{
   var div = document.createElement('div');
   div.innerText = strHTML;
   return div.innerHTML;
}

function HTMLDecode(strEncodeHTML)
{
   var div = document.createElement('div');
   div.innerHTML = strEncodeHTML;
   return div.innerText;
}

    
 

//-->
</script>
  <style type="text/css">
  body{
      font-size:12px;
      background:#E0EEF5;
     
  }
  </style>
</head>
<body topmargin="0" leftmargin="0" rightmargin="0">
    <form id="form1" runat="server">
    
     <asp:Panel ID="UserLabel" runat="server" Visible="false">
         <script type="text/javascript">
             function returnValues()
             {
                var labelText;
                var containHead;
                var containFoot;
                containHead = "";
                containFoot = "";
                
                labelText = "{HL.Label ID=\"<%=LabelNamestr %>\"";        
               
                <asp:Literal ID="JsParm" runat="server"/>
                if(document.getElementById("contain").value!=""){
                    containHead = "<" + document.getElementById("contain").value;
                    if(document.getElementById("cssname").value!=""){
                        containHead = containHead + " class=\"" + document.getElementById("cssname").value + "\" ";
                    }
                    containHead = containHead + ">";
                    containFoot = "</"+document.getElementById("contain").value+">";
                }
                
                labelText = labelText + " }";
                window.returnValue = containHead + labelText + containFoot;
                window.close();
             }
        </script>
     <div>
       <div style="height:25px; width:100%; line-height:25px; padding-left:10px;">
           标签名称：<asp:Literal ID="Label_LabelName" runat="server"  />
       </div>
       <hr align="center" width="95%" size="1" />
      
       <asp:Literal ID="listParamter" runat="server"  />
       <div style="width:100%;">
            <div style="float:left; width:40%; text-align:right; line-height:25px;">容器类型：</div>
            <div style="float:left; line-height:25px;"><input id="contain" name="contain" /></div>
       </div>
       <div style="width:100%;">
            <div style="float:left; width:40%; text-align:right; line-height:25px;">样式名：</div>
            <div style="float:left; line-height:25px;"><input id="cssname" name="cssname"/></div>
       </div>
       <div style="text-align:center;"><input name="Ok" onclick="return returnValues()" type="button" value="确 定" /> <input name="canl" type="button" onclick="window.close();" value="取 消" /></div>
     </div>
    </asp:Panel>
     
     <script type="text/javascript">
        function ShowLabelType(objID1,objID2,type)
        {
           
           var objTable1=document.getElementById(objID1);
           var objtable2 =document.getElementById(objID2);
          
           if(type=="1")
           {
               objTable1.style.display="";
               objtable2.style.display="none";
           }
           else{
              objTable1.style.display="none";
              objtable2.style.display="";
           }
        
        }
     </script>   
    <asp:PlaceHolder ID="SysLabel_PlaceHolder" runat="server">
    <table  class="tableForm" >
         <tr>              
             <td colspan="2">标签名称：<asp:literal runat="server" ID="LabelTypeName" /></td>
         </tr>
         <tr>
            <th>标签名称：</th>
            <td><asp:TextBox ID="LabelName" runat="server" />(便于日后在模板找到该标签进行操作)</td>
         </tr>
         <tr>
             <th>筛选条件：</th>
             <td><input type="radio" name="selectType" value="customer"  id="customer_select" onclick="ShowLabelType('customer_conditions','designate_ID','1')" checked="checked"/><label for="customer_select">自定义条件</label>
                 <input type="radio" name="selectType" value="designateID"  id="designateID_select" onclick="ShowLabelType('customer_conditions','designate_ID','2')"/><label for="designateID_select">指定ID</label>
             </td>
         </tr>
         <tbody id="designate_ID" style="display:none;">
             <tr >
                <th>指定ID：</th>
                <td><asp:TextBox ID="IDArray" runat="server" />(选择多个ID请用“,”分隔)</td>
            </tr>       
        </tbody> 
         <tbody id="customer_conditions" >
            <tr>
                <th>关键字：</th>
                <td><asp:TextBox ID="KeyValue" runat="server" /></td>
            </tr>
            <tr>
                 <th>标签属性：</th>
                 <td><asp:DropDownList ID="OtherType" runat="server">
                     </asp:DropDownList>
                 </td>
             </tr>
             
              <tr>
                 <th>排序方式：</th>
                 <td><asp:DropDownList ID="SortType" runat="server">
                     </asp:DropDownList>
                 </td>
             </tr>
          <!--商品标签自定义条件开始-->
          
          <asp:Panel ID="Product_Condition_Panel" runat="server" Visible="false">
             
             <tr>
                 <th>价格类型：</th>
                 <td><asp:CheckBoxList ID="ProductType" runat="server"  RepeatDirection="Horizontal" RepeatLayout="Flow" >                     
                         <asp:ListItem Text="一口价" Value="1"  />
                         <asp:ListItem Text="拍卖" Value="2" />                     
                         <asp:ListItem Text="团购" Value="3" />
                     </asp:CheckBoxList></td>
             </tr>
              <tr>
                 <th>商品类型：</th>
                 <td><asp:DropDownList ID="IsNew" runat="server">
                         <asp:ListItem Text="不限" Value="-1" Selected="True"/>
                         <asp:ListItem Text="全新" Value="new" />
                         <asp:ListItem Text="二手" Value="secondhand" />            
                     </asp:DropDownList></td>
             </tr>
              <tr>
                 <th>商品价格范围：</th>
                 <td>从<asp:TextBox ID="StrartPrice" runat="server" Text=""  Width="50px"/>至<asp:TextBox ID="EndPrice" runat="server" Text="" Width="50px"/>空表示不限制价格</td>
             </tr>             
           
          </asp:Panel>
          <!--商品标签自定义条件结束-->
          
          <!--店铺标签自定义条件开始-->
          <asp:Panel ID="Shop_Condition_Panel" runat="server" Visible="false">
             <tr>
                 <th>店铺类型：</th>
                 <td><asp:CheckBoxList ID="Shop_ShopType" runat="server"  DataTextField="GroupName" DataValueField="ID" RepeatDirection="Horizontal"  RepeatLayout="Flow">                     
                         
                     </asp:CheckBoxList></td>
             </tr>

          </asp:Panel>
          <!--店铺标签自定义条件结束-->
          
         <!--文章标签自定义内容开始-->
          <asp:Panel ID="Article_Conditon_Panel" runat="server" Visible="false">
              <tr>
                 <th>文章所属模块类型：</th>
                 <td><asp:DropDownList ID="Article_ArticleType" runat="server"  AppendDataBoundItems="true" >
                         <asp:ListItem Text="所有分类" Value="-1"  Selected="True"/>
                     </asp:DropDownList>
                    
                 </td>
             </tr>
             <tr>
                 <th>文章链接属性：</th>
                 <td><asp:DropDownList ID="Article_LinkType" runat="server">
                         <asp:ListItem Text="不限" Value="-1" Selected="True"/>
                         <asp:ListItem Text="内部文章" Value="0" />
                         <asp:ListItem Text="外部链接" Value="1" />            
                     </asp:DropDownList></td>
             </tr>
             
             
              <tr>
                 <th>文章录入日期范围：</th>
                 <td>从<asp:TextBox ID="Articel_ArticleBegin" runat="server" Text=""  Width="50px"/>至<asp:TextBox ID="Article_ArticleEnd" runat="server" Text="" Width="50px"/>空表示不限制日期</td>
             </tr>

          </asp:Panel>
          <!--文章标签自定义内容结束-->
         <tr>
             <th>所属分类</th>
             <td><asp:DropDownList ID="ClassID" runat="server"  AppendDataBoundItems="true">
                    <asp:ListItem Text="所有分类" Value="-1"  Selected="True"/>
                 </asp:DropDownList>                     
               
             </td>
         </tr>          
        
          <tr>
             <th>所在地：</th>
             <td><hl:HowaveProvinceCity ID="HowaveProvinceCity1" runat="server" /></td>
         </tr>
         </tbody>
         <asp:Panel ID="Product_Panel" runat="server" Visible="false">
             <tr>
                 <th>显示商品图片：</th>
                 <td><asp:DropDownList ID="ProductImgType" runat="server">
                         <asp:ListItem Text="缩略图" Value="small"  Selected="true"/>
                         <asp:ListItem Text="大图" Value="big" />                     
                     </asp:DropDownList>
                 </td>
             </tr>
         </asp:Panel>
         <asp:Panel ID="Article_Panel" runat="server" Visible="false">
             <tr>
                 <th>显示标题类型：</th>
                 <td><asp:DropDownList ID="Article_TitleType" runat="server">    
                         <asp:ListItem Text="短标题" Value="short" />                 
                         <asp:ListItem Text="长标题" Value="long" />                   
                     </asp:DropDownList></td>
             </tr>
             <tr>
                 <th>是否显示摘要：</th>
                 <td><asp:RadioButtonList ID="Article_Summary" runat="server"  RepeatDirection="Horizontal" RepeatLayout="Flow">
                         <asp:ListItem Text="否" Value="0"  Selected="True"/>
                         <asp:ListItem Text="是" Value="1" />
                    </asp:RadioButtonList></td>
                
             </tr>
             <tr>
                 <th>摘要设置：</th>
                 <td><asp:DropDownList ID="Article_SummarySet" runat="server">
                         <asp:ListItem Text="仅第1条显示" Value="0" />
                         <asp:ListItem Text="仅前2条显示" Value="1" />
                         <asp:ListItem Text="仅前3条显示" Value="2" />
                         <asp:ListItem Text="全部显示" Value="99" />              
                    </asp:DropDownList></td>
             </tr>
             <tr>
                 <th>摘要字数限制：</th>
                 <td><asp:TextBox ID="Article_SummaryLimit" runat="server" Text="300" />字以内，超出部分显示“...”</td>
             </tr>
             
         </asp:Panel>
          <tr>
             <th>显示方式：</th>
             <td><asp:DropDownList ID="ShowUIType" runat="server">
                     <asp:ListItem Text="文字" Value="text" Selected="True" />
                     <asp:ListItem Text="图片" Value="img" />                    
                     <asp:ListItem Text="图文混排" Value="imgtext" />
                 </asp:DropDownList></td>
         </tr>               
         <tr>
             <th>显示数量：</th>
             <td><asp:TextBox ID="ShowNum" runat="server" Text="10" Width="100px"/></td>
         </tr>
         <tr>
             <th>标题长度：</th>
             <td><asp:TextBox ID="TitleLength" runat="server" Text="0" Width="100px"/>*0表示不限制长度</td>
         </tr>
         <tr>
             <th>显示字段：</th>
             <td><asp:CheckBoxList ID="ShowField" runat="server" RepeatColumns="2" RepeatDirection="Horizontal" RepeatLayout="Flow">                 
                                  
                 </asp:CheckBoxList></td>
         </tr>         
         <tr>
             <th>标题前缀图标：</th>
             <td><asp:DropDownList ID="FrontIcon" runat="server">
                   <asp:ListItem Text="不显示" Value="" />
                 </asp:DropDownList>
                    
                 <div id="show_frontIcon" style="display:inline;"></div>&nbsp;<span style="color:Red">注：文字方式才显示图标</span>
             </td>
         </tr>    
         <tr>
             <th>文章标记显示位置：</th>
             <td><asp:DropDownList ID="ShowFlag" runat="server">
                     <asp:ListItem Text="不显示" Value="none" />
                     <asp:ListItem Text="显示热门图标" Value="hot-icon" />
                     <asp:ListItem Text="显示最新图标" Value="new-icon" />
                 </asp:DropDownList>
             
             </td>
         </tr>        
        
         <tr>
             <th>打开方式：</th>
             <td><asp:DropDownList ID="OpenType" runat="server">
                     <asp:ListItem Text="新窗口打开" Value="_blank" />
                     <asp:ListItem Text="原窗口打开" Value="_self" />                     
                 </asp:DropDownList>
             </td>
         </tr>
          <tr>
             <th>Css样式名：</th>
             <td><asp:TextBox ID="StyleName" runat="server" />
             </td>
         </tr>
         <tr>
             <th>开启缓存：</th>
             <td><asp:DropDownList ID="AutoUpdate" runat="server">
                     <asp:ListItem Text="是" Value="true"  Selected="true"/>
                     <asp:ListItem Text="否" Value="false" />                     
                 </asp:DropDownList>
             </td>
         </tr>
         <tr>
             <th>缓存时间：</th>
             <td><asp:TextBox ID="CacheTime" runat="server" Text="720"/>单位 <span style="color:Blue;">(每5秒为一个单位)</span></td>
         </tr>
         
          <tr>
             <td colspan="2" style="text-align:center">
                <asp:Button ID="PreviewLabelButton"  runat="server"  OnClick="PreviewLabelButton_Click" Text=" 预 览 " />&nbsp;
                <asp:Button ID="SubmitLabelButton" runat="server" OnClick="SubmitLabelButton_Click" Text=" 确 定 " />&nbsp;
                <input type="button" name="cl" value=" 关 闭 " onclick="window.close()" />
                </td>           
            
         </tr>
     </table>
    
    
    
     <asp:Panel ID="LabelPreviewPanel" runat="server" Visible="false" style=" width:95%; height:600px; position:absolute; top:50px; left:10px; background:white;border:solid 1px black;z-index:10;">
         <iframe  style="position:absolute;z-index:-1;width:100%;height:100%;top:0;left:0;scrolling:no;" frameborder="0" src="about:blank"></iframe>

         <div  style="width:98%;height:25px;background:black; padding:5px 5px 0 5px;"><div style="float:left; color:White;">标签预览</div><div style="float:right;color:White;"><a href="javascript:void(0)" id="showCode" onclick="ShowCode()">查看源码</a>&nbsp;&nbsp;<a href="javascript:void(0)" onclick="document.getElementById('LabelPreviewPanel').style.display='none';">关闭</a></div></div>
         <div id="LabelPreviewContent_div" style="padding:5px;"> 
            <asp:Literal ID="LabelPreviewContent" runat="server" />   
         </div>
         
     </asp:Panel>
     </asp:PlaceHolder>   
     <hl:ShowArticle ID="article_1" runat="server" Visible="false" />
     <hl:ShowProduct ID="product_1" runat="server" Visible="false" />
     <hl:ShowShop ID="shop_1" runat="server" Visible="false" />
  </form>
    
</body>
</html>
<script type="text/javascript">ChangeSize();</script>