diff --git a/application/controllers/backup.php b/application/controllers/backup.php new file mode 100644 index 00000000..8e06e210 --- /dev/null +++ b/application/controllers/backup.php @@ -0,0 +1,41 @@ +load->view('layout/header'); + $this->load->view('backup/main'); + $this->load->view('layout/footer'); + + + } + + public function adif(){ + $this->load->helper('file'); + // Set memory limit to unlimited to allow heavy usage + ini_set('memory_limit', '-1'); + + $this->load->model('adif_data'); + + $data['qsos'] = $this->adif_data->export_all(); + + if ( ! write_file('backup/logbook.adi', $this->load->view('backup/exportall', $data, true))) + { + $data['status'] = false; + } + else + { + $data['status'] = true; + } + + $this->load->view('layout/header'); + $this->load->view('backup/adif_view', $data); + $this->load->view('layout/footer'); + + } +} + +/* End of file Backup.php */ \ No newline at end of file diff --git a/application/views/backup/adif_view.php b/application/views/backup/adif_view.php new file mode 100644 index 00000000..37bda8dd --- /dev/null +++ b/application/views/backup/adif_view.php @@ -0,0 +1,16 @@ +
Backing up your log has been completed successfully and can be found at /logbook.adi
+ +You could automate this process by making it a cronjob.
+ + + +Something went wrong backing up check that the backup folder exists and has write permissions.
+ + + +Backup options.
+ +