mirror of
https://github.com/wavelog/wavelog.git
synced 2026-03-22 10:24:14 +00:00
[Awards WAS] Added mode filtering.
This commit is contained in:
@@ -87,14 +87,14 @@ class was extends CI_Model {
|
||||
if ($postdata['worked'] != NULL) {
|
||||
$wasBand = $this->getWasWorked($station_id, $band, $postdata);
|
||||
foreach ($wasBand as $line) {
|
||||
$bandWas[$line->col_state][$band] = '<div class="alert-danger"><a href=\'javascript:displayContacts("' . $line->col_state . '","' . $band . '","All","WAS")\'>W</a></div>';
|
||||
$bandWas[$line->col_state][$band] = '<div class="alert-danger"><a href=\'javascript:displayContacts("' . $line->col_state . '","' . $band . '","'. $postdata['mode'] . '","WAS")\'>W</a></div>';
|
||||
$states[$line->col_state]['count']++;
|
||||
}
|
||||
}
|
||||
if ($postdata['confirmed'] != NULL) {
|
||||
$wasBand = $this->getWasConfirmed($station_id, $band, $postdata);
|
||||
foreach ($wasBand as $line) {
|
||||
$bandWas[$line->col_state][$band] = '<div class="alert-success"><a href=\'javascript:displayContacts("' . $line->col_state . '","' . $band . '","All","WAS")\'>C</a></div>';
|
||||
$bandWas[$line->col_state][$band] = '<div class="alert-success"><a href=\'javascript:displayContacts("' . $line->col_state . '","' . $band . '","'. $postdata['mode'] . '","WAS")\'>C</a></div>';
|
||||
$states[$line->col_state]['count']++;
|
||||
}
|
||||
}
|
||||
@@ -211,6 +211,10 @@ class was extends CI_Model {
|
||||
$sql = "SELECT distinct col_state FROM " . $this->config->item('table_name') . " thcv
|
||||
where station_id = " . $station_id;
|
||||
|
||||
if ($postdata['mode'] != 'All') {
|
||||
$sql .= " and (col_mode = '" . $postdata['mode'] . "' or col_submode = '" . $postdata['mode'] . "')";
|
||||
}
|
||||
|
||||
$sql .= $this->addStateToQuery();
|
||||
|
||||
$sql .= $this->addBandToQuery($band);
|
||||
@@ -219,6 +223,10 @@ class was extends CI_Model {
|
||||
" where station_id = ". $station_id .
|
||||
" and col_state = thcv.col_state";
|
||||
|
||||
if ($postdata['mode'] != 'All') {
|
||||
$sql .= " and (col_mode = '" . $postdata['mode'] . "' or col_submode = '" . $postdata['mode'] . "')";
|
||||
}
|
||||
|
||||
$sql .= $this->addBandToQuery($band);
|
||||
|
||||
$sql .= $this->addQslToQuery($postdata);
|
||||
@@ -240,6 +248,10 @@ class was extends CI_Model {
|
||||
$sql = "SELECT distinct col_state FROM " . $this->config->item('table_name') . " thcv
|
||||
where station_id = " . $station_id;
|
||||
|
||||
if ($postdata['mode'] != 'All') {
|
||||
$sql .= " and (col_mode = '" . $postdata['mode'] . "' or col_submode = '" . $postdata['mode'] . "')";
|
||||
}
|
||||
|
||||
$sql .= $this->addStateToQuery();
|
||||
|
||||
$sql .= $this->addBandToQuery($band);
|
||||
|
||||
Reference in New Issue
Block a user