if ($extraData->newActive == 'N') { $appServer->userCud('add', false, true); } $newPort = (isset($extraData->newPort) and strlen($extraData->newPort) > 0) ? $extraData->newPort : $port; $newIP = (isset($extraData->newIP) and strlen($extraData->newIP) > 0) ? $extraData->newIP : $gsIP; 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 {