Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- session_start();
- if( !isset($_SESSION['webmaster_logged']) ){
- header('Location: login.php');
- }
- include('../includes/configuration.php');
- include('../includes/system-logs.php');
- $connection = mysql_connect($db_host,$db_username,$db_password);
- mysql_select_db($db_scheme);
- $query = "select user_id, user_name, user_lastname, user_email, user_level from wm_user order by user_lastname asc";
- $result = mysql_query($query,$connection);
- $num_rows = mysql_num_rows($result);
- if($num_rows > 0){
- ?>
- <table width="870" border="0" cellpadding="5" cellspacing="0" id="user_list_table" class="tablesorter">
- <thead>
- <tr>
- <th width="24" scope="col"> </th>
- <th width="24" scope="col"> </th>
- <th scope="col">Nombre</th>
- <th scope="col">Apellido</th>
- <th width="200" scope="col">Correo electrónico</th>
- <th width="120" scope="col">Rol</th>
- </tr>
- </thead>
- <tbody>
- <?php
- while( $row = mysql_fetch_array($result) ){
- ?>
- <tr class="item_list">
- <td width="24"><input type="checkbox" name="user<?php echo $row['user_id']; ?>" id="user<?php echo $row['user_id']; ?>" value="<?php echo $row['user_id']; ?>" /></td>
- <td width="24"><a href="#" onclick="javascript:user_edit(<?php echo $row['user_id']; ?>)"><img src="img/icon-edit.gif" width="16" height="16" /></a></td>
- <td><?php echo $row['user_name']; ?></td>
- <td><?php echo $row['user_lastname']; ?></td>
- <td width="200"><?php echo $row['user_email']; ?></td>
- <td width="120"><?php
- switch($row['user_level']){
- case '0':
- echo 'Administrador';
- break;
- case '1':
- echo 'Ventas';
- break;
- case '2':
- echo 'Comunicaciones';
- break;
- }
- ?></td>
- </tr>
- <?php
- }
- ?>
- </tbody>
- </table>
- <?php
- }
- mysql_close($connection);
- ?>
Add Comment
Please, Sign In to add comment