Please select the category you wish to view characters with:

\n"; $listTypes = array("Writer","Dragonriders","Wings","Weyrlings","Candidates","Crafters","Weyrfolk","Pets","Deceased"); foreach( $listTypes as $type) { echo "\n"; } echo "
\n"; } else if( $_GET['list'] == "Writer" ) { $writers = DB::query("SELECT * FROM player_info WHERE player_visible=1"); echo "

Writers

\n"; foreach ( $writers as $writer ) { echo "\n"; } echo "
\n"; } else if( $_GET['list'] == "Dragonriders" ) { $dragons = DB::query("SELECT player_name, player_info.player_id, character_info.character_id, character_name, character_age, character_rank, character_craft, dragon_name, dragon_color FROM dragon_info JOIN character_info ON dragon_info.character_id = character_info.character_id JOIN player_info ON player_info.player_id = dragon_info.player_id ORDER BY dragon_color"); echo "

Dragons

\n"; echo "\n"; $headers = array("Name","Age","Rank","Craft","Dragon Name","Color","Writer"); foreach( $headers as $title ) { echo "\n"; } foreach ( $dragons as $character ) { echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; } echo "
" . $title . "
" . $character['character_name'] . "" . $character['character_age'] . "" . $character['character_rank'] . "" . $character['character_craft'] . "" . $character['dragon_name'] . "" . $character['dragon_color'] . "" . $character['player_name'] . "
\n"; } else if( $_GET['list'] == "Weyrlings" ) { $dragons = DB::query("SELECT player_name, player_info.player_id, character_info.character_id, character_name, character_age, character_rank, character_craft, dragon_name, dragon_color FROM dragon_info JOIN character_info ON dragon_info.character_id = character_info.character_id JOIN player_info ON player_info.player_id = dragon_info.player_id WHERE character_rank = 'Weyrling' ORDER BY dragon_color"); echo "

Weyrlings

\n"; echo "\n"; $headers = array("Name","Age","Rank","Craft","Dragon Name","Color","Writer"); foreach( $headers as $title ) { echo "\n"; } foreach ( $dragons as $character ) { echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; } echo "
" . $title . "
" . $character['character_name'] . "" . $character['character_age'] . "" . $character['character_rank'] . "" . $character['character_craft'] . "" . $character['dragon_name'] . "" . $character['dragon_color'] . "" . $character['player_name'] . "
\n"; } else if( $_GET['list'] == "Candidates" ) { $candidates = DB::query("SELECT player_name, player_info.player_id, character_info.character_id, character_name, character_age, character_rank, character_craft, character_colorpreferences FROM character_info JOIN player_info ON character_info.player_id = player_info.player_id WHERE character_iscandidate = 1 AND character_enabled = 1 AND player_visible = 1 ORDER BY character_age DESC"); echo "

Candidates

\n"; echo "\n"; $headers = array("Name","Age","Rank","Craft","Color Preference","Writer"); foreach( $headers as $title ) { echo "\n"; } foreach ( $candidates as $character ) { echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; } echo "
" . $title . "
" . $character['character_name'] . "" . $character['character_age'] . "" . $character['character_rank'] . "" . $character['character_craft'] . "" . $character['character_colorpreferences'] . "" . $character['player_name'] . "
\n"; } else if( $_GET['list'] == "Wings" ) { $wings = DB::query("SELECT player_name, player_info.player_id, character_info.character_id, character_name, character_age, character_rank, character_craft, dragon_name, dragon_color, dragon_wing FROM dragon_info JOIN character_info on dragon_info.character_id = character_info.character_id JOIN player_info ON player_info.player_id = dragon_info.player_id WHERE dragon_wing != 'None' AND dragon_wing != 'None (Weyrling)' ORDER BY dragon_wing ASC"); $actve_wing = ""; $first_wing = true; echo "

Wings

\n"; $headers = array("Name","Age","Rank","Craft","Dragon Name","Color","Writer"); foreach( $wings as $character ) { if( $character['dragon_wing'] != $active_wing ) { $active_wing = $character['dragon_wing']; if( !$first_wing ) { echo "\n"; } else { $first_wing = false; } echo "

" . $active_wing . "

\n"; echo "\n"; echo "\n"; foreach( $headers as $title ) { echo "\n"; } echo "\n"; } echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; } echo "
" . $title . "
" . $character['character_name'] . "" . $character['character_age'] . "" . $character['character_rank'] . "" . $character['character_craft'] . "" . $character['dragon_name'] . "" . $character['dragon_color'] . "" . $character['player_name'] . "
\n"; } else if( $_GET['list'] == "Crafters" ) { $wings = DB::query("SELECT player_name, player_info.player_id, character_info.character_id, character_name, character_age, character_rank, character_craft, dragon_name, dragon_color, dragon_wing FROM character_info LEFT JOIN dragon_info ON dragon_info.character_id = character_info.character_id JOIN player_info ON player_info.player_id = character_info.player_id WHERE dragon_id IS NULL AND character_rank != 'Candidate' ORDER BY character_rank DESC"); $actve_wing = ""; $first_wing = true; echo "

Crafters

\n"; $headers = array("Name","Age","Rank","Craft","Writer"); foreach( $wings as $character ) { if( $character['character_rank'] != $active_wing ) { $active_wing = $character['character_rank']; if( !$first_wing ) { echo "\n"; } else { $first_wing = false; } echo "

" . $active_wing . "

\n"; echo "\n"; echo "\n"; foreach( $headers as $title ) { echo "\n"; } echo "\n"; } echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; } echo "
" . $title . "
" . $character['character_name'] . "" . $character['character_age'] . "" . $character['character_rank'] . "" . $character['character_craft'] . "" . $character['player_name'] . "
\n"; } else if( $_GET['list'] == "Pets" ) { $wings = DB::query("SELECT player_name, player_info.player_id, character_info.character_id, character_name, pet_name, pet_species, pet_id FROM pet_info JOIN character_info on pet_info.character_id = character_info.character_id JOIN player_info ON player_info.player_id = pet_info.player_id ORDER BY pet_species ASC"); $actve_wing = ""; $first_wing = true; echo "

Pets

\n"; $headers = array("Name","Owner","Writer"); foreach( $wings as $character ) { if( $character['pet_species'] != $active_wing ) { $active_wing = $character['pet_species']; if( !$first_wing ) { echo "\n"; } else { $first_wing = false; } echo "

" . $active_wing . "

\n"; echo "\n"; echo "\n"; foreach( $headers as $title ) { echo "\n"; } echo "\n"; } echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; } echo "
" . $title . "
" . $character['pet_name'] . "" . $character['character_name'] . "" . $character['player_name'] . "
\n"; } ?>