Posts = $DB->query_fetchDB(" SELECT id, post_title, post_date, post_url FROM ot_posts WHERE post_type = 'post' AND post_status = 'gepubliceerd' ORDER BY post_date DESC LIMIT " . $Limit . " "); if($this->Posts) { return TRUE; } else { return FALSE; } } function post() { $this->PostsCount++; if(isset($this->Posts[$this->PostsCount])) { return TRUE; } else { return FALSE; } } // Load pages in menu function pages($Limit) { global $DB; $this->Pages = $DB->query_fetchDB(" SELECT id, post_title, post_url FROM ot_posts WHERE post_type = 'page' AND post_status = 'gepubliceerd' ORDER BY post_title ASC LIMIT " . $Limit . " "); if($this->Pages) { return TRUE; } else { return FALSE; } } function page() { $this->PagesCount++; if(isset($this->Pages[$this->PagesCount])) { return TRUE; } else { return FALSE; } } // Load categories in menu function categories() { global $DB; $this->Categories = $DB->query_fetchDB(" SELECT c.id, c.category_name, c.category_url, COUNT(p.id) AS category_posts FROM ot_categories AS c INNER JOIN ot_post2category AS p INNER JOIN ot_posts AS t WHERE category_status = 'yes' AND p.category_id = c.id AND t.id = p.post_id AND t.post_status = 'gepubliceerd' GROUP BY c.category_name ASC "); if($this->Categories) { return TRUE; } else { return FALSE; } } function category() { $this->CategoriesCount++; if(isset($this->Categories[$this->CategoriesCount])) { return TRUE; } else { return FALSE; } } // Load links in menu function links() { global $DB; $this->Links = $DB->query_fetchDB(" SELECT id, link_name, link_url FROM ot_links WHERE link_status = 'yes' ORDER BY link_name ASC "); if($this->Links) { return TRUE; } else { return FALSE; } } function link() { $this->LinksCount++; if(isset($this->Links[$this->LinksCount])) { return TRUE; } else { return FALSE; } } } ?>