Merge branch 'dev' into better_language_support
这个提交包含在:
当前提交
69ca410942
共有 19 个文件被更改,包括 325 次插入 和 15 次删除
|
|
@ -8,6 +8,23 @@ class eqsl extends CI_Controller {
|
|||
$this->load->helper(array('form', 'url'));
|
||||
}
|
||||
|
||||
// Default view when loading controller.
|
||||
public function index() {
|
||||
|
||||
$this->lang->load('qslcard');
|
||||
$folder_name = "assets/qslcard";
|
||||
$data['storage_used'] = $this->sizeFormat($this->folderSize($folder_name));
|
||||
|
||||
// Render Page
|
||||
$data['page_title'] = "eQSL Cards";
|
||||
|
||||
$this->load->model('eqsl_images');
|
||||
$data['qslarray'] = $this->eqsl_images->eqsl_qso_list();
|
||||
|
||||
$this->load->view('interface_assets/header', $data);
|
||||
$this->load->view('eqslcard/index');
|
||||
$this->load->view('interface_assets/footer');
|
||||
}
|
||||
public function import() {
|
||||
$this->load->model('user_model');
|
||||
if(!$this->user_model->authorize(2)) { $this->session->set_flashdata('notice', 'You\'re not allowed to do that!'); redirect('dashboard'); }
|
||||
|
|
@ -535,6 +552,22 @@ class eqsl extends CI_Controller {
|
|||
$this->load->view('interface_assets/footer');
|
||||
}
|
||||
|
||||
public function download() {
|
||||
// Check logged in
|
||||
$this->load->model('user_model');
|
||||
if(!$this->user_model->authorize(2)) { $this->session->set_flashdata('notice', 'You\'re not allowed to do that!'); redirect('dashboard'); }
|
||||
|
||||
$data['page_title'] = "eQSL Card Image Download";
|
||||
$this->load->model('eqslmethods_model');
|
||||
|
||||
$data['custom_date_format'] = $this->session->userdata('user_date_format');
|
||||
$data['qslsnotdownloaded'] = $this->eqslmethods_model->eqsl_not_yet_downloaded();
|
||||
|
||||
$this->load->view('interface_assets/header', $data);
|
||||
$this->load->view('eqsl/download');
|
||||
$this->load->view('interface_assets/footer');
|
||||
}
|
||||
|
||||
public function mark_all_sent() {
|
||||
// Check logged in
|
||||
$this->load->model('user_model');
|
||||
|
|
@ -599,5 +632,49 @@ class eqsl extends CI_Controller {
|
|||
$status = $this->uploadQso($adif, $qsl);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Functions for storage, these need shifted to a libary to use across Cloudlog
|
||||
function folderSize($dir){
|
||||
$count_size = 0;
|
||||
$count = 0;
|
||||
$dir_array = scandir($dir);
|
||||
foreach($dir_array as $key=>$filename){
|
||||
if($filename!=".." && $filename!="."){
|
||||
if(is_dir($dir."/".$filename)){
|
||||
$new_foldersize = foldersize($dir."/".$filename);
|
||||
$count_size = $count_size+ $new_foldersize;
|
||||
}else if(is_file($dir."/".$filename)){
|
||||
$count_size = $count_size + filesize($dir."/".$filename);
|
||||
$count++;
|
||||
}
|
||||
}
|
||||
}
|
||||
return $count_size;
|
||||
}
|
||||
|
||||
function sizeFormat($bytes){
|
||||
$kb = 1024;
|
||||
$mb = $kb * 1024;
|
||||
$gb = $mb * 1024;
|
||||
$tb = $gb * 1024;
|
||||
|
||||
if (($bytes >= 0) && ($bytes < $kb)) {
|
||||
return $bytes . ' B';
|
||||
|
||||
} elseif (($bytes >= $kb) && ($bytes < $mb)) {
|
||||
return ceil($bytes / $kb) . ' KB';
|
||||
|
||||
} elseif (($bytes >= $mb) && ($bytes < $gb)) {
|
||||
return ceil($bytes / $mb) . ' MB';
|
||||
|
||||
} elseif (($bytes >= $gb) && ($bytes < $tb)) {
|
||||
return ceil($bytes / $gb) . ' GB';
|
||||
|
||||
} elseif ($bytes >= $tb) {
|
||||
return ceil($bytes / $tb) . ' TB';
|
||||
} else {
|
||||
return $bytes . ' B';
|
||||
}
|
||||
}
|
||||
|
||||
} // end class
|
||||
|
|
|
|||
|
|
@ -48,6 +48,7 @@ $lang['general_word_qslcard_bureau'] = 'Bureau';
|
|||
$lang['general_word_qslcard_electronic'] = 'Electronic';
|
||||
$lang['general_word_qslcard_manager'] = 'Manager';
|
||||
$lang['general_word_qslcard_via'] = 'Via';
|
||||
$lang['general_word_eqslcard'] = 'eQSL Card';
|
||||
$lang['general_word_eqslcards'] = 'eQSL Cards';
|
||||
$lang['general_word_lotw'] = 'Logbook of the World';
|
||||
|
||||
|
|
|
|||
|
|
@ -14,6 +14,7 @@ $lang['menu_post_qso'] = 'Post QSO';
|
|||
$lang['menu_live_contest_logging'] = 'Live Contest Logging';
|
||||
$lang['menu_post_contest_logging'] = 'Post Contest Logging';
|
||||
$lang['menu_view_qsl'] = 'View QSL';
|
||||
$lang['menu_view_eqsl'] = 'View eQSL';
|
||||
|
||||
$lang['menu_analytics'] = 'Analytics';
|
||||
$lang['menu_statistics'] = 'Statistics';
|
||||
|
|
@ -75,4 +76,4 @@ $lang['menu_api_keys'] = 'API Keys';
|
|||
$lang['menu_hardware_interfaces'] = 'Hardware Interfaces';
|
||||
$lang['menu_help'] = 'Help';
|
||||
$lang['menu_forum'] = 'Forum';
|
||||
$lang['menu_logout'] = 'Logout';
|
||||
$lang['menu_logout'] = 'Logout';
|
||||
|
|
|
|||
|
|
@ -47,6 +47,7 @@ $lang['general_word_qslcard_direct'] = 'Direkt';
|
|||
$lang['general_word_qslcard_bureau'] = 'Büro';
|
||||
$lang['general_word_qslcard_electronic'] = 'Elektronisch';
|
||||
$lang['general_word_qslcard_via'] = 'Via';
|
||||
$lang['general_word_eqslcard'] = 'eQSL Karte';
|
||||
$lang['general_word_eqslcards'] = 'eQSL Karten';
|
||||
$lang['general_word_lotw'] = 'Logbook of the World';
|
||||
|
||||
|
|
|
|||
|
|
@ -14,6 +14,7 @@ $lang['menu_post_qso'] = 'Zeitversetztes QSO';
|
|||
$lang['menu_live_contest_logging'] = 'Live Contest Logging';
|
||||
$lang['menu_post_contest_logging'] = 'Zeitversetztes Contest Logging';
|
||||
$lang['menu_view_qsl'] = 'QSL Ansicht';
|
||||
$lang['menu_view_eqsl'] = 'eQSL Ansicht';
|
||||
|
||||
$lang['menu_analytics'] = 'Analysen';
|
||||
$lang['menu_statistics'] = 'Statistik';
|
||||
|
|
|
|||
|
|
@ -87,7 +87,7 @@ class DXCC extends CI_Model {
|
|||
$dxccMatrix[$dxcc->adif]['name'] = ucwords(strtolower($dxcc->name), "- (/");
|
||||
$dxccMatrix[$dxcc->adif]['Dxccprefix'] = $dxcc->prefix;
|
||||
if ($postdata['includedeleted'])
|
||||
$dxccMatrix[$dxcc->adif]['Deleted'] = isset($dxcc->Enddate) ? "<div class='alert-danger'>Y</div>" : '';
|
||||
$dxccMatrix[$dxcc->adif]['Deleted'] = isset($dxcc->Enddate) ? 1 : 0;
|
||||
$dxccMatrix[$dxcc->adif][$band] = '-';
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -24,6 +24,17 @@ class Eqsl_images extends CI_Model {
|
|||
$this->db->insert('eQSL_images', $data);
|
||||
}
|
||||
|
||||
function eqsl_qso_list() {
|
||||
$this->load->model('logbooks_model');
|
||||
$logbooks_locations_array = $this->logbooks_model->list_logbook_relationships($this->session->userdata('active_station_logbook'));
|
||||
$this->db->select('qso_id, COL_CALL, COL_MODE, , COL_SUBMODE, COL_TIME_ON, COL_BAND, COL_SAT_NAME, image_file');
|
||||
$this->db->join($this->config->item('table_name'), 'qso_id = COL_PRIMARY_KEY', 'left outer');
|
||||
$this->db->join('station_profile', $this->config->item('table_name').'.station_id = station_profile.station_id', 'left outer');
|
||||
$this->db->where_in('station_profile.station_id', $logbooks_locations_array);
|
||||
$this->db->order_by('COL_TIME_ON', 'DESC');
|
||||
return $this->db->get('eQSL_images');
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
?>
|
||||
|
|
|
|||
|
|
@ -49,7 +49,7 @@ class Eqslmethods_model extends CI_Model {
|
|||
array_push($logbooks_locations_array, $row->station_id);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
$this->db->select('station_profile.*, '.$this->config->item('table_name').'.COL_PRIMARY_KEY, '.$this->config->item('table_name').'.COL_TIME_ON, '.$this->config->item('table_name').'.COL_CALL, '.$this->config->item('table_name').'.COL_MODE, '.$this->config->item('table_name').'.COL_SUBMODE, '.$this->config->item('table_name').'.COL_BAND, '.$this->config->item('table_name').'.COL_COMMENT, '.$this->config->item('table_name').'.COL_RST_SENT, '.$this->config->item('table_name').'.COL_PROP_MODE, '.$this->config->item('table_name').'.COL_SAT_NAME, '.$this->config->item('table_name').'.COL_SAT_MODE, '.$this->config->item('table_name').'.COL_QSLMSG');
|
||||
$this->db->from('station_profile');
|
||||
$this->db->join($this->config->item('table_name'),'station_profile.station_id = '.$this->config->item('table_name').'.station_id');
|
||||
|
|
@ -63,7 +63,34 @@ class Eqslmethods_model extends CI_Model {
|
|||
$this->db->or_where($this->config->item('table_name').'.COL_EQSL_QSL_SENT', 'N');
|
||||
$this->db->group_end();
|
||||
$this->db->where_in('station_profile.station_id', $logbooks_locations_array);
|
||||
|
||||
|
||||
return $this->db->get();
|
||||
}
|
||||
|
||||
// Show all QSOs whose eQSL card images we did not download yet
|
||||
function eqsl_not_yet_downloaded($userid = null) {
|
||||
$CI =& get_instance();
|
||||
if ($userid == null) {
|
||||
$CI->load->model('logbooks_model');
|
||||
$logbooks_locations_array = $CI->logbooks_model->list_logbook_relationships($this->session->userdata('active_station_logbook'));
|
||||
} else {
|
||||
$stations = $this->get_all_user_locations($userid);
|
||||
$logbooks_locations_array = array();
|
||||
foreach ($stations->result() as $row) {
|
||||
array_push($logbooks_locations_array, $row->station_id);
|
||||
}
|
||||
}
|
||||
|
||||
$this->db->select('station_profile.station_id, '.$this->config->item('table_name').'.COL_PRIMARY_KEY, '.$this->config->item('table_name').'.COL_TIME_ON, '.$this->config->item('table_name').'.COL_CALL, '.$this->config->item('table_name').'.COL_MODE, '.$this->config->item('table_name').'.COL_SUBMODE, '.$this->config->item('table_name').'.COL_BAND, '.$this->config->item('table_name').'.COL_PROP_MODE, '.$this->config->item('table_name').'.COL_SAT_NAME, '.$this->config->item('table_name').'.COL_SAT_MODE, '.$this->config->item('table_name').'.COL_QSLMSG, eQSL_images.qso_id');
|
||||
$this->db->from('station_profile');
|
||||
$this->db->join($this->config->item('table_name'),'station_profile.station_id = '.$this->config->item('table_name').'.station_id');
|
||||
$this->db->join('eQSL_images','eQSL_images.qso_id = '.$this->config->item('table_name').'.COL_PRIMARY_KEY','left outer');
|
||||
//$this->db->where("coalesce(station_profile.eqslqthnickname, '') <> ''");
|
||||
$this->db->where($this->config->item('table_name').'.COL_CALL !=', '');
|
||||
$this->db->where($this->config->item('table_name').'.COL_EQSL_QSL_RCVD', 'Y');
|
||||
$this->db->where('qso_id', NULL);
|
||||
$this->db->where_in('station_profile.station_id', $logbooks_locations_array);
|
||||
|
||||
return $this->db->get();
|
||||
}
|
||||
|
||||
|
|
@ -165,4 +192,4 @@ class Eqslmethods_model extends CI_Model {
|
|||
|
||||
}
|
||||
|
||||
?>
|
||||
?>
|
||||
|
|
|
|||
|
|
@ -1296,11 +1296,12 @@ class Logbook_model extends CI_Model {
|
|||
|
||||
function get_qso($id) {
|
||||
$this->db->select($this->config->item('table_name').'.*, station_profile.*, dxcc_entities.*, dxcc_entities_2.name as station_country, dxcc_entities_2.end as station_end');
|
||||
$this->db->select($this->config->item('table_name').'.*, station_profile.*, dxcc_entities.*, coalesce(dxcc_entities_2.name, "- NONE -") as station_country, dxcc_entities_2.end as station_end');
|
||||
$this->db->select($this->config->item('table_name').'.*, station_profile.*, dxcc_entities.*, coalesce(dxcc_entities_2.name, "- NONE -") as station_country, dxcc_entities_2.end as station_end, eQSL_images.image_file as eqsl_image_file');
|
||||
$this->db->from($this->config->item('table_name'));
|
||||
$this->db->join('dxcc_entities', $this->config->item('table_name').'.col_dxcc = dxcc_entities.adif', 'left');
|
||||
$this->db->join('station_profile', 'station_profile.station_id = '.$this->config->item('table_name').'.station_id', 'left');
|
||||
$this->db->join('dxcc_entities as dxcc_entities_2', 'station_profile.station_dxcc = dxcc_entities_2.adif', 'left outer');
|
||||
$this->db->join('eQSL_images', $this->config->item('table_name').'.COL_PRIMARY_KEY = eQSL_images.qso_id', 'left outer');
|
||||
$this->db->where('COL_PRIMARY_KEY', $id);
|
||||
|
||||
return $this->db->get();
|
||||
|
|
@ -3794,4 +3795,4 @@ function validateADIFDate($date, $format = 'Ymd')
|
|||
$d = DateTime::createFromFormat($format, $date);
|
||||
return $d && $d->format($format) == $date;
|
||||
}
|
||||
?>
|
||||
?>
|
||||
|
|
|
|||
|
|
@ -198,9 +198,6 @@
|
|||
<td>#</td>
|
||||
<td>DXCC Name</td>
|
||||
<td>Prefix</td>';
|
||||
if ($this->input->post('includedeleted'))
|
||||
echo '
|
||||
<td>Deleted</td>';
|
||||
foreach($bands as $band) {
|
||||
echo '<td>' . $band . '</td>';
|
||||
}
|
||||
|
|
@ -210,8 +207,14 @@
|
|||
foreach ($dxcc_array as $dxcc => $value) { // Fills the table with the data
|
||||
echo '<tr>
|
||||
<td>'. $i++ .'</td>';
|
||||
foreach ($value as $key) {
|
||||
echo '<td style="text-align: center">' . $key . '</td>';
|
||||
foreach ($value as $name => $key) {
|
||||
if (isset($value['Deleted']) && $value['Deleted'] == 1 && $name == "name") {
|
||||
echo '<td style="text-align: center">' . $key . ' <span class="badge badge-danger">'.lang('gen_hamradio_deleted_dxcc').'</span></td>';
|
||||
} else if ($name == "Deleted") {
|
||||
continue;
|
||||
} else {
|
||||
echo '<td style="text-align: center">' . $key . '</td>';
|
||||
}
|
||||
}
|
||||
echo '</tr>';
|
||||
}
|
||||
|
|
|
|||
|
|
@ -16,6 +16,9 @@ $custom_date_format = $this->session->userdata('user_date_format');
|
|||
<li class="nav-item">
|
||||
<a class="nav-link" href="<?php echo site_url('eqsl/tools');?>">Tools</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="<?php echo site_url('eqsl/download');?>">Download eQSL Images</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,70 @@
|
|||
|
||||
<div class="container eqsl">
|
||||
<h2><?php echo $page_title; ?></h2>
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<div class="card-title">eQSL Card Image Download</div>
|
||||
<ul class="nav nav-tabs card-header-tabs">
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="<?php echo site_url('eqsl/import');?>">Download QSOs</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="<?php echo site_url('eqsl/Export');?>">Upload QSOs</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="<?php echo site_url('eqsl/tools');?>">Tools</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link active" href="<?php echo site_url('eqsl/download');?>">Download eQSL Images</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="card-body">
|
||||
<?php $this->load->view('layout/messages'); ?>
|
||||
|
||||
<?php
|
||||
if (! empty($qslsnotdownloaded->result())) {
|
||||
?>
|
||||
<p>Below is a table of QSOs that have been confirmed on eQSL but QSL images have not been downloaded yet.</p>
|
||||
|
||||
|
||||
<table = style="width:100%" class="table-sm table table-bordered table-hover table-striped table-condensed text-center">
|
||||
<thead><tr class="titles">
|
||||
<th>Date</th>
|
||||
<th>Time</th>
|
||||
<th>Call</th>
|
||||
<th>Mode</th>
|
||||
<th>Submode</th>
|
||||
<th>Band</th>
|
||||
<th>Action</th>
|
||||
</tr></thead><tbody>
|
||||
<?php
|
||||
foreach ($qslsnotdownloaded->result_array() as $qsl) {
|
||||
echo "<tr>";
|
||||
$timestamp = strtotime($qsl['COL_TIME_ON']);
|
||||
echo "<td>".date($custom_date_format, $timestamp)."</td>";
|
||||
echo "<td>".date('H:i', $timestamp)."</td>";
|
||||
echo "<td>".str_replace("0","Ø",$qsl['COL_CALL'])."</td>";
|
||||
echo "<td>".$qsl['COL_MODE']."</td>";
|
||||
if(isset($qsl['COL_SUBMODE'])) {
|
||||
echo "<td>".$qsl['COL_SUBMODE']."</td>";
|
||||
} else {
|
||||
echo "<td></td>";
|
||||
}
|
||||
echo "<td>".$qsl['COL_BAND']."</td>";
|
||||
echo "<td><a href=\"".site_url()."/eqsl/image/".$qsl['COL_PRIMARY_KEY']."\" data-fancybox=\"images\" data-width=\"528\" data-height=\"336\" class=\"btn btn-primary btn-sm\">View/Download</a></td>";
|
||||
}
|
||||
echo "</tr>";
|
||||
?>
|
||||
</tbody></table>
|
||||
|
||||
<?php
|
||||
} else {
|
||||
echo "<p>There are no QSOs whose eQSL card images have not yet been downloaded. Go log some more QSOs!</p>";
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -14,6 +14,9 @@
|
|||
<li class="nav-item">
|
||||
<a class="nav-link" href="<?php echo site_url('eqsl/tools');?>">Tools</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="<?php echo site_url('eqsl/download');?>">Download eQSL Images</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
|
|
|||
|
|
@ -14,6 +14,9 @@
|
|||
<li class="nav-item">
|
||||
<a class="nav-link" href="<?php echo site_url('eqsl/tools');?>">Tools</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="<?php echo site_url('eqsl/download');?>">Download eQSL Images</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
|
|
|
|||
|
|
@ -15,6 +15,10 @@
|
|||
<li class="nav-item">
|
||||
<a class="nav-link active" href="<?php echo site_url('eqsl/tools');?>">Tools</a>
|
||||
</li>
|
||||
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="<?php echo site_url('eqsl/download');?>">Download eQSL Images</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,59 @@
|
|||
<div class="container">
|
||||
|
||||
<br>
|
||||
|
||||
<h2><?php echo $this->lang->line('general_word_eqslcards'); ?></h2>
|
||||
|
||||
<div class="alert alert-info" role="alert">
|
||||
<?php echo $this->lang->line('qslcard_string_your_are_using'); ?> <?php echo $storage_used; ?> <?php echo $this->lang->line('qslcard_string_disk_space'); ?>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
|
||||
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/cloudlog.php
|
||||
$custom_date_format = $this->config->item('qso_date_format');
|
||||
}
|
||||
|
||||
if (is_array($qslarray->result())) {
|
||||
echo '<table style="width:100%" class="eqsltable table table-sm table-bordered table-hover table-striped table-condensed">
|
||||
<thead>
|
||||
<tr>
|
||||
<th style=\'text-align: center\'>'.$this->lang->line('gen_hamradio_callsign').'</th>
|
||||
<th style=\'text-align: center\'>'.$this->lang->line('gen_hamradio_mode').'</th>
|
||||
<th style=\'text-align: center\'>'.$this->lang->line('general_word_date').'</th>
|
||||
<th style=\'text-align: center\'>'.$this->lang->line('general_word_time').'</th>
|
||||
<th style=\'text-align: center\'>'.$this->lang->line('gen_hamradio_band').'</th>
|
||||
<th style=\'text-align: center\'>'.$this->lang->line('gen_hamradio_qsl').'</th>
|
||||
<th style=\'text-align: center\'></th>
|
||||
</tr>
|
||||
</thead><tbody>';
|
||||
|
||||
foreach ($qslarray->result() as $qsl) {
|
||||
echo '<tr>';
|
||||
echo '<td style=\'text-align: center\'>' . $qsl->COL_CALL . '</td>';
|
||||
echo '<td style=\'text-align: center\'>';
|
||||
echo $qsl->COL_SUBMODE==null?$qsl->COL_MODE:$qsl->COL_SUBMODE;
|
||||
echo '</td>';
|
||||
echo '<td style=\'text-align: center\'>';
|
||||
$timestamp = strtotime($qsl->COL_TIME_ON); echo date($custom_date_format, $timestamp);
|
||||
echo '</td>';
|
||||
echo '<td style=\'text-align: center\'>';
|
||||
$timestamp = strtotime($qsl->COL_TIME_ON); echo date('H:i', $timestamp);
|
||||
echo '</td>';
|
||||
echo '<td style=\'text-align: center\'>';
|
||||
if($qsl->COL_SAT_NAME != null) { echo $qsl->COL_SAT_NAME; } else { echo strtolower($qsl->COL_BAND); };
|
||||
echo '</td>';
|
||||
echo '<td style=\'text-align: center\'>' . $qsl->image_file . '</td>';
|
||||
echo '<td style=\'text-align: center\'><button onclick="viewEqsl(\''.$qsl->image_file.'\', \''. $qsl->COL_CALL . '\')" class="btn btn-sm btn-success">View</button></td>';
|
||||
echo '</tr>';
|
||||
}
|
||||
|
||||
echo '</tbody></table>';
|
||||
}
|
||||
?>
|
||||
|
||||
</div>
|
||||
|
|
@ -2123,7 +2123,7 @@ $(document).ready(function(){
|
|||
<script src="<?php echo base_url(); ?>assets/js/sections/timeplot.js"></script>
|
||||
<?php } ?>
|
||||
|
||||
<?php if ($this->uri->segment(1) == "qsl") {
|
||||
<?php if ($this->uri->segment(1) == "qsl" || $this->uri->segment(1) == "eqsl") {
|
||||
// Get Date format
|
||||
if($this->session->userdata('user_date_format')) {
|
||||
// If Logged in and session exists
|
||||
|
|
@ -2244,6 +2244,31 @@ function deleteQsl(id) {
|
|||
});
|
||||
}
|
||||
</script>
|
||||
<script>
|
||||
function viewEqsl(picture, callsign) {
|
||||
var baseURL= "<?php echo base_url();?>";
|
||||
var $textAndPic = $('<div></div>');
|
||||
$textAndPic.append('<img class="img-fluid" style="height:auto;width:auto;"src="'+baseURL+'images/eqsl_card_images/'+picture+'" />');
|
||||
var title = '';
|
||||
if (callsign == null) {
|
||||
title = 'eQSL Card';
|
||||
} else {
|
||||
title = 'eQSL Card for ' + callsign;
|
||||
}
|
||||
|
||||
BootstrapDialog.show({
|
||||
title: title,
|
||||
size: BootstrapDialog.SIZE_WIDE,
|
||||
message: $textAndPic,
|
||||
buttons: [{
|
||||
label: 'Close',
|
||||
action: function(dialogRef){
|
||||
dialogRef.close();
|
||||
}
|
||||
}]
|
||||
});
|
||||
}
|
||||
</script>
|
||||
|
||||
<script>
|
||||
/*
|
||||
|
|
|
|||
|
|
@ -82,6 +82,8 @@
|
|||
<a class="dropdown-item" href="<?php echo site_url('contesting?manual=1');?>" title="Post contest QSOs"><i class="fas fa-list"></i> <?php echo lang('menu_post_contest_logging'); ?></a>
|
||||
<div class="dropdown-divider"></div>
|
||||
<a class="dropdown-item" href="<?php echo site_url('qsl');?>" title="QSL"><i class="fa fa-id-card"></i> <?php echo lang('menu_view_qsl'); ?></a>
|
||||
<div class="dropdown-divider"></div>
|
||||
<a class="dropdown-item" href="<?php echo site_url('eqsl');?>" title="eQSL"><i class="fa fa-id-card"></i> <?php echo lang('menu_view_eqsl'); ?></a>
|
||||
</div>
|
||||
</li>
|
||||
|
||||
|
|
|
|||
|
|
@ -31,6 +31,19 @@
|
|||
}
|
||||
|
||||
?>
|
||||
<?php
|
||||
if (($this->config->item('use_auth')) && ($this->session->userdata('user_type') >= 2)) {
|
||||
|
||||
echo '<li ';
|
||||
if ($row->eqsl_image_file == null) {
|
||||
echo 'hidden ';
|
||||
}
|
||||
echo 'class="eqslcardtab nav-item">
|
||||
<a class="nav-link" id="eqsltab" data-toggle="tab" href="#eqslcard" role="tab" aria-controls="home" aria-selected="false">'. $this->lang->line('general_word_eqslcard') .'</a>
|
||||
</li>';
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
</ul>
|
||||
|
||||
|
|
@ -553,6 +566,11 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<div class="tab-pane fade" id="eqslcard" role="tabpanel" aria-labelledby="table-tab">
|
||||
<?php
|
||||
echo '<img class="d-block" src="' . base_url() . '/images/eqsl_card_images/' . $row->eqsl_image_file .'" alt="QSL picture #'. $i++.'">';
|
||||
?>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
|
|
|
|||
正在加载…
在新工单中引用