punbb/userlist.php
changeset 4 eb9ed4c366d0
parent 2 a8a21e1c7afa
equal deleted inserted replaced
3:c0c445d4a13e 4:eb9ed4c366d0
   155 		</thead>
   155 		</thead>
   156 		<tbody>
   156 		<tbody>
   157 <?php
   157 <?php
   158 
   158 
   159 // Grab the users
   159 // Grab the users
   160 $result = $pun_db->query('SELECT u.id, eu.username, u.title, u.num_posts, u.registered, g.g_id, g.g_user_title FROM '.$pun_db->prefix.'users AS u LEFT JOIN '.table_prefix.'users AS eu ON eu.user_id=u.id LEFT JOIN '.$pun_db->prefix.'groups AS g ON g.g_id=u.group_id WHERE u.id>1'.(!empty($where_sql) ? ' AND '.implode(' AND ', $where_sql) : '').' ORDER BY '.$sort_by.' '.$sort_dir.' LIMIT '.$start_from.', 50') or error('Unable to fetch user list', __FILE__, __LINE__, $pun_db->error());
   160 $result = $pun_db->query('SELECT u.id, eu.username, u.title, u.num_posts, eu.reg_time AS registered, g.g_id, g.g_user_title FROM '.$pun_db->prefix.'users AS u LEFT JOIN '.table_prefix.'users AS eu ON eu.user_id=u.id LEFT JOIN '.$pun_db->prefix.'groups AS g ON g.g_id=u.group_id WHERE u.id>1'.(!empty($where_sql) ? ' AND '.implode(' AND ', $where_sql) : '').' ORDER BY '.$sort_by.' '.$sort_dir.' LIMIT '.$start_from.', 50') or error('Unable to fetch user list', __FILE__, __LINE__, $pun_db->error());
   161 if ($pun_db->num_rows($result))
   161 if ($pun_db->num_rows($result))
   162 {
   162 {
   163 	while ($user_data = $pun_db->fetch_assoc($result))
   163 	while ($user_data = $pun_db->fetch_assoc($result))
   164 	{
   164 	{
   165 		$user_title_field = get_title($user_data);
   165 		$user_title_field = get_title($user_data);