Drag and Drop Peers Primer Tutorial

Drag and Drop Peers Primer Tutorial

Drag and Drop Peers Primer Tutorial

We’ve decided to gather the Drag and Drop games into a “peerage” of web applications so that one central supervisory web application can point the user into the correct direction to find them, or one of them, as per the PHP glob and “clone” based …


<?php
// experimental_peers_drag_and_drop.php
// RJM Programming
// November, 2025
// Make peers of all the experimental drag and drop logic based web applications

$sofar="";
$listis='';
foreach (glob(dirname(__FILE__) . DIRECTORY_SEPARATOR . '*.php') as $filename) {
$contis=file_get_contents($filename);
if (strpos($contis, "templa" . "tegame=file_get_contents('./experimental_drag_and_drop.htm") !== false) {
if (strpos($filename, "_new_") === false && strpos($sofar, str_replace('_','',str_replace($_SERVER['DOCUMENT_ROOT'], '', $filename))) === false) {
if ($listis == '') {
$listis.=str_replace($_SERVER['DOCUMENT_ROOT'], '', $filename);
} else {
$listis.=',' . str_replace($_SERVER['DOCUMENT_ROOT'], '', $filename);
}
$sofar.=str_replace('_','',str_replace($_SERVER['DOCUMENT_ROOT'], '', $filename));
}
}
}
$larris=explode(',', $listis);
$htmlis='<html><head><title>Experimental Drag and Drop Peers - RJM Programming - November, 2025</title></head><body><h1>Experimental Drag and Drop Peers</h1><h3>RJM Programming - November, 2025</h3><select onchange="if (this.value.length != 0) { window.open(this.value,' . "'_blank','top=120,left=510,width=940,height=660'" . '); }" id=mysel size=' . (3 + sizeof($larris)) . '><option value="">Optionally select an Experimental Drag and Drop web application, to try, below ...</option><option value="/HTMLCSS/chess_game.php">Chess game</option><option value="/HTMLCSS/gradual_reveal_country_game.htm">Reveal country game</option></select></body></html>';

if ($listis != '') {
for ($i=0; $i<sizeof($larris); $i++) {
$htmlis=str_replace('</select>', '<option value="' . $larris[$i] . '">' . strtoupper(substr(str_replace('_',' ',explode('.', basename($larris[$i]))[0]),0,1)) . substr(str_replace('_',' ',explode('.', basename($larris[$i]))[0]),1) . "</option></select>", $htmlis);
}
echo $htmlis;
}

?>

… as a proof of concept Drag and Drop supervisor web application you can also try below …

If this was interesting you may be interested in this too.

This entry was posted in eLearning, Operating System, Software, Tutorials and tagged , , , , , , , , , , , , , , , , , , , . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *