diff --git a/README.md b/README.md index 81d63b7..aa3bbc6 100644 --- a/README.md +++ b/README.md @@ -26,6 +26,12 @@ To add BIOs for the systems that require it, simply
add the BIOs to a ZIP file and rename it to *console name*.zip.
For example, the gba bios would be kept as /bios/gba.zip
+## Search function and folders + +Now uses folders (nes, sms, snes, gen, gg, vb, gb, gbc, gba, n64, nds, psx) to organize roms into consoles.
+Folders in the 'img', roms' and 'saves' directories need to be named the same. eg. img/nes, roms/nes, saves/nes
+New search function for quickly finding a game in your library.
+ [Badge License]: https://img.shields.io/badge/license-GPL-blue diff --git a/getgames.php b/getgames.php new file mode 100644 index 0000000..4331873 --- /dev/null +++ b/getgames.php @@ -0,0 +1,44 @@ + $console) { + if (stristr($name, $query)) { + $matches[$name] = $console; + } + } +} + +// Output matches with links +foreach ($matches as $name => $console){ + $fileurl = 'play.php?game=/' . urlencode($console) . '/' . urlencode($name); + $output = ""; + if ($dir == ""){ + $output = $output ."".strtoupper($console)."

"; + } + $output = $output . "

  • $name
  • "; + echo($output); +} + +?> diff --git a/index.php b/index.php index 0bbf1ac..4ae00d7 100644 --- a/index.php +++ b/index.php @@ -1,39 +1,72 @@ - EmulatorJS Library - Arcade - - + - +
    - +
    - "); - } else { - echo("

    $file

    "); - } - - } - } - ?> - + + +
    +
    + +
    + + +
    - \ No newline at end of file + diff --git a/navbar.php b/navbar.php new file mode 100644 index 0000000..eb82e72 --- /dev/null +++ b/navbar.php @@ -0,0 +1,14 @@ + \ No newline at end of file diff --git a/play.php b/play.php index eb839ea..4284bf0 100644 --- a/play.php +++ b/play.php @@ -1,6 +1,7 @@ + <?php echo($name); ?>