Location: PHPKode > projects > AppForMap > appformap/includes/tabs.php
<? $num_tabs=0;
for ($i = 0; $i <= sizeof($mainTabStatus); $i ++)
{
	if ($mainTabStatus[$i]==true) $num_tabs++;
}
$num_tabs2=0;
for ($i = 0; $i <= sizeof($secondaryTabStatus); $i ++)
{
	if ($secondaryTabStatus[$i]==true) $num_tabs2++;
}
echo "<input type='hidden' name='flag' value=''>";
echo "<input type='hidden' name='tab' value=''>";
echo "<div id='maintabs' class='flags' style='position: absolute;left:300;top:0px;width:".($toolbarWidth+5)."'>";

if ($mainTabStatus[1]==true) echo "<div style='float: left; position: relative;width:".($toolbarWidth/$num_tabs)."'><div  id='tab1' class='tab-button' onclick='javascript:syn(1,0);'>".$mainTabName[1]."</div></div>";
else echo "<div id='tab1'></div>";

if ($mainTabStatus[2]==true) echo "<div  style='float: left; position: relative;width:".($toolbarWidth/$num_tabs)."'><div id='tab2' class='tab-button' onclick='javascript:syn(2,0);'>".$mainTabName[2]."</div></div>";
else echo "<div id='tab2'></div>";

if ($mainTabStatus[3]==true) echo "<div  style='float: left; position: relative;width:".($toolbarWidth/$num_tabs)."'><div id='tab3' class='tab-button' onclick='javascript:syn(3,0);'>".$mainTabName[3]."</div></div>";
else echo "<div id='tab3'></div>";

if ($mainTabStatus[4]==true) echo "<div  style='float: left; position: relative;width:".($toolbarWidth/$num_tabs)."'><div id='tab4' class='tab-button' onclick='javascript:syn(4,0);'>".$mainTabName[4]."</div></div>";
else echo "<div id='tab4'></div>";

if ($mainTabStatus[5]==true) echo "<div  style='float: left; position: relative;width:".($toolbarWidth/$num_tabs)."'><div id='tab5' class='tab-button' onclick='javascript:syn(5,0);'>".$mainTabName[5]."</div></div>";
else echo "<div id='tab5'></div>";

if ($mainTabStatus[6]==true) echo "<div  style='float: left; position: relative;width:".($toolbarWidth/$num_tabs)."'><div id='tab6' class='tab-button' onclick='javascript:syn(6,0);'>".$mainTabName[6]."</div></div>";
else echo "<div id='tab6'></div>";

echo "</div>";

echo "<div id='secondarytabs' class='flags' style='position: absolute;left:0;top:0px;width:300px'>";

if ($secondaryTabStatus[1]==true) echo "<div style='float: left; position: relative;width:".(100/$num_tabs2)."%;'><div  id='tablayer' class='tab-button' onclick='javascript:syn(\"layer\",1);'>".$secondaryTabName[1]."</div></div>";
else echo "<div id='tablayer'></div>";

if ($secondaryTabStatus[2]==true) echo "<div style='float: left; position: relative;width:".(100/$num_tabs2)."%;'><div id='tablegend' class='tab-button' onclick='javascript:syn(\"legend\",1);'>".$secondaryTabName[2]."</div></div>";
else echo "<div id='tablegend'></div>";

if ($secondaryTabStatus[3]==true) echo "<div style='float: left; position: relative;width:".(100/$num_tabs2)."%;'><div id='tabquery' class='tab-button' onclick='javascript:syn(\"query\",1);'>".$secondaryTabName[3]."</div></div>";
else echo "<div style='display:none' id='tabquery'></div>";

if ($secondaryTabStatus[4]==true) echo "<div style='float: left; position: relative;width:".(100/$num_tabs2)."%;'><div id='tabdigi' class='tab-button' onclick='javascript:syn(\"digi\",1);'>".$secondaryTabName[4]."</div></div>";
else echo "<div id='tabdigi'></div>";

if ($secondaryTabStatus[5]==true) echo "<div style='float: left; position: relative;width:".(100/$num_tabs2)."%;'><div id='tabfind' class='tab-button' onclick='javascript:syn(\"find\",1);'>".$secondaryTabName[5]."</div></div>";
else echo "<div style='display:none' id='tabfind'></div>";

if ($secondaryTabStatus[6]==true) echo "<div style='float: left; position: relative;width:".(100/$num_tabs2)."%;'><div id='tabref' class='tab-button' onclick='javascript:syn(\"ref\",1);'>".$secondaryTabName[6]."</div></div>";
else echo "<div style='display:none' id='tabref'></div>
</div>";
?>
Return current item: AppForMap