<?php
-/**\r
+/**
* @file config.php
- * Configuration page\r
- * @author Roland Hieber (roland.hieber@wilhelm-gym.net)\r
- * @date 22.10.2007\r
- * \r
- * Copyright © 2007 Roland Hieber\r
- * \r
- * Permission is hereby granted, free of charge, to any person obtaining\r
- * copy of this software and associated documentation files (the "Software"),\r
- * to deal in the Software without restriction, including without limitation\r
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,\r
- * and/or sell copies of the Software, and to permit persons to whom the\r
- * Software is furnished to do so, subject to the following conditions:\r
- * \r
- * The above copyright notice and this permission notice shall be included in\r
- * all copies or substantial portions of the Software.\r
- * \r
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r
- * THE SOFTWARE.\r
+ * Configuration page
+ * @author Roland Hieber (roland.hieber@wilhelm-gym.net)
+ * @date 22.10.2007
+ *
+ * Copyright © 2007 Roland Hieber
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
*/
-/** @todo add configuration for allowed groups */
-
require_once("mod_error-reporter/class_erConfig.inc");
require_once("mod_error-reporter/functions.inc");
require_once("share.inc");
$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 "</tr><tr>\n";
echo sprintf("<td>%s%s</td><td>%s</td>\n", icon("keys"),
_("Administration of the error report wizard"),
- $asAdminGroups == array() ? _c("error-reporter:all users") :
+ $asAdminGroups == array() ? _c("error-reporter:no users") :
icon("act-group") . join(", ", array_map("erGetGroupName", $asAdminGroups)));
echo "</tr></table></p>\n";
_GroupBox();
echo "</td></tr></table>\n";
_PageBlue();
-?>
\ No newline at end of file
+?>