die("something is going wrong"); } } if ($_POST['action'] == "bet" and $_POST['bet'] >= 1 and $_POST['bet'] <= 250 and $_SESSION['game'] != 'running') { $_SESSION['bet'] = $_POST['bet']; } if ($_SESSION['game'] != 'running') { $content = "<b>Deine Karten (" . score() . "):</b><br />" . showcards() . "<br /><b>Der Bank ihre Karten (" . bankscore() . "):</b><br />" . showbankcards() . '<br /><a href="?action=new&' . SID . '">[Runde starten!]</a><br /><br /><form method="post" action="?' . SID . '" enctype="multipart/form-data"> Der Einsatz beträgt: <input type="text" name="bet" value="' . $_SESSION['bet'] . '" size="4" /> <input type="hidden" name="action" value="bet" /> <input type="hidden" name="ok" value="1" /> <input type="submit" name="submit" value="ändern" /></form>Minimum: 1 / Maximum: 250'; } elseif ($_SESSION['card'] == 2) { $content = showcards() . "<br /><b>Derzeitige Punkte: " . score() . '</b><br /><a href="?action=hit&' . SID . '">hit</a> / <a href="?action=stand&' . SID . '">stand</a><br />'; } else { $content = showcards() . "<br /><b>Derzeitige Punkte: " . score() . '</b><br /><a href="?action=hit&' . SID . '">hit</a> / <a href="?action=stand&' . SID . '">stand</a>'; } $content = str_replace("%content%", $content, template1()); $content = str_replace("%status%", $_SESSION['game'], $content); $content = str_replace("%credits%", number_format($ressis['display_gold'], 0, '', '.'), $content); $content = str_replace("%bet%", $_SESSION['bet'], $content); mysql_query("UPDATE `ressis` SET `gold` = '" . $_SESSION['credit'] . "' WHERE `omni` = '" . $_SESSION['user']['omni'] . "' LIMIT 1;"); $ressis = ressistand($_SESSION['user']['omni']); // get playerinfo template and replace tags $status = template('playerinfo'); $status = tag2value('name', $_SESSION['user']['name'], $status); $status = tag2value('base', $_SESSION['user']['base'], $status); $status = tag2value('ubl', $_SESSION['user']['omni'], $status); $status = tag2value('points', $_SESSION['user']['points'], $status); echo tag2value('onload', $onload, template('head')) . $status . $ressis['html'] . $content . '</table>' . template('footer'); // debug
mysql_query("UPDATE `cards` SET `status` = '4' WHERE `gid` = '" . $game['gid'] . "' LIMIT 1;"); } elseif (score($hand_o) > score($hand)) { $text = '<font class="red">Du hast leider verloren</font><br />'; mysql_query("UPDATE `cards` SET `status` = '3' WHERE `gid` = '" . $game['gid'] . "' LIMIT 1;"); } else { $text = 'Dieses Spiel endet unentschieden<br />'; mysql_query("UPDATE `cards` SET `status` = '5' WHERE `gid` = '" . $game['gid'] . "' LIMIT 1;"); } mysql_query("UPDATE `cards` SET `stack` = '" . implode(':', $stack) . "', `hand_defender` = '" . implode(':', $hand) . "' WHERE `gid` = '" . $game['gid'] . "' LIMIT 1;"); } if ($_GET['action'] != 'stand') { $content .= '<br /><b>Deine Punkte: ' . score($hand) . '</b><br /><b>Deine Karten:<br />' . showcards($hand) . '<br /> <a href="cards_multi.php?' . SID . '&action=hit" />hit</a> / <a href="cards_multi.php?' . SID . '&action=stand" />stand</a>'; } else { $content .= '<br /><b>Deine Punkte: ' . score($hand) . '</b><br /><b>Deine Karten:<br />' . showcards($hand) . '<br /><br /> <b>gegnerische Punkte: ' . score($hand_o) . '</b><br /><b>gegnerische Karten:<br />' . showcards($hand_o) . '<br /><br /> ' . $text . '<a href="cards_multi.php?' . SID . '" />klicke hier um zur uebersicht zu kommen</a>'; } $content .= '</td></tr></table>'; } $ressis = ressistand($_SESSION['user']['omni']); // get playerinfo template and replace tags $status = template('playerinfo'); $status = tag2value('name', $_SESSION['user']['name'], $status); $status = tag2value('base', $_SESSION['user']['base'], $status); $status = tag2value('ubl', $_SESSION['user']['omni'], $status); $status = tag2value('points', $_SESSION['user']['points'], $status); echo tag2value('onload', $onload, template('head')) . $status . $ressis['html'] . $content . '</table>' . template('footer'); function showcards($hand) { // shows the current hand