require_once("mod_error-reporter/init.inc");
require_once("sec/secure.inc");
+db_user("errorreporter");
+
html_header("<style type='text/css'>
td.errors-form-description {
width: 12em;
PageBlue(_c("error-reporter:Report an error"), "mod_error-reporter");
-if(!$cfgErrors->userHasAccess()) {
+if(!erConfig::userHasAccess()) {
printf("<p class='err'>%s</p>\n", ER_ERROR_ACCESS_DENIED);
_PageBlue();
exit();
_c("error-reporter:The specified error report does not exist!"));
Option(_("Back"), null, "href='".$_SERVER["PHP_SELF"]."'", "back");
} else {
- if($cfgErrors->userIsAdmin() or $doc->userIsOwner($getUid)) {
+ if(erConfig::userIsAdmin() or $doc->userIsOwner($getUid)) {
echo sprintf("<form action='%s' method='post'>\n",
$view->getDeleteURL($getUid));
echo sprintf("<p>%s</p>", _c("error-reporter:You are about to delete ".
echo sprintf("<form action='%s' method='get'></form>\n", $_SERVER["PHP_SELF"]);
// probably we have to insert an error report
-if(($getAction == "submit" and $postSubmit == _("Insert")))
+if(($getAction == "submit" and $postSubmit == _c("error-reporter:Submit")))
{
// All fields must be filled out
if((trim($postMachine) == "") or (trim($postText) == "")) {
} else {
// Write to database
$nNewUid = null;
- $er = new erErrorReport(time(), $_SESSION["act"], $postMachine, $postText, $postHidden == "true");
+ $er = new erErrorReport(time(), $_SESSION["act"], $postMachine, $postText,
+ $postHidden == "true");
try {
$nNewUid = $doc->writeErrorReport($er);
} catch(Exception $e) {
"Visible only for administrators (use this if your report is about security ".
"issues)"));
echo sprintf("<tr><td /><td><input type='submit' name='submit' value='%s' />".
- "d></tr>\n", _("Insert"));
+ "</td></tr>\n", _c("error-reporter:Submit"));
echo "</table></form><p />\n";
_PageBlue();