Beispiel #1
0
             break 1;
         } else {
             $notify->add($lang->get('mod_name'), $lang->get('add_successfull'));
             $smarty->assign('path', $template_dir . '/poll.view.tpl');
             $_GET['mode'] = 'default';
         }
     }
     //
     //Archiv
     //
 //
 //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'));