Jump to content
MakeWebGames

Recommended Posts

Posted

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?

  • Replies 89
  • Created
  • Last Reply

Top Posters In This Topic

Posted

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. :)

  • 4 weeks later...
Posted

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

Posted

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

  • 1 month later...
Posted

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.

  • 1 month later...
Posted

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

Posted

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

:?

  • 1 year later...
Posted

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

  • 3 weeks later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...