<%@ Page Language="C#" AutoEventWireup="true" CodeFile="SystemException.aspx.cs"
    Inherits="Admin_Log_SystemException" EnableViewState="true" %>

<%@ Register Src="../Controls/EditionItem.ascx" TagName="EditionItem" TagPrefix="uc2" %>
<!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="../Stylesheet/Main.css" rel="stylesheet" type="text/css" />

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

</head>
<body>
    <form id="form1" runat="server">
        <div id="toolItem">
            <ul class="tool">
                <li>
                    <div class="tool_back">
                        <a href="javaScript:history.back(-1)">返回上一步</a></div>
                </li>
            </ul>
        </div>
        <div class="main_body">
            <h1>
                系统异常日志管理</h1>
            <div class="divbox2">
                <table width="100%" border="0" cellspacing="0" cellpadding="0">
                    <tr>
                        <td align="left" valign="top">
                            <table width="180" border="0" cellspacing="0" cellpadding="0" style="width: 180px;">
                                <tr>
                                    <td align="left" valign="top">
                                        <asp:Calendar ID="cldDate" runat="server" Width="180px" OnSelectionChanged="cldDate_SelectionChanged"
                                            ShowGridLines="True" OnDayRender="cldDate_DayRender">
                                            <TitleStyle BackColor="#ACE7FF" />
                                        </asp:Calendar>
                                    </td>
                                </tr>
                                <tr>
                                    <td height="30" align="center" valign="bottom" class="font_bold">
                                        日志文件列表
                                    </td>
                                </tr>
                                <tr>
                                    <td height="50" align="left" valign="top">
                                        <div style="height: 500px; overflow-y: scroll;" class="scroll">
                                            <table width="160" border="0" cellspacing="0" cellpadding="0"  style="width: 160px;">
                                                <tr>
                                                    <td align="left" valign="top">
                                                        <table width="160" border="0" align="left" cellpadding="0" cellspacing="0" class="tbbox"
                                                            style="width: 160px;">
                                                            <tr>
                                                                <th width="80%" align="center">
                                                                    文件名
                                                                </th>
                                                            </tr>
                                                            <asp:Repeater ID="rptLogFileList" runat="server" OnItemCommand="rptLogFileList_ItemCommand">
                                                                <ItemTemplate>
                                                                    <asp:Literal ID="litLogFileName" runat="server" Text='<%#Eval("FileName").ToString() + "." + Eval("FileExtName").ToString()%>'
                                                                        Visible="false"></asp:Literal>
                                                                    <tr>
                                                                        <td style="padding:5px;">
                                                                            <asp:CheckBox ID="chkSelect" runat="server" />
                                                                            <%#Eval("FileName") %>
                                                                            .<%#Eval("FileExtName") %> <asp:LinkButton ID="lbtnDel" runat="server" ToolTip="将当前日志文件彻底删除" CommandArgument='<%#Eval("FileName").ToString() + "." + Eval("FileExtName").ToString()%>'
                                                                                CommandName="Delete_Command" OnClientClick="return confirm('确认将当前日志文件彻底删除？')"><img src="../images/icon_sc.gif" border="0" align="absmiddle" /></asp:LinkButton>
                                                                        </td>
                                                                    </tr>
                                                                </ItemTemplate>
                                                            </asp:Repeater>
                                                        </table>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td height="50" align="left" valign="middle">
                                                        <table width="100%" border="0" align="left" cellpadding="0" cellspacing="0" style="width: 160px;">
                                                            <tr>
                                                                <td align="center">
                                                                    <input type="button" id="Button7" value=" 全 选 " onclick="SelectCheckBox(this, 'chkSelect',1)"
                                                                        class="btn_bg2" />
                                                                    <asp:Button ID="btnAllDel" runat="server" Text="彻底删除" CssClass="btn_bg2" OnClick="btnAllDel_Click"
                                                                        OnClientClick="return confirm('确认将当前选中日志文件彻底删除？')" ToolTip="将选中日志文件彻底删除" />
                                                                </td>
                                                            </tr>
                                                        </table>
                                                    </td>
                                                </tr>
                                            </table>
                                        </div>
                                    </td>
                                </tr>
                            </table>
                        </td>
                        <td width="77%" align="left" valign="top">
                            <div class="item">
                                <ul class="item_list">
                                    <li class="item_list_cell_ac margin_left_2px">
                                        <div>
                                            <asp:Literal ID="litTitle" runat="server"></asp:Literal>
                                            系统异常日志列表
                                        </div>
                                    </li>
                                </ul>
                            </div>
                            <div class="ht2">
                            </div>
                            <table width="100%" border="0" cellpadding="0" cellspacing="0" class="tbbox">
                                <tr>
                                    <th width="2%">
                                        序号
                                    </th>
                                    <th width="18%">
                                        时间
                                    </th>
                                    <th width="26%">
                                        页面地址
                                    </th>
                                    <th>
                                        异常信息
                                    </th>
                                    <th width="4%">
                                        操作
                                    </th>
                                </tr>
                                <asp:Repeater ID="rptList" runat="server">
                                    <ItemTemplate>
                                        <tr>
                                            <td align="center">
                                                <%#Container.ItemIndex+1 %>
                                            </td>
                                            <td>
                                                <%#Eval("DateTime") %>
                                            </td>
                                            <td>
                                                <%#Eval("Url")%>
                                            </td>
                                            <td title="<%#Eval("Exception")%>">
                                                <%# SnSee.Tool.StringTool.CutString(Eval("Exception").ToString(), 200, true)%>
                                            </td>
                                            <td align="center">
                                                <a href="SystemExceptionView.aspx?LogFileName=<%=LogFile %>&ID=<%#Eval("ID") %>"
                                                    title="查看当前信息详情">
                                                    <img src="../images/icon_ck.gif" border="0" align="absmiddle" /></a>
                                            </td>
                                        </tr>
                                    </ItemTemplate>
                                </asp:Repeater>
                            </table>
                        </td>
                    </tr>
                </table>
            </div>
            <div class="ht">
            </div>
            <ul class="ac_intro">
                <li class="ac_intro_title">说明：</li>
                <li class="ac_intro_item">1. 系统错误日志的查看及管理。</li>
                <li class="ac_intro_item">2. 日历中加粗日期代表有异常日志。</li>
            </ul>
        </div>
    </form>
</body>
</html>
