Exemplo n.º 1
0
$GLOBALS['amount'] = null;
$GLOBALS['good_distance'] = null;
$GLOBALS['relations'] = null;
$GLOBALS['ideal_price'] = null;
$GLOBALS['offered_price'] = null;
$GLOBALS['ideal_price'] = null;
$GLOBALS['bargain_price'] = null;
$GLOBALS['port'] = null;
$GLOBALS['amount'] = null;
global $port, $good_id, $amount, $good_distance, $relations, $ideal_price, $offered_price, $ideal_price, $bargain_price, $amount;
// initialize random generator.
mt_srand((double) microtime() * 1000000);
require_once "shop_goods.inc";
// creates needed objects
$port = new SMR_PORT($player->sector_id, SmrSession::$game_id);
$amount = get_amount();
$bargain_price = get_bargain_price();
if (!is_numeric($amount)) {
    create_error("Numbers only please");
}
if (!is_numeric($bargain_price)) {
    create_error("Numbers only please");
}
// get good name, id, ...
$good_id = $var["good_id"];
$good_name = $var["good_name"];
$good_class = $var["good_class"];
// do we have enough turns?
if ($player->turns == 0) {
    create_error("You don't have enough turns to trade.");
}
<?php

require "settings.php";
if (isset($_REQUEST["key"])) {
    switch ($_REQUEST["key"]) {
        case "confirm":
            $OUTPUT = write_amount();
            break;
        default:
            $OUTPUT = get_amount();
    }
} else {
    $OUTPUT = get_amount();
}
require "template.php";
function get_amount()
{
    extract($_REQUEST);
    db_connect();
    $get_ent = "SELECT id, allocation_linked, allocation_amounts FROM sup_stmnt WHERE id = '{$allocate}' LIMIT 1";
    $run_ent = db_exec($get_ent) or errDie("Unable to get entry allocation amount information.");
    if (pg_numrows($run_ent) < 1) {
        return "Invalid Use Of Module.";
    }
    $arr = pg_fetch_array($run_ent);
    $linkedarr = explode("|", $arr['allocation_linked']);
    $empty1 = array_shift($linkedarr);
    $amountsarr = explode("|", $arr['allocation_amounts']);
    $empty2 = array_shift($amountsarr);
    //$amountkey = array_search("$arr[id]", $linkedarr);
    $amountkey = array_search("{$from}", $linkedarr);
Exemplo n.º 3
0
                    <p>L'objectif est de <span class="bold">25 000 €</span>.</p>
                    <br/>

                    <p>Chacun peut donner en fonction de ses moyens et sans se précariser. Merci d'avance pour votre
                        engagement citoyen et humain. Ici, vous pouvez directement et en un clic, participer à cette
                        cagnotte. Chacun participe du montant qu'il souhaite.</p>

                    <p>Tous les paiements sont sécurisés via PayPal.</p>
                </div>
            </div>
            <div class="col-md-4 col-sm-12 col-xs-12" id="box">
                <div id="in-box">
                    <div class="row">
                        <span id="montant-recolte"><?php 
get_amount();
?>
</span>
                        <span id="montant-total">collectés sur 25 000 €</span>
                    </div>
                    <br/>

                    <div class="row">
                        <span id="percent">0%</span>

                        <div id="bar">
                            <div id="progress-bar"></div>
                        </div>
                    </div>
                    <div class="row">
                        <div class="left">