diff --git a/application/models/Setup_model.php b/application/models/Setup_model.php new file mode 100644 index 00000000..79f3319e --- /dev/null +++ b/application/models/Setup_model.php @@ -0,0 +1,35 @@ +db->query($sql); + + $result = $query->result(); + + return count($result); + } + + function getLogbookCount() { + $userid = xss_clean($this->session->userdata('user_id')); + $sql = 'select count(*) from station_logbooks where user_id =' . $userid; + $query = $this->db->query($sql); + + $result = $query->result(); + + return count($result); + } + + function getLocationCount() { + $userid = xss_clean($this->session->userdata('user_id')); + $sql = 'select count(*) from station_profile where user_id =' . $userid; + $query = $this->db->query($sql); + + $result = $query->result(); + + return count($result); + } +} + +?> diff --git a/application/views/dashboard/index.php b/application/views/dashboard/index.php index 38ad16c9..acb196a9 100644 --- a/application/views/dashboard/index.php +++ b/application/views/dashboard/index.php @@ -48,7 +48,31 @@ function echoQrbCalcLink($mygrid, $grid, $vucc) { ?>
config->item('use_auth') && ($this->session->userdata('user_type') >= 2)) || $this->config->item('use_auth') === FALSE) { ?> - + + + + + + + + + + + + + + + + + optionslib->get_option('dashboard_banner') != "false") { ?> = 1) { ?>