<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="getflinks.aspx.cs" Inherits="TotCms.Web.Admin.label.getflinks" ValidateRequest="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 id="Head1" runat="server">
  <title>友情链接标签</title>
  <link href="css.css" rel="stylesheet" type="text/css" />
  <script src="../js/common.js" type="text/javascript"></script>
  <script type="text/javascript"> 
    function retValue(){
	    var ret='';
	    var RowsNum=document.getElementById('RowsNum').value;
	    RowsNum=RowsNum.replace(/\,/g,"");	
	    var ColsNum=document.getElementById('ColsNum').value;	
	    var LinkType=document.getElementById('LinkType').value;
	    var ItColor1=document.getElementById('ItColor1').value;
	    var ItColor2=document.getElementById('ItColor2').value;
	    ItColor1=ItColor1.replace(/\'/g,"\'");
	    ItColor1=ItColor1.replace(/\,/g,"");	
	    ret='GetFlinks(';
	    ret+=RowsNum+',';	
	    ret+=ColsNum+',';	
	    ret+=LinkType+',';
	    ret+=ItColor1+',';
	    ret+=ItColor2+')';
	    window.opener.document.form1.Content.value=ret;
	    window.close();
    }
    function Preview(){
      var ret='';
	    var RowsNum=document.getElementById('RowsNum').value;
	    RowsNum=RowsNum.replace(/\,/g,"");	
	    var ColsNum=document.getElementById('ColsNum').value;	
	    var LinkType=document.getElementById('LinkType').value;
	    var ItColor1=document.getElementById('ItColor1').value;
	    var ItColor2=document.getElementById('ItColor2').value;
	    ItColor1=ItColor1.replace(/\'/g,"\'");
	    ItColor1=ItColor1.replace(/\,/g,"");
	    ret='GetFlinks,';
	    ret+=RowsNum+',';	
	    ret+=ColsNum+',';	
	    ret+=LinkType+',';
	    ret+=ItColor1+',';
	    ret+=ItColor2;
		  document.getElementById('preframe').src='label_privew.aspx?content='+escape(ret);
    }
    function checkInt(obj){
	    var reg = /^(\d{1,4})$/; 
	    if(obj!="" && obj.match(reg)==null){
		    return 0;
	    }else{
	      return obj;
	    }
    }
    </script>

</head>
<body>
    <form id="form1" runat="server">
    <fieldset style="text-align:center; ">
<legend>友情链接标签</legend>
<table width="400" border="0" align="center" cellpadding="1" cellspacing="5">
  <tr>
    <td><div align="left">行数:</div></td>
    <td><div align="left">   
      <asp:TextBox ID="RowsNum" runat="server">4</asp:TextBox>
      </div></td>
  </tr>
  <tr>
    <td><div align="left">列数:</div></td>
    <td><div align="left">
      <asp:TextBox ID="ColsNum" runat="server">8</asp:TextBox>
    </div></td>
  </tr>
  <tr>
    <td><div align="left">类型:</div></td>
    <td>
        <div align="left">
          <asp:DropDownList ID="LinkType" runat="server">
            <asp:ListItem Value="0">文字链接</asp:ListItem>
            <asp:ListItem Value="1">图片连接</asp:ListItem>
          </asp:DropDownList>
      </div></td>
  </tr>
  <tr>
    <td><div align="left">交替背景颜色:</div></td>
    <td><div align="left">
      背景1：<asp:TextBox ID="ItColor1" runat="server" CssClass="input_num">#ffffff</asp:TextBox>
      背影2：<asp:TextBox ID="ItColor2" runat="server" CssClass="input_num">#eeeeee</asp:TextBox>
    </div></td>
  </tr>
  <tr>
    <td colspan="2">
      <div align="center">
        <input id="Ok" type="submit" value="确定" onclick="retValue()" />
        &nbsp;
        <input type="button"  onclick="window.close();" value="取消" />
    &nbsp;<input id="Button1" type="button" value="预览" onclick="Preview()" /> </div></td>
  </tr>
</table>
 
</fieldset>
<fieldset>
  <legend>预览</legend>
  <iframe width="99%" frameborder="0" id="preframe" name="preframe" src="preview.htm"></iframe>
</fieldset>
    </form>
</body>
</html>
