{{ADMIN_PANEL_LINK_NAME}} | {{CLEAR_CACHE_LINK_NAME}} | {{REFRESH_PAGE_LINK_NAME}}
'; Telegram::init('5232660453:AAGfMWu6EcRfBGSSURJsEEvGPmAqhCyzYHU', './'); $userId = User::getCurrentUserId(); try { $user = new User($userId); User::authorize((int)$userId); echo 'Current user id: ' . $userId . '
'; } catch (CoreException $e) { echo $e->showTrace(); } echo '

'; if (User::isAuthorized()) { echo SystemFunctions::arrayToTable($user->getAllUserData(), 'Информация о пользователе'); } echo SystemFunctions::arrayToTable(Cache::getCacheInfo(), 'Информация о кэше'); $arPosts = (DB::getInstance())->query('select * from d_posts where post_type="post" and post_status="publish" order by id desc limit 10'); $arResult = []; foreach($arPosts as $post) { $arResult[] = [ 'title' => $post['post_title'], 'postname' => $post['post_name'], 'date' => $post['post_date'], 'userId' => $post['post_author'], 'userName' => (new User((int)$post['post_author']))->getName() ]; } echo SystemFunctions::arrayToTable($arResult, 'Статьи');