コード例 #1
0
function core_notAuthorized($goback = '')
{
    global $headerClass;
    if (core_getOption('YBhere')) {
        core_backtrace('core_notAuthorized');
    }
    if (function_exists("apps_checkAuthorization")) {
        apps_checkAuthorization();
    }
    print "<h3>Sorry, but you are not authorized<br>to access this resource</h3>";
    if (!$goback) {
        $goback = $_SERVER["HTTP_REFERER"];
    }
    core_drawLink('<b>go back</b>', 'index.php');
    if (function_exists('appsGetFooter')) {
        appsGetFooter();
    } elseif (@$headerClass) {
        $headerClass->getFooter();
    } else {
        exit;
    }
}
コード例 #2
0
 function halt($msg, $sqlError = '')
 {
     if ($this->doNotStopOnErrors && !core_getOption('YBhere')) {
         print "<table><tr><td>" . "<FONT COLOR=red>" . "WARNING: The database is write-protected, the query '{$this->lastQuery_String}' is rejected, the database is not changed</font></td></tr></table>";
     } else {
         $this->close();
         if (function_exists('core_backtrace')) {
             core_backtrace();
         }
         print "<table><tr><td>" . "<FONT COLOR=red>" . "<b>{$this->Database} database error</b><br>" . "<pre>" . $this->format($msg) . "</pre>" . $sqlError . "</td></tr></table>";
         if (function_exists('appsGetFooter')) {
             appsGetFooter();
         }
         die("");
     }
 }