mirror of
https://github.com/magicbug/Cloudlog
synced 2024-11-22 00:07:14 +00:00
Add functions for secondary subdivisions
This commit is contained in:
parent
0fe31f2c23
commit
6d647fe736
@ -717,6 +717,7 @@ class Logbook extends CI_Controller {
|
||||
$this->load->model('Qsl_model');
|
||||
$data['qslimages'] = $this->Qsl_model->getQslForQsoId($id);
|
||||
$data['primary_subdivision'] = $this->subdivisions->get_primary_subdivision_name($data['query']->result()[0]->COL_DXCC);
|
||||
$data['secondary_subdivision'] = $this->subdivisions->get_secondary_subdivision_name($data['query']->result()[0]->COL_DXCC);
|
||||
$data['max_upload'] = ini_get('upload_max_filesize');
|
||||
$this->load->view('interface_assets/mini_header', $data);
|
||||
$this->load->view('view_log/qso');
|
||||
|
@ -8,6 +8,7 @@
|
||||
class Subdivisions {
|
||||
|
||||
public function get_primary_subdivision_name($dxcc) {
|
||||
// ref. http://adif.org.uk/314/ADIF_314_annotated.htm#Primary_Administrative_Subdivision
|
||||
switch($dxcc) {
|
||||
case '1':
|
||||
case '29':
|
||||
@ -68,4 +69,28 @@ class Subdivisions {
|
||||
return 'State';
|
||||
}
|
||||
|
||||
public function get_secondary_subdivision_name($dxcc) {
|
||||
// ref. http://adif.org.uk/314/ADIF_314_annotated.htm#Secondary_Administrative_Subdivision
|
||||
switch($dxcc) {
|
||||
case '6':
|
||||
case '110':
|
||||
case '291':
|
||||
return 'US County';
|
||||
case '15':
|
||||
case '54':
|
||||
case '61':
|
||||
case '126':
|
||||
case '151':
|
||||
case '288':
|
||||
return 'District';
|
||||
case '21':
|
||||
case '29':
|
||||
case '32':
|
||||
case '281':
|
||||
return 'DME';
|
||||
case '339':
|
||||
return 'City / Ku / Gun';
|
||||
}
|
||||
return 'County';
|
||||
}
|
||||
}
|
||||
|
@ -167,10 +167,10 @@
|
||||
<?php } ?>
|
||||
|
||||
<?php if($row->COL_CNTY != null && $row->COL_CNTY != ",") { ?>
|
||||
<tr>
|
||||
<td>USA County:</td>
|
||||
<td><?php echo $row->COL_CNTY; ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?php echo $secondary_subdivision ?>:</td>
|
||||
<td><?php echo $row->COL_CNTY; ?></td>
|
||||
</tr>
|
||||
<?php } ?>
|
||||
|
||||
<?php if($row->COL_NAME != null) { ?>
|
||||
|
Loading…
Reference in New Issue
Block a user