grthtrhthjhtyjytjytkergtrhtrjytjerhrfh4:24 29/09/2026. -------------------------------------------------------------------------- */ /** @file * @brief */ if (!defined('GLPI_ROOT')) { die("Sorry. You can't access this file directly"); } /** * This class manages the mail settings */ class NotificationMailSetting extends CommonDBTM { public $table = 'glpi_configs'; protected $displaylist = false; static $rightname = 'config'; // Temproray hack for this class in 0.84 static function getTable() { return 'glpi_configs'; } static function getTypeName($nb=0) { return __('Email followups configuration'); } function defineTabs($options=array()) { $ong = array(); $this->addStandardTab(__CLASS__, $ong, $options); return $ong; } function getTabNameForItem(CommonGLPI $item, $withtemplate=0) { switch ($item->getType()) { case __CLASS__ : $tabs[1] = __('Setup'); return $tabs; } return ''; } static function displayTabContentForItem(CommonGLPI $item, $tabnum=1, $withtemplate=0) { if ($item->getType() == __CLASS__) { switch ($tabnum) { case 1 : $item->showFormMailServerConfig(); break; } } return true; } /** * Print the mailing config form * * @param $ID integer ID of the item * @param $options array * - target filename : where to go when done. * - tabs integer : ID of the tab to display * * @return Nothing (display) **/ function showForm($ID, $options=array()) { global $CFG_GLPI; if (!Config::canUpdate()) { return false; } if (!$CFG_GLPI['use_mailing']) { $options['colspan'] = 1; } $this->getFromDB($ID); return true; } function showFormMailServerConfig() { global $CFG_GLPI; echo "