SHOW:
|
|
- or go back to the newest paste.
| 1 | - | require_once(DIR . '/includes/functions_user.php'); |
| 1 | + | // Check for Individual Game ID |
| 2 | - | require_once(DIR . '/includes/functions_misc.php'); |
| 2 | + | |
| 3 | - | require_once('./includes/functions_bigthree.php');
|
| 3 | + | |
| 4 | if ($_GET['mia'] != 1 ) {$mia = false;} else {$mia = true;}
| |
| 5 | - | // Check for Individual Game ID |
| 5 | + | |
| 6 | // Check for Sort By | |
| 7 | $sortby = $_GET['sort']; | |
| 8 | //Check for Sort Order | |
| 9 | $sortorder = $_GET['order']; | |
| 10 | ||
| 11 | // Define Games and Lists // | |
| 12 | $gameslist = array(); | |
| 13 | ||
| 14 | //SETUP $gamelist[] = array("Game Name","urlshortcode","Name of In-Game Name or Account", "field# for that profile field", # (list alphabetical, change numbers to they are in order from 0, # of fields (usually 5));
| |
| 15 | ||
| 16 | $gameslist[] = array("Counter Strike: Global Offensive (EU)", "csgoeu", "Steam ID", "field8", 0, 5);
| |
| 17 | $gameslist[] = array("Counter Strike: Global Offensive (NA)", "csgona", "Steam ID", "field8", 1, 5);
| |
| 18 | $gameslist[] = array("League of Legends (EUNE)", "loleune", "Summoner Name", "field12", 2, 5);
| |
| 19 | $gameslist[] = array("League of Legends (EUW)", "loleuw", "Summoner Name", "field31", 3, 5);
| |
| 20 | $gameslist[] = array("League of Legends (NA)", "lolna", "Summoner Name", "field32", 4, 5);
| |
| 21 | $gameslist[] = array("Minecraft", "mc", "Username", "field14", 5, 5);
| |
| 22 | $gameslist[] = array("Smite", "smite", "Smite Account", "field22", 6, 5);
| |
| 23 | $gameslist[] = array("TERA (NA)", "terana", "Main Character(s)", "field39", 7, 5);
| |
| 24 | $gameslist[] = array("Other Game", "other", "", "", 8, 4);
| |
| 25 | ||
| 26 | // ADD the # from the 5th spot in the game array to the appropriate category. | |
| 27 | $fulldiv = array(2,3,6); | |
| 28 | $guild = array(); | |
| 29 | $gamegroup = array(); | |
| 30 | $devdiv = array(0,1,4,5,7); | |
| 31 | $devonly = array(8); | |
| 32 | ||
| 33 | echo "<!-- Start Forum tcat Heading PureVB --> | |
| 34 | <div class='tcat'> | |
| 35 | <div class='tcatLeft'> | |
| 36 | <div class='tcatRight foruminfo L1 collapse'> | |
| 37 | <h2> <span class='forumtitle'>Clan Rosters</span> </h2> | |
| 38 | </div> | |
| 39 | </div> | |
| 40 | </div> | |
| 41 | <div class='clearfix'></div> | |
| 42 | <div class='forumBitBoxTB'> | |
| 43 | <div class='forumbitBoxTL'> | |
| 44 | <div class='forumBitBoxTR'> | |
| 45 | <div class='forumBitBoxTWrap'></div> | |
| 46 | </div> | |
| 47 | </div> | |
| 48 | </div> | |
| 49 | <div class='forumbitBoxLeft'> | |
| 50 | <div class='forumbitBoxRight'> | |
| 51 | <div class='forumbitBox'> | |
| 52 | <blockquote class='postcontent restore '> | |
| 53 | <div class='blockbody'> | |
| 54 | <table width='100%'> | |
| 55 | <tbody> | |
| 56 | <tr> | |
| 57 | <td>"; | |
| 58 | ||
| 59 | // Create Roster Navigation List | |
| 60 | echo "<div id='sidebar_container' class='sidebar_closed'><div class='block smaller' style='width:20%; float:left;'><div class='widget_content blockbody'> | |
| 61 | <table width='100%'> | |
| 62 | <tbody> | |
| 63 | <tr><th class='blocksubhead'>Clan Leadership</th></tr> | |
| 64 | <tr><td> <a href='pages.php?pageid=15'>Clan Leaders</a></td></tr>"; | |
| 65 | ||
| 66 | if (!empty($fulldiv)) {
| |
| 67 | ||
| 68 | echo "<tr><th class='blocksubhead'>Full Divisions</th></tr>"; | |
| 69 | ||
| 70 | foreach ($fulldiv AS $key) {
| |
| 71 | ||
| 72 | $maingame = $gameslist[$key][0]; | |
| 73 | $link = $gameslist[$key][1]; | |
| 74 | if ($mia) {$link .= "&mia=1";}
| |
| 75 | ||
| 76 | echo "<tr><td> <a href='pages.php?pageid=15&id=$link'>$maingame</a></td></tr>"; | |
| 77 | ||
| 78 | } | |
| 79 | } | |
| 80 | ||
| 81 | if (!empty($guild)) {
| |
| 82 | ||
| 83 | echo "<tr><th class='blocksubhead'>Official Guilds</th></tr>"; | |
| 84 | ||
| 85 | foreach ($guild AS $key) {
| |
| 86 | ||
| 87 | $maingame = $gameslist[$key][0]; | |
| 88 | $link = $gameslist[$key][1]; | |
| 89 | if ($mia) {$link .= "&mia=1";}
| |
| 90 | ||
| 91 | echo "<tr><td> <a href='pages.php?pageid=15&id=$link'>$maingame</a></td></tr>"; | |
| 92 | ||
| 93 | } | |
| 94 | } | |
| 95 | ||
| 96 | if (!empty($gamegroup)) {
| |
| 97 | ||
| 98 | echo "<tr><th class='blocksubhead'>Gaming Groups</th></tr>"; | |
| 99 | ||
| 100 | foreach ($gamegroup AS $key) {
| |
| 101 | ||
| 102 | $maingame = $gameslist[$key][0]; | |
| 103 | $link = $gameslist[$key][1]; | |
| 104 | if ($mia) {$link .= "&mia=1";}
| |
| 105 | ||
| 106 | echo "<tr><td> <a href='pages.php?pageid=15&id=$link'>$maingame</a></td></tr>"; | |
| 107 | ||
| 108 | } | |
| 109 | } | |
| 110 | ||
| 111 | if (!empty($devdiv)) {
| |
| 112 | ||
| 113 | echo "<tr><th class='blocksubhead'>Divisions in Development</th></tr>"; | |
| 114 | ||
| 115 | foreach ($devdiv AS $key) {
| |
| 116 | ||
| 117 | $maingame = $gameslist[$key][0]; | |
| 118 | $link = $gameslist[$key][1]; | |
| 119 | if ($mia) {$link .= "&mia=1";}
| |
| 120 | ||
| 121 | echo "<tr><td> <a href='pages.php?pageid=15&id=$link'>$maingame</a></td></tr>"; | |
| 122 | ||
| 123 | } | |
| 124 | } | |
| 125 | ||
| 126 | if (!empty($devonly)) {
| |
| 127 | ||
| 128 | echo "<tr><th class='blocksubhead'>Miscellaneous & Other</th></tr>"; | |
| 129 | ||
| 130 | foreach ($devonly AS $key) {
| |
| 131 | ||
| 132 | $maingame = $gameslist[$key][0]; | |
| 133 | $link = $gameslist[$key][1]; | |
| 134 | if ($mia) {$link .= "&mia=1";}
| |
| 135 | ||
| 136 | echo "<tr><td> <a href='pages.php?pageid=15&id=$link'>$maingame</a></td></tr>"; | |
| 137 | ||
| 138 | } | |
| 139 | } | |
| 140 | ||
| 141 | echo "</table></div></div></div>"; | |
| 142 | // End Roster Navigation List | |
| 143 | ||
| 144 | // Check if Main Page or Specific Game | |
| 145 | if ($default == true) {
| |
| 146 | // Default page is Leadership Roster | |
| 147 | ||
| 148 | // Defined Needed Arrays | |
| 149 | $ceo = array(); | |
| 150 | $coo = array(); | |
| 151 | $cdl = array(); | |
| 152 | $cde = array(); | |
| 153 | $adl = array(); | |
| 154 | $ade = array(); | |
| 155 | $dls = array(); | |
| 156 | $dos = array(); | |
| 157 | $ecs = array(); | |
| 158 | $gls = array(); | |
| 159 | $gos = array(); | |
| 160 | $gms = array(); | |
| 161 | $mms = array(); | |
| 162 | ||
| 163 | // Start the page code | |
| 164 | echo "<div style='width:80%; float:left;'> | |
| 165 | <div class='blockhead'> | |
| 166 | <h4>Clan Leadership Roster</h4> | |
| 167 | </div> | |
| 168 | <div class='blockbody'> | |
| 169 | <table width='100%' border='0' cellspacing='10' cellpadding='1'> | |
| 170 | <tbody><tr>"; | |
| 171 | ||
| 172 | // Query the database for leaders only // | |
| 173 | $leaderq = $db->query_read_slave("SELECT user.username, user.usertitle, usergroup.usergroupid, usergroup.opentag, userfield.userid, userfield.field5 FROM " . TABLE_PREFIX . "user AS user LEFT JOIN " . TABLE_PREFIX . "usergroup as usergroup ON (user.usergroupid=usergroup.usergroupid) LEFT JOIN " . TABLE_PREFIX . "userfield as userfield ON (userfield.userid=user.userid) WHERE user.username!='' AND user.usergroupid IN (5,6,17,18,55,56,38,50,24,54) ORDER BY title, username");
| |
| 174 | ||
| 175 | - | $leaderq = $db->query_read_slave("SELECT user.username, user.usertitle, usergroup.usergroupid, usergroup.opentag, userfield.userid FROM " . TABLE_PREFIX . "user AS user LEFT JOIN " . TABLE_PREFIX . "usergroup as usergroup ON (user.usergroupid=usergroup.usergroupid) LEFT JOIN " . TABLE_PREFIX . "userfield as userfield ON (userfield.userid=user.userid) WHERE user.username!='' AND (user.usergroupid=6 OR user.usergroupid=5 OR user.usergroupid=17 OR user.usergroupid=18 OR user.usergroupid=46 OR user.usergroupid=24 OR user.usergroupid=38 OR user.usergroupid=34 OR user.usergroupid=37 OR user.usergroupid=42 OR user.usergroupid=55 OR user.usergroupid=56 OR user.usergroupid=57 OR user.usergroupid=58) ORDER BY title, username");
|
| 175 | + | |
| 176 | $leaders = array(); | |
| 177 | while ($leadersarray = mysql_fetch_array($leaderq)) {
| |
| 178 | $leaders[] = $leadersarray; | |
| 179 | } | |
| 180 | ||
| 181 | // Check for Each Rank specialties // | |
| 182 | foreach ($leaders as $leader) {
| |
| 183 | ||
| 184 | // Check each Leadergroup // | |
| 185 | switch ($leader['usergroupid']) {
| |
| 186 | ||
| 187 | // Check for CDs // | |
| 188 | case '6': | |
| 189 | if (stristr($leader['usertitle'],'_exec') !== false) {
| |
| 190 | $ceo = $leader; | |
| 191 | - | if (strrpos($leader['usertitle'],'cdir_exec.png') != false) {
|
| 191 | + | |
| 192 | } elseif (stristr($leader['usertitle'],'_asex') !== false) {
| |
| 193 | $coo = $leader; | |
| 194 | - | } elseif (strrpos($leader['usertitle'],'cdir_asex.png') != false) {
|
| 194 | + | |
| 195 | } elseif (stristr($leader['usertitle'],'_lead') !== false) {
| |
| 196 | $cdl = $leader; | |
| 197 | - | } elseif (strrpos($leader['usertitle'],'cdir_lead.png') != false) {
|
| 197 | + | |
| 198 | } elseif (stristr($leader['usertitle'],'_exp') !== false) {
| |
| 199 | $cde = $leader; | |
| 200 | - | } elseif (strrpos($leader['usertitle'],'cdir_exp.png') != false) {
|
| 200 | + | |
| 201 | } | |
| 202 | // Check for ADs // | |
| 203 | case '5': | |
| 204 | if (stristr($leader['usertitle'],'lead') !== false) {
| |
| 205 | $adl[] = $leader; | |
| 206 | - | if (strrpos($leader['usertitle'],'adir_lead.png') != false) {
|
| 206 | + | |
| 207 | } elseif (stristr($leader['usertitle'],'exp') !== false) {
| |
| 208 | $ade[] = $leader; | |
| 209 | - | } elseif (strrpos($leader['usertitle'],'adir_exp.png') != false) {
|
| 209 | + | |
| 210 | } | |
| 211 | // Check for DLs // | |
| 212 | case '17': | |
| 213 | $dls[] = $leader; | |
| 214 | break; | |
| 215 | // Check for DOs // | |
| 216 | case '18': | |
| 217 | $dos[] = $leader; | |
| 218 | break; | |
| 219 | // Check for ECs // | |
| 220 | case '24': | |
| 221 | $ecs[] = $leader; | |
| 222 | break; | |
| 223 | // Check for LTs // | |
| 224 | case '38': | |
| 225 | $lts[] = $leader; | |
| 226 | break; | |
| 227 | // Check for GLs // | |
| 228 | case '55': | |
| 229 | $gls[] = $leader; | |
| 230 | break; | |
| 231 | // Check for GOs // | |
| 232 | case '56': | |
| 233 | $gos[] = $leader; | |
| 234 | break; | |
| 235 | // Check for GMs // | |
| 236 | case '50': | |
| 237 | $gms[] = $leader; | |
| 238 | break; | |
| 239 | // Check for MMs // | |
| 240 | - | echo "<td colspan='3' width='50%' align='center' valign='top' style='border:none;'> |
| 240 | + | case '54': |
| 241 | $mms[] = $leader; | |
| 242 | break; | |
| 243 | } | |
| 244 | } | |
| 245 | // Executive Row // | |
| 246 | echo "<td colspan='6' width='50%' align='center' valign='top' style='border:none;'> | |
| 247 | - | echo "<td width='33.3%' align='center' valign='top' style='border:none;'> |
| 247 | + | |
| 248 | <a href='member.php?u=".$ceo['userid']."'>".$ceo['opentag'].$ceo['username']."</span></a> | |
| 249 | </td>"; | |
| 250 | // CD Row // | |
| 251 | echo "</tr><tr>"; | |
| 252 | // Leadership // | |
| 253 | echo "<td colspan='2' width='33.3%' align='center' valign='top' style='border:none;'> | |
| 254 | <p><img alt='Director of Leadership' border='0' src='images/ranks/v9/cdir_lead.png' /></p>"; | |
| 255 | if (empty($cdl) == false) {
| |
| 256 | - | echo "<td width='33%' align='center' valign='top' style='border:none;'> |
| 256 | + | |
| 257 | } else {
| |
| 258 | echo "<span style='color:#1f4fae; font-weight:bold; text-decoration:underline;'>Closed</span></a>"; | |
| 259 | } | |
| 260 | echo "</td>"; | |
| 261 | // Assistant Executive // | |
| 262 | echo "<td colspan='2' width='33%' align='center' valign='top' style='border:none;'> | |
| 263 | <p><img alt='Assistant Executive Director' border='0' src='images/ranks/v9/cdir_asex.png' /></p>"; | |
| 264 | if (empty($coo) == false) {
| |
| 265 | - | echo "<td width='33%' align='center' valign='top' style='border:none;'> |
| 265 | + | |
| 266 | } else {
| |
| 267 | echo "<span style='color:#1f4fae; font-weight:bold; text-decoration:underline;'>Open</span>"; | |
| 268 | } | |
| 269 | echo "</td>"; | |
| 270 | // Expansion // | |
| 271 | echo "<td colspan='2' width='33%' align='center' valign='top' style='border:none;'> | |
| 272 | <p><img alt='Director of Expansion' border='0' src='images/ranks/v9/cdir_exp.png' /></p>"; | |
| 273 | if (empty($cde) == false) {
| |
| 274 | echo "<a href='member.php?u=".$cde['userid']."'>".$cde['opentag'].$cde['username']."</span></a>"; | |
| 275 | } else {
| |
| 276 | - | echo "<td align='center' valign='top' style='border:none;'> |
| 276 | + | |
| 277 | } | |
| 278 | echo "</td>"; | |
| 279 | // AD Row // | |
| 280 | echo "</tr><tr>"; | |
| 281 | // Leadership // | |
| 282 | echo "<td colspan='2' align='center' valign='top' style='border:none;'> | |
| 283 | <p><img alt='Assistant Director of Leadership' border='0' src='images/ranks/v9/adir_lead.png' /></p>"; | |
| 284 | if (empty($adl) == false) {
| |
| 285 | - | echo "<td style='border:none;'> </td>"; |
| 285 | + | |
| 286 | } else {
| |
| 287 | - | echo "<td align='center' valign='top' style='border:none;'> |
| 287 | + | |
| 288 | } | |
| 289 | echo " </td>"; | |
| 290 | // Empty // | |
| 291 | echo "<td colspan='2' style='border:none;'> </td>"; | |
| 292 | // Development // | |
| 293 | echo "<td colspan='2' align='center' valign='top' style='border:none;'> | |
| 294 | <p><img alt='Assistant Director of Expansion' border='0' src='images/ranks/v9/adir_exp.png' /></p>"; | |
| 295 | - | // DL, GL, DC, Row Row // |
| 295 | + | |
| 296 | foreach ($ade as $ad) {echo "<a href='member.php?u=".$ad['userid']."'>".$ad['opentag'].$ad['username']."</span></a><br/>";}
| |
| 297 | } else {
| |
| 298 | - | echo "<td align='center' valign='top' style='border:none;'> |
| 298 | + | |
| 299 | } | |
| 300 | echo "</td>"; | |
| 301 | // DL, GL, EC, Row Row // | |
| 302 | echo "</tr><tr>"; | |
| 303 | //DLs// | |
| 304 | echo "<td colspan='2' align='center' valign='top' style='border:none;'> | |
| 305 | <p><img alt='Division Leader' border='0' src='images/ranks/v9/dlead.png' /></p>"; | |
| 306 | if (empty($dls) == false) {
| |
| 307 | - | echo "<td align='center' valign='top' style='border:none;'> |
| 307 | + | |
| 308 | } else {
| |
| 309 | echo "<span style='color:#ac5900; font-weight:bold; font-style:italic; text-decoration:none;'>Open</span>"; | |
| 310 | } | |
| 311 | echo "</td>"; | |
| 312 | //GLs// | |
| 313 | echo "<td colspan='2' align='center' valign='top' style='border:none;'> | |
| 314 | <p><img alt='Guild Leader' border='0' src='images/ranks/v9/glead.png' /></p>"; | |
| 315 | if (empty($gls) == false) {
| |
| 316 | - | echo "<td align='center' valign='top' style='border:none;'> |
| 316 | + | |
| 317 | } else {
| |
| 318 | echo "<span style='color:#653281; font-weight:bold;'>Open</span>"; | |
| 319 | } | |
| 320 | echo "</td>"; | |
| 321 | //EC// | |
| 322 | echo "<td colspan='2' align='center' valign='top' style='border:none;'> | |
| 323 | <p><img alt='Expansion Coordinator' border='0' src='images/ranks/v9/coor_exp.png' /></p>"; | |
| 324 | if (empty($ecs) == false) {
| |
| 325 | foreach ($ecs as $dc) {echo "<a href='member.php?u=".$dc['userid']."'>".$dc['opentag'].$dc['username']."</span></a></br>";}
| |
| 326 | } else {
| |
| 327 | - | echo "<td align='center' valign='top' style='border:none;'> |
| 327 | + | |
| 328 | } | |
| 329 | echo "</td>"; | |
| 330 | // DO, GO, and LT Row // | |
| 331 | echo "</tr><tr>"; | |
| 332 | //DO// | |
| 333 | echo "<td colspan='2' align='center' valign='top' style='border:none;'> | |
| 334 | <p><img alt='Division Officer' border='0' src='images/ranks/v9/doff.png' /></p>"; | |
| 335 | if (empty($dos) == false) {
| |
| 336 | - | echo "<td align='center' valign='top' style='border:none;'> |
| 336 | + | |
| 337 | } else {
| |
| 338 | echo "<span style='color:#b07d01; font-weight:bold; font-style:italic; text-decoration:none;'>Open</span>"; | |
| 339 | } | |
| 340 | echo "</td>"; | |
| 341 | //GO// | |
| 342 | echo "<td colspan='2' align='center' valign='top' style='border:none;'> | |
| 343 | <p><img alt='Guild Officer' border='0' src='images/ranks/v9/goff.png' /></p>"; | |
| 344 | if (empty($gos) == false) {
| |
| 345 | - | echo "<td align='center' valign='top' style='border:none;'> |
| 345 | + | |
| 346 | } else {
| |
| 347 | echo "<span style='color:#885aa1; font-style:italic; font-weight:bold;'>Open</span>"; | |
| 348 | } | |
| 349 | echo "</td>"; | |
| 350 | //LT// | |
| 351 | echo "<td colspan='2' align='center' valign='top' style='border:none;'> | |
| 352 | <p><img alt='Leadership Trainee' border='0' src='images/ranks/v9/ltrain.png' /></p>"; | |
| 353 | if (empty($lts) == false) {
| |
| 354 | foreach ($lts as $lt) {echo "<a href='member.php?u=".$lt['userid']."'>".$lt['opentag'].$lt['username']."</span></a></br>";}
| |
| 355 | } else {
| |
| 356 | echo "<span style='color:#ad2c17; font-weight:bold; font-style:italic;'>Open</span>"; | |
| 357 | } | |
| 358 | echo "</td>"; | |
| 359 | // GM, MM Row // | |
| 360 | echo "</tr><tr>"; | |
| 361 | // GM // | |
| 362 | echo "<td colspan='3' align='center' valign='top' style='border:none;'> | |
| 363 | <p><img alt='Group Manager' border='0' src='images/ranks/v9/gmgr.png' /></p>"; | |
| 364 | if (empty($gms) == false) {
| |
| 365 | foreach ($gms as $gm) {echo "<a href='member.php?u=".$gm['userid']."'>".$gm['opentag'].$gm['username']."</span></a></br>";}
| |
| 366 | } else {
| |
| 367 | echo "<span style='color:#7b3700; font-weight:normal; font-style:none;'>Open</span>"; | |
| 368 | } | |
| 369 | echo "</td>"; | |
| 370 | // MM // | |
| 371 | echo "<td colspan='3' align='center' valign='top' style='border:none;'> | |
| 372 | <p><img alt='Group Manager' border='0' src='images/ranks/v9/mgr_media.png' /></p>"; | |
| 373 | if (empty($mms) == false) {
| |
| 374 | foreach ($mms as $mm) {echo "<a href='member.php?u=".$mm['userid']."'>".$mm['opentag'].$mm['username']."</span></a></br>";}
| |
| 375 | } else {
| |
| 376 | echo "<span style='color:#1a7a8b; font-style:normal; font-weight:normal;'>Open</span>"; | |
| 377 | } | |
| 378 | echo "</td>"; | |
| 379 | // //End for of Table// | |
| 380 | echo "</tr> | |
| 381 | </tbody> | |
| 382 | </table> | |
| 383 | </div> | |
| 384 | </div>"; | |
| 385 | // END Leadership | |
| 386 | } else {
| |
| 387 | ||
| 388 | echo "<div style='width:80%; float:left;'>"; | |
| 389 | ||
| 390 | // Find Key // | |
| 391 | for ($i=0;$i<count($gameslist);$i++) {
| |
| 392 | if (in_array($gameid, $gameslist[$i])) {$key = $i;}
| |
| 393 | } | |
| 394 | ||
| 395 | $maingame = $gameslist[$key][0]; | |
| 396 | $link = $gameslist[$key][1]; | |
| 397 | $ign = $gameslist[$key][2]; | |
| 398 | $field = $gameslist[$key][3]; | |
| 399 | $bitcheck = 1<<$gameslist[$key][4]; | |
| 400 | $numfields = $gameslist[$key][5]; | |
| 401 | $colwidth = (100 / $numfields)."%"; | |
| 402 | ||
| 403 | // Check for MIA Roster | |
| 404 | if ($mia) {$link .= "&mia=1";}
| |
| 405 | ||
| 406 | $addedsort = ""; | |
| 407 | $sortlink = ""; | |
| 408 | ||
| 409 | // Check for possible sort | |
| 410 | switch ($sortby) {
| |
| 411 | case "": | |
| 412 | $addedsort .= ""; | |
| 413 | break; | |
| 414 | case "joindate": | |
| 415 | $addedsort .= ", joindate"; | |
| 416 | break; | |
| 417 | case "lastactive": | |
| 418 | $addedsort .= ", lastactivity"; | |
| 419 | break; | |
| 420 | case "posts": | |
| 421 | $addedsort .= ", posts"; | |
| 422 | break; | |
| 423 | } | |
| 424 | // Check for possible sort order and create links | |
| 425 | switch ($sortorder) {
| |
| 426 | case "": | |
| 427 | $sortlink = "&order=desc"; | |
| 428 | break; | |
| 429 | case "asc": | |
| 430 | $addedsort .= " ASC"; | |
| 431 | $sortlink = "&order=desc"; | |
| 432 | break; | |
| 433 | case "desc": | |
| 434 | $addedsort .= " DESC"; | |
| 435 | $sortlink = "&order=asc"; | |
| 436 | break; | |
| 437 | } | |
| 438 | ||
| 439 | echo "<div class='blockhead'><h4>$maingame - Main Game Members</h4></div> | |
| 440 | <div class='blockbody'> | |
| 441 | <table width='100%' style='border:none; border-collapse:collapse;'> | |
| 442 | <tbody> | |
| 443 | <tr> | |
| 444 | <th width='$colwidth' style='border:none; border-collapse:collapse;' class='blocksubhead'><strong>Username</strong></th> | |
| 445 | <th width='$colwidth' style='border:none; border-collapse:collapse;' class='blocksubhead'><strong>Rank</strong></th>"; | |
| 446 | ||
| 447 | if ($ign != "") { echo "<th width='$colwidth' style='border:none; border-collapse:collapse;' class='blocksubhead'><strong>$ign</strong></th>"; }
| |
| 448 | ||
| 449 | echo "<th width='$colwidth' style='border:none; border-collapse:collapse;' class='blocksubhead'><strong><a href='pages.php?pageid=15&id=$link&sort=joindate$sortlink'>Join Date</a></strong></th> | |
| 450 | <th width='$colwidth' style='border:none; border-collapse:collapse;' class='blocksubhead'><strong><a href='pages.php?pageid=15&id=$link&sort=lastactive$sortlink'>Last Active</a></strong></th>"; | |
| 451 | echo "</tr>"; | |
| 452 | // Check for in-game field | |
| 453 | if ($field != "") { $userfield = "userfield." . $field . ","; } else { $userfield = ""; }
| |
| 454 | ||
| 455 | // User Query | |
| 456 | $users = $db->query_read_slave("SELECT user.username, user.joindate, user.lastactivity, user.posts, usergroup.usergroupid, usergroup.title, usergroup.opentag, userfield.field5, " . $userfield . " userfield.userid FROM " . TABLE_PREFIX . "user AS user LEFT JOIN " . TABLE_PREFIX . "usergroup as usergroup ON (user.usergroupid = usergroup.usergroupid) LEFT JOIN " . TABLE_PREFIX . "userfield as userfield ON (userfield.userid = user.userid) WHERE userfield.field5='" . $maingame . "' AND user.username != '' ORDER BY field(user.usergroupid,17,18,55,56,38,50,6,5,24,58,54,49,47,53,52,51,35,2,27,45,21,20,23,8,3,4,0)" . $addedsort . ", username");
| |
| 457 | $total = 0; | |
| 458 | ||
| 459 | // Set the users array | |
| 460 | $arrayusers = array(); | |
| 461 | while ($userarray = mysql_fetch_array($users)) {
| |
| 462 | $arrayusers[] = $userarray; | |
| 463 | } | |
| 464 | ||
| 465 | foreach ($arrayusers as $userinfo) {
| |
| 466 | ||
| 467 | //Define Variables // | |
| 468 | $username = $userinfo['username']; | |
| 469 | $userid = $userinfo['userid']; | |
| 470 | // get field if there is one // | |
| 471 | if ($field != "") { $userign = $userinfo[$field]; }
| |
| 472 | $groupid = $userinfo['usergroupid']; | |
| 473 | $userrank = $userinfo['title']; | |
| 474 | $opentag = $userinfo['opentag']; | |
| 475 | $userjoin = vbdate($vbulletin->options['dateformat'], $userinfo['joindate'], true); | |
| 476 | $useractive = vbdate($vbulletin->options['dateformat'], $userinfo['lastactivity'], true); | |
| 477 | $userposts = $userinfo['posts']; | |
| 478 | ||
| 479 | if ($username != NULL) {
| |
| 480 | if ($mia == false) {
| |
| 481 | if (!in_array($groupid, array(1,3,4,7,8,20,21,23))) {
| |
| 482 | ||
| 483 | echo "<tr> | |
| 484 | <td style='border:none; border-collapse:collapse;' class='blockrow'><a href='member.php?u=$userid'>" . $opentag . $username . "</span></a></td> | |
| 485 | <td style='border:none; border-collapse:collapse;' class='blockrow'>" . $userrank . "</td>"; | |
| 486 | ||
| 487 | if ($field != "") { echo "<td style='border:none; border-collapse:collapse;' class='blockrow'>" . $userign . "</td>"; }
| |
| 488 | ||
| 489 | echo "<td style='border:none; border-collapse:collapse;' class='blockrow'>" . $userjoin . "</td> | |
| 490 | <td style='border:none; border-collapse:collapse;' class='blockrow'>" . $useractive . "</td> | |
| 491 | </tr>"; | |
| 492 | ||
| 493 | $total += 1; | |
| 494 | } | |
| 495 | } else {
| |
| 496 | if ($groupid == 21) {
| |
| 497 | ||
| 498 | echo "<tr> | |
| 499 | <td style='border:none; border-collapse:collapse;' class='blockrow'><a href='member.php?u=$userid'>" . $opentag . $username . "</span></a></td> | |
| 500 | <td style='border:none; border-collapse:collapse;' class='blockrow'>" . $userrank . "</td>"; | |
| 501 | ||
| 502 | if ($field != "") { echo "<td style='border:none; border-collapse:collapse;' class='blockrow'>" . $userign . "</td>"; }
| |
| 503 | ||
| 504 | echo "<td style='border:none; border-collapse:collapse;' class='blockrow'>" . $userjoin . "</td> | |
| 505 | <td style='border:none; border-collapse:collapse;' class='blockrow'>" . $useractive . "</td> | |
| 506 | </tr>"; | |
| 507 | ||
| 508 | $total += 1; | |
| 509 | } | |
| 510 | } | |
| 511 | } | |
| 512 | } | |
| 513 | ||
| 514 | echo "<tr><td colspan='$numfields' style='border:none; border-collapse:collapse;' class='blocksubhead'>Total Main Members: $total</td></tr></table></div><br/><br/>"; | |
| 515 | ||
| 516 | if ($mia == false) {
| |
| 517 | if ($maingame != "Other Game") {
| |
| 518 | echo "<div class='blockhead'><h4>$maingame - Other Game Members</h4></div> | |
| 519 | <div class='blockbody'> | |
| 520 | <table width='100%'> | |
| 521 | <tbody> | |
| 522 | <tr> | |
| 523 | <th width='$colwidth' style='border:none; border-collapse:collapse;' class='blocksubhead'><strong>Username</strong></th> | |
| 524 | <th width='$colwidth' style='border:none; border-collapse:collapse;' class='blocksubhead'><strong>Rank</strong></th>"; | |
| 525 | ||
| 526 | if ($ign != "") { echo "<th width='$colwidth' style='border:none; border-collapse:collapse;' class='blocksubhead'><strong>$ign</strong></th>"; }
| |
| 527 | ||
| 528 | echo "<th width='$colwidth' style='border:none; border-collapse:collapse;' class='blocksubhead'><strong>Join Date</strong></th> | |
| 529 | <th width='$colwidth' style='border:none; border-collapse:collapse;' class='blocksubhead'><strong>Last Active</strong></th> | |
| 530 | </tr>"; | |
| 531 | if ($field != "") { $userfield = "userfield." . $field . ","; } else { $userfield = ""; }
| |
| 532 | ||
| 533 | // Get Other Game Members | |
| 534 | $users = $db->query_read_slave("SELECT user.username, user.joindate, user.lastactivity, usergroup.usergroupid, usergroup.title, usergroup.opentag, userfield.field6, " . $userfield . " userfield.userid FROM " . TABLE_PREFIX . "user AS user LEFT JOIN " . TABLE_PREFIX . "usergroup as usergroup ON (user.usergroupid = usergroup.usergroupid) LEFT JOIN " . TABLE_PREFIX . "userfield as userfield ON (userfield.userid = user.userid) WHERE (userfield.field5 != '" . $maingame . "') AND (userfield.field6 & " . $bitcheck . ") AND (user.username != '') ORDER BY title, username");
| |
| 535 | $total = 0; | |
| 536 | ||
| 537 | // Set the Users Aray | |
| 538 | $arrayusers = array(); | |
| 539 | while ($userarray = mysql_fetch_array($users)) {
| |
| 540 | $arrayusers[] = $userarray; | |
| 541 | } | |
| 542 | ||
| 543 | foreach ($arrayusers as $userinfo) {
| |
| 544 | //Define Variables // | |
| 545 | $username = $userinfo['username']; | |
| 546 | $userid = $userinfo['userid']; | |
| 547 | // get field if there is one // | |
| 548 | if ($field != "") { $userign = $userinfo[$field]; }
| |
| 549 | $groupid = $userinfo['usergroupid']; | |
| 550 | $userrank = $userinfo['title']; | |
| 551 | $opentag = $userinfo['opentag']; | |
| 552 | $userjoin = vbdate($vbulletin->options['dateformat'], $userinfo['joindate'], true); | |
| 553 | $useractive = vbdate($vbulletin->options['dateformat'], $userinfo['lastactivity'], true); | |
| 554 | ||
| 555 | if ($username != NULL) {
| |
| 556 | if (!in_array($groupid, array(1,3,4,7,8,20,21,23))) {
| |
| 557 | ||
| 558 | echo "<tr> | |
| 559 | <td style='border:none; border-collapse:collapse;' class='blockrow'><a href='member.php?u=$userid'>" . $opentag . $username . "</span></a></td> | |
| 560 | <td style='border:none; border-collapse:collapse;' class='blockrow'>" . $userrank . "</td>"; | |
| 561 | ||
| 562 | if ($field != "") { echo "<td style='border:none; border-collapse:collapse;' class='blockrow'>" . $userign . "</td>"; }
| |
| 563 | ||
| 564 | echo "<td style='border:none; border-collapse:collapse;' class='blockrow'>" . $userjoin . "</td> | |
| 565 | <td style='border:none; border-collapse:collapse;' class='blockrow'>" . $useractive . "</td> | |
| 566 | </tr>"; | |
| 567 | ||
| 568 | $total += 1; | |
| 569 | } | |
| 570 | } | |
| 571 | } | |
| 572 | ||
| 573 | echo "<tr><td colspan='$numfields' class='blocksubhead'>Total Other Members: $total</td></tr></table></div><br/><br/>"; | |
| 574 | } | |
| 575 | } | |
| 576 | echo "</div>"; | |
| 577 | } | |
| 578 | echo "</td> | |
| 579 | </tr> | |
| 580 | </tbody> | |
| 581 | </table> | |
| 582 | </div> | |
| 583 | </blockquote> | |
| 584 | <div class='bottomBar'> | |
| 585 | <div class='bottomBarLeft'> | |
| 586 | <div class='bottomBarRight'> </div> | |
| 587 | </div> | |
| 588 | </div> | |
| 589 | </div> | |
| 590 | </div> | |
| 591 | </div> | |
| 592 | <div class='forumBitBoxTBB'> | |
| 593 | <div class='forumbitBoxBL'> | |
| 594 | <div class='forumBitBoxBR'> | |
| 595 | <div class='forumBitBoxBWrap'></div> | |
| 596 | </div> | |
| 597 | </div> | |
| 598 | </div>"; |