{
global $ilUser, $ilias;
$this->tpl->addBlockFile("ADM_CONTENT", "adm_content", "tpl.mail_options.html", "Services/Mail");
$this->tpl->setVariable("HEADER", $this->lng->txt("mail"));
$this->tpl->setCurrentBlock("options");
$this->tpl->setCurrentBlock("option_inc_line");
$inc = array($this->lng->txt("mail_incoming_local"),$this->lng->txt("mail_incoming_smtp"),$this->lng->txt("mail_incoming_both"));
foreach($inc as $key => $option)
{
$this->tpl->setVariable("OPTION_INC_VALUE",$key);
$this->tpl->setVariable("OPTION_INC_NAME",$option);
$this->tpl->setVariable("OPTION_INC_SELECTED",$this->umail->mail_options->getIncomingType() == $key ? "selected=\"selected\"" : "");
$this->tpl->parseCurrentBlock();
}
$this->tpl->setCurrentBlock("option_line");
$linebreak = $this->umail->mail_options->getLinebreak();
for($i = 50; $i <= 80;$i++)
{
$this->tpl->setVariable("OPTION_VALUE",$i);
$this->tpl->setVariable("OPTION_NAME",$i);
if( $i == $linebreak)
{
$this->tpl->setVariable("OPTION_SELECTED","selected");
}
$this->tpl->parseCurrentBlock();
}
{
$this->tpl->setVariable('INC_DISABLED','disabled="disabled"');
}
$this->tpl->setVariable("GLOBAL_OPTIONS",$this->lng->txt("mail_global_options"));
$this->tpl->setVariable("TXT_INCOMING", $this->lng->txt("mail_incoming"));
$this->tpl->setVariable("TXT_LINEBREAK", $this->lng->txt("linebreak"));
$this->tpl->setVariable("TXT_SIGNATURE", $this->lng->txt("signature"));
$this->tpl->setVariable("CONTENT",$this->umail->mail_options->getSignature());
if ($ilias->getSetting("mail_notification"))
{
$this->tpl->setVariable("TXT_CRONJOB_NOTIFICATION", $this->lng->txt("cron_mail_notification"));
$this->tpl->setVariable("TXT_CRONJOB_NOTIFICATION_INFO", $this->lng->txt("mail_cronjob_notification_info"));
if ($this->umail->mail_options->getCronjobNotification())
{
$this->tpl->setVariable("CRONJOB_NOTIFICATION_SELECTED", " checked=\"checked\"");
}
}
$this->tpl->setVariable("TXT_SAVE", $this->lng->txt("save"));
$this->ctrl->setParameter($this, "cmd", "post");
$this->tpl->setVariable("ACTION", $this->ctrl->getFormAction($this, 'saveOptions'));
$this->ctrl->clearParameters($this);
$this->tpl->parseCurrentBlock();
$this->tpl->show();
}