<%@ Page Language="vb" AutoEventWireup="false" Codebehind="usersaccounts.aspx.vb" Inherits="HTCOMNET.usersaccounts"%>
<%@ Import Namespace="HTCOMNET.Main" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
	<HEAD>
		<title>Users</title>
		<META content="NOINDEX,NOFOLLOW" name="ROBOTS">
		<META HTTP-EQUIV="PRAGMA" CONTENT="NO-CACHE">
		<meta content="Microsoft Visual Studio .NET 7.1" name="GENERATOR">
		<meta content="Visual Basic .NET 7.1" name="CODE_LANGUAGE">
		<meta content="JavaScript" name="vs_defaultClientScript">
		<meta content="http://schemas.microsoft.com/intellisense/ie5" name="vs_targetSchema">
	</HEAD>
	<body bgcolor="#5a7dde" text="#ffffff">
		<strong><a href="adminpanel.aspx"><font color="#ffffff" size="3" face="Verdana, Arial, Helvetica, sans-serif">
					back to the Admin panel</font></a></strong><BR>
		<div id="NEtFrameworkNotInstalled" runat="server"><font size="3" face="Arial" color="#ffffff"><b>If 
					you see this label then you need to install .NET Framework 1.1 on the server 
					for correct running .ASPX pages. See ReadMe.htm</b></font></div>
		<form id="Form1" runat="server">
			<a href="groupsaccounts.aspx"><img src="images/usgr.gif" width="21" height="26" border="0"></a>&nbsp;<a href="groupsaccounts.aspx"><STRONG><FONT face="Verdana, Arial, Helvetica, sans-serif" color="#33ff99" size="4">View 
						Groups</FONT></STRONG></a>
			<div id="INPUT" runat="server">
				<asp:label id="lblinfo" Font-Bold="True" ForeColor="#ffcc00" Font-Size="18px" Runat="server"
					Text=""></asp:label><BR>
				<BR>
				<asp:panel id="Panel1" Runat="server" BorderWidth="1px" BorderStyle="Ridge" Width="600px" Height="150">
					<STRONG><FONT face="Verdana, Arial, Helvetica, sans-serif" color="#ffffff" size="3">&nbsp;&nbsp;Add 
							new user:</FONT></STRONG><BR>
					<BR>
					<DIV align="center">
						<asp:table id="Table1" runat="server" BorderStyle="Solid" BorderWidth="0px" GridLines="Both"
							cellPadding="5" width="600px">
							<asp:TableRow Runat="server" ID="Tablerow1">
								<asp:TableCell Width="70" ID="UsernameCell" Runat="server">User name:</asp:TableCell>
								<asp:TableCell Runat="server" ID="Tablecell1" name="Tablecell1">
									<asp:TextBox ID="inputname" Runat="server" MaxLength="255" width="150"></asp:TextBox>
								</asp:TableCell>
							</asp:TableRow>
							<asp:TableRow Runat="server" ID="Tablerow4">
								<asp:TableCell Width="70" ID="Tablecell2" Runat="server">Password:</asp:TableCell>
								<asp:TableCell Runat="server" ID="Tablecell3" name="Tablecell1">
									<asp:TextBox ID="inputpassword" Runat="server" MaxLength="255" width="150"></asp:TextBox>
								</asp:TableCell>
							</asp:TableRow>
						</asp:table><BR>
					</DIV>
					<TABLE width="600" border="0">
						<TR>
							<TD width="15" height="50"></TD>
							<TD>
								<asp:Button id="addnewuserbutton" onclick="AddNewUser" Text="Add user" Runat="server" name="Button1"></asp:Button></TD>
						</TR>
					</TABLE>
				</asp:panel><BR>
				<STRONG><FONT face="Verdana, Arial, Helvetica, sans-serif" color="#ffffff" size="3">&nbsp;&nbsp;Current 
						users:</FONT></STRONG>
				<asp:datagrid id="grid" runat="server" BorderWidth="1px" Width="600px" PagerStyle-ForeColor="#000000"
					PagerStyle-Mode="NumericPages" PagerStyle-Font-Size="18px" PagerStyle-Font-Bold="True" OnDeleteCommand="gridusers_DeleteCommand"
					OnUpdateCommand="gridusers_UpdateCommand" OnCancelCommand="gridusers_CancelCommand" OnEditCommand="gridusers_EditCommand"
					OnPageIndexChanged="gridusers_PageIndexChanged" OnSortCommand="gridusers_SortCommand" AllowPaging="True"
					AutoGenerateColumns="False" AllowSorting="True" PageSize="20" BorderColor="Gainsboro" CellPadding="10">
					<Columns>
						<asp:BoundColumn HeaderText="ID #" DataField="id" ReadOnly="True">
							<ItemStyle Width="50px" Font-Size="18px" Font-Bold="True" ForeColor="#FFCC00"></ItemStyle>
						</asp:BoundColumn>
						<asp:TemplateColumn SortExpression="name" HeaderText="User name">
							<ItemStyle Font-Size="18px"></ItemStyle>
							<ItemTemplate>
								<%# Container.DataItem("name") %>
							</ItemTemplate>
							<EditItemTemplate>
								<asp:TextBox Text='<%# Container.DataItem("name") %>' id="txtname" runat=server /><br>
							</EditItemTemplate>
						</asp:TemplateColumn>
						<asp:TemplateColumn SortExpression="password" HeaderText="User password">
							<ItemStyle Font-Size="18px"></ItemStyle>
							<ItemTemplate>
								<%# Container.DataItem("password") %>
							</ItemTemplate>
							<EditItemTemplate>
								<asp:TextBox Text='<%# Container.DataItem("password") %>' id="txtpassword" runat=server /><br>
							</EditItemTemplate>
						</asp:TemplateColumn>
						<asp:EditCommandColumn ButtonType="PushButton" UpdateText="Update" CancelText="Cancel" EditText="Edit"></asp:EditCommandColumn>
						<asp:TemplateColumn>
							<ItemTemplate>
								<asp:Button CommandName="Delete" Runat="server" id="butDelete" Text="Delete this user!" />
							</ItemTemplate>
						</asp:TemplateColumn>
					</Columns>
					<PagerStyle Font-Size="18px" Font-Bold="True" ForeColor="Black" Mode="NumericPages"></PagerStyle>
				</asp:datagrid><br>
				<BR>
				Comment: Database stored in
				<asp:label id="shownUSERSANDGROUPSINFOFILE" Runat="server"></asp:label>
				file.<BR>
				<a href="mailto:sprunsky@http-com.com"><font color="#ffffff">Developer</font></a>
				can modify code for correct work with your own users and folders database!
			</div>
			<div id="ADMININPUT" runat="server">
				<font color="#ff9933"><b>
						<asp:Literal id="WRONGCOMBINATION" runat="server"></asp:Literal></b></font>
				<BR>
				Enter Administrator's name and password<br>
				<br>
				<table width="500" border="0">
					<tr>
						<td width="112">Name:</td>
						<td width="378"><input id="inputadminname" name="name" type="text" runat="server"></td>
					</tr>
					<tr>
						<td>Password:</td>
						<td><input id="inputadminpass" name="password" type="password" runat="server"></td>
					</tr>
				</table>
				<br>
				<asp:Button id="sendnamepass" onclick="CheckAdminNamepass" text="submit" runat="server"></asp:Button>
				<br>
				<br>
				<br>
			</div>
			<asp:literal id="output" Runat="server"></asp:literal></form>
	</body>
</HTML>
