Пример #1
0
                    }
                    $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);
    }
    $appServer->execute();
    if (isset($dbConnect['debug']) and $dbConnect['debug'] == 1) {
        print_r($appServer->debug());
    }
}
Пример #2
0
                 }
                 if ($query->rowCount() > 0) {
                     $appServer = new AppServer($rootID);
                     $appServer->getAppServerDetails($id);
                     if ($ui->st('d', 'get') == 'rs') {
                         $appServer->startApp();
                         $template_file = $sprache->serverrestart;
                         $loguseraction = '%start% %gserver% ' . $gsip . ':' . $port;
                     } else {
                         if ($ui->st('d', 'get') == 'st') {
                             $appServer->stopApp();
                             $template_file = $sprache->serverstop;
                             $loguseraction = '%stop% %gserver% ' . $gsip . ':' . $port;
                         }
                     }
                     $return = $appServer->execute();
                     if (isset($dbConnect['debug']) and $dbConnect['debug'] == 1) {
                         $template_file .= '<br><pre>' . implode("\r\n", $appServer->debug()) . '</pre>';
                     }
                     $insertlog->execute();
                 } else {
                     $template_file = 'admin_404.tpl';
                 }
                 // List the available entries
             } else {
                 configureDateTables('-1, -2', '0, "asc"', 'ajax.php?w=datatable&d=gameserver');
                 $template_file = 'admin_gserver_list.tpl';
             }
         }
     }
 }