<%@ page language="C#" autoeventwireup="true" inherits="space_blog_class, ZKCMS" enableviewstatemac="false" enableEventValidation="false" viewStateEncryptionMode="Never" %>

<%@ Register TagPrefix="UC" TagName="meta" Src="~/space/meta.ascx" %>
<%@ Register TagPrefix="UC" TagName="topbar" Src="~/space/topbar.ascx" %>
<%@ Register TagPrefix="UC" TagName="head" Src="~/space/head.ascx" %>
<%@ Register TagPrefix="UC" TagName="side" Src="~/space/side.ascx" %>
<%@ Register TagPrefix="UC" TagName="foot" Src="~/space/foot.ascx" %>
<!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">
    <UC:meta ID="meta1" runat="server" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /></head>
<body>
    <form id="form1" runat="server" autocomplete="off">
    <div class="wrap">
        <UC:topbar ID="topbar1" runat="server" />
        <div class="box">
            <UC:head ID="head1" runat="server" />
            <div class="main">
                <div class="hto">
                    <div class="left">
                        <UC:side ID="side1" runat="server" />
                    </div>
                    <div class="right">
                        <div class="c">
                            <div class="b">
                                <div class="fl">
                                    日志分类</div>
                                <div class="fr">
                                    <a href="blog_do.aspx?uid=<%=ZK.uid %>">写日志</a>
                                </div>
                                <div class="clear">
                                </div>
                            </div>
                            <div class="v">
                                <style type="text/css">
                                    .self_x1
                                    {
                                        padding: 20px;
                                    }
                                    .self_x1 table
                                    {
                                        background-color: #ebebeb;
                                    }
                                    .self_x1 td
                                    {
                                        padding: 10px;
                                        background-color: #fff;
                                    }
                                </style>

                                <script type="text/javascript">
                                function check1(){
                                if(document.getElementById("n").value==""||document.getElementById("n").value=="请输入新分类名称"){alert("请输入新分类名称！");return false;}
                                document.getElementById("Button1").style.display="none";document.getElementById("Button2").style.display="";
                                }
                                function blog_class_save(obj1){
                                if(document.getElementById(obj1).value!="")   {         
var url=location.href;if(url.indexOf("#")!=-1)url=url.substring(0,url.lastIndexOf("#"));
ajax("get","blog_class.aspx?act=ajax&id="+obj1.substring(1)+"&value="+base64en(document.getElementById(obj1).value)+"&rd="+Math.random(),"",function OnHandler(){if(xmlHttp.readyState == 4){if(xmlHttp.responseText=='ok'){alert('修改成功！');}else if(xmlHttp.responseText=='err'){alert('修改失败！');}else if(xmlHttp.responseText=='safe'){alert('禁止输入危险字符！');}}});
}else alert("请输入！");
                                }
                                </script>

                                <div class="self_x1">
                                    <asp:HiddenField ID="ReturnUrl" runat="server" />
                                    <asp:Repeater ID="Repeater1" runat="server">
                                        <HeaderTemplate>
                                            <table border="0" cellpadding="0" cellspacing="1" width="100%">
                                        </HeaderTemplate>
                                        <ItemTemplate>
                                            <tr>
                                                <td width="50%">
                                                    <input type="text" id="n<%#Eval("id") %>" class="inp2" value="<%#Eval("n") %>" maxlength="10"
                                                        style="width: 200px" onkeyup="replaceCharLegal(this,this.value,1)" onblur="replaceCharLegal(this,this.value,0)" autocomplete="off" />&nbsp;&nbsp;<input
                                                            type="button" value="修改分类" class="but1" onclick="blog_class_save('n<%#Eval("id") %>')" />&nbsp;&nbsp;<input
                                                                type="button" value="返回" class="but1" onclick="window.location=ReturnUrl.value" />
                                                </td>
                                            </tr>
                                        </ItemTemplate>
                                        <FooterTemplate>
                                            </table></FooterTemplate>
                                    </asp:Repeater>
                                </div>
                                <div style="margin-bottom: 20px">
                                    <table border="0" cellpadding="0" cellspacing="0" class="wto">
                                        <tr>
                                            <td>
                                                <asp:TextBox ID="n" runat="server" CssClass="inp2" Width="200" MaxLength="10" Text="请输入新分类名称"
                                                    onfocus="if(this.value=='请输入新分类名称')this.value=''" onkeyup="replaceCharLegal(this,this.value,1)"
                                                    onblur="replaceCharLegal(this,this.value,0)"></asp:TextBox>&nbsp;&nbsp;<asp:Button
                                                        ID="Button1" runat="server" Text="添加分类" CssClass="but1" OnClick="Button1_OnClick"
                                                        OnClientClick="return check1()" /><input type="button" id="Button2" value="提交中" class="but1" style="display:none" />
                                            </td>
                                        </tr>
                                    </table>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="clear">
                    </div>
                </div>
            </div>
            <UC:foot ID="foot1" runat="server" />
        </div>
    </div>
    </form>
</body>
</html>
