<?php
	
	lt_include( PLOG_CLASS_PATH."class/view/admin/adminplugintemplatedview.class.php" );

	class AdminPollSettingsView extends AdminPluginTemplatedView
	{

		function AdminPollSettingsView( $blogInfo )
		{
			$this->AdminPluginTemplatedView( $blogInfo, "crystalpoll", "pollsettings" );
		}
		
		function render()
		{
		    lt_include( PLOG_CLASS_PATH."plugins/crystalpoll/class/dao/polls.class.php" );
		    
		    include PLOG_CLASS_PATH."plugins/crystalpoll/class/styles/pollstyles.properties.php";
		    $polls = new Polls();
		    $this->setValue( 'polls', $polls->getBlogPolls( $this->_blogInfo->getId() ));
		    $this->setValue( 'poll2dstyles', $poll2dStyle );
		    $this->setValue( 'poll3dstyles', $poll3dStyle );
		    
		    $pollSettings = $polls->getPollsSettings( $this->_blogInfo->getId() );
		    if( $pollSettings ) {
		        $this->setValue( 'selectedPoll', $pollSettings['selected_poll'] );
		        $this->setValue( 'styleId', $pollSettings['poll_style'] );
		    }
		    
			parent::render();
		}
	}
?>