'; echo ''; ?> <?php echo __('Acoustic console'); ?> '; if ($config['style'] === 'pandora_black' && !is_metaconsole()) { echo ''; } else { echo ''; } echo ''; echo ''; echo ui_require_css_file('wizard', 'include/styles/', true); echo ui_require_css_file('discovery', 'include/styles/', true); echo ui_require_css_file('sound_events', 'include/styles/', true); $output = '
'; // Header tabs. $output .= ''; // Content tabs. $output .= '
'; $output .= '

'; $output .= __('Console configuration'); $output .= '

'; $inputs = []; // Load filter. $fields = \events_get_event_filter_select(); $inputs[] = [ 'label' => \__('Set condition'), 'arguments' => [ 'type' => 'select', 'fields' => $fields, 'name' => 'filter_id', 'selected' => 0, 'return' => true, 'nothing' => \__('All new events'), 'nothing_value' => 0, 'class' => 'fullwidth', ], ]; $times_interval = [ 10 => '10 '.__('seconds'), 15 => '15 '.__('seconds'), 30 => '30 '.__('seconds'), 60 => '60 '.__('seconds'), ]; $times_sound = [ 2 => '2 '.__('seconds'), 5 => '5 '.__('seconds'), 10 => '10 '.__('seconds'), 15 => '15 '.__('seconds'), 30 => '30 '.__('seconds'), 60 => '60 '.__('seconds'), ]; $inputs[] = [ 'class' => 'interval-sounds', 'direct' => 1, 'block_content' => [ [ 'label' => __('Interval'), 'arguments' => [ 'type' => 'select', 'fields' => $times_interval, 'name' => 'interval', 'selected' => 10, 'return' => true, ], ], [ 'label' => __('Sound duration'), 'arguments' => [ 'type' => 'select', 'fields' => $times_sound, 'name' => 'time_sound', 'selected' => 10, 'return' => true, ], ], ], ]; $sounds = [ 'aircraftalarm.wav' => 'Air craft alarm', 'air_shock_alarm.wav' => 'Air shock alarm', 'alien_alarm.wav' => 'Alien alarm', 'alien_beacon.wav' => 'Alien beacon', 'bell_school_ringing.wav' => 'Bell school ringing', 'Door_Alarm.wav' => 'Door alarm', 'EAS_beep.wav' => 'EAS beep', 'Firewarner.wav' => 'Fire warner', 'HardPCMAlarm.wav' => 'Hard PCM Alarm', 'negativebeep.wav' => 'Negative beep', 'Star_Trek_emergency_simulation.wav' => 'StarTrek emergency simulation', ]; $eventsounds = db_get_all_rows_sql('SELECT * FROM tevent_sound WHERE active = 1'); foreach ($eventsounds as $key => $row) { $sounds[$row['sound']] = $row['name']; } $inputs[] = [ 'class' => 'test-sounds', 'direct' => 1, 'block_content' => [ [ 'label' => \__('Sound melody'), 'arguments' => [ 'type' => 'select', 'fields' => $sounds, 'name' => 'sound_id', 'selected' => 'Star_Trek_emergency_simulation.wav', 'return' => true, 'class' => 'fullwidth', ], ], [ 'arguments' => [ 'type' => 'button', 'name' => 'melody_sound', 'label' => __('Test sound'), 'attributes' => ['icon' => 'sound'], 'return' => true, ], ], ], ]; // Print form. $output .= HTML::printForm( [ 'form' => [ 'action' => '', 'method' => 'POST', ], 'inputs' => $inputs, ], true, false ); $output .= '
'; $output .= '
'; $output .= '

'; $output .= __('Discovered alerts'); $output .= '

'; $output .= '
'; $output .= html_print_image( 'images/no-alerts-discovered.png', true, [ 'title' => __('No alerts discovered'), 'class' => 'invert_filter', ] ); $output .= ''; $output .= __('Congrats! there’s nothing to show'); $output .= ''; $output .= '
'; $output .= '
    '; $output .= html_print_input_hidden( 'ajax_file_sound_console', ui_get_full_url('ajax.php', false, false, false), true ); $output .= html_print_input_hidden( 'meta', is_metaconsole(), true ); $output .= '
    '; $output .= '
    '; $output .= '
    '; $output .= '
    '; $output .= '
    '; $output .= '
    '; $output .= '
    '; $output .= html_print_button( __('Start'), 'start-search', false, '', [ 'icon' => 'cog', 'class' => 'mrgn_lft_20px', ], true ); // $output .= html_print_submit_button( // [ // 'label' => __('Start'), // 'type' => 'button', // 'name' => 'start-search', // 'attributes' => [ 'class' => 'play' ], // 'return' => true, // ], // 'div', // true // ); $output .= '
    '; $output .= html_print_input( [ 'type' => 'button', 'name' => 'no-alerts', 'label' => __('No alerts'), 'attributes' => ['class' => 'secondary alerts'], 'return' => true, ], 'div', true ); $output .= '
    '; $output .= html_print_input( [ 'type' => 'hidden', 'name' => 'mode_alert', 'value' => 0, 'return' => true, ], 'div', true ); $output .= '
    '; $output .= '
    '; echo $output; ?> '; while (ob_get_length() > 0) { ob_end_flush(); } echo '';