-
Notifications
You must be signed in to change notification settings - Fork 0
/
get_data.inc.php
23 lines (21 loc) · 1.21 KB
/
get_data.inc.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
<?php
$b = isset($_REQUEST["b"]) ? intval($_REQUEST["b"]) : 1;
$result_s = mysql_query("SELECT * FROM genesis_spieler WHERE id='$sid'");
if ($inhalte_s = mysql_fetch_array($result_s, MYSQL_ASSOC)) {
if (!$b || $b < 1) $b = 1;
if ($b > 2) $b = 2;
$bk = explode(":", $inhalte_s["basis$b"]);
$result_b = mysql_query("SELECT * FROM genesis_basen WHERE name='$name' and koordx='" . $bk[0] . "' and koordy='" . $bk[1] . "' and koordz='" . $bk[2] . "'");
if (!$inhalte_b = mysql_fetch_array($result_b, MYSQL_ASSOC)) echo "Nicht dein Neogen!<br>\n";
if ($b == 1 && $inhalte_s["basis2"]) {
$bk2 = explode(":", $inhalte_s["basis2"]);
$result_b2 = mysql_query("SELECT konst16 FROM genesis_basen WHERE name='$name' and koordx='" . $bk2[0] . "' and koordy='" . $bk2[1] . "' and koordz='" . $bk2[2] . "'");
$inhalte_b2 = mysql_fetch_array($result_b2, MYSQL_ASSOC);
} elseif ($b == 2 && $inhalte_s["basis1"]) {
$bk2 = explode(":", $inhalte_s["basis1"]);
$result_b2 = mysql_query("SELECT konst16 FROM genesis_basen WHERE name='$name' and koordx='" . $bk2[0] . "' and koordy='" . $bk2[1] . "' and koordz='" . $bk2[2] . "'");
$inhalte_b2 = mysql_fetch_array($result_b2, MYSQL_ASSOC);
}
$inhalte_b2["konst16"] = $inhalte_b["konst16"];
}
?>