Cloudlog/application/views/simplefle/index.php

171 wiersze
7.5 KiB
PHP
Czysty Zwykły widok Historia

2023-10-26 18:14:53 +00:00
<script type="text/javascript">
2023-10-27 22:23:43 +00:00
var Bands = <?php echo json_encode($bands); ?>;
2023-10-27 19:45:15 +00:00
var user_id = <?php echo $this->session->userdata('user_id'); ?>;
2023-10-26 18:14:53 +00:00
</script>
2023-10-24 20:54:35 +00:00
<div class="container">
2023-10-26 18:14:53 +00:00
2023-10-27 22:23:43 +00:00
<br>
<div id="simpleFleInfo">
<script>
2023-10-30 22:52:20 +00:00
var lang_qso_simplefle_info_ln1 = "<?php echo lang('qso_simplefle_info_ln1'); ?>";
var lang_qso_simplefle_info_ln2 = "<?php echo lang('qso_simplefle_info_ln2'); ?>";
var lang_qso_simplefle_info_ln3 = "<?php echo lang('qso_simplefle_info_ln3'); ?>";
var lang_qso_simplefle_info_ln4 = "<?php echo lang('qso_simplefle_info_ln4'); ?>";
var lang_qso_simplefle_syntax_help = "<?php echo lang('qso_simplefle_syntax_help_button'); ?>";
var lang_qso_simplefle_syntax_help_title = "<?php echo lang('qso_simplefle_syntax_help_title'); ?>";
2023-11-01 20:08:21 +00:00
var lang_qso_simplefle_syntax_help_close_w_sample = "<?php echo lang('qso_simplefle_syntax_help_close_w_sample'); ?>";
var lang_admin_close = "<?php echo lang('admin_close'); ?>";
2023-10-30 22:52:20 +00:00
var lang_qso_simplefle_error_band = "<?php echo lang('qso_simplefle_error_band'); ?>";
var lang_qso_simplefle_error_mode = "<?php echo lang('qso_simplefle_error_mode'); ?>";
var lang_qso_simplefle_error_time = "<?php echo lang('qso_simplefle_error_time'); ?>";
var lang_qso_simplefle_error_date = "<?php echo lang('qso_simplefle_error_date'); ?>";
var lang_qso_simplefle_qso_list_total = "<?php echo lang('qso_simplefle_qso_list_total'); ?>";
var lang_gen_hamradio_qso = "<?php echo lang('gen_hamradio_qso'); ?>";
var lang_qso_simplefle_error_stationcall = "<?php echo lang('qso_simplefle_error_stationcall'); ?>";
var lang_qso_simplefle_error_operator = "<?php echo lang('qso_simplefle_error_operator'); ?>";
var lang_qso_simplefle_warning_reset = "<?php echo lang('qso_simplefle_warning_reset'); ?>";
var lang_qso_simplefle_warning_missing_band_mode = "<?php echo lang('qso_simplefle_warning_missing_band_mode'); ?>";
2023-11-08 16:51:13 +00:00
var lang_qso_simplefle_warning_missing_time = "<?php echo lang('qso_simplefle_warning_missing_time'); ?>";
2023-11-02 07:22:01 +00:00
var lang_qso_simplefle_warning_example_data = "<?php echo lang('qso_simplefle_warning_example_data'); ?>";
2023-10-30 22:52:20 +00:00
var lang_qso_simplefle_confirm_save_to_log = "<?php echo lang('qso_simplefle_confirm_save_to_log'); ?>";
var lang_qso_simplefle_success_save_to_log_header = "<?php echo lang('qso_simplefle_success_save_to_log_header'); ?>";
var lang_qso_simplefle_success_save_to_log = "<?php echo lang('qso_simplefle_success_save_to_log'); ?>";
2023-11-01 20:08:21 +00:00
var lang_qso_simplefle_sample_data = "<?php echo lang('qso_simplefle_sample_data'); ?>";
2023-10-27 22:23:43 +00:00
</script>
<h2><?php echo $page_title; ?></h2>
2023-11-14 12:35:53 +00:00
<button type="button" class="btn btn-sm btn-primary me-1" id="simpleFleInfoButton"><?php echo lang('qso_simplefle_info'); ?></button>
2023-10-27 22:23:43 +00:00
</div>
2023-10-25 07:29:16 +00:00
2023-10-27 22:23:43 +00:00
<?php if ($this->session->flashdata('message')) { ?>
<!-- Display Message -->
<div class="alert-message error">
<p><?php echo $this->session->flashdata('message'); ?></p>
</div>
<?php } ?>
2023-10-25 07:29:16 +00:00
</div>
<div class="container-fluid">
2023-10-27 22:23:43 +00:00
<header class="d-flex flex-wrap align-items-center justify-content-center justify-content-md-between py-3 mb-4 border-bottom">
<div class="col-md-3 mb-2 mb-md-0">
2023-10-26 18:14:53 +00:00
2023-10-27 22:23:43 +00:00
</div>
<div class="col-md-3 justify-content-end d-flex">
2023-10-25 07:29:16 +00:00
2023-10-26 18:14:53 +00:00
2023-10-27 22:23:43 +00:00
</div>
</header>
<div class="row mt-4">
<!-- START BASIC QSO DATA -->
<div class="col-xs-12 col-md-4">
<div class="card-header">
2023-10-30 22:52:20 +00:00
<?php echo lang('qso_simplefle_qso_data'); ?>
2023-10-27 22:23:43 +00:00
</div>
<div class="card-body">
2023-10-29 22:25:47 +00:00
<div class="row">
<div class="col-xs-12 col-lg-12 col-xl-6">
2023-11-14 12:35:53 +00:00
<div class="mb-3">
2023-10-30 22:52:20 +00:00
<label for="qsodate"><?php echo lang('qso_simplefle_qso_date'); ?></label>
2023-10-29 22:25:47 +00:00
<input type="date" class="form-control" id="qsodate">
2023-11-04 11:55:33 +00:00
<small class="form-text text-muted"><?php echo lang('qso_simplefle_qso_date_hint'); ?></small>
2023-10-25 07:29:16 +00:00
</div>
</div>
2023-11-04 11:45:23 +00:00
<div class="col-xs-12 col-lg-12 col-xl-6">
2023-11-10 11:55:25 +00:00
<p><?php echo lang('qso_simplefle_utc_time'); ?></p>
2023-11-14 12:35:53 +00:00
<h4 class="fw-bold" id="utc-time"></h4>
2023-10-25 07:29:16 +00:00
</div>
2023-10-29 22:25:47 +00:00
</div>
<div class="row">
<div class="col-xs-12 col-lg-6">
2023-11-14 12:35:53 +00:00
<div class="mb-3">
2023-10-29 22:25:47 +00:00
<label for="station-call">
2023-10-30 22:52:20 +00:00
<?php echo lang('qso_simplefle_station_call_location'); ?>
2023-10-29 22:25:47 +00:00
</label>
2023-11-14 12:35:53 +00:00
<select name="station_profile" class="station_id form-select" id="station-call">
2023-10-29 22:25:47 +00:00
<option value="-">-</option>
<?php foreach ($station_profile->result() as $station) { ?>
<option value="<?php echo $station->station_id; ?>" <?php if ($station->station_id == $this->stations->find_active()) {
echo 'selected';
} ?>>
<?php echo lang('gen_hamradio_callsign') . ": " . $station->station_callsign . " (" . $station->station_profile_name . ")"; ?>
</option>
<?php } ?>
</select>
<div class="alert alert-danger" role="alert" id="warningStationCall" style="display: none"> </div>
2023-10-30 22:52:20 +00:00
<small class="form-text text-muted"><?php echo lang('qso_simplefle_station_call_location_hint'); ?></small>
2023-10-27 22:23:43 +00:00
</div>
2023-10-29 22:25:47 +00:00
</div>
2023-11-04 11:45:23 +00:00
<div class="col-xs-12 col-lg-6">
2023-11-14 12:35:53 +00:00
<div class="mb-3">
2023-11-04 11:45:23 +00:00
<label for="operator"><?php echo lang('qso_simplefle_operator'); ?> <span class="text-muted input-example"><?php echo lang('qso_simplefle_operator_hint'); ?></span></label>
<input type="text" class="form-control text-uppercase" id="operator" value="<?php echo $this->session->userdata('operator_callsign'); ?>">
<div class="alert alert-danger" role="alert" id="warningOperatorField" style="display: none"> </div>
</div>
</div>
2023-10-25 07:29:16 +00:00
</div>
</div>
2023-10-27 22:23:43 +00:00
<!-- END BASIC QSO DATA -->
<div class="card-body">
<div class="row">
2023-10-25 07:29:16 +00:00
<div class="col">
2023-10-30 22:52:20 +00:00
<p><?php echo lang('qso_simplefle_enter_the_data'); ?></p>
2023-10-27 22:23:43 +00:00
<textarea name="qso" class="form-control qso-area" cols="auto" rows="11" id="textarea"></textarea>
2023-10-25 07:29:16 +00:00
</div>
</div>
2023-10-27 22:23:43 +00:00
</div>
</div>
<div class="col-xs-12 col-md-8">
2023-10-27 22:29:43 +00:00
<div class="card-header">
2023-10-30 22:52:20 +00:00
<?php echo lang('qso_simplefle_qso_list'); ?>
2023-10-27 22:29:43 +00:00
</div>
<div class="card-body">
<div class="qsoList">
2023-11-01 20:56:33 +00:00
<table class="table table-condensed table-striped table-sm sfletable" id="qsoTable">
2023-10-27 22:29:43 +00:00
<thead>
<tr>
2023-10-30 22:52:20 +00:00
<th><?php echo lang('general_word_date'); ?></th>
<th><?php echo lang('general_word_time'); ?></th>
<th><?php echo lang('gen_hamradio_callsign'); ?></th>
<th><?php echo lang('gen_hamradio_band'); ?></th>
<th><?php echo lang('gen_hamradio_mode'); ?></th>
<th><?php echo lang('gen_hamradio_rsts'); ?></th>
<th><?php echo lang('gen_hamradio_rstr'); ?></th>
<th><?php echo lang('gen_hamradio_operator'); ?></th>
2023-11-02 13:50:21 +00:00
<th><?php echo lang('gen_hamradio_refs'); ?>*</th>
</th>
2023-10-27 22:29:43 +00:00
</tr>
</thead>
<tbody id="qsoTableBody">
2023-10-27 22:23:43 +00:00
2023-10-27 22:29:43 +00:00
</tbody>
</table>
</div>
2023-11-02 13:50:21 +00:00
<div class="row mt-2">
<div class="col-6 col-sm-6">
<span class="js-qso-count"></span>
</div>
2023-11-14 12:35:53 +00:00
<div class="col-6 col-sm-6 text-end">
2023-11-02 13:50:21 +00:00
<?php echo lang('qso_simplefle_refs_hint'); ?>
</div>
</div>
2023-10-27 22:23:43 +00:00
</div>
<div class="row mt-2">
<div class="col-3 col-sm-3">
2023-10-30 22:52:20 +00:00
<button class="btn btn-primary js-reload-qso"><?php echo lang('qso_simplefle_reload'); ?></button>
2023-10-25 07:29:16 +00:00
</div>
2023-10-27 22:23:43 +00:00
<div class="col-3 col-sm-3">
2023-10-30 22:52:20 +00:00
<button class="btn btn-warning js-save-to-log"><?php echo lang('qso_simplefle_save'); ?></button>
2023-10-25 07:29:16 +00:00
</div>
2023-10-27 22:23:43 +00:00
<div class="col-3 col-sm-3">
2023-10-30 22:52:20 +00:00
<button class="btn btn-danger js-empty-qso"><?php echo lang('qso_simplefle_clear'); ?></button>
2023-10-27 22:23:43 +00:00
</div>
<div class="col-3 col-sm-3">
2023-10-30 22:52:20 +00:00
<button class="btn btn-success" id="js-syntax"><?php echo lang('qso_simplefle_syntax_help_button'); ?></button>
2023-10-25 07:29:16 +00:00
</div>
</div>
</div>
2023-10-26 18:14:53 +00:00
</div>
2023-11-02 13:50:21 +00:00
</div>