fembooru/ext/chatbox/yshout.php

40 lines
694 B
PHP
Raw Normal View History

<?php
2013-06-19 20:59:59 +01:00
error_reporting(E_ALL);
ob_start();
set_error_handler('errorOccurred');
include 'include.php';
if (isset($_POST['reqFor'])) {
switch ($_POST['reqFor']) {
case 'shout':
$ajax = new AjaxCall();
$ajax->process();
break;
case 'history':
// echo $_POST['log'];
$ajax = new AjaxCall($_POST['log']);
$ajax->process();
break;
default:
exit;
}
} else {
include 'example.html';
2013-06-19 20:59:59 +01:00
}
function errorOccurred($num, $str, $file, $line)
{
$err = [
'yError' => "$str. \n File: $file \n Line: $line"
];
echo json_encode($err);
exit;
}