Location: PHPKode > projects > Content*Builder > contentbuilder/plugins/poll/poll.inc.php
<?php
	include($pluginLocation.'/plugin.config');

	if(file_exists($lang_path.$lang_pf."/plugin/poll.lang.php")) {
		include($lang_path.$lang_pf."/plugin/poll.lang.php");
	} else {
		include($lang_path."en/plugin/poll.lang.php");
	}

	$tpl->assign("pollMessages", $poll);
	
	$messageList = array();
	$errorList   = array();
	
	if(!(ADMIN & $cbPerms)) {
		$errorList[] = $error_msg["permission-denied"];
	} else {

		$menuSubNav[] = "";
		$menuEntry[]  = $poll["overview"];
		$menuPrefix[] = '<img src="'.$cbDirGfx.'moarrow.gif" width="8" align="middle" height="11" border="0" alt="arrow">&nbsp;';
		
		$menuSubNav[] = "&sub=1";
		$menuEntry[]  = $poll["addPoll"];
		$menuPrefix[] = '&nbsp;|&nbsp;';
		
		switch($sub) {
			case "1":
				include($pluginLocation."/pollAdd.inc.php");
				break;
				
			case "2":
				include($pluginLocation."/pollAdd.inc.php");
				break;
				
			case "3":
				include($pluginLocation."/pollAddOption.inc.php");
				break;
				
			default:
				include($pluginLocation."/pollOverview.inc.php");
				break;
		}
		
		$tpl->assign("plugin_menu_data",
			array ( "PRE"       => $menuPrefix,
					"SUBNAV"    => $menuSubNav,
					"MENUENTRY" => $menuEntry
			)
		);
		
		$tpl->assign("pluginContent", $mainPluginContent);
	}
	
	if(count($messageList) > 0) {
		$tpl->assign("messageSet", "1");
		$tpl->assign("messageList", $messageList);
	}
	
	if(count($errorList) > 0) {
		$tpl->assign("errorSet", "1");
		$tpl->assign("errorList", $errorList);
	}
	
	$tpl->assign("messageContent", $mainMessageContent);
	$tpl->display($config['templates']."plugin.template");
?>
Return current item: Content*Builder