} else { if ($ui->smallletters('action', 2, 'post') == 'md') { if (!$ftp_adresse) { $errors['ftp_adresse'] = $gameSprache->ftp_adresse; } if (!$ftp_port) { $errors['ftp_port'] = $gameSprache->ftp_port; } if (!$ftp_user) { $errors['ftp_user'] = $gameSprache->ftp_user; } if (!$ftp_password) { $errors['ftp_password'] = $gameSprache->ftp_password; } if (count($errors) == 0) { $checkFtpData = checkFtpData($ftp_adresse, $ftp_port, $ftp_user, $ftp_password); if ($checkFtpData !== true and $checkFtpData == 'login') { $errors['ftp_user'] = $gameSprache->ftp_user; $errors['ftp_password'] = $gameSprache->ftp_password; } else { if ($checkFtpData !== true and $checkFtpData == 'ipport') { $errors['ftp_adresse'] = $gameSprache->ftp_adresse; $errors['ftp_port'] = $gameSprache->ftp_port; } } } if (count($errors) > 0) { unset($header, $text); $template_file = 'userpanel_gserver_fdl_eu.tpl'; } else { if (substr($ftp_path, 0, 1) != '/') {
if ($fail == 0) { if ($ftpupload == 'Y' and isurl($postedftpuploadpath) and $postedftpuploadpath != 'ftp://*****:*****@1.1.1.1/demos') { $split = preg_split('/\\//', $postedftpuploadpath, -1, PREG_SPLIT_NO_EMPTY); $split2 = preg_split('/@/', $split[1], -1, PREG_SPLIT_NO_EMPTY); if (isset($split2[1])) { $ftpipport = $split2[1]; $userpass = explode(':', $split2[0]); $ftpuser = $userpass[0]; $ftppass = isset($userpass[1]) ? $userpass[1] : ''; } else { $ftpipport = $split2[0]; $ftpuser = '******'; $ftppass = ''; } $ftpipport = preg_split('/:/', $ftpipport, -1, PREG_SPLIT_NO_EMPTY); if (checkFtpData($ftpipport[1], isset($ftpipport[1]) ? isset($ftpipport[1]) : 21, $ftpuser, $ftppass) === true) { $ftpuploadpath = $postedftpuploadpath; } } $free = isset($gscounts[$game]) && isset($gsused[$game]) ? $gscounts[$game] - $gsused[$game] : 0; if ($free > 0) { if (isset($switchcount[$game][$game]['freeids']) and count($switchcount[$game][$game]['freeids']) > 0) { $random = array_rand($switchcount[$game][$game]['freeids'], 1); $serverid = $switchcount[$game][$game]['freeids'][$random]; } else { $mostleft = array(); $leftservers = array(); foreach ($switchcount as $key => $arrays) { if (isset($switchcount[$key][$game]['freeids']) and count($switchcount[$key][$game]['freeids']) > 0) { foreach ($switchcount as $leftkey => $leftarrays) { if ($leftkey != $key) {