Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- define("IN_MYBB", 1);
- require_once "global.php";
- global $headerinclude, $header, $theme, $footer, $lang;
- $lang->load('modcp');
- $groups = '4,6,3';
- //$userquery = $db->simple_select("users", "uid, usertitle, username, usergroup, avatar, displaygroup", "usergroup IN(4,6)" , array("order_by" => 'uid', "order_dir" => 'ASC'));
- $userquery = $db->query("
- SELECT u.uid, u.username, u.avatar, u.avatardimensions, u.usergroup, u.displaygroup, u.usertitle as customtitle, ug.*
- FROM ".TABLE_PREFIX."users u
- LEFT JOIN ".TABLE_PREFIX."usergroups ug ON (u.usergroup=ug.gid)
- WHERE u.usergroup IN ($groups)
- ORDER BY u.uid ASC
- ");
- if ($db->num_rows($userquery) > 0)
- {
- $usertablerows = "";
- while ($users = $db->fetch_array($userquery))
- {
- $staffuser = array(get_user($users['uid']));
- $users['username'] = format_name($users['username'], $users['usergroup'], $users['displaygroup']);
- $users['profilelink'] = get_profile_link($users['uid']);
- $regdate = my_date($mybb->settings['dateformat'], $users['regdate']);
- $userbar = $user['image'];
- $usertablerows .= '
- <div style="width: 48%; min-height: 120px;float: left; border: 1px #101010 solid; margin: 4px; padding: 2px;">
- <table border="0" cellpadding="5" cellspacing="0" width="100%">
- <tbody><tr>
- <td class="trow1" width="75%">
- <span><strong>'. build_profile_link($users['username'], $users['uid']). '</strong></span></a></strong></span><br>
- <span class="smalltext">
- '.$users['customtitle']. '<br>
- <img src='.$users['image'].'></img><br>
- <span class="smalltext">
- <a href="private.php?action=send&uid='.$users['uid'].'" title="Send this user a private message" class="postbit_pm">PM</a></span><br></span>
- </td>
- <td align="right" valign="middle" width="25%">
- <img height="100" src='.$users['avatar'].'></img>
- </td>
- </tr>
- </tbody></table>
- </div>';
- }
- }
- else
- {
- $usertablerows = '<tr><td class="trow1" colspan="2" align="center">'. "Returned nothing. Something went wrong." .'</td></tr>';
- }
- $template='<html>
- <head>
- <title>'.$pages['name'].'</title>
- {$headerinclude}
- </head>
- <body>
- {$header}
- <table border="0" cellspacing="1" cellpadding="2" class="tborder">
- <tr><td class="thead" colspan="4"><strong>The Staff</strong></td></tr>
- <tr>
- <td>
- {$usertablerows}
- </td>
- </tr>
- </table>
- {$footer}
- </body>
- </html>';
- $template=str_replace("\'", "'", addslashes($template));
- add_breadcrumb($pages['name']);
- eval("\$page=\"".$template."\";");
- output_page($page);
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement