Bearsampp 2025.8.29
Loading...
Searching...
No Matches
ajax.php File Reference

Go to the source code of this file.

Variables

 $proc = Util::cleanPostVar('proc', 'text')
 $procMap
if(isset($procMap[$proc]) &&file_exists($procMap[$proc])) else

Variable Documentation

◆ $proc

◆ $procMap

$procMap
Initial value:
= [
'summary' => __DIR__ . '/ajax/ajax.summary.php',
'latestversion' => __DIR__ . '/ajax/ajax.latestversion.php',
'apache' => __DIR__ . '/ajax/ajax.apache.php',
'mailpit' => __DIR__ . '/ajax/ajax.mailpit.php',
'memcached' => __DIR__ . '/ajax/ajax.memcached.php',
'mariadb' => __DIR__ . '/ajax/ajax.mariadb.php',
'mysql' => __DIR__ . '/ajax/ajax.mysql.php',
'nodejs' => __DIR__ . '/ajax/ajax.nodejs.php',
'php' => __DIR__ . '/ajax/ajax.php.php',
'postgresql' => __DIR__ . '/ajax/ajax.postgresql.php',
'xlight' => __DIR__ . '/ajax/ajax.xlight.php',
'quickpick' => __DIR__ . '/ajax/ajax.quickpick.php'
]

Definition at line 21 of file ajax.php.

◆ else

if (isset( $procMap[ $proc]) &&file_exists( $procMap[ $proc])) else
Initial value:
{
echo json_encode(['error' => 'Invalid proc parameter'])

Check if the cleaned 'proc' parameter exists in our secure mapping. If valid, include the corresponding AJAX handler file using the pre-defined path. If not valid, return a JSON error message.

Definition at line 55 of file ajax.php.