<%@ Page Language="C#" AutoEventWireup="true" Codebehind="index.aspx.cs" Inherits="JuSNS.Web.system.app.index" %>

<!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>
    <title id="ptitle" runat="server">应用管理</title>
    <link href="../images/css/style.css" rel="stylesheet" type="text/css" />

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

    <script language="javascript" type="text/javascript" src="../../js/public.js"></script>
<style type="text/css">
.current{color:red;}
</style>
</head>
<body>
    <table width="99%" border="0" align="center" cellpadding="5" cellspacing="1">
        <tr>
            <td width="120" align="center" valign="top">
                <div class="menu">
                    <ul>
                        <%=this.GetSystemMenu(sort)%>
                    </ul>
                </div>
            </td>
            <td valign="top">
                <div class="navip">
                    <span class="Blue">
                    <a href="index.aspx">应用管理</a>
                    <a href="devrequest.aspx">开发者申请</a>
                     </span>
                </div>
                <div id="ClassList" style="padding: 6px 8px 0px 8px;">
                    <asp:Repeater ID="apptypelist" runat="Server">
                        <ItemTemplate>
                            <a href="?c=<%# Eval("type") %>">
                                <span class="<%# Eval("typeclass") %>"><%# Eval("typestr")%></span>
                            </a>&nbsp;
                        </ItemTemplate>
                    </asp:Repeater>
                </div>
                <div style="padding: 6px 8px 0px 8px;">
                    <div id="giftClass" runat="server">
                    </div>
                    <form id="form1" runat="server">
                        <asp:Repeater runat="server" ID="rpt">
                            <HeaderTemplate>
                                <table width="100%" border="0" cellpadding="3" cellspacing="1" class="maintable">
                                    <tr class="maintablehead">
                                        <td style="width: 5%;">
                                            编号</td>
                                        <td align="center" style="width: 25%;">
                                            应用名称</td>
                                        <td align="center" style="width: 8%;">
                                            作者</td>
                                        <td align="center" style="width: 20%;">
                                            创建时间</td>
                                        <td align="center" style="width: 10%;">
                                            分类</td>
                                        <td align="center" style="width: 10%;">
                                            状态</td>
                                        <td align="center" style="width: 22%;">
                                            操作</td>
                                    </tr>
                            </HeaderTemplate>
                            <ItemTemplate>
                                <tr class="maintablelist">
                                    <td>
                                        <%# Eval("AppID") %>
                                    </td>
                                    <td align="center">
                                        <a href="appmore.aspx?id=<%# Eval("AppID") %>"><%# Eval("AppName") %></a>
                                    </td>
                                    <td align="center">
                                        <a href="../../user/?r=<%# Eval("UserID") %>"><%# GetUserName(Eval("UserID"))%></a>
                                    </td>
                                    <td align="center">
                                        <%# Convert.ToDateTime(Eval("CreationTime")).ToString("yyyy-MM-dd")%>
                                    </td>
                                    <td align="center"><%# Eval("Type")%></td>
                                    <td align="center"><%# lockState(Eval("IsLock"), Eval("toadmin"))%></td>
                                    <td align="center">                                        
                                        <a href="javascript:Lock(<%# Eval("AppID")%>,1);">锁定</a>
                                        <%# iSState(Eval("AppID"), Eval("toadmin"))%>
                                        | <a href="javascript:del(<%# Eval("AppID")%>);">删除</a>
                                    </td>
                                </tr>
                            </ItemTemplate>
                            <FooterTemplate>
                                </table>
                            </FooterTemplate>
                        </asp:Repeater>
                        <div class="pagination" runat="server" id="DivPage" align="center" visible="false">
                        </div></form>
                        <br />
                        <table width="100%" border="0" cellpadding="3" cellspacing="1">
                        <tr class="maintablepage">
                            <td>
                                <div align="center">
                                    输入应用名称获描述
                                    <input name="Key" type="text" id="Key" /><input type="button" name="Button1" value=" 搜索 "
                                        id="Button1" class="f-button" onclick="sear()" /></div>
                            </td>
                        </tr>
                    </table>
                    
                </div>
            </td>
        </tr>
    </table>
</body>
</html>

<script language="javascript" type="text/javascript">
function sear()
{
        window.location.href="index.aspx?key="+escape(document.getElementById("Key").value);
}
function del(id)
{
    if(confirm('你确认删除此应用吗?'))
        self.location="?page=<%# Request.QueryString["Page"] %>&Type=del&id="+id;
}
function Lock(id,value)
{
    if(confirm('你确认锁定、解锁此应用吗?'))
        self.location="?page=<%# Request.QueryString["Page"] %>&Type=Lock&id="+id+"&value="+value;
}
</script>

