<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Link_Update.aspx.cs" Inherits="Admin_Link_Update" %>

<!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="../Admin/skin/css.css" rel="stylesheet" type="text/css" />
    <link href="/images/css/inbox.css"rel="stylesheet" type="text/css" />
    <script language=javascript type="text/javascript">
    <!--
    //判断输入的是否为空
    function Yan()
    {
        if(document.getElementById("TextBox2").value=="")
        {
            alert('请输入网站名称');
            return false;
        }
        else if(document.getElementById("TextBox3").value=="")
        {
           alert('请输入连接地址');
           return false;
        }
        
        else if(document.getElementById("TextBox5").value=="")
        {
            alert('请输入排序编号');
            return false;
        }
        else 
        {
            var rad=document.getElementsByName("RadioButtonList1");
            var selectrad;
            for(var i=0;i<rad.length;i++)
            {
                if(rad[i].checked)
                {
                    selectrad=rad[i].value;
                }
            }
            if(selectrad=="1")
            {
                if(document.getElementById("TextBox4").value=="")
                {
                    alert('请输入Logo地址');
                    return false;
                }
            }
            else
            {
                return true;
           }
        }
    }
    //清空已有的值
    function SetNull()
    {
        document.getElementById("TextBox2").value="";
        document.getElementById("TextBox3").value="http://";
        document.getElementById("TextBox5").value="";
        document.getElementById("TextBox4").value="http://";
        document.getElementById("TextBox6").value="";
    }
    -->
    </script>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <table style="width: 98%" class="Ibx_gTable_Con">
            <tr>
                <td align="center" colspan="2" class="bg">
                    &nbsp;添加连接</td>
            </tr>
            <tr>
                <td style="width:10%">
                    连接类别：</td>
                <td style="width:78%">
                    <asp:RadioButtonList ID="RadioButtonList1" runat="server" RepeatDirection="Horizontal">
                        <asp:ListItem Value="false" Selected="True">文字连接</asp:ListItem>
                        <asp:ListItem Value="true">Logo连接</asp:ListItem>
                    </asp:RadioButtonList></td>
            </tr>
            <tr>
                <td>
                    网站名称：</td>
                <td>
                    <asp:TextBox ID="TextBox2" runat="server" Width="253px"></asp:TextBox></td>
            </tr>
            <tr>
                <td>
                    连接地址：</td>
                <td>
                    <asp:TextBox ID="TextBox3" runat="server" Width="253px">http://</asp:TextBox></td>
            </tr>
            <tr>
                <td>
                    Logo地址：</td>
                <td>
                    <asp:TextBox ID="TextBox4" runat="server" Width="394px">http://</asp:TextBox></td>
            </tr>
            <tr>
                <td>
                    连接排序：</td>
                <td>
                    <asp:TextBox ID="TextBox5" runat="server"></asp:TextBox></td>
            </tr>
            <tr>
                <td>
                    网站简介：</td>
                <td>
                    <asp:TextBox ID="TextBox6" runat="server" Height="109px" TextMode="MultiLine" Width="397px"></asp:TextBox></td>
            </tr>
            <tr>
                <td colspan="2">
                    <asp:ImageButton ID="ImageButton1" OnClientClick="return Yan()" runat="server" ImageUrl="~/Admin/skin/images/button_ok.gif" OnClick="ImageButton1_Click" />
                    <img src="skin/images/button_reset.gif" onclick="SetNull()" style="cursor:hand" /></td>
            </tr>
        </table>
    
    </div>
    </form>
</body>
</html>
