Bearsampp 2025.8.29
Loading...
Searching...
No Matches
ajax.php
Go to the documentation of this file.
1<?php
2/*
3 * Copyright (c) 2021-2024 Bearsampp
4 * License: GNU General Public License version 3 or later; see LICENSE.txt
5 * Author: Bear
6 * Website: https://bearsampp.com
7 * Github: https://github.com/Bearsampp
8 */
13include_once __DIR__ . '/../../root.php';
14
22 'summary' => __DIR__ . '/ajax/ajax.summary.php',
23 'latestversion' => __DIR__ . '/ajax/ajax.latestversion.php',
24 'apache' => __DIR__ . '/ajax/ajax.apache.php',
25 'mailpit' => __DIR__ . '/ajax/ajax.mailpit.php',
26 'memcached' => __DIR__ . '/ajax/ajax.memcached.php',
27 'mariadb' => __DIR__ . '/ajax/ajax.mariadb.php',
28 'mysql' => __DIR__ . '/ajax/ajax.mysql.php',
29 'nodejs' => __DIR__ . '/ajax/ajax.nodejs.php',
30 'php' => __DIR__ . '/ajax/ajax.php.php',
31 'postgresql' => __DIR__ . '/ajax/ajax.postgresql.php',
32 'xlight' => __DIR__ . '/ajax/ajax.xlight.php',
33 'quickpick' => __DIR__ . '/ajax/ajax.quickpick.php'
34];
35
43$proc = Util::cleanPostVar('proc', 'text'); // Ensure 'proc' is cleaned and read correctly
44
50if (isset($procMap[$proc]) && file_exists($procMap[$proc])) {
54 include $procMap[$proc];
55} else {
60 echo json_encode(['error' => 'Invalid proc parameter']);
61}
$procMap
Definition ajax.php:21
$proc
Definition ajax.php:43
static cleanPostVar($name, $type='text')