kopia lustrzana https://github.com/magicbug/Cloudlog
Improved Error reporting on ADIF upload and display the maxmium file size for upload the web server supports
rodzic
78b16e921b
commit
9a49b1c207
|
@ -104,10 +104,13 @@ class adif extends CI_Controller {
|
|||
|
||||
if ( ! $this->upload->do_upload())
|
||||
{
|
||||
//print $this->upload->display_errors();
|
||||
//exit(0);
|
||||
$data['error'] = $this->upload->display_errors();
|
||||
|
||||
$max_upload = min(ini_get('post_max_size'), ini_get('upload_max_filesize'));
|
||||
$max_upload = str_replace('M', '', $max_upload);
|
||||
|
||||
$data['max_upload'] = $max_upload * 1024;
|
||||
|
||||
$this->load->view('interface_assets/header', $data);
|
||||
$this->load->view('adif/import');
|
||||
$this->load->view('interface_assets/footer');
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
|
||||
<div class="container">
|
||||
<div class="container adif">
|
||||
|
||||
<h1>ADIF Functions</h1>
|
||||
|
||||
|
@ -11,6 +11,12 @@
|
|||
<h5 class="card-title"></h5>
|
||||
<p class="card-text">Please make sure there is no extra text at the top of the ADIF file as the import will fail.</p>
|
||||
|
||||
<?php if(isset($error)) { ?>
|
||||
<div class="alert alert-danger" role="alert">
|
||||
<?php echo $error; ?>
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
||||
<p><span class="label important">Important</span> Log files must have the file type .adi</p>
|
||||
|
||||
<form class="form-inline" action="<?php echo site_url('adif/import'); ?>" method="post" enctype="multipart/form-data">
|
||||
|
@ -19,6 +25,9 @@
|
|||
|
||||
<button type="submit" class="btn btn-primary mb-2" value="Upload">Upload</button>
|
||||
</form>
|
||||
|
||||
<p><span class="badge badge-warning">Warning</span> Maximum file upload size is <?php echo $max_upload; ?> Megabytes.</p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -28,10 +37,12 @@
|
|||
<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>
|
||||
|
||||
<br><br>
|
||||
|
|
|
@ -34,6 +34,11 @@
|
|||
padding-top: 15px;
|
||||
}
|
||||
|
||||
.adif .alert p {
|
||||
margin-bottom: 0rem;
|
||||
}
|
||||
|
||||
|
||||
TD.qsl{
|
||||
width: 20px;
|
||||
}
|
||||
|
|
Ładowanie…
Reference in New Issue