1
0
www.mikescher.com/www/pages/su_ajax.php
2019-12-28 15:08:45 +01:00

28 lines
838 B
PHP

<?php
require_once (__DIR__ . '/../internals/base.php');
$cmd = $OPTIONS['cmd'];
$secret = $OPTIONS['secret'];
if (isset($OPTIONS['suffix']) && $OPTIONS['suffix'] !== '') $cmd = $OPTIONS['suffix'] . '::' . $cmd;
$cmd = strtolower($cmd);
if ($secret !== $CONFIG['ajax_secret']) die('Unauthorized.');
try
{
if ($cmd === 'egh::status') { include (__DIR__ . '/../ajax/egh_status.php'); exit; }
if ($cmd === 'egh::refresh') { include (__DIR__ . '/../ajax/egh_refresh.php'); exit; }
if ($cmd === 'egh::redraw') { include (__DIR__ . '/../ajax/egh_redraw.php'); exit; }
if ($cmd === 'alephnotetable') { include (__DIR__ . '/../ajax/an_activeusers.php'); exit; }
if ($cmd === 'updateslog') { include (__DIR__ . '/../ajax/ul_entries.php'); exit; }
}
catch (exception $e)
{
echo $e->getMessage();
}
die('Wrong command.');