예제 #1
0
 function main()
 {
     parent::main();
     //$smarty = $this->smarty;
     // parameters for the list
     // start offset and count (now defaults to 8...)
     $this->smarty->assign('categories_all', entry_categories_get('defs'));
     $this->smarty->assign('saved_flags', entry_flags_get());
     $defcount = 8;
     // <-- no magic numbers! todo: add config option?
     global $fpdb;
     if (!empty($_REQUEST['entry'])) {
         utils_redirect('admin.php?p=entry&action=write&entry=' . $_REQUEST['entry']);
     }
     isset($_REQUEST['m']) ? $params['m'] = $_REQUEST['m'] : null;
     isset($_REQUEST['y']) ? $params['y'] = $_REQUEST['y'] : null;
     // $params['start'] = isset($_REQUEST['start'])? $_REQUEST['start'] : 0;
     $params['count'] = isset($_REQUEST['count']) ? $_REQUEST['count'] : $defcount;
     $params['page'] = isset($_REQUEST['paged']) ? $_REQUEST['paged'] : 1;
     isset($_REQUEST['category']) ? $params['category'] = $_REQUEST['category'] : ($params['category'] = 'all');
     $params['fullparse'] = false;
     $params['comments'] = true;
     $fpdb->query($params);
     return 0;
 }
예제 #2
0
 function _getCatsFlags()
 {
     //$this->smarty->assign('saved_categories', entry_categories_format());
     $this->smarty->assign('saved_flags', entry_flags_get());
 }