Results table headers now correctly only show when results are available. Also fixing issue where the first record downloaded from eqsl and lotw was not displayed in the results table. LoTW import now displays message if no results available.

这个提交包含在:
Corby Krick 2013-11-15 15:28:56 -06:00
父节点 11c5d0d9c5
当前提交 efbc22e665
共有 3 个文件被更改,包括 89 次插入100 次删除

查看文件

@ -28,19 +28,16 @@ class eqsl extends CI_Controller {
$this->adif_parser->initialize();
$records = $this->adif_parser->get_record();
if (count($records) > 0)
{
$table = "<table>";
$table .= "<tr class=\"titles\">";
$table .= "<td>Date</td>";
$table .= "<td>Call</td>";
$table .= "<td>Mode</td>";
$table .= "<td>Log Status</td>";
$table .= "<td>eQSL Status</td>";
$table .= "<tr>";
while($record = $this->adif_parser->get_record())
$tableheaders = "<table>";
$tableheaders .= "<tr class=\"titles\">";
$tableheaders .= "<td>Date</td>";
$tableheaders .= "<td>Call</td>";
$tableheaders .= "<td>Mode</td>";
$tableheaders .= "<td>Log Status</td>";
$tableheaders .= "<td>eQSL Status</td>";
$tableheaders .= "<tr>";
$table = "";
while ($record = $this->adif_parser->get_record())
{
$time_on = date('Y-m-d', strtotime($record['qso_date'])) ." ".date('H:i', strtotime($record['time_on']));
@ -78,10 +75,11 @@ class eqsl extends CI_Controller {
$table .= "<td>eQSL Record: ".$eqsl_status."</td>";
$table .= "<tr>";
}
if ($table != "")
{
$table .= "</table>";
$data['eqsl_results_table_headers'] = $tableheaders;
$data['eqsl_results_table'] = $table;
}
unlink($filepath);

查看文件

@ -28,33 +28,20 @@ class Lotw extends CI_Controller {
$this->adif_parser->initialize();
$table = "<table>";
$table .= "<tr class=\"titles\">";
$table .= "<td>QSO Date</td>";
$table .= "<td>Call</td>";
$table .= "<td>Mode</td>";
$table .= "<td>LoTW QSL Received</td>";
$table .= "<td>Date LoTW Confirmed</td>";
$table .= "<td>Log Status</td>";
$table .= "<td>LoTW Status</td>";
$table .= "<tr>";
$tableheaders = "<table>";
$tableheaders .= "<tr class=\"titles\">";
$tableheaders .= "<td>QSO Date</td>";
$tableheaders .= "<td>Call</td>";
$tableheaders .= "<td>Mode</td>";
$tableheaders .= "<td>LoTW QSL Received</td>";
$tableheaders .= "<td>Date LoTW Confirmed</td>";
$tableheaders .= "<td>Log Status</td>";
$tableheaders .= "<td>LoTW Status</td>";
$tableheaders .= "<tr>";
$table = "";
while($record = $this->adif_parser->get_record())
{
if(count($record) == 0)
{
break;
};
//echo date('Y-m-d', strtotime($record['qso_date']))."<br>";
//echo date('H:m', strtotime($record['time_on']))."<br>";
//$this->logbook_model->import($record);
//echo $record["call"]."<br>";
//print_r($record->);
$time_on = date('Y-m-d', strtotime($record['qso_date'])) ." ".date('H:i', strtotime($record['time_on']));
@ -84,14 +71,17 @@ class Lotw extends CI_Controller {
$table .= "<td>QSO Record: ".$status."</td>";
$table .= "<td>LoTW Record: ".$lotw_status."</td>";
$table .= "<tr>";
};
}
if ($table != "")
{
$table .= "</table>";
$data['lotw_table_headers'] = $tableheaders;
$data['lotw_table'] = $table;
}
unlink($filepath);
$data['lotw_table'] = $table;
$data['page_title'] = "LoTW ADIF Information";
$this->load->view('layout/header', $data);
$this->load->view('lotw/analysis');

查看文件

@ -4,9 +4,10 @@
<?php $this->load->view('layout/messages'); ?>
<?php
if (isset($eqsl_results_table))
if (isset($eqsl_results_table_headers))
{
echo "<p>The following QSOs have been received from eQSL.cc</p>";
echo "<p>The following QSLs have been received from eQSL.cc</p>";
echo $eqsl_results_table_headers;
echo $eqsl_results_table;
}
else