Example #1
0
 /**
  * Display the sidebar
  *
  * @access  public
  * @param   string  $action Selected Action
  * @return  XHTML template content
  */
 function SideBar($action)
 {
     $actions = array('IPBlocking', 'AgentBlocking', 'Encryption', 'AntiSpam', 'AdvancedPolicies');
     if (!in_array($action, $actions)) {
         $action = 'IPBlocking';
     }
     $sidebar = new Jaws_Widgets_Sidebar('policy');
     if ($this->gadget->GetPermission('IPBlocking')) {
         $sidebar->AddOption('IPBlocking', _t('POLICY_IP_BLOCKING'), BASE_SCRIPT . '?gadget=Policy&action=IPBlocking', 'images/stock/stop.png');
     }
     if ($this->gadget->GetPermission('AgentBlocking')) {
         $sidebar->AddOption('AgentBlocking', _t('POLICY_AGENT_BLOCKING'), BASE_SCRIPT . '?gadget=Policy&action=AgentBlocking', 'images/stock/stop.png');
     }
     if ($this->gadget->GetPermission('Encryption')) {
         $sidebar->AddOption('Encryption', _t('POLICY_ENCRYPTION'), BASE_SCRIPT . '?gadget=Policy&action=Encryption', 'gadgets/Policy/Resources/images/encryption.png');
     }
     if ($this->gadget->GetPermission('AntiSpam')) {
         $sidebar->AddOption('AntiSpam', _t('POLICY_ANTISPAM'), BASE_SCRIPT . '?gadget=Policy&action=AntiSpam', 'gadgets/Policy/Resources/images/antispam.png');
     }
     if ($this->gadget->GetPermission('AdvancedPolicies')) {
         $sidebar->AddOption('AdvancedPolicies', _t('POLICY_ADVANCED_POLICIES'), BASE_SCRIPT . '?gadget=Policy&action=AdvancedPolicies', 'gadgets/Policy/Resources/images/policies.png');
     }
     $sidebar->Activate($action);
     return $sidebar->Get();
 }
Example #2
0
 /**
  * Builds the settings sidebar
  *
  * @access  private
  * @param   string  $action Current action
  * @return  string  XHTML sidebar
  */
 function SideBar($action)
 {
     $actions = array('Basic', 'Advanced', 'Meta', 'Mail', 'FTP', 'Proxy');
     if (!in_array($action, $actions)) {
         $action = 'Basic';
     }
     $sidebar = new Jaws_Widgets_Sidebar('settings');
     if ($this->gadget->GetPermission('BasicSettings')) {
         $sidebar->AddOption('Basic', _t('SETTINGS_BASIC_SETTINGS'), BASE_SCRIPT . '?gadget=Settings&action=BasicSettings');
     }
     if ($this->gadget->GetPermission('AdvancedSettings')) {
         $sidebar->AddOption('Advanced', _t('SETTINGS_ADVANCED_SETTINGS'), BASE_SCRIPT . '?gadget=Settings&action=AdvancedSettings');
     }
     if ($this->gadget->GetPermission('MetaSettings')) {
         $sidebar->AddOption('Meta', _t('SETTINGS_META_SETTINGS'), BASE_SCRIPT . '?gadget=Settings&action=MetaSettings');
     }
     if ($this->gadget->GetPermission('MailSettings')) {
         $sidebar->AddOption('Mail', _t('SETTINGS_MAIL_SETTINGS'), BASE_SCRIPT . '?gadget=Settings&action=MailSettings');
     }
     if ($this->gadget->GetPermission('FTPSettings')) {
         $sidebar->AddOption('FTP', _t('SETTINGS_FTP_SETTINGS'), BASE_SCRIPT . '?gadget=Settings&action=FTPSettings');
     }
     if ($this->gadget->GetPermission('ProxySettings')) {
         $sidebar->AddOption('Proxy', _t('SETTINGS_PROXY_SETTINGS'), BASE_SCRIPT . '?gadget=Settings&action=ProxySettings');
     }
     $sidebar->Activate($action);
     return $sidebar->Get();
 }
Example #3
0
 /**
  * Displays the sidebar
  *
  * @access  public
  * @param   string  $action Selected Action
  * @return  string  XHTML sidebar
  */
 function SideBar($action)
 {
     $actions = array('SysInfo', 'PHPInfo', 'JawsInfo', 'DirInfo');
     if (!in_array($action, $actions)) {
         $action = 'SysInfo';
     }
     $sidebar = new Jaws_Widgets_Sidebar('sysinfo');
     if ($this->gadget->GetPermission('SysInfo')) {
         $sidebar->AddOption('SysInfo', _t('SYSINFO_SYSINFO'), BASE_SCRIPT . '?gadget=SysInfo&action=SysInfo', 'gadgets/SysInfo/Resources/images/sysinfo.png');
     }
     if ($this->gadget->GetPermission('PHPInfo')) {
         $sidebar->AddOption('PHPInfo', _t('SYSINFO_PHPINFO'), BASE_SCRIPT . '?gadget=SysInfo&action=PHPInfo', 'gadgets/SysInfo/Resources/images/phpinfo.png');
     }
     if ($this->gadget->GetPermission('JawsInfo')) {
         $sidebar->AddOption('JawsInfo', _t('SYSINFO_JAWSINFO'), BASE_SCRIPT . '?gadget=SysInfo&action=JawsInfo', 'gadgets/SysInfo/Resources/images/jawsinfo.png');
     }
     if ($this->gadget->GetPermission('DirInfo')) {
         $sidebar->AddOption('DirInfo', _t('SYSINFO_DIRINFO'), BASE_SCRIPT . '?gadget=SysInfo&action=DirInfo', 'gadgets/SysInfo/Resources/images/dirinfo.png');
     }
     $sidebar->Activate($action);
     return $sidebar->Get();
 }