Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 14 KiB |
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 11 KiB |
Before Width: | Height: | Size: 4.9 KiB After Width: | Height: | Size: 4.9 KiB |
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 930 B After Width: | Height: | Size: 930 B |
Before Width: | Height: | Size: 899 B After Width: | Height: | Size: 899 B |
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 1.5 KiB |
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 1.5 KiB |
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 930 B After Width: | Height: | Size: 930 B |
Before Width: | Height: | Size: 899 B After Width: | Height: | Size: 899 B |
Before Width: | Height: | Size: 925 B After Width: | Height: | Size: 925 B |
Before Width: | Height: | Size: 1012 B After Width: | Height: | Size: 1012 B |
Before Width: | Height: | Size: 28 KiB After Width: | Height: | Size: 28 KiB |
@ -0,0 +1,19 @@
|
||||
function getTest() {
|
||||
var contents;
|
||||
var xhr = new XMLHttpRequest();
|
||||
xhr.open('GET', 'database/makeittrue.db', true);
|
||||
xhr.responseType = 'arraybuffer';
|
||||
|
||||
xhr.onload = function (e) {
|
||||
var uInt8Array = new Uint8Array(this.response);
|
||||
var db = new SQL.Database(uInt8Array);
|
||||
var contents = db.exec("SELECT * FROM scores WHERE mode = 'normal'");
|
||||
contents.forEach(function (element) {
|
||||
element.values.forEach(function (value) {
|
||||
console.log(value)
|
||||
});
|
||||
});
|
||||
};
|
||||
xhr.send();
|
||||
}
|
||||
|
@ -0,0 +1,19 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Document</title>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<script src="db.js"></script>
|
||||
<script src="sql.js"></script>
|
||||
<script>
|
||||
|
||||
//getTest();
|
||||
</script>
|
||||
</body>
|
||||
|
||||
</html>
|
@ -1,16 +0,0 @@
|
||||
<?php
|
||||
$mysqli = new mysqli("localhost", "root", "", "makeittrue");
|
||||
if ($mysqli->connect_error) {
|
||||
exit('Could not connect');
|
||||
}
|
||||
|
||||
$sql = "SELECT pseudo, score, id FROM score";
|
||||
|
||||
$stmt = $mysqli->prepare($sql);
|
||||
$stmt->execute();
|
||||
$stmt->store_result();
|
||||
$stmt->bind_result($pseudo, $score, $id);
|
||||
$stmt->fetch();
|
||||
$stmt->close();
|
||||
|
||||
echo "<script>console.log('Debug Objects: " . $pseudo . "' );</script>";
|
@ -1,12 +0,0 @@
|
||||
function getTest() {
|
||||
var xhttp;
|
||||
xhttp = new XMLHttpRequest();
|
||||
xhttp.onreadystatechange = function () {
|
||||
if (this.readyState == 4 && this.status == 200) {
|
||||
document.getElementById("txtHint").innerHTML = this.responseText;
|
||||
}
|
||||
};
|
||||
xhttp.open("GET", "../database/insert.php", true);
|
||||
xhttp.send();
|
||||
}
|
||||
|
@ -1,10 +0,0 @@
|
||||
<script>
|
||||
var arr = [60, 40, 70, 120, 50, 45, 69, 69];
|
||||
var newArray = [55, 55, 65, 65, 75, 75, 85, 85];
|
||||
var position = 60;
|
||||
console.log(arr);
|
||||
arr.splice(arr.indexOf(position), 4);
|
||||
for (let i = 0; i < newArray.length; i++)
|
||||
arr.splice(0, 0, newArray[i])
|
||||
console.log(arr);
|
||||
</script>
|