Bearsampp 2026.9.23
Loading...
Searching...
No Matches
root.php File Reference

Go to the source code of this file.

Variables

if(is_file($bearsamppCacert)) $bearsamppAction = new Action()
 $bearsamppCacert = Path::getPhpPath() . '/extras/ssl/cacert.pem'
if($bearsamppRoot->isRoot()) global $bearsamppLang
 $bearsamppRoot = new Root(dirname(__FILE__))
 $locale = $bearsamppLang->getValue('locale')
const APP_AUTHOR_NAME = 'N6REJ'
const APP_GITHUB_LATEST_URL = 'https://api.github.com/repos/' . APP_GITHUB_USER . '/' . APP_GITHUB_REPO . '/releases/latest'
const APP_GITHUB_PROXY_KEY = '050390e9727be9a24566d641d17a16fdfafb639b14db443e70718f9334851154'
const APP_GITHUB_PROXY_URL = APP_WEBSITE . '/proxy.php'
const APP_GITHUB_REPO = 'Bearsampp'
const APP_GITHUB_USER = 'Bearsampp'
const APP_GITHUB_USERAGENT = 'Bearsampp'
const APP_LICENSE = 'GPL3 License'
const APP_LOCALHOST = '127.0.0.1'
const APP_TITLE = 'Bearsampp'
const APP_WEBSITE = 'https://bearsampp.com'
 if (isset( $_SERVER[ 'argv']) &&isset( $_SERVER[ 'argv'][1]) &&$_SERVER[ 'argv'][1]==='startup')
const QUICKPICK_API_KEY = '4abe15e5-95f2-4663-ad12-eadb245b28b4'
const QUICKPICK_API_URL = APP_WEBSITE . '/index.php?option=com_osmembership&task=api.get_active_plan_ids&api_key='
const QUICKPICK_JSON_URL = 'https://raw.githubusercontent.com/' . APP_GITHUB_USER . '/' . APP_GITHUB_REPO . '/main/core/resources/quickpick-releases.json'
const RETURN_TAB = ' '

Variable Documentation

◆ $bearsamppAction

if (is_file( $bearsamppCacert)) $bearsamppAction = new Action()

Creates an instance of the Action class and processes the action based on command line arguments.

Definition at line 189 of file root.php.

Referenced by ActionExt\procRefresh().

◆ $bearsamppCacert

$bearsamppCacert = Path::getPhpPath() . '/extras/ssl/cacert.pem'

Enables TLS certificate verification for all outbound HTTPS connections.

The bundled PHP build ships with an empty certificate store on Windows, so without an explicit CA bundle any HTTPS fetch either fails or (in code that disables verification) silently accepts any certificate. Point the default stream context at the CA bundle shipped with this PHP installation so every fopen()/file_get_contents()/ get_headers() over HTTPS is verified by default. cURL handles get a CAINFO option explicitly in HttpClient/Util.

Definition at line 174 of file root.php.

◆ $bearsamppLang

if ( $bearsamppRoot->isRoot()) global $bearsamppLang

Checks if the current user has root privileges and stops loading if true. We must NOT stop loading if the current action is actually 'loading'. Retrieves the locale setting from the global language instance.

Definition at line 207 of file root.php.

◆ $bearsamppRoot

$bearsamppRoot = new Root(dirname(__FILE__))

Definition at line 161 of file root.php.

◆ $locale

$locale = $bearsamppLang->getValue('locale')

Definition at line 208 of file root.php.

◆ APP_AUTHOR_NAME

const APP_AUTHOR_NAME = 'N6REJ'

Bootstrap script for the Bearsampp core engine.

Defines application-wide constants, performs a fast elevation check when the script is launched with the "startup" argument, loads the Root class and registers the application root directory, enables TLS certificate verification for outbound HTTPS connections, processes the requested action, and retrieves the global locale setting.

Definition at line 18 of file root.php.

Referenced by ActionAbout\__construct().

◆ APP_GITHUB_LATEST_URL

const APP_GITHUB_LATEST_URL = 'https://api.github.com/repos/' . APP_GITHUB_USER . '/' . APP_GITHUB_REPO . '/releases/latest'

Definition at line 26 of file root.php.

Referenced by ActionCheckVersion\__construct(), and ActionCheckVersion\processWindow().

◆ APP_GITHUB_PROXY_KEY

const APP_GITHUB_PROXY_KEY = '050390e9727be9a24566d641d17a16fdfafb639b14db443e70718f9334851154'

Definition at line 45 of file root.php.

Referenced by HttpClient\proxyDownload(), and HttpClient\proxyFetch().

◆ APP_GITHUB_PROXY_URL

const APP_GITHUB_PROXY_URL = APP_WEBSITE . '/proxy.php'

Definition at line 44 of file root.php.

Referenced by HttpClient\proxyDownload(), and HttpClient\proxyFetch().

◆ APP_GITHUB_REPO

const APP_GITHUB_REPO = 'Bearsampp'

Definition at line 24 of file root.php.

Referenced by HttpClient\fetchGet(), HttpClient\proxyDownload(), and HttpClient\proxyFetch().

◆ APP_GITHUB_USER

◆ APP_GITHUB_USERAGENT

const APP_GITHUB_USERAGENT = 'Bearsampp'

Definition at line 25 of file root.php.

Referenced by HttpClient\fetchGet(), HttpClient\proxyDownload(), and HttpClient\proxyFetch().

◆ APP_LICENSE

const APP_LICENSE = 'GPL3 License'

Definition at line 22 of file root.php.

◆ APP_LOCALHOST

◆ APP_TITLE

◆ APP_WEBSITE

const APP_WEBSITE = 'https://bearsampp.com'

Definition at line 20 of file root.php.

Referenced by HttpClient\checkInternetState(), and HttpClient\getWebsiteUrl().

◆ if

if(isset($_SERVER['argv']) &&isset($_SERVER['argv'][1]) && $_SERVER['argv'][1]==='startup') ( isset($_SERVER['argv']) &&isset($_SERVER['argv'][1]) && $_SERVER[ 'argv'][1] = == 'startup')

Includes the Root class file and creates an instance of Root. Registers the root directory of the application.

Definition at line 48 of file root.php.

◆ QUICKPICK_API_KEY

const QUICKPICK_API_KEY = '4abe15e5-95f2-4663-ad12-eadb245b28b4'

Definition at line 33 of file root.php.

Referenced by QuickPick\checkDownloadId().

◆ QUICKPICK_API_URL

const QUICKPICK_API_URL = APP_WEBSITE . '/index.php?option=com_osmembership&task=api.get_active_plan_ids&api_key='

Definition at line 34 of file root.php.

Referenced by QuickPick\checkDownloadId().

◆ QUICKPICK_JSON_URL

const QUICKPICK_JSON_URL = 'https://raw.githubusercontent.com/' . APP_GITHUB_USER . '/' . APP_GITHUB_REPO . '/main/core/resources/quickpick-releases.json'

Definition at line 37 of file root.php.

Referenced by QuickPick\checkQuickpickJson(), and QuickPick\rebuildQuickpickJson().

◆ RETURN_TAB

const RETURN_TAB = ' '

Definition at line 27 of file root.php.