Location: PHPKode > projects > Content*Builder > contentbuilder/plugins/media_manager/media.inc.php
<?php
	if(!empty($_REQUEST[sub])  && ereg("(^[1-9]?[0-9]*$)", $_REQUEST[sub]))  { $sub = $_REQUEST[sub]; }
		
	if(file_exists($lang_path.$lang_pf."/plugin/media.lang.php")) {
		include($lang_path.$lang_pf."/plugin/media.lang.php");
	} else {
		include($lang_path."en/plugin/media.lang.php");
	}

	$mediaOption = new CBOption();
	$mediaOption->setModule("media");
	$mediaOption->getOptionList();
	
	include($pluginLocation.'/plugin.config');

	$tpl->assign( "SUB", $sub);
	$tpl->assign( "mediaMessages", $media);
	
	$menuSubNav[] = "&sub=1";
	$menuEntry[]  = $media["manageTypes"];
	$menuPrefix[] = '<img src="'.$cbDirGfx.'moarrow.gif" width="8" align="middle" height="11" border="0" alt="arrow">&nbsp;';
	
	$menuSubNav[] = "&sub=2";
	$menuEntry[]  = $media["manageTree"];
	$menuPrefix[] = ' | ';
		
	switch($sub) {
		case "1":
			include($pluginLocation."/mediaTypes.inc.php");
			break;
		
		case "2":
			include($pluginLocation."/mediaTree.inc.php");
			break;
			
		case "3":
			include($pluginLocation."/mediaFiles.inc.php");
			break;
		
		default:
			$sub = 2;
			include($pluginLocation."/mediaTree.inc.php");
			break;
	}
	
	$tpl->assign("plugin_menu_data",
		array ( "PRE"       => $menuPrefix,
				"SUBNAV"    => $menuSubNav,
				"MENUENTRY" => $menuEntry
		)
	);
	
	$tpl->assign("pluginContent", $mainPluginContent);
	$tpl->assign("messageContent", $mainMessageContent);
	$tpl->display($config['templates']."plugin.template");
?>
Return current item: Content*Builder