mirror of
https://github.com/wavelog/wavelog.git
synced 2026-03-22 10:24:14 +00:00
same for contesting and in footer
This commit is contained in:
@@ -21,6 +21,16 @@ class Contesting extends CI_Controller {
|
||||
$this->load->model('contesting_model');
|
||||
$this->load->model('bands');
|
||||
|
||||
// Getting the live/post mode from GET command
|
||||
// 0 = live
|
||||
// 1 = post (manual)
|
||||
$get_manual_mode = $this->security->xss_clean($this->input->get('manual'));
|
||||
if ($get_manual_mode == '0' || $get_manual_mode == '1') {
|
||||
$data['manual_mode'] = $get_manual_mode;
|
||||
} else {
|
||||
show_404();
|
||||
}
|
||||
|
||||
$data['my_gridsquare'] = $this->stations->find_gridsquare();
|
||||
$data['radios'] = $this->cat->radios();
|
||||
$data['modes'] = $this->modes->active();
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<div class="container qso_panel contesting">
|
||||
<button type="button" class="btn btn-sm btn-warning float-end" onclick="reset_contest_session()"><i class="fas fa-sync-alt"></i> <?= __("Start new Contest Session"); ?></button>
|
||||
<h2 style="display:inline"><?= __("Contest Logging"); ?> </h2> <?php echo ($_GET['manual'] == 0 ? " <span style='display:inline' class='align-text-top badge text-bg-success'>LIVE</span>" : " <span style='display:inline' class='align-text-top badge text-bg-danger'>POST</span>"); ?>
|
||||
<h2 style="display:inline"><?= __("Contest Logging"); ?> </h2> <?php echo ($manual_mode == 0 ? " <span style='display:inline' class='align-text-top badge text-bg-success'>LIVE</span>" : " <span style='display:inline' class='align-text-top badge text-bg-danger'>POST</span>"); ?>
|
||||
<div class="row">
|
||||
|
||||
<div class="col-sm-12 col-md-12">
|
||||
@@ -40,15 +40,15 @@
|
||||
<div class="row">
|
||||
<div class="mb-3 col-md-2">
|
||||
<label for="start_date"><?= __("Date"); ?></label>
|
||||
<input type="text" class="form-control form-control-sm input_date" name="start_date" id="start_date" value="<?php if (($this->session->userdata('start_date') != NULL && ((time() - $this->session->userdata('time_stamp')) < 24 * 60 * 60))) { echo $this->session->userdata('start_date'); } else { echo date('d-m-Y');}?>" <?php echo ($_GET['manual'] == 0 ? "disabled" : ""); ?> >
|
||||
<input type="text" class="form-control form-control-sm input_date" name="start_date" id="start_date" value="<?php if (($this->session->userdata('start_date') != NULL && ((time() - $this->session->userdata('time_stamp')) < 24 * 60 * 60))) { echo $this->session->userdata('start_date'); } else { echo date('d-m-Y');}?>" <?php echo ($manual_mode == 0 ? "disabled" : ""); ?> >
|
||||
</div>
|
||||
|
||||
<div class="mb-3 col-md-1">
|
||||
<label for="start_time"><?= __("Time"); ?></label>
|
||||
<input type="text" class="form-control form-control-sm input_time" name="start_time" id="start_time" value="<?php if (($this->session->userdata('start_time') != NULL && ((time() - $this->session->userdata('time_stamp')) < 24 * 60 * 60))) { echo substr($this->session->userdata('start_time'),0,5); } else { echo $_GET['manual'] == 0 ? date('H:i:s') : date('H:i'); } ?>" size="7" <?php echo ($_GET['manual'] == 0 ? "disabled" : ""); ?> >
|
||||
<input type="text" class="form-control form-control-sm input_time" name="start_time" id="start_time" value="<?php if (($this->session->userdata('start_time') != NULL && ((time() - $this->session->userdata('time_stamp')) < 24 * 60 * 60))) { echo substr($this->session->userdata('start_time'),0,5); } else { echo $manual_mode == 0 ? date('H:i:s') : date('H:i'); } ?>" size="7" <?php echo ($manual_mode == 0 ? "disabled" : ""); ?> >
|
||||
</div>
|
||||
|
||||
<?php if ( $_GET['manual'] == 0 ) { ?>
|
||||
<?php if ( $manual_mode == 0 ) { ?>
|
||||
<input class="input_time" type="hidden" id="start_time" name="start_time"value="<?php echo date('H:i'); ?>" />
|
||||
<input class="input_date" type="hidden" id="start_date" name="start_date" value="<?php echo date('d-m-Y'); ?>" />
|
||||
<?php } ?>
|
||||
|
||||
@@ -981,7 +981,7 @@ $($('#callsign')).on('keypress',function(e) {
|
||||
|
||||
<script type="text/javascript">
|
||||
|
||||
var manual = <?php echo $_GET['manual']; ?>;
|
||||
var manual = <?php echo $manual_mode; ?>;
|
||||
|
||||
<?php if ($this->session->userdata('user_qso_end_times') == 1) { ?>
|
||||
$('#callsign').focusout(function() {
|
||||
@@ -2474,7 +2474,7 @@ function viewEqsl(picture, callsign) {
|
||||
</script>
|
||||
<?php if ($this->uri->segment(1) == "contesting" && ($this->uri->segment(2) != "add" && $this->uri->segment(2) != "edit")) { ?>
|
||||
<script>
|
||||
var manual = <?php echo $_GET['manual']; ?>;
|
||||
var manual = <?php echo $manual_mode; ?>;
|
||||
</script>
|
||||
<script src="<?php echo base_url() ;?>assets/js/sections/contesting.js?v2"></script>
|
||||
<?php } ?>
|
||||
|
||||
Reference in New Issue
Block a user