load->view('layout/header', $data);
$this->load->view('radio/index');
$this->load->view('layout/footer');
}
function status() {
$this->load->model('cat');
$query = $this->cat->status();
if ($query->num_rows() > 0)
{
echo "
";
echo "| Radio | ";
echo "Frequency | ";
echo "Mode | ";
echo "Timestamp | " ;
echo "
";
foreach ($query->result() as $row)
{
echo "";
echo "| ".$row->radio." | ";
echo "".$row->frequency." | ";
echo "".$row->mode." | ";
echo "".$row->timestamp." | " ;
echo "
";
}
} else {
echo "";
echo "| No CAT Interfaced radios found. | ";
echo "
";
}
}
function frequency($id) {
//$this->db->where('radio', $result['radio']);
$this->db->select('frequency');
$this->db->where('id', $id);
$query = $this->db->get('cat');
if ($query->num_rows() > 0)
{
foreach ($query->result() as $row)
{
echo $row->frequency;
}
}
}
function mode($id) {
//$this->db->where('radio', $result['radio']);
$this->db->select('mode');
$this->db->where('id', $id);
$query = $this->db->get('cat');
if ($query->num_rows() > 0)
{
foreach ($query->result() as $row)
{
echo strtoupper($row->mode);
}
}
}
}
?>