kopia lustrzana https://github.com/magicbug/Cloudlog
Pass error message given by qrz.com to the user
rodzic
ba171a586e
commit
87437ca1fb
|
@ -919,9 +919,14 @@ function worked_grid_before($gridsquare, $type, $band, $mode)
|
|||
}
|
||||
|
||||
$data['callsign'] = $this->qrz->search($id, $this->session->userdata('qrz_session_key'), $this->config->item('use_fullname'));
|
||||
$CI = &get_instance();
|
||||
$CI->load->model('logbook_model');
|
||||
$data['grid_worked'] = $CI->logbook_model->check_if_grid_worked_in_logbook(strtoupper(substr($data['callsign']['gridsquare'],0,4)), 0, $this->session->userdata('user_default_band'));
|
||||
if (isset($data['callsign']['gridsquare'])) {
|
||||
$CI = &get_instance();
|
||||
$CI->load->model('logbook_model');
|
||||
$data['grid_worked'] = $CI->logbook_model->check_if_grid_worked_in_logbook(strtoupper(substr($data['callsign']['gridsquare'],0,4)), 0, $this->session->userdata('user_default_band'));
|
||||
}
|
||||
if (isset($data['callsign']['error'])) {
|
||||
$data['error'] = $data['callsign']['error'];
|
||||
}
|
||||
} /*else {
|
||||
// Lookup using hamli
|
||||
$this->load->library('hamli');
|
||||
|
|
|
@ -71,7 +71,7 @@ class Qrz {
|
|||
|
||||
// Create XML object
|
||||
$xml = simplexml_load_string($xml);
|
||||
if (empty($xml)) return;
|
||||
if (!empty($xml->Session->Error)) return $data['error'] = $xml->Session->Error;
|
||||
|
||||
// Return Required Fields
|
||||
$data['callsign'] = (string)$xml->Callsign->call;
|
||||
|
|
|
@ -3,8 +3,8 @@
|
|||
|
||||
<p>Sorry, but we didn't find any past QSOs with <?php echo $id; ?></p>
|
||||
|
||||
<?php if(isset($callsign['callsign'])) { ?>
|
||||
<h3>Callbook Search for <?php echo $id; ?></h3>
|
||||
<?php if(isset($callsign['callsign'])) { ?>
|
||||
<table>
|
||||
|
||||
<tr>
|
||||
|
@ -37,5 +37,9 @@
|
|||
|
||||
</table>
|
||||
|
||||
<?php } else { ?>
|
||||
|
||||
<p><?php echo $error; ?></p>
|
||||
|
||||
<?php } ?>
|
||||
</div>
|
||||
|
|
Ładowanie…
Reference in New Issue