Viewing file: admin-asynch.php (1.26 KB) -rw-r--r-- Select action/file-type: (+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?
include("core/Template.inc.php");
include("config/config.inc.php");
include("core/database.inc.php");
include("core/xmlparser.inc.php");
if (isset($_POST['oper']))
{
switch($_POST['oper'])
{
case 'GetFreeRooms':
echo json_encode(Schedule::GetFreeRooms($_POST['day_name'], $_POST['hour_name']));
die;
break;
case 'GetFreeMatrix':
$matrix = Schedule::GetFreeMatrix($_POST['day_name'], $_POST['hour_name'], $_POST['room_name']);
$tpl = new Template();
$tpl->SetParam('matrix', $matrix);
$tpl->display('templates/matrix.tpl');
die;
break;
case 'ChangeRoom':
$day_name = $_POST['day_name'];
$hour_name = $_POST['hour_name'];
$old_room = $_POST['old_room'];
$new_room = $_POST['new_room'];
Schedule::ChangeRoom($day_name, $hour_name, $old_room, $new_room);
die;
break;
case 'MovePair':
Schedule::MovePair($_POST['from_day'], $_POST['from_hour'], $_POST['from_room'],
$_POST['to_day'], $_POST['to_hour'], $_POST['to_room']);
die;
break;
}
}
?>
|