Browse Source

working on world select

master
poikilos 9 years ago
committed by Jacob Gustafson
parent
commit
69ef8b4d94
  1. 1
      web/chunkymap.php
  2. 30
      web/viewchunkymap.php

1
web/chunkymap.php

@ -1482,6 +1482,7 @@ function echo_chunkymap_canvas($show_player_names_enable, $decachunks_enable, $c
else { //not isset($world_name) else { //not isset($world_name)
echo "<h4>Choose world:</h4>"; echo "<h4>Choose world:</h4>";
echo "<ul>"; echo "<ul>";
global $chunkymapdata_worlds_path;
if ($chunkymapdata_handle = opendir($chunkymapdata_worlds_path)) { if ($chunkymapdata_handle = opendir($chunkymapdata_worlds_path)) {
$append_vars="&"; $append_vars="&";
if (isset($zoom)) { if (isset($zoom)) {

30
web/viewchunkymap.php

@ -53,21 +53,21 @@ if (is_file('chunkymap.php')) {
if (isset($zoom)) { if (isset($zoom)) {
$append_vars.="&zoom=$zoom"; $append_vars.="&zoom=$zoom";
} }
if (!isset($world_name)) { // if (!isset($world_name)) {
if ($handle = opendir($chunkymapdata_worlds_path)) { // if ($handle = opendir($chunkymapdata_worlds_path)) {
while (false !== ($file_name = readdir($handle))) { // while (false !== ($file_name = readdir($handle))) {
if (substr($file_name, 0, 1) != ".") { // if (substr($file_name, 0, 1) != ".") {
$file_path = $chunkymapdata_worlds_path."/".$file_name; // $file_path = $chunkymapdata_worlds_path."/".$file_name;
if (is_dir($file_path)) { // if (is_dir($file_path)) {
echo "<a href=\"?world_name=$file_name$append_vars\">$file_name</a>"; // echo "<a href=\"?world_name=$file_name$append_vars\">$file_name</a>";
// $world_name=$file_name; // //$world_name=$file_name;
// break; // //break;
} // }
} // }
} // }
closedir($handle); // closedir($handle);
} // }
} // }
echo_chunkymap_canvas($show_player_names_enable,$decachunks_enable,$chunks_enable,$visual_debug_enable,$html4_mode_enable); echo_chunkymap_canvas($show_player_names_enable,$decachunks_enable,$chunks_enable,$visual_debug_enable,$html4_mode_enable);
//echo_chunkymap_as_chunk_table(false); //echo_chunkymap_as_chunk_table(false);
//echo_decachunk_table(); //echo_decachunk_table();

Loading…
Cancel
Save