kopia lustrzana https://github.com/magicbug/Cloudlog
Started code to read station profiles and find matching certs
rodzic
fade52b18e
commit
f9448bddb2
|
|
@ -136,6 +136,49 @@ class Lotw extends CI_Controller {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Function: lotw_upload
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| This function Uploads to LOTW
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
public function lotw_upload() {
|
||||||
|
// Get Station Profile Data
|
||||||
|
$this->load->model('Stations');
|
||||||
|
|
||||||
|
$station_profiles = $this->Stations->all();
|
||||||
|
|
||||||
|
if ($station_profiles->num_rows() >= 1) {
|
||||||
|
foreach ($station_profiles->result() as $station_profile)
|
||||||
|
{
|
||||||
|
print_r($station_profile);
|
||||||
|
|
||||||
|
// Get Certificate Data
|
||||||
|
$this->load->model('LotwCert');
|
||||||
|
|
||||||
|
$lotw_cert_info = $this->LotwCert->lotw_cert_details($station_profile->station_callsign, $this->session->userdata('user_id'));
|
||||||
|
|
||||||
|
print_r($lotw_cert_info);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
echo "No Station Profiles";
|
||||||
|
}
|
||||||
|
|
||||||
|
// Get Certificate Data
|
||||||
|
$this->load->model('LotwCert');
|
||||||
|
// Set QSOs for Station Profile that havent been uploaded
|
||||||
|
|
||||||
|
// Build ADIF file
|
||||||
|
|
||||||
|
// Save TQ8
|
||||||
|
|
||||||
|
// Upload TQ8
|
||||||
|
|
||||||
|
// Destory TQ8
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
| Function: delete_cert
|
| Function: delete_cert
|
||||||
|
|
|
||||||
|
|
@ -25,6 +25,14 @@ class LotwCert extends CI_Model {
|
||||||
return $query;
|
return $query;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function lotw_cert_details($callsign, $user_id) {
|
||||||
|
$this->db->where('user_id', $user_id);
|
||||||
|
$this->db->where('callsign', $callsign);
|
||||||
|
$query = $this->db->get('lotw_certs');
|
||||||
|
|
||||||
|
return $query->row();
|
||||||
|
}
|
||||||
|
|
||||||
function find_cert($callsign, $user_id) {
|
function find_cert($callsign, $user_id) {
|
||||||
$this->db->where('user_id', $user_id);
|
$this->db->where('user_id', $user_id);
|
||||||
$this->db->where('callsign', $callsign);
|
$this->db->where('callsign', $callsign);
|
||||||
|
|
|
||||||
|
|
@ -106,7 +106,7 @@
|
||||||
|
|
||||||
<div class="dropdown-divider"></div>
|
<div class="dropdown-divider"></div>
|
||||||
|
|
||||||
<a class="dropdown-item" href="<?php echo site_url('lotw/import');?>" title="LoTW Import"><i class="fas fa-sync"></i> LoTW Import</a>
|
<a class="dropdown-item" href="<?php echo site_url('lotw');?>" title="LoTW Import"><i class="fas fa-sync"></i> LoTW</a>
|
||||||
|
|
||||||
<div class="dropdown-divider"></div>
|
<div class="dropdown-divider"></div>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
<div class="container lotw">
|
<div class="container lotw">
|
||||||
|
<br>
|
||||||
<h1><?php echo $page_title; ?></h1>
|
<a class="btn btn-success btn-sm float-right" href="<?php echo site_url('/lotw/import'); ?>" role="button"><i class="fas fa-cloud-upload-alt"></i> LoTW Import</a><h1><?php echo $page_title; ?></h1>
|
||||||
|
|
||||||
<!-- Card Starts -->
|
<!-- Card Starts -->
|
||||||
<div class="card">
|
<div class="card">
|
||||||
|
|
|
||||||
Ładowanie…
Reference in New Issue