-
Posts
739 -
Joined
-
Last visited
-
Days Won
41
Content Type
Profiles
Forums
Events
Everything posted by peterisgb
-
I like the idea of this. good work. thos i think i would have to agree with Sniko, But as its free i think that if anyone is going to use it they should make it into there own table. Might use this.
-
Yea the Design is nice, i believe chaotic wars use this exact basis on there game.
-
i like this mod, but i wouldnt pay for it, sorry but i do like it, nice work.
-
As said previously that this does work 100% as it is now, just not the user functions right.
-
yeah for each user. not sure how to do that to be honest.
-
hm,, well this system kinda works already, but not quite got the right user selection really. my database is like this: users database there is 'lotto1' which is 1 for got ticket and 0 for not. Meanwhile into its own table lotto and lottodraw. lotto is where the userid and lotto numbers go and lottodraw is where the Last numbers picked get entered into. This system does work now, just the user selection that i ain't sure. It seems to draw the lotto and credit me fine when i get correct number and x2 prize for 2 or matching numbers. After coding mccodes for years i still ain't very good at it. I have updated the Main post with the latest update. P.S, Sorry for my grammar and stuff, my English writing was never any good.
-
well i dont think the cron file, the first part works.
-
Hi i'm trying to make a lottery cron for my lotto system i am making, i aint very good at cron files so i was wondering if i could get help with it. Below is what i have done so far: <?php include "config.php"; global $_CONFIG; define("MONO_ON", 1); require "class/class_db_{$_CONFIG['driver']}.php"; $db=new database; $db->configure($_CONFIG['hostname'], $_CONFIG['username'], $_CONFIG['password'], $_CONFIG['database'], $_CONFIG['persistent']); $db->connect(); $c=$db->connection_id; $db->query("TRUNCATE TABLE lottolast;"); $num1=rand(1, 15); $num2=rand(1, 15); $num3=rand(1, 15); $num4=rand(1, 15); $num5=rand(1, 15); $uc = $db->query("SELECT * FROM lotto"); $cl = $db->fetch_row($uc); $pc = $db->query("SELECT lotto1 FROM users WHERE userid={$cl['userid']}"); $pl = $db->fetch_row($pc); if($cl['lottery1'] == $num1) { $cor1="1000000"; } else { $cor1="0"; } if($cl['lottery2'] == $num2) { $cor2="1000000"; } else { $cor2="0"; } if($cl['lottery3'] == $num3) { $cor3="1000000"; } else { $cor3="0"; } if($cl['lottery4'] == $num4) { $cor4="1000000"; } else { $cor4="0"; } if($cl['lottery5'] == $num5) { $cor5="1000000"; } else { $cor5="0"; } if($pl['lotto1'] == 1) { $prize=$cor1+$cor2+$cor3+$cor4+$cor5; } else { $prize=0; } $db->query("UPDATE users SET bankmoney=bankmoney+$prize WHERE userid={$cl['userid']}"); $db->query("UPDATE users SET lotto1=0"); $db->query("INSERT INTO lottolast SET lotto1=$num1, lotto2=$num2, lotto3=$num3, lotto4=$num4, lotto5=$num5"); print " Prize: $prize <br /> Number 1: $num1 <br /> Number 2: $num2 <br /> Number 3: $num3 <br /> Number 4: $num4 <br /> Number 5: $num5 <br /> Users {$cl['userid']} <br /> "; ?> I have also attached lotto.php. this does work. <?php include "globals.php"; switch($_GET['action']) { case 'play2': do_play(); break; case 'play': conf_play(); break; default: prefs_home(); break; } function prefs_home() { global $db,$ir,$c,$userid,$h; $uc = $db->query("SELECT * FROM lotto WHERE userid=$userid"); $cl = $db->fetch_row($uc); $dc = $db->query("SELECT * FROM lottolast"); $ll = $db->fetch_row($dc); $num1=rand(1, 15); $num2=rand(1, 15); $num3=rand(1, 15); $num4=rand(1, 15); $num5=rand(1, 15); print "<h3>Lottery HQ</h3> You can enter each set once. <table width='75%'> <tr> <td><b>Set</b></td> <td><b>Prize</b><small> (per correct number)</small></td> <td><b>Ticket Cost</b></td> <td><b>Action</b></td> </tr> <tr> <td>1</td> <td>$1,000,000</td> <td>$5,000</td> <td>"; if($ir['lotto1'] == 1) { print "NONE"; } else { print "<a href='lotto?action=play'>Play Set 1</a>"; } print " </td> </tr>"; if($ir['lotto1'] == 1) { print " <tr> <td align='center' colspan='4'>Your Numbers are. {$cl['lottery1']}, {$cl['lottery2']}, {$cl['lottery3']}, {$cl['lottery4']}, {$cl['lottery5']}"; } print " </td></tr> </table> <br /><br /> Last Weeks lotto Numbers <br /> {$ll['lotto1']} , {$ll['lotto2']} , {$ll['lotto3']} , {$ll['lotto4']} , {$ll['lotto5']}."; } function conf_play() { global $ir,$c,$userid,$h; if($ir['lotto1'] == 1) { die ("You have already entered this lotto set.<a href='lotto'>Lotto Home</a>"); } if($ir['money'] <= 4999) { die ("You Either do not have cash in hand or you dont have enough to buy a ticket.<a href='lotto'>Lotto Home</a>"); } print " <div class='form_description'> <h2>Pick one number from each line</h2> </div> <form action='lotto?action=play2' method='post'> <table width='100%'> <tr><td align='center'> <hr /> </td></tr> <tr><td align='center'> <INPUT type='radio' name='lottery1' value='1'>1. <INPUT type='radio' name='lottery1' value='2'>2. <INPUT type='radio' name='lottery1' value='3'>3. <INPUT type='radio' name='lottery1' value='4'>4. <INPUT type='radio' name='lottery1' value='5'>5. <INPUT type='radio' name='lottery1' value='6'>6. <INPUT type='radio' name='lottery1' value='7'>7. <INPUT type='radio' name='lottery1' value='8'>8. <INPUT type='radio' name='lottery1' value='9'>9. <INPUT type='radio' name='lottery1' value='10'>10. <INPUT type='radio' name='lottery1' value='11'>11. <INPUT type='radio' name='lottery1' value='12'>12. <INPUT type='radio' name='lottery1' value='13'>13. <INPUT type='radio' name='lottery1' value='14'>14. <INPUT type='radio' name='lottery1' value='15'>15. </td></tr> <tr><td> <hr /> </td></tr> <tr><td align='center'> <INPUT type='radio' name='lottery2' value='1'>1. <INPUT type='radio' name='lottery2' value='2'>2. <INPUT type='radio' name='lottery2' value='3'>3. <INPUT type='radio' name='lottery2' value='4'>4. <INPUT type='radio' name='lottery2' value='5'>5. <INPUT type='radio' name='lottery2' value='6'>6. <INPUT type='radio' name='lottery2' value='7'>7. <INPUT type='radio' name='lottery2' value='8'>8. <INPUT type='radio' name='lottery2' value='9'>9. <INPUT type='radio' name='lottery2' value='10'>10. <INPUT type='radio' name='lottery2' value='11'>11. <INPUT type='radio' name='lottery2' value='12'>12. <INPUT type='radio' name='lottery2' value='13'>13. <INPUT type='radio' name='lottery2' value='14'>14. <INPUT type='radio' name='lottery2' value='15'>15. </td></tr> <tr><td> <hr /> </td></tr> <tr><td align='center'> <INPUT type='radio' name='lottery3' value='1'>1. <INPUT type='radio' name='lottery3' value='2'>2. <INPUT type='radio' name='lottery3' value='3'>3. <INPUT type='radio' name='lottery3' value='4'>4. <INPUT type='radio' name='lottery3' value='5'>5. <INPUT type='radio' name='lottery3' value='6'>6. <INPUT type='radio' name='lottery3' value='7'>7. <INPUT type='radio' name='lottery3' value='8'>8. <INPUT type='radio' name='lottery3' value='9'>9. <INPUT type='radio' name='lottery3' value='10'>10. <INPUT type='radio' name='lottery3' value='11'>11. <INPUT type='radio' name='lottery3' value='12'>12. <INPUT type='radio' name='lottery3' value='13'>13. <INPUT type='radio' name='lottery3' value='14'>14. <INPUT type='radio' name='lottery3' value='15'>15. </td></tr> <tr><td> <hr /> </td></tr> <tr><td align='center'> <INPUT type='radio' name='lottery4' value='1'>1. <INPUT type='radio' name='lottery4' value='2'>2. <INPUT type='radio' name='lottery4' value='3'>3. <INPUT type='radio' name='lottery4' value='4'>4. <INPUT type='radio' name='lottery4' value='5'>5. <INPUT type='radio' name='lottery4' value='6'>6. <INPUT type='radio' name='lottery4' value='7'>7. <INPUT type='radio' name='lottery4' value='8'>8. <INPUT type='radio' name='lottery4' value='9'>9. <INPUT type='radio' name='lottery4' value='10'>10. <INPUT type='radio' name='lottery4' value='11'>11. <INPUT type='radio' name='lottery4' value='12'>12. <INPUT type='radio' name='lottery4' value='13'>13. <INPUT type='radio' name='lottery4' value='14'>14. <INPUT type='radio' name='lottery4' value='15'>15. </td></tr> <tr><td> <hr /> </td></tr> <tr><td align='center'> <INPUT type='radio' name='lottery5' value='1'>1. <INPUT type='radio' name='lottery5' value='2'>2. <INPUT type='radio' name='lottery5' value='3'>3. <INPUT type='radio' name='lottery5' value='4'>4. <INPUT type='radio' name='lottery5' value='5'>5. <INPUT type='radio' name='lottery5' value='6'>6. <INPUT type='radio' name='lottery5' value='7'>7. <INPUT type='radio' name='lottery5' value='8'>8. <INPUT type='radio' name='lottery5' value='9'>9. <INPUT type='radio' name='lottery5' value='10'>10. <INPUT type='radio' name='lottery5' value='11'>11. <INPUT type='radio' name='lottery5' value='12'>12. <INPUT type='radio' name='lottery5' value='13'>13. <INPUT type='radio' name='lottery5' value='14'>14. <INPUT type='radio' name='lottery5' value='15'>15. </td></tr> <tr><td> <hr /> </td></tr> </table> <input type='submit' value='Play these numbers' class='loginbox' /></form> <a href='lotto'>Lotto Home</a> "; } function do_play() { global $db,$ir,$c,$userid,$h; $db->query("UPDATE lotto SET lottery1='{$_POST['lottery1']}', lottery2='{$_POST['lottery2']}', lottery3='{$_POST['lottery3']}', lottery4='{$_POST['lottery4']}', lottery5='{$_POST['lottery5']}'"); $db->query("UPDATE users SET lotto1='1', money=money-5000 WHERE userid=$userid"); print "Your Numbers Are <h3> {$_POST['lottery1']}, {$_POST['lottery2']}, {$_POST['lottery3']}, {$_POST['lottery4']}, {$_POST['lottery5']}.</h3> Good Luck. <a href='lotto'>Back</a>"; } $h->endpage(); ?>
-
can anyone help with a working mockup so i can work on from there please
-
not a bad idea, i believe that Chaotic-wars has already this.
-
ok most of this you guys said has confuzzled me lol. I use this in the header.php if($ir['display_pic']) { $display = "<img src='{$ir['display_pic']}' width='17' height='17' />"; } else { $display = "<img src='images/nopic.png' width='17' height='17' />"; } if($ir['user_level'] == 1) { $rankcolour = "#ffffff"; } if($ir['user_level'] == 2) { $rankcolour = "#06519b"; } if($ir['user_level'] >= 3) { $rankcolour = "#49b536"; } if($ir['donatordays']) { $d = "<img src='donator.gif' alt='Donator: {$ir['donatordays']} Days Left' />"; $rankcolour = "red"; } $user = $ir['username']; $usernamei = "<font color='$rankcolour'>$display $user $d</font>"; and $usernamei in the header file of course which this works well.
-
well thats the thing, i want it to show other users, userlist/usersonline. so in my case $r is needed. or it would be peterisgb 1 1,000,000 peterisgb 1 1,000,000....... which isnt what i'm looking for. it needs to show each user by itself. using the $ir already works. i want it to be used for all usernames.
-
Hi, i'm trying to make names in my game universal. Eg have a code like this if($r['display_pic']) { $display = "<img src='{$r['display_pic']}' width='17' height='17' />"; } else { $display = "<img src='images/nopic.png' width='15' height='15' />"; } if($r['user_level'] == 1) { $rankcolour = "#ffffff"; } if($r['user_level'] == 2) { $rankcolour = "#06519b"; } if($r['user_level'] >= 3) { $rankcolour = "#49b536"; } if($ir['donatordays']) { $d = "<img src='donator.gif' alt='Donator: {$r['donatordays']} Days Left' />"; $rankcolour = "red"; } $user = $r['username']; $usernamei = "<font color='$rankcolour'>$display $user $d</font>"; in the global_func file. Then put anywhere on the site $usernamei like useronline/userlist, This don't work, but how or what do i need to do to get this to work. Thanks in Advance Pete
-
ok can this be moved to the right board/
-
Got a Demo anywhere?
-
[In Prod.] Enhanced Registration
peterisgb replied to KyleMassacre's topic in Requests & In Production
I think this sounds good and worth a gander if you release it, probs use it as i don't like the basic one. -
could you post a screeny
-
oh right, on my old site i iframed it.
-
i must be a complete idiot of something, but what does it exactly do....
-
screenshot?
-
just wondering and bringing this up after so long but its now 10th May 2014. (Nearly 2 years later.) Is there any chance of some news now......
-
I'm stuck here, looking at main menu ideas... i look at it and not sure what i want to do to it, can someone throw a few ideas or screenys of theres to see if it can spark an idea. Thanks.
-
You should be able to edit it in the header file.
-
well so far the ? is still there like so viewuser?u=1 instead of viewuser.php?u=1. i dont mind the ?u=1. i just though it would of been easier to use .htaccess to change the link looks instead of going through each page (which will takes for ages)
-
so isnt there a code that i can just stick in .htaccess