Beispiel #1
0
     } elseif (isset($_POST['type'])) {
         $type = $_POST['type'];
     } else {
         // TODO
         exit(100);
     }
     if (isset($_GET['port'])) {
         $port = $_GET['port'];
     } elseif (isset($_POST['port'])) {
         $port = $_POST['port'];
     } else {
         // TODO
         exit(100);
     }
     $os = new os($osId);
     $dbInstanceM = new dbInstanceManager($osId);
     if ($dbInstanceM->getId($name) == 0) {
         $dbInstanceM->create($name, $type, '', $port, '');
     }
     // TODO - add result
     echo '<script>location.reload();</script>';
     break;
 case 'dbInstanceCreateForm':
     if (isset($_GET['osId'])) {
         $osId = $_GET['osId'];
     } elseif (isset($_POST['osId'])) {
         $osId = $_POST['osId'];
     } else {
         // TODO
         exit(100);
     }
 $server = new server($dev->id);
 $osM = new osManager($dev->id);
 $osItemCount = 0;
 while (is_object($osItems = $item->getElementsByTagName("OSES")->item($osItemCount))) {
     foreach ($osItems->childNodes as $osItem) {
         $osType = $osItem->getElementsByTagName("TYPE")->item(0)->nodeValue;
         $osPort = $osItem->getElementsByTagName("PORT")->item(0)->nodeValue;
         if ($osM->getId($osType, $osPort) == 0) {
             $osM->create($osType, $osPort);
         }
         $os = new os($osM->getId($osType, $osPort));
         $cpuM = new cpuManager($os->id);
         $diskM = new diskManager($os->id);
         $fsM = new fsManager($os->id);
         $serviceM = new serviceManager($os->id);
         $dbInstanceM = new dbInstanceManager($os->id);
         if (isset($osItem->getElementsByTagName("NAME")->item(0)->nodeValue)) {
             $osName = $osItem->getElementsByTagName("NAME")->item(0)->nodeValue;
         } else {
             $osName = '';
         }
         if (isset($osItem->getElementsByTagName("VERSION")->item(0)->nodeValue)) {
             $osVersion = $osItem->getElementsByTagName("VERSION")->item(0)->nodeValue;
         } else {
             $osVersion = '';
         }
         if (isset($osItem->getElementsByTagName("ARCHITECTURE")->item(0)->nodeValue)) {
             $osArch = $osItem->getElementsByTagName("ARCHITECTURE")->item(0)->nodeValue;
         } else {
             $osArch = '';
         }