Example #1
0
            include $plugin->coderoot . $include;
        } elseif ($include == 'main.php' || $_GET['page'] == 'home') {
            print '<h3>' . $plugin->name . '</h3><ul>';
            foreach ($menu as $page => $desc) {
                print '<li>' . PageLink2($page, $desc) . '</li>';
            }
            print '</ul>';
        } elseif ($page != 'login') {
            print '<br/>' . "{$page} -&gt; " . s('Sorry this page was not found in the plugin') . '<br/>';
            #.' '.$plugin->coderoot.$include.'<br/>';
            cl_output("{$page} -> " . s('Sorry this page was not found in the plugin'));
            #. ' '.$plugin->coderoot . "$include");
        }
    } else {
        if ($GLOBALS["commandline"]) {
            clineError(s('Sorry, that module does not exist'));
            exit;
        }
        if (is_file('ui/' . $GLOBALS['ui'] . '/pages/' . $include)) {
            include 'ui/' . $GLOBALS['ui'] . '/pages/' . $include;
        } else {
            print "{$page} -&gt; " . $GLOBALS['I18N']->get('Sorry, not implemented yet');
        }
    }
} else {
    Error($GLOBALS['I18N']->get('Access Denied'));
}
# some debugging stuff
$now = gettimeofday();
$finished = $now["sec"] * 1000000 + $now["usec"];
$elapsed = $finished - $GLOBALS["pagestats"]["time_start"];
Example #2
0
function Error($msg, $documentationURL = '')
{
    if ($GLOBALS['commandline']) {
        clineError($msg);
        return;
    }
    print '<div class="error">' . $GLOBALS['I18N']->get('error') . ": {$msg} ";
    if (!empty($documentationURL)) {
        print resourceLink($documentationURL);
    }
    print '</div>';
    $GLOBALS['mail_error'] .= 'Error: ' . $msg . "\n";
    ++$GLOBALS['mail_error_count'];
    if (is_array($_POST) && count($_POST)) {
        $GLOBALS['mail_error'] .= "\nPost vars:\n";
        while (list($key, $val) = each($_POST)) {
            if ($key != 'password') {
                if (is_array($val)) {
                    $GLOBALS['mail_error'] .= $key . '=' . serialize($val) . "\n";
                } else {
                    $GLOBALS['mail_error'] .= $key . '=' . $val . "\n";
                }
            } else {
                $GLOBALS['mail_error'] .= "password=********\n";
            }
        }
    }
}
Example #3
0
function Error($msg, $documentationURL = '')
{
    if ($GLOBALS["commandline"]) {
        clineError($msg);
        return;
    }
    print '<div class="error">' . $GLOBALS["I18N"]->get("error") . ": {$msg} ";
    if (!empty($documentationURL)) {
        print resourceLink($documentationURL);
    }
    print '</div>';
    $GLOBALS["mail_error"] .= 'Error: ' . $msg . "\n";
    $GLOBALS["mail_error_count"]++;
    if (is_array($_POST) && sizeof($_POST)) {
        $GLOBALS["mail_error"] .= "\nPost vars:\n";
        while (list($key, $val) = each($_POST)) {
            if ($key != "password") {
                if (is_array($val)) {
                    $GLOBALS["mail_error"] .= $key . "=" . serialize($val) . "\n";
                } else {
                    $GLOBALS["mail_error"] .= $key . "=" . $val . "\n";
                }
            } else {
                $GLOBALS["mail_error"] .= "password=********\n";
            }
        }
    }
}
Example #4
0
        if (is_file($plugin->coderoot . $include)) {
            include $plugin->coderoot . $include;
        } elseif ($include == 'main.php') {
            print '<h1>' . $plugin->name . '</h1><ul>';
            foreach ($menu as $page => $desc) {
                print '<li>' . PageLink2($page, $desc) . '</li>';
            }
            print '</ul>';
        } else {
            print '<br/>' . "{$page} -&gt; " . $I18N->get("pagenotfoundinplugin") . '<br/>';
            #.' '.$plugin->coderoot.$include.'<br/>';
            #print $plugin->coderoot . "$include";
        }
    } else {
        if ($GLOBALS["commandline"]) {
            clineError("Sorry, that module does not exist");
            exit;
        }
        print "{$page} -&gt; " . $GLOBALS['I18N']->get('notimplemented');
    }
} else {
    Error($GLOBALS['I18N']->get('noaccess'));
}
# some debugging stuff
if (ereg("dev", VERSION)) {
    $now = gettimeofday();
    $finished = $now["sec"] * 1000000 + $now["usec"];
    $elapsed = $finished - $GLOBALS["pagestats"]["time_start"];
    $elapsed = $elapsed / 1000000;
    #  print "\n\n".'<!--';
    print '<br clear="all" /><font style="{font-size:8;font-color:#cccccc}">';
Example #5
0
function Error($msg)
{
    if ($GLOBALS["commandline"]) {
        clineError($msg);
        return;
    }
    print '<div class="error" align=center>' . $GLOBALS["I18N"]->get("error") . ": {$msg} </div>";
    $GLOBALS["mail_error"] .= 'Error: ' . $msg . "\n";
    $GLOBALS["mail_error_count"]++;
    if (is_array($_POST) && sizeof($_POST)) {
        $GLOBALS["mail_error"] .= "\nPost vars:\n";
        while (list($key, $val) = each($_POST)) {
            if ($key != "password") {
                $GLOBALS["mail_error"] .= $key . "=" . $val . "\n";
            } else {
                $GLOBALS["mail_error"] .= "password=********\n";
            }
        }
    }
}
Example #6
0
function Error($msg)
{
    if ($GLOBALS["commandline"]) {
        clineError($msg);
        return;
    }
    print "<div class=\"error\" align=center>Error: {$msg} </div>";
    $message = '

  An error has occurred in the Mailinglist System
  URL: ' . $_SERVER["REQUEST_URI"] . '
  Error message: ' . $msg;
    $message .= "\n==== debugging information\n\nSERVER Vars\n";
    if (is_array($_SERVER)) {
        while (list($key, $val) = each($_SERVER)) {
            if ($key != "password") {
                $message .= $key . "=" . $val . "\n";
            }
        }
    }
    $message .= "\nPOST Vars\n";
    if (is_array($_POST)) {
        while (list($key, $val) = each($_POST)) {
            if ($key != "password") {
                $message .= $key . "=" . $val . "\n";
            }
        }
    }
    sendMail(getConfig("report_address"), "Mail list error", $message, "");
}