unnamed file

PHP

Keine Beschreibung eingegeben.

Guest

Download Edit

$neededslots = 60;
$ramneeded = 100 * $neededslots;
echo \"$ramneeded<br>\";
$stmt = $dbc->prepare (\"SELECT * FROM hosts\");
$stmt->execute ();
$x = 0;
while ($row = $stmt->fetch ()) {
$ramfree = $row[\'ram\'] - 100 *
array_sum (explode (\'|\', $row[\'slots\']));
if ($ramfree > $ramneeded)
{
echo \'This Server will be used: \' . $row[\'ID\'] . \'<br>\' .
\"It has $ramfree free and will have \" .
($ramfree - $ramneeded) . \' free<br>\';
$x = 1;
break;
}
echo $ramfree;
}
echo \'Erfolgreich? \'.($x?\'Ja, bitte hier installieren\':\'Nein, kein RAM mehr da...\');