Jump to content
MakeWebGames

Decepti0n

Members
  • Posts

    731
  • Joined

  • Last visited

    Never

Everything posted by Decepti0n

  1. Re: idea for mod Wow where'd you copy that from
  2. Re: Problem with Registration.php! Dunno lol, it might be a few things in the wrong place If you don't really care about telling them if it's too short or if it's too long, just that it's either, you can try if (strlen($_POST['username']) < 3 || strlen($_POST['username']) > 12) exit; for example
  3. Re: Problem with Registration.php!   <?php if (!eregi("(.+){3,12}", $_POST['username'])) die('username between blah blah'); if (!eregi("(.+){5,12}", $_POST['password'])) die('ya'); ?>   Just remember that even if their password is 5 characters, in the database since it's md5'd it'll be 32 or however long they are
  4. Re: Problem with Registration.php! Try adding $gender = mysql_escape_string($_POST['gender']); before this line: mysql_query("INSERT INTO users (username, login_name, userpass, level, money, crystals, donatordays, user_level ...... etc etc
  5. Re: Wich OS do you prefer? They are
  6. Re: World's Second Unlocked iPhone http://iphonejtag.blogspot.com/2007/08/ ... raded.html He traded it for 3 locked iphones and a 350Z
  7. Re: Backwards - sdrawkcaB ?????????digg is cool huh :p
  8. Re: Recycle Query Results   $q=$db->query("SELECT * FROM inventory WHERE inv_userid = 378"); while($r=$db->fetch_row($q)) { print_r($r); } print " xxxx "; mysql_data_seek($q, 0); while($r=$db->fetch_row($q)) { print_r($r); }   The resource ($q) was set to the end of the rows, so it was basically trying to loop from the end, that 'seeks' it back to row 0 (just learnt it now)
  9. Re: World's Second Unlocked iPhone What's it mean if its unlocked?
  10. Re: World's Second Unlocked iPhone It's a fake bid
  11. Re: [free] AJAX Notepad That's some funny lookin ajax
  12. Re: [urgent Help] My Crons Won't Work, They Suddenly Stopped Working!! [Please Read] Nobody will be able to help with that much info, also they wont just stop working on their own, you'd have to have done something
  13. Re: [Help] Please read You could always add another field to your users table, which has the hostname, when they sign up it'll insert their one, then alter the login page to check it against their current hostname
  14. Re: Code takes longer than 30 sec to run.   <?php /*##################################################### -LOTTO -COPYRIGHT William Hector -For use on The Crime Life only. ######################################################*/ require "mysql.php"; require "global_func.php"; global $c; // Password if ($_GET['pass'] != '#########################') { die("Go away"); } $lo=mysql_query("SELECT * FROM lotto WHERE numbers=''",$c) or die(mysql_error()); $l=mysql_fetch_array($lo); // Number generation $na=rand(1,40); $sa = "|1|2|3|4|5|6|7|8|9|10|11|12|13|14|15|16|17|18|19|20|21|22|23|24|25|26|27|28|29|30|31|32|33|34|35|36|37|38|39|40|"; $ga= "|" . $na . "|"; $fa = str_replace($ga, "|", $sa); $nb=rand(1,39); $d = explode("|", $fa); $anb=$d[$nb]; $gb= "|" . $anb . "|"; $fb = str_replace($gb, "|", $fa); $nc=rand(1,38); $d3 = explode("|", $fb); $anc=$d3[$nc]; $gc= "|" . $anc . "|"; $fc = str_replace($gc, "|", $fb); $nd=rand(1,37); $d4 = explode("|", $fc); $and=$d4[$nd]; $gd= "|" . $and . "|"; $fd = str_replace($gd, "|", $fc); $ne=rand(1,36); $d5 = explode("|", $fd); $ane=$d5[$ne]; $ge= "|" . $ane . "|"; $fe = str_replace($ge, "|", $fd); $nf=rand(1,35); $d6 = explode("|", $fe); $anf=$d6[$nf]; $number=$na . "|" . $anb . "|" . $anc . "|" . $and . "|" . $ane . "|" . $anf . "|"; // Ticket check: $week=$l['weekno']; echo "Week number:"; echo $week; $ticyuy = mysql_query("SELECT COUNT(*) FROM lottotic WHERE weekno = {$week}",$c) or die(mysql_error()); $ticyu = mysql_fetch_array($ticyuy); $tot=$ticyu[0]; if ($ticyu[0] == 0) { die("Oh noes!"); } for ($y=0; $y<10; $y++) { $ticyuy = mysql_query("SELECT COUNT(*) FROM lottotic WHERE weekno = {$week}",$c) or die(mysql_error()); $ticyu = mysql_fetch_array($ticyuy); $tot=$ticyu[0]; $div=$tot/10; $start=$div*$y; $tic = mysql_query("SELECT * FROM lottotic WHERE weekno = {$week} LIMIT {$start},{$div}",$c) or die(mysql_error()); // Set all defaults to 0 $ck1 = $ck2 = $ck3 = $ck4 = $ck5 = $ck6 = 0; while($ti=mysql_fetch_assoc($tic)) { $tn=$ti['numbers']; $t = explode("|", $tn); if (in_array($na, $t)) { $ck1 = 1; } if (in_array($anb, $t)) { $ck2 = 1; } if (in_array($anc, $t)) { $ck3 = 1; } if (in_array($and, $t)) { $ck4 = 1; } if (in_array($ane, $t)) { $ck5 = 1; } if (in_array($anf, $t)) { $ck6 = 1; } $nrt=$ck1+$ck2+$ck3+$ck4+$ck5+$ck6; if ($nrt>2) { $id=$ti['id']; $userid=$ti['userid']; $temp_values .= ', ("", "'.$week.'", "'.$userid.'", "'.$nrt.'", "'.$id.'")'; } } // Construct query in the loop and execute outside mysql_query("insert into `lottowin` VALUES " . substr($temp_values, 1)) or die(mysql_error()); } $lid=$l['id']; mysql_query("UPDATE lotto SET numbers='$number' WHERE id=$lid",$c) or die(mysql_error()); $nxtwk=$week+1; mysql_query("INSERT INTO lotto VALUES('', '{$nxtwk}', '0', '', '')",$c) or die(mysql_error()); //money $money=$l['jackpot']; $mth=($money/100); $sipt=($mth*60); $topt=($mth*20); $tept=($mth*10); //6 winners $siwin = mysql_query("SELECT count(*) FROM lottowin WHERE week = {$week} AND nomatch=6",$c) or die(mysql_error()); $siwin_arr = mysql_fetch_array($siwin); if ($siwin_arr[0] == 0) { mysql_query("UPDATE lotto SET jackpot=jackpot+$sipt WHERE weekno=$nxtwk",$c) or die(mysql_error()); } else { $siwin = mysql_query("SELECT * FROM lottowin WHERE week = {$week} AND nomatch=6",$c) or die(mysql_error()); $siners=mysql_num_rows($siwin); $each=$sipt/$siners; while($w=mysql_fetch_array($siwin)) { // These dont appear to be used except in taht event_add //$usr = mysql_query("SELECT * FROM users WHERE userid={$w['userid']}",$c) or die(mysql_error()); //$ur=mysql_fetch_array($usr); $userid=$w['userid']; $monn=money_formatter($each); mysql_query("UPDATE users SET money=money+{$each} WHERE userid=$userid",$c) or die(mysql_error()); // event_add($userid,"Congratualtions {$ur['username']}, you have won {$monn} on the lottery with 6 Balls right",$c); $an=mysql_query("SELECT * FROM lottoan WHERE userid=$userid AND week={$week}",$c) or die(mysql_error()); if (mysql_num_rows($an)>0) { $upd_users[] = $userid; } else { $upd_vals[] = "('', '{$week}', '{$userid}', 1, '{$each}', 0, 0, 0, 0, 0, 0)"; } } // Update outside mysql_query("UPDATE lottoan SET six=six+1, sixmon=sixmon+$each WHERE userid IN (".implode("'", $upd_users).")")or die(mysql_error()); mysql_query("INSERT INTO lottoan VALUES " . implode("," $upd_vals),$c) or die(mysql_error()); } //5balls $towin = mysql_query("SELECT * FROM lottowin WHERE week = {$week} AND nomatch=5",$c) or die(mysql_error()); $toners=mysql_num_rows($towin); $each=$topt/$toners; while($w=mysql_fetch_array($towin)) { $usr = mysql_query("SELECT * FROM users WHERE userid={$w['userid']}",$c) or die(mysql_error()); $ur=mysql_fetch_array($usr); $userid=$w['userid']; $monn=money_formatter($each); mysql_query("UPDATE users SET money=money+{$each} WHERE userid=$userid",$c) or die(mysql_error()); // event_add($userid,"Congratualtions {$ur['username']}, you have won {$monn} on the lottery with 5 Balls right",$c); $an=mysql_query("SELECT * FROM lottoan WHERE userid=$userid AND week={$week}",$c) or die(mysql_error()); if (mysql_num_rows($an)>0) { mysql_query("UPDATE lottoan SET five=five+1, fivemon=fivemon+$each WHERE userid=$userid",$c) or die(mysql_error()); } else { mysql_query("INSERT INTO lottoan VALUES('', '{$week}', '{$userid}', 0, 0, 1, '{$each}', 0, 0, 0, 0)",$c) or die(mysql_error()); } } //4balls $fowin = mysql_query("SELECT * FROM lottowin WHERE week = {$week} AND nomatch=4",$c) or die(mysql_error()); $foners=mysql_num_rows($fowin); $each=$tept/$foners; while($w=mysql_fetch_array($fowin)) { $usr = mysql_query("SELECT * FROM users WHERE userid={$w['userid']}",$c) or die(mysql_error()); $ur=mysql_fetch_array($usr); $userid=$w['userid']; $monn=money_formatter($each); mysql_query("UPDATE users SET money=money+{$each} WHERE userid=$userid",$c) or die(mysql_error()); // event_add($userid,"Congratualtions {$ur['username']}, you have won {$monn} on the lottery with 4 Balls right",$c); $an=mysql_query("SELECT * FROM lottoan WHERE userid=$userid AND week={$week}",$c) or die(mysql_error()); if (mysql_num_rows($an)>0) { mysql_query("UPDATE lottoan SET four=four+1, fourmon=fourmon+$each WHERE userid=$userid",$c) or die(mysql_error()); } else { mysql_query("INSERT INTO lottoan VALUES('', '{$week}', '{$userid}', 0, 0, 0, 0, 1, '{$each}', 0, 0)",$c) or die(mysql_error()); } } //3 balls $thwin = mysql_query("SELECT * FROM lottowin WHERE week = {$week} AND nomatch=3",$c) or die(mysql_error()); while($w=mysql_fetch_array($thwin)) { $usr = mysql_query("SELECT * FROM users WHERE userid={$w['userid']}",$c) or die(mysql_error()); $ur=mysql_fetch_array($usr); mysql_query("UPDATE users SET money=money+100 WHERE userid=$userid",$c) or die(mysql_error()); // event_add($userid,"Congratualtions {$ur['username']}, you have won /$100 on the lottery with 3 Balls right",$c); $an=mysql_query("SELECT * FROM lottoan WHERE userid=$userid AND week={$week}",$c) or die(mysql_error()); if (mysql_num_rows($an)>0) { mysql_query("UPDATE lottoan SET three=three+1, threemon=threemon+10 WHERE userid=$userid",$c) or die(mysql_error()); } else { mysql_query("INSERT INTO lottoan VALUES('', '{$week}', '{$userid}', 0, 0, 0, 0, 0, 0, 1, 10)",$c) or die(mysql_error()); } } $anw = mysql_query("SELECT * FROM lottoan WHERE week = {$week}",$c) or die(mysql_error()); while($w=mysql_fetch_array($anw)) { $userid=$w['userid']; $usr = mysql_query("SELECT * FROM users WHERE userid={$w['userid']}",$c) or die(mysql_error()); $ur=mysql_fetch_array($usr); if ($w['six'] > 0) { $tic=$w['six']; $mon=$w['sixmon']; $monn=money_formatter($mon); event_add($userid,"Congratualtions {$ur['username']}, you have won {$monn} on the lottery by getting 6 balls right with $tic ticket(s)",$c); } if ($w['four'] > 0) { $tic=$w['four']; $mon=$w['fourmon']; $monn=money_formatter($mon); event_add($userid,"Congratualtions {$ur['username']}, you have won {$monn} on the lottery by getting 4 balls right with $tic ticket(s)",$c); } if ($w['five'] > 0) { $tic=$w['five']; $mon=$w['fivemon']; $monn=money_formatter($mon); event_add($userid,"Congratualtions {$ur['username']}, you have won {$monn} on the lottery by getting 5 balls right with $tic ticket(s)",$c); } if ($w['three'] > 0) { $tic=$w['three']; $mon=$w['threemon']; $monn=money_formatter($mon); event_add($userid,"Congratualtions {$ur['username']}, you have won {$monn} on the lottery by getting 3 balls right with $tic ticket(s)",$c); } } ?>   Try that so far, i took out a couple of loops... its hard to understand with those variable names though :P You can also try putting set_time_limit(0); at the top, to see if it completes at all I only edited up to the 5 balls part
  15. Re: Help cron job error SQL injection can't change files though
  16. Re: Help cron job error it won't just 'stop working' especially after someone signed up more than likely, you changed something in your database
  17. Re: Is There Anyway I Can Change The Levels From 1 2 3.. To Like Scumbag, Civilian.. They don't seem to be very good tutorials
  18. Re: Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE................. You put it inside a string
  19. Re: Mc Code V2 Problems. Help required. http://php.net/strlen http://php.net/eregi
  20. Re: Need A Lil Bit Of Help On hackpc.php Mod hackpc.php?ID=whatever
  21. Re: CryptHtml XP - web page (html & script) encryption software That encrypted page loaded SLOW
  22. Re: How Do I Make A Link - So I Press Some Text And It Runes A Query? Err for one, im busy 2. It's not up to you to know how long things take, i finished off a site for another person which took almost 2 months (although that was mostly testinG) 3. I've never said im above anyone else or implied or or anything, or even said i was any good with php 4. There's much more to it than one line of code 5. Its a ridiculous mod anyway 6. You've been annoying by posting 30 threads and demanding new mods made for nothing If it'd take me "2 seconds" to write it, im sure it wouldn't take you much longer?
  23. Re: How Do I Make A Link - So I Press Some Text And It Runes A Query? People care if people genuinely need help, not if they ask in 50 different topics to just have things made for them You said you were going to download things yesterday i think, and now only today you think you can't do it? give it time
  24. Re: Please Can Someone Give Me A Kill Mod - Where Users Can Kill Each Other probably because they have some life left?
  25. Re: sql injection found for v1 and v2 in forums!! Theres more...
×
×
  • Create New...