kopia lustrzana https://github.com/magicbug/Cloudlog
Import QSO start and end date from LotW certs
rodzic
b888d44289
commit
82321c791d
|
@ -156,7 +156,7 @@ class Lotw extends CI_Controller {
|
|||
// New Certificate Store in Database
|
||||
|
||||
// Store Certificate Data into MySQL
|
||||
$this->LotwCert->store_certficiate($this->session->userdata('user_id'), $info['issued_callsign'], $dxcc, $info['validFrom'], $info['validTo_Date'], $info['pem_key'], $info['general_cert']);
|
||||
$this->LotwCert->store_certifciate($this->session->userdata('user_id'), $info['issued_callsign'], $dxcc, $info['validFrom'], $info['validTo_Date'], $info['qso-first-date'], $info['qso-end-date'], $info['pem_key'], $info['general_cert']);
|
||||
|
||||
// Cert success flash message
|
||||
$this->session->set_flashdata('Success', $info['issued_callsign'].' Certficiate Imported.');
|
||||
|
@ -424,8 +424,10 @@ class Lotw extends CI_Controller {
|
|||
// Store Variables
|
||||
$data['issued_callsign'] = $certdata['subject']['undefined'];
|
||||
$data['issued_name'] = $certdata['subject']['commonName'];
|
||||
$data['validFrom'] = date('Y-m-d H:i:s', $certdata['validFrom_time_t']);;
|
||||
$data['validTo_Date'] = date('Y-m-d H:i:s', $certdata['validTo_time_t']);;
|
||||
$data['validFrom'] = date('Y-m-d H:i:s', $certdata['validFrom_time_t']);
|
||||
$data['validTo_Date'] = date('Y-m-d H:i:s', $certdata['validTo_time_t']);
|
||||
$data['qso-first-date'] = $certdata['extensions']['1.3.6.1.4.1.12348.1.2'];
|
||||
$data['qso-end-date'] = $certdata['extensions']['1.3.6.1.4.1.12348.1.3'];
|
||||
|
||||
return $data;
|
||||
}
|
||||
|
|
|
@ -16,6 +16,8 @@ $lang['lotw_no_certs_uploaded'] = 'You need to upload some LoTW p12 certificates
|
|||
|
||||
$lang['lotw_date_created'] = 'Date Created';
|
||||
$lang['lotw_date_expires'] = 'Date Expires';
|
||||
$lang['lotw_qso_start_date'] = 'QSO Start Date';
|
||||
$lang['lotw_qso_end_date'] = 'QSO End Date';
|
||||
$lang['lotw_status'] = 'Status';
|
||||
$lang['lotw_options'] = 'Options';
|
||||
$lang['lotw_valid'] = 'Valid';
|
||||
|
|
|
@ -16,6 +16,8 @@ $lang['lotw_no_certs_uploaded'] = 'Du musst mindestens ein LoTW-p12-Zertifikat h
|
|||
|
||||
$lang['lotw_date_created'] = 'Ausstellungsdatum';
|
||||
$lang['lotw_date_expires'] = 'Ablaufdatum';
|
||||
$lang['lotw_qso_start_date'] = 'QSO Startdatum';
|
||||
$lang['lotw_qso_end_date'] = 'QSO Enddatum';
|
||||
$lang['lotw_status'] = 'Status';
|
||||
$lang['lotw_options'] = 'Optionen';
|
||||
$lang['lotw_valid'] = 'Gültig';
|
||||
|
|
|
@ -36,13 +36,15 @@ class LotwCert extends CI_Model {
|
|||
return $query->num_rows();
|
||||
}
|
||||
|
||||
function store_certficiate($user_id, $callsign, $dxcc, $date_created, $date_expires, $cert_key, $general_cert) {
|
||||
function store_certifciate($user_id, $callsign, $dxcc, $date_created, $date_expires, $qso_start_date, $qso_end_date, $cert_key, $general_cert) {
|
||||
$data = array(
|
||||
'user_id' => $user_id,
|
||||
'callsign' => $callsign,
|
||||
'cert_dxcc' => $dxcc,
|
||||
'date_created' => $date_created,
|
||||
'date_expires' => $date_expires,
|
||||
'qso_start_date' => $qso_start_date,
|
||||
'qso_end_date' => $qso_end_date,
|
||||
'cert_key' => $cert_key,
|
||||
'cert' => $general_cert,
|
||||
);
|
||||
|
@ -89,4 +91,4 @@ class LotwCert extends CI_Model {
|
|||
$this->db->empty_table($table);
|
||||
}
|
||||
}
|
||||
?>
|
||||
?>
|
||||
|
|
|
@ -30,11 +30,13 @@
|
|||
<tr>
|
||||
<th scope="col"><?php echo $this->lang->line('gen_hamradio_callsign'); ?></th>
|
||||
<th scope="col"><?php echo $this->lang->line('gen_hamradio_dxcc'); ?></th>
|
||||
<th scope="col"><?php echo $this->lang->line('lotw_date_created'); ?></th>
|
||||
<th scope="col"><?php echo $this->lang->line('lotw_date_expires'); ?></th>
|
||||
<th scope="col"><?php echo $this->lang->line('lotw_status'); ?></th>
|
||||
<th scope="col"><?php echo $this->lang->line('lotw_options'); ?></th>
|
||||
</tr>
|
||||
<th scope="col"><?php echo $this->lang->line('lotw_qso_start_date'); ?></th>
|
||||
<th scope="col"><?php echo $this->lang->line('lotw_qso_end_date'); ?></th>
|
||||
<th scope="col"><?php echo $this->lang->line('lotw_date_created'); ?></th>
|
||||
<th scope="col"><?php echo $this->lang->line('lotw_date_expires'); ?></th>
|
||||
<th scope="col"><?php echo $this->lang->line('lotw_status'); ?></th>
|
||||
<th scope="col"><?php echo $this->lang->line('lotw_options'); ?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
|
@ -43,9 +45,19 @@
|
|||
<tr>
|
||||
<td><?php echo $row->callsign; ?></td>
|
||||
<td><?php echo ucfirst($row->cert_dxcc); ?></td>
|
||||
<td><?php
|
||||
$valid_form = strtotime( $row->date_created );
|
||||
$new_valid_from = date($this->config->item('qso_date_format'), $valid_form );
|
||||
<td><?php
|
||||
$valid_qso_start = strtotime( $row->qso_start_date );
|
||||
$new_valid_qso_start = date($this->config->item('qso_date_format'), $valid_qso_start );
|
||||
echo $new_valid_qso_start; ?>
|
||||
</td>
|
||||
<td><?php
|
||||
$valid_qso_end = strtotime( $row->qso_end_date );
|
||||
$new_valid_qso_end = date($this->config->item('qso_date_format'), $valid_qso_end );
|
||||
echo $new_valid_qso_end; ?>
|
||||
</td>
|
||||
<td><?php
|
||||
$valid_from = strtotime( $row->date_created );
|
||||
$new_valid_from = date($this->config->item('qso_date_format'), $valid_from );
|
||||
echo $new_valid_from; ?>
|
||||
</td>
|
||||
<td>
|
||||
|
|
Ładowanie…
Reference in New Issue