Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
82 lines (73 sloc) 2.63 KB
require 'includes/';
$db = Database::getDatabase();
$q = $_GET['q'];
$_q = $db->escape($q);
$search_sql = " AND (username LIKE '%$_q%' OR email LIKE '%$_q%') ";
$q = '';
$search_sql = '';
$users = DBObject::glob('User', "SELECT * FROM shine_users WHERE 1 = 1 $search_sql ORDER BY username");
<?PHP include('inc/'); ?>
<div id="bd">
<div id="yui-main">
<div class="yui-b"><div class="yui-g">
<div class="block tabs spaces">
<div class="hd">
<li class="active"><a href="users.php">Users</a></li>
<li><a href="user-new.php">Create new user</a></li>
<div class="clear"></div>
<div class="bd">
<?PHP foreach($users as $u) : ?>
<td><?PHP echo $u->username; ?></td>
<td><?PHP echo $u->level; ?></td>
<td><?PHP echo $u->email; ?></td>
<a href="user-edit.php?id=<?PHP echo $u->id; ?>">Edit</a>
<a href="user-edit.php?id=<?PHP echo $u->id; ?>&amp;action=delete" onclick="return confirm('Are you sure?');">Delete</a>
<?PHP endforeach; ?>
<div id="sidebar" class="yui-b">
<div class="block">
<div class="hd">
Search Users
<div class="bd">
<form action="users.php" method="get">
<p><input type="text" name="q" value="<?PHP echo @$q; ?>" id="q" class="text">
<span class="info">Searches Username and Email address.</span></p>
<p><input type="submit" name="btnSearch" value="Search" id="btnSearch"></p>
<?PHP include('inc/'); ?>