Shivski Posted January 15, 2009 Posted January 15, 2009 Re: [mccode v2] Lottery With this, do add the cron to my cron_weekly which exists already? And if so, where abouts in there? Or do I create a brand new cron? Also, which settings do I change to do a daily lotto? Or is it a case of just changing the cron run time? Quote
War_Hero Posted January 17, 2009 Posted January 17, 2009 Re: [mccode v2] Lottery If you're already got a cron_weekly.php, then you can just add this cron at the bottom of it before the ?>. You may need to change a few variables and values, but I'm not sure. :) Quote
SpEcKs Posted February 13, 2009 Posted February 13, 2009 Re: [mccode v2] Lottery So can anyone do that where there is three winners and they split it like say the jackpot is $10,000,000 1st - $5,000,000 of the full jackpot 2nd - $2.5,000,000 of the full jackpot 3rd - $1,000,000 of the full jackpot Quote
SpEcKs Posted February 14, 2009 Posted February 14, 2009 Re: [mccode v2] Lottery It would be good aswell if you could make a page where it had the recent winners of the lottery and the money they won Quote
SpEcKs Posted February 14, 2009 Posted February 14, 2009 Re: [mccode v2] Lottery You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Cron_weekly.php this does not work but does anyone have anything which will make there be three winners Quote
SpEcKs Posted February 16, 2009 Posted February 16, 2009 Re: [mccode v2] Lottery Sorry to double post but does anyone know how to do this above Quote
chris3010 Posted April 9, 2009 Posted April 9, 2009 Re: [mccode v2] Lottery Does anyone know how to make the money get paid to the winner? Mine doesn't work. This is my lottery.php: You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Quote
Josh23 Posted April 9, 2009 Posted April 9, 2009 Re: [mccode v2] Lottery You Need The Cron_weekly.php For That . . Quote
Danny696 Posted April 9, 2009 Posted April 9, 2009 Re: [mccode v2] Lottery does the momey go to their bank or thier hand? Quote
chris3010 Posted April 9, 2009 Posted April 9, 2009 Re: [mccode v2] Lottery Ok heres my cron_weekly.php You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Quote
? Sparks ? Posted May 30, 2009 Posted May 30, 2009 Re: [mccode v2] Lottery Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in /home/strats/public_html/lottery.php on line 26 Quote
Pieces Posted May 30, 2009 Posted May 30, 2009 Re: [mccode v2] Lottery Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in /home/dynamic/public_html/lottery.php on line 26 :? Quote
Akash Posted May 30, 2009 Author Posted May 30, 2009 Re: [mccode v2] Lottery I've posted an updated, what looks to be a bug free version of the lottery. Only one table in the DB with 3 fields. No fields added to the users table and the modification is much more efficient. http://criminalexistence.com/ceforums/i ... ic=29157.0 is the link Please report any bugs, queries or anything else to my email: [email protected] Quote
secret_life Posted December 13, 2010 Posted December 13, 2010 hi, i have take the code of War_hero and i try to secure the string i try to add this [mysql]if(!is_numeric($_POST['buysub'])) { die("Number only. <a href = 'lottery.php' />Retry</a>"); }[/mysql] i try to put this there [mysql]function buy_sub() { global $db,$ir,$userid; $_POST['buysub'] = abs((int) $_POST['buysub']); $cost = 1000; $price = $cost * $_POST['buysub']; if($_POST['buysub'] > 25) { die("You can't buy more than 25 lottery tickets. <a href = 'index.php' />Go Home</a>"); } if($ir['lottery'] >= 25) { die("You have already purchased 25 tickets this week. <a href = 'index.php' />Go Home</a>"); } if($_POST['buysub'] + $ir['lottery'] > 25) { die("You can't buy this many tickets because you would exceed the maximum amount of allowed tickets. <a href = 'index.php' />Go Home</a>"); } if($ir['money'] < $price) { die("You don't have enough money to buy {$_POST['buysub']} tickets. <a href = 'index.php' />Go Home</a>"); } if(!is_numeric($_POST['buysub'])) { die("Number only. <a href = 'lottery.php' />Retry</a>"); }[/mysql] but dont work i dont enderstand why when i enter text like 'money'=2000000 i have this ( You have bought 0 lottery tickets. Go Home ) can someone help me please Quote
ashbow97 Posted January 1, 2011 Posted January 1, 2011 I take it this can't run on Lite even if you did edit the global bit because of the cron weekly? :P Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.