Location: PHPKode > projects > Content*Builder > modules/poll/poll.php
<?php
	include( $path["cb"].$cbDirLib."patPolls.php" );
	include( $path["cb"].$cbDirLib."patPollsCommon.php" );
	include( $path["cb"].$cbDirLib."patPollsRenderer.php" );
	include( $path["cb"].$cbDirLib."patPollsBarRenderer.php" );
	$mypoll	=	&new	patPolls( "mypoll", TABLE );
	
	include_once( $path["cb"].$cbDirLib."CB_ip.class.php" );
	$ipObject = &new CB_ip();
	
	// Module String for ip_table
	$ipObject->setModule("poll");
	// Time Difference of 10 minutes in seconds
	$ipObject->setTimeDifference("600");
	// Activate IP Lock
	$mypoll->ipLockStatus     = true;
	$mypoll->setIPObject($ipObject);
	
	$mypoll->setTemplate( $tpl );
	$mypoll->setOption("selectionMode", patPOLLS_RANDOM);
	
	$myrenderer	=	new patPollsBarRenderer;
	$myrenderer->setOption("maxWidth", "50");
	$mypoll->setRenderer( $myrenderer );

	$mypoll->getPollContent();
	echo $mypoll->displayPollContent();
	

?>
Return current item: Content*Builder