Пример #1
0
                     if ($port != $newPort or $gsIP != $newIP) {
                         $query7->execute(array($newIP, $newPort, $row2['affectedID']));
                         $appServer->moveServerLocal($row3['serverip'], $row3['port']);
                     }
                     $command = $gsprache->mod . ' gsswitchID: ' . $row2['affectedID'] . ' name: ' . $row2['name'] . ' gsswitchID:' . $row2['affectedID'];
                 }
                 $query8->execute(array($row2['affectedID']));
                 $query5->execute(array($row2['jobID']));
             } else {
                 if ($row2['action'] == 're') {
                     $appServer->startApp();
                     $query5->execute(array($row2['jobID']));
                     $command = '(Re)Start gsswitchID: ' . $row2['affectedID'] . ' name: ' . $row2['name'];
                 } else {
                     if ($row2['action'] == 'st') {
                         $appServer->stopApp();
                         $query5->execute(array($row2['jobID']));
                         $command = 'Stop gsswitchID: ' . $row2['affectedID'] . ' name: ' . $row2['name'];
                     } else {
                         $query9->execute(array($row2['jobID']));
                         $command = 'Error: unknown command';
                     }
                 }
             }
         }
     } else {
         $query9->execute(array($row2['jobID']));
         $command = 'Error: can not find gsswitchID';
     }
     $theOutput->printGraph($command);
 }