/** * OpenNeMas project * * LICENSE * * This source file is subject to the new BSD license that is bundled * with this package in the file LICENSE.txt. * It is also available through the world-wide-web at this URL: * http://framework.zend.com/license/new-bsd * If you did not receive a copy of the license and are unable to * obtain it through the world-wide-web, please send an email * to license@zend.com so we can send you a copy immediately. * * @category Gestion de Calendarios * @package OpenNeMas * @copyright Copyright (c) 2009 Openhost S.L. (http://openhost.es) * @license * */ function get_sections(){ $ccm = ContentCategoryManager::get_instance(); return $ccm->categories; } function get_sections_basic(){ /* $sections=get_sections(); foreach($sections as $section){ if(!empty($section->pk_content_category) && !empty($section->title)) $categorys[$section->pk_content_category] = $section->title; } return $categorys; */ //Use curl $categorys[21] = 'Crónicas de la Emigración'; $categorys[22] = 'Galicia en el Mundo'; $categorys[28] = 'Canarias en el Mundo'; $categorys[24] = 'Asturias en el Mundo'; $categorys[23] = 'Castilla y León en el Mundo'; $categorys[27] = 'Cantabria en el Mundo'; $categorys[25] = 'Madrid en el Mundo'; $categorys[29] = 'Baleares en el Mundo'; $categorys[26] = 'Andalucía en el Mundo'; $categorys[30] = 'País Vasco en el Mundo'; return $categorys; } function list_articles(){ // Agrupa los artículos por categoría y controla si están publicados $cm=new ContentManager(); $articles = $cm->find('Article', 'content_status=1 AND frontpage=1', 'ORDER BY position ASC, archive DESC '); $articles_agrupados = $cm->sortGroupedArticles($articles); return $articles_agrupados; } function print_list_articles(){ /* $articles_agrupados=list_articles(); $html= '