<%@ page language="C#" autoeventwireup="true" inherits="GroupFlyProduce_ProduceAdmin_ProduceLink_Operate, GroupTGWeb_deploy" %>

<%@ Register Src="UserControl/MessageShow.ascx" TagName="MessageShow" TagPrefix="China315" %>
<!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>Untitled Page</title>
    <link rel="stylesheet" type="text/css" href="style/index.css" />

    <script type="text/javascript" src="js/jquery-1.3.2.min.js"></script>

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

    <script type="text/javascript">
   
    //选择单图
   function openSingleChild()
    { 
        var k = window.showModalDialog("Image_List_Select.aspx",window,"dialogWidth:820px;status:no;dialogHeight:650px"); 
        if(k != null) 
        {
        //  var strLen=k.length;
         // var lastIndex=k.lastIndexOf('/');
        //  document.getElementById("textBoxImgAddress").value = k.substring(lastIndex+1,strLen); 
        // document.getElementById("ImageOriginalImge").src = k; 
              var imgvalue = new Array();
                imgvalue = k.split(",");
                document.getElementById("textBoxImgAddress").value = imgvalue[0]; 
                document.getElementById("ImageOriginalImge").src = imgvalue[1]; 
        }
    } 
    </script>

</head>
<body>
    <form id="form1" runat="server">
    <div class="main">
    
            <div class="title">
                <asp:Label ID="LabelPageTitle" runat="server" Text="【 新增友情链接  】"></asp:Label>
            </div>
          
                <table width="100%" cellspacing="1" cellpadding="0" border="0">
                    <tr >
                        <td align="right" width="20%">
                            <asp:Label ID="lblLinkType" runat="server" Text="链接类型："></asp:Label>
                        </td>
                        <td>
                            <asp:DropDownList ID="DropListLINKTYPE" runat="server" AutoPostBack="True" OnSelectedIndexChanged="DropListLINKTYPE_SelectedIndexChanged" CssClass="allinput2">
                            </asp:DropDownList>
                            <asp:CompareValidator ID="CompareFatherCateGory" runat="server" ControlToValidate="DropListLINKTYPE"
                                Display="Dynamic" ErrorMessage="该值必需选择" Operator="NotEqual" ValueToCompare="-1"></asp:CompareValidator>
                        </td>
                    </tr>
                    <tr>
                        <td align="right" width="20%">
                            <asp:Label ID="lblTitle" runat="server" Text="链接名称："></asp:Label>
                        </td>
                        <td>
                            <asp:TextBox ID="textBoxTitle" runat="server" CssClass="allinput2"></asp:TextBox>
                            <asp:Label ID="Label1" runat="server" ForeColor="red" Text="*"></asp:Label>
                            <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="textBoxTitle"
                                ErrorMessage="该值不能为空 "></asp:RequiredFieldValidator>
                        </td>
                    </tr>
                    <tr>
                        <td align="right" width="20%">
                            <asp:Label ID="lblLinkAddress" runat="server" Text="链接地址："></asp:Label>
                        </td>
                        <td>
                            <asp:TextBox ID="textBoxLinkAddress" runat="server" CssClass="allinput2"></asp:TextBox>
                            <asp:Label ID="Label2" runat="server" ForeColor="red" Text="*"></asp:Label>
                            <asp:RequiredFieldValidator ID="RequiredFieldValidatortextBoxLinkAddress" runat="server"
                                ControlToValidate="textBoxLinkAddress" ErrorMessage="该值不能为空 "></asp:RequiredFieldValidator>
                        </td>
                    </tr>
                    <tr>
                        <td align="right" width="20%">
                            <asp:Label ID="lblOrderID" runat="server" Text="排序号："></asp:Label>
                        </td>
                        <td>
                            <asp:TextBox ID="textBoxOrderID" runat="server" CssClass="allinput2"></asp:TextBox>
                            <asp:RegularExpressionValidator ID="RegularExpressionValidatorRepertoryOrderID" runat="server"
                                ControlToValidate="TextBoxOrderID" ErrorMessage="只能输入数字" ValidationExpression="^[0-9]*$"
                                Display="Dynamic"></asp:RegularExpressionValidator>
                        </td>
                    </tr>
                    <asp:Panel ID="PanelHidden" runat="server" Visible ="false">
                        <tr>
                            <td align="right" width="20%">
                                <asp:Label ID="lblIMGTYPE" runat="server" Text="图片类型："></asp:Label>
                            </td>
                            <td>
                                <asp:RadioButtonList ID="radioButtonIMGTYPE" runat="server" AutoPostBack="True" RepeatDirection="Horizontal"
                                    RepeatLayout="Flow">
                                    <asp:ListItem Selected="True" Value="0">本地图片</asp:ListItem>
                                    <asp:ListItem Value="1">远程图片</asp:ListItem>
                                </asp:RadioButtonList>
                                <br />
                                <asp:TextBox ID="textBoxImgAddress" runat="server" CssClass="allinput1"></asp:TextBox>
                            </td>
                        </tr>
                        <tr>
                            <td align="right" width="20%" valign="bottom">
                                <asp:Label ID="lblImgAddress" runat="server" Text="本地上传："></asp:Label>
                            </td>
                            <td>
                                <asp:Panel ID="Panelimage" runat="server">
                                    <input id="ButtonSelectSingleImage" type="button" value="选择图片" onclick="openSingleChild()"
                                        class="bnt1 cancel" /><img id="ImageOriginalImge" runat="server" alt="" src="~/ProduceAdmin/images/noImage.gif" width="100" height="60" />
                                </asp:Panel>
                            </td>
                        </tr>
                    </asp:Panel>
                    <tr>
                        <td align="right" width="20%">
                            <asp:Label ID="lblDescription" runat="server" Text="站点介绍："></asp:Label>
                        </td>
                        <td>
                            <asp:TextBox ID="textBoxDescription" runat="server" TextMode="MultiLine" CssClass="allinput1"></asp:TextBox>
                            <asp:Label ID="Label3" runat="server" ForeColor="red" Text="*"></asp:Label>
                            <asp:RequiredFieldValidator ID="RequiredFieldValidatortextBoxDescription" runat="server"
                                ControlToValidate="textBoxDescription" ErrorMessage="该值不能为空 " Display="Dynamic"></asp:RequiredFieldValidator>
                            <asp:RegularExpressionValidator ID="RegularExpressionValidatortextBoxDescription"
                                runat="server" ControlToValidate="textBoxDescription" Display="Dynamic" ErrorMessage="最多150个字符"
                                ValidationExpression="^[\s\S]{0,50}$"></asp:RegularExpressionValidator>
                        </td>
                    </tr>
                    <tr>
                        <td align="right">
                            <asp:Label ID="lblRemark" runat="server" Text="备注："></asp:Label>
                        </td>
                        <td>
                            <asp:TextBox ID="textBoxMemo" runat="server" TextMode="MultiLine" CssClass="allinput1"></asp:TextBox>
                            <asp:Label ID="Label4" runat="server" ForeColor="red" Text="*"></asp:Label>
                            <asp:RequiredFieldValidator ID="RequiredFieldValidatortextBoxMemo" runat="server"
                                ControlToValidate="textBoxMemo" ErrorMessage="该值不能为空 " Display="Dynamic"></asp:RequiredFieldValidator>
                            <asp:RegularExpressionValidator ID="RegularExpressionValidatortextBoxMemo" runat="server"
                                ControlToValidate="textBoxMemo" Display="Dynamic" ErrorMessage="最多50个字符" ValidationExpression="^[\s\S]{0,200}$"></asp:RegularExpressionValidator>
                        </td>
                    </tr>
                    <tr>
                        <td align="right">
                            <asp:Label ID="lblIsShow" runat="server" Text="是否前台显示："></asp:Label>
                        </td>
                        <td>
                            <asp:CheckBox ID="CheckBoxIsShow" runat="server" Checked="True" Text="是" />
                        </td>
                    </tr><tr style="background-color: rgb(238, 238, 238);">
<td align="right">  </td><td><div class="bottomLine">
        <asp:Button ID="ButtonConfirm" runat="server" Text="确定" CssClass="bnt1" OnClick="ButtonConfirm_Click" />
        <input id="Reset1" type="reset" value="重置" class="bnt1" /><asp:Button ID="Button1"
            runat="server" CssClass="bt3 cancel" PostBackUrl="ProduceLink_List.aspx"
            Text="返回列表" CausesValidation="false" />
        <China315:MessageShow ID="MessageShow" Visible="false" runat="server" />
    </div></td></tr> 
                </table>
           
            <asp:HiddenField ID="hiddenFieldGuid" runat="server" Value="0" />
      
    </div>
    
    </form>
</body>
</html>
