Added a Data Export area to the admin dropdown, this includes kml and adif

pull/106/merge
Peter Goodhall 2012-06-03 21:22:16 +01:00
rodzic d7c1f65209
commit 2af9cfc4a5
5 zmienionych plików z 38 dodań i 4 usunięć

Wyświetl plik

@ -0,0 +1,21 @@
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
class Export extends CI_Controller {
public function index()
{
$this->load->model('user_model');
if(!$this->user_model->authorize(99)) { $this->session->set_flashdata('notice', 'You\'re not allowed to do that!'); redirect('dashboard'); }
$data['page_title'] = "Data Export";
$this->load->view('layout/header', $data);
$this->load->view('export/index');
$this->load->view('layout/footer');
}
}
/* End of file welcome.php */
/* Location: ./application/controllers/welcome.php */

Wyświetl plik

@ -74,9 +74,9 @@ class Kml extends CI_Controller {
} }
else else
{ {
echo 'qsos.kml written! and can be found in /kml/qsos.kml'; header("Content-Disposition: attachment; filename=\"qsos.kml\"");
echo $output;
} }
} }
} }

Wyświetl plik

@ -0,0 +1,12 @@
<div id="container">
<h2><?php echo $page_title; ?></h2>
<p>Below are all the exportable data options available in Cloudlog</p>
<h3>Data Types</h3>
<ul>
<li><a href="<?php echo site_url('kml'); ?>">All QSOs as a KML File</a></li>
<li><a href="<?php echo site_url('adif/export'); ?>">ADIF Export</a></li>
</ul>
</div>

Wyświetl plik

@ -55,7 +55,8 @@
<li><a href="<?php echo site_url('radio');?>" title="Backup">Radios</a></li> <li><a href="<?php echo site_url('radio');?>" title="Backup">Radios</a></li>
<li><a href="<?php echo site_url('backup');?>" title="Backup">Backup</a></li> <li><a href="<?php echo site_url('backup');?>" title="Backup">Backup</a></li>
<li><a href="<?php echo site_url('adif/import');?>" title="ADIF Import">ADIF Import</a></li> <li><a href="<?php echo site_url('adif/import');?>" title="ADIF Import">ADIF Import</a></li>
<li><a href="<?php echo site_url('adif/export');?>" title="ADIF Export">ADIF Export</a></li> <!-- <li><a href="<?php echo site_url('adif/export');?>" title="ADIF Export">ADIF Export</a></li> -->
<li><a href="<?php echo site_url('export');?>" title="Data Export">Data Export</a></li>
<li><a href="<?php echo site_url('api/help');?>" title="API">API</a></li> <li><a href="<?php echo site_url('api/help');?>" title="API">API</a></li>
</ul> </ul>
<?php } ?> <?php } ?>

File diff suppressed because one or more lines are too long