Updates to user views to support user auth

这个提交包含在:
Andy Smith 2011-08-19 17:12:59 +01:00
父节点 0de2883468
当前提交 6298763c7f
共有 3 个文件被更改,包括 28 次插入7 次删除

查看文件

@ -1,22 +1,34 @@
<h2>Add user</h2>
<div class="wrap_content user">
<?php if($this->session->flashdata('notice')) { ?>
<div id="message" >
<?php echo $this->session->flashdata('notice'); ?>
</div>
<?php } ?>
<?php echo validation_errors(); ?>
<form method="post" action="<?php echo site_url('user/add'); ?>" name="users">
<table>
<tr>
<td>Username</td>
<td><input type="text" name="user_name" value="<?php if(isset($user_name)) { echo $user_name; } ?>" /></td>
<td><input type="text" name="user_name" value="<?php if(isset($user_name)) { echo $user_name; } ?>" />
<?php if(isset($username_error)) { echo "<div class=\"small error\">".$username_error."</div>"; } ?>
</td>
</tr>
<tr>
<td>E-mail</td>
<td><input type="text" name="user_email" value="<?php if(isset($user_email)) { echo $user_email; } ?>" /></td>
<td><input type="text" name="user_email" value="<?php if(isset($user_email)) { echo $user_email; } ?>" />
<?php if(isset($email_error)) { echo "<div class=\"small error\">".$email_error."</div>"; } ?>
</td>
</tr>
<tr>
<td>Password</td>
<td><input type="password" name="user_password" value="<?php if(isset($user_password)) { echo $user_password; } ?>" /></td>
<td><input type="password" name="user_password" value="<?php if(isset($user_password)) { echo $user_password; } ?>" />
<?php if(isset($password_error)) { echo "<div class=\"small error\">".$password_error."</div>"; } ?>
</td>
</tr>
<tr>

查看文件

@ -6,17 +6,24 @@
<table>
<tr>
<td>Username</td>
<td><input type="text" name="user_name" value="<?php echo $user_name; ?>" /></td>
<td><input type="text" name="user_name" value="<?php if(isset($user_name)) { echo $user_name; } ?>" />
<?php if(isset($username_error)) { echo "<div class=\"small error\">".$username_error."</div>"; } ?>
</td>
</tr>
<tr>
<td>E-mail</td>
<td><input type="text" name="user_email" value="<?php echo $user_email; ?>" /></td>
<td><input type="text" name="user_email" value="<?php if(isset($user_email)) { echo $user_email; } ?>" />
<?php if(isset($email_error)) { echo "<div class=\"small error\">".$email_error."</div>"; } ?>
</td>
</tr>
<tr>
<td>Password</td>
<td><input type="password" name="user_password" /><br><div class="small">Leave blank to keep existing password</div></td>
<td><input type="password" name="user_password" />
<?php if(isset($password_error)) { echo "<div class=\"small error\">".$password_error."</div>"; } else { ?>
<div class="small">Leave blank to keep existing password</div></td>
<?php } ?>
</tr>
<tr>

查看文件

@ -37,6 +37,7 @@
<td>User</td>
<td>E-mail</td>
<td>Type</td>
<td>Options</td>
</tr>
<?php
@ -46,7 +47,8 @@
<?php echo '<tr class="tr'.($i & 1).'">'; ?>
<td><a href="<?php echo site_url('user/edit')."/".$row->user_id; ?>"><?php echo $row->user_name; ?></a></td>
<td><?php echo $row->user_email; ?></td>
<td><?php echo $row->user_type; ?></td>
<td><?php $l = $this->config->item('auth_level'); echo $l[$row->user_type]; ?></td>
<td><a href="<?php echo site_url('user/delete')."/".$row->user_id; ?>">Delete</a></td>
</tr>
<?php $i++; } ?>
</table>