Skip to content

Commit

Permalink
V0.1.1
Browse files Browse the repository at this point in the history
  • Loading branch information
hateofhades committed Apr 26, 2018
2 parents 11abed3 + 6aefeff commit ad7d634
Show file tree
Hide file tree
Showing 49 changed files with 2,193 additions and 52 deletions.
32 changes: 32 additions & 0 deletions htdocs/about.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
<html>
<head>
<?php include('src/head.php'); ?>
</head>
<body>
<?php include('navbar.php'); ?>
<div>
<center>
<h1 style="margin-bot:0">About Us</h1>
<h4>
SteemCasino is founded by @andreistalker and is the first online casino built on the Steem
Blockchain.<br><br> SteemCasino was created with a simple mission of delivering the best and
satisfactory gaming experience to our gamers under a safe and enjoyable atmosphere.<br><br>
Here at SteemCasino, our gamers come first and are dear to us that why we offer a 24 hours
a day, 7 days a week service.<br><br> All games provided in SteemCasino are fair and results are
highly accurate. We run a transparent service here at SteemCasino that why we make
sure<br> our rules are clear.<br><br> We do not run a monogaming system, thus we provide gamers
with varieties of games to choose from. We make it hard for gamers to run out of
choices.<br> You can choose to play alone or with other players.<br><br> SteemCasino provides you
with the privacy and comfort derived from playing our games from your home. We do
not ask for any sign up fee,<br> you gain access to our games free.<br><br> We pay our winnings as
fast as possible without delay making SteemCasino a trusted platform. We do not ask
our gamers for their billing information.<br><br> We respect our gamers privacy by asking them
to provide minimal information.<br><br> For questions, concerns, doubts and suggestions, you
can contact us on our <a href="https://discord.gg/RPHBBqM">Official Discord Channel</a> or email at
steemcasino@gmail.com
</h4>
</center>
</div>
<?php include('src/footer.php'); ?>
</body>
</html>
7 changes: 7 additions & 0 deletions htdocs/coinflip.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,13 @@ function reloadIFrame () {
setTimeout(function() { reloadIFrame(); }, 30000);
}

function cancelGame(gameid) {
$.getJSON( "../src/cancel.php?type=1&game=" + gameid, function( data ) {
if(data['status'] == "success")
reloadIFrame();
});
}

function startGame() {
$("#iframe").attr("src", "coinflipaction.php?action=newgame");
$(".coinflip-game").show();
Expand Down
20 changes: 16 additions & 4 deletions htdocs/coinflipaction.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,20 +20,32 @@
while ($row = $result->fetch_assoc()) {
$balanced = $row['balance'];
$ref = $row['reffered'];
$promobal = $row['promob'];
}

if(IsLoggedOnUser()) {
$secret = generateSecret();
$hashed = hash("sha512", $secret);
if($balanced >= $_GET['balanceTop']) {
if(($balanced + $promobal) >= $_GET['balanceTop']) {
if($_GET['player'] == 1)
$playered = 1;
else
$playered = 2;

$reward = $_GET['balanceTop'] * 2;

$newbalance = $balanced - $_GET['balanceTop'];
if(!$promobal) {
$newbalance = $balanced - $_GET['balanceTop'];
} else {
if($promobal <= $_GET['balanceTop']) {
$betnew = $_GET['balanceTop'] - $promobal;
$promobal = 0;
$newbalance = $balanced - $betnew;
} else {
$promobal = $promobal - $_GET['balanceTop'];
$newbalance = $balanced;
}
}

$query = $db->prepare('INSERT INTO coinflip (player'.$playered.', bet, reward, secret, hash) VALUES (?, ?, ?, ?, ?)');
$query->bind_param('sddss', $_COOKIE['username'], $_GET['balanceTop'], $reward, $secret, $hashed);
Expand Down Expand Up @@ -70,8 +82,8 @@
$noyou->execute();
}

$query = $db->prepare('UPDATE users SET balance = ? WHERE username = ?');
$query ->bind_param('ds', $newbalance, $_COOKIE['username']);
$query = $db->prepare('UPDATE users SET balance = ?, promob = ? WHERE username = ?');
$query ->bind_param('dds', $newbalance, $promobal, $_COOKIE['username']);

$query->execute();
echo '
Expand Down
9 changes: 7 additions & 2 deletions htdocs/coinflipgames.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,18 @@
else
$players = "Steem - ".$player1."<br>Bitcoin - <a style=\"text-decoration:underline;cursor:pointer\" onClick=\"parent.enterGame(".$gameid.");\">Enter game</a>";

if($player1 == $_COOKIE['username'] || $player2 == $_COOKIE['username'])
$cancel = "<br><a style=\"text-decoration:underline;cursor:pointer\" onclick=\"parent.cancelGame(".$gameid.")\">Cancel game</a>";
else
$cancel = "";

$body .= "
<div style=\"display:inline;float:left;padding-left:10px;border:1px solid black;margin:4px\">
<center><h3>Game #".$gameid."</h3></center>
<center><h4 style=\"display:inline\">Players</h4></center><h4 style=\"display:inline\">".$players."</h4><center><h4>
<center><h4 style=\"display:inline\">Players</h4></center><h4 style=\"display:inline\">".$players."</h4><center><h4 style=\"display:inline\">
Bet: ".$bet." SBD <br><br><a style=\"text-decoration:underline;cursor:pointer\" onClick=\"parent.$('.coinflip-game').show();parent.$('#iframe').attr('src', 'hash.php?hash=".$hash."');\">
See hash
</a>
</a>".$cancel."
</div>
";
} else if($timestamper <= 60) {
Expand Down
4 changes: 2 additions & 2 deletions htdocs/confirmcoinflip.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
$balanced = $row['balance'];
$thiswon = $row['won'];
$thislost = $row['losted'];
$promobal = $row['promob'];
}
if(IsLoggedOnUser()) {
$query = $db->prepare('SELECT * FROM coinflip WHERE ID = ?');
Expand All @@ -44,7 +45,7 @@
$secret = $row['secret'];
}

if($balanced < $bet)
if(($balanced + $promobal) < $bet)
die("You don't have enough money!");

if($player2 != "" && $player1 != "")
Expand Down Expand Up @@ -93,7 +94,6 @@
$newbalance = $balanced + $bet;
$thiswon = $thiswon + $bet;
$otherlost = $otherlost + $bet;

} else{
$newbalance = $balanced - $bet;
$thislost = $thislost + $bet;
Expand Down
1 change: 1 addition & 0 deletions htdocs/credits.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
<div class="games-body">
<center><h1>Credits</h1>
<h3><a href="http://steemit.com/@andreistalker">andreistalker</a> - Programming</h3>
<h3><a href="http://steemit.com/@edikanefanga">edikanefanga</a> - FAQ, Privacy Policy and About Us Pages</h3>
<h3 style="margin-bot:0"><a href="http://steemit.com/@podanrj">podanrj</a> - Creator of the <a href="https://utopian.io/utopian-io/@podanrj/iconic-negative-space-logo-design-for-steemcasino">SteemCasino Logo</a></h3>
<h3 style="margin-bot:0"><a href="https://steemit.com/@riverstyx">riverstyx</a> - Creator of the <a href="https://steemit.com/utopian-io/@riverstyx/design-contribution-for-steemcasino">Coinflip animation</a></h3>
<h3 style="margin-bot:0"><a href="https://steemit.com/@karmachela">karmachela</a> - Creator of the <a href="https://steemit.com/utopian-io/@karmachela/button-designs-coin-flip-animation-and-rock-scissor-paper-image-for-steem-casino">Rock, Paper, Scissors images</a></h3>
Expand Down
70 changes: 70 additions & 0 deletions htdocs/dist/jquery.slotmachine.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions htdocs/dist/jquery.slotmachine.min.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions htdocs/dist/jquery.slotmachine.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit ad7d634

Please sign in to comment.