id = $id; $this->requires_js = array(); $this->requires_js[] = "include/javascript/d3.3.5.14.js"; $this->requires_js[] = "include/javascript/map/MapController.js"; $this->requires_js[] = "include/javascript/jquery.tooltipster.js"; $this->requires_js[] = "include/javascript/jquery.svg.js"; $this->requires_js[] = "include/javascript/jquery.svgdom.js"; if (!$this->loadDB()) { $this->status = STATUS_ERROR; } } protected function processDBValues($dbValues) { $this->type = (int)$dbValues['type']; $this->subtype = (int)$dbValues['subtype']; $this->id_group = (int)$dbValues['id_group']; $this->generation_method = (int)$dbValues['generation_method']; $this->width = (int)$dbValues['width']; $this->height = (int)$dbValues['height']; } private function loadDB() { $row = db_get_row_filter('tmap', array('id' => $this->id)); if (empty($row)) return false; switch (get_class($this)) { case 'Networkmap': Networkmap::processDBValues($row); break; case 'NetworkmapEnterprise': NetworkmapEnterprise::processDBValues($row); break; default: $this->processDBValues($row); break; } } abstract function printJSInit(); public function writeJSGraph() { ?> " . "\n"; echo "" . "\n"; echo "" . "\n"; echo "" . "\n"; echo "" . "\n"; foreach ($this->requires_js as $js) { echo "" . "\n"; } $this->writeJSContants(); $this->writeJSGraph(); ?>
H
width == 0) { $width = "100%"; } else { $width = $this->width . "px"; } if ($this->height == 0) { $height = "500px"; } else { $height = $this->height . "px"; } ?>
printJSInit(); } public function writeJSContants() { $contants = array(); $contants["ITEM_TYPE_AGENT_NETWORKMAP"] = ITEM_TYPE_AGENT_NETWORKMAP; $contants["ITEM_TYPE_MODULE_NETWORKMAP"] = ITEM_TYPE_MODULE_NETWORKMAP; $contants["ITEM_TYPE_EDGE_NETWORKMAP"] = ITEM_TYPE_EDGE_NETWORKMAP; ?> type; } } ?>