Initial commit

This commit is contained in:
Dylan 2023-09-26 09:25:20 -04:00
commit 8e6b85588b
48 changed files with 337 additions and 0 deletions

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
/config.php

BIN
boss_images/blue.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

BIN
boss_images/bluedrac.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

BIN
boss_images/blueking.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 38 KiB

BIN
boss_images/bluerobo.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

BIN
boss_images/bluespin.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.0 KiB

BIN
boss_images/bluewing.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 34 KiB

BIN
boss_images/krak.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

BIN
boss_images/krakdrac.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

BIN
boss_images/krakking.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 39 KiB

BIN
boss_images/krakrobo.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

BIN
boss_images/krakspin.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

BIN
boss_images/krakwing.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 34 KiB

BIN
boss_images/raam.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

BIN
boss_images/raamdrac.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

BIN
boss_images/raamking.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 37 KiB

BIN
boss_images/raamrobo.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

BIN
boss_images/raamspin.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.0 KiB

BIN
boss_images/raamwing.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 34 KiB

BIN
boss_images/skul.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

BIN
boss_images/skuldrac.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

BIN
boss_images/skulking.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 38 KiB

BIN
boss_images/skulrobo.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

BIN
boss_images/skulspin.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.7 KiB

BIN
boss_images/skulwing.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

BIN
boss_images/turr.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

BIN
boss_images/turrdrac.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

BIN
boss_images/turrking.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 37 KiB

BIN
boss_images/turrrobo.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

BIN
boss_images/turrspin.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.0 KiB

BIN
boss_images/turrwing.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

5
ddd_index.php Executable file
View File

@ -0,0 +1,5 @@
<!--Load Original Source Files-->
<?php echo file_get_contents("ddd_source.html"); ?>
<!--Load Score Input Form-->
<?php echo file_get_contents("ddd_score_form.html"); ?>

19
ddd_score_form.html Executable file
View File

@ -0,0 +1,19 @@
<!DOCTYPE html>
<body>
<a href="ddd_scores.php?mode=DX">
<img src="/ddddxhs_files/top100dx.png" alt="Top 100 DX Mode">
</a>
<br>
<br>
<a href="ddd_scores.php?mode=EX">
<img src="/ddddxhs_files/top100ex.png" alt="Top 100 EX Mode">
</a>
<br>
<br>
<form action="input_ddd_scoreboard.php" method="post">
ENTER YOUR SCORE CODE
<br>
<input type="text" name="gamePass" id="gamePass"><br>
<input type="submit" value="Submit Code">
</form>
<br>

71
ddd_scores.php Executable file
View File

@ -0,0 +1,71 @@
<?php
echo file_get_contents("ddd_source.html");
include('/var/config/mysqlconnect.php');
$mode = $_REQUEST['mode'];
if ($mode == "DX") {
echo "<img src='/ddddxhs_files/top100dx.png' alt='Top 100 DX Mode'>";
$query = "SELECT * FROM ddd_db.scores WHERE ddd_db.scores.Mode = 'DX' ORDER BY ddd_db.scores.Score DESC LIMIT 100";
} elseif ($mode == "EX") {
echo "<img src='/ddddxhs_files/top100ex.png' alt='Top 100 EX Mode'>";
$query = "SELECT * FROM ddd_db.scores WHERE ddd_db.scores.Mode = 'EX' ORDER BY ddd_db.scores.Score DESC LIMIT 100";
}
?>
<?php
$result = $conn->query($query);
if ($result->num_rows > 0) {
// output data of each row
$counter = 1;
echo "<div class='top3'>";
while ($row = $result->fetch_assoc()) {
$output = "<span id='player'>" . $counter . " " . $row["Name"] . "</span>" . "&nbsp;&nbsp;&nbsp;" .
"<span id='score'>" . number_format($row["Score"]) . "</span>";
// Retrieve the boss names and split them into an array
$bosses = explode(",", $row["Bosses"]);
echo "<li class='scoreEntry " . ($counter % 2 == 0 ? 'even' : 'odd') . "'>";
echo "<div class='scoreInfo'>";
echo $output;
echo "</div>";
if (!empty($bosses)) {
echo "<div class='bossImages'>";
// Display an image for each boss name
foreach ($bosses as $boss) {
$bossImage = trim(strtolower($boss)) . ".png";
if($bossImage != ".png"){
echo "<div class='bossImageWrapper'>";
echo "<img id='boss_image' src='/boss_images/" . $bossImage . "' alt='" . $boss . "' title='" . $boss . "'>";
echo "<div class='bossLabel'>" . $boss . "</div>";
echo "</div>";
}
}
echo "</div>";
}
echo "</li>";
$counter++;
}
echo "</ol>";
} else {
echo "<br>0 results";
}
$conn->close();
?>
<br>
<a class='ddd' href='/ddd_index.php'>Back</a>

11
ddd_source.html Executable file
View File

@ -0,0 +1,11 @@
<!DOCTYPE html>
<head>
<link type="text/css" rel="stylesheet" href="./ddddxhs_files/ddd.css">
<link rel="stylesheet" type="text/css" href="./ddddxhs_files/banner-styles.css">
</head>
<center>
<a href="./index.php">
<img src="/ddddxhs_files/title.png" alt="DASH-DA-DASH DX" title="DASH-DA-DASH DX">
</a>
<br>
<br>

Binary file not shown.

Binary file not shown.

BIN
ddddxhs_files/code.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

148
ddddxhs_files/ddd.css Executable file
View File

@ -0,0 +1,148 @@
body {
background-image: url("/ddddxhs_files/sitebg.png");
background-repeat: repeat-y;
background-color: #001432;
background-position: center;
background-attachment: fixed;
color: #fff;
font-family: Verdana, Tahoma, sans-serif;
}
a {
color: #00c;
}
a:hover {
color: #6cf;
}
a img {
border: 0px;
}
.center {
display: block;
margin-left: auto;
margin-right: auto;
width: 100%;
}
.ddd {
width: 100%;
text-transform: uppercase;
font-size: 1.5em;
font-weight: bold;
list-style: none;
}
.top3 {
position: relative;
width: 800px;
height: 215px;
clear: both;
text-transform: uppercase;
}
.scoreList {
width: 40%;
margin: 0px auto;
padding: 0px;
position: relative;
top: -6em;
}
.scoreEntry {
height: auto;
list-style: none;
margin-bottom: 0.3em;
text-transform: uppercase;
display: flex;
flex-direction: column; /* New: Stack scoreInfo and bossImages vertically */
}
.TopScore1,
.TopScore2,
.TopScore3 {
position: absolute;
text-align: center;
width: 800px;
font-weight: bold;
color: #fff;
font-size: 1.5em;
}
.TopScore1 {
bottom: 183px;
}
.TopScore2 {
bottom: 146px;
}
.TopScore3 {
bottom: 109px;
}
.even {
background-color: rgba(0, 0, 0, 0.9);
}
.odd {
background-color: rgba(26, 26, 26, 0.9);
}
.scoreEntry #player,
.scoreEntry #score {
text-align: left;
font-size: 1.5em;
padding-left: 0.25em;
font-weight: bold;
}
.scoreEntry {
text-align: center;
font-size: 1.2em;
padding-right: 0.25em;
display: flex;
flex-wrap: wrap; /* New: Allow wrapping for boss images */
align-items: center;
}
.bossImages {
text-align: right;
font-size: 1.2em;
padding-right: 0.25em;
display: flex;
flex-wrap: wrap; /* New: Allow wrapping for boss images */
align-items: center;
}
.bossImages {
text-align: center;
font-size: 1.2em;
padding-right: 0.25em;
display: flex;
flex-wrap: wrap;
align-items: center;
justify-content: center; /* New: Center the boss icons horizontally */
}
.bossImages img {
max-height: 80px;
margin-right: 5px;
margin-bottom: 5px; /* New: Add some spacing between boss images */
}
.bossImageWrapper {
display: flex;
flex-direction: column;
align-items: center;
margin-right: 10px;
}
.bossLabel {
font-size: 12px;
color: #fff;
margin-top: 5px;
text-align: center; /* Center the label text */
}

BIN
ddddxhs_files/download.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

BIN
ddddxhs_files/features.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 521 KiB

BIN
ddddxhs_files/sitebg.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.5 KiB

BIN
ddddxhs_files/title.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

BIN
ddddxhs_files/title2.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 82 KiB

BIN
ddddxhs_files/top100dx.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

BIN
ddddxhs_files/top100ex.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

49
index.php Executable file
View File

@ -0,0 +1,49 @@
<!--Load Original Source Files-->
<?php echo file_get_contents("ddd_source.html"); ?>
<center>
<br><br><br><br>
<ol class='scoreList'>
<a href='/ddddxhs_files/DASH-DA-DASH DX (2023 Fan Patch).exe'>
<img src="/ddddxhs_files/download.png" alt="DOWNLOAD DASH-DA-DASH DX" title="DOWNLOAD DASH-DA-DASH DX">
</a>
<br>
<br>
<br>
<img class='center' src="/ddddxhs_files/features.png" alt="FEATURES DASH-DA-DASH DX" title="FEATURES DASH-DA-DASH DX">
<br>
<br>
<br>
<li class='even ddd' id='player'>
Welcome to the fan made Dash Da Dash DX High Score Board
</li>
<br>
<li class='odd ddd' id='player'>
I created this homage as a way for my friends and I to post our high scores to an online leaderboard like back in the day.
</li>
<br>
<a href='/ddd_index.php'>
<img src="/ddddxhs_files/code.png" alt="CODE DASH-DA-DASH DX" title="CODE DASH-DA-DASH DX">
</a>
<br><br>
<li class='even ddd' id='player'>
Credits
<br>
<a href='https://lapfoxtrax.fandom.com/wiki/DASH-DA-DASH_DX'>Wiki</a>
<br>
<a href='https://mulengine.itch.io/ddddx'>itch.io (Has verson 1.14 without 2023 Fan Patch)</a>
<br>
<a href='https://web.archive.org/web/20130821151756/http://renard.teknolust.org/ddd/'>DDDDX Archive</a>
<br>
<a href='https://web.archive.org/web/20130710170054/http://renard.teknolust.org/ddd/score/index.php'>Scores Archive</a>
<br>
<a href='https://halleylabs.com/'>Current Website</a>
<br>
<a href='https://heckscaper.com/main.html'>Current Website Main</a>
<br>
<a href='https://web.archive.org/web/20120615011611if_/http://renard.teknolust.org/ddd/dddxv12install.exe'>Version 1.12 from WabyBackMachine Archive</a>
<br>
<a href='/ddddxhs_files/DASH-DA-DASH DX (2023 Fan Patch).mfa'>2023 Fan Patch .mfa Source File for Clickteam Fusion 2.5</a>
</li>
</ol>
<br>
</center>

33
input_ddd_scoreboard.php Executable file
View File

@ -0,0 +1,33 @@
<?php
echo file_get_contents("ddd_source.html");
include('config.php');
$b64 = $_POST["gamePass"];
$decode = base64_decode($b64, true);
$dataArr = explode("|", $decode);
$name = $dataArr[0];
$score = $dataArr[1];
$mode = $dataArr[2];
// Retrieve the boss names dynamically
$bosses = array_slice($dataArr, 3);
// Join the boss names into a single string separated by commas
$bossNames = implode(", ", $bosses);
echo $name . "<br>" . $score . "<br>" . $mode . "<br>";
echo "Bosses: " . $bossNames . "<br>";
// Insert the data into the database
$sql = "INSERT INTO ddd_db.scores (Name, Score, Mode, Bosses) VALUES ('$name', $score, '$mode', '$bossNames')";
if (mysqli_query($conn, $sql)) {
echo "New record created successfully";
} else {
echo "Error: " . $sql . "<br>" . mysqli_error($conn);
}
mysqli_close($conn);
?>
<br>
<a class='ddd' href='/ddd_index.php'>Back</a>