-added server files
This commit is contained in:
27
server/getuserdata.php
Normal file
27
server/getuserdata.php
Normal file
@@ -0,0 +1,27 @@
|
||||
<?php
|
||||
ini_set('display_errors', 1);
|
||||
ini_set('display_startup_errors', 1);
|
||||
error_reporting(E_ALL);
|
||||
|
||||
class MiBD extends SQLite3
|
||||
{
|
||||
function __construct()
|
||||
{
|
||||
$this->open('../bd/jailgames.db');
|
||||
}
|
||||
}
|
||||
|
||||
$bd = new MiBD();
|
||||
|
||||
$game = "";
|
||||
if (isset($_GET['game'])) $game = $_GET['game'];
|
||||
$user = "";
|
||||
if (isset($_GET['user'])) $user = $_GET['user'];
|
||||
|
||||
$query = "SELECT data FROM userdata WHERE game LIKE '".$game."' AND user LIKE '".$user."'";
|
||||
$resultado = $bd->query($query);
|
||||
$fila = $resultado->fetchArray(SQLITE3_ASSOC);
|
||||
if ($fila) {
|
||||
echo($fila['data']);
|
||||
}
|
||||
?>
|
||||
Reference in New Issue
Block a user