| [ PHPXref.com ] | [ Generated: Sun Jul 20 19:53:33 2008 ] | [ PHP Project 1.17 ] |
| [ Index ] [ Variables ] [ Functions ] [ Classes ] [ Constants ] [ Statistics ] | ||
[Summary view] [Print] [Text view]
1 <?php 2 include ("connect.php"); 3 include ("loggedin.php"); 4 include ("functions.php"); 5 echo '<title>System Users</title></head><body>'; 6 include ("table.php"); 7 8 if (isset($_GET['action'])) 9 { 10 $action = clean($_GET['action']); 11 12 if ($action == 1) 13 { 14 $link = "INSERT INTO users VALUES ('User','','','','','0')"; 15 $res = mysql_query($link) or die(mysql_error()); 16 } 17 else 18 echo "<p>Invalid Action</p>"; 19 } 20 21 echo '<br /><a href="users.php?action=1">create a new user</a><br /><br />'; 22 23 $link = "SELECT * FROM users"; 24 $res = mysql_query($link) or die(mysql_error()); 25 $total = mysql_num_rows($res); 26 27 echo $tablehead . 28 '<tr><td colspan="3" class="heading">users</td></tr> 29 <tr><td>name</td><td>last login</td><td>login ip</td></tr>'; 30 31 32 while ($row = mysql_fetch_assoc($res)) 33 { 34 $name = $row['name']; 35 $date = $row['date']; 36 $ip = $row['ip']; 37 $id = $row['id']; 38 39 //print_r(array_values($row)); die; 40 41 echo '<tr><td><a href="editusers.php?id=' . $id . '">' . $name . '( ' . $id . ' ) </td>' . 42 '<td>' . $date . ' </td><td>' . $ip . ' </td></tr>'; 43 } 44 45 echo '</table>'; 46 echo '<br />total users: ' . $total . '</body></html>'; 47 ?> 48 49 50 51 52 53 54 55 56 57
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
| [ Powered by PHPXref - Served by Debian GNU/Linux ] |