kopia lustrzana https://github.com/magicbug/Cloudlog
[Quick lookup] Adapted for selectable bands
rodzic
0ecc5de833
commit
39536c98e9
|
@ -36,7 +36,7 @@ class Lookup extends CI_Controller {
|
|||
$this->load->model('lookup_model');
|
||||
$this->load->model('bands');
|
||||
|
||||
$data['bands'] = $this->bands->get_worked_bands('dxcc');
|
||||
$data['bands'] = $this->bands->get_worked_bands(xss_clean($this->input->post('type')));
|
||||
|
||||
$data['type'] = xss_clean($this->input->post('type'));
|
||||
$data['dxcc'] = xss_clean($this->input->post('dxcc'));
|
||||
|
|
|
@ -52,8 +52,8 @@ class Lookup_model extends CI_Model{
|
|||
switch ($queryinfo['type']) {
|
||||
case 'dxcc': $sqlquerytypestring .= " and col_dxcc = " . $queryinfo['dxcc']; break;
|
||||
case 'iota': $sqlquerytypestring .= " and col_iota = '" . $queryinfo['iota'] . "'"; break;
|
||||
case 'grid': $sqlquerytypestring .= " and (col_gridsquare like '%" . $fixedgrid . "%' or col_vucc_grids like '%" . $fixedgrid . "%')" ; break;
|
||||
case 'cqz': $sqlquerytypestring .= " and col_cqz = " . $queryinfo['cqz']; break;
|
||||
case 'vucc': $sqlquerytypestring .= " and (col_gridsquare like '%" . $fixedgrid . "%' or col_vucc_grids like '%" . $fixedgrid . "%')" ; break;
|
||||
case 'cq': $sqlquerytypestring .= " and col_cqz = " . $queryinfo['cqz']; break;
|
||||
case 'was': $sqlquerytypestring .= " and col_state = '" . $queryinfo['was'] . "' and COL_DXCC in ('291', '6', '110')";; break;
|
||||
case 'sota': $sqlquerytypestring .= " and col_sota_ref = '" . $queryinfo['sota'] . "'"; break;
|
||||
case 'wwff': $sqlquerytypestring .= " and col_sig = 'WWFF' and col_sig_info = '" . $queryinfo['wwff'] . "'"; break;
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
<form method="post" class="form-inline">
|
||||
<select id="quicklookuptype" name="type" class="form-control custom-select">
|
||||
<option value="cqz">CQ Zone</option>
|
||||
<option value="cq">CQ Zone</option>
|
||||
<option value="dxcc">DXCC</option>
|
||||
<option value="grid">Gridsquare</option>
|
||||
<option value="vucc">Gridsquare</option>
|
||||
<option value="iota">IOTA</option>
|
||||
<option value="sota">SOTA</option>
|
||||
<option value="was">US State</option>
|
||||
|
|
|
@ -17,8 +17,8 @@ foreach ($result as $mode => $value) {
|
|||
switch($type) {
|
||||
case 'dxcc': $linkinfo = '<a href=\'javascript:displayContacts("'.str_replace("&", "%26", $dxcc).'","' . $key . '","' . $mode . '","DXCC2")\'>' . $val . '</a>'; break;
|
||||
case 'iota': $linkinfo = '<a href=\'javascript:displayContacts("'.str_replace("&", "%26", $iota).'","' . $key . '","' . $mode . '","IOTA")\'>' . $val . '</a>'; break;
|
||||
case 'grid': $linkinfo = '<a href=\'javascript:displayContacts("'.str_replace("&", "%26", $grid).'","' . $key . '","' . $mode . '","VUCC")\'>' . $val . '</a>'; break;
|
||||
case 'cqz': $linkinfo = '<a href=\'javascript:displayContacts("'.str_replace("&", "%26", $cqz).'","' . $key . '","' . $mode . '","CQZone")\'>' . $val . '</a>'; break;
|
||||
case 'vucc': $linkinfo = '<a href=\'javascript:displayContacts("'.str_replace("&", "%26", $grid).'","' . $key . '","' . $mode . '","VUCC")\'>' . $val . '</a>'; break;
|
||||
case 'cq': $linkinfo = '<a href=\'javascript:displayContacts("'.str_replace("&", "%26", $cqz).'","' . $key . '","' . $mode . '","CQZone")\'>' . $val . '</a>'; break;
|
||||
case 'was': $linkinfo = '<a href=\'javascript:displayContacts("'.str_replace("&", "%26", $was).'","' . $key . '","' . $mode . '","WAS")\'>' . $val . '</a>'; break;
|
||||
case 'sota': $linkinfo = '<a href=\'javascript:displayContacts("'.str_replace("&", "%26", $sota).'","' . $key . '","' . $mode . '","SOTA")\'>' . $val . '</a>'; break;
|
||||
case 'wwff': $linkinfo = '<a href=\'javascript:displayContacts("'.str_replace("&", "%26", $wwff).'","' . $key . '","' . $mode . '","WWFF")\'>' . $val . '</a>'; break;
|
||||
|
|
|
@ -375,13 +375,13 @@ function spawnLookupModal() {
|
|||
$('#quicklookupcqz').hide();
|
||||
$('#quicklookupwas').hide();
|
||||
$('#quicklookuptext').hide();
|
||||
} else if (type == "grid" || type == "sota" || type == "wwff") {
|
||||
} else if (type == "vucc" || type == "sota" || type == "wwff") {
|
||||
$('#quicklookuptext').show();
|
||||
$('#quicklookupiota').hide();
|
||||
$('#quicklookupdxcc').hide();
|
||||
$('#quicklookupcqz').hide();
|
||||
$('#quicklookupwas').hide();
|
||||
} else if (type == "cqz") {
|
||||
} else if (type == "cq") {
|
||||
$('#quicklookupcqz').show();
|
||||
$('#quicklookupiota').hide();
|
||||
$('#quicklookupdxcc').hide();
|
||||
|
|
Ładowanie…
Reference in New Issue