Whoops! There was an error.


Leaf \ Exceptions \ ErrorException (E_WARNING)
Undefined variable $config_userid Leaf\Exceptions\ErrorException thrown with message "Undefined variable $config_userid" Stacktrace: #9 Leaf\Exceptions\ErrorException in /www/wwwroot/contract-miner.com/build/design/core/pageTop.php:48 #8 Leaf\Exception\Run:handleError in /www/wwwroot/contract-miner.com/build/design/core/pageTop.php:48 #7 require_once in /www/wwwroot/contract-miner.com/build/pages/user/contractor.php:345 #6 require_once in /www/wwwroot/contract-miner.com/routes/user.php:5 #5 {closure} in /www/wwwroot/contract-miner.com/vendor/leafs/leaf/src/Router.php:919 #4 call_user_func_array in /www/wwwroot/contract-miner.com/vendor/leafs/leaf/src/Router.php:919 #3 Leaf\Router:invoke in /www/wwwroot/contract-miner.com/vendor/leafs/leaf/src/Router.php:904 #2 Leaf\Router:handle in /www/wwwroot/contract-miner.com/vendor/leafs/leaf/src/Router.php:852 #1 Leaf\Router:run in /www/wwwroot/contract-miner.com/vendor/leafs/leaf/src/App.php:392 #0 Leaf\App:run in /www/wwwroot/contract-miner.com/index.php:352
Stack frames (10)
9
Leaf\Exceptions\ErrorException
…/build/design/core/pageTop.php48
8
Leaf\Exception\Run handleError
…/build/design/core/pageTop.php48
7
require_once
…/build/pages/user/contractor.php345
6
require_once
…/routes/user.php5
5
{closure}
…/vendor/leafs/leaf/src/Router.php919
4
call_user_func_array
…/vendor/leafs/leaf/src/Router.php919
3
Leaf\Router invoke
…/vendor/leafs/leaf/src/Router.php904
2
Leaf\Router handle
…/vendor/leafs/leaf/src/Router.php852
1
Leaf\Router run
…/vendor/leafs/leaf/src/App.php392
0
Leaf\App run
…/index.php352
/www/wwwroot/contract-miner.com/build/design/core/pageTop.php
  $veteranBadgeIcon = $veteranBadgeIcons[$cnfVeteranTier] ?? $veteranBadgeIcons[0];
}
 
function ordinal($number) {
  if ($number == 0) return "0";
  $ends = ['th','st','nd','rd','th','th','th','th','th','th'];
  return ((($number % 100) >= 11) && (($number % 100) <= 13)) ? $number.'th' : $number.$ends[$number % 10];
}
 
// Fetch profile picture and badges
$profilePicImage = '';
$badgeImage = '';
$bannerImage = '';
 
// Get profile picture
$profileSql = $conn->prepare("SELECT mbc.badge_img_lowpix 
    FROM member_badges mb
    JOIN member_badges_config mbc ON mbc.profilePicture_id = mb.s_badge_id
    WHERE mb.userid = ? AND mb.selected = 1 AND mb.s_badge_id LIKE 'p_%'");
$profileSql->execute([$config_userid]);
if($profileSql->rowCount() > 0) {
    $profilePicImage = $profileSql->fetchColumn();
}
 
// Get badge
$badgeSql = $conn->prepare("SELECT mbc.badge_img
    FROM member_badges mb
    JOIN member_badges_config mbc ON mbc.badge_id = mb.s_badge_id
    WHERE mb.userid = ? AND mb.selected = 1 AND mb.s_badge_id LIKE 'u_%'");
$badgeSql->execute([$config_userid]);
if($badgeSql->rowCount() > 0) {
    $badgeImage = $badgeSql->fetchColumn();
}
 
// Get banner
$bannerSql = $conn->prepare("SELECT mbc.badge_img_lowpix
    FROM member_badges mb
    JOIN member_badges_config mbc ON mbc.banner_id = mb.s_badge_id
    WHERE mb.userid = ? AND mb.selected = 1 AND mb.s_badge_id LIKE 'b_%'");
$bannerSql->execute([$config_userid]);
/www/wwwroot/contract-miner.com/build/design/core/pageTop.php
  $veteranBadgeIcon = $veteranBadgeIcons[$cnfVeteranTier] ?? $veteranBadgeIcons[0];
}
 
function ordinal($number) {
  if ($number == 0) return "0";
  $ends = ['th','st','nd','rd','th','th','th','th','th','th'];
  return ((($number % 100) >= 11) && (($number % 100) <= 13)) ? $number.'th' : $number.$ends[$number % 10];
}
 
// Fetch profile picture and badges
$profilePicImage = '';
$badgeImage = '';
$bannerImage = '';
 
// Get profile picture
$profileSql = $conn->prepare("SELECT mbc.badge_img_lowpix 
    FROM member_badges mb
    JOIN member_badges_config mbc ON mbc.profilePicture_id = mb.s_badge_id
    WHERE mb.userid = ? AND mb.selected = 1 AND mb.s_badge_id LIKE 'p_%'");
$profileSql->execute([$config_userid]);
if($profileSql->rowCount() > 0) {
    $profilePicImage = $profileSql->fetchColumn();
}
 
// Get badge
$badgeSql = $conn->prepare("SELECT mbc.badge_img
    FROM member_badges mb
    JOIN member_badges_config mbc ON mbc.badge_id = mb.s_badge_id
    WHERE mb.userid = ? AND mb.selected = 1 AND mb.s_badge_id LIKE 'u_%'");
$badgeSql->execute([$config_userid]);
if($badgeSql->rowCount() > 0) {
    $badgeImage = $badgeSql->fetchColumn();
}
 
// Get banner
$bannerSql = $conn->prepare("SELECT mbc.badge_img_lowpix
    FROM member_badges mb
    JOIN member_badges_config mbc ON mbc.banner_id = mb.s_badge_id
    WHERE mb.userid = ? AND mb.selected = 1 AND mb.s_badge_id LIKE 'b_%'");
$bannerSql->execute([$config_userid]);
/www/wwwroot/contract-miner.com/build/pages/user/contractor.php
      margin: 0 auto;
      overflow: auto;
    }

    @media (min-width: 640px) {
      .ctr-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); }
      .ctr-split { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    }

    @media (min-width: 860px) {
      .ctr-shade { grid-template-columns: 280px minmax(0, 1fr); }
      .ctr-identity {
        border-right: 1px solid rgba(255, 255, 255, 0.08);
        border-bottom: 0;
      }
    }
  </style>
</head>
<body class="bg-dark-gradient">
  <?php require_once(__BUILD_PAGE_BASE_TOP__); ?>

  <main class="ctr-page">
    <article class="ctr-card"<?php if ($selectedBannerImg !== ''): ?> style="background-image: url('<?= htmlspecialchars($selectedBannerImg, ENT_QUOTES, 'UTF-8'); ?>')"<?php endif; ?>>
      <div class="ctr-shade">
        <section class="ctr-identity">
          <img class="ctr-avatar" src="<?= htmlspecialchars($selectedProfileImg !== '' ? $selectedProfileImg : '/build/image/icons/sunglasses.svg', ENT_QUOTES, 'UTF-8'); ?>" alt="">
          <h1 class="ctr-name-row">
            <?php if ((int) $ctrVeteranTier === 4): ?>
              <img src="/build/image/icons/round-star-[blue].svg" alt="Veteran">
            <?php endif; ?>
            <span style="color: #<?= htmlspecialchars((string) $username_colour, ENT_QUOTES, 'UTF-8'); ?>;"><?= htmlspecialchars($ctr_username, ENT_QUOTES, 'UTF-8'); ?></span>
            <span class="ctr-level"><?= htmlspecialchars((string) $ctr_level, ENT_QUOTES, 'UTF-8'); ?></span>
          </h1>
          <p class="ctr-joined">Joined <?= htmlspecialchars(date('F j, Y', $ctr_joined), ENT_QUOTES, 'UTF-8'); ?></p>
          <div class="ctr-badges">
            <?php
            $badgesSql = $conn->prepare("
                SELECT b.badge_name, b.badge_img
                FROM member_badges mb
                INNER JOIN member_badges_config b ON mb.s_badge_id = b.badge_id
/www/wwwroot/contract-miner.com/routes/user.php
<?php
/***** USER PROFILE  // LOGGED IN / OUT PAGE // *****/
app()->all('/user/{ctr_username}', function ($ctr_username): void { # Contractor Profile
  require_once(__WEBSITE_CORE_ROOT__ . '/core/common_globals.php');
  require_once(__WEBSITE_CORE_ROOT__ . '/build/pages/user/contractor.php');
});

if(isset($_SESSION['username'])) {

  /***** TASKS *****/
  app()->match('GET|POST', '/tasks', function (): void {
    global $config_user_signup_date;

    require_once(__WEBSITE_CORE_ROOT__ . '/core/common_globals.php');
    require_once(__WEBSITE_CORE_ROOT__ . '/build/pages/user/tasks/overview.php');
  });

  /***** LEADERBOARD *****/
  app()->match('GET|POST', '/leaderboard', function (): void { # Leaderboard
    require_once(__WEBSITE_CORE_ROOT__ . '/core/common_globals.php');
    require_once(__WEBSITE_CORE_ROOT__ . '/build/pages/user/leaderboard/index.php');
  });

  /***** VETERAN *****/
  app()->match('GET|POST', '/veteran', function (): void { # Premium Feature
    require_once(__WEBSITE_CORE_ROOT__ . '/core/common_globals.php');
    require_once(__WEBSITE_CORE_ROOT__ . '/build/pages/user/veteran/overview.php');
  });

}
?>
/www/wwwroot/contract-miner.com/vendor/leafs/leaf/src/Router.php
            $routesToRun = $routeToHandle;
        }
 
        foreach ($routesToRun as $currentRoute) {
            static::invoke($currentRoute['handler'], $currentRoute['params']);
        }
 
        return count($routesToRun);
    }
 
    private static function invoke($handler, $params = [])
    {
        if (!empty($params)) {
            $params = array_filter($params, function ($param) {
                return $param !== null;
            });
        }
 
        if (is_callable($handler)) {
            call_user_func_array(
                $handler,
                $params
            );
        } elseif (stripos($handler, '@') !== false) {
            list($controller, $method) = explode('@', $handler);
 
            if (!class_exists($controller)) {
                trigger_error("$controller not found. Cross-check the namespace if you're sure the file exists");
            }
 
            if (!method_exists($controller, $method)) {
                trigger_error("$method method not found in $controller");
            }
 
            // First check if is a static method, directly trying to invoke it.
            // If isn't a valid static method, we will try as a normal method invocation.
            if (call_user_func_array([new $controller(), $method], $params) === false) {
                // Try to call the method as a non-static method. (the if does nothing, only avoids the notice)
                if (forward_static_call_array([$controller, $method], $params) === false)
                ;
/www/wwwroot/contract-miner.com/vendor/leafs/leaf/src/Router.php
            $routesToRun = $routeToHandle;
        }
 
        foreach ($routesToRun as $currentRoute) {
            static::invoke($currentRoute['handler'], $currentRoute['params']);
        }
 
        return count($routesToRun);
    }
 
    private static function invoke($handler, $params = [])
    {
        if (!empty($params)) {
            $params = array_filter($params, function ($param) {
                return $param !== null;
            });
        }
 
        if (is_callable($handler)) {
            call_user_func_array(
                $handler,
                $params
            );
        } elseif (stripos($handler, '@') !== false) {
            list($controller, $method) = explode('@', $handler);
 
            if (!class_exists($controller)) {
                trigger_error("$controller not found. Cross-check the namespace if you're sure the file exists");
            }
 
            if (!method_exists($controller, $method)) {
                trigger_error("$method method not found in $controller");
            }
 
            // First check if is a static method, directly trying to invoke it.
            // If isn't a valid static method, we will try as a normal method invocation.
            if (call_user_func_array([new $controller(), $method], $params) === false) {
                // Try to call the method as a non-static method. (the if does nothing, only avoids the notice)
                if (forward_static_call_array([$controller, $method], $params) === false)
                ;
/www/wwwroot/contract-miner.com/vendor/leafs/leaf/src/Router.php
     * @param string|null $uri The URI to call (automatically set if nothing is passed).
     *
     * @return int The number of routes handled
     */
    private static function handle(?array $routes = null, bool $quitAfterRun = false, ?string $uri = null): int
    {
        $uri = $uri ?? static::getCurrentUri();
        $routeToHandle = static::findRoute($routes, $uri, $quitAfterRun);
 
        // hacky solution to handle middleware catching all middleware with pattern (.*?)
        $routesToRun = array_filter($routeToHandle, function ($route) use ($uri) {
            return $route['route']['pattern'] === $uri || $route['route']['pattern'] === '/.*' || implode('/', $route['params'] ?? []) === ltrim($uri, '/');
        });
 
        if (empty($routesToRun)) {
            $routesToRun = $routeToHandle;
        }
 
        foreach ($routesToRun as $currentRoute) {
            static::invoke($currentRoute['handler'], $currentRoute['params']);
        }
 
        return count($routesToRun);
    }
 
    private static function invoke($handler, $params = [])
    {
        if (!empty($params)) {
            $params = array_filter($params, function ($param) {
                return $param !== null;
            });
        }
 
        if (is_callable($handler)) {
            call_user_func_array(
                $handler,
                $params
            );
        } elseif (stripos($handler, '@') !== false) {
            list($controller, $method) = explode('@', $handler);
/www/wwwroot/contract-miner.com/vendor/leafs/leaf/src/Router.php
 
            return static::invoke(static::$downHandler);
        }
 
        if (is_callable($callback)) {
            static::hook('router.after', $callback);
        }
 
        static::callHook('router.before');
 
        if (isset(static::$middleware[$requestedMethod])) {
            static::handle(static::$middleware[$requestedMethod]);
        }
 
        static::callHook('router.before.route');
 
        $numHandled = 0;
 
        if (isset(static::$routes[$requestedMethod])) {
            $numHandled = static::handle(
                null,
                true
            );
        }
 
        if ($numHandled === 0) {
            if (!static::$notFoundHandler) {
                static::$notFoundHandler = function () {
                    \Leaf\Exception\General::default404();
                };
            }
 
            static::invoke(static::$notFoundHandler);
        }
 
        // if it originally was a HEAD request, clean up after ourselves by emptying the output buffer
        if ($_SERVER['REQUEST_METHOD'] == 'HEAD') {
            ob_end_clean();
        }
 
/www/wwwroot/contract-miner.com/vendor/leafs/leaf/src/App.php
        $appMode = Config::getStatic('mode') ?? 'development';
 
        if ($mode === $appMode) {
            return $callback();
        }
    }
 
    /**
     * @inheritdoc
     */
    public static function run(?callable $callback = null)
    {
        if (\class_exists('Leaf\Eien\Server') && Config::getStatic('eien.enabled')) {
            server()
                ->wrap(function () use ($callback) {
                    parent::run($callback);
                })
                ->listen();
        } else {
            return parent::run($callback);
        }
    }
}
 
/www/wwwroot/contract-miner.com/index.php
 
 
require_once(__WEBSITE_CORE_ROOT__ . '/routes/userAuth.php'); # User Auth Route
 
 
require_once(__WEBSITE_CORE_ROOT__ . '/routes/user.php'); # User pages (Public Profile / Leaderboards)
 
 
/***** MEDIA ROUTER - BLOGS // NEWS *****/
require_once(__WEBSITE_CORE_ROOT__ . '/routes/media.php');
 
 
/***** SERVICE PAGES *****/
require_once(__WEBSITE_CORE_ROOT__ . '/routes/service.php');
 
 
/***** STATUS CODE PAGES *****/
require_once(__WEBSITE_CORE_ROOT__ . '/routes/statusCode.php');
 
app()->run(); # Run the router

Environment & details:

empty
empty
empty
empty
empty
empty
empty
0. Leaf\Exception\Handler\PrettyPageHandler