Location: PHPKode > projects > Monyet > controllers/managenetworkmap.php
<?php
//collaboration from netmap net, netmap agent, and netmap relation
//FIXME: still using static value for limit and offset and bypass class authorization permission
class ManageNetworkMap extends ControllerBase{

	private $agent;
	private $netmap_net;
	private $netmap_agent;
	private $netmap_rel;
	
	public function __construct(){
		parent::__construct();
		$this->netmap_agent = new NetMapAgent();
		$this->agent = new Agent();
		$this->netmap_rel = new NetRelation;
		$this->netmap_net = new NetMapNet();
	}

	public function index(){
		$table = '<table><tr><td valign="top"><div id="lefttable"></div></td><td width="20"></td><td valign="top"><div id="centertable">
				  </div></td></tr><tr><td valign="top"><div id="righttable"></div></td><td colspan="2"></td></tr></table>';	
		$this->xml->addText($table,'rightcontent',0);
		$array_column = array("Agents","Axis","Ordinat");	  
		$this->xml->addTable($this->netmap_agent->select(0,200),
				  $array_column,'Table Map Network for Agent','networkmapagent',0,'lefttable',0);
		//table for network
		$array_column = array("Net Name","Axis","Ordinat");	  
		$this->xml->addTable($this->netmap_net->select(0,200),
				  $array_column,'Net Definition','networkmapnet',0,'righttable',0);
		$this->xml->addBreak('rightcontent',2);

		$array_column = array("Agents","Net Name","Ping Monitoring");	  
		$this->xml->addTable($this->netmap_rel->select(0,200),
				  $array_column,'Table Map Network Relation','managenetrelation',0,'centertable',0);
		
		//get map from networkmap;
		$controller = new SystemStat();
		$plotter = $controller->getMap();	
		$this->xml->addGraph($plotter->attach(),'rightcontent',1);	
		$this->xml->buildSubMenu($this->navigator->getSubMenu($this));
		$this->xml->flush();
	}

}

?>
Return current item: Monyet