示例#1
0
 //
 //Archiv
 //
 case 'archiv':
     $breadcrumbs->addElement($lang->get('archiv'), makeURL($mod, array('mode' => 'archiv')));
     $countpolls = $poll->countPolls();
     if ($countpolls > 0) {
         if (isset($_POST['inactive'])) {
             if ($poll->existsPoll($_POST['inactive'])) {
                 $inactive = $poll->switchActive($_POST['inactive']);
             }
         }
         $pageat = isset($_GET['page']) && (int) $_GET['page'] > 0 && (int) $_GET['page'] <= ceil($countpolls / $pollsperpage) ? (int) $_GET['page'] : 1;
         $pages->setValues($pageat, $pollsperpage, $countpolls);
         $smarty->assign('pages', $pages->get("poll", array('mode' => 'archiv')));
         $smarty->assign('polls', $poll->getPolls(($pageat - 1) * $pollsperpage, $pollsperpage));
     } else {
         $smarty->assign('no_poll', $lang->get('no_poll'));
     }
     $smarty->assign('comments', $lang->get('comment_count'));
     $smarty->assign('number_of_voters', $lang->get('number_of_voters'));
     $smarty->assign('headline', $lang->get('archiv'));
     $smarty->assign('inactive', $lang->get('submit_inactive'));
     $smarty->assign('active', $lang->get('submit_active'));
     $smarty->assign('edit', makeURL('poll', array('mode' => 'edit')));
     $smarty->assign('submit_edit', $lang->get('edit'));
     $smarty->assign('delete', makeURL('poll', array('mode' => 'delete')));
     $smarty->assign('submit_delete', $lang->get('submit_delete'));
     $smarty->assign('main_layout', $config->get('poll', 'main-layout'));
     $smarty->assign('path', $template_dir . '/poll.view.tpl');
     break 1;