2014-04-20 05:00:34 -04:00
|
|
|
<?php
|
2014-04-26 03:31:02 -04:00
|
|
|
|
2013-06-19 20:59:59 +01:00
|
|
|
error_reporting(E_ALL);
|
|
|
|
ob_start();
|
|
|
|
set_error_handler('errorOccurred');
|
|
|
|
include 'include.php';
|
2014-04-26 03:31:02 -04:00
|
|
|
|
2013-06-19 20:59:59 +01:00
|
|
|
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;
|
2014-04-26 03:31:02 -04:00
|
|
|
} else {
|
|
|
|
include 'example.html';
|
2013-06-19 20:59:59 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
function errorOccurred($num, $str, $file, $line) {
|
|
|
|
$err = array (
|
|
|
|
'yError' => "$str. \n File: $file \n Line: $line"
|
|
|
|
);
|
|
|
|
|
2014-04-26 03:31:02 -04:00
|
|
|
echo json_encode($err);
|
|
|
|
|
2013-06-19 20:59:59 +01:00
|
|
|
exit;
|
|
|
|
}
|
|
|
|
|