Location: PHPKode > projects > Php4dvd - movie database > php4dvd/tpl/default/users/users.html
<div>
	<h2>User management</h2>
	
	<div id="newuser">
		<form name="loginform" method="POST" onsubmit="if(verify(this)) return true; else alert('Some fields are not filled in correctly!'); return false;">
		<table>
			<tr id="tr_username">
				<td colspan="2" nowrap>			
					<b>New user</b>
				</td>
			</tr>
			<tr id="tr_username">
				<td nowrap>			
					User name:
				</td>
				<td>
					<input type="text" name="username" id="text_username_1" value="{$newuser->username|replace:"\"":"&quot;"}" class="textfield" style="width: 100px;">
				</td>
			</tr>
			<tr id="tr_password">
				<td nowrap>			
					Password:
				</td>
				<td>
					<input type="password" name="password" id="text_password_1" value="" class="textfield" style="width: 100px;">
				</td>
			</tr>
			<tr id="tr_password2">
				<td nowrap>			
					Password (again):
				</td>
				<td>
					<input type="password" name="password2" id="text_password2_0" value="" class="textfield" style="width: 100px;">
				</td>
			</tr>
			<tr id="tr_email">
				<td nowrap>			
					E-mail:
				</td>
				<td>
					<input type="text" name="email" id="email_email_1" value="{$newuser->email|replace:"\"":"&quot;"}" class="textfield" style="width: 200px;">
				</td>
			</tr>
			<tr id="tr_permission">
				<td nowrap>			
					Permissions:
				</td>
				<td>
					<select class="select" name="permission">
						<option value="0"{if $newuser->permission == 0} selected{/if}>Guest (view only)</option>
						<option value="1"{if $newuser->permission == 1} selected{/if}>Editor</option>
						<option value="2"{if $newuser->permission == 2} selected{/if}>Admin</option>
					</select>
					<input type="hidden" name="add" value="0">
					<input type="submit" name="submit" value="add user" class="button">
				</td>
			</tr>
			{if $username_error}
			<tr>
				<td colspan="2" class="inputerror">			
					This username or e-mail address allready exists!
				</td>
			</tr>
			{/if}
		</table>
		</form>
	</div>
	
	<table width="100%">
		<thead>
			<tr>
				<td><b>User name</b></td>
				<td><b>E-mail</b></td>
				<td><b>Permission</b></td>
				<td><b>Last logged in</b></td>
				<td>&nbsp;</td>
			</tr>
		</thead>
		<tbody>
			{section name=u loop=$users}
			<tr>
				<td>
					<a href="./?go=user&id={$users[u]->id}">
					{$users[u]->username}
					</a>
				</td>
				<td>
					<a href="mailto:{$users[u]->email}">
					{$users[u]->email}
					</a>
				</td>
				<td>
					{if $users[u]->permission == 0}Guest (view only){/if}
					{if $users[u]->permission == 1}Editor{/if}
					{if $users[u]->permission == 2}Admin{/if}
				</td>
				<td>
					{$users[u]->lastlogin}
				</td>
				<td width="50" nowrap align="right">
					{if $users[u]->username != "admin"}
					<a href="javascript:deleteUser('{$users[u]->id}');"><img src="{$template_dir}images/design/delete.gif" alt="Remove" title="Remove"></a>
					{else}
					<img src="{$template_dir}images/design/blank.gif" width="16" height="16" alt="" title="">
					{/if}
				</td>
			</tr>
			{/section}
		</tbody>
	</table>
</div>
Return current item: Php4dvd - movie database