ContextMenu);$x++)
{
$o .= " ".$this->ContextMenu[$x]."\n";
}
$o .= " window.triedToWriteMenus = false;\n window.contextMenu.writeMenus();\n return true;\n}\n";
}
return $o;
}
function Build()
{
global $imagesURL;
$btn_ids = Array();
$o = ''."\n";
$btn_ids = "'".implode("','", $btn_ids)."'";
$o .= '';
return $o;
}
function onLoadString()
{
return "";
}
}
class clsItemTabs
{
var $Tabs;
var $ItemCount;
function clsItemTabs()
{
$this->Tabs = array();
$this->ItemCount = array();
}
function SetItemCount($divname,$Value)
{
$this->ItemCount[$divname] = $Value;
}
function GetItemCount($divname)
{
return (int)$this->ItemCount[$divname];
}
function AddTab($Caption,$divname,$ItemCount,$selected,$numfunc="")
{
$t["caption"]=$Caption;
$t["divname"]=$divname;
$this->SetItemCount($divname,$ItemCount);
$t["selected"]=$selected;
$t["numfunc"]=$numfunc;
$this->Tabs[] = $t;
}
function TabItem($i)
{
global $imagesURL;
$t = $this->Tabs[$i];
if($t["selected"]==1)
{
$divimage="/divider_up.gif";
}
else
$divimage="/divider_dn.gif";
$div = $t["divname"];
$o .= "\n";
$o .= " ";
$o .= $t["caption"]."";
$func = $t["numfunc"];
if(is_numeric($func))
{
$total = $func;
}
else
{
if(function_exists($func))
{
$total = $func();
}
}
if(!is_numeric($total))
$total = $this->GetItemCount($div);
if($total==$this->GetItemCount($div))
{
$o .= "(".$this->GetItemCount($div).") | \n";
}
else
$o .= "(".$this->GetItemCount($div)." / ".$total.")\n";
return $o;
}
function tabRow()
{
$o = "";
$o .= "";
for($i=0;$iTabs);$i++)
{
$o .= $this->TabItem($i);
}
$o .= " | ";
//$o .= "";
//$o .= " | ";
$o .= "
";
return $o;
}
}
?>