mirror of
https://github.com/magicbug/Cloudlog
synced 2024-11-23 10:08:38 +00:00
Serial number correctly stored from ADIF, displayed editable
This commit is contained in:
parent
3020b8b95a
commit
79de2357fe
@ -91,7 +91,7 @@ class adif extends CI_Controller {
|
||||
$this->logbook_model->import($record);
|
||||
|
||||
//echo $record["call"]."<br>";
|
||||
//print_r($record);
|
||||
print_r($record);
|
||||
};
|
||||
|
||||
unlink('./uploads/'.$data['upload_data']['file_name']);
|
||||
|
@ -35,8 +35,6 @@ class Contest extends CI_Controller {
|
||||
$data['log'] = $this->contests->contest_log_view($data['info']->start, $data['info']->end, $data['info']);
|
||||
$data['summary'] = $this->contests->contest_summary_bands($data['info']->start, $data['info']->end, $data['info']);
|
||||
|
||||
|
||||
|
||||
// Run validation checks on QSO submission
|
||||
$this->load->library('form_validation');
|
||||
|
||||
|
@ -188,7 +188,8 @@ class Logbook_model extends CI_Model {
|
||||
'COL_IOTA' => $this->input->post('iota_ref'),
|
||||
'COL_QTH' => $this->input->post('qth'),
|
||||
'COL_FREQ_RX' => '0',
|
||||
'COL_COUNTRY' => $this->input->post('country'),
|
||||
'COL_STX_STRING' => $this->input->post('stx_string'),
|
||||
'COL_SRX_STRING' => $this->input->post('srx_string')
|
||||
);
|
||||
|
||||
$this->db->where('COL_PRIMARY_KEY', $this->input->post('id'));
|
||||
@ -271,7 +272,7 @@ class Logbook_model extends CI_Model {
|
||||
|
||||
|
||||
function get_qsos($num, $offset) {
|
||||
$this->db->select('COL_CALL, COL_BAND, COL_TIME_ON, COL_RST_RCVD, COL_RST_SENT, COL_MODE, COL_NAME, COL_COUNTRY, COL_PRIMARY_KEY, COL_SAT_NAME, COL_GRIDSQUARE, COL_QSL_RCVD, COL_QSL_SENT');
|
||||
$this->db->select('COL_CALL, COL_BAND, COL_TIME_ON, COL_RST_RCVD, COL_RST_SENT, COL_MODE, COL_NAME, COL_COUNTRY, COL_PRIMARY_KEY, COL_SAT_NAME, COL_GRIDSQUARE, COL_QSL_RCVD, COL_QSL_SENT, COL_STX_STRING, COL_SRX_STRING');
|
||||
$this->db->order_by("COL_TIME_ON", "desc");
|
||||
|
||||
$query = $this->db->get($this->config->item('table_name'), $num, $offset);
|
||||
@ -280,7 +281,7 @@ class Logbook_model extends CI_Model {
|
||||
}
|
||||
|
||||
function get_last_qsos($num) {
|
||||
$this->db->select('COL_CALL, COL_BAND, COL_TIME_ON, COL_RST_RCVD, COL_RST_SENT, COL_MODE, COL_NAME, COL_COUNTRY, COL_PRIMARY_KEY, COL_SAT_NAME');
|
||||
$this->db->select('COL_CALL, COL_BAND, COL_TIME_ON, COL_RST_RCVD, COL_RST_SENT, COL_MODE, COL_NAME, COL_COUNTRY, COL_PRIMARY_KEY, COL_SAT_NAME, COL_STX_STRING, COL_SRX_STRING');
|
||||
$this->db->order_by("COL_TIME_ON", "desc");
|
||||
$this->db->limit($num);
|
||||
$query = $this->db->get($this->config->item('table_name'));
|
||||
@ -556,42 +557,50 @@ class Logbook_model extends CI_Model {
|
||||
$time_off = date('Y-m-d', strtotime($record['qso_date'])) ." ".date('H:i', strtotime($record['time_on']));
|
||||
}
|
||||
|
||||
|
||||
// Store Freq
|
||||
if(isset($record['freq'])) {
|
||||
$cleansedstring = preg_replace('#\W#', '', $record['freq']);
|
||||
$freq = $cleansedstring."000";
|
||||
} else {
|
||||
$freq = "0";
|
||||
}
|
||||
|
||||
// Store Name
|
||||
if(isset($record['name'])) {
|
||||
$name = $record['name'];
|
||||
} else {
|
||||
$name = "";
|
||||
}
|
||||
|
||||
// Store Notes
|
||||
if(isset($record['NOTES'])) {
|
||||
$comment = $record['NOTES'];
|
||||
} else {
|
||||
$comment = "";
|
||||
}
|
||||
|
||||
// Store Sat Name
|
||||
if(isset($record['sat_name'])) {
|
||||
$sat_name = $record['sat_name'];
|
||||
} else {
|
||||
$sat_name = "";
|
||||
}
|
||||
|
||||
// Store Satellite Mode
|
||||
if(isset($record['sat_mode'])) {
|
||||
$sat_mode = $record['sat_mode'];
|
||||
} else {
|
||||
$sat_mode = "";
|
||||
}
|
||||
|
||||
// Store Gridsquare
|
||||
if(isset($record['gridsquare'])) {
|
||||
$gridsquare = $record['gridsquare'];
|
||||
} else {
|
||||
$gridsquare = "";
|
||||
}
|
||||
|
||||
// Store or find country name
|
||||
if(isset($record['country'])) {
|
||||
$country = $record['country'];
|
||||
} else {
|
||||
@ -610,31 +619,40 @@ class Logbook_model extends CI_Model {
|
||||
}
|
||||
}
|
||||
|
||||
// Store QTH
|
||||
if(isset($record['qth'])) {
|
||||
$qth = $record['qth'];
|
||||
} else {
|
||||
$qth = "";
|
||||
}
|
||||
|
||||
// Store Propagation Mode
|
||||
if(isset($record['prop_mode'])) {
|
||||
$prop_mode = $record['prop_mode'];
|
||||
} else {
|
||||
$prop_mode = "";
|
||||
}
|
||||
|
||||
|
||||
// RST recevied
|
||||
if(isset($record['rst_rcvd'])) {
|
||||
$rst_rx = $record['rst_rcvd'];
|
||||
} else {
|
||||
$rst_rx = "59" ;
|
||||
}
|
||||
|
||||
if(isset($record['rst_sent'])) {
|
||||
// RST Sent
|
||||
if(isset($record['rst_sent'])) {
|
||||
$rst_tx = $record['rst_sent'];
|
||||
} else {
|
||||
$rst_tx = "59" ;
|
||||
}
|
||||
|
||||
if(isset($record['band'])) {
|
||||
$band = $record['band'];
|
||||
} else {
|
||||
$band = null;
|
||||
}
|
||||
|
||||
|
||||
$this->db->where('COL_CALL', $record['call']);
|
||||
$this->db->where('COL_TIME_ON', $time_on);
|
||||
@ -665,6 +683,8 @@ class Logbook_model extends CI_Model {
|
||||
'COL_BAND_RX' => 0,
|
||||
'COL_ANT_AZ' => 0,
|
||||
'COL_ANT_EL' => 0,
|
||||
'COL_STX_STRING' => $record['stx'],
|
||||
'COL_SRX_STRING' => $record['srx']
|
||||
);
|
||||
|
||||
$this->add_qso($data);
|
||||
|
@ -95,8 +95,8 @@
|
||||
<td><?php $timestamp = strtotime($row->COL_TIME_ON); echo date('H:i', $timestamp); ?></td>
|
||||
<td><a class="qsobox" href="<?php echo site_url('logbook/view')."/".$row->COL_PRIMARY_KEY; ?>"><?php echo strtoupper($row->COL_CALL); ?></a></td>
|
||||
<td><?php echo $row->COL_MODE; ?></td>
|
||||
<td><?php echo $row->COL_RST_SENT; ?></td>
|
||||
<td><?php echo $row->COL_RST_RCVD; ?></td>
|
||||
<td><?php echo $row->COL_RST_SENT; ?> <?php if ($row->COL_STX_STRING) { ?>(<?php echo $row->COL_STX_STRING;?>)<?php } ?></td>
|
||||
<td><?php echo $row->COL_RST_RCVD; ?> <?php if ($row->COL_SRX_STRING) { ?>(<?php echo $row->COL_SRX_STRING;?>)<?php } ?></td>
|
||||
<?php if($row->COL_SAT_NAME != null) { ?>
|
||||
<td><?php echo $row->COL_SAT_NAME; ?></td>
|
||||
<?php } else { ?>
|
||||
|
@ -49,6 +49,20 @@
|
||||
<td><input type="text" name="rst_recv" value="<?php echo $COL_RST_RCVD; ?>" /></td>
|
||||
</tr>
|
||||
|
||||
<?php if ($COL_STX_STRING) { ?>
|
||||
<tr>
|
||||
<td>TX Serial</td>
|
||||
<td><input type="text" name="stx_string" value="<?php echo $COL_STX_STRING; ?>" /></td>
|
||||
</tr>
|
||||
<?php } ?>
|
||||
|
||||
<?php if ($COL_SRX_STRING) { ?>
|
||||
<tr>
|
||||
<td>RX Serial</td>
|
||||
<td><input type="text" name="srx_string" value="<?php echo $COL_SRX_STRING; ?>" /></td>
|
||||
</tr>
|
||||
<?php } ?>
|
||||
|
||||
<tr>
|
||||
<td>Locator</td>
|
||||
<td><input id="locator" type="text" name="locator" value="<?php echo $COL_GRIDSQUARE; ?>" size="7" /></td>
|
||||
|
@ -103,8 +103,8 @@
|
||||
<td><?php $timestamp = strtotime($row->COL_TIME_ON); echo date('H:i', $timestamp); ?></td>
|
||||
<td><a class="qsobox" href="<?php echo site_url('logbook/view')."/".$row->COL_PRIMARY_KEY; ?>"><?php echo strtoupper($row->COL_CALL); ?></a></td>
|
||||
<td><?php echo $row->COL_MODE; ?></td>
|
||||
<td><?php echo $row->COL_RST_SENT; ?></td>
|
||||
<td><?php echo $row->COL_RST_RCVD; ?></td>
|
||||
<td><?php echo $row->COL_RST_SENT; ?> <?php if ($row->COL_STX_STRING) { ?>(<?php echo $row->COL_STX_STRING;?>)<?php } ?></td>
|
||||
<td><?php echo $row->COL_RST_RCVD; ?> <?php if ($row->COL_SRX_STRING) { ?>(<?php echo $row->COL_SRX_STRING;?>)<?php } ?></td>
|
||||
<?php if($row->COL_SAT_NAME != null) { ?>
|
||||
<td><?php echo $row->COL_SAT_NAME; ?></td>
|
||||
<?php } else { ?>
|
||||
|
@ -77,12 +77,12 @@ margin: 10px 0;
|
||||
|
||||
<tr>
|
||||
<td>RST Sent</td>
|
||||
<td><?php echo $row->COL_RST_SENT; ?></td>
|
||||
<td><?php echo $row->COL_RST_SENT; ?> <?php if ($row->COL_STX_STRING) { ?>(<?php echo $row->COL_STX_STRING;?>)<?php } ?></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>RST Recv</td>
|
||||
<td><?php echo $row->COL_RST_RCVD; ?></td>
|
||||
<td><?php echo $row->COL_RST_RCVD; ?> <?php if ($row->COL_SRX_STRING) { ?>(<?php echo $row->COL_SRX_STRING;?>)<?php } ?></td>
|
||||
</tr>
|
||||
|
||||
<?php if($row->COL_GRIDSQUARE != null) { ?>
|
||||
|
Loading…
Reference in New Issue
Block a user