kopia lustrzana https://github.com/magicbug/Cloudlog
Fetches state from previous QSO. Fixes #854
rodzic
0d2fe0a43b
commit
c35d0d257e
|
@ -130,6 +130,7 @@ class Logbook extends CI_Controller {
|
|||
$return['callsign_qth'] = $this->logbook_model->call_qth($callsign);
|
||||
$return['callsign_iota'] = $this->logbook_model->call_iota($callsign);
|
||||
$return['qsl_manager'] = $this->logbook_model->call_qslvia($callsign);
|
||||
$return['callsign_state'] = $this->logbook_model->call_state($callsign);
|
||||
$return['bearing'] = $this->bearing($return['callsign_qra'], $measurement_base);
|
||||
$return['workedBefore'] = $this->worked_grid_before($return['callsign_qra'], $type, $band, $mode);
|
||||
|
||||
|
|
|
@ -661,6 +661,26 @@ class Logbook_model extends CI_Model {
|
|||
return $qsl_via;
|
||||
}
|
||||
|
||||
function call_state($callsign) {
|
||||
$this->db->select('COL_CALL, COL_STATE');
|
||||
$this->db->where('COL_CALL', $callsign);
|
||||
$where = "COL_NAME != \"\"";
|
||||
|
||||
$this->db->where($where);
|
||||
|
||||
$this->db->order_by("COL_TIME_ON", "desc");
|
||||
$this->db->limit(1);
|
||||
$query = $this->db->get($this->config->item('table_name'));
|
||||
$name = "";
|
||||
if ($query->num_rows() > 0)
|
||||
{
|
||||
$data = $query->row();
|
||||
$qsl_state = $data->COL_STATE;
|
||||
}
|
||||
|
||||
return $qsl_state;
|
||||
}
|
||||
|
||||
function call_qth($callsign) {
|
||||
$this->db->select('COL_CALL, COL_QTH, COL_TIME_ON');
|
||||
$this->db->where('COL_CALL', $callsign);
|
||||
|
|
Ładowanie…
Reference in New Issue