<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true"
    CodeFile="DefaultAdmin.aspx.cs" Inherits="admin_DefaultAdmin" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="sinistra" runat="Server">
    <asp:LoginStatus ID="LoginStatus1" runat="server" />
    <br />
    <br />
    <br />
    <asp:GridView ID="GridView1" runat="server" AllowPaging="True" AllowSorting="True"
        AutoGenerateColumns="False" BackColor="LightGoldenrodYellow" BorderColor="Tan"
        BorderWidth="1px" CellPadding="2" DataSourceID="AccessDataSource1" EnableModelValidation="True"
        ForeColor="Black" GridLines="None">
        <AlternatingRowStyle BackColor="PaleGoldenrod" />
        <Columns>
            <asp:BoundField DataField="UserId" HeaderText="UserId" SortExpression="UserId" />
            <asp:BoundField DataField="UserName" HeaderText="UserName" SortExpression="UserName" />
        </Columns>
        <FooterStyle BackColor="Tan" />
        <HeaderStyle BackColor="Tan" Font-Bold="True" />
        <PagerStyle BackColor="PaleGoldenrod" ForeColor="DarkSlateBlue" HorizontalAlign="Center" />
        <SelectedRowStyle BackColor="DarkSlateBlue" ForeColor="GhostWhite" />
    </asp:GridView>
    </asp:DataList>
    <asp:AccessDataSource ID="AccessDataSource1" runat="server" DataFile="~/App_Data/ASPNetDB.mdb"
        SelectCommand="SELECT [UserId], [UserName] FROM [vw_aspnet_MembershipUsers]">
    </asp:AccessDataSource><br /><br /><br />
    <asp:Button ID="mypage" runat="server" Text="mypage" 
        Height="40px" onclick="mypage_Click" Width="109px" BorderColor="#33CC33" />
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="destra" runat="Server">
    ID User:
    <asp:TextBox ID="id" runat="server" Width="90px" ></asp:TextBox>

    

    <asp:Button ID="stats" runat="server" Text="Stats" OnClick="stats_Click"
        Width="90px" BorderColor="#33CC33" />
        <asp:Image ID="Image3" runat="server" ImageUrl="~/images/upg.gif" 
        style="margin-left: 98px" />
    
    
    <br /><asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" ControlToValidate="id"
ErrorMessage="Please Enter Only Numbers" ValidationExpression="^\d+$" ValidationGroup="check"></asp:RegularExpressionValidator>
    <br />
    <br />
    <br />
    <asp:Button ID="AddAdmin" runat="server" Text="AddAdmin" OnClick="AddAdmin_Click"
        Width="90px" BorderColor="#FF0066" />
    <asp:Button ID="remadmin" runat="server" Text="RemAdmin" OnClick="remadmin_Click"
        Width="90px" BorderColor="#0066FF" />
    <asp:Button ID="delete" runat="server" Text="!!! Delete !!!" 
        OnClick="delete_Click" Width="90px" BorderColor="Red" />
    <br />
    <br />
    
    <asp:Button ID="ShowStreams" runat="server" Text="ShowStream" Width="90px" 
        onclick="ShowStream_Click" BorderColor="#CCFF66" />
    <br />
    <asp:Image ID="darth" runat="server" Height="159px" 
        ImageUrl="~/images/darth.jpg" Visible="False" Width="347px" />
    <br />
    <asp:Label ID="Label1" runat="server"></asp:Label>
    <br />
    <br />
    <asp:DetailsView ID="DetailsView2" runat="server" Height="50px" Width="125px" AutoGenerateRows="False"
        BackColor="#DEBA84" BorderColor="#DEBA84" BorderStyle="None" BorderWidth="1px"
        CellPadding="3" CellSpacing="2" DataSourceID="AccessDataSource2" EnableModelValidation="True"
        Visible="False">
        <EditRowStyle BackColor="#738A9C" Font-Bold="True" ForeColor="White" />
        <Fields>
            <asp:BoundField DataField="UserId" HeaderText="UserId" SortExpression="UserId" />
            <asp:BoundField DataField="UserName" HeaderText="UserName" SortExpression="UserName" />
            <asp:BoundField DataField="RoleName" HeaderText="RoleName" 
                SortExpression="RoleName" />
            <asp:BoundField DataField="IP" HeaderText="IP" SortExpression="IP" />
            <asp:BoundField DataField="Email" HeaderText="Email" SortExpression="Email" />
            <asp:BoundField DataField="PasswordMD5" HeaderText="PasswordMD5" SortExpression="PasswordMD5" />
            <asp:BoundField DataField="PasswordFormat" HeaderText="PasswordFormat" SortExpression="PasswordFormat" />
            <asp:BoundField DataField="MobilePIN" HeaderText="MobilePIN" SortExpression="MobilePIN" />
            <asp:BoundField DataField="PasswordQuestion" HeaderText="PasswordQuestion" SortExpression="PasswordQuestion" />
            <asp:BoundField DataField="PasswordAnswer" HeaderText="PasswordAnswer" SortExpression="PasswordAnswer" />
            <asp:CheckBoxField DataField="IsApproved" HeaderText="IsApproved" SortExpression="IsApproved" />
            <asp:BoundField DataField="CreateDate" HeaderText="CreateDate" SortExpression="CreateDate" />
            <asp:BoundField DataField="LastLoginDate" HeaderText="LastLoginDate" SortExpression="LastLoginDate" />
            <asp:BoundField DataField="LastPasswordChangedDate" HeaderText="LastPasswordChangedDate"
                SortExpression="LastPasswordChangedDate" />
            <asp:BoundField DataField="Comment" HeaderText="Comment" SortExpression="Comment" />
            <asp:BoundField DataField="ApplicationId" HeaderText="ApplicationId" SortExpression="ApplicationId" />
            <asp:BoundField DataField="MobileAlias" HeaderText="MobileAlias" SortExpression="MobileAlias" />
            <asp:CheckBoxField DataField="IsAnonymous" HeaderText="IsAnonymous" SortExpression="IsAnonymous" />
            <asp:BoundField DataField="LastActivityDate" HeaderText="LastActivityDate" SortExpression="LastActivityDate" />
        </Fields>
        <FooterStyle BackColor="#F7DFB5" ForeColor="#8C4510" />
        <HeaderStyle BackColor="#A55129" Font-Bold="True" ForeColor="White" />
        <PagerStyle ForeColor="#8C4510" HorizontalAlign="Center" />
        <RowStyle BackColor="#FFF7E7" ForeColor="#8C4510" />
    </asp:DetailsView>
    <asp:AccessDataSource ID="AccessDataSource2" runat="server" DataFile="~/App_Data/ASPNetDB.mdb"
        SelectCommand="SELECT * FROM [good] WHERE ([UserId] = ?)">
        <SelectParameters>
            <asp:ControlParameter ControlID="id" Name="UserId" PropertyName="Text" Type="Int32" />
        </SelectParameters>
    </asp:AccessDataSource>
    <asp:GridView ID="GridView2" runat="server" AllowPaging="True" 
        AllowSorting="True" AutoGenerateColumns="False" BackColor="White" 
        BorderColor="#E7E7FF" BorderStyle="None" BorderWidth="1px" CellPadding="3" 
        DataKeyNames="id_datastream" DataSourceID="AccessDataSource3" 
        EnableModelValidation="True" GridLines="Horizontal" Visible="False">
        <AlternatingRowStyle BackColor="#F7F7F7" />
        <Columns>
            <asp:BoundField DataField="id_datastream" HeaderText="ID_Stream" 
                InsertVisible="False" ReadOnly="True" SortExpression="id_datastream" />
            <asp:BoundField DataField="reg_time" HeaderText="RegDate" 
                SortExpression="reg_time" />
            <asp:BoundField DataField="description" HeaderText="Descrizione" 
                SortExpression="description" />
        </Columns>
        <FooterStyle BackColor="#B5C7DE" ForeColor="#4A3C8C" />
        <HeaderStyle BackColor="#4A3C8C" Font-Bold="True" ForeColor="#F7F7F7" />
        <PagerStyle BackColor="#E7E7FF" ForeColor="#4A3C8C" HorizontalAlign="Right" />
        <RowStyle BackColor="#E7E7FF" ForeColor="#4A3C8C" />
        <SelectedRowStyle BackColor="#738A9C" Font-Bold="True" ForeColor="#F7F7F7" />
    </asp:GridView>
    <asp:AccessDataSource ID="AccessDataSource3" runat="server" 
        DataFile="~/App_Data/ASPNetDB.mdb" 
        SelectCommand="SELECT datastreams.reg_time, datastreams.id_datastream, datastreams.description FROM (aspnet_Membership INNER JOIN datastreams ON aspnet_Membership.myUserName = datastreams.[user]) WHERE (aspnet_Membership.UserId = ?)">
        <SelectParameters>
            <asp:ControlParameter ControlID="id" Name="?" PropertyName="Text" />
        </SelectParameters>
    </asp:AccessDataSource>
</asp:Content>
