This is my first real venture into the world of PHP, and a nice boss progression script seemed like a great and simple start. I've learned a lot from writing this, and am very pleased with its current iteration, and look to improve it even more. I tried to make it simple for anyone to use, as far as customization/configuration and how information is displayed. One thing also that it does differently from the others (that I have seen, atleast!), is that you can show the status of a normal mode kill, as well as a hard mode. If there is no hard mode available, it is simply grayed out.
LIVE DEMO: http://www.corestonemaul.com/
Attachement: shows all zones enabled, with various settings.
///////////////////////////////////////////////////////
// dPROGRESS - FOR WORLD OF WARCRAFT --------------- //
// //
// Script use to display progression of a guild in //
// the game World of Warcraft. //
// - Dekthro //
// www.derekhighet.com //
// 25/10 Man conversion, with table formatting //
// and collapsing instance lists by: //
// Creamfilled of Sargeras //
// //
///////////////////////////////////////////////////////
// - CONFIGURATION ----------------------------------//
//Hide certain zones? 1 = show 0 = hide
#-----------------------------------------------------#
$status = array(
'icecrown' => '1',
'argent' => '1',
'ulduar' => '1',
'eye' => '0',
'obsidian' => '0',
'naxxramas' => '0',
'vault' => '0'
);
//Defining bosses and their status
#-----------------------------------------------------#
// 1 = Dead 0 = Alive x = No Hard Mode
//ZONE////////////////BOSS//////////////////Norm25//Hard25//Norm10//Hard10
$icecrown = array(
array ('Lord Marrowgar', '0', '0', '1', '0'),
array ('Deathwhisper', '0', '0', '1', '0'),
array ('Gunship Battle', '0', '0', '1', '0'),
array ('Saurfang', '0', '0', '1', '0'),
array ('Festergut', '0', '0', '0', '0'),
array ('Rotface', '0', '0', '0', '0'),
array ('Prof Putricide', '0', '0', '0', '0'),
array ('Blood Princes', '0', '0', '0', '0'),
array ('Lana\'thel', '0', '0', '0', '0'),
array ('Valithria', '0', '0', '0', '0'),
array ('Sindragosa', '0', '0', '0', '0'),
array ('The Lich King', '0', '0', '0', '0')
);
$argent = array(
array ('Gormok', '1', '0', '1', '0'),
array ('Acidmaw', '1', '0', '1', '0'),
array ('Dreadscale', '1', '0', '1', '0'),
array ('Icehowl', '1', '0', '1', '0'),
array ('Lord Jaraxxus', '1', '0', '1', '0'),
array ('Edyis Darkbane', '1', '0', '1', '0'),
array ('Fjola Lightbane', '1', '0', '1', '0'),
array ('Anub\'arak', '1', '0', '1', '0')
);
$ulduar = array(
array ('Flame Leviathan', '1', '1', '1', '0'),
array ('Razorscale', '1', '0', '1', '0'),
array ('Ignus', '1', '0', '1', '0'),
array ('XT-002', '1', '0', '1', '1'),
array ('Iron Council', '1', '0', '1', '1'),
array ('Kologarn', '1', '0', '1', '1'),
array ('Auraiya', '0', '0', '1', '1'),
array ('Hodir', '0', '0', '1', '0'),
array ('Thorim', '0', '0', '0', '0'),
array ('Freya', '0', '0', '1', '1'),
array ('Mimiron', '0', '0', '0', '0'),
array ('General Verax', '0', '0', '0', '0'),
array ('Yogg-Saron', '0', '0', '0', '0'),
array ('Algalon', '0', '0', '0', '0')
);
$eye = array(
array ('Malygos', '1', 'x', '1', 'x')
);
$obsidian = array(
array ('Sartharion', '1', 'x', '1', 'x'),
array ('+1 Drake', '0', 'x', '0', 'x'),
array ('+2 Drakes', '0', 'x', '0', 'x'),
array ('+3 Drakes', '0', 'x', '0', 'x')
);
$naxxramas = array(
array ('Anub\'Rekhan', '1', 'x', '1', 'x'),
array ('Faerlina', '1', 'x', '1', 'x'),
array ('Maexxna', '1', 'x', '1', 'x'),
array ('Noth', '1', 'x', '1', 'x'),
array ('Heigan', '1', 'x', '1', 'x'),
array ('Loatheb', '1', 'x', '1', 'x'),
array ('Razuvious', '1', 'x', '1', 'x'),
array ('Gothik', '1', 'x', '1', 'x'),
array ('Four Horsemen', '1', 'x', '1', 'x'),
array ('Patchwerk', '1', 'x', '1', 'x'),
array ('Grobbulus', '1', 'x', '1', 'x'),
array ('Gluth', '1', 'x', '1', 'x'),
array ('Thaddius', '1', 'x', '1', 'x'),
array ('Sapphiron', '1', 'x', '1', 'x'),
array ('Kel\'Thuzad', '1', 'x', '1', 'x')
);
$vault = array(
array ('Archavon', '1', 'x', '1', 'x'),
array ('Emalon', '1', 'x', '1', 'x'),
array ('Koralon', '1', 'x', '1', 'x')
);
//CSS Styling
#-----------------------------------------------------#
//CSS foundation for the markers
$cssbase = "style='font-size: 9px; border: 1px solid; font-family: Verdana, Geneva, sans-serif; margin: 0px; padding-top: 0px; padding-right: 2px; padding-bottom: 0px; padding-left: 2px;";
//Normal 10 alive
$Nlive10 = $cssbase."text-align: right; float: right; border-color: #999; background-color: #666; color: #FFF; margin-left: 1px; margin-right: 1px; opacity: .5'";
//Normal 10 dead
$Ndead10 = $cssbase."text-align: right; float: right; border-color:#CA0000; background-color: #4F0000; color: #FFF; margin-left: 1px; margin-right: 1px'";
//Hard 10 alive
$Hlive10 = $cssbase."text-align: right; float: right; background-color: #7A6181; color: #FFF; border-color:#B57DAE; opacity: .5'";
//Hard 10 dead
$Hdead10 = $cssbase."text-align: right; float: right; background-color: #4F0000; border-color: #CF0000; color: #FFF'";
//No 10 Hard
$exclude10 = $cssbase."text-align: right; float: right; opacity: .2'";
//Normal 25 alive
$Nlive = $cssbase."text-align: left; float: left; border-color: #999; background-color: #666; color: #FFF; margin-left: 1px; margin-right: 0px; opacity: .5'";
//Normal 25 dead
$Ndead = $cssbase."text-align: left; float: left; border-color:#CA0000; background-color: #4F0000; color: #FFF; margin-left: 1px; margin-right: 0px'";
//Hard 25 alive
$Hlive = $cssbase."text-align: left; float: left; clear: both; background-color: #7A6181; color: #FFF; border-color:#B57DAE; opacity: .5'";
//Hard 25 dead
$Hdead = $cssbase."text-align: left; float: left; clear: both; background-color: #4F0000; border-color: #CF0000; color: #FFF; text-shadow: 0 0 0.2em #CF0000'";
//No Hard
$exclude = $cssbase."text-align: left; float: left; opacity: .2'";
//Boss name
$boss = "style='clear: both; margin-bottom: 3px; font-family: Verdana, Geneva, sans-serif; font-size: 10px;left: -1px; text-align: center'";
//Zone name
$header = "style='text-align: center; clear: both; margin-top: 6px; margin-bottom: 3px; font-size: 10px; font-weight: bold; font-family: Verdana, Geneva, sans-serif; border-bottom-width: thin; border-bottom-style: solid; border-bottom-color: #999; display: block'";
////////////////////////////////////////////
// END CONFIGURATION -------------------- //
////////////////////////////////////////////
$zonevar = array ('icecrown', 'argent', 'ulduar', 'eye', 'obsidian', 'naxxramas', 'vault');
$zonename = array (
'icecrown' => 'Icecrown Citadel',
'argent' => 'Argent Coliseum',
'ulduar' => 'Ulduar',
'eye' => 'Eye of Eternity',
'obsidian' => 'Obsidian Sanctum',
'naxxramas' => 'Naxxramas',
'vault' => 'Vault of Archavon'
);
//How many zones exist
$total_zones = count($zonevar);
//Define the JavaScript that will allow the boxes to toggle
echo "<script type='text/javascript'>";
echo "function gE(id) { return document.getElementById(id); }";
echo "function togglevis(id) {";
echo " gE(id).style.display = (gE(id).style.display == \"inline\") ? \"none\" : \"inline\";";
echo "}";
echo "</script>";
//Display it all, with one piece of code?
foreach ($zonevar as $zoneVal){
if ($status[$zoneVal] == '1'){
Echo "<table onclick=\"togglevis('box".$zoneVal."');\" style='table-layout:fixed;width: 160px;border-collapse: collapse;border-spacing: 0px;padding:0px;white-space:nowrap; cursor: s-resize'><div ".$header."><tr style='hight:30px;left:-2px'><td style= 'width: 30px; border-collapse:collapse; text-align: center'><span style='font-size: 9px; border: 1px solid; font-family: Verdana, Geneva, sans-serif; margin: 0px; padding-top: 0px; padding-right: 2px; padding-bottom: 0px; padding-left: 2px; text-align: center; border-color:#CA0000; background-color: #4F0000; color: #FFF; margin-left: auto; margin-right: auto'>25</span></td><td style= 'text-align: center;border-collapse:collapse;width:100px'><span ".$header.">".$zonename[$zoneVal]."</span></td><td style= 'width: 30px;border-collapse:collapse; text-align: center'><span style='font-size: 9px; border: 1px solid; font-family: Verdana, Geneva, sans-serif; margin: 0px; padding-top: 0px; padding-right: 2px; padding-bottom: 0px; padding-left: 2px; text-align: center; border-color:#CA0000; background-color: #4F0000; color: #FFF; margin-left: auto; margin-right: auto'>10</span></td></tr></div></table>";
Echo "<table id=\"box".$zoneVal."\" style='display: none; table-layout:fixed;width: 160px;border-collapse: collapse;border-spacing: 0px;padding:0px;white-space:nowrap'>";
foreach($$zoneVal as $value){
$normal_mode = ($value['1'] == '1') ? "<span ".$Ndead.">N</span></td>" : "<span ".$Nlive.">N</span></td>";
echo "<div ".$boss."><tr>";
if($value['2'] == '0'){
echo"<td style= 'width: 30px;border-collapse:collapse'><span ".$Hlive.">H</span>";
}
elseif($value['2'] == '1'){
echo"<td style= 'width: 30px;border-collapse:collapse'><span ".$Hdead.">H</span>";
}
else{
echo"<td style= 'width: 30px;border-collapse:collapse'><span ".$exclude.">H</span>";
}
echo $normal_mode."<td style= 'text-align: center;border-collapse:collapse; width:100px'><span ".$boss.">". $value[0]. "</span></td>";
if($value['4'] == '0'){
echo"<td style= 'width: 30px;border-collapse:collapse'><span ".$Hlive10.">H</span>";
}
elseif($value['4'] == '1'){
echo"<td style= 'width: 30px;border-collapse:collapse'><span ".$Hdead10.">H</span>";
}
else{
echo"<td style= 'width: 30px;border-collapse:collapse'><span ".$exclude10.">H</span>";
}
if($value['3'] == '1'){
echo"<span ".$Ndead10.">N</span></td></tr></div>";
}
else{
echo"<span ".$Nlive10.">N</span></td></tr></div>";
}
}
echo "</table>";
}
}
echo "<br><span style='clear: both; margin-bottom: 3px; font-family: Verdana, Geneva, sans-serif; font-size: 10px;left: -1px; display: block; text-align: center'><i>Click zone to show/hide kills</i></span>";
I tried to make it attractive and noticable with just the use of CSS so that people would not be obligated to download additional files, and could simply copy, paste, and get an enjoyable result.
Planned features:
-Auto collapse dungeons that are fully completed
Ideas:
-Boss HP bars, to show the lowest % the guild had gotten a boss to
-10 man mode display? Not sure how to incorporate it all cleanly, maybe another box that is just [10].
I'm open to suggestions, since this is pure learning for me, I'd be more than happy to explore other ideas. Coding optimization is also welcome, for the same reason. ;D
Really nice, keep up the good work.
Just simply add ;p the ice crown bosses, and since the hard mode is going to be a different instance, add them all by default with HM!
easy way to incorporate the 10 and 25...
name one array argent10 and one argent25 then just replicate. Very simple fix there. And it looks really good..Thanks for the great work!
I liked the general look and feel of your Block, but needed something that allowed for 10 man instances as well as 25 man, so I made some modifications to add 10 man status on the right, and then center text between the 25 and 10 man statuses.
Of coarse, then I had sizing issues since that made the whole thing wider in general, and blocks wouldn't line up right, so I had to reformat the entire thing into a table as it built everything out.
I hope you don't mind terribly my rewrite if your code. Here's what I ended up with (as is in use at www.guild-evolution.com (http://www.guild-evolution.com)):
///////////////////////////////////////////////////////
// dPROGRESS - FOR WORLD OF WARCRAFT --------------- //
// //
// Script use to display progression of a guild in //
// the game World of Warcraft. //
// - Dekthro //
// www.derekhighet.com //
// 25/10 Man conversion, with table formatting by //
// Creamfilled of Sargeras //
///////////////////////////////////////////////////////
// - CONFIGURATION ----------------------------------//
//Hide certain zones? 1 = show 0 = hide
#-----------------------------------------------------#
$status = array(
'icecrown' => '1',
'argent' => '1',
'ulduar' => '1',
'eye' => '0',
'obsidian' => '0',
'naxxramas' => '0',
'vault' => '0'
);
//Defining bosses and their status
#-----------------------------------------------------#
// 1 = Dead 0 = Alive x = No Hard Mode
//ZONE////////////////BOSS//////////////////Norm25//Hard25//Norm10//Hard10
$icecrown = array(
array ('Lord Marrowgar', '0', '0', '0', '0'),
array ('Deathwhisper', '0', '0', '0', '0'),
array ('Gunship Battle', '0', '0', '0', '0'),
array ('Saurfang', '0', '0', '0', '0')
);
$argent = array(
array ('Gormok', '1', '0', '1', '0'),
array ('Acidmaw', '1', '0', '1', '0'),
array ('Dreadscale', '1', '0', '1', '0'),
array ('Icehowl', '1', '0', '1', '0'),
array ('Lord Jaraxxus', '1', '0', '1', '0'),
array ('Edyis Darkbane', '1', '0', '1', '0'),
array ('Fjola Lightbane', '1', '0', '1', '0'),
array ('Anub\'arak', '0', '0', '1', '0')
);
$ulduar = array(
array ('Flame Leviathan', '1', '1', '1', '0'),
array ('Razorscale', '1', '0', '1', '0'),
array ('Ignus', '1', '0', '1', '0'),
array ('XT-002', '1', '0', '1', '0'),
array ('Iron Council', '1', '0', '1', '0'),
array ('Kologarn', '1', '0', '1', '0'),
array ('Auraiya', '0', '0', '1', '0'),
array ('Hodir', '0', '0', '1', '0'),
array ('Thorim', '0', '0', '0', '0'),
array ('Freya', '0', '0', '0', '0'),
array ('Mimiron', '0', '0', '0', '0'),
array ('General Verax', '0', '0', '0', '0'),
array ('Yogg-Saron', '0', '0', '0', '0'),
array ('Algalon', '0', '0', '0', '0')
);
$eye = array(
array ('Malygos', '1', 'x', '1', 'x')
);
$obsidian = array(
array ('Sartharion', '1', 'x', '1', 'x'),
array ('+1 Drake', '0', 'x', '0', 'x'),
array ('+2 Drakes', '0', 'x', '0', 'x'),
array ('+3 Drakes', '0', 'x', '0', 'x')
);
$naxxramas = array(
array ('Anub\'Rekhan', '1', 'x', '1', 'x'),
array ('Faerlina', '1', 'x', '1', 'x'),
array ('Maexxna', '1', 'x', '1', 'x'),
array ('Noth', '1', 'x', '1', 'x'),
array ('Heigan', '1', 'x', '1', 'x'),
array ('Loatheb', '1', 'x', '1', 'x'),
array ('Razuvious', '1', 'x', '1', 'x'),
array ('Gothik', '1', 'x', '1', 'x'),
array ('Four Horsemen', '1', 'x', '1', 'x'),
array ('Patchwerk', '1', 'x', '1', 'x'),
array ('Grobbulus', '1', 'x', '1', 'x'),
array ('Gluth', '1', 'x', '1', 'x'),
array ('Thaddius', '1', 'x', '1', 'x'),
array ('Sapphiron', '1', 'x', '1', 'x'),
array ('Kel\'Thuzad', '1', 'x', '1', 'x')
);
$vault = array(
array ('Archavon', '1', 'x', '1', 'x'),
array ('Emalon', '1', 'x', '1', 'x'),
array ('Koralon', '1', 'x', '1', 'x')
);
//CSS Styling
#-----------------------------------------------------#
//CSS foundation for the markers
$cssbase = "style='font-size: 9px; border: 1px solid; font-family: Verdana, Geneva, sans-serif; margin: 0px; padding-top: 0px; padding-right: 2px; padding-bottom: 0px; padding-left: 2px;";
//Normal 10 alive
$Nlive10 = $cssbase."text-align: right; float: right; border-color: #999; background-color: #666; color: #FFF; margin-left: 1px; margin-right: 1px; opacity: .5'";
//Normal 10 dead
$Ndead10 = $cssbase."text-align: right; float: right; border-color:#CA0000; background-color: #4F0000; color: #FFF; margin-left: 1px; margin-right: 1px'";
//Hard 10 alive
$Hlive10 = $cssbase."text-align: right; float: right; background-color: #7A6181; color: #FFF; border-color:#B57DAE; opacity: .5'";
//Hard 10 dead
$Hdead10 = $cssbase."text-align: right; float: right; background-color: #CC00FF; border-color: #F0F; color: #FFF'";
//No 10 Hard
$exclude10 = $cssbase."text-align: right; float: right; opacity: .2'";
//Normal 25 alive
$Nlive = $cssbase."text-align: left; float: left; border-color: #999; background-color: #666; color: #FFF; margin-left: 1px; margin-right: 0px; opacity: .5'";
//Normal 25 dead
$Ndead = $cssbase."text-align: left; float: left; border-color:#CA0000; background-color: #4F0000; color: #FFF; margin-left: 1px; margin-right: 0px'";
//Hard 25 alive
$Hlive = $cssbase."text-align: left; float: left; clear: both; background-color: #7A6181; color: #FFF; border-color:#B57DAE; opacity: .5'";
//Hard 25 dead
$Hdead = $cssbase."text-align: left; float: left; clear: both; background-color: #4F0000; border-color: #CF0000; color: #FFF; text-shadow: 0 0 0.2em #CF0000'";
//No Hard
$exclude = $cssbase."text-align: left; float: left; opacity: .2'";
//Boss name
$boss = "style='clear: both; margin-bottom: 3px; font-family: Verdana, Geneva, sans-serif; font-size: 10px;left: -1px; text-align: center'";
//Zone name
$header = "style='text-align: center; clear: both; margin-top: 6px; margin-bottom: 3px; font-size: 10px; font-weight: bold; font-family: Verdana, Geneva, sans-serif; border-bottom-width: thin; border-bottom-style: solid; border-bottom-color: #999'";
////////////////////////////////////////////
// END CONFIGURATION -------------------- //
////////////////////////////////////////////
$zonevar = array ('icecrown', 'argent', 'ulduar', 'eye', 'obsidian', 'naxxramas', 'vault');
$zonename = array (
'icecrown' => 'Icecrown Citadel',
'argent' => 'Argent Coliseum',
'ulduar' => 'Ulduar',
'eye' => 'Eye of Eternity',
'obsidian' => 'Obsidian Sanctum',
'naxxramas' => 'Naxxramas',
'vault' => 'Vault of Archavon'
);
//How many zones exist
$total_zones = count($zonevar);
//Display it all, with one piece of code?
foreach ($zonevar as $zoneVal){
if ($status[$zoneVal] == '1'){
echo "<table style='table-layout:fixed;width: 160px;border-collapse: collapse;border-spacing: 0px;padding:0px;white-space:nowrap'><div ".$header."><tr style='hight:30px;left:-2px'><td style= 'width: 30px;border-collapse:collapse'><span ".$Ndead.">25</span></td><td style= 'text-align: center;border-collapse:collapse;width:100px'><span ".$header.">".$zonename[$zoneVal]."</span></td><td style= 'width: 30px;border-collapse:collapse'><span ".$Ndead10.">10</span></td></tr></div>";
foreach($$zoneVal as $value){
$normal_mode = ($value['1'] == '1') ? "<span ".$Ndead.">N</span></td>" : "<span ".$Nlive.">N</span></td>";
echo "<div ".$boss."><tr>";
if($value['2'] == '0'){
echo"<td style= 'width: 30px;border-collapse:collapse'><span ".$Hlive.">H</span>";
}
elseif($value['2'] == '1'){
echo"<td style= 'width: 30px;border-collapse:collapse'><span ".$Hdead.">H</span>";
}
else{
echo"<td style= 'width: 30px;border-collapse:collapse'><span ".$exclude.">H</span>";
}
echo $normal_mode."<td style= 'text-align: center;border-collapse:collapse; width:100px'><span ".$boss.">". $value[0]. "</span></td>";
if($value['4'] == '0'){
echo"<td style= 'width: 30px;border-collapse:collapse'><span ".$Hlive10.">H</span>";
}
elseif($value['4'] == '1'){
echo"<td style= 'width: 30px;border-collapse:collapse'><span ".$Hdead10.">H</span>";
}
else{
echo"<td style= 'width: 30px;border-collapse:collapse'><span ".$exclude10.">H</span>";
}
if($value['3'] == '1'){
echo"<span ".$Ndead10.">N</span></td></tr></div>";
}
else{
echo"<span ".$Nlive10.">N</span></td></tr></div>";
}
}
echo "</table>";
}
}
Hi Dekthro,
your code seems to give me this error:
8: Undefined index: 2
File: **/Themes/default/TPBlocks.template.php(48) : eval()'d code
Line: 106
I think its this part: if($value['2'] == '0'){
Well this sucks, I can't modify my original post.
So, here's my current code (haven't changed it much, but now zones are collapsible so as to not take up too much space. Make sure that the Box Type is PHPBox!
///////////////////////////////////////////////////////
// dPROGRESS - FOR WORLD OF WARCRAFT --------------- //
// //
// Script use to display progression of a guild in //
// the game World of Warcraft. //
// - Dekthro //
// www.derekhighet.com //
// 25/10 Man conversion, with table formatting //
// and collapsing instance lists by: //
// Creamfilled of Sargeras //
// //
///////////////////////////////////////////////////////
// - CONFIGURATION ----------------------------------//
//Hide certain zones? 1 = show 0 = hide
#-----------------------------------------------------#
$status = array(
'icecrown' => '1',
'argent' => '1',
'ulduar' => '1',
'eye' => '0',
'obsidian' => '0',
'naxxramas' => '0',
'vault' => '0'
);
//Defining bosses and their status
#-----------------------------------------------------#
// 1 = Dead 0 = Alive x = No Hard Mode
//ZONE////////////////BOSS//////////////////Norm25//Hard25//Norm10//Hard10
$icecrown = array(
array ('Lord Marrowgar', '0', '0', '1', '0'),
array ('Deathwhisper', '0', '0', '1', '0'),
array ('Gunship Battle', '0', '0', '1', '0'),
array ('Saurfang', '0', '0', '1', '0'),
array ('Festergut', '0', '0', '0', '0'),
array ('Rotface', '0', '0', '0', '0'),
array ('Prof Putricide', '0', '0', '0', '0'),
array ('Blood Princes', '0', '0', '0', '0'),
array ('Lana\'thel', '0', '0', '0', '0'),
array ('Valithria', '0', '0', '0', '0'),
array ('Sindragosa', '0', '0', '0', '0'),
array ('The Lich King', '0', '0', '0', '0')
);
$argent = array(
array ('Gormok', '1', '0', '1', '0'),
array ('Acidmaw', '1', '0', '1', '0'),
array ('Dreadscale', '1', '0', '1', '0'),
array ('Icehowl', '1', '0', '1', '0'),
array ('Lord Jaraxxus', '1', '0', '1', '0'),
array ('Edyis Darkbane', '1', '0', '1', '0'),
array ('Fjola Lightbane', '1', '0', '1', '0'),
array ('Anub\'arak', '1', '0', '1', '0')
);
$ulduar = array(
array ('Flame Leviathan', '1', '1', '1', '0'),
array ('Razorscale', '1', '0', '1', '0'),
array ('Ignus', '1', '0', '1', '0'),
array ('XT-002', '1', '0', '1', '1'),
array ('Iron Council', '1', '0', '1', '1'),
array ('Kologarn', '1', '0', '1', '1'),
array ('Auraiya', '0', '0', '1', '1'),
array ('Hodir', '0', '0', '1', '0'),
array ('Thorim', '0', '0', '0', '0'),
array ('Freya', '0', '0', '1', '1'),
array ('Mimiron', '0', '0', '0', '0'),
array ('General Verax', '0', '0', '0', '0'),
array ('Yogg-Saron', '0', '0', '0', '0'),
array ('Algalon', '0', '0', '0', '0')
);
$eye = array(
array ('Malygos', '1', 'x', '1', 'x')
);
$obsidian = array(
array ('Sartharion', '1', 'x', '1', 'x'),
array ('+1 Drake', '0', 'x', '0', 'x'),
array ('+2 Drakes', '0', 'x', '0', 'x'),
array ('+3 Drakes', '0', 'x', '0', 'x')
);
$naxxramas = array(
array ('Anub\'Rekhan', '1', 'x', '1', 'x'),
array ('Faerlina', '1', 'x', '1', 'x'),
array ('Maexxna', '1', 'x', '1', 'x'),
array ('Noth', '1', 'x', '1', 'x'),
array ('Heigan', '1', 'x', '1', 'x'),
array ('Loatheb', '1', 'x', '1', 'x'),
array ('Razuvious', '1', 'x', '1', 'x'),
array ('Gothik', '1', 'x', '1', 'x'),
array ('Four Horsemen', '1', 'x', '1', 'x'),
array ('Patchwerk', '1', 'x', '1', 'x'),
array ('Grobbulus', '1', 'x', '1', 'x'),
array ('Gluth', '1', 'x', '1', 'x'),
array ('Thaddius', '1', 'x', '1', 'x'),
array ('Sapphiron', '1', 'x', '1', 'x'),
array ('Kel\'Thuzad', '1', 'x', '1', 'x')
);
$vault = array(
array ('Archavon', '1', 'x', '1', 'x'),
array ('Emalon', '1', 'x', '1', 'x'),
array ('Koralon', '1', 'x', '1', 'x')
);
//CSS Styling
#-----------------------------------------------------#
//CSS foundation for the markers
$cssbase = "style='font-size: 9px; border: 1px solid; font-family: Verdana, Geneva, sans-serif; margin: 0px; padding-top: 0px; padding-right: 2px; padding-bottom: 0px; padding-left: 2px;";
//Normal 10 alive
$Nlive10 = $cssbase."text-align: right; float: right; border-color: #999; background-color: #666; color: #FFF; margin-left: 1px; margin-right: 1px; opacity: .5'";
//Normal 10 dead
$Ndead10 = $cssbase."text-align: right; float: right; border-color:#CA0000; background-color: #4F0000; color: #FFF; margin-left: 1px; margin-right: 1px'";
//Hard 10 alive
$Hlive10 = $cssbase."text-align: right; float: right; background-color: #7A6181; color: #FFF; border-color:#B57DAE; opacity: .5'";
//Hard 10 dead
$Hdead10 = $cssbase."text-align: right; float: right; background-color: #4F0000; border-color: #CF0000; color: #FFF'";
//No 10 Hard
$exclude10 = $cssbase."text-align: right; float: right; opacity: .2'";
//Normal 25 alive
$Nlive = $cssbase."text-align: left; float: left; border-color: #999; background-color: #666; color: #FFF; margin-left: 1px; margin-right: 0px; opacity: .5'";
//Normal 25 dead
$Ndead = $cssbase."text-align: left; float: left; border-color:#CA0000; background-color: #4F0000; color: #FFF; margin-left: 1px; margin-right: 0px'";
//Hard 25 alive
$Hlive = $cssbase."text-align: left; float: left; clear: both; background-color: #7A6181; color: #FFF; border-color:#B57DAE; opacity: .5'";
//Hard 25 dead
$Hdead = $cssbase."text-align: left; float: left; clear: both; background-color: #4F0000; border-color: #CF0000; color: #FFF; text-shadow: 0 0 0.2em #CF0000'";
//No Hard
$exclude = $cssbase."text-align: left; float: left; opacity: .2'";
//Boss name
$boss = "style='clear: both; margin-bottom: 3px; font-family: Verdana, Geneva, sans-serif; font-size: 10px;left: -1px; text-align: center'";
//Zone name
$header = "style='text-align: center; clear: both; margin-top: 6px; margin-bottom: 3px; font-size: 10px; font-weight: bold; font-family: Verdana, Geneva, sans-serif; border-bottom-width: thin; border-bottom-style: solid; border-bottom-color: #999; display: block'";
////////////////////////////////////////////
// END CONFIGURATION -------------------- //
////////////////////////////////////////////
$zonevar = array ('icecrown', 'argent', 'ulduar', 'eye', 'obsidian', 'naxxramas', 'vault');
$zonename = array (
'icecrown' => 'Icecrown Citadel',
'argent' => 'Argent Coliseum',
'ulduar' => 'Ulduar',
'eye' => 'Eye of Eternity',
'obsidian' => 'Obsidian Sanctum',
'naxxramas' => 'Naxxramas',
'vault' => 'Vault of Archavon'
);
//How many zones exist
$total_zones = count($zonevar);
//Define the JavaScript that will allow the boxes to toggle
echo "<script type='text/javascript'>";
echo "function gE(id) { return document.getElementById(id); }";
echo "function togglevis(id) {";
echo " gE(id).style.display = (gE(id).style.display == \"inline\") ? \"none\" : \"inline\";";
echo "}";
echo "</script>";
//Display it all, with one piece of code?
foreach ($zonevar as $zoneVal){
if ($status[$zoneVal] == '1'){
Echo "<table onclick=\"togglevis('box".$zoneVal."');\" style='table-layout:fixed;width: 160px;border-collapse: collapse;border-spacing: 0px;padding:0px;white-space:nowrap; cursor: s-resize'><div ".$header."><tr style='hight:30px;left:-2px'><td style= 'width: 30px; border-collapse:collapse; text-align: center'><span style='font-size: 9px; border: 1px solid; font-family: Verdana, Geneva, sans-serif; margin: 0px; padding-top: 0px; padding-right: 2px; padding-bottom: 0px; padding-left: 2px; text-align: center; border-color:#CA0000; background-color: #4F0000; color: #FFF; margin-left: auto; margin-right: auto'>25</span></td><td style= 'text-align: center;border-collapse:collapse;width:100px'><span ".$header.">".$zonename[$zoneVal]."</span></td><td style= 'width: 30px;border-collapse:collapse; text-align: center'><span style='font-size: 9px; border: 1px solid; font-family: Verdana, Geneva, sans-serif; margin: 0px; padding-top: 0px; padding-right: 2px; padding-bottom: 0px; padding-left: 2px; text-align: center; border-color:#CA0000; background-color: #4F0000; color: #FFF; margin-left: auto; margin-right: auto'>10</span></td></tr></div></table>";
Echo "<table id=\"box".$zoneVal."\" style='display: none; table-layout:fixed;width: 160px;border-collapse: collapse;border-spacing: 0px;padding:0px;white-space:nowrap'>";
foreach($$zoneVal as $value){
$normal_mode = ($value['1'] == '1') ? "<span ".$Ndead.">N</span></td>" : "<span ".$Nlive.">N</span></td>";
echo "<div ".$boss."><tr>";
if($value['2'] == '0'){
echo"<td style= 'width: 30px;border-collapse:collapse'><span ".$Hlive.">H</span>";
}
elseif($value['2'] == '1'){
echo"<td style= 'width: 30px;border-collapse:collapse'><span ".$Hdead.">H</span>";
}
else{
echo"<td style= 'width: 30px;border-collapse:collapse'><span ".$exclude.">H</span>";
}
echo $normal_mode."<td style= 'text-align: center;border-collapse:collapse; width:100px'><span ".$boss.">". $value[0]. "</span></td>";
if($value['4'] == '0'){
echo"<td style= 'width: 30px;border-collapse:collapse'><span ".$Hlive10.">H</span>";
}
elseif($value['4'] == '1'){
echo"<td style= 'width: 30px;border-collapse:collapse'><span ".$Hdead10.">H</span>";
}
else{
echo"<td style= 'width: 30px;border-collapse:collapse'><span ".$exclude10.">H</span>";
}
if($value['3'] == '1'){
echo"<span ".$Ndead10.">N</span></td></tr></div>";
}
else{
echo"<span ".$Nlive10.">N</span></td></tr></div>";
}
}
echo "</table>";
}
}
echo "<br><span style='clear: both; margin-bottom: 3px; font-family: Verdana, Geneva, sans-serif; font-size: 10px;left: -1px; display: block; text-align: center'><i>Click zone to show/hide kills</i></span>";
Updated the original post with the code. Edit time is turned off to keep the spam down. We need to come up with a better solution I guess. :(
Changed the old code to the new one. I'm not getting any errors now. I also edited the code for 10man only, cause my guild only does 10man raids. Thanks!
Dystopia of Kilrogg-EU (http://dystopia.odsign.eu/index.php)