Esempio n. 1
0
 public function displayMain()
 {
     global $smarty;
     $posts = $this->entity->getThisTags();
     $smarty->assign(array('posts' => CMS::resetCMS($posts['posts']), 'total' => $posts['total']));
     return $smarty->fetch('cms_list.tpl');
 }
Esempio n. 2
0
    public static function getDateCMS($date_query, $p = 1, $m = 50)
    {
        $result = Db::getInstance()->getAll('
				SELECT * FROM `' . DB_PREFIX . 'cms`
				WHERE active = 1
				AND FROM_UNIXTIME(UNIX_TIMESTAMP(add_date),"%Y-%m")="' . pSQL($date_query) . '"
				ORDER BY `add_date` DESC
				LIMIT ' . ($p - 1) . ',' . (int) $m);
        return CMS::resetCMS($result);
    }