require_once("db.inc");
require_once("sec/admsecure.inc");
+db_user("errorreporter");
+
html_header("<style type='text/css'>
td.errors-cfg-field {
padding: 1em;
$cfgErrors = new erConfig();
require_once("mod_error-reporter/config.inc");
-PageBlue(_c("error-reporter-cfg:Error Report Wizard – Configuration"), "mod_error-reporter");
+PageBlue(_c("error-reporter-cfg:Error Report Wizard – Configuration"),
+ "mod_error-reporter");
if(@$_POST["submit"] == _("Save")) {
$bMailNotify = (@$_POST["mailnotify"] == "true");
if($bMailNotify != $cfgErrors->isMailNotify()) {
$cfgErrors->setMailNotify($bMailNotify);
- echo sprintf("<p>%s</p>\n", _c("error-reporter-cfg:Set mail notification."));
+ echo sprintf("<p>%s</p>\n", _c("error-reporter-cfg:Set mail ".
+ "notification."));
}
if($strMailNotifyAddr != $cfgErrors->getMailNotifyAddr()) {
if(!erIsMailAddress($strMailNotifyAddr)) {
- echo sprintf("<p class='err'>%s</p>", _c("error-reporter-cfg:The specified string is not ".
- "a valid e-mail address!"));
+ echo sprintf("<p class='err'>%s</p>", _c("error-reporter-cfg:The ".
+ "specified string is not a valid e-mail address!"));
} else {
$cfgErrors->setMailNotifyAddr($strMailNotifyAddr);
- echo sprintf("<p>%s</p>\n", _c("error-reporter-cfg:Set mail notification address."));
+ echo sprintf("<p>%s</p>\n", _c("error-reporter-cfg:Set mail ".
+ "notification address."));
}
}
$cfgErrors->writeConfig();
}
// two columns
-echo "<table border='0' cellspacing='10' cellpadding='0'><tr><td width='50%'>\n";
+echo "<table border='0' cellspacing='10' cellpadding='0'><tr>".
+ "<td width='50%'>\n";
// Mail notification
GroupBox(_c("error-reporter-cfg:Mail notification"), "mail");
echo "<form method='post'>\n";
echo "<table class='errors-cfg-table'>\n";
echo sprintf("<tr><td class='errors-cfg-field'><label for='mailnotify' ".
- "class='errors-cfg-field-heading'>%s</label><br />%s</td><td class='errors-cfg-field'>".
- "<input type='checkbox' name='mailnotify' id='mailnotify' value='true'%s /></td></tr>",
- _c("error-reporter-cfg:Enable mail notification"), _c("error-reporter-cfg:If this option is ".
- "enabled, everytime an error report is submitted, an e-mail with information about the ".
- "report will be sent to the address specified below."), $cfgErrors->isMailNotify() ?
+ "class='errors-cfg-field-heading'>%s</label><br />%s</td><td ".
+ "class='errors-cfg-field'><input type='checkbox' name='mailnotify' ".
+ "id='mailnotify' value='true'%s /></td></tr>",
+ _c("error-reporter-cfg:Enable mail notification"),
+ _c("error-reporter-cfg:If this option is enabled, everytime an error report ".
+ "is submitted, an e-mail with information about the report will be sent to ".
+ "the address specified below."), $cfgErrors->isMailNotify() ?
" checked='checked'" : "");
echo sprintf("<tr><td class='errors-cfg-field'><label for='mailnotifyaddr'".
- "class='errors-cfg-field-heading'>%s</label><br />%s</td><td class='errors-cfg-field'>".
- "<input type='text' name='mailnotifyaddr' id='mailnotifyaddr' size='30' value='%s' />".
- "</td></tr>", _c("error-reporter-cfg:Mail address to send the notification mail to"),
- _c("error-reporter-cfg:If mail notifications are enabled, any notification mails are sent to ".
- "the address specified here. You can give more than one address by separating them with a ".
- "comma."), q($cfgErrors->getMailNotifyAddr()));
-echo sprintf("<tr><td class='errors-cfg-field'><$stdbtn name='submit' value='%s' /></td></tr>\n",
- _("Save"));
+ "class='errors-cfg-field-heading'>%s</label><br />%s</td>".
+ "<td class='errors-cfg-field'><input type='text' name='mailnotifyaddr' ".
+ "id='mailnotifyaddr' size='30' value='%s' /></td></tr>",
+ _c("error-reporter-cfg:Mail address to send the notification mail to"),
+ _c("error-reporter-cfg:If mail notifications are enabled, any notification ".
+ "mails are sent to the address specified here. You can give more than one ".
+ "address by separating them with a comma."),
+ q($cfgErrors->getMailNotifyAddr()));
+echo sprintf("<tr><td class='errors-cfg-field'><$stdbtn name='submit' ".
+ "value='%s' /></td></tr>\n", _("Save"));
echo "</table>\n</form>\n";
_GroupBox();
"action. Please use the %sgroup administration%s to assign and revoke ".
"privileges."), "<a href='/idesk/admin/act/groups.php'>", "</a>"),
_c("error-reporter:Please note that every group with the administration ".
- "privilege can also implicitly report errors and see the reported messages."));
+ "privilege can also implicitly report errors and see the reported ".
+ "messages."));
echo "<p><table style='width:100%'><tr>\n";
echo sprintf("<td>%s%s</td><td>%s</td>\n", icon("keys"),
_("View error reports and report errors").":", $asAccessGroups == array() ?
echo "</td></tr></table>\n";
_PageBlue();
-?>
\ No newline at end of file
+?>