2019-06-19 13:14:10 +00:00
|
|
|
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
|
|
|
|
|
|
|
|
/*
|
|
|
|
Controller to interact with the Clublog API
|
|
|
|
*/
|
|
|
|
|
|
|
|
class Clublog extends CI_Controller {
|
|
|
|
|
|
|
|
// Show frontend if there is one
|
|
|
|
public function index() {
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
// Upload ADIF to Clublog
|
|
|
|
public function upload() {
|
2019-06-19 13:48:06 +00:00
|
|
|
$this->load->helper('file');
|
|
|
|
|
|
|
|
$this->load->model('logbook_model');
|
|
|
|
|
|
|
|
$data['qsos'] = $this->logbook_model->get_clublog_qsos();
|
|
|
|
|
|
|
|
// Create ADIF File of contacts not uploaded to Clublog
|
|
|
|
$string = $this->load->view('adif/data/clublog', $data, TRUE);
|
|
|
|
|
|
|
|
if ( ! write_file('uploads/clublog.adi', $string)) {
|
|
|
|
echo 'Unable to write the file - Make the folder Upload folder has write permissions.';
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
echo "uploads/clublog.adi file created.";
|
|
|
|
}
|
|
|
|
|
2019-06-19 13:14:10 +00:00
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|