Confused? Click here to get started

"; } else { echo '
'; } # Push an image if we've got one of those if (file_exists("packs/$pack/icon.png")) { echo ""; } # Get the pack description $desc = "

$pack

A modpack.

"; $descfile = "packs/$pack/desc.html"; if (file_exists($descfile)) { $desc = file_get_contents($descfile); } echo "$desc"; # A small button to browse previous world downloads if (file_exists("../files/packs/$pack/worlds")) { echo "

Browse world backups

"; } # And a bright big download button echo "Download"; echo '
'; } # Get list of modpacks $dir = new DirectoryIterator("packs"); $packs = array(); foreach ($dir as $fileinfo) { if (!$fileinfo->isDot() && $fileinfo->isDir()) { array_push($packs, $fileinfo->getFilename()); } } # Parse through and provide their information if (!empty($packs)) { echo '
'; # If we have a current pack, print that upfront if (file_exists("packs/current") && readlink("packs/current")) { # We have a valid current pack, remove it from the list and print it upfront $currentpack = readlink("packs/current"); $packs = array_diff($packs, ["$currentpack", "current"]); echo '

Current Modpack

'; echo_pack($currentpack); # If there's a server IP name along with that, print that out too if (file_exists("packs/currentip")) { $ip = file_get_contents("packs/currentip"); echo "

$ip

"; } echo '
'; } # Sort the list of remaining packs sort($packs); # Print the rest of them echo '

Modpacks

'; foreach ($packs as $pack) { echo_pack($pack); } echo '
'; } ?>