Exemplo n.º 1
0
function admin_sell()
{
    //executes the admin sale of a members item
    global $locale, $aidlink;
    $searchfor = stripinput($_POST['searchfor']);
    $userid = stripinput($_GET['userid']);
    $username = stripinput($_GET['username']);
    $id = stripinput($_GET['id']);
    $amtpaid = stripinput($_GET['amtpaid']);
    opentable(stripslash($username . '\'s Item sold'), '');
    $context['shop_inventory_search'] = 2;
    $result = dbquery("DELETE FROM " . DB_UG3_INVENTORY . " WHERE id = '" . $id . "' LIMIT 1");
    payuser($userid, $amtpaid, 'cash');
    echo "<div align='center'>" . sprintf('item %s has been sold for the amount of %s.', $id, $amtpaid);
    echo "<form action='index.php" . $aidlink . "&amp;op=viewmember' method='post'>\n";
    echo "<input name='searchfor' class='textbox' type='hidden' value='" . $username . "'>\n";
    echo "<input type='submit' class='button' value='" . $locale['urg_a_inventry_125'] . "'>\n";
    echo "</form>\n";
    closetable();
}
Exemplo n.º 2
0
function member_steal()
{
    //Steal Money
    global $HTTP_POST_VARS, $userdata, $locale, $settings, $golddata;
    //set an amount in case its missed later
    $success = '20';
    table_top($locale['urg_member_103']);
    /*
    First things first.. Can Only steal from users cash amounts never from bank.
    Lots of things can happen here. If steal is good stuff could happen to stealee
    if steal is bad stuff could happen to stealer.
    Maybe we need a jail now to go with this?
    Fail to steal go to jail and jail means loss of all owned stuff?
    */
    //lets trim the useage of this damn thing
    if ($golddata['steal'] < date('Ymd')) {
        global $stealfrom_id, $stealfrom_name, $steal_amount;
        if (isset($_POST['stealfrom']) != '') {
            //there must be something in the steal from box
            $stealfrom = stripinput($_POST['stealfrom']);
            //its not an numewral so select useing the name
            //sort out the name to id situation
            $id_query = dbquery("SELECT g.*, u.user_name as owner_name\n\t\t\t\tFROM " . DB_UG3 . " g\n\t\t\t\tLEFT JOIN " . DB_USERS . " u ON g.owner_id = u.user_id\n\t\t\t\tWHERE user_name = '" . $stealfrom . "'\n\t\t\t\tLIMIT 1");
            //$id_query = dbquery("SELECT * FROM ".DB_UG3." WHERE owner_name='".$stealfrom."' LIMIT 1");
            //$id_result = dbfetch_array($id_query);
            $id_result = dbarray($id_query);
            $stealfrom_id = $id_result['owner_id'];
            $stealfrom_name = $id_result['owner_name'];
            //timer for daily steal only
            $result = dbquery("UPDATE " . DB_UG3 . " SET steal = '" . date('Ymd') . "' WHERE owner_id = '" . $golddata['owner_id'] . "' LIMIT 1");
            $result = dbquery("SELECT g.*, u.user_name as owner_name\n\t\t\t\tFROM " . DB_UG3 . " g\n\t\t\t\tLEFT JOIN " . DB_USERS . " u ON g.owner_id = u.user_id\n\t\t\t\tWHERE owner_id = '" . $stealfrom_id . "'\n\t\t\t\tLIMIT 1");
            //$result = dbquery("SELECT * FROM ".DB_UG3." WHERE owner_id='".$stealfrom_id."' LIMIT 1");
            //ok its all so unfair aint it?
            //so lets play a little
            //if the theif has more money than the selected target
            $target_query = dbquery("SELECT g.*, u.user_name as owner_name\n\t\t\t\tFROM " . DB_UG3 . " g\n\t\t\t\tLEFT JOIN " . DB_USERS . " u ON g.owner_id = u.user_id\n\t\t\t\tWHERE owner_id = '" . $stealfrom_id . "'\n\t\t\t\tLIMIT 1");
            //$target_query = dbquery("SELECT * FROM ".DB_UG3." WHERE owner_id='".$stealfrom_id."' LIMIT 1");
            //$target_result = dbfetch_array($target_query);
            $target_result = dbarray($target_query);
            $targets_total = $target_result['cash'] + $target_result['bank'];
            if ($targets_total < '100' || $targets_total < '') {
                opentable($locale['urg_member_117']);
                echo $locale['urg_member_118'];
                closetable();
                include "footer.php";
                exit;
            }
            $my_total = $golddata['cash'] + $golddata['bank'];
            if ($targets_total < $my_total) {
                //less than theif
                //set the success percentage low
                $success = '10';
            } elseif ($targets_total > $my_total * 2) {
                //more than double of theif
                //set the success percentage low
                $success = '70';
            } elseif ($targets_total > $my_total / 2) {
                //more than half of theif
                //set the success percentage low
                $success = '45';
            } else {
                $success = '35';
            }
            //get a random number between 0 and 100
            $try = rand(0, 100);
            //percentage probability will work on
            //if successfull
            if ($try < $success) {
                // ??% chance of success
                $stealee = getusergold($stealfrom_id, 'cash');
                $steal_amount = rand(0, $stealee);
                //take this money away from stealee...
                takegold2($stealfrom_id, $steal_amount, 'cash');
                payuser($userdata['user_id'], $steal_amount, 'cash');
                if ($steal_amount < 50) {
                    echo $locale['urg_member_119'] . " " . $steal_amount . "!";
                } else {
                    echo $locale['urg_member_120'] . " " . $steal_amount . " " . $locale['urg_member_121'] . " " . $stealfrom_name . "" . $locale['urg_member_122'] . " " . $stealfrom_name . " " . $locale['urg_member_123'];
                }
            } else {
                if ($golddata['cash'] + $golddata['cash'] <= $steal_amount) {
                    $opt = '2';
                } else {
                    $opt = '4';
                }
                //ok its punishment time..
                $punishment_id = rand(0, $opt);
                //grab a random punishment
                if ($punishment_id == 0) {
                    echo $locale['urg_member_124'];
                } elseif ($punishment_id == 1) {
                    //take karma (must be forced to go negative)
                    takegold2($userdata['user_id'], '10', 'karma', 1);
                    echo $locale['urg_member_125'];
                } elseif ($punishment_id == 2) {
                    //take gold (force it)
                    //$fine = $golddata[cash]/2;
                    $fine_amount = rand(0, $golddata['cash'] + $golddata['bank']);
                    takegold2($userdata['user_id'], $fine_amount, 'cash', 1);
                    echo $locale['urg_member_126'] . formatMoney($fine_amount) . "!<br />";
                } elseif ($punishment_id == 3) {
                    //the stealee robs you
                    //$returnsteal = $golddata['cash']/2;
                    //$returnsteal = $golddata['cash'];
                    $returnsteal = $golddata['cash'] + $golddata['bank'];
                    payuser($stealfrom_id, $returnsteal, 'cash');
                    takegold2($userdata['user_id'], $returnsteal, 'cash', '1');
                    echo $stealfrom_name . $locale['urg_member_128'] . formatMoney($returnsteal) . $locale['urg_member_129'];
                } elseif ($punishment_id == 4) {
                    //the stealee robs you
                    //$returnsteal = $golddata['cash']/2;
                    $returnsteal = $golddata['cash'];
                    payuser($stealfrom_id, $returnsteal, 'cash');
                    takegold2($userdata['user_id'], $returnsteal, 'cash', '1');
                    echo $locale['urg_member_127'] . $stealfrom_name . $locale['urg_member_128'] . formatMoney($returnsteal) . $locale['urg_member_129'];
                } else {
                    echo $locale['urg_member_124'];
                }
            }
        } else {
            echo "<form action='index.php' method='post'>\n";
            echo "<table width='100%' cellpadding='3' cellspacing='3' class='tbl-border'>\n<tr valign='top'>\n";
            echo "<td width='100%' colspan='2'><br />" . $locale['urg_member_130'] . "</td>\n";
            echo "</tr>\n<tr valign='top'>\n";
            echo "<td width='100%' colspan='2'><br />" . $locale['urg_member_131'] . "</td>\n";
            echo "</tr>\n<tr valign='top'>\n";
            echo "<td width='100%' colspan='2'><br />" . $locale['urg_member_132'] . "</td>\n";
            echo "</tr>\n<tr class='tbl2'>\n";
            echo "<td><input type='hidden' name='op' value='member_steal' /></td>\n";
            echo "<td>" . $locale['urg_member_133'] . "<input type='text' class='textbox' name='stealfrom' size='50' />\n";
            echo "<a style='cursor:help;' href='javascript:void(window.open(\"findmember.php?title=findmember\",\"\",\"width=350,height=400\"));'>\n";
            echo "<img src='images/find.png' title='" . $locale['urg_member_107'] . "' alt='" . $locale['urg_member_107'] . "' style='border: 0;' />\n";
            echo "</a></td>\n";
            echo "</tr>\n<tr>\n";
            echo "<td colspan='2' align='center'><input class='button' type='submit' value='" . $locale['urg_member_108'] . "' /></td>\n";
            echo "</tr>\n</table>\n";
            echo "</form>";
        }
    } else {
        echo $locale['urg_member_134'];
    }
    closetable();
}
Exemplo n.º 3
0
function donate_self_donate()
{
    global $userdata, $locale, $golddata;
    table_top($locale['urg_donate_128']);
    echo "<table width='100%' cellpadding='5' cellspacing='0' border='0'>\n<tr valign='top'>\n";
    echo "<td style='width: 100%'>";
    $allgold = $golddata['cash'] + $golddata['bank'];
    if ($allgold <= UGLD_SELFDONATE_ALLOW) {
        $autodonate = rand(UGLD_SELFDONATE_MIN, UGLD_SELFDONATE_MAX);
        payuser($userdata['user_id'], $autodonate, 'cash');
        echo sprintf($locale['urg_donate_129'], formatMoney($autodonate));
        pagerefresh('meta', '2', FUSION_SELF . '?op=start');
    } else {
        echo sprintf($locale['urg_donate_130'], formatMoney(UGLD_SELFDONATE_ALLOW), formatMoney($allgold));
        pagerefresh('meta', '2', FUSION_SELF . '?op=start');
    }
    echo "</td>\n";
    echo "</tr>\n</table>\n";
    closetable();
}
Exemplo n.º 4
0
function trade_buy()
{
    //Buy An Item available from another user
    global $locale, $golddata;
    table_top($locale['urg_trade_113']);
    if (isset($_POST['id']) && !isNum($_POST['id'])) {
        redirect("index.php");
    }
    //Get information on the item in  question
    $result = dbquery("SELECT it.*, inv.*, u.user_name as owner_name\n\t\tFROM " . DB_UG3_INVENTORY . " inv\n\t\tLEFT JOIN " . DB_UG3_USAGE . " it ON inv.itemid = it.id\n\t\tLEFT JOIN " . DB_USERS . " u ON inv.ownerid = u.user_id\n\t\tWHERE inv.id = '" . $_GET['id'] . "'\n\t\tLIMIT 1");
    if (dbrows($result)) {
        $item = dbarray($result);
        if ($item['trading'] != 1) {
            echo $locale['urg_trade_114'];
            print_r($item);
        } elseif ($golddata['cash'] < $item['tradecost']) {
            echo sprintf($locale['urg_trade_115'], $cost - $golddata['cash']);
        } else {
            //change item info
            $result = dbquery("UPDATE " . DB_UG3_INVENTORY . " SET ownerid = '" . $golddata['owner_id'] . "', amtpaid = '" . $item['tradecost'] . "', trading = '0' WHERE id = '" . $_GET['id'] . "' LIMIT 1");
            //decrease user's money
            takegold2($golddata['owner_id'], $item['tradecost'], 'cash');
            //give money to old owner
            payuser($item['owner_id'], $item['tradecost'], 'cash');
            //prepare message
            $subject = sprintf($locale['urg_trade_116'], $item['name']);
            $message = sprintf($locale['urg_trade_117'], $golddata['owner_id'], $golddata['owner_name'], $item['name'], formatMoney($item['tradecost']));
            //send
            sendpm($item['ownerid'], $subject, $message, $golddata['owner_id'], $golddata['owner_name']);
            echo sprintf($locale['urg_trade_118'], $item['name'], $item['owner_name']);
        }
    } else {
        echo $locale['urg_trade_128'];
    }
    pagerefresh('meta', '2', FUSION_SELF . '?op=trade_start');
    closetable();
}
Exemplo n.º 5
0
    for ($i = 0; $i < $tick_red; $i++) {
        $_SESSION['answertable'][$index][$i] = "red";
    }
}
if ($tick_white > 0) {
    for ($i = $tick_red; $i < $tick_red + $tick_white; $i++) {
        $_SESSION['answertable'][$index][$i] = "white";
    }
}
if ($tick_red == 4) {
    $_SESSION['won'] = 1;
}
// start table for game
if ($_SESSION['won'] == 1) {
    global $locale;
    payuser($userdata['user_id'], 50, 'cash');
    echo "<div align='center'><table cellpadding='0' cellspacing='2' border='0' width='500' height='60'>\n";
    echo "<tr><td align='center' width='300'>\n";
    echo "" . $locale['mdmr_204'] . "<br /><br />\n";
    echo "&nbsp;&nbsp;&nbsp;&nbsp;\n";
    echo "<img src=images/" . $_SESSION['gamerand'][0] . " alt='" . $_SESSION['gamerand'][0] . "' /> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \n" . "<img src=images/" . $_SESSION['gamerand'][1] . " alt='" . $_SESSION['gamerand'][1] . "' /> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \n" . "<img src=images/" . $_SESSION['gamerand'][2] . " alt='" . $_SESSION['gamerand'][2] . "' /> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \n" . "<img src=images/" . $_SESSION['gamerand'][3] . " alt='" . $_SESSION['gamerand'][3] . "' /> \n";
    echo "</td>\n";
    $lost = 1;
    echo "<td align='center' valign='middle'> \n";
    echo "<form action='" . $_SERVER['PHP_SELF'] . "' method='post'>\n";
    echo "<input type='submit' class='button' value='" . $locale['mdmr_206'] . "' name='playagain' />\n";
    echo "</form> \n";
} elseif (count($_SESSION['guesstable']) == 12) {
    takegold2($userdata['user_id'], 20, 'cash', '0');
    echo "<div align='center'><table border='0' width='500' height='60'>\n";
    echo "<tr><td align='center' width='300'>\n";
Exemplo n.º 6
0
function textPayout($text, $base, $type = 'word')
{
    if ($type == 'char') {
        $count_message = strlen($text);
    } else {
        $count_message = str_word_count($text);
    }
    if ($count_message <= '5') {
        $payout = $base / $base;
    } elseif ($count_message >= '5' && $count_message <= '20') {
        $payout = $base / 2;
    } elseif ($count_message <= '49' && $count_message >= '21') {
        $payout = $base;
    } elseif ($count_message >= '50') {
        $payout = $base * 2;
    } else {
        $payout = $base;
    }
    payuser($userdata['user_id'], $payout, 'cash');
    return $payout;
}
Exemplo n.º 7
0
            echo "<div align='center'>" . $locale['cnge_211'] . "</div>\n";
            pagerefresh('meta', '3', 'coingame.php');
            closetable();
            include "footer.php";
            exit;
        }
    }
    if ($answer > 50) {
        echo "<div align='center'>" . $locale['cnge_203'] . " " . $bet . "!</div>\n";
        takegold2($userdata['user_id'], $bet, 'cash', '0');
        pagerefresh('meta', '3', 'coingame.php');
    } else {
        if ($answer < 50) {
            $won = $bet * 1.5;
            echo "<div align='center'>" . $locale['cnge_204'] . " " . $won . "!</div>\n";
            payuser($userdata['user_id'], $won, 'cash');
            pagerefresh('meta', '3', 'coingame.php');
        }
    }
} else {
    echo "<form name='form1' method='post' action='coingame.php'>\n";
    echo "<div align='center'>\n";
    echo $locale['cnge_205'];
    echo " <input name='bet' type='text' class='textbox' id='bet' size='20' maxlength='10' />\n";
    echo "<br />\n";
    echo "<input type='submit' class='button' name='submit' value='" . $locale['cnge_206'] . "' />\n";
    echo "</div>\n";
    echo "</form>\n";
}
echo "<br /><br /><div align='center'><a href='http://www.starglowone.com' target='game'>" . $locale['cnge_207'] . "</a></div>\n";
closetable();
Exemplo n.º 8
0
function gamble_gamble()
{
    //Gamble for gold
    global $locale, $golddata, $userdata;
    if (isset($_POST['agree']) && isset($_POST['op'])) {
        $agree = $_POST['agree'];
        $op = $_POST['op'];
    }
    table_top($locale['urg_gamble_113']);
    echo "<table width='100%' cellpadding='5' cellspacing='0' border='0' class='tbl-border'>\n";
    echo "<tr valign='top' width='100%'>\n";
    echo "<td width='100%' align='center'>\n";
    if ($golddata['gamble'] < date('Ymd')) {
        if (isset($agree) == '1') {
            if ($golddata['cash'] + $golddata['bank'] < UGLD_GAMBLE_ALLOW) {
                //simple randomization of the difference between the two numers
                $amount = mt_rand(UGLD_GAMBLE_LOW, UGLD_GAMBLE_HIGH);
                //is it positive amount?
                if ($amount < 0) {
                    $amountLoss = abs($amount);
                    if ($golddata['cash'] > $amountLoss) {
                        takegold2($userdata['user_id'], $amountLoss, 'cash', 1);
                        echo $locale['urg_gamble_114'] . formatMoney($amountLoss) . "!\n";
                        pagerefresh('meta', '5', FUSION_SELF . '?op=gamble_menu');
                        //show message
                    } else {
                        //do we need this? we now have the force and accountant so maybe can remove it?
                        $result = db_query("UPDATE " . DB_UG3 . " SET bank = bank - " . $amountLoss . " WHERE owner_id = '" . $userdata['user_id'] . "' LIMIT 1");
                        echo $locale['urg_gamble_114'] . formatMoney($amountLoss) . $locale['urg_gamble_116'];
                    }
                } else {
                    //$points = $golddata['cash'] + $amount;
                    payuser($userdata['user_id'], $amount, 'cash');
                    echo $locale['urg_gamble_115'] . formatMoney($amount) . '!';
                    pagerefresh('meta', '5', FUSION_SELF . '?op=gamble_menu');
                    //show message
                }
            } else {
                echo $locale['urg_gamble_117'];
            }
            //timer for daily steal only
            dbquery("UPDATE " . DB_UG3 . " SET gamble = '" . date('Ymd') . "' WHERE owner_id = '" . $golddata['owner_id'] . "' LIMIT 1");
        } else {
            if ($golddata['cash'] + $golddata['bank'] < UGLD_GAMBLE_ALLOW) {
                echo "<form action='index.php' method='post'>\n";
                echo "<input type='hidden' name='op' value='gamble_gamble' />\n";
                echo $locale['urg_gamble_118'] . formatMoney(UGLD_GAMBLE_LOW) . "<br />\n";
                echo $locale['urg_gamble_119'] . formatMoney(UGLD_GAMBLE_HIGH) . "<br />\n";
                echo "<strong>" . $locale['urg_gamble_120'] . "</strong>\n";
                echo "<input type='checkbox' name='agree' value='1' />&nbsp;\n";
                echo "&nbsp;<input class='button' type='submit' value='" . $locale['urg_gamble_121'] . "' />\n";
                echo "</form>\n";
            } else {
                echo $locale['urg_gamble_117'];
            }
        }
    } else {
        echo $locale['urg_gamble_122'];
        pagerefresh('meta', '5', FUSION_SELF . '?op=gamble_menu');
        //show message
    }
    echo "</td>\n";
    echo "</tr>\n</table>\n";
    closetable();
}
Exemplo n.º 9
0
    $addnewscore = dbquery("INSERT INTO " . $db_prefix . "varcade_score ( score_id , game_id , player_id , game_score , score_date )  VALUES ('', '{$current['lid']}', '{$player_id}', '{$score}', " . time() . ")");
}
//check the current score against the stored scores
if ($current['reverse'] == "1" && $score < $myscore['game_score']) {
    $addnewscore = dbquery("INSERT INTO " . $db_prefix . "varcade_score ( score_id , game_id , player_id , game_score , score_date )  VALUES ('', '{$current['lid']}', '{$player_id}', '{$score}', " . time() . ")");
    $scorefix = dbquery("DELETE FROM " . $db_prefix . "varcade_score WHERE game_id = '" . $current['lid'] . "' AND player_id = '" . $player_id . "' AND game_score > '" . $score . "'");
}
if ($current['reverse'] == "0" && $score > $myscore['game_score']) {
    $addnewscore = dbquery("INSERT INTO " . $db_prefix . "varcade_score ( score_id , game_id , player_id , game_score , score_date )  VALUES ('', '{$current['lid']}', '{$player_id}', '{$score}', " . time() . ")");
    //remove all other scores for this player
    $scorefix = dbquery("DELETE FROM " . $db_prefix . "varcade_score WHERE game_id = '" . $current['lid'] . "' AND player_id = '" . $player_id . "' AND game_score < '" . $score . "'");
}
if ($varcsettings['usergold'] == "1") {
    if (USERGOLD) {
        $gold = $current['reward'] + $thisbonus;
        payuser($userdata['user_id'], $gold, 'cash');
    } else {
        if (dbcount("(*)", "users_points", "owner_id= '{$player_id}'")) {
            $userpoints = dbarray(dbquery("SELECT * FROM " . $db_prefix . "users_points WHERE owner_id='" . $userdata['user_id'] . "'"));
            $thisreward = $userpoints['points_total'] + $current['reward'] + $thisbonus;
            $result = dbquery("UPDATE " . $db_prefix . "users_points SET points_total = '{$thisreward}' WHERE owner_id = " . $userdata['user_id'] . "");
        } else {
            $newreward = $current['reward'] + $thisbonus;
            $result = dbquery("INSERT INTO " . $db_prefix . "users_points ( owner_id , owner_name , points_total )VALUES ('" . $userdata['user_id'] . "', '" . $userdata['user_name'] . "', '" . $newreward . "');");
        }
        $gold = $current['reward'] + $thisbonus;
    }
}
//***************** END ordinary score handling **********************
if ($varcsettings['popup'] == "1") {
    redirect("" . INFUSIONS . "varcade/gameover.php?p=1&c=1&g={$tour_game}&score={$score}");
Exemplo n.º 10
0
function bank_interest()
{
    //Collect the interest
    global $locale, $golddata;
    if (!ItemOwned("GLD_BANK_ACCOUNT", $golddata['owner_id']) || !UGLD_BANK_ENABLED) {
        redirect(FUSION_SELF . "?op=bank_menu");
    }
    $today = date('Ymd');
    table_top($locale['urg_bank_128']);
    echo "<div>\n";
    if ($golddata['interest'] != $today) {
        $interest_rate = UGLD_BANK_INTEREST / 100;
        $newtotal = $golddata['bank'] * $interest_rate;
        payuser($golddata['owner_id'], $newtotal, 'bank');
        dbquery("UPDATE " . DB_UG3 . " SET interest = '" . $today . "' WHERE owner_id = '" . $golddata['owner_id'] . "' LIMIT 1");
        echo sprintf($locale['urg_bank_122'], formatMoney($newtotal), date("d/m/Y h:i:s A"));
    } else {
        echo $locale['urg_bank_123'];
    }
    echo "</div>\n";
    pagerefresh('meta', '2', FUSION_SELF . '?op=bank_menu');
    closetable();
}
Exemplo n.º 11
0
            		5 = $pmfromname / the user_name of the person sending the message.*/
            if (UGLY_SEND_ADMIN_PM) {
                // send a PM to the Site Owner
                sendpm('1', $locale['ugly_300'], sprintf($locale['ugly_301'], $winner_name), '0', sprintf($locale['ugly_307'], $settings['siteusername']));
            }
            if (UGLY_SEND_WINNER_PM) {
                // send a PM to the WINNER
                sendpm($winner_id, sprintf($locale['ugly_302'], $winner_name), sprintf($locale['ugly_305'], $winner_name, $prize, $jtype), '0', sprintf($locale['ugly_307'], $settings['siteusername']));
            }
            if ($jtype == 'cash' or $jtype == 'chips' or $jtype == 'karma') {
                //update cash or chips or karma amount if type is cash or chips or karma
                payuser($winner_id, $prize, $type = $jtype);
            }
            if ($jtype == 'ribbon') {
                //update ribbon amount if prize is ribbon
                payuser($winner_id, $prize, $type = $jtype);
            }
            // make it so drawing won't be checked again
            $result = dbquery("UPDATE " . DB_UG_LOTTERY_DRAWINGS . " SET ended='1', prize_winner_name='" . $winner_name . "', prize_winner_id='" . $winner_id . "' WHERE draw_id='" . $data['draw_id'] . "'");
            $dellots = dbquery("DELETE FROM " . DB_UG_LOTTERY_LOTS . " WHERE lot_draw='" . $data['draw_id'] . "'");
        } else {
            if (UGLY_SEND_NOT_ENOUGH_TICKETS_PM) {
                // PM site owner that there weren't enough tickets to pick a person
                sendpm('1', $locale['ugly_303'], $locale['ugly_304'], '0', sprintf($locale['ugly_307'], $settings['siteusername']));
            }
            // make it so drawing won't be checked again
            $result = dbquery("UPDATE " . DB_UG_LOTTERY_DRAWINGS . " SET ended='1', prize_winner_name='" . $locale['ugly_308'] . "', prize_winner_id='0' WHERE draw_id='" . $data['draw_id'] . "'");
            $dellots = dbquery("DELETE FROM " . DB_UG_LOTTERY_LOTS . " WHERE lot_draw='" . $data['draw_id'] . "'");
        }
    }
} else {
Exemplo n.º 12
0
        $w++;
    }
    echo "<br /><strong>" . $locale['selo_203'] . "</strong><br />\n";
    $w = 0;
    while ($w < 6) {
        echo " &nbsp; {$player_numbers[$w]}\n";
        $w++;
    }
    if ($points > 3 && $points < 5) {
        payuser($userdata['user_id'], '2000', 'cash');
        echo "<p>" . $locale['selo_204'] . "</p>\n";
    } elseif ($points > 4 && $points < 6) {
        payuser($userdata['user_id'], '10000', 'cash');
        echo "<p>" . $locale['selo_205'] . "</p>\n";
    } elseif ($points == 6) {
        payuser($userdata['user_id'], '20000', 'cash');
        echo "<p>" . $locale['selo_206'] . "</p>\n";
    } elseif ($points > 0 && $points < 4) {
        echo "<p>" . $locale['selo_207'] . " " . $points . " " . $locale['selo_208'] . "</p>\n";
    } else {
        echo "<p>" . $locale['selo_209'] . "</p>\n";
    }
    echo "<form method='post' action='sitelotto.php'>\n";
    echo "<input class='button' type='submit' value='" . $locale['selo_210'] . "{$again}' /></form>\n";
} else {
    echo "<form method='post' action='sitelotto.php' name='sitelottoform'>\n";
    echo "Select 6 numbers between 1 and 45:<br /><br />\n";
    echo "<input class='textbox' type='hidden' name='action' value='play' />\n";
    echo "<input class='textbox' type='text' size='2' maxlength='2' name='n1' value='{$player_numbers['0']}' /> \n";
    echo "<input class='textbox' type='text' size='2' maxlength='2' name='n2' value='{$player_numbers['1']}' /> \n";
    echo "<input class='textbox' type='text' size='2' maxlength='2' name='n3' value='{$player_numbers['2']}' /> \n";