Basics for public search via slug
这个提交包含在:
父节点
cfbad50638
当前提交
f3ad81fef8
共有 4 个文件被更改,包括 43 次插入 和 2 次删除
|
|
@ -20,6 +20,9 @@ class Visitor extends CI_Controller {
|
||||||
elseif($method == "satellites") {
|
elseif($method == "satellites") {
|
||||||
$this->satellites($method);
|
$this->satellites($method);
|
||||||
}
|
}
|
||||||
|
elseif($method == "search") {
|
||||||
|
$this->search($method);
|
||||||
|
}
|
||||||
else {
|
else {
|
||||||
$this->index($method);
|
$this->index($method);
|
||||||
}
|
}
|
||||||
|
|
@ -452,4 +455,18 @@ class Visitor extends CI_Controller {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function search() {
|
||||||
|
$slug = $this->security->xss_clean($this->uri->segment(3));
|
||||||
|
$data['slug'] = $slug;
|
||||||
|
$callsign = $this->security->xss_clean($this->uri->segment(4));
|
||||||
|
$data['callsign'] = $callsign;
|
||||||
|
$this->search_result($data);
|
||||||
|
}
|
||||||
|
|
||||||
|
private function search_result($data) {
|
||||||
|
echo "TEST".$data['slug']."<br />";
|
||||||
|
echo "CALL".strtoupper($data['callsign']);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -50,7 +50,7 @@ function echoQrbCalcLink($mygrid, $grid, $vucc) {
|
||||||
<!-- Map -->
|
<!-- Map -->
|
||||||
<div id="map" style="width: 100%; height: 350px"></div>
|
<div id="map" style="width: 100%; height: 350px"></div>
|
||||||
|
|
||||||
<div style="padding-top: 0px; margin-top: 5px;" class="container dashboard">
|
<div id="container" style="padding-top: 0px; margin-top: 5px;" class="container dashboard">
|
||||||
|
|
||||||
<!-- Log Data -->
|
<!-- Log Data -->
|
||||||
<div class="row logdata">
|
<div class="row logdata">
|
||||||
|
|
@ -231,3 +231,5 @@ function echoQrbCalcLink($mygrid, $grid, $vucc) {
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div id="partial_view"></div>
|
||||||
|
|
|
||||||
|
|
@ -47,12 +47,25 @@
|
||||||
<?php } else { ?>
|
<?php } else { ?>
|
||||||
var grid = "No";
|
var grid = "No";
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
console.log("lets go");
|
|
||||||
initmap(grid);
|
initmap(grid);
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
<script type="text/javascript">
|
||||||
|
function publicSearchButtonPress(){
|
||||||
|
event.preventDefault()
|
||||||
|
if ($('#callsign').val()) {
|
||||||
|
let fixedcall = $('#callsign').val();
|
||||||
|
$('#map').hide();
|
||||||
|
$('#container').hide();
|
||||||
|
$('#partial_view').load("search/<?php echo $slug ?>/" + fixedcall.replace('Ø', '0'), function() {
|
||||||
|
$('[data-toggle="tooltip"]').tooltip()
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
|
||||||
<?php if ($this->uri->segment(2) == "satellites") { ?>
|
<?php if ($this->uri->segment(2) == "satellites") { ?>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -71,6 +71,15 @@
|
||||||
</li>
|
</li>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
|
<div style="paddling-left: 0.5rem; padding-right: 0.5rem"></div>
|
||||||
|
<?php if($this->optionslib->get_option('global_search') != "false" || $this->session->userdata('user_type') >= 2) { ?>
|
||||||
|
<form method="post" action="" class="form-inline">
|
||||||
|
<input class="form-control mr-sm-2" id="callsign" type="search" name="callsign" placeholder="<?php echo lang('menu_search_text'); ?>" aria-label="Search">
|
||||||
|
|
||||||
|
<button onclick="publicSearchButtonPress()" class="btn btn-outline-success my-2 my-sm-0" type="submit"><i class="fas fa-search"></i> <?php echo lang('menu_search_button'); ?></button>
|
||||||
|
</form>
|
||||||
|
<?php } ?>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</nav>
|
</nav>
|
||||||
|
|
|
||||||
正在加载…
在新工单中引用