Advertisement
Guest User

whut2

a guest
Jan 6th, 2015
630
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 2.73 KB | None | 0 0
  1. <?php
  2.  
  3. define("IN_MYBB", 1);
  4. require_once "global.php";
  5.  
  6. global $headerinclude, $header, $theme, $footer, $lang;
  7.  
  8.  
  9. $lang->load('modcp');
  10.  
  11. $groups = '4,6,3';
  12. //$userquery = $db->simple_select("users", "uid, usertitle, username, usergroup, avatar, displaygroup", "usergroup IN(4,6)" , array("order_by" => 'uid', "order_dir" => 'ASC'));
  13. $userquery = $db->query("
  14.         SELECT u.uid, u.username, u.avatar, u.avatardimensions, u.usergroup, u.displaygroup, u.usertitle as customtitle, ug.*
  15.         FROM ".TABLE_PREFIX."users u
  16.         LEFT JOIN ".TABLE_PREFIX."usergroups ug ON (u.usergroup=ug.gid)
  17.         WHERE u.usergroup IN ($groups)
  18.         ORDER BY u.uid ASC
  19.     ");
  20.  
  21.  
  22. if ($db->num_rows($userquery) > 0)
  23. {
  24.     $usertablerows = "";
  25.     while ($users = $db->fetch_array($userquery))
  26.     {
  27.                             $staffuser = array(get_user($users['uid']));
  28.                             $users['username'] = format_name($users['username'], $users['usergroup'], $users['displaygroup']);
  29.                             $users['profilelink'] = get_profile_link($users['uid']);
  30.                             $regdate = my_date($mybb->settings['dateformat'], $users['regdate']);
  31.                             $userbar = $user['image'];
  32.                    
  33.                            
  34.                            
  35.                            
  36.                             $usertablerows .= '
  37.    
  38.  
  39. <div style="width: 48%; min-height: 120px;float: left; border: 1px #101010 solid; margin: 4px; padding: 2px;">
  40.                 <table border="0" cellpadding="5" cellspacing="0" width="100%">
  41.                     <tbody><tr>
  42.                         <td class="trow1" width="75%">
  43.                             <span><strong>'. build_profile_link($users['username'], $users['uid']). '</strong></span></a></strong></span><br>
  44.                             <span class="smalltext">
  45.                             '.$users['customtitle']. '<br>
  46.                             <img src='.$users['image'].'></img><br>
  47.                             <span class="smalltext">
  48.                             <a href="private.php?action=send&uid='.$users['uid'].'" title="Send this user a private message" class="postbit_pm">PM</a></span><br></span>
  49.                         </td>
  50.                         <td align="right" valign="middle" width="25%">
  51.                             <img height="100" src='.$users['avatar'].'></img>
  52.            
  53.            
  54.                     </td>
  55.                                          </tr>
  56.                 </tbody></table>
  57.             </div>';
  58.     }
  59. }
  60. else
  61. {
  62.     $usertablerows = '<tr><td class="trow1" colspan="2" align="center">'. "Returned nothing. Something went wrong." .'</td></tr>';
  63. }
  64.  
  65. $template='<html>
  66. <head>
  67. <title>'.$pages['name'].'</title>
  68. {$headerinclude}
  69. </head>
  70. <body>
  71. {$header}
  72. <table border="0" cellspacing="1" cellpadding="2" class="tborder">
  73. <tr><td class="thead" colspan="4"><strong>The Staff</strong></td></tr>
  74. <tr>
  75. <td>
  76. {$usertablerows}
  77. </td>
  78. </tr>
  79.  
  80. </table>
  81. {$footer}
  82. </body>
  83. </html>';
  84.  
  85. $template=str_replace("\'", "'", addslashes($template));
  86.  
  87. add_breadcrumb($pages['name']);
  88.  
  89. eval("\$page=\"".$template."\";");
  90.  
  91. output_page($page);
  92.  
  93. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement