Example #1
0
    $output[3]['category'] = $colorData['category'];
    $output[3]['color'] = $colorData['color_class'];
    $output[3]['main_color'] = $colorData['main_color'];
    $output[3]['second_color'] = $colorData['second_color'];
    $output[3]['room'] = $colorData['room'];
    $output[4][0] = $agenda->get_header_text($_POST['category']);
    if (isset($output[0]) && isset($output[1]) && isset($output[3]) && isset($output[4])) {
        echo json_encode($output);
    }
}
//
if (isset($_POST['action']) && $_POST['action'] == 'change_agenda_category_mobile') {
    $agenda = new agenda\agenda_main();
    $_SESSION['Category'] = $_POST['category'];
    //Session table update
    $data = $agenda->agenda_session($_POST['category'], 1);
    $output[0] = $agenda->display_session_mobile($data);
    $data2 = $agenda->agenda_session($_POST['category'], 2);
    $output[1] = $agenda->display_session_mobile($data2);
    //if it's Product demo
    if ($_POST['category'] == 14) {
        $data3 = $agenda->agenda_session(18, 2);
        $output[5] = $agenda->display_session_mobile($data3);
    }
    //Testimonial update
    $blocks = $agenda->block_display($_POST['category'], 1);
    $output[2] = '';
    foreach ($blocks as $elems) {
        $output[2] .= $agenda->get_block_data($elems[0], $elems[1]);
    }
    //Get the new colors and styles