2020-08-16 05:25:54 -05:00
|
|
|
<!DOCTYPE html>
|
|
|
|
<html>
|
|
|
|
<head>
|
|
|
|
<?php include $_SERVER['DOCUMENT_ROOT'].'/src/common-meta.php';?>
|
2020-09-27 17:19:17 -05:00
|
|
|
<link href="/styles/buttons.css" type="text/css" rel="stylesheet" />
|
2021-02-08 19:23:47 -06:00
|
|
|
<link href="/minecraft/styles/styles.css" type="text/css" rel="stylesheet" />
|
2020-08-16 05:25:54 -05:00
|
|
|
<link rel="shortcut icon" href="/favicon.ico" />
|
|
|
|
<title>9iron</title>
|
|
|
|
</head>
|
|
|
|
<body>
|
|
|
|
<?php include $_SERVER['DOCUMENT_ROOT'].'/src/common-header.php';?>
|
|
|
|
<div class="content">
|
|
|
|
<div class="section">
|
2020-08-16 05:42:54 -05:00
|
|
|
<h1>Modded Minecraft</h1>
|
2020-08-16 05:25:54 -05:00
|
|
|
<p>It's been a go-to of ours for a while. Ongoing and historical modpacks are listed here for your convenience and participation.</p>
|
|
|
|
<p>At-a-glance information is provided here for the various packs we play.</p>
|
2020-09-27 17:19:17 -05:00
|
|
|
<div class="iconbuttoncontainer">
|
|
|
|
<a href="/minecraft/setup" class="iconbutton">
|
|
|
|
<i class="fa fa-play"></i>
|
|
|
|
<h1>Setup</h1>
|
|
|
|
<p>Set up an entire modded Minecraft environment</p>
|
|
|
|
</a>
|
|
|
|
</div>
|
2020-08-16 05:25:54 -05:00
|
|
|
</div>
|
2021-02-08 19:23:47 -06:00
|
|
|
<?php
|
|
|
|
# Define a pack card generator function
|
|
|
|
function echo_pack($pack) {
|
|
|
|
# Add basic coloration to the element, if it exists
|
|
|
|
if (file_exists("packs/$pack/color")) {
|
|
|
|
$color = file_get_contents("packs/$pack/color");
|
|
|
|
echo "<div class=\"modpack\" style=\"background: $color; color: var(--background);\">";
|
|
|
|
} else {
|
|
|
|
echo '<div class="modpack">';
|
|
|
|
}
|
|
|
|
|
|
|
|
# Push an image if we've got one of those
|
|
|
|
if (file_exists("packs/$pack/icon.png")) {
|
|
|
|
echo "<img src=\"/minecraft/packs/$pack/icon.png\" class=\"packicon\"/>";
|
|
|
|
}
|
|
|
|
|
|
|
|
# Get the pack description
|
|
|
|
$desc = "<h2>$pack</h2><p>A modpack.</p>";
|
|
|
|
$descfile = "packs/$pack/desc.html";
|
|
|
|
if (file_exists($descfile)) {
|
|
|
|
$desc = file_get_contents($descfile);
|
|
|
|
}
|
|
|
|
echo "$desc";
|
|
|
|
|
|
|
|
# A small button to browse previous world downloads
|
2021-02-08 19:33:35 -06:00
|
|
|
if (file_exists("../files/packs/$pack/worlds")) {
|
2021-02-08 19:23:47 -06:00
|
|
|
echo "<p><a href=\"/files/packs/$pack/worlds\" class=\"worldsbutton\">Browse world backups</a></p>";
|
|
|
|
}
|
|
|
|
|
|
|
|
# And a bright big download button
|
|
|
|
echo "<a href=\"/files/packs/$pack/latest.zip\" class=\"downloadbutton\">Download</a>";
|
|
|
|
echo '</div>';
|
|
|
|
}
|
|
|
|
# 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 '<div class="section">';
|
|
|
|
# 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 '<h1>Current Modpack</h1>';
|
|
|
|
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 "<p><code class=\"bigcode\">$ip</code></p>";
|
|
|
|
}
|
|
|
|
echo '</div><div class="section">';
|
|
|
|
}
|
|
|
|
# Sort the list of remaining packs
|
|
|
|
sort($packs);
|
|
|
|
# Print the rest of them
|
|
|
|
echo '<h1>Modpacks</h1><div class="packcontainer">';
|
|
|
|
foreach ($packs as $pack) {
|
|
|
|
echo_pack($pack);
|
|
|
|
}
|
|
|
|
echo '</div></div>';
|
|
|
|
}
|
|
|
|
?>
|
2020-08-16 05:25:54 -05:00
|
|
|
</div>
|
|
|
|
<?php include $_SERVER['DOCUMENT_ROOT'].'/src/common-footer.php';?>
|
|
|
|
</body>
|
|
|
|
</html>
|