} //change sponsor type if (isset($_POST['action']) && $_POST['action'] == 'change_sponsor_type') { $the_main = new main\main(); $agenda = new agenda\agenda_main(); $the_main->change_agenda_sponsor_type($_POST['day'], $_POST['category'], $_POST['type']); $result = $agenda->get_sponsor_data($_POST['day'], $_POST['category']); if (isset($result)) { echo $result; } } //add sponsor to agenda if (isset($_POST['action']) && $_POST['action'] == 'add_sponsor_to_agenda') { $the_main = new main\main(); $agenda = new agenda\agenda_main(); $output = $the_main->add_sponsor_to_agenda($_POST['block_id'], $_POST['sponsor_id'], $_POST['type']); $result = $agenda->get_sponsor_data($output['agenda_day'], $output['agenda_category_id']); if (isset($result)) { echo $result; } } //delete sponsor from agenda if (isset($_POST['action']) && $_POST['action'] == 'delete_sponsor_from_agenda') { $the_main = new main\main(); $agenda = new agenda\agenda_main(); $the_main->delete_sponsor_from_agenda($_POST['day'], $_POST['category'], $_POST['sponsor_id']); $result = $agenda->get_sponsor_data($_POST['day'], $_POST['category']); if (isset($result)) { echo $result; } }