<?php
/**
 *	Generated by miceCMS
 *	http://www.miceCMS.com/
 */
class poll_index2Action extends security_login {
	function action(){
		ModuleLimit(__CLASS__);
		global $conn;
		if($this->_getParam('pollcategory_id'))
		{
			$pollcategory_id=$this->_getParam('pollcategory_id');
			$miceSession = new session();
			$miceSession->set('pollcategory_id',$pollcategory_id);
		}else{
			$miceSession = new session();
			$pollcategory_id=$miceSession->get('pollcategory_id');
		}
		$poll=new model_Poll();
		$poll->setSubsection('WHERE pollcategory_id='.$pollcategory_id.' ORDER BY orderid DESC');
		$results=$poll->doSelect();

		

		$smarty = new Smarty();
		$smarty->load_filter('pre','micePreCompileAdmin');
		$smarty->assign('results',$results);
		$smarty->assign('index',MICE_URL.'admin.php/poll/index2');
		$smarty->assign('create',MICE_URL.'admin.php/poll/edit2');
		$smarty->assign('edit',MICE_URL.'admin.php/poll/edit2/poll_id/');
		$smarty->assign('delete',MICE_URL.'admin.php/poll/delete2/poll_id/');
		$filename = new getTPLFileName(__CLASS__);
		$smarty->display($filename->TPLFileName);
	}
}
?>