<%@ Page Language="C#" AutoEventWireup="true" Inherits="RegLink, QianboCMS" 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>
<link href="../User/Images/Layout.css" rel="Stylesheet" type="text/css" />
<script type="text/javascript" src="../Js/Common.js"></script>
</head>

<body>
<form id="form1" runat="server">
  <table cellpadding="2" cellspacing="1" class="borderGray" align="center">
    <tr>
      <td class="bqleftGray">网站名称：</td>
      <td class="bqrightGray"><asp:Label ID="lbMySiteName" runat="server"></asp:Label></td>
    </tr>
    <tr>
      <td class="bqleftGray">图片链接：</td>
      <td class="bqrightGray"><asp:Image ID="imgMyLogo" runat="server" align="absmiddle" />
        <asp:TextBox ID="txtMyPicLink" runat="server" Width="350px"></asp:TextBox>
        <input id="btnCopyLogo" type="button" value="复制" class="btn" onclick="txtMyPicLink.focus();document.execCommand('selectall');document.execCommand('copy')" /></td>
    </tr>
    <tr>
      <td class="bqleftGray">文字链接：</td>
      <td class="bqrightGray"><asp:TextBox ID="txtMyTextLink" runat="server" Width="350px"></asp:TextBox>
        <input id="btnCopyText" type="button" value="复制" class="btn" onclick="txtMyTextLink.focus();document.execCommand('selectall');document.execCommand('copy')" /></td>
    </tr>
  </table>
  <table cellpadding="2" cellspacing="1" class="borderGray" align="center">
    <tr class="titleBgGray">
      <td colspan="2">申请友情链接(请填写您的网站资料)</td>
    </tr>
    <tr>
      <td class="bqleftGray">链接类型：</td>
      <td class="bqrightGray"><asp:RadioButton ID="rbTextLink" runat="server" GroupName="LinkType" Checked="true" onclick="IsDisplay('LogoTr')" />文字链接
        <asp:RadioButton ID="rbPicLink" runat="server" GroupName="LinkType" onclick="IsDisplay('LogoTr');" />图片链接</td>
    </tr>
    <tr>
      <td class="bqleftGray">所属分类：</td>
      <td class="bqrightGray"><asp:DropDownList ID="ddlLinkCategory" runat="server"></asp:DropDownList></td>
    </tr>
    <tr>
      <td class="bqleftGray">网站名称：</td>
      <td class="bqrightGray"><asp:TextBox ID="txtRegSiteName" runat="server" MaxLength="50"></asp:TextBox>
        <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="txtRegSiteName" ErrorMessage="* 请输入网站名称"></asp:RequiredFieldValidator></td>
    </tr>
    <tr>
      <td class="bqleftGray">网站Url：</td>
      <td class="bqrightGray"><asp:TextBox ID="txtRegUrl" runat="server" MaxLength="255"></asp:TextBox>
        <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ControlToValidate="txtRegUrl" ErrorMessage="* 请输入您的网站Url" Display="Dynamic"></asp:RequiredFieldValidator>
        <asp:RegularExpressionValidator ID="RegularExpressionValidator2" runat="server" ControlToValidate="txtRegUrl" Display="Dynamic" ErrorMessage="* 网站Url格式错误" ValidationExpression="http(s)?://([\w-]+\.)+[\w-]+(/[\w- ./?%&=]*)?"></asp:RegularExpressionValidator></td>
    </tr>
    <tr id="LogoTr" style="display: none;">
      <td class="bqleftGray">网站Logo：</td>
      <td class="bqrightGray"><asp:TextBox ID="txtRegLogo" runat="server" MaxLength="255"></asp:TextBox></td>
    </tr>
    <tr>
      <td class="bqleftGray">联系人：</td>
      <td class="bqrightGray"><asp:TextBox ID="txtRegName" runat="server" MaxLength="50"></asp:TextBox></td>
    </tr>
    <tr>
      <td class="bqleftGray">电子邮箱：</td>
      <td class="bqrightGray"><asp:TextBox ID="txtEmail" runat="server" MaxLength="50"></asp:TextBox>
        <asp:RequiredFieldValidator ID="RequiredFieldValidator4" runat="server" ControlToValidate="txtEmail" Display="Dynamic" ErrorMessage="* 请输入邮箱地址"></asp:RequiredFieldValidator>
        <asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" ControlToValidate="txtEmail" Display="Dynamic" ErrorMessage="* 邮箱地址格式错误" ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*"></asp:RegularExpressionValidator></td>
    </tr>
    <tr>
      <td class="bqleftGray">网站描述：</td>
      <td class="bqrightGray"><asp:TextBox ID="txtDescription" runat="server" TextMode="MultiLine" MaxLength="200" Width="350px" height="80px"></asp:TextBox></td>
    </tr>
    <tr>
      <td class="bqleftGray"></td>
      <td class="bqrightGray"><asp:Button ID="btnReg" runat="server" Text="提交友情链接申请" OnClick="btnReg_Click" /></td>
    </tr>
  </table>
</form>
<br />
</body>
</html>