Smarty
[ class tree: Smarty ] [ index: Smarty ] [ all elements ]

Source for file function.poll.php

Documentation is available at function.poll.php

  1. <?php
  2. /**
  3.  * Smarty plugin
  4.  * @package Smarty
  5.  * @subpackage plugins
  6.  */
  7.  
  8. /**
  9.  * smarty_function_base
  10.  */
  11. require_onceKERNEL_PKG_PATH.'BitBase.php' );
  12.  
  13. /**
  14.  * smarty_function_poll
  15.  */
  16. function smarty_function_poll($params&$gBitSmarty{
  17.     global $polllib$gBitSystem;
  18.  
  19.     extract($params);
  20.     // Param = zone
  21.     include_oncePOLLS_PKG_PATH.'poll_lib.php' );
  22.     include_onceLIBERTY_PKG_PATH.'LibertyComment.php' );
  23.  
  24.     if (empty($id)) {
  25.       $id $polllib->get_random_active_poll();
  26.     }
  27.     if($id{
  28.       $menu_info $polllib->get_poll($id);
  29.       $channels $polllib->list_poll_options($id,0,-1,'option_id_asc','');
  30.             if ($gBitSystem->getConfig('feature_poll_comments'== 'y'{
  31.                 $comments new LibertyComment();
  32.                 $comments_count $comments->count_comments("poll:".$menu_info["poll_id"]);
  33.             }
  34.             $gBitSmarty->assign('comments'$comments_count);
  35.       $gBitSmarty->assign('ownurl',POLLS_PKG_URL.'results.php?poll_id='.$id);
  36.       $gBitSmarty->assign('menu_info',$menu_info);
  37.       $gBitSmarty->assign('channels',$channels["data"]);
  38.       $gBitSmarty->display('bitpackage:polls/poll.tpl');
  39.     }
  40. }
  41.  
  42. /* vim: set expandtab: */
  43.  
  44. ?>

Documentation generated on Wed, 29 Jul 2015 13:56:39 +0000 by phpDocumentor 1.5.0-lsces