$error[] = $sprache->ftp_password; } else { if (!in_array($sprache->ftp_adresse, $error)) { $error[] = $sprache->ftp_adresse; } if (!in_array($sprache->ftp_port, $error)) { $error[] = $sprache->ftp_port; } } } if (count($error) == 0 and isset($rootID)) { $ftpConnectString = $ssl == 'N' ? 'ftp://' : 'ftps://'; $ftpConnectString .= $ftpAddress . ':' . $ftpPort . str_replace(array('//', '///'), '/', '/' . $ftpPath); $appServer = new AppServer($rootID); $appServer->getAppServerDetails($thisID); $appServer->migrateToEasyWi(array('user' => $ftpUser, 'password' => $ftpPassword, 'path' => $ftpPath, 'connectString' => $ftpConnectString), $gameSwitchTemplate, $modFolder); $appServer->execute(); $template_file = $sprache->import_start; if (isset($dbConnect['debug']) and $dbConnect['debug'] == 1) { $template_file .= '<br><pre>' . implode("\r\n", $appServer->debug()) . '</pre>'; } $loguseraction = '%import% %gserver% ' . $address; $insertlog->execute(); } } } if (!isset($template_file) and isset($customer)) { $template_file = 'userpanel_gserver_migration.tpl'; } if (!isset($template_file)) { $template_file = 'userpanel_404.tpl';
foreach ($query4->fetchAll(PDO::FETCH_ASSOC) as $row2) { $internalUserID = $row2['id']; $customer = $row2['cname']; } if (isset($internalUserID) and isset($customer) and isid($internalUserID, 11)) { $passwordGenerate = passwordgenerate(10); $query5->execute(array($passwordGenerate, $aeskey, $internalUserID, $gameRootIPs[$arrayIP]['id'], getParam('ip'), getParam('port'), getParam('port2'), getParam('slots'), $taskset, $core, getParam('protectionMode'), json_encode(array('I' => $row['importID'])), getParam('externalID'), $resellerID)); $switchID = $sql->lastInsertId(); $tickrate = getParam('tickrate') > 0 ? getParam('tickrate') : 66; $startMap = strlen(getParam('startMap')) > 0 ? getParam('startMap') : $defaultMap; $query6->execute(array($tickrate, $startMap, $switchID, $servertypeID, $resellerID)); $query7->execute(array($sql->lastInsertId(), $switchID)); $ftpConnectString = 'ftp://' . str_replace('//', '/', getParam('ip') . ':' . $gameRootIPs[$arrayIP]['ftpPort'] . '/' . getParam('path') . '/' . $servertypeModFolder); $appServer = new AppServer($gameRootIPs[$arrayIP]['id']); $appServer->getAppServerDetails($switchID); $appServer->migrateToEasyWi(array('user' => getParam('ftpUser'), 'password' => getParam('ftpPass'), 'path' => '/' . getParam('path') . '/' . $servertypeModFolder, 'connectString' => $ftpConnectString), getParam('shorten'), $servertypeModFolder); $appServer->execute(); printText('Import Gameserver. Address: ' . getParam('ip') . ':' . getParam('port') . '. And shorten:' . getParam('shorten')); } else { printText('Error: Import skipped since no user with external userID ' . getParam('belongsToID') . ' for gameserver with address: ' . getParam('ip') . ':' . getParam('port') . ' and shorten:' . getParam('shorten')); } } } else { printText('Error: No masterserver with the shorten ' . getParam('shorten') . ' found. Gameserver update skipped for address: ' . getParam('ip') . ':' . getParam('port')); } } else { printText('Error: No game rootserver found with the IP ' . getParam('ip') . '. Gameserver not imported: ' . getParam('ip') . ':' . getParam('port') . ' (' . getParam('shorten') . ')'); } } } if ($left > 0) {