'; //var_dump($lists); //echo ''; // If $currentList hasn't been set, default to the first list if(!$currentList) { $currentList = $defaultList; $currentPrefix = $lists['prefix']; } if($use_prefixes == 1) { // Check against the $prefixArr to make sure we don't get duplicates if(!in_array($lists['prefix'],$prefixArr)) { // If $currentPrefix is set, make it selected in the drop-down if($lists['prefix'] == $currentPrefix) { $selected = ' selected'; } else { $selected = ''; } // Build the drop-down box $prefixArr[] = $lists['prefix']; $prefix_name .= ' '; } // Check against the $listArr to make sure we don't get duplicates if(!in_array($lists['list'],$listArr)) { // If $currentList is set, make it selected in the drop-down if($lists['list'] == $currentList) { $selected = ' selected'; } else { $selected = ''; } // Build the drop-down box $listArr[] = $lists['list']; $list_name .= ' '; } } else { // Check against the $listArr to make sure we don't get duplicates if(!in_array($lists['list'],$listArr)) { // If $currentList is set, make it selected in the drop-down if($lists['list'] == $currentList) { $selected = ' selected'; } else { $selected = ''; } // Build the drop-down box $listArr[] = $lists['list']; $list_name .= ' '; } } } $query = "SELECT * FROM sk_list WHERE list='".$currentList."' AND prefix='".$currentPrefix."' ORDER BY position"; $sklist = mysql_query($query); // When user selects a specific list, grab records that match that list while($players = mysql_fetch_array($sklist)) { // Default color $color = ' style="color: '.$default_color.';"'; // Grab the records from sk_class if classes or colors are enabled if($use_class_display == 1 || $use_class_color == 1) { $definedClasses = Array('Hunter','Warlock','Priest','Paladin','Mage','Rogue','Druid','Shaman','Warrior'); for($i = 0; $i < count($definedClasses); $i++) { if(stristr($currentList, $definedClasses[$i]) !== FALSE) { $is_class_list = 1; } } $query = "SELECT * FROM sk_class WHERE player_name='".$players['player_name']."'"; $skclass = mysql_query($query); $class = mysql_fetch_array($skclass); // Set the class display if enabled if($use_class_display == 1 && $is_class_list == 0) { $player_class = ' ('.$class["class"].')'; } // If using color-coding, set the appropriate color style if($use_class_color == 1) { if($class["class"] == 'Hunter') { $color = ' style="color: '.$hunter_color.';"'; } if($class["class"] == 'Warlock') { $color = ' style="color: '.$warlock_color.';"'; } if($class["class"] == 'Priest') { $color = ' style="color: '.$priest_color.';"'; } if($class["class"] == 'Paladin') { $color = ' style="color: '.$paladin_color.';"'; } if($class["class"] == 'Mage') { $color = ' style="color: '.$mage_color.';"'; } if($class["class"] == 'Rogue') { $color = ' style="color: '.$rogue_color.';"'; } if($class["class"] == 'Druid') { $color = ' style="color: '.$druid_color.';"'; } if($class["class"] == 'Shaman') { $color = ' style="color: '.$shaman_color.';"'; } if($class["class"] == 'Warrior') { $color = ' style="color: '.$warrior_color.';"'; } // If colors on class lists are disabled, set to the default style if($color_on_classes == 0 && $is_class_list == 1) { // Default color $color = ' style="color: '.$default_color.';"'; } } } // If roster linkbacks are enabled, make character names links to their roster entries if($use_roster_data == 1) { $player = ''.$players['player_name'].$player_class.''; } else { $player = ''.$players['player_name'].$player_class.''; } $list_order .= ' '.$players['position'].' '.$player.' '; } include($install_path . 'sklist.php'); // Template file ?>