Check for user_id before using it

pull/1868/head
phl0 2022-12-23 14:56:40 +01:00
rodzic 33ed61409b
commit 4c9e65930d
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 48EA1E640798CA9A
1 zmienionych plików z 13 dodań i 12 usunięć

Wyświetl plik

@ -63,19 +63,20 @@ function echoQrbCalcLink($mygrid, $grid, $vucc) {
</div>
<?php } ?>
<?php
$current_date = date('Y-m-d H:i:s');
?>
<?php if($this->LotwCert->lotw_cert_expired($this->session->userdata('user_id'), $current_date) == true) { ?>
<div class="alert alert-danger" role="alert">
<span class="badge badge-info"><?php echo $this->lang->line('general_word_important'); ?></span> <i class="fas fa-hourglass-end"></i> <?php echo $this->lang->line('lotw_cert_expired'); ?>
</div>
<?php } ?>
<?php if ($this->session->userdata('user_id')) { ?>
<?php
$current_date = date('Y-m-d H:i:s');
if($this->LotwCert->lotw_cert_expired($this->session->userdata('user_id'), $current_date) == true) { ?>
<div class="alert alert-danger" role="alert">
<span class="badge badge-info"><?php echo $this->lang->line('general_word_important'); ?></span> <i class="fas fa-hourglass-end"></i> <?php echo $this->lang->line('lotw_cert_expired'); ?>
</div>
<?php } ?>
<?php if($this->LotwCert->lotw_cert_expiring($this->session->userdata('user_id'), $current_date) == true) { ?>
<div class="alert alert-warning" role="alert">
<span class="badge badge-info"><?php echo $this->lang->line('general_word_important'); ?></span> <i class="fas fa-hourglass-half"></i> <?php echo $this->lang->line('lotw_cert_expiring'); ?>
</div>
<?php if($this->LotwCert->lotw_cert_expiring($this->session->userdata('user_id'), $current_date) == true) { ?>
<div class="alert alert-warning" role="alert">
<span class="badge badge-info"><?php echo $this->lang->line('general_word_important'); ?></span> <i class="fas fa-hourglass-half"></i> <?php echo $this->lang->line('lotw_cert_expiring'); ?>
</div>
<?php } ?>
<?php } ?>
<?php } ?>