<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="NewItem.aspx.cs" Inherits="KZS.Web.Manage.Setting.NewItem" %>

<!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>
    <script src="/Common/ajax.js" type="text/javascript"></script>
    <script src="/Common/jquery-1.7.1.min.js" type="text/javascript"></script>
    <link href="../Template/Images/global.css" rel="stylesheet" type="text/css" />
    <script language="JavaScript" type="text/javascript">
        var oldcolor = '#000000';

        function func_body() {
            func_Art_ClassType();
            func_Pro_ClassType();
        }

        function func_Art_ClassType() {
            document.getElementById('div_Art_ClassType').style.display = 'block';
            document.getElementById('div_Art_List').style.display = 'none';
            document.getElementById('div_Art_Seach').style.display = 'none';
            document.getElementById('a1').style.color = 'Red';
            document.getElementById('a2').style.color = oldcolor;
            document.getElementById('a3').style.color = oldcolor;
        }
        function func_Art_List() {

            document.getElementById('div_Art_List').style.display = 'block';
            document.getElementById('div_Art_ClassType').style.display = 'none';
            document.getElementById('div_Art_Seach').style.display = 'none';
            document.getElementById('a2').style.color = 'Red';
            document.getElementById('a1').style.color = oldcolor;
            document.getElementById('a3').style.color = oldcolor;
        }
        function func_Art_Seach() {
            document.getElementById('div_Art_Seach').style.display = 'block';
            document.getElementById('div_Art_List').style.display = 'none';
            document.getElementById('div_Art_ClassType').style.display = 'none';
            document.getElementById('a3').style.color = 'Red';
            document.getElementById('a1').style.color = oldcolor;
            document.getElementById('a2').style.color = oldcolor;
            func_Pro_ClassType();
        }
        function func_Pro_ClassType() {
            document.getElementById('div_Pro_ClassType').style.display = 'block';
            document.getElementById('div_Pro_List').style.display = 'none';
            document.getElementById('div_Pro_Seach').style.display = 'none';
            document.getElementById('b1').style.color = 'Red';
            document.getElementById('b2').style.color = oldcolor;
            document.getElementById('b3').style.color = oldcolor;
        }
        function func_Pro_List() {

            document.getElementById('div_Pro_List').style.display = 'block';
            document.getElementById('div_Pro_ClassType').style.display = 'none';
            document.getElementById('div_Pro_Seach').style.display = 'none';
            document.getElementById('b2').style.color = 'Red';
            document.getElementById('b1').style.color = oldcolor;
            document.getElementById('b3').style.color = oldcolor;
        }
        function func_Pro_Seach() {
            document.getElementById('div_Pro_Seach').style.display = 'block';
            document.getElementById('div_Pro_List').style.display = 'none';
            document.getElementById('div_Pro_ClassType').style.display = 'none';
            document.getElementById('b3').style.color = 'Red';
            document.getElementById('b1').style.color = oldcolor;
            document.getElementById('b2').style.color = oldcolor;
            func_Art_ClassType();
        }
        function del() {
            if (confirm("真的要删除这条记录吗？删除后将无法恢复！")) {
                return true;
            }
            else {
                return false;
            }
        }
        function allcheck(input1, input2, input3) {
            var objForm = document.forms[input1];
            var objLen = objForm.length;

            for (var iCount = 0; iCount < objLen; iCount++) {
                if (input2.checked == true) {
                    if (objForm.elements[iCount].type == "checkbox" && objForm.elements[iCount].name != 'ckb_all_Art' && objForm.elements[iCount].name != 'ckb_all_Pro') {
                        objForm.elements[iCount].checked = true;

                    }
                }
                else {
                    if (objForm.elements[iCount].type == "checkbox" && objForm.elements[iCount].name != 'ckb_all_Art' && objForm.elements[iCount].name != 'ckb_all_Pro') {
                        objForm.elements[iCount].checked = false;
                    }
                }
            }
        }
        function allcheck_radio(str) {
            if (str.checked == true)
                alert('你已全选中');
        }
    </script>
</head>
<body>
    <div id="topitem">
    </div>
    <form id="form1" runat="server">
    <div id="div_main">
        <div id="div_left" style="width: 40%; float: left;">
            <table border="1" width="99%" class="lsttab" style="border-collapse: collapse" bordercolor="#C0C0C0">
                <tr class="tit talc">
                    <td align="center">
                        【自定义链接】
                    </td>
                </tr>
                <tr>
                    <td>
                        栏目名称：<input type="text" name="txt_URL" />
                    </td>
                </tr>
                <tr>
                    <td>
                        栏目链接：<input type="text" name="OutLinkUrl" style="width: 70%;" value="http://" />
                    </td>
                </tr>
                <tr class="Pager">
                    <td>
                        <input type="submit" onclick="form1.action='NewItem.aspx?Action=Url_Add'" value="添加" />
                    </td>
                </tr>
            </table>
            <br />
            <br />
            <table border="1" width="99%" class="lsttab" style="border-collapse: collapse" bordercolor="#C0C0C0">
                <tr class="tit talc">
                    <td align="center">
                        【文章栏目添加】
                    </td>
                </tr>
                <tr class="Pager">
                    <td>
                        <a id="a1" href="#" onclick="func_Art_ClassType()">分类</a> <a id="a2" href="#" onclick="func_Art_List()">
                            文章</a> <a id="a3" href="#" onclick="func_Art_Seach()">查询</a>
                    </td>
                </tr>
                <tr class="Pager">
                    <td>
                        <b>栏目名称：</b><input type="text" name="ItemName" size="20" />
                    </td>
                </tr>
                <tr class="Pager">
                    <td align="left">
                        <div id="div_Art_ClassType" style="width: 100%" runat="server">
                            <span class="l mr8">
                                <input type="checkbox" name="ckb_all_Art" value="0" onclick="allcheck_radio(this);" />全部分类
                            </span>
                            <br />
                            <br />
                            <%=Art_Type %>
                            <br />
                            <table width="100%" class="lsttab" style="border-collapse: collapse" bordercolor="#C0C0C0">
                                <tr>
                                    <td>
                                        <span>
                                            <input type="submit" onclick="form1.action='NewItem.aspx?Action=Art_Add_Type'" value="添加" />
                                        </span><span style="color: Red;">（提示：添加之前请先填写栏目名称！）</span>
                                    </td>
                                </tr>
                            </table>
                        </div>
                        <div id="div_Art_List" style="width: 100%" runat="server">
                            <%=Art_List %>
                            <label id="Pager" class="Pager" runat="server">
                            </label>
                            <br />
                            <table width="100%" class="lsttab" style="border-collapse: collapse" bordercolor="#C0C0C0">
                                <tr>
                                    <td>
                                        <span style="float: left;">
                                            <input type="submit" onclick="form1.action='NewItem.aspx?Action=Art_Add_List'" value="添加" />
                                        </span><span style="color: Red;">（提示：添加之前请先填写栏目名称！）</span>
                                    </td>
                                </tr>
                            </table>
                        </div>
                        <div id="div_Art_Seach" runat="server">
                            <span class="l mr8">条件搜索：<input type="text" id="txt_seach" name="txt_seach" /></span>
                            <span class="l">
                                <input type="submit" name="seach" onclick="form1.action='NewItem.aspx?Action=Art_Seach'"
                                    value="搜索" />
                            </span>
                            <br />
                            <br />
                            <p>
                                <%=Art_Seach %></p>
                            <br />
                            <table width="100%" class="lsttab" style="border-collapse: collapse" bordercolor="#C0C0C0">
                                <tr>
                                    <td>
                                        <span style="float: left;">
                                            <input type="submit" name="add_art" onclick="form1.action='NewItem.aspx?Action=Art_Add_Seach'"
                                                value="添加" />
                                        </span><span style="color: Red;">（提示：添加之前请先填写栏目名称！）</span>
                                    </td>
                                </tr>
                            </table>
                        </div>
                    </td>
                </tr>
            </table>
            <br />
            <br />
            <table border="1" width="99%" class="lsttab" style="border-collapse: collapse" bordercolor="#C0C0C0">
                <tr class="tit talc">
                    <td align="center">
                        【产品栏目添加】
                    </td>
                </tr>
                <tr class="Pager">
                    <td>
                        <a id="b1" href="#" onclick="func_Pro_ClassType()">分类</a> <a id="b2" href="#" onclick="func_Pro_List()">
                            产品</a> <a id="b3" href="#" onclick="func_Pro_Seach()">查询</a>
                    </td>
                </tr>
                <tr class="Pager">
                    <td>
                        <b>栏目名称：</b><input type="text" name="ItemName_Pro" size="20" />
                    </td>
                </tr>
                <tr class="Pager">
                    <td align="left">
                        <div id="div_Pro_ClassType" style="width: 100%" runat="server">
                            <span class="l mr8">
                                <input type="checkbox" name="ckb_all_Pro" value="0" onclick="allcheck_radio(this);" />全部分类
                            </span>
                            <br />
                            <br />
                            <%=Pro_Type%>
                            <br />
                            <table width="100%" class="lsttab" style="border-collapse: collapse" bordercolor="#C0C0C0">
                                <tr>
                                    <td>
                                        <span>
                                            <input type="submit" onclick="form1.action='NewItem.aspx?Action=Pro_Add_Type'" value="添加" />
                                        </span><span style="color: Red;">（提示：添加之前请先填写栏目名称！）</span>
                                    </td>
                                </tr>
                            </table>
                        </div>
                        <div id="div_Pro_List" style="width: 100%" runat="server">
                            <%=Pro_List %>
                            <label id="Pager_Pro" class="Pager" runat="server">
                            </label>
                            <br />
                            <table width="100%" class="lsttab" style="border-collapse: collapse" bordercolor="#C0C0C0">
                                <tr>
                                    <td>
                                        <span style="float: left;">
                                            <input type="submit" onclick="form1.action='NewItem.aspx?Action=Pro_Add_List'" value="添加" />
                                        </span><span style="color: Red;">（提示：添加之前请先填写栏目名称！）</span>
                                    </td>
                                </tr>
                            </table>
                        </div>
                        <div id="div_Pro_Seach" runat="server">
                            <span class="l mr8">条件搜索：<input type="text" id="txt_seach_Pro" name="txt_seach_Pro" /></span>
                            <span class="l">
                                <input type="submit" name="seach" onclick="form1.action='NewItem.aspx?Action=Pro_Seach'"
                                    value="搜索" />
                            </span>
                            <br />
                            <br />
                            <p>
                                <%=Pro_Seach%></p>
                            <br />
                            <table width="100%" class="lsttab" style="border-collapse: collapse" bordercolor="#C0C0C0">
                                <tr>
                                    <td>  
                                        <span style="float: left;">
                                            <input type="submit" name="add_Pro" onclick="form1.action='NewItem.aspx?Action=Pro_Add_Seach'"
                                                value="添加" />
                                        </span><span style="color: Red;">（提示：添加之前请先填写栏目名称！）</span>
                                    </td>
                                </tr>
                            </table>
                        </div>
                    </td>
                </tr>
            </table>
            <br />
            <br />
            <table border="1" width="99%" class="lsttab" style="border-collapse: collapse" bordercolor="#C0C0C0">
                <tr class="tit talc">
                    <td align="center">
                        【下载栏目添加】
                    </td>
                </tr>
                <tr>
                    <td>
                        <b>栏目名称：</b><input type="text" name="txt_Down" />
                    </td>
                </tr>
                <tr>
                    <td>
                    <span class="l mr8">
                                <input type="checkbox" name="ckb_all_down" value="0" onclick="allcheck_radio(this);" />全部分类
                            </span>
                            <br />
                            <br />
                        <%=Down_Type%>
                    </td>
                </tr>
                <tr class="Pager">
                    <td>
                        <input type="submit" onclick="form1.action='NewItem.aspx?Action=Down_Add'" value="添加" /> <span style="color: Red;">（提示：添加之前请先填写栏目名称！）</span>
                    </td>
                </tr>
            </table>
        </div>
        <div id="div_right" style="width: 50%; float: right;">
            <table border="1" width="85%" class="lsttab" style="border-collapse: collapse" bordercolor="#C0C0C0">
                <tr class="tit talc">
                    <td colspan="7" align="center">
                        已设置好的栏目
                    </td>
                </tr>
                <tr align="center">
                    <td align="center"  style="display:none">
                        <input id="chkAllCheck" type="checkbox" onclick="allcheck('form1',this);" checked/>
                    </td>
                    <td style="width:220px;">
                        栏目名称
                    </td> 
                    <td align="center" >
                        排序
                    </td>
                    <td align="center" >
                        操作
                    </td>
                </tr>
                <%=GetItem() %>
                <tr class="Pager">
                    <td colspan="7">
                        <input type="submit" name="sa" onclick="form1.action='NewItem.aspx?Action=SaveAll'"
                            value="批量保存" />
                    </td>
                </tr>
            </table>
        </div>
    </div>
    <div id="bodyui_script" runat="server"></div>
    <div id="ui_script" runat="server"></div>
    </form>
</body>
</html>
