kopia lustrzana https://github.com/magicbug/Cloudlog
Converted ADIF pages to Bootstrap 4 and removed the dxcluster controller
rodzic
5ab9fc020e
commit
0187548829
|
@ -95,9 +95,9 @@ class adif extends CI_Controller {
|
||||||
//exit(0);
|
//exit(0);
|
||||||
$data['error'] = $this->upload->display_errors();
|
$data['error'] = $this->upload->display_errors();
|
||||||
|
|
||||||
$this->load->view('layout/header', $data);
|
$this->load->view('interface_assets/header', $data);
|
||||||
$this->load->view('adif/import');
|
$this->load->view('adif/import');
|
||||||
$this->load->view('layout/footer');
|
$this->load->view('interface_assets/footer');
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -129,9 +129,9 @@ class adif extends CI_Controller {
|
||||||
unlink('./uploads/'.$data['upload_data']['file_name']);
|
unlink('./uploads/'.$data['upload_data']['file_name']);
|
||||||
|
|
||||||
$data['page_title'] = "ADIF Imported";
|
$data['page_title'] = "ADIF Imported";
|
||||||
$this->load->view('layout/header', $data);
|
$this->load->view('interface_assets/header', $data);
|
||||||
$this->load->view('adif/import_success');
|
$this->load->view('adif/import_success');
|
||||||
$this->load->view('layout/footer');
|
$this->load->view('interface_assets/footer');
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,116 +0,0 @@
|
||||||
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
|
|
||||||
|
|
||||||
class Dxcluster extends CI_Controller {
|
|
||||||
|
|
||||||
/* Controls the functions for interacting with the cluster */
|
|
||||||
|
|
||||||
|
|
||||||
public function __construct()
|
|
||||||
{
|
|
||||||
parent::__construct();
|
|
||||||
|
|
||||||
if (isDomainAvailible('http://www.dxcluster.co.uk')) {
|
|
||||||
// internet is available
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
show_error('DX Cluster isnt available without internet access', '500');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Loads default view */
|
|
||||||
public function index()
|
|
||||||
{
|
|
||||||
$data['page_title'] = "DX Cluster";
|
|
||||||
|
|
||||||
$this->load->view('layout/header', $data);
|
|
||||||
$this->load->view('dxcluster/main');
|
|
||||||
$this->load->view('layout/footer');
|
|
||||||
}
|
|
||||||
|
|
||||||
/* loads custom spots based on band */
|
|
||||||
public function custom($band)
|
|
||||||
{
|
|
||||||
$data['page_title'] = "DX Cluster";
|
|
||||||
|
|
||||||
$data['band'] = $band;
|
|
||||||
|
|
||||||
$this->load->view('layout/header', $data);
|
|
||||||
$this->load->view('dxcluster/custom');
|
|
||||||
$this->load->view('layout/footer');
|
|
||||||
}
|
|
||||||
|
|
||||||
/* returns formatted json for all spots */
|
|
||||||
public function all_spots() {
|
|
||||||
|
|
||||||
$jsonurl = "http://www.dxcluster.co.uk/api/all";
|
|
||||||
|
|
||||||
$json = @file_get_contents($jsonurl,0,null,null);
|
|
||||||
$json_output = json_decode($json);
|
|
||||||
|
|
||||||
//print_r($json_output);
|
|
||||||
$i = 0;
|
|
||||||
foreach ($json_output as $name => $value) {
|
|
||||||
|
|
||||||
echo '<tr class="tr'.($i & 1).'">';
|
|
||||||
echo "<td class=\"time\">".$value->mytime."</td>";
|
|
||||||
echo "<td class=\"callsign\">".$value->call."</td>";
|
|
||||||
echo "<td class=\"freq\">".$value->freq."</td>";
|
|
||||||
echo "<td class=\"dxcallsgin\">".$value->dxcall."</td>";
|
|
||||||
echo "<td class=\"comment\">".htmlspecialchars($value->comment)."</td>";
|
|
||||||
echo "</tr>";
|
|
||||||
$i++;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* returns formatted json for custom spots */
|
|
||||||
public function custom_spots($band) {
|
|
||||||
|
|
||||||
$jsonurl = "http://www.dxcluster.co.uk/api/data_band/".$band;
|
|
||||||
|
|
||||||
$json = @file_get_contents($jsonurl,0,null,null);
|
|
||||||
$json_output = json_decode($json);
|
|
||||||
|
|
||||||
//print_r($json_output);
|
|
||||||
$i = 0;
|
|
||||||
foreach ($json_output as $name => $value) {
|
|
||||||
|
|
||||||
echo '<tr class="tr'.($i & 1).'">';
|
|
||||||
echo "<td class=\"time\">".$value->mytime."</td>";
|
|
||||||
echo "<td class=\"callsign\">".$value->call."</td>";
|
|
||||||
echo "<td class=\"freq\">".$value->freq."</td>";
|
|
||||||
echo "<td class=\"dxcallsgin\">".$value->dxcall."</td>";
|
|
||||||
echo "<td class=\"comment\">".htmlspecialchars($value->comment)."</td>";
|
|
||||||
echo "</tr>";
|
|
||||||
$i++;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function isDomainAvailible($domain)
|
|
||||||
{
|
|
||||||
//check, if a valid url is provided
|
|
||||||
if(!filter_var($domain, FILTER_VALIDATE_URL))
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
//initialize curl
|
|
||||||
$curlInit = curl_init($domain);
|
|
||||||
curl_setopt($curlInit,CURLOPT_CONNECTTIMEOUT,10);
|
|
||||||
curl_setopt($curlInit,CURLOPT_HEADER,true);
|
|
||||||
curl_setopt($curlInit,CURLOPT_NOBODY,true);
|
|
||||||
curl_setopt($curlInit,CURLOPT_RETURNTRANSFER,true);
|
|
||||||
|
|
||||||
//get answer
|
|
||||||
$response = curl_exec($curlInit);
|
|
||||||
|
|
||||||
curl_close($curlInit);
|
|
||||||
|
|
||||||
if ($response) return true;
|
|
||||||
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/* End of file dxcluster.php */
|
|
|
@ -1,24 +0,0 @@
|
||||||
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
|
|
||||||
|
|
||||||
class Install extends CI_Controller {
|
|
||||||
|
|
||||||
/*
|
|
||||||
Contains the basic functions to setup Cloudlog in its simplist form.
|
|
||||||
*/
|
|
||||||
|
|
||||||
// Collect Database Information
|
|
||||||
public function index() {
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
// Collect config information
|
|
||||||
public function config() {
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
// Setup Username & Password
|
|
||||||
public function user() {
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
|
@ -1,16 +1,39 @@
|
||||||
<div id="container">
|
|
||||||
<h2><?php echo $page_title; ?></h2>
|
|
||||||
|
|
||||||
<p><span class="label important">Important</span> Log files must have the file type .adi</p>
|
<div class="container">
|
||||||
|
|
||||||
<?php echo form_open_multipart('adif/import');?>
|
<h1>ADIF Functions</h1>
|
||||||
|
|
||||||
<input type="file" name="userfile" size="20" />
|
<div class="card">
|
||||||
|
<div class="card-header">
|
||||||
|
<?php echo $page_title; ?>
|
||||||
|
</div>
|
||||||
|
<div class="card-body">
|
||||||
|
<h5 class="card-title"></h5>
|
||||||
|
<p class="card-text"></p>
|
||||||
|
|
||||||
<br /><br />
|
<p><span class="label important">Important</span> Log files must have the file type .adi</p>
|
||||||
|
|
||||||
<input class="btn primary" type="submit" value="Upload" />
|
<form class="form-inline" action="<?php echo site_url('adif/import'); ?>" method="post" enctype="multipart/form-data">
|
||||||
|
<label class="sr-only" for="inlineFormInputName2">ADIF file</label>
|
||||||
|
<input class="file-input mb-2 mr-sm-2" type="file" name="userfile" size="20" />
|
||||||
|
|
||||||
</form>
|
<button type="submit" class="btn btn-primary mb-2" value="Upload">Upload</button>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<br>
|
||||||
|
|
||||||
|
<div class="card">
|
||||||
|
<div class="card-header">
|
||||||
|
ADIF Export
|
||||||
|
</div>
|
||||||
|
<div class="card-body">
|
||||||
|
<h5 class="card-title">Take your logbook file anywhere!</h5>
|
||||||
|
<p class="card-text">Exporting ADIFs allows you to import contacts into third party applications like LoTW, Awards or just for keeping a backup.</p>
|
||||||
|
<a href="<?php echo site_url('adif/exportall'); ?>" title="Export All" target="_blank" class="btn btn-outline-secondary btn-sm">Export All QSOs</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,21 @@
|
||||||
<div id="container">
|
<div class="container">
|
||||||
<h2>ADIF Imported</h2>
|
<br>
|
||||||
|
<?php if($this->session->flashdata('message')) { ?>
|
||||||
|
<!-- Display Message -->
|
||||||
|
<div class="alert-message error">
|
||||||
|
<p><?php echo $this->session->flashdata('message'); ?></p>
|
||||||
|
</div>
|
||||||
|
<?php } ?>
|
||||||
|
|
||||||
|
<div class="card">
|
||||||
|
<div class="card-header">
|
||||||
|
ADIF Imported
|
||||||
|
</div>
|
||||||
|
<div class="card-body">
|
||||||
|
<h5 class="card-title">Yay, its imported!</h5>
|
||||||
|
<p class="card-text"><p>The ADIF File has been imported, and any dupes skipped.</p></p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<p>The ADIF File has been imported, and any dupes skipped.</p>
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -62,9 +62,9 @@
|
||||||
<div class="dropdown-divider"></div>
|
<div class="dropdown-divider"></div>
|
||||||
<a class="dropdown-item" href="<?php echo site_url('adif/import');?>" title="ADIF Import/Export"><i class="fas fa-sync"></i> ADIF Import/Export</a>
|
<a class="dropdown-item" href="<?php echo site_url('adif/import');?>" title="ADIF Import/Export"><i class="fas fa-sync"></i> ADIF Import/Export</a>
|
||||||
<div class="dropdown-divider"></div>
|
<div class="dropdown-divider"></div>
|
||||||
<a class="dropdown-item" href="<?php echo site_url('lotw');?>" title="LoTW Import/Export"><i class="fas fa-sync"></i> LoTW Import/Export</a>
|
<a class="dropdown-item" href="<?php echo site_url('lotw/import');?>" title="LoTW Import/Export"><i class="fas fa-sync"></i> LoTW Import/Export</a>
|
||||||
<div class="dropdown-divider"></div>
|
<div class="dropdown-divider"></div>
|
||||||
<a class="dropdown-item" href="<?php echo site_url('eqsl');?>" title="eQSL Import/Export"><i class="fas fa-sync"></i> eQSL Import/Export</a>
|
<a class="dropdown-item" href="<?php echo site_url('eqsl/export');?>" title="eQSL Import/Export"><i class="fas fa-sync"></i> eQSL Import/Export</a>
|
||||||
|
|
||||||
<div class="dropdown-divider"></div>
|
<div class="dropdown-divider"></div>
|
||||||
<a class="dropdown-item" href="<?php echo site_url('backup');?>" title="Backup Cloudlog"><i class="fas fa-save"></i> Backup</a>
|
<a class="dropdown-item" href="<?php echo site_url('backup');?>" title="Backup Cloudlog"><i class="fas fa-save"></i> Backup</a>
|
||||||
|
|
Ładowanie…
Reference in New Issue