Clicking on a gridsquare on the gridsquare area when square is 4 char log shows who you worked.
这个提交包含在:
父节点
b1048246b2
当前提交
4cff817526
共有 4 个文件被更改,包括 78 次插入 和 8 次删除
|
|
@ -262,4 +262,20 @@ class Gridsquares extends CI_Controller {
|
||||||
$this->load->view('interface_assets/footer');
|
$this->load->view('interface_assets/footer');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function search_band($band, $gridsquare){
|
||||||
|
$this->load->model('gridsquares_model');
|
||||||
|
header('Content-Type: application/json');
|
||||||
|
$result = $this->gridsquares_model->search_band($band, $gridsquare);
|
||||||
|
|
||||||
|
echo $result;
|
||||||
|
}
|
||||||
|
|
||||||
|
function search_sat($gridsquare){
|
||||||
|
$this->load->model('gridsquares_model');
|
||||||
|
header('Content-Type: application/json');
|
||||||
|
$result = $this->gridsquares_model->search_sat($gridsquare);
|
||||||
|
|
||||||
|
echo $result;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
@ -76,4 +76,34 @@ class Gridsquares_model extends CI_Model {
|
||||||
AND (COL_LOTW_QSL_RCVD = "Y" OR COL_QSL_RCVD = "Y")
|
AND (COL_LOTW_QSL_RCVD = "Y" OR COL_QSL_RCVD = "Y")
|
||||||
');
|
');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function search_band($band, $gridsquare) {
|
||||||
|
$CI =& get_instance();
|
||||||
|
$CI->load->model('Stations');
|
||||||
|
$station_id = $CI->Stations->find_active();
|
||||||
|
|
||||||
|
$result = $this->db->query('SELECT COL_CALL, COL_TIME_ON, COL_BAND, COL_MODE FROM '.$this->config->item('table_name').' WHERE station_id = "'.$station_id.'" AND COL_GRIDSQUARE LIKE "%'.$gridsquare.'%" AND COL_BAND = "'.$band.'"
|
||||||
|
AND COL_PROP_MODE != "SAT"
|
||||||
|
AND COL_PROP_MODE != "INTERNET"
|
||||||
|
AND COL_PROP_MODE != "ECH"
|
||||||
|
AND COL_PROP_MODE != "RPT"
|
||||||
|
AND COL_SAT_NAME = ""
|
||||||
|
');
|
||||||
|
|
||||||
|
//print_r($result);
|
||||||
|
return json_encode($result->result());
|
||||||
|
}
|
||||||
|
|
||||||
|
function search_sat($gridsquare) {
|
||||||
|
$CI =& get_instance();
|
||||||
|
$CI->load->model('Stations');
|
||||||
|
$station_id = $CI->Stations->find_active();
|
||||||
|
|
||||||
|
$result = $this->db->query('SELECT COL_CALL, COL_TIME_ON, COL_BAND, COL_MODE, COL_SAT_NAME FROM '.$this->config->item('table_name').' WHERE station_id = "'.$station_id.'" AND COL_GRIDSQUARE LIKE "%'.$gridsquare.'%"
|
||||||
|
AND COL_PROP_MODE = "SAT"
|
||||||
|
');
|
||||||
|
|
||||||
|
//print_r($result);
|
||||||
|
return json_encode($result->result());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -47,23 +47,16 @@
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
<table class="table table-sm">
|
<table id="grid_results" class="table table-sm">
|
||||||
<thead class="thead-dark">
|
<thead class="thead-dark">
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="col">Date/Time</th>
|
<th scope="col">Date/Time</th>
|
||||||
<th scope="col">Callsign</th>
|
<th scope="col">Callsign</th>
|
||||||
<th scope="col">Mode</th>
|
<th scope="col">Mode</th>
|
||||||
<th scope="col">Band</th>
|
<th scope="col">Band</th>
|
||||||
<th scope="col">Confirmation</th>
|
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr>
|
|
||||||
<th scope="row"></th>
|
|
||||||
<td></td>
|
|
||||||
<td></td>
|
|
||||||
<td></td>
|
|
||||||
</tr>
|
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -889,7 +889,38 @@ $(document).ready(function(){
|
||||||
var loc_4char = locator.substring(0, 4);
|
var loc_4char = locator.substring(0, 4);
|
||||||
console.log(loc_4char);
|
console.log(loc_4char);
|
||||||
console.log(map.getZoom());
|
console.log(map.getZoom());
|
||||||
|
|
||||||
if(map.getZoom() > 5) {
|
if(map.getZoom() > 5) {
|
||||||
|
var search_type = "<?php echo $this->uri->segment(2); ?>";
|
||||||
|
if(search_type == "satellites") {
|
||||||
|
console.log("satellites search");
|
||||||
|
var search_tags = "search_sat/" + loc_4char;
|
||||||
|
} else {
|
||||||
|
var band = "<?php echo $this->uri->segment(3); ?>";
|
||||||
|
console.log(band);
|
||||||
|
var search_tags = "search_band/" + band + "/" + loc_4char;
|
||||||
|
}
|
||||||
|
|
||||||
|
$.getJSON( "<?php echo site_url('gridsquares/');?>" + search_tags, function( data ) {
|
||||||
|
var items = [];
|
||||||
|
$.each( data, function( i, item ) {
|
||||||
|
console.log(item.COL_CALL + item.COL_SAT_NAME);
|
||||||
|
if(item.COL_SAT_NAME != undefined) {
|
||||||
|
items.push( "<tr><td>" + item.COL_TIME_ON + "</td><td>" + item.COL_CALL + "</td><td>" + item.COL_MODE + "</td><td>" + item.COL_SAT_NAME + "</td></tr>" );
|
||||||
|
} else {
|
||||||
|
items.push( "<tr><td>" + item.COL_TIME_ON + "</td><td>" + item.COL_CALL + "</td><td>" + item.COL_MODE + "</td><td>" + item.COL_BAND + "</td></tr>" );
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
$( "<table>", {
|
||||||
|
"class": "my-new-list",
|
||||||
|
html: items.join( "" )
|
||||||
|
}).appendTo( "body" );
|
||||||
|
|
||||||
|
$("#grid_results tbody").append(items.join( "" ));
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
$('#square_number').text(loc_4char);
|
$('#square_number').text(loc_4char);
|
||||||
$('#exampleModal').modal('show');
|
$('#exampleModal').modal('show');
|
||||||
}
|
}
|
||||||
|
|
|
||||||
正在加载…
在新工单中引用