mirror of
https://github.com/wavelog/wavelog.git
synced 2026-03-22 10:24:14 +00:00
THEME MODE - added themes warning if no mode
This commit is contained in:
@@ -58,6 +58,8 @@ class Dashboard extends CI_Controller {
|
||||
|
||||
$data['current_active'] = $this->stations->find_active();
|
||||
|
||||
$data['themesWithoutMode'] = $this->setup_model->checkThemesWithoutMode();
|
||||
|
||||
$setup_required = false;
|
||||
|
||||
if($setup_required) {
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
class Setup_model extends CI_Model {
|
||||
|
||||
function getCountryCount() {
|
||||
$sql = 'select count(*) as count from dxcc_entities';
|
||||
$sql = 'SELECT count(*) as count FROM dxcc_entities';
|
||||
$query = $this->db->query($sql);
|
||||
|
||||
return $query->row()->count;
|
||||
@@ -11,7 +11,7 @@ class Setup_model extends CI_Model {
|
||||
|
||||
function getLogbookCount() {
|
||||
$userid = xss_clean($this->session->userdata('user_id'));
|
||||
$sql = 'select count(*) as count from station_logbooks where user_id =' . $userid;
|
||||
$sql = 'SELECT count(*) as count FROM station_logbooks WHERE user_id =' . $userid;
|
||||
$query = $this->db->query($sql);
|
||||
|
||||
return $query->row()->count;
|
||||
@@ -19,7 +19,14 @@ class Setup_model extends CI_Model {
|
||||
|
||||
function getLocationCount() {
|
||||
$userid = xss_clean($this->session->userdata('user_id'));
|
||||
$sql = 'select count(*) as count from station_profile where user_id =' . $userid;
|
||||
$sql = 'SELECT count(*) as count FROM station_profile WHERE user_id =' . $userid;
|
||||
$query = $this->db->query($sql);
|
||||
|
||||
return $query->row()->count;
|
||||
}
|
||||
|
||||
function checkThemesWithoutMode() {
|
||||
$sql = "SELECT COUNT(*) AS count FROM themes WHERE theme_mode IS NULL OR theme_mode = ''";
|
||||
$query = $this->db->query($sql);
|
||||
|
||||
return $query->row()->count;
|
||||
|
||||
@@ -93,6 +93,12 @@ function echoQrbCalcLink($mygrid, $grid, $vucc) {
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
||||
<?php if($themesWithoutMode != 0) { ?>
|
||||
<div class="alert alert-danger" role="alert">
|
||||
You have themes without defined theme mode. Please ask the admin to edit the themes.
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
||||
<?php if ($this->session->userdata('user_id')) { ?>
|
||||
<?php
|
||||
$current_date = date('Y-m-d H:i:s');
|
||||
|
||||
Reference in New Issue
Block a user