示例#1
0
文件: ajax.php 项目: HRNIT/paris2015
        echo 'Success';
    }
}
//Get Testimonial Data
if (isset($_POST['action']) && $_POST['action'] == 'get_testimonial_data') {
    $agenda = new agenda\agenda_main();
    $result = $agenda->get_testimonial_data($_POST['day'], $_POST['category'], $_POST['block_num']);
    if (isset($result)) {
        echo $result;
    }
}
//change testimonial type
if (isset($_POST['action']) && $_POST['action'] == 'change_testimonial_type') {
    $the_main = new main\main();
    $agenda = new agenda\agenda_main();
    $the_main->change_testimonial_type($_POST['day'], $_POST['category'], $_POST['block_num'], $_POST['type']);
    $result = $agenda->get_testimonial_data($_POST['day'], $_POST['category'], $_POST['block_num']);
    if (isset($result)) {
        echo $result;
    }
}
//add speaker to testimonial
if (isset($_POST['action']) && $_POST['action'] == 'add_speaker_to_testimonial') {
    $the_main = new main\main();
    $agenda = new agenda\agenda_main();
    $output = $the_main->add_speaker_to_testimonial($_POST['block_id'], $_POST['speaker_id'], $_POST['type'], 1);
    $result = $agenda->get_testimonial_data($output['agenda_day'], $output['agenda_category_id'], $output['block']);
    if (isset($result)) {
        echo $result;
    }
}