/** __construct($name = '')
 		The basic constructor template for
 		index and search functions.
 	*/
 public function __construct($name = '')
 {
     $this->name = 'Image Management';
     // Call parent constructor
     parent::__construct($this->name);
     $this->menu[multicast] = $this->foglang[Multicast] . ' ' . $this->foglang[Image];
     $SizeServer = $_SESSION['FOG_FTP_IMAGE_SIZE'];
     if ($_REQUEST['id']) {
         $this->obj = $this->getClass('Image', $_REQUEST['id']);
         $this->subMenu = array("{$this->linkformat}#image-gen" => $this->foglang[General], "{$this->linkformat}#image-storage" => $this->foglang[Storage] . ' ' . $this->foglang[Group], $this->membership => $this->foglang['Membership'], $this->delformat => $this->foglang['Delete']);
         $this->notes = array($this->foglang[Images] => $this->obj->get('name'), $this->foglang[LastUploaded] => $this->obj->get('deployed'), $this->foglang[DeployMethod] => $this->obj->get('format') ? 'Partimage' : 'Partclone', $this->foglang[ImageType] => $this->obj->get('imagetype') ? $this->obj->get('imagetype') : $this->foglang[NoAvail], _('Primary Storage Group') => $this->obj->getStorageGroup()->get('name'));
     }
     $this->HookManager->processEvent('SUB_MENULINK_DATA', array('menu' => &$this->menu, 'submenu' => &$this->subMenu, 'id' => &$this->id, 'notes' => &$this->notes));
     // Header row
     $this->headerData = array('', '<input type="checkbox" name="toggle-checkbox" class="toggle-checkboxAction" checked/>', _('Image Name') . '<br /><small>' . _('Storage Group') . ': ' . _('O/S') . '</small><br /><small>' . _('Image Type') . '</small><br /><small>' . _('Partition') . '</small>', _('Image Size: ON CLIENT'));
     $SizeServer ? array_push($this->headerData, _('Image Size: ON SERVER')) : null;
     array_push($this->headerData, _('Format'), _('Uploaded'), _('Edit/Remove'));
     // Row templates
     $this->templates = array('${protected}', '<input type="checkbox" name="image[]" value="${id}" class="toggle-action" checked/>', '<a href="?node=' . $this->node . '&sub=edit&' . $this->id . '=${id}" title="' . _('Edit') . ': ${name} Last uploaded: ${deployed}">${name} - ${id}</a><br /><small>${storageGroup}:${os}</small><br /><small>${image_type}</small><br /><small>${image_partition_type}</small>', '${size}');
     $SizeServer ? array_push($this->templates, '${serv_size}') : null;
     array_push($this->templates, '${type}', '${deployed}', '<a href="?node=' . $this->node . '&sub=edit&' . $this->id . '=${id}" title="' . _('Edit') . '"><i class="fa fa-pencil"></i></a> <a href="?node=' . $this->node . '&sub=delete&' . $this->id . '=${id}" title="' . _('Delete') . '"><i class="fa fa-minus-circle"></i></a>');
     // Row attributes
     $this->attributes = array(array('width' => 5, 'class' => 'c'), array('width' => 16, 'class' => 'c'), array('width' => 50, 'class' => 'l'), array('width' => 50, 'class' => 'c'));
     $SizeServer ? array_push($this->attributes, array('width' => 50, 'class' => 'c')) : null;
     array_push($this->attributes, array('width' => 50, 'class' => 'c'), array('width' => 50, 'class' => 'c'), array('width' => 50, 'class' => 'c'));
 }
 public function __construct($name = '')
 {
     $this->name = 'FOG Configuration';
     parent::__construct($this->name);
     $this->menu = array('license' => $this->foglang['License'], 'kernel-update' => $this->foglang['KernelUpdate'], 'pxemenu' => $this->foglang['PXEBootMenu'], 'customize-edit' => $this->foglang['PXEConfiguration'], 'new-menu' => $this->foglang['NewMenu'], 'client-updater' => $this->foglang['ClientUpdater'], 'mac-list' => $this->foglang['MACAddrList'], 'settings' => $this->foglang['FOGSettings'], 'log' => $this->foglang['LogViewer'], 'config' => $this->foglang['ConfigSave'], 'http://www.sf.net/projects/freeghost' => $this->foglang['FOGSFPage'], 'http://fogproject.org' => $this->foglang['FOGWebPage']);
     $this->HookManager->processEvent('SUB_MENULINK_DATA', array('menu' => &$this->menu, 'submenu' => &$this->subMenu, 'id' => &$this->id, 'notes' => &$this->notes));
 }
 public function __construct($name = '')
 {
     $this->name = 'Database Schema Installer / Updater';
     parent::__construct($this->name);
     $this->menu = array();
     $this->subMenu = array();
 }
 public function __construct($name = '')
 {
     $this->name = 'Dashboard';
     parent::__construct($this->name);
     $this->menu = array();
     $this->subMenu = array();
     $this->notes = array();
 }
 public function __construct($name = '')
 {
     $this->name = 'Hardware Information';
     parent::__construct($this->name);
     $this->obj = $this->getClass('StorageNode', $_REQUEST[id]);
     $this->menu = array("?node=storage&sub=edit&id={$_REQUEST[id]}" => _('Edit Node'));
     $this->notes = array("{$this->foglang[Storage]} {$this->foglang[Node]}" => $this->obj->get('name'), 'IP' => $this->FOGCore->resolveHostname($this->obj->get('ip')), $this->foglang[Path] => $this->obj->get('path'));
 }
 public function __construct($name = '')
 {
     // Call parent constructor
     parent::__construct($name);
     // Header row
     $this->headerData = array(_('Name'), _('Email'), _('Delete'));
     // Row templates
     $this->templates = array('${name}', '${email}', sprintf('<a href="?node=%s&sub=delete&id=${id}" title="%s"><i class="fa fa-minus-circle fa-1x icon hand"></i></a>', $this->node, _('Delete')));
     $this->attributes = array(array('class' => 'l'), array('class' => 'l'), array('class' => 'r'));
 }
 public function __construct($name = '')
 {
     $this->name = 'Dashboard';
     // Call parent constructor
     parent::__construct($this->name);
     // Header Data
     unset($this->headerData);
     // Attributes
     $this->attributes = array(array());
     // Templates
     $this->templates = array('${page_desc}');
 }
 public function __construct($name = '')
 {
     $this->name = 'Plugin Management';
     // Call parent constructor
     parent::__construct($this->name);
     $this->menu = array('home' => $this->foglang[Home], 'activate' => $this->foglang[ActivatePlugins], 'install' => $this->foglang[InstallPlugins], 'installed' => $this->foglang[InstalledPlugins]);
     $this->HookManager->processEvent('SUB_MENULINK_DATA', array('menu' => &$this->menu, 'submenu' => &$this->subMenu, 'id' => &$this->id, 'notes' => &$this->notes));
     // Header row
     $this->headerData = array(_('Plugin Name'), _('Description'), _('Location'), $_REQUEST['sub'] == 'installed' || $_REQUEST['sub'] == 'install' ? _('Remove') : null);
     //Row templates
     $this->templates = array('<a href="?node=plugin&sub=${type}&run=${encname}&${type}=${encname}" title="Plugin: ${name}"><img alt="${name}" src="${icon}"/></a>', '${desc}', '${location}', $_REQUEST['sub'] == 'installed' || $_REQUEST['sub'] == 'install' ? '<a href="?node=plugin&sub=removeplugin&rmid=${pluginid}"><i class="icon fa fa-minus-circle" title="Remove Plugin"></i></a>' : null);
     //Row attributes
     $this->attributes = array(array(), array(), array(), $_REQUEST['sub'] == 'installed' || $_REQUEST['sub'] == 'install' ? array() : null);
 }
 public function __construct($name = '')
 {
     $this->name = 'Service Configuration';
     parent::__construct($name);
     $servicelink = "?node={$this->node}&sub=edit";
     $this->menu = array("?node={$this->node}#home" => $this->foglang[Home], "{$servicelink}#autologout" => "{$this->foglang[Auto]} {$this->foglang[Home]}", "{$servicelink}#clientupdater" => $this->foglang[ClientUpdater], "{$servicelink}#dircleanup" => $this->foglang[DirectoryCleaner], "{$servicelink}#displaymanager" => sprintf($this->foglang[SelManager], $this->foglang[Display]), "{$servicelink}#greenfog" => $this->foglang[GreenFOG], "{$servicelink}#hostregister" => $this->foglang[HostRegistration], "{$servicelink}#hostnamechanger" => $this->foglang[HostnameChanger], "{$servicelink}#printermanager" => sprintf($this->foglang[SelManager], $this->foglang[Printer]), "{$servicelink}#snapinclient" => $this->foglang[SnapinClient], "{$servicelink}#taskreboot" => $this->foglang[TaskReboot], "{$servicelink}#usercleanup" => $this->foglang[UserCleanup], "{$servicelink}#usertracker" => $this->foglang[UserTracker]);
     $this->HookManager->processEvent('SUB_MENULINK_DATA', array('menu' => &$this->menu, 'submenu' => &$this->subMenu, 'id' => &$this->id, 'notes' => &$this->notes));
     // Header row
     $this->headerData = array(_('Username'), _('Edit'));
     // Row templates
     $this->templates = array(sprintf('<a href="?node=%s&sub=edit">${name}</a>', $this->node), sprintf('<a href="?node=%s&sub=edit"><i class="icon fa fa-pencil"></i></a>', $this->node));
     // Row attributes
     $this->attributes = array(array(), array('class' => 'c', 'width' => '55'));
 }
 public function __construct($name = '')
 {
     $this->name = 'Access Management';
     // Call parent constructor
     parent::__construct($this->name);
     if ($_REQUEST['id']) {
         $this->obj = $this->getClass('Accesscontrol', $_REQUEST[id]);
     }
     // Header row
     $this->headerData = array('<input type="checkbox" name="toggle-checkbox" class="toggle-checkboxAction" checked/>', _('Name'), _('Description'), _('User/Group'));
     // Row templates
     $this->templates = array('<input type="checkbox" name="accesscontrol[]" value="${id}" class="toggle-action" checked/>', '${name} ${id}', '${desc} ${other}', '${user} ${group}');
     // Row Attributes
     $this->attributes = array(array('class' => 'c', 'width' => 16), array(), array(), array());
 }
 public function __construct($name = '')
 {
     $this->name = 'Task Management';
     parent::__construct($this->name);
     $this->menu = array('search' => $this->foglang[NewSearch], 'active' => $this->foglang[ActiveTasks], 'listhosts' => sprintf($this->foglang[ListAll], $this->foglang[Hosts]), 'listgroups' => sprintf($this->foglang[ListAll], $this->foglang[Groups]), 'active-multicast' => $this->foglang[ActiveMCTasks], 'active-snapins' => $this->foglang[ActiveSnapins], 'scheduled' => $this->foglang[ScheduledTasks]);
     $this->subMenu = array();
     $this->notes = array();
     $this->HookManager->processEvent('SUB_MENULINK_DATA', array('menu' => &$this->menu, 'submenu' => &$this->subMenu, 'id' => &$this->id, 'notes' => &$this->notes));
     // Header row
     $this->headerData = array(_('Started By:'), _('Hostname<br><small>MAC</small>'), '', '', _('Start Time'), _('Status'), _('Actions'));
     // Row templates
     $this->templates = array('${startedby}', '<p><a href="?node=host&sub=edit&id=${host_id}" title="' . _('Edit Host') . '">${host_name}</a></p><small>${host_mac}</small>', '', '${details_taskname}', '<small>${time}</small>', '<span class="icon icon-${icon_state}" title="${state}"></span> <span class="icon icon-${icon_type}" title="${type}"></span>', '${columnkill}');
     // Row attributes
     $this->attributes = array(array('width' => 65, 'class' => 'l', 'id' => 'host-${host_id}'), array('width' => 120, 'class' => 'l'), array(), array('width' => 110, 'class' => 'l'), array('width' => 70, 'class' => 'r'), array('width' => 100, 'class' => 'r'), array('width' => 50, 'class' => 'r'), array());
 }
 public function __construct($name = '')
 {
     $this->name = 'Host Management';
     // Call parent constructor
     parent::__construct($this->name);
     $this->menu = array();
     $this->subMenu = array();
     $this->notes = array();
     // Header Data
     $this->headerData = array($this->foglang['ID'], $this->foglang['Name'], $this->foglang['MAC'], $this->foglang['Image']);
     // Attributes
     $this->attributes = array(array(), array(), array(), array());
     // Templates
     $this->templates = array('${host_id}', '${host_name}', '${host_mac}', '<a href="index.php?node=${node}&sub=deploy&id=${host_id}"><i class="fa fa-arrow-down fa-2x"></i></a>');
 }
 public function __construct($name = '')
 {
     $this->name = 'Node Client Configuration';
     // Call parent constructor
     parent::__construct($name);
     if ($_REQUEST['id']) {
         $this->obj = $this->getClass('NodeJS', $_REQUEST['id']);
         $this->subMenu = array($this->linkformat = $this->foglang[General], $this->delformat = $this->foglang[Delete]);
     }
     // Header row
     $this->headerData = array('<input type="checkbox" name="toggle-checkbox" class="toggle-checkboxAction" checked/>', _('Name'), _('Port'), _('IP/Hostname'));
     // Row templates
     $this->templates = array('<input type="checkbox" name="nodeclient[]" value="${id}" class="toggle-action" checked/>', sprintf('<a href="?node=%s&sub=edit&id=${id}" title="%s">${name}</a>', $this->node, _('Edit')), '${port}', '${ip}');
     $this->attributes = array(array('class' => 'l'), array(), array('class' => 'r'));
 }
 public function __construct($name = '')
 {
     $this->name = 'LDAP Management';
     // Call parent constructor
     parent::__construct($name);
     if ($_REQUEST['id']) {
         $this->obj = $this->getClass('LDAP', $_REQUEST[id]);
         $this->subMenu = array("{$this->linkformat}" => $this->foglang[General], "{$this->delformat}" => $this->foglang[Delete]);
         $this->notes = array(_('LDAP Server Name') => $this->obj->get('name'), _('LDAP Server Address') => $this->obj->get('address'));
     }
     // Header row
     $this->headerData = array('<input type="checkbox" name="toggle-checkbox" class="toggle-checkboxAction"  checked/>', 'LDAP Server Name', 'LDAP Server Description', 'LDAP Server', 'Port');
     // Row templates
     $this->templates = array('<input type="checkbox" name="wolbroadcast[]" value="${id}" class="toggle-action" checked/>', '<a href="?node=ldap&sub=edit&id=${id}" title="Edit">${name}</a>', '${description}', '${address}', '${port}');
     $this->attributes = array(array('class' => 'c', 'width' => 16), array('class' => 'l'), array('class' => 'l'), array('class' => 'l'), array('class' => 'l'));
 }
 /** @function __construct() constructor
  * @param $name the name to send
  * @return void
  */
 public function __construct($name = '')
 {
     $this->name = 'Pushbullet Management';
     // Call parent constructor
     parent::__construct($this->name);
     $this->menu = array('list' => sprintf($this->foglang['ListAll'], _('Pushbullet Accounts')), 'add' => _('Link Pushbullet Account'));
     if ($_REQUEST['id']) {
         $this->obj = $this->getClass('Pushbullet', $_REQUEST[id]);
         unset($this->subMenu);
     }
     // Header row
     $this->headerData = array('<input type="checkbox" name="toggle-checkbox" class="toggle-checkboxAction" checked/>', _('Name'), _('Email'), _('Delete'));
     // Row templates
     $this->templates = array('<input type="checkbox" name="pushbullet[]" value="${id}" class="toggle-action" checked/>', '${name}', '${email}', sprintf('<a href="?node=%s&sub=delete&id=${id}" title="%s"><i class="fa fa-minus-circle fa-1x icon hand"></i></a>', $this->node, _('Delete')));
     $this->attributes = array(array('class' => 'c', 'width' => 16), array('class' => 'l'), array('class' => 'l'), array('class' => 'r'));
 }
 public function __construct($name = '')
 {
     $this->name = 'WOL Broadcast Management';
     // Call parent constructor
     parent::__construct($this->name);
     if ($_REQUEST['id']) {
         $this->obj = $this->getClass('Wolbroadcast', $_REQUEST[id]);
         $this->subMenu = array($this->linkformat => $this->foglang[General], $this->delformat => $this->foglang[Delete]);
         $this->notes = array(_('Broadcast Name') => $this->obj->get('name'), _('IP Address') => $this->obj->get('broadcast'));
     }
     // Header row
     $this->headerData = array('<input type="checkbox" name="toggle-checkbox" class="toggle-checkboxAction" checked/>', 'Broadcast Name', 'Broadcast IP');
     // Row templates
     $this->templates = array('<input type="checkbox" name="wolbroadcast[]" value="${id}" class="toggle-action" checked/>', '<a href="?node=wolbroadcast&sub=edit&id=${id}" title="Edit">${name}</a>', '${wol_ip}');
     $this->attributes = array(array('class' => 'c', 'width' => '16'), array('class' => 'l'), array('class' => 'r'));
 }
 public function __construct($name = '')
 {
     $this->name = 'Storage Management';
     parent::__construct($this->name);
     $this->menu = array('' => $this->foglang[AllSN], 'add-storage-node' => $this->foglang[AddSN], 'storage-group' => $this->foglang[AllSG], 'add-storage-group' => $this->foglang[AddSG]);
     if (in_array($_REQUEST[sub], array('edit', 'delete', 'delete-storage-node')) && $_REQUEST[id]) {
         $this->obj = $this->getClass('StorageNode', $_REQUEST[id]);
         $this->subMenu = array("?node={$this->node}&sub={$_REQUEST[sub]}&id={$_REQUEST[id]}" => $this->foglang[General], "?node={$this->node}&sub=delete-storage-node&id={$_REQUEST[id]}" => $this->foglang[Delete]);
         $this->notes = array("{$this->foglang[Storage]} {$this->foglang[Node]}" => $this->obj->get('name'), $this->foglang[Path] => $this->obj->get('path'));
     } else {
         if (in_array($_REQUEST[sub], array('edit-storage-group', 'delete-storage-group')) && $_REQUEST[id]) {
             $this->obj = $this->getClass('StorageGroup', $_REQUEST[id]);
             $this->subMenu = array("?node={$this->node}&sub={$_REQUEST[sub]}&id={$_REQUEST[id]}" => $this->foglang[General], "?node={$this->node}&sub=delete-storage-group&id={$_REQUEST[id]}" => $this->foglang[Delete]);
             $this->notes = array("{$this->foglang[Storage]} {$this->foglang[Group]}" => $this->obj->get('name'));
         }
     }
 }
 public function __construct($name = '')
 {
     $this->name = 'Printer Management';
     parent::__construct($this->name);
     if ($_REQUEST[id]) {
         $this->obj = $this->getClass('Printer', $_REQUEST[id]);
         $this->subMenu = array("{$this->linkformat}#{$this->node}-gen" => $this->foglang[General], $this->membership => $this->foglang[Membership], $this->delformat => $this->foglang[Delete]);
         $this->notes = array($this->foglang[Printer] => $this->obj->get('name'), $this->foglang[Type] => $this->obj->get('config'));
     }
     $this->HookManager->processEvent('SUB_MENULINK_DATA', array('menu' => &$this->menu, 'submenu' => &$this->subMenu, 'id' => &$this->id, 'notes' => &$this->notes));
     // Header row
     $this->headerData = array('<input type="checkbox" name="toggle-checkbox" class="toggle-checkboxAction" checked/>', 'Printer Name', 'Printer Type', 'Model', 'Port', 'File', 'IP', 'Edit');
     // Row templates
     $this->templates = array('<input type="checkbox" name="printer[]" value="${id}" class="toggle-action" checked/>', '<a href="?node=printer&sub=edit&id=${id}" title="Edit">${name}</a>', '${config}', '${model}', '${port}', '${file}', '${ip}', '<a href="?node=printer&sub=edit&id=${id}" title="Edit"><i class="icon fa fa-pencil"></i></a><a href="?node=printer&sub=delete&id=${id}" title="Delete"><i class="icon fa fa-minus-circle"></i></>');
     // Row attributes
     $this->attributes = array(array('class' => 'c', 'width' => 16), array(), array(), array(), array(), array(), array(), array('class' => 'c', 'width' => '55'));
 }
 public function __construct($name = '')
 {
     $this->name = 'Group Management';
     // Call parent constructor
     parent::__construct($this->name);
     if ($_REQUEST['id']) {
         $this->subMenu = array("{$this->linkformat}#group-general" => $this->foglang['General'], "{$this->linkformat}#group-tasks" => $this->foglang['BasicTasks'], "{$this->linkformat}#group-image" => $this->foglang['ImageAssoc'], "{$this->linkformat}#group-snap-add" => "{$this->foglang[Add]} {$this->foglang[Snapins]}", "{$this->linkformat}#group-snap-del" => "{$this->foglang[Remove]} {$this->foglang[Snapins]}", "{$this->linkformat}#group-service" => "{$this->foglang[Service]} {$this->foglang[Settings]}", "{$this->linkformat}#group-active-directory" => $this->foglang['AD'], "{$this->linkformat}#group-printers" => $this->foglang['Printers'], $this->membership => $this->foglang['Membership'], $this->delformat => $this->foglang['Delete']);
         $this->obj = $this->getClass('Group', $_REQUEST['id']);
         $this->notes = array($this->foglang['Group'] => $this->obj->get('name'), $this->foglang['Members'] => $this->obj->getHostCount());
     }
     $this->HookManager->processEvent('SUB_MENULINK_DATA', array('menu' => &$this->menu, 'submenu' => &$this->subMenu, 'id' => &$this->id, 'notes' => &$this->notes));
     // Header row
     $this->headerData = array('<input type="checkbox" name="toggle-checkbox" class="toggle-checkboxAction" checked/>', _('Name'), _('Members'), _('Tasking'), _('Edit/Remove'));
     // Row templates
     $this->templates = array('<input type="checkbox" name="group[]" value="${id}" class="toggle-action" checked/>', sprintf('<a href="?node=group&sub=edit&%s=${id}" title="Edit">${name}</a>', $this->id), '${count}', sprintf('<a href="?node=group&sub=deploy&type=1&%s=${id}"><i class="icon fa fa-arrow-down" title="Download"></i></a> <a href="?node=group&sub=deploy&type=8&%s=${id}"><i class="icon fa fa-share-alt" title="Multi-cast"></i></a> <a href="?node=group&sub=edit&%s=${id}#group-tasks"><i class="icon fa fa-arrows-alt" title="Deploy"></i></a>', $this->id, $this->id, $this->id, $this->id, $this->id, $this->id), sprintf('<a href="?node=group&sub=edit&%s=${id}"><i class="icon fa fa-pencil" title="Edit"></i></a> <a href="?node=group&sub=delete&%s=${id}"><i class="icon fa fa-minus-circle" title="Delete"></i></a>', $this->id, $this->id, $this->id, $this->id, $this->id, $this->id));
     // Row attributes
     $this->attributes = array(array('width' => 16, 'class' => 'c'), array(), array('width' => 30, 'class' => 'c'), array('width' => 90, 'class' => 'c'), array('width' => 50, 'class' => 'c'));
 }
 public function __construct($name = '')
 {
     $this->name = 'Snapin Management';
     // Call parent constructor
     parent::__construct($name);
     if ($_REQUEST['id']) {
         $this->obj = $this->getClass('Snapin', $_REQUEST[id]);
         $this->subMenu = array("{$this->linkformat}#snap-gen" => $this->foglang[General], "{$this->linkformat}#snap-storage" => "{$this->foglang[Storage]} {$this->foglang[Group]}", $this->membership => $this->foglang[Membership], $this->delformat => $this->foglang[Delete]);
         $this->notes = array($this->foglang[Snapin] => $this->obj->get('name'), $this->foglang[File] => $this->obj->get('file'));
     }
     $this->HookManager->processEvent('SUB_MENULINK_DATA', array('menu' => &$this->menu, 'submenu' => &$this->subMenu, 'id' => &$this->id, 'notes' => &$this->notes));
     // Header row
     $this->headerData = array('<input type="checkbox" name="toggle-checkbox" class="toggle-checkboxAction" checked/>', _('Snapin Name'), _('Storage Group'), '');
     // Row templates
     $this->templates = array('<input type="checkbox" name="snapin[]" value="${id}" class="toggle-action" checked/>', sprintf('<a href="?node=%s&sub=edit&%s=${id}" title="%s">${name}</a>', $this->node, $this->id, _('Edit')), '${storage_group}', sprintf('<a href="?node=%s&sub=edit&%s=${id}" title="%s"><i class="icon fa fa-pencil"></i></a> <a href="?node=%s&sub=delete&%s=${id}" title="%s"><i class="icon fa fa-minus-circle"></i></a>', $this->node, $this->id, _('Edit'), $this->node, $this->id, _('Delete')));
     // Row attributes
     $this->attributes = array(array('class' => 'c', 'width' => '16'), array(), array('class' => 'c', 'width' => '50'));
 }
 public function __construct($name = '')
 {
     $this->name = 'User Management';
     // Call parent constructor
     parent::__construct($this->name);
     if ($_REQUEST['id']) {
         $this->subMenu = array($this->linkformat => $this->foglang['General'], $this->delformat => $this->foglang['Delete']);
         $this->obj = $this->getClass('User', $_REQUEST['id']);
         $this->notes = array($this->foglang['User'] => $this->obj->get('name'));
     }
     $this->HookManager->processEvent('SUB_MENULINK_DATA', array('menu' => &$this->menu, 'submenu' => &$this->subMenu, 'id' => &$this->id, 'notes' => &$this->notes));
     // Header row
     $this->headerData = array('<input type="checkbox" name="toggle-checkbox" class="toggle-checkboxAction" checked/>', _('Username'), _('Edit'));
     // Row templates
     $this->templates = array('<input type="checkbox" name="user[]" value="${id}" class="toggle-action" checked/>', sprintf('<a href="?node=%s&sub=edit&%s=${id}" title="%s">${name}</a>', $this->node, $this->id, _('Edit User')), sprintf('<a href="?node=%s&sub=edit&%s=${id}" title="%s"><i class="icon fa fa-pencil"></i></a>', $this->node, $this->id, _('Edit User')));
     // Row attributes
     $this->attributes = array(array('class' => 'c', 'width' => '16'), array(), array('class' => 'c', 'width' => '55'));
 }
 public function __construct($name = '')
 {
     $this->name = 'Location Management';
     // Call parent constructor
     parent::__construct($this->name);
     if ($_REQUEST['id']) {
         $this->obj = $this->getClass('Location', $_REQUEST['id']);
         $this->subMenu = array("{$this->linkformat}" => $this->foglang[General], "{$this->delformat}" => $this->foglang[Delete]);
         $this->notes = array($this->foglang[Location] => $this->obj->get('name'), $this->foglang[Storage] . ' ' . $this->foglang[Group] => $this->obj->getStorageGroup());
         if ($this->obj->getStorageNode()->isValid()) {
             $this->notes[$this->foglang[Storage] . ' ' . $this->foglang[Node]] = $this->obj->getStorageNode();
         }
     }
     // Header row
     $this->headerData = array('<input type="checkbox" name="toggle-checkbox" class="toggle-checkboxAction" checked/>', 'Location Name', 'Storage Group', 'Storage Node', 'TFTP Server');
     // Row templates
     $this->templates = array('<input type="checkbox" name="location[]" value="${id}" class="toggle-action" checked/>', '<a href="?node=location&sub=edit&id=${id}" title="Edit">${name}</a>', '${storageGroup}', '${storageNode}', '${tftp}');
     $this->attributes = array(array('class' => 'c', 'width' => 16), array('class' => 'l'), array('class' => 'l'), array('class' => 'c'), array('class' => 'r'));
 }
 public function __construct($name = '')
 {
     $this->name = 'Host Management';
     parent::__construct($this->name);
     if ($_SESSION['Pending-Hosts']) {
         $this->menu[pending] = $this->foglang[PendingHosts];
     }
     $this->menu[export] = $this->foglang[ExportHost];
     $this->menu[import] = $this->foglang[ImportHost];
     if ($_REQUEST['id']) {
         $this->obj = $this->getClass('Host', $_REQUEST[id]);
         if ($this->obj->isValid()) {
             $this->subMenu = array("{$this->linkformat}#host-general" => $this->foglang[General], "{$this->linkformat}#host-grouprel" => $this->foglang[Groups]);
             if (!$this->obj->get('pending')) {
                 $this->subMenu = array_merge($this->subMenu, array("{$this->linkformat}#host-tasks" => $this->foglang[BasicTasks]));
             }
             $this->subMenu = array_merge($this->subMenu, array("{$this->linkformat}#host-active-directory" => $this->foglang[AD], "{$this->linkformat}#host-printers" => $this->foglang[Printers], "{$this->linkformat}#host-snapins" => $this->foglang[Snapins], "{$this->linkformat}#host-service" => "{$this->foglang[Service]} {$this->foglang[Settings]}", "{$this->linkformat}#host-hardware-inventory" => $this->foglang[Inventory], "{$this->linkformat}#host-virus-history" => $this->foglang[VirusHistory], "{$this->linkformat}#host-login-history" => $this->foglang[LoginHistory], "{$this->linkformat}#host-image-history" => $this->foglang[ImageHistory], "{$this->linkformat}#host-snapin-history" => $this->foglang[SnapinHistory], $this->delformat => $this->foglang[Delete]));
             $this->notes = array($this->foglang['Host'] => $this->obj->get('name'), $this->foglang['MAC'] => $this->obj->get('mac'), $this->foglang['Image'] => $this->obj->getImage()->get('name'), $this->foglang['LastDeployed'] => $this->obj->get('deployed'));
             foreach ((array) $this->obj->get('groups') as $Group) {
                 if ($Group && $Group->isValid()) {
                     break;
                 }
             }
             if ($Group && $Group->isValid()) {
                 $this->notes[$this->foglang['PrimaryGroup']] = $Group->get('name');
             }
         }
     }
     $this->HookManager->processEvent('SUB_MENULINK_DATA', array('menu' => &$this->menu, 'submenu' => &$this->subMenu, 'id' => &$this->id, 'notes' => &$this->notes));
     // Header row
     $this->headerData = array('', '<input type="checkbox" name="toggle-checkbox" class="toggle-checkboxAction" checked/>');
     $_SESSION['FOGPingActive'] ? array_push($this->headerData, '') : null;
     array_push($this->headerData, _('Host Name'), _('Deployed'), _('Task'), _('Edit/Remove'), _('Image'));
     // Row templates
     $this->templates = array('<span class="icon fa fa-question hand" title="${host_desc}"></span>', '<input type="checkbox" name="host[]" value="${host_id}" class="toggle-action" checked/>');
     $_SESSION['FOGPingActive'] ? array_push($this->templates, '<span class="icon ping"></span>') : null;
     array_push($this->templates, '<a href="?node=host&sub=edit&id=${host_id}" title="Edit: ${host_name} Was last deployed: ${deployed}" id="host-${host_name}">${host_name}</a><br /><small>${host_mac}</small>', '<small>${deployed}</small>', '<a href="?node=host&sub=deploy&sub=deploy&type=1&id=${host_id}"><i class="icon fa fa-arrow-down" title="Download"></i></a> <a href="?node=host&sub=deploy&sub=deploy&type=2&id=${host_id}"><i class="icon fa fa-arrow-up" title="Upload"></i></a> <a href="?node=host&sub=deploy&type=8&id=${host_id}"><i class="icon fa fa-share-alt" title="Multi-cast"></i></a> <a href="?node=host&sub=edit&id=${host_id}#host-tasks"><i class="icon fa fa-arrows-alt" title="Deploy"></i></a>', '<a href="?node=host&sub=edit&id=${host_id}"><i class="icon fa fa-pencil" title="Edit"></i></a> <a href="?node=host&sub=delete&id=${host_id}"><i class="icon fa fa-minus-circle" title="Delete"></i></a>', '${image_name}');
     // Row attributes
     $this->attributes = array(array('width' => 22, 'id' => 'host-${host_name}'), array('class' => 'c', 'width' => 16));
     $_SESSION['FOGPingActive'] ? array_push($this->attributes, array('width' => 20)) : null;
     array_push($this->attributes, array(), array('width' => 50, 'class' => 'c'), array('width' => 90, 'class' => 'r'), array('width' => 80, 'class' => 'c'), array('width' => 50, 'class' => 'r'), array('width' => 20, 'class' => 'r'));
 }
 public function __construct()
 {
     $this->name = 'Report Management';
     parent::__construct($this->name);
     $this->menu = array('home' => $this->foglang[Home], 'equip-loan' => $this->foglang[EquipLoan], 'host-list' => $this->foglang[HostList], 'imaging-log' => $this->foglang[ImageLog], 'inventory' => $this->foglang[Inventory], 'pend-mac' => $this->foglang[PendingMACs], 'snapin-log' => $this->foglang[SnapinLog], 'user-track' => $this->foglang[LoginHistory], 'vir-hist' => $this->foglang[VirusHistory]);
     $reportlink = "?node={$this->node}&sub=file&f=";
     $dh = opendir($_SESSION['FOG_REPORT_DIR']);
     if ($dh) {
         while (!(($f = readdir($dh)) === false)) {
             if (is_file($_SESSION['FOG_REPORT_DIR'] . $f) && substr($f, strlen($f) - strlen('.php')) === '.php') {
                 $this->menu = array_merge($this->menu, array($reportlink . base64_encode($f) => substr($f, 0, strlen($f) - 4)));
             }
         }
     }
     $this->menu = array_merge($this->menu, array('upload' => $this->foglang[UploadRprts]));
     $this->HookManager->processEvent('SUB_MENULINK_DATA', array('menu' => &$this->menu, 'submenu' => &$this->subMenu, 'id' => &$this->id, 'notes' => &$this->notes));
     $this->pdffile = '<i class="fa fa-file-pdf-o fa-2x"></i>';
     $this->csvfile = '<i class="fa fa-file-excel-o fa-2x"></i>';
     $_SESSION['foglastreport'] = null;
 }
 public function search()
 {
     unset($this->headerData[0], $this->headerData[5], $this->attributes[0], $this->attributes[5], $this->templates[0], $this->templates[5]);
     parent::search();
 }
 public function __construct($name = '')
 {
     $this->name = 'Client Management';
     // Call parent constructor
     parent::__construct($this->name);
 }