2024.8.23
Loading...
Searching...
No Matches
ajax.mariadb.php File Reference

Go to the source code of this file.

Variables

global $bearsamppBins
 
global $bearsamppLang
 
 $port = $bearsamppBins->getMariadb()->getPort()
 
 $result
 
 $textDisabled = $bearsamppLang->getValue(Lang::DISABLED)
 
 $textServiceStarted = $bearsamppLang->getValue(Lang::HOMEPAGE_SERVICE_STARTED)
 
 $textServiceStopped = $bearsamppLang->getValue(Lang::HOMEPAGE_SERVICE_STOPPED)
 
if($bearsamppBins->getMariadb() ->isEnable()) else
 
 foreach ( $bearsamppBins->getMariadb() ->getVersionList() as $version)
 

Variable Documentation

◆ $bearsamppBins

global $bearsamppBins

Definition at line 10 of file ajax.mariadb.php.

◆ $bearsamppLang

global $bearsamppLang

Definition at line 10 of file ajax.mariadb.php.

◆ $port

$port = $bearsamppBins->getMariadb()->getPort()

Definition at line 28 of file ajax.mariadb.php.

◆ $result

$result
Initial value:
= array(
'checkport' => '',
'versions' => '',
)

This script generates information about the status of the MariaDB service and its versions. It checks if the MariaDB service is enabled, checks the port, and retrieves the list of versions. The output is encoded in JSON format and includes the port status and versions information.

@global object $bearsamppBins Provides access to various binaries including MariaDB. @global object $bearsamppLang Provides access to language-specific strings.

Definition at line 22 of file ajax.mariadb.php.

◆ $textDisabled

$textDisabled = $bearsamppLang->getValue(Lang::DISABLED)

Definition at line 32 of file ajax.mariadb.php.

◆ $textServiceStarted

$textServiceStarted = $bearsamppLang->getValue(Lang::HOMEPAGE_SERVICE_STARTED)

Definition at line 30 of file ajax.mariadb.php.

◆ $textServiceStopped

$textServiceStopped = $bearsamppLang->getValue(Lang::HOMEPAGE_SERVICE_STOPPED)

Definition at line 31 of file ajax.mariadb.php.

◆ else

if ( $bearsamppBins->getMariadb() ->isEnable()) else
Initial value:
{
$result['checkport'] = '<span class="float-end badge text-bg-secondary">' . $textDisabled . '</span>'
$result
$textDisabled

Check if the MariaDB service is enabled and update the port status accordingly. If the service is enabled, check if the port is open and update the status. If the service is disabled, set the status to disabled.

Definition at line 45 of file ajax.mariadb.php.

◆ foreach

foreach($bearsamppBins->getMariadb() ->getVersionList() as $version) ( $bearsamppBins->getMariadb() ->getVersionList() as)

Retrieve the list of available MariaDB versions and update the versions information. Highlight the current version with a primary badge and other versions with a secondary badge.

Definition at line 53 of file ajax.mariadb.php.