<%@ page language="C#" autoeventwireup="true" inherits="V5Shop.Admin.System_Link_Operate, V5Shop.Shop.Config" enableviewstatemac="false" enableEventValidation="false" viewStateEncryptionMode="Never" %>

<%@ Register Src="control/PageBottom.ascx" TagName="PageBottom" TagPrefix="uc1" %>
<%@ Register Assembly="V5Shop.Control" Namespace="V5Shop.Control" TagPrefix="cc1" %>
<!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="css/css.css" rel="stylesheet" type="text/css" />
    <link href="css/css_list.css" rel="stylesheet" type="text/css" />
    <link href="css/control.css" rel="stylesheet" type="text/css" />

    <script type="text/javascript" language="javascript" src="js/Common.js"></script>

    <script type="text/javascript" src="editor/fckeditor.js"></script>

</head>
<body>
    <form id="form1" runat="server">
        <div class="OperateTitle">
            <div>
                <asp:Label ID="lblAdd" runat="server" Text="【 友情链接添加 】"></asp:Label>
                <asp:Label ID="lblEdit" runat="server" Text="【 友情链接编辑 】" Visible="false"></asp:Label>
                <a href="System_Link_Manage.aspx" title="返回友情链接列表">返回列表</a>
            </div>
        </div>
        <div>
            <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0" id="OperateTable">
                <tr>
                    <td align="right" bgcolor="#FFFFFF" style="height: 30px; width: 20%;">
                        <asp:Label ID="lblTypeID" runat="server" Text="链接类型："></asp:Label>
                    </td>
                    <td bgcolor="#FFFFFF" align="left" style="height: 30px">
                        &nbsp;<asp:DropDownList ID="ddlTypeID" runat="server" OnSelectedIndexChanged="ddlTypeID_SelectedIndexChanged" AutoPostBack="True">
                        </asp:DropDownList><span class="NeedMsg">*</span>&nbsp;
                    </td>
                </tr>
                <tr>
                    <td align="right" bgcolor="#FFFFFF" style="height: 30px; width: 20%;">
                        <asp:Label ID="lblName" runat="server" Text="链接名称："></asp:Label>
                    </td>
                    <td bgcolor="#FFFFFF" align="left" style="height: 30px">
                        <asp:TextBox ID="txtName" runat="server" MaxLength="50" Width="300px"></asp:TextBox>
                        <span class="NeedMsg">*</span>
                        <asp:RequiredFieldValidator ID="RequiredFieldValidator2" ControlToValidate="txtName"
                            runat="server" ErrorMessage="不能为空"></asp:RequiredFieldValidator>
                    </td>
                </tr>
                <tr>
                    <td align="right" bgcolor="#FFFFFF" style="height: 30px; width: 20%;">
                        <asp:Label ID="lblHref" runat="server" Text="链接地址："></asp:Label>
                    </td>
                    <td bgcolor="#FFFFFF" align="left" style="height: 30px">
                        <asp:TextBox ID="txtHref" runat="server" MaxLength="250" Width="300px"></asp:TextBox>
                        <span class="NeedMsg">*</span>
                        <asp:RequiredFieldValidator ID="RequiredFieldValidator1" ControlToValidate="txtHref"
                            runat="server" ErrorMessage="不能为空"></asp:RequiredFieldValidator>
                    </td>
                </tr>
                <tr id="trImgType" runat="server">
                    <td align="right" bgcolor="#FFFFFF" style="height: 30px; width: 20%;">
                        <cc1:HelpCtrl ID="HelpCtrl1" runat="server" FontColor="red" Header="图片类型" ImageURL="images/help.gif"
                            Text="网站LOGO图片连接类型。" />
                        <asp:Label ID="lblImageType" runat="server" Text="图片类型："></asp:Label>
                    </td>
                    <td bgcolor="#FFFFFF" align="left" style="height: 30px">
                        <asp:RadioButtonList ID="rblImageType" runat="server" RepeatDirection="Horizontal" AutoPostBack="True" OnSelectedIndexChanged="rblImageType_SelectedIndexChanged" CssClass="radioaspx">
                        </asp:RadioButtonList>
                    </td>
                </tr>
                <tr id="ImageTypeLocal" runat="server">
                    <td align="right" bgcolor="#FFFFFF" style="height: 30px; width: 20%;">
                        <asp:Label ID="lblImageLocal" runat="server" Text="本地上传："></asp:Label>
                        <asp:Label ID="lblImageRemote" runat="server" Text="远程链接：" Visible="False"></asp:Label>
                    </td>
                    <td bgcolor="#FFFFFF" align="left" style="height: 30px">
                        <asp:TextBox ID="txtSrc" runat="server" MaxLength="250" Width="300px"></asp:TextBox>
                      <input type="button" value="选择图片" onclick="OpenDialog('txtSrc')" class="button" id="btnSelectImage" runat="server"/>
                    <img src="" id="txtSrcView" style="display:none;" />
                    <span class="NeedMsg">*</span>
                        <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" ControlToValidate="txtSrc"
                            ErrorMessage="不能为空"></asp:RequiredFieldValidator></td>
                </tr>
                <tr>
                    <td align="right" bgcolor="#FFFFFF" style="height: 30px; width: 20%;">
                        <asp:Label ID="lblDescription" runat="server" Text="站点介绍："></asp:Label>
                    </td>
                    <td bgcolor="#FFFFFF" align="left" style="height: 30px">
                        <asp:TextBox ID="txtDescription" runat="server" TextMode="MultiLine" Height="60px" Width="300px"></asp:TextBox>
                        <span class="NeedMsg">*</span>
                        <asp:RequiredFieldValidator ID="RequiredFieldValidator4" ControlToValidate="txtDescription"
                            runat="server" ErrorMessage="不能为空" Display="Dynamic"></asp:RequiredFieldValidator>
                        <asp:RegularExpressionValidator ID="RegularExpressionValidator2" runat="server" ControlToValidate="txtDescription"
                            Display="Dynamic" ErrorMessage="长度必须在250字以内" ValidationExpression="^[\s\S]{0,250}$"></asp:RegularExpressionValidator></td>
                </tr>
                <tr>
                    <td align="right" bgcolor="#FFFFFF" style="height: 30px; width: 20%;">
                        <asp:Label ID="lblRemark" runat="server" Text="备注："></asp:Label>
                    </td>
                    <td bgcolor="#FFFFFF" align="left" style="height: 30px">
                        <asp:TextBox ID="txtRemark" runat="server" TextMode="MultiLine" Height="60px" Width="300px"></asp:TextBox>
                        <span class="NeedMsg">*</span>
                        <asp:RequiredFieldValidator ID="RequiredFieldValidator5" ControlToValidate="txtRemark"
                            runat="server" ErrorMessage="不能为空" Display="Dynamic"></asp:RequiredFieldValidator>
                        <asp:RegularExpressionValidator ID="RegularExpressionValidator4" runat="server" ControlToValidate="txtRemark"
                            Display="Dynamic" ErrorMessage="长度必须在150字以内" ValidationExpression="^[\s\S]{0,150}$"></asp:RegularExpressionValidator></td>
                </tr>
                <tr>
                    <td align="right" bgcolor="#FFFFFF" style="height: 30px; width: 20%;">
                        <asp:Label ID="lblOrderId" runat="server" Text="排序："></asp:Label>
                    </td>
                    <td bgcolor="#FFFFFF" align="left" style="height: 30px">
                        <asp:TextBox ID="txtOrderID" runat="server" Width="100px"></asp:TextBox><span style="color: #ff0000">*</span>
                        <asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" ControlToValidate="txtOrderID"
                            Display="Dynamic" ErrorMessage="只能为数字" ValidationExpression="\d*"></asp:RegularExpressionValidator>&nbsp;<span
                                class="NeedMsg"></span>
                        <asp:RequiredFieldValidator ID="RequiredFieldValidator6" ControlToValidate="txtOrderID"
                            runat="server" ErrorMessage="不能为空" Display="Dynamic"></asp:RequiredFieldValidator>
                    </td>
                </tr>
                <tr>
                    <td align="right" bgcolor="#FFFFFF" style="width: 20%; height: 30px;">
                    </td>
                    <td bgcolor="#FFFFFF" align="left" style="height: 30px">
                        <asp:Button ID="btnAdd" runat="server" Text="确定" OnClick="btnAdd_Click" CssClass="button" />
                        <asp:Button ID="btnEdit" runat="server" Text="更新" OnClick="btnEdit_Click" Visible="False"
                            CssClass="button" />
                        <input id="iptReset" runat="server" type="reset" value="重置" class="button" />
                        <input id="btnReturn" runat="server" type="button" value="返回列表" onclick="window.location.href='System_Link_Manage.aspx'"
                            class="button" />
                    </td>
                </tr>
            </table>

            <script type="text/javascript">
            //加TABLE样式
            InitTrClass();
            </script>

        </div>
    </form>
    <uc1:PageBottom ID="PageBottom1" runat="server" />
</body>
</html>
