Jump to content
MakeWebGames

peterisgb

Members
  • Posts

    727
  • Joined

  • Last visited

  • Days Won

    40

Everything posted by peterisgb

  1.   ok thats a fair enough point.
  2. yup MTG recoded it for me. never said i made it, just posted up here a working edition. I removed it as i didnt get no thanks or anything for posting it up, it had over 500 views.
  3. I have removed this now, 214 views and not one thank you. so yeah
  4.   Mccodes and Ravan is the Same Script. Just Ravans is stolen code.
  5. hmmm, well i have tried a few login systems out there but i havent found one simple enough and aint good enough to do it myself. Best i could do is strip down mccodes and use that which is a bad idea.....
  6. Yes it does sound like a good idea but it'll take ages to put all the files into the database. But there are a few hundred avi files which seems like alot of hard work when this code grabs all the files needed in the dir I've attached a screeny of my work so far. neither am i any good at creating my own login system to suit my needs.
  7.   No database, The first line $texts = glob($directory ."tv/walkingdead/*/*.flv"); $image = glob($directory ."tv/walkingdead/*/*.jpg"); Selects all Videos and Pictures on the dir of the file manager
  8. wrong board?
  9. Well i tried to put the loops in with eachother then tried to put them together, but i wasnt very good or successfull at doing it. I'm an ok coder but i know what i know and not much other than that, which is why its bad lol. getting there tho. would you be able to put up a demo or somthing with 2 loops in one, i tried to google it but couldnt find what i needed it.
  10. well i have 2 foreach on there which makes this harder i think
  11. Thanks, what a star.
  12. well Here is a Screeny. Basically i want the "Input radio, <-->, Episode Name, the Picture" all on one line. as you can see from the screeny it doesnt line up.
  13. peterisgb

    Help with tables

    Hi i am working on this video script for my local network and i am stuck with the tables, i cant figure out which way round it all goes. i spent all last night untill 5am trying to figuring it out, please help, thanks   <?php include "head.php"; $texts = glob($directory ."tv/walkingdead/*/*.flv"); $image = glob($directory ."tv/walkingdead/*/*.jpg"); echo '<form action="watch.php" method="post"> <table border="0" width="600" cellpadding="0"> <tr><td> '; foreach($texts as $text) { $video="$text"; $file = basename($video, ".flv"); echo '<table border="0" width="300" cellpadding="0"> <tr width="300" height="200"> <td><INPUT type="radio" name="episode" value="'.$video.'"></td> <td><--></td> <td>'.$video.'</td></tr></table> '; } echo '</td><td>'; foreach($image as $imge) { $images="$imge"; $file = basename($images, ".jpg"); echo '<table border="0"> <tr width="300" height="200"> <td><img src="'.$images.'" width="300" height="200"></td> </tr></table>'; } echo '</td> </tr></table> <input type="submit" value="Watch"/></form>'; echo '<br /><br /><br /><br /><a href="index.php">Home </button>'; include "foot.php"; ?>
  14. 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.
  15. Yea the Design is nice, i believe chaotic wars use this exact basis on there game.
  16. i like this mod, but i wouldnt pay for it, sorry but i do like it, nice work.
  17. As said previously that this does work 100% as it is now, just not the user functions right.
  18. yeah for each user. not sure how to do that to be honest.
  19. 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.
  20. well i dont think the cron file, the first part works.
  21. 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(); ?>
  22. can anyone help with a working mockup so i can work on from there please
  23. not a bad idea, i believe that Chaotic-wars has already this.
  24. 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.
  25. 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.
×
×
  • Create New...