function footer()
{
    ?>
		<div class="footer">&copy; <?php 
    echo date('Y');
    ?>
. All rights reserved. You can donate at <span class="attention"><a href="http://dogechain.info/address/<?php 
    echo getDynamic('donation');
    ?>
"><?php 
    echo getDynamic('donation');
    ?>
</a></span></div>
  </body>
</html>
	<?php 
}
Beispiel #2
0
/**
 * Action breed
 *
 * @param Element Element 
 */
function breed($element)
{
    if (isInComfort($element) && $element->getEating() == 0 && $element->getSleeping() == 0) {
        switch (get_class($element)) {
            case 'Rabbit':
                if ($element->getBredAgo() > $_POST['breedRabbitEach']) {
                    $probability = rand(1, 100) / 100;
                    if ($probability > 0.5) {
                        $position = $element->getPosition();
                        foreach (getDynamic() as $elem) {
                            if (get_class($elem) == 'Rabbit') {
                                $positionCouple = $elem->getPosition();
                                if ($positionCouple[0] == $position[0] - 1 && $positionCouple[1] == $position[1] || $positionCouple[0] == $position[0] + 1 && $positionCouple[1] == $position[1] || $positionCouple[0] == $position[0] && $positionCouple[1] == $position[1] - 1 || $positionCouple[0] == $position[0] && $positionCouple[1] == $position[1] + 1) {
                                    $children = rand(1, $_POST['breedRabbitAmount']);
                                    $numChildren = 0;
                                    for ($i = 0; $i < $children; $i++) {
                                        if (addRabbit()) {
                                            $numChildren++;
                                        }
                                    }
                                    $element->setBredAgo(0);
                                    // Estadísticas - Reproducción de conejos
                                    $GLOBALS['vars']['bornRabbit'][getTime() - 1] += $numChildren;
                                    writeFileCSV('Log', array(getTime(), '', get_class($element), $element->getId(), '[ ' . $position[0] . ' - ' . $position[1] . ' ]', '', 'breed', 'Children (' . $numChildren . ')'));
                                    break;
                                }
                            }
                        }
                    } else {
                        writeFileCSV('Log', array(getTime(), '', get_class($element), $element->getId(), '[ ' . $element->getPosition()[0] . ' - ' . $element->getPosition()[1] . ' ]', '', 'breed', 'Children lost'));
                    }
                } else {
                    writeFileCSV('Log', array(getTime(), 'Denied', get_class($element), $element->getId(), '[ ' . $element->getPosition()[0] . ' - ' . $element->getPosition()[1] . ' ]', '', 'breed', ''));
                }
                break;
            case 'Wolf':
                if ($element->getBredAgo() > $_POST['breedWolfEach']) {
                    $probability = rand(1, 100) / 100;
                    if ($probability > 0.75) {
                        $position = $element->getPosition();
                        foreach (getDynamic() as $elem) {
                            if (get_class($elem) == 'Wolf') {
                                $positionCouple = $elem->getPosition();
                                if ($positionCouple[0] == $position[0] - 1 && $positionCouple[1] == $position[1] || $positionCouple[0] == $position[0] + 1 && $positionCouple[1] == $position[1] || $positionCouple[0] == $position[0] && $positionCouple[1] == $position[1] - 1 || $positionCouple[0] == $position[0] && $positionCouple[1] == $position[1] + 1) {
                                    $children = rand(1, $_POST['breedWolfAmount']);
                                    $numChildren = 0;
                                    for ($i = 0; $i < $children; $i++) {
                                        if (addWolf()) {
                                            $numChildren++;
                                        }
                                    }
                                    $element->setBredAgo(0);
                                    // Estadísticas - Reproducción de lobos
                                    $GLOBALS['vars']['bornWolf'][getTime() - 1] += $numChildren;
                                    writeFileCSV('Log', array(getTime(), '', get_class($element), $element->getId(), '[ ' . $position[0] . ' - ' . $position[1] . ' ]', '', 'breed', 'Children (' . $numChildren . ')'));
                                    break;
                                }
                            }
                        }
                    } else {
                        writeFileCSV('Log', array(getTime(), '', get_class($element), $element->getId(), '[ ' . $element->getPosition()[0] . ' - ' . $element->getPosition()[1] . ' ]', '', 'breed', 'Children lost'));
                    }
                } else {
                    writeFileCSV('Log', array(getTime(), 'Denied', get_class($element), $element->getId(), '[ ' . $element->getPosition()[0] . ' - ' . $element->getPosition()[1] . ' ]', '', 'breed', ''));
                }
                break;
        }
    } else {
        writeFileCSV('Log', array(getTime(), 'Denied', get_class($element), $element->getId(), '[ ' . $element->getPosition()[0] . ' - ', $element->getPosition()[1] . ' ]', '', 'breed', ''));
    }
}
Beispiel #3
0
<?php

include 'functions.php';
top();
echo getDynamic('about');
footer();
Beispiel #4
0
include 'functions.php';
echo top();
?>
		<div id="content">
    <img src="img/dogecoin.png" style="display:inline"><div id="header-slogan" style="display:inline-block;"><br><h1 style="display: inline"><?php 
echo getDynamic('head');
?>
</h1><br>
	<div id="slogan"><?php 
echo getDynamic('slogan');
?>
</div></div>
	</div>	
	<div id="page" >
	<div class="container">
	<div class="row">

  <div class="col-md-4"><h2>Past Draws</h2>View a list of past draws, that have happened, to see if you have won (please, keep in mind that the address the price is sent to will not (usually) match an address in your address book, you will still receive the prize)! <br> <br><a type="button" class="btn btn-warning" href="past.php">Visit previous draws</a> </div>
  <div class="col-md-4 mid other"><h2>Current draw</h2>View the current draw's statistics. There are currently <span class="attention"><?php 
echo remainingToRound();
?>
</span> remaining to this draw. You can check out the jackpot, how many people have bet, and you can check out the(appropriate) odds of you winning!<br><a href="current.php" type="button" class="btn btn-warning">Read current round statistics</a></div>
  <div class="col-md-4"><h2>Rules</h2>The rules for this game are as simple as they get. You have to send any amount (currently, it has to be a whole number) of dogecoins to <span class="attention"><?php 
echo getDynamic('bet_addr');
?>
</span>. The more you send, the bigger chance of winning you have.<br><a type="button" class="btn btn-warning" href="about.php#info">Read advanced rules</a></div> 
	</div>
	</div>
	</div>
<?php 
echo footer();
Beispiel #5
0
top();
$minimum = file_get_contents('/home/dogecoin/round');
exec('echo 282828 | sudo -S -u dogecoin dogecoind listtransactions temp 5000 2>&1', $output);
$json = json_decode(implode($output, ''));
echo '<div class="page-other">';
//print_r($json);
foreach ($json as $transaction) {
    if ($transaction->time >= $minimum && $transaction->category == 'receive') {
        $award += $transaction->amount;
        $transactions[] = $transaction;
        //print_r($transaction);
    }
}
//print_r($json);
$a = remainingToRound();
echo '<h1 style="text-align:center">Time until next round</h1><h2 style="text-align:center;"><span class="attention">' . $a . '</span></h2><br><h1 style="text-align:center;">Send bets to:<br><span class="attention">' . getDynamic('bet_addr') . '</span></h1><h1 style="text-align:center">Transactions</h1><pre style="text-align:center">';
$i = 0;
foreach ($transactions as $t) {
    if ($i <= 5) {
        echo '[UP][' . $transactions[$i]->time . '] FROM ' . $transactions[$i]->txid . ' GOT ' . $transactions[$i]->amount . "\n";
    } else {
        break;
    }
    $i++;
}
if ($i == 0) {
    echo 'No transactions have been made this round!';
}
$award_official = 0.3 * (int) $award;
$award_official++;
$odds = (int) $award . ':1';