AddCheckBox */
var $ShowServers;
var $ShowTerminals;
var $ShowWorkstations;
var $ShowWinWorkstations;
var $ShowPrinters;
var $ShowDevices;
var $ShowPhones;
/* Subsearch checkbox */
var $SubSearch;
var $parent ;
var $ui ;
function divListSystem ($config,$parent)
{
MultiSelectWindow::MultiSelectWindow($config,"System");
$this->parent = $parent;
$this->ui = get_userinfo();
/* Set list strings */
$this->SetTitle(_("List of systems"));
$this->SetSummary(_("List of systems"));
/* Result page will look like a headpage */
$this->SetHeadpageMode();
$this->SetInformation(_("This menu allows you to add, remove and change the properties of specific systems. You can only add systems which have already been started once."));
$this->EnableAplhabet (true);
/* Disable buttonsm */
$this->EnableCloseButton(false);
$this->EnableSaveButton (false);
/* Dynamic action col, depending on snapshot icons */
$action_col_size = 50;
if($this->parent->snapshotEnabled()){
$action_col_size += 38;
}
/* set Page header */
$this->AddHeader(array("string"=>" ","attach"=>"style='width:20px;'"));
$this->AddHeader(array("string"=>_("System / Department")));
$this->AddHeader(array("string"=>_("Actions"),"attach"=>"style='width:".$action_col_size."px;border-right:0px;'"));
/* Text ,Value ,Name ,Is selected */
$this->AddCheckBox("ShowServers", _("Select to see servers"), _("Show servers"), true);
$this->AddCheckBox("ShowTerminals", _("Select to see Linux terminals"), _("Show terminals") , true);
$this->AddCheckBox("ShowWorkstations", _("Select to see Linux workstations"), _("Show workstations"), true);
$this->AddCheckBox("ShowWinWorkstations", _("Select to see MicroSoft Windows based workstations"), _("Show windows based workstations"),true);
$this->AddCheckBox("ShowPrinters", _("Select to see network printers"), _("Show network printers") ,true);
$this->AddCheckBox("ShowPhones", _("Select to see VOIP phones"), _("Show phones") , true);
$this->AddCheckBox("ShowDevices", _("Select to see network devices"), _("Show network devices"), true);
/* Add SubSearch checkbox */
$this->AddCheckBox(SEPERATOR);
$this->AddCheckBox("SubSearch", _("Select to search within subtrees"), _("Ignore subtrees"), false);
/* Name ,Text ,Default , Connect with alphabet */
$this->AddRegex ("Regex", _("Display systems matching"),"*" , true);
$this->AddRegex ("UserRegex", _("Display systems of user"), "*" , false, "images/search_user.png");
}
function GenHeader()
{
/* Prepare departments,
which are shown in the listbox on top of the listbox
*/
$options= "";
foreach ($this->config->idepartments as $key => $value){
if ($this->selectedBase == $key){
$options.= "";
} else {
$options.= "";
}
}
$listhead = "