2024-02-26 17:42:46 +01:00
< div class = " container debug_main mb-4 " >
< br >
< ? php if ( $this -> session -> flashdata ( 'success' )) { ?>
<!-- Display Message -->
< div class = " alert alert-success " >
< p >< ? php echo $this -> session -> flashdata ( 'success' ); ?> </p>
</ div >
< ? php } ?>
< ? php if ( $this -> session -> flashdata ( 'error' )) { ?>
<!-- Display Message -->
< div class = " alert alert-danger " >
< p >< ? php echo $this -> session -> flashdata ( 'error' ); ?> </p>
</ div >
< ? php } ?>
< h2 >< ? php echo $page_title ; ?> </h2>
< div class = " row " >
< div class = " col " >
< div class = " card " >
2024-06-07 02:35:59 +02:00
< div class = " card-header " >< ? = __ ( " Wavelog Information " ); ?> </div>
2024-02-26 17:42:46 +01:00
< div class = " card-body " >
< table width = " 100% " >
< tr >
2024-06-07 02:35:59 +02:00
< td >< ? = __ ( " Version " ); ?> </td>
2024-09-12 15:24:18 +02:00
< td >< ? php echo $running_version ; ?>
< ? php if ( $running_version == $latest_release ) { ?>
< span class = " badge text-bg-success " > < ? = __ ( " Latest Version " ); ?> </span>
< ? php } ?>
</ td >
2024-02-26 17:42:46 +01:00
</ tr >
2024-09-12 13:23:01 +02:00
< ? php if ( $newer_version_available ) { ?>
< tr >
< td >< ? = __ ( " Latest Release " ); ?> </td>
< td >< a href = " https://github.com/wavelog/wavelog/releases/tag/<?php echo $latest_release ; ?> " target = " _blank " >< ? php echo $latest_release . " \n " ; ?> </a></td>
</ tr >
< ? php } ?>
2024-02-26 17:42:46 +01:00
< tr >
2024-06-07 02:35:59 +02:00
< td >< ? = __ ( " Language " ); ?> </td>
2024-11-21 11:56:26 +01:00
< td >< ? = __ ( ucfirst ( $this -> config -> item ( 'language' ))) . " \n " ; ?> </td>
2024-02-26 17:42:46 +01:00
</ tr >
< tr >
2024-06-07 02:35:59 +02:00
< td >< ? = __ ( " Base URL " ); ?> </td>
2024-06-06 20:23:19 +02:00
< td >< span id = " baseUrl " >< a href = " <?php echo $this->config ->item('base_url') ?> " target = " _blank " >< ? php echo $this -> config -> item ( 'base_url' ); ?> </a></span> <span data-bs-toggle="tooltip" title="<?= __("Copy to clipboard"); ?>" onclick='copyURL("<?php echo $this->config->item('base_url'); ?>")'><i class="copy-icon fas fa-copy"></span></td>
2024-02-26 17:42:46 +01:00
</ tr >
< tr >
2024-06-07 02:35:59 +02:00
< td >< ? = __ ( " Migration " ); ?> </td>
< td >< ? php echo ( isset ( $migration_version ) ? $migration_version : " <span class='badge text-bg-danger'> " . __ ( " There is something wrong with your Migration in Database! " ) . " </span> " ); ?> </td>
2024-02-26 17:42:46 +01:00
</ tr >
2024-08-01 17:01:46 +02:00
< ? php if ( ! $migration_is_uptodate ) { ?>
2024-08-06 11:02:55 +02:00
</ table >
< div class = " alert alert-danger mt-3 mb-3 " >
< h5 >< ? = __ ( " Migration is outdated and locked! " ); ?> </h5>
< p >< ? = sprintf ( __ ( " The current migration is not the version it is supposed to be. Reload this page after %s seconds. If this warning persists, your migration is likely locked due to a previously failed process. Delete the file %s to force the migration to run again. " ), $miglock_lifetime , $migration_lockfile ); ?> </p>
2024-08-15 09:04:04 +02:00
< p >< ? = sprintf ( __ ( " Check this wiki article %shere%s for more information. " ), '<u><a href="https://github.com/wavelog/wavelog/wiki/Migration-is-locked" target="_blank">' , '</a></u>' ); ?> </p>
2024-08-06 11:02:55 +02:00
< p >< ? = sprintf ( __ ( " Current migration is %s " ), $migration_version ); ?> <br>
< ? = sprintf ( __ ( " Migration should be %s " ), $migration_config ); ?> </p>
</ div >
< table >
2024-08-01 17:01:46 +02:00
< ? php } ?>
2024-04-15 12:57:56 +02:00
< tr >
2024-06-07 02:35:59 +02:00
< td >< ? = __ ( " Environment " ); ?> </td>
2024-04-15 12:57:56 +02:00
< td >< ? php echo ENVIRONMENT ; ?> </td>
</ tr >
2024-12-25 17:53:38 -05:00
< tr >
< td >< ? = __ ( " System Time " ); ?> </td>
2025-01-01 09:57:48 +01:00
< td >< ? php echo $system_time ; ?> </td>
2024-12-25 17:53:38 -05:00
</ tr >
2024-04-21 10:52:30 +02:00
< tr class = " blank-row " >
< td > </ td >
< td > </ td >
</ tr >
< tr >
2024-06-07 02:35:59 +02:00
< td >< ? = __ ( " Total QSO on this instance " ); ?> </td>
2024-09-17 14:23:41 +02:00
< td >< ? php echo number_format ( $qso_total , 0 , '.' , ',' ) . ' QSOs' ; ?> </td>
2024-09-16 00:57:27 +02:00
</ tr >
< tr >
< td >< ? = __ ( " Total User " ); ?> </td>
2024-09-18 12:26:53 +02:00
< td >< ? php echo number_format ( $users_total , 0 , '.' , ',' ) . ' ' . _ngettext ( " User " , " Users " , intval ( $users_total )); ?> </td>
2024-04-21 10:52:30 +02:00
</ tr >
2024-02-26 17:42:46 +01:00
</ table >
</ div >
</ div >
< div class = " card " >
2024-06-07 02:35:59 +02:00
< div class = " card-header " >< ? = __ ( " Server Information " ); ?> </div>
2024-02-26 17:42:46 +01:00
< div class = " card-body " >
< table width = " 100% " >
< tr >
2024-06-07 02:35:59 +02:00
< td >< ? = __ ( " Server Software " ); ?> </td>
2024-02-26 17:42:46 +01:00
< td >< ? php echo $_SERVER [ 'SERVER_SOFTWARE' ]; ?> </td>
</ tr >
< tr >
2024-06-07 02:35:59 +02:00
< td >< ? = __ ( " PHP Version " ); ?> </td>
2024-05-08 13:23:59 +02:00
< td >
< ? php
2024-05-08 14:21:10 +02:00
if ( version_compare ( PHP_VERSION , '8.0.0' ) >= 0 ) {
2024-05-08 14:06:36 +02:00
echo phpversion () . " <span class= \" badge text-bg-success \" >OK</span> " ;
2024-05-08 13:23:59 +02:00
} else {
2024-06-07 02:35:59 +02:00
echo phpversion () . " <span data-bs-toggle= \" tooltip \" title= \" Please update! \" class= \" badge text-bg-warning \" > " . __ ( " Deprecated " ) . " </span> " ;
2024-05-08 13:23:59 +02:00
}
?>
</ td >
2024-02-26 17:42:46 +01:00
</ tr >
< tr >
2024-06-07 02:35:59 +02:00
< td >< ? = __ ( " MySQL Version " ); ?> </td>
2024-02-26 17:42:46 +01:00
< td >< ? php echo $this -> db -> version (); ?> </td>
</ tr >
< tr >
2024-06-07 02:35:59 +02:00
< td >< ? = __ ( " Codeigniter Version " ); ?> </td>
2024-02-26 17:42:46 +01:00
< td >< ? php echo CI_VERSION ; ?> </td>
</ tr >
</ table >
</ div >
</ div >
< div class = " card " >
2024-06-07 02:35:59 +02:00
< div class = " card-header " >< ? = __ ( " Folder Permissions " ); ?> </div>
2024-02-26 17:42:46 +01:00
< div class = " card-body " >
2024-06-23 23:12:22 +02:00
< p >< ? = __ ( " This verifies that the folders used by Wavelog have read and write permissions by PHP. " ); ?> </p>
2024-02-26 17:42:46 +01:00
< table width = " 100% " >
< tr >
< td >/ backup </ td >
< td >
< ? php if ( $backup_folder == true ) { ?>
2024-06-07 02:35:59 +02:00
< span class = " badge text-bg-success " >< ? = __ ( " Success " ); ?> </span>
2024-02-26 17:42:46 +01:00
< ? php } else { ?>
2024-06-07 02:35:59 +02:00
< span class = " badge text-bg-danger " >< ? = __ ( " Failed " ); ?> </span>
2024-02-26 17:42:46 +01:00
< ? php } ?>
</ td >
</ tr >
2024-07-10 17:35:48 +02:00
< tr >
< td >/ cache </ td >
< td >
< ? php if ( $cache_folder == true ) { ?>
< span class = " badge text-bg-success " >< ? = __ ( " Success " ); ?> </span>
< ? php } else { ?>
< span class = " badge text-bg-danger " >< ? = __ ( " Failed " ); ?> </span>
< ? php } ?>
</ td >
</ tr >
2024-02-26 17:42:46 +01:00
< tr >
< td >/ updates </ td >
< td >
< ? php if ( $updates_folder == true ) { ?>
2024-06-07 02:35:59 +02:00
< span class = " badge text-bg-success " >< ? = __ ( " Success " ); ?> </span>
2024-02-26 17:42:46 +01:00
< ? php } else { ?>
2024-06-07 02:35:59 +02:00
< span class = " badge text-bg-danger " >< ? = __ ( " Failed " ); ?> </span>
2024-02-26 17:42:46 +01:00
< ? php } ?>
</ td >
</ tr >
< tr >
< td >/ uploads </ td >
< td >
< ? php if ( $uploads_folder == true ) { ?>
2024-06-07 02:35:59 +02:00
< span class = " badge text-bg-success " >< ? = __ ( " Success " ); ?> </span>
2024-02-26 17:42:46 +01:00
< ? php } else { ?>
2024-06-07 02:35:59 +02:00
< span class = " badge text-bg-danger " >< ? = __ ( " Failed " ); ?> </span>
2024-02-26 17:42:46 +01:00
< ? php } ?>
</ td >
</ tr >
< ? php if ( isset ( $userdata_enabled )) { ?>
< tr >
< td >/ userdata </ td >
< td >
< ? php if ( $userdata_folder == true ) { ?>
2024-06-07 02:35:59 +02:00
< span class = " badge text-bg-success " >< ? = __ ( " Success " ); ?> </span>
2024-02-26 17:42:46 +01:00
< ? php } else { ?>
2024-06-07 02:35:59 +02:00
< span class = " badge text-bg-danger " >< ? = __ ( " Failed " ); ?> </span>
2024-02-26 17:42:46 +01:00
< ? php } ?>
</ td >
</ tr >
< ? php } ?>
</ table >
</ div >
</ div >
2024-04-15 12:24:43 +02:00
< div class = " card " >
< div class = " card-header " >
2024-06-07 02:35:59 +02:00
< ? = __ ( " Config Maintenance " ); ?>
2024-04-15 12:24:43 +02:00
</ div >
< div class = " card-body " >
< ? php if ( $this -> config -> item ( 'auth_mode' ) != '3' ) { ?>
< div class = " alert alert-primary " >
< div class = " alert alert-danger " role = " alert " >
2024-07-11 14:50:12 +02:00
< span class = " badge rounded-pill text-bg-warning " > auth_mode : < ? = __ ( " Warning " ); ?> </span> <?= __("Your authentication mode is outdated and possibly unsafe"); ?>
2024-04-15 12:24:43 +02:00
</ div >
2024-07-11 14:50:12 +02:00
< p >< ? = sprintf ( __ ( " Please edit your %s File: " ), " <code>application/config/config.php</code> " ); ?> </br>
2024-06-07 02:35:59 +02:00
< ? = __ ( " Go to your application/config Folder and compare config.sample.php with your config.php " ); ?> </br></br>
< ? = sprintf ( __ ( " Change %s to the value %s (Strongly recommended) " ), " <span class= \" badge rounded-pill text-bg-secondary \" > \$ config['auth_mode']</span> " , " <span class= \" badge rounded-pill text-bg-secondary \" >3</span> " ); ?>
2024-04-15 12:24:43 +02:00
</ p >
</ div >
< ? php
} else { ?>
< div class = " mb-2 " >
2024-07-11 14:50:12 +02:00
< span class = " badge rounded-pill text-bg-success " > auth_mode : < ? = __ ( " Ok " ); ?> </span> <?= __("Authentication Mode is set correctly"); ?>
</ div >
< ? php } ?>
< ? php if ( $this -> config -> item ( 'encryption_key' ) == 'flossie1234555541' ) { ?>
< div class = " alert alert-primary " >
< div class = " alert alert-danger " role = " alert " >
< span class = " badge rounded-pill text-bg-warning " > encryption_key : < ? = __ ( " Warning " ); ?> </span> <?= __("You use the default encryption key. You should change it!"); ?>
</ div >
< p >< ? = sprintf ( __ ( " Please edit your %s File: " ), " <code>application/config/config.php</code> " ); ?> </br>
2024-07-11 17:50:55 +02:00
< ? = __ ( " This will also enable the 'Keep me logged in' feature. " ); ?> </br>
2024-07-11 15:26:32 +02:00
< ? = sprintf ( __ ( " Change the value of %s to a new encryption key other then 'flossie1234555541'. Choose a safe and long password. (Strongly recommended) " ), " <span class= \" badge rounded-pill text-bg-secondary \" > \$ config['encryption_key']</span> " ); ?>
2024-07-11 14:50:12 +02:00
</ p >
</ div >
< ? php
} else { ?>
< div class = " mb-2 " >
< span class = " badge rounded-pill text-bg-success " > encryption_key : < ? = __ ( " Ok " ); ?> </span> <?= __("You do not use the default encryption key"); ?>
2024-04-15 12:24:43 +02:00
</ div >
< ? php } ?>
</ div >
</ div >
2024-02-26 17:42:46 +01:00
< ? php if ( isset ( $userdata_enabled )) { ?>
< div class = " card " >
2024-06-07 02:35:59 +02:00
< div class = " card-header " >< ? = __ ( " Migrate Userdata " ); ?> </div>
2024-02-26 17:42:46 +01:00
< div class = " card-body " >
2024-06-07 02:35:59 +02:00
< p >< ? = __ ( " Here you can migrate existing QSL cards and eQSL cards to the new userdata folder. " ); ?> </p>
2024-02-26 17:42:46 +01:00
< a href = " <?php echo site_url('debug/migrate_userdata'); ?> " class = " btn btn-primary <?php echo $userdata_status['btn_class'] ; ?> " >< ? php echo $userdata_status [ 'btn_text' ]; ?> </a>
</ div >
</ div >
< ? php } ?>
</ div >
< div class = " col " >
< div class = " card " >
2024-04-15 13:26:11 +02:00
< div class = " card-header " > PHP </ div >
2024-02-26 17:42:46 +01:00
< div class = " card-body " >
2024-04-15 13:26:11 +02:00
< div class = " row " >
< div class = " col border-end " >
2024-06-07 02:35:59 +02:00
< p >< u >< ? = __ ( " Modules " ); ?> </u></p>
2024-04-15 13:26:11 +02:00
< table width = " 100% " >
< tr >
2024-04-15 13:35:33 +02:00
< td > php - curl </ td >
2024-04-15 13:26:11 +02:00
< td >
< ? php if ( in_array ( 'curl' , get_loaded_extensions ())) { ?>
2024-06-07 02:35:59 +02:00
< span class = " badge text-bg-success " >< ? = __ ( " Installed " ); ?> </span>
2024-04-15 13:26:11 +02:00
< ? php } else { ?>
2024-06-07 02:35:59 +02:00
< span class = " badge text-bg-danger " >< ? = __ ( " Not Installed " ); ?> </span>
2024-04-15 13:26:11 +02:00
< ? php } ?>
</ td >
</ tr >
2024-02-26 17:42:46 +01:00
2024-04-15 13:26:11 +02:00
< tr >
2024-04-15 13:35:33 +02:00
< td > php - mysql </ td >
2024-04-15 13:26:11 +02:00
< td >
< ? php if ( in_array ( 'mysqli' , get_loaded_extensions ())) { ?>
2024-06-07 02:35:59 +02:00
< span class = " badge text-bg-success " >< ? = __ ( " Installed " ); ?> </span>
2024-04-15 13:26:11 +02:00
< ? php } else { ?>
2024-06-07 02:35:59 +02:00
< span class = " badge text-bg-danger " >< ? = __ ( " Not Installed " ); ?> </span>
2024-04-15 13:26:11 +02:00
< ? php } ?>
</ td >
</ tr >
2024-02-26 17:42:46 +01:00
2024-04-15 13:26:11 +02:00
< tr >
2024-04-15 13:35:33 +02:00
< td > php - mbstring </ td >
2024-04-15 13:26:11 +02:00
< td >
< ? php if ( in_array ( 'mbstring' , get_loaded_extensions ())) { ?>
2024-06-07 02:35:59 +02:00
< span class = " badge text-bg-success " >< ? = __ ( " Installed " ); ?> </span>
2024-04-15 13:26:11 +02:00
< ? php } else { ?>
2024-06-07 02:35:59 +02:00
< span class = " badge text-bg-danger " >< ? = __ ( " Not Installed " ); ?> </span>
2024-04-15 13:26:11 +02:00
< ? php } ?>
</ td >
</ tr >
2024-02-26 17:42:46 +01:00
2024-04-15 13:26:11 +02:00
< tr >
2024-04-15 13:35:33 +02:00
< td > php - xml </ td >
2024-04-15 13:26:11 +02:00
< td >
< ? php if ( in_array ( 'xml' , get_loaded_extensions ())) { ?>
2024-06-07 02:35:59 +02:00
< span class = " badge text-bg-success " >< ? = __ ( " Installed " ); ?> </span>
2024-04-15 13:26:11 +02:00
< ? php } else { ?>
2024-06-07 02:35:59 +02:00
< span class = " badge text-bg-danger " >< ? = __ ( " Not Installed " ); ?> </span>
2024-04-15 13:26:11 +02:00
< ? php } ?>
</ td >
</ tr >
2024-02-26 17:42:46 +01:00
2024-04-15 13:26:11 +02:00
< tr >
2024-04-15 13:35:33 +02:00
< td > php - zip </ td >
2024-04-15 13:26:11 +02:00
< td >
< ? php if ( in_array ( 'zip' , get_loaded_extensions ())) { ?>
2024-06-07 02:35:59 +02:00
< span class = " badge text-bg-success " >< ? = __ ( " Installed " ); ?> </span>
2024-04-15 13:26:11 +02:00
< ? php } else { ?>
2024-06-07 02:35:59 +02:00
< span class = " badge text-bg-danger " >< ? = __ ( " Not Installed " ); ?> </span>
2024-04-15 13:26:11 +02:00
< ? php } ?>
</ td >
</ tr >
2024-10-31 10:26:59 +01:00
< tr >
< td > php - gd </ td >
< td >
< ? php if ( in_array ( 'gd' , get_loaded_extensions ())) { ?>
< span class = " badge text-bg-success " >< ? = __ ( " Installed " ); ?> </span>
< ? php } else { ?>
< span class = " badge text-bg-danger " >< ? = __ ( " Not Installed " ); ?> </span>
< ? php } ?>
</ td >
</ tr >
2024-04-15 13:26:11 +02:00
</ table >
</ div >
< div class = " col " >
2024-06-07 02:35:59 +02:00
< p >< u >< ? = __ ( " Settings " ); ?> </u></p>
2024-04-15 13:36:51 +02:00
< ? php
$max_execution_time = 600 ; // Seconds
2024-07-25 12:16:36 +02:00
$upload_max_filesize = 8 ; // Megabyte
2024-04-15 13:36:51 +02:00
$post_max_size = 8 ; // Megabyte
2024-04-15 13:26:11 +02:00
$memory_limit = 256 ; // Megabyte
2024-04-15 13:36:51 +02:00
$req_allow_url_fopen = '1' ; // 1 = on
2024-04-15 13:26:11 +02:00
?>
< table width = " 100% " >
2024-04-15 13:36:51 +02:00
< tr >
< td > max_execution_time </ td >
< td >< ? php echo '> ' . $max_execution_time . ' s' ; ?> </td>
< td >
< ? php
$maxExecutionTime = ini_get ( 'max_execution_time' );
if ( $maxExecutionTime >= $max_execution_time ) { ?>
< span class = " badge text-bg-success " >< ? php echo $maxExecutionTime . ' s' ; ?> </span>
< ? php } else { ?>
< span class = " badge text-bg-warning " >< ? php echo $maxExecutionTime ; ?> </span>
< ? php } ?>
</ td >
</ tr >
2024-04-15 13:26:11 +02:00
2024-04-15 13:36:51 +02:00
< tr >
2024-07-25 12:16:36 +02:00
< td > upload_max_filesize </ td >
< td >< ? php echo '> ' . $upload_max_filesize . 'M' ; ?> </td>
2024-04-15 13:36:51 +02:00
< td >
< ? php
$maxUploadFileSize = ini_get ( 'upload_max_filesize' );
$maxUploadFileSizeBytes = ( int )( $maxUploadFileSize ) * ( 1024 * 1024 ); // convert to bytes
2024-07-25 12:16:36 +02:00
if ( $maxUploadFileSizeBytes >= ( $upload_max_filesize * 1024 * 1024 )) { // compare with given value in bytes
2024-04-15 13:36:51 +02:00
?>
< span class = " badge text-bg-success " >< ? php echo $maxUploadFileSize ; ?> </span>
< ? php } else { ?>
< span class = " badge text-bg-warning " >< ? php echo $maxUploadFileSize ; ?> </span>
< ? php } ?>
</ td >
</ tr >
2024-04-15 13:26:11 +02:00
2024-04-15 13:36:51 +02:00
< tr >
< td > post_max_size </ td >
< td >< ? php echo '> ' . $post_max_size . 'M' ; ?> </td>
< td >
< ? php
$postMaxSize = ini_get ( 'post_max_size' );
$postMaxSizeBytes = ( int )( $postMaxSize ) * ( 1024 * 1024 ); // convert to bytes
if ( $postMaxSizeBytes >= ( $post_max_size * 1024 * 1024 )) { // compare with given value in bytes
?>
< span class = " badge text-bg-success " >< ? php echo $postMaxSize ; ?> </span>
< ? php } else { ?>
< span class = " badge text-bg-warning " >< ? php echo $postMaxSize ; ?> </span>
< ? php } ?>
</ td >
</ tr >
2024-04-15 13:26:11 +02:00
2024-04-15 13:36:51 +02:00
< tr >
< td > memory_limit </ td >
< td >< ? php echo '> ' . $memory_limit . 'M' ; ?> </td>
< td >
< ? php
$memoryLimit = ini_get ( 'memory_limit' );
$memoryLimitBytes = ( int )( $memoryLimit ) * ( 1024 * 1024 ); // convert to bytes
if ( $memoryLimitBytes >= ( $memory_limit * 1024 * 1024 )) { // compare with given value in bytes
?>
< span class = " badge text-bg-success " >< ? php echo $memoryLimit ; ?> </span>
< ? php } else { ?>
< span class = " badge text-bg-warning " >< ? php echo $memoryLimit ; ?> </span>
< ? php } ?>
</ td >
</ tr >
< tr >
< td > allow_url_fopen </ td >
< td > On </ td >
< td >
< ? php
$get_allow_url_fopen = ini_get ( 'allow_url_fopen' );
if ( $get_allow_url_fopen == $req_allow_url_fopen ) {
?>
< span class = " badge text-bg-success " > On </ span >
< ? php } else { ?>
< span class = " badge text-bg-danger " > Off </ span >
< ? php } ?>
</ td >
</ tr >
2024-04-15 13:26:11 +02:00
</ table >
</ div >
</ div >
2024-02-26 17:42:46 +01:00
</ div >
</ div >
2024-07-30 21:15:16 +02:00
< ? php if ( file_exists ( realpath ( APPPATH . '../' ) . '/.git' ) && function_usable ( 'exec' )) { ?>
2024-02-26 17:42:46 +01:00
< ? php
//Below is a failsafe where git commands fail
try {
2024-04-15 12:24:43 +02:00
$commitHash = trim ( exec ( 'git log --pretty="%H" -n1 HEAD' )); // Get last LOCAL commit of HEAD
2024-02-26 17:42:46 +01:00
$branch = '' ;
$remote = '' ;
$owner = '' ;
// only proceed here if git can actually be executed
if ( $commitHash != " " ) {
$commitDate = trim ( exec ( 'git log --pretty="%ci" -n1 HEAD' ));
$line = trim ( exec ( 'git log -n 1 --pretty=%D HEAD' ));
$pieces = explode ( ', ' , $line );
2024-03-24 15:22:25 +01:00
$lastFetch = trim ( exec ( 'stat -c %Y ' . realpath ( APPPATH . '../' ) . '/.git/FETCH_HEAD' ));
2024-02-26 17:42:46 +01:00
//Below is a failsafe for systems without the stat command
try {
$dt = new DateTime ( " @ $lastFetch " );
} catch ( Exception $e ) {
$dt = new DateTime ( date ( " Y-m-d H:i:s " ));
}
if ( isset ( $pieces [ 1 ])) {
$remote = substr ( $pieces [ 1 ], 0 , strpos ( $pieces [ 1 ], '/' ));
2024-04-15 12:24:43 +02:00
$branch = trim ( exec ( 'git rev-parse --abbrev-ref HEAD' )); // Get ONLY Name of the Branch we're on
2024-02-26 17:42:46 +01:00
$url = trim ( exec ( 'git remote get-url ' . $remote ));
if ( strpos ( $url , 'https://github.com' ) !== false ) {
2024-03-25 06:45:59 +00:00
$owner = preg_replace ( '/https:\/\/github\.com\/(\w+)\/[w|W]avelog\.git/' , '$1' , $url );
2024-02-26 17:42:46 +01:00
} else if ( strpos ( $url , 'git@github.com' ) !== false ) {
2024-03-25 06:45:59 +00:00
$owner = preg_replace ( '/git@github\.com:(\w+)\/[w|W]avelog\.git/' , '$1' , $url );
2024-02-26 17:42:46 +01:00
}
}
$tag = trim ( exec ( 'git describe --tags ' . $commitHash ));
}
} catch ( \Throwable $th ) {
$commitHash = " " ;
}
?>
< ? php if ( $commitHash != " " ) { ?>
< div class = " card " >
2024-06-07 02:35:59 +02:00
< div class = " card-header " >< ? = __ ( " Git Information " ); ?> </div>
2024-02-26 17:42:46 +01:00
< div class = " card-body " >
< table width = " 100% " >
< tr >
2024-06-07 02:35:59 +02:00
< td >< ? = __ ( " Branch " ); ?> </td>
2024-02-26 17:42:46 +01:00
< td >
< ? php if ( $branch != " " ) { ?>
< ? php if ( $owner != " " ) { ?>
< a target = " _blank " href = " https://github.com/<?php echo $owner ; ?>/Wavelog/tree/<?php echo $branch ?> " >
< ? php } ?>
< span class = " badge text-bg-success " >< ? php echo $branch ; ?> </span>
< ? php if ( $owner != " " ) { ?>
</ a >
< ? php } ?>
< ? php } else { ?>
2024-06-07 02:35:59 +02:00
< span class = " badge text-bg-danger " >< ? = __ ( " n/a " ); ?> </span>
2024-02-26 17:42:46 +01:00
< ? php } ?>
</ td >
</ tr >
< tr >
< tr >
2024-06-07 02:35:59 +02:00
< td >< ? = __ ( " Commit " ); ?> </td>
2024-02-26 17:42:46 +01:00
< td >
< ? php if ( $commitHash != " " ) { ?>
2024-03-25 06:45:59 +00:00
< a target = " _blank " href = " https://github.com/<?php echo $owner ; ?>/Wavelog/commit/<?php echo $commitHash ?> " >< span class = " badge text-bg-success " >< ? php echo substr ( $commitHash , 0 , 8 ); ?> </span></a>
2024-02-26 17:42:46 +01:00
< ? php } else { ?>
2024-06-07 02:35:59 +02:00
< span class = " badge text-bg-danger " >< ? = __ ( " n/a " ); ?> </span>
2024-02-26 17:42:46 +01:00
< ? php } ?>
</ td >
</ tr >
< tr >
2024-06-07 02:35:59 +02:00
< td >< ? = __ ( " Tag " ); ?> </td>
2024-02-26 17:42:46 +01:00
< td >
< ? php if ( $commitHash != " " ) { ?>
< a target = " _blank " href = " https://github.com/wavelog/wavelog/releases/tag/<?php echo substr( $tag , 0, strpos( $tag , '-')); ?> " >< span class = " badge text-bg-success " >< ? php echo $tag ; ?> </span></a>
< ? php } else { ?>
2024-06-07 02:35:59 +02:00
< span class = " badge text-bg-danger " >< ? = __ ( " n/a " ); ?> </span>
2024-02-26 17:42:46 +01:00
< ? php } ?>
</ td >
</ tr >
2024-03-24 17:45:40 +01:00
< tr >
2024-06-07 02:35:59 +02:00
< td >< ? = __ ( " Last Fetch " ); ?> </td>
2024-03-24 17:45:40 +01:00
< td >
< ? php echo ( $dt == null ? '' : $dt -> format ( \DateTime :: RFC850 )); ?>
</ td >
</ tr >
2024-02-26 17:42:46 +01:00
</ table >
2024-12-02 19:09:39 +01:00
< div class = " border-top pt-2 pb-2 mt-2 mb-2 " id = " version_check " >
2024-03-24 15:22:25 +01:00
< p id = " version_check_result " ></ p >
< small id = " last_version_check " ></ small >
</ div >
< div class = " row " >
2024-04-15 12:24:43 +02:00
< div class = " col " >
2024-06-07 02:35:59 +02:00
< button class = " btn btn-primary me-3 ld-ext-right " onClick = " update_version_check('<?php echo $branch ; ?>'); " id = " version_check_button " >< ? = __ ( " Check for new version " ); ?> <div class="ld ld-ring ld-spin"></div></button>
< a class = " btn btn-primary " style = " display: none; " id = " version_update_button " href = " debug/selfupdate " onClick = 'this.classList.add("disabled");' >< ? = __ ( " Update now " ); ?> </a>
2024-04-15 12:24:43 +02:00
</ div >
2024-03-24 15:22:25 +01:00
</ div >
2024-02-26 17:42:46 +01:00
</ div >
</ div >
< ? php }
}
// Get Date format
if ( $this -> session -> userdata ( 'user_date_format' )) {
// If Logged in and session exists
$custom_date_format = $this -> session -> userdata ( 'user_date_format' );
} else {
// Get Default date format from /config/wavelog.php
$custom_date_format = $this -> config -> item ( 'qso_date_format' );
}
?>
< div class = " card " >
2024-06-07 02:35:59 +02:00
< div class = " card-header " >< ? = __ ( " File download date " ); ?> </div>
2024-02-26 17:42:46 +01:00
< div class = " card-body " >
< table width = " 100% " class = " table-sm table table-hover table-striped " >
< thead >
2024-06-07 02:35:59 +02:00
< th >< ? = __ ( " File " ); ?> </th>
< th >< ? = __ ( " Last update " ); ?> </th>
2024-02-26 17:42:46 +01:00
< th ></ th >
</ thead >
< tr >
2024-06-07 02:35:59 +02:00
< td >< ? = __ ( " DXCC update from Club Log " ); ?> </td>
2024-07-11 17:50:55 +02:00
< td >< ? php echo $dxcc_update -> last_run ? ? __ ( " never " ); ?> </td>
2024-06-07 02:35:59 +02:00
< td >< a class = " btn btn-sm btn-primary " href = " <?php echo site_url('update'); ?> " >< ? = __ ( " Update " ); ?> </a></td>
2024-02-26 17:42:46 +01:00
</ tr >
< tr >
2024-06-07 02:35:59 +02:00
< td >< ? = __ ( " DOK file download " ); ?> </td>
2024-07-11 17:50:55 +02:00
< td >< ? php echo $dok_update -> last_run ? ? __ ( " never " ); ?> </td>
2024-06-07 02:35:59 +02:00
< td >< a class = " btn btn-sm btn-primary " href = " <?php echo site_url('update/update_dok'); ?> " >< ? = __ ( " Update " ); ?> </a></td>
2024-02-26 17:42:46 +01:00
</ tr >
< tr >
2024-06-07 02:35:59 +02:00
< td >< ? = __ ( " LoTW users download " ); ?> </td>
2024-07-11 17:50:55 +02:00
< td >< ? php echo $lotw_user_update -> last_run ? ? __ ( " never " ); ?> </td>
2024-06-07 02:35:59 +02:00
< td >< a class = " btn btn-sm btn-primary " href = " <?php echo site_url('update/lotw_users'); ?> " >< ? = __ ( " Update " ); ?> </a></td>
2024-02-26 17:42:46 +01:00
</ tr >
< tr >
2024-06-07 02:35:59 +02:00
< td >< ? = __ ( " POTA file download " ); ?> </td>
2024-07-11 17:50:55 +02:00
< td >< ? php echo $pota_update -> last_run ? ? __ ( " never " ); ?> </td>
2024-06-07 02:35:59 +02:00
< td >< a class = " btn btn-sm btn-primary " href = " <?php echo site_url('update/update_pota'); ?> " >< ? = __ ( " Update " ); ?> </a></td>
2024-02-26 17:42:46 +01:00
</ tr >
< tr >
2024-06-07 02:35:59 +02:00
< td >< ? = __ ( " SCP file download " ); ?> </td>
2024-07-11 17:50:55 +02:00
< td >< ? php echo $scp_update -> last_run ? ? __ ( " never " ); ?> </td>
2024-06-07 02:35:59 +02:00
< td >< a class = " btn btn-sm btn-primary " href = " <?php echo site_url('update/update_clublog_scp'); ?> " >< ? = __ ( " Update " ); ?> </a></td>
2024-02-26 17:42:46 +01:00
</ tr >
< tr >
2024-06-07 02:35:59 +02:00
< td >< ? = __ ( " SOTA file download " ); ?> </td>
2024-07-11 17:50:55 +02:00
< td >< ? php echo $sota_update -> last_run ? ? __ ( " never " ); ?> </td>
2024-06-07 02:35:59 +02:00
< td >< a class = " btn btn-sm btn-primary " href = " <?php echo site_url('update/update_sota'); ?> " >< ? = __ ( " Update " ); ?> </a></td>
2024-02-26 17:42:46 +01:00
</ tr >
< tr >
2024-06-07 02:35:59 +02:00
< td >< ? = __ ( " WWFF file download " ); ?> </td>
2024-07-11 17:50:55 +02:00
< td >< ? php echo $wwff_update -> last_run ? ? __ ( " never " ); ?> </td>
2024-06-07 02:35:59 +02:00
< td >< a class = " btn btn-sm btn-primary " href = " <?php echo site_url('update/update_wwff'); ?> " >< ? = __ ( " Update " ); ?> </a></td>
2024-12-07 20:04:28 +01:00
</ tr >
< tr >
< td >< ? = __ ( " TLE update " ); ?> </td>
< td >< ? php echo $tle_update -> last_run ? ? __ ( " never " ); ?> </td>
< td >< a class = " btn btn-sm btn-primary " href = " <?php echo site_url('update/update_tle'); ?> " >< ? = __ ( " Update " ); ?> </a></td>
2024-02-26 17:42:46 +01:00
</ tr >
</ table >
</ div >
</ div >
< div class = " card " style = " margin-bottom: 15px; " >
< div class = " card-header " >
2024-06-07 02:35:59 +02:00
< ? = __ ( " QSO-DB Maintenance " ); ?>
2024-02-26 17:42:46 +01:00
</ div >
< ? php if ( ! empty ( $qsos_with_no_station_id )) { ?>
< div class = " alert alert-danger " role = " alert " style = " margin-bottom: 0px !important; " >
2024-06-07 02:35:59 +02:00
< span class = " badge rounded-pill text-bg-warning " >< ? = __ ( " Warning " ); ?> </span> <?= sprintf(_ngettext("The Database contains %d QSO without a station-profile (location)", "The Database contains %d QSOs without a station-profile (location)", intval(count($qsos_with_no_station_id))), intval(count($qsos_with_no_station_id))); ?><br />
2024-02-26 17:42:46 +01:00
</ div >
< div class = " card-body " >
2024-06-07 02:35:59 +02:00
< div class = " table-responsive " >
2024-02-26 17:42:46 +01:00
< table id = " unasigned_qsos_table " class = " table table-sm table-striped " >
< thead >
< tr >
< th scope = " col " >< input type = " checkbox " onClick = " toggleAll(this) " ></ th >
2024-06-07 02:35:59 +02:00
< th scope = " col " >< ? = __ ( " Date " ); ?> </th>
< th scope = " col " >< ? = __ ( " Time " ); ?> </th>
< th scope = " col " >< ? = __ ( " Call " ); ?> </th>
< th scope = " col " >< ? = __ ( " Mode " ); ?> </th>
< th scope = " col " >< ? = __ ( " Band " ); ?> </th>
< th scope = " col " >< ? = __ ( " Station Callsign " ); ?> </th>
2024-02-26 17:42:46 +01:00
</ tr >
</ thead >
< tbody >
< ? php if ( $this -> session -> userdata ( 'user_date_format' )) {
$custom_date_format = $this -> session -> userdata ( 'user_date_format' );
} else {
$custom_date_format = 'd.m.Y' ;
}
foreach ( $qsos_with_no_station_id as $qso ) {
echo '<tr>' ;
echo '<td><input type="checkbox" id="' . $qso -> COL_PRIMARY_KEY . '" name="cBox[]" value="' . $qso -> COL_PRIMARY_KEY . '"></td>' ;
$timestamp = strtotime ( $qso -> COL_TIME_ON );
echo '<td>' . date ( $custom_date_format , $timestamp ) . '</td>' ;
$timestamp = strtotime ( $qso -> COL_TIME_ON );
echo '<td>' . date ( 'H:i' , $timestamp ) . '</td>' ;
echo '<td>' . $qso -> COL_CALL . '</td>' ;
echo '<td>' . $qso -> COL_MODE . '</td>' ;
echo '<td>' . $qso -> COL_BAND . '</td>' ;
echo '<td>' . $qso -> COL_STATION_CALLSIGN . '</td>' ;
echo '</tr>' ;
} ?>
</ tbody >
</ table >
</ div >
2024-06-07 02:35:59 +02:00
< p class = " card-text " >< ? = __ ( " Please mark QSOs and reassign them to an existing station location: " ); ?> </p>
2024-02-26 17:42:46 +01:00
< div class = " table-responsive " >
< table id = " station_locations_table " class = " table table-sm table-striped " >
< thead >
< tr >
2024-06-07 02:35:59 +02:00
< th scope = " col " >< ? = __ ( " Call " ); ?> </th>
< th scope = " col " >< ? = _pgettext ( " Stationlocation " , " Target Location " ); ?> </th>
< th scope = " col " >< ? = __ ( " Reassign " ); ?> </th>
2024-02-26 17:42:46 +01:00
</ tr >
</ thead >
< tbody >
< ? php
foreach ( $calls_wo_sid as $call ) {
echo '<tr><td><div id="station_call">' . $call [ 'COL_STATION_CALLSIGN' ] . '</div></td><td><select name="station_profile" id="station_profile" onChange="updateCallsign(this)">' ;
$options = '' ;
foreach ( $stations -> result () as $station ) {
$options .= '<option value=' . $station -> station_id . '>' . $station -> station_profile_name . ' (' . $station -> station_callsign . ')</option>' ;
}
2024-06-07 02:35:59 +02:00
echo $options . '</select></td><td><button class="btn btn-warning" onClick="reassign(\'' . $call [ 'COL_STATION_CALLSIGN' ] . '\',$(\'#station_profile option:selected\').val());"><i class="fas fa-sync"></i> ' . __ ( " Reassign " ) . '</a></button></td></tr>' ;
2024-02-26 17:42:46 +01:00
} ?>
</ tbody >
</ table >
</ div >
</ div >
< ? php
} else { ?>
< div class = " alert alert-secondary " role = " alert " style = " margin-bottom: 0px !important; " >
2024-06-07 02:35:59 +02:00
< span class = " badge rounded-pill text-bg-success " >< ? = __ ( " Everything ok " ); ?> </span> <?= __("Every QSO in your Database is assigned to a station-profile (location)"); ?>
2024-02-26 17:42:46 +01:00
</ div >
< ? php } ?>
</ div >
</ div >
</ div >
2024-03-24 17:36:18 +01:00
</ div >
< script >
2024-03-24 22:55:03 +01:00
< ? php if ( file_exists ( realpath ( APPPATH . '../' ) . '/.git' )) { ?>
var local_branch = '<?php echo $branch; ?>' ;
< ? php } else { ?>
var local_branch = 'n/a' ;
< ? php } ?>
2024-05-08 13:23:59 +02:00
</ script >
2024-06-07 02:35:59 +02:00
2024-07-09 09:03:35 +02:00
< ? php
/**
* Hidden field to be able to translate the language names
* Add english Language Name here if you add new languages to application / config / gettext . php
* This helps the po scanner to make them translatable
*/
?>
2024-06-07 02:35:59 +02:00
< div style = " display: none " >
2024-08-12 11:40:16 +02:00
< ? = __ ( " Albanian " ); ?>
2024-08-11 21:42:01 +02:00
< ? = __ ( " Bosnian " ); ?>
2024-06-07 02:35:59 +02:00
< ? = __ ( " Bulgarian " ); ?>
< ? = __ ( " Chinese (Simplified) " ); ?>
2024-08-11 21:42:01 +02:00
< ? = __ ( " Croatian " ); ?>
2024-06-07 02:35:59 +02:00
< ? = __ ( " Czech " ); ?>
< ? = __ ( " Dutch " ); ?>
< ? = __ ( " English " ); ?>
2024-10-17 08:10:11 +02:00
< ? = __ ( " Estonian " ); ?>
2024-06-07 02:35:59 +02:00
< ? = __ ( " Finnish " ); ?>
< ? = __ ( " French " ); ?>
< ? = __ ( " German " ); ?>
< ? = __ ( " Greek " ); ?>
< ? = __ ( " Italian " ); ?>
2024-10-17 08:10:11 +02:00
< ? = __ ( " Latvian " ); ?>
< ? = __ ( " Lithuanian " ); ?>
2024-08-11 21:42:01 +02:00
< ? = __ ( " Montenegrin " ); ?>
2024-06-07 02:35:59 +02:00
< ? = __ ( " Polish " ); ?>
2024-07-22 20:22:18 +02:00
< ? = __ ( " Portuguese " ); ?>
2024-06-07 02:35:59 +02:00
< ? = __ ( " Russian " ); ?>
2024-08-11 21:42:01 +02:00
< ? = __ ( " Serbian " ); ?>
2024-06-07 02:35:59 +02:00
< ? = __ ( " Spanish " ); ?>
< ? = __ ( " Swedish " ); ?>
< ? = __ ( " Turkish " ); ?>
2024-12-26 07:14:56 +00:00
< ? = __ ( " Armenian " ); ?>
2024-07-25 12:16:36 +02:00
</ div >