2020-08-14 00:24:07 +08:00
< div class = " container lotw " >
2020-08-23 05:26:04 +08:00
< br >
2020-10-20 22:51:55 +08:00
< a class = " btn btn-outline-primary btn-sm float-right " href = " <?php echo site_url('/lotw/import'); ?> " role = " button " >< i class = " fas fa-cloud-download-alt " ></ i > LoTW Import </ a >
< h2 >< ? php echo $page_title ; ?> </h2>
2020-08-14 00:24:07 +08:00
2020-09-02 01:13:26 +08:00
< div class = " alert alert-danger " role = " alert " >
2020-09-02 21:25:27 +08:00
< i class = " fas fa-exclamation-triangle " ></ i > Please be aware that LoTW Sync is BETA , you might get errors , this isn ' t fully production ready .
2020-09-02 01:13:26 +08:00
</ div >
2020-08-14 00:24:07 +08:00
<!-- Card Starts -->
< div class = " card " >
< div class = " card-header " >
2020-09-06 04:55:45 +08:00
< a class = " btn btn-outline-success btn-sm float-right " href = " <?php echo site_url('/lotw/cert_upload'); ?> " role = " button " >< i class = " fas fa-cloud-upload-alt " ></ i > Upload Certificate </ a >< i class = " fab fa-expeditedssl " ></ i > Available Certificates
2020-08-14 00:24:07 +08:00
</ div >
< div class = " card-body " >
< ? php if ( isset ( $error )) { ?>
< div class = " alert alert-danger " role = " alert " >
< ? php echo $error ; ?>
</ div >
< ? php } ?>
2020-08-18 00:02:54 +08:00
< ? php if ( isset ( $_SESSION [ 'Success' ])) { ?>
< div class = " alert alert-success " role = " alert " >
< ? php echo $_SESSION [ 'Success' ]; ?>
</ div >
< ? php } ?>
2020-08-14 00:24:07 +08:00
< ? php if ( $lotw_cert_results -> num_rows () > 0 ) { ?>
< div class = " table-responsive " >
< table class = " table table-hover " >
< thead class = " thead-light " >
< tr >
< th scope = " col " > Callsign </ th >
< th scope = " col " > DXCC </ th >
< th scope = " col " > Date Created </ th >
< th scope = " col " > Date Expires </ th >
< th scope = " col " > Status </ th >
2020-08-18 00:02:54 +08:00
< th scope = " col " > Options </ th >
2020-08-14 00:24:07 +08:00
</ tr >
</ thead >
< tbody >
< ? php foreach ( $lotw_cert_results -> result () as $row ) { ?>
< tr >
< td >< ? php echo $row -> callsign ; ?> </td>
2020-08-18 00:02:54 +08:00
< td >< ? php echo ucfirst ( $row -> cert_dxcc ); ?> </td>
< td >< ? php
$valid_form = strtotime ( $row -> date_created );
$new_valid_from = date ( $this -> config -> item ( 'qso_date_format' ), $valid_form );
echo $new_valid_from ; ?>
</ td >
< td >
< ? php
$valid_to = strtotime ( $row -> date_expires );
$new_valid_to = date ( $this -> config -> item ( 'qso_date_format' ), $valid_to );
echo $new_valid_to ; ?>
</ td >
< td >
< ? php $current_date = date ( 'Y-m-d H:i:s' ); ?>
< ? php if ( $current_date <= $row -> date_expires ) { ?>
< span class = " badge badge-success " > Valid </ span >
< ? php } else { ?>
< span class = " badge badge-dark " > Expired </ span >
< ? php } ?>
2020-08-18 00:09:00 +08:00
< ? php if ( $row -> last_upload ) { ?>
< span class = " badge badge-success " >< ? php echo $row -> last_upload ; ?> </span>
< ? php } else { ?>
< span class = " badge badge-warning " > Not Synced </ span >
< ? php } ?>
2020-08-18 00:02:54 +08:00
</ td >
< td >
2020-09-06 04:55:45 +08:00
< a class = " btn btn-outline-danger btn-sm " href = " <?php echo site_url('lotw/delete_cert/'. $row->lotw_cert_id ); ?> " role = " button " >< i class = " far fa-trash-alt " ></ i > Delete </ a >
2020-08-18 00:02:54 +08:00
</ td >
2020-08-14 00:24:07 +08:00
</ tr >
< ? php } ?>
2020-08-18 00:02:54 +08:00
2020-08-14 00:24:07 +08:00
</ tbody >
</ table >
</ div >
< ? php } else { ?>
< div class = " alert alert-info " role = " alert " >
You need to upload some LoTW p12 certificates to use this area .
</ div >
< ? php } ?>
</ div >
</ div >
<!-- Card Ends -->
2020-09-02 21:48:13 +08:00
< br >
<!-- Card Starts -->
< div class = " card " >
< div class = " card-header " >
Information
</ div >
< div class = " card-body " >
< p > You can run the LoTW upload script manually using < a href = " <?php echo site_url('lotw/lotw_upload'); ?> " >< ? php echo site_url ( 'lotw/lotw_upload' ); ?> </a>, this should be run as a cron task hourly or greater not in real time.</p>
2020-09-02 22:09:07 +08:00
2020-09-03 04:24:49 +08:00
< p > We are building the help file for this at < a href = " https://github.com/magicbug/Cloudlog/wiki/LoTW-Import-&-Export-Documentation " target = " _blank " > https :// github . com / magicbug / Cloudlog / wiki / LoTW - Import -&- Export - Documentation </ a ></ p >
2020-09-02 21:48:13 +08:00
</ div >
</ div >
2020-08-14 00:24:07 +08:00
</ div >