Jump to content
MakeWebGames

Magictallguy

Administrators
  • Posts

    2,140
  • Joined

  • Last visited

  • Days Won

    148

Everything posted by Magictallguy

  1. Re: new login.php Sounds good to me!  
  2. Re: Name Colour Change Hey hey nicely done! :D
  3. Re: Transferring Crimes? Aren't we all...
  4. Re: class mysql error in v2 On some cPanels the htdocs folder is called public_html or www - both take you to the same place. Create a folder called class inside your public_html and upload the 2 class_db_mysql(i).php files!
  5. Re: Large Number.... Try this:   <td><a href='estate.php?property={$r['hID']}'>Buy</td></tr>"; } print "</table>";
  6. Re: Paper Ads He's a good boy *pats him on the head* HAHA!!
  7. Re: crons In which case you error is in your jobs - not crons
  8. Re: securing against mysql injection Nice to see you again AH! Anyway yes :P Note: "mres" stands for "mysql_real_escape_string" (saves me from typing it out all the time!) The idea of a mres is to clean the users input before it reaches the query. Although the manual states to put mres after the query - Nyna's way (and I know this to be right as she effectively rewrote the entire thing xD) puts it before! xD
  9. Re: Attacking There was no need to reset...It's one of the users (or you) that was making Line 145 $mydamage=(int) (($r1['weapon']*$youdata['strength']/($odata['guard']/1.5))*(rand(8000,12000)/10000));   Line 146 $hitratio=max(10,min(60*$ir['agility']/$odata['agility'],95));   Line 200 $dam=(int) (($enweps[$weptouse]['weapon']*$odata['strength']/($youdata['guard']/1.5))*(rand(8000,12000)/10000));   Line 202 $hitratio=max(10,min(60*$odata['agility']/$ir['agility'],95));   Chances are you and the other person had similar stats and weaponry (just a guess xD) If you wish to disable these errors from showing up. Find in header.php error_reporting(E_ALL); And simply either delete it or stick these in front: // EG //error_reporting(E_ALL);
  10. Re: Mass Mail error Quote: "what do i do" 1. Learn to code 2. Learn to punctuate! Damn... 3. Replace your $db->queries' with these: $db->query("INSERT INTO mail VALUES('', 0, 0, {$r['userid']}, unix_timestamp(),'$subj','{$_POST['text']}')"); print "Mass mail sent to {$r['username']}. "; $db->query("UPDATE users SET new_mail=new_mail+1 WHERE userid = {$r['userid']}");
  11. Re: Polls error Are you by any chance a hippy? (Hippies are cool!)  
  12. Re: Drugs Error Hahaha point well made!
  13. Re: who likes mccodes? A simple Google search got me this... Very hard to get? I think not! 3rd result in Google!
  14. Re: Hosting for Mccodes Or www.voxitize.com! xD
  15. Re: V2 Problems Replace your entire massmailer function with this (should be at the bottom of staff_special.php): function massmailer() { global $db,$ir,$c,$userid; if($_POST['text']) { $_POST['text']=nl2br(strip_tags($_POST['text'])); $subj="This is a mass mail from the administration"; if($_POST['cat']==1) $q=$db->query("SELECT * FROM users "); else if($_POST['cat']==2) $q=$db->query("SELECT * FROM users WHERE user_level > 1"); else if($_POST['cat']==3) $q=$db->query("SELECT * FROM users WHERE user_level=2"); else if($_POST['cat']==4) $q=$db->query("SELECT * FROM users WHERE laston>unix_timestamp()-15*60 ORDER BY laston DESC"); else $q=$db->query("SELECT * FROM users WHERE user_level={$_POST['level']}"); while($r=$db->fetch_row($q)) { $db->query("INSERT INTO mail VALUES('', 0, 0, {$r['userid']}, unix_timestamp(),'$subj','{$_POST['text']}')"); print "Mass mail sent to {$r['username']}. "; $db->query("UPDATE users SET new_mail=new_mail+1 WHERE userid = {$r['userid']}"); } print "Mass mail sending complete! [url='staff_special.php?action=massmailer']> Back[/url]"; } else { print "[b]Mass Mailer[/b] <form action='staff_special.php?action=massmailer' method='post'> Text: <textarea name='text' rows='7' cols='40'></textarea> <input type='radio' name='cat' value='1' /> Send to all members <input type='radio' name='cat' value='2' /> Send to staff only <input type='radio' name='cat' value='3' /> Send to admins only <input type='radio' name='cat' value='4' /> Send to users online OR Send to user level: <input type='radio' name='level' value='1' /> Member <input type='radio' name='level' value='2' /> Admin <input type='radio' name='level' value='3' /> Secretary <input type='radio' name='level' value='4' /> Special Op <input type='radio' name='level' value='5' /> Assistant <input type='submit' value='Send' /></form>"; } }
  16. Re: Database...Annoying! Try this:   <?php include "globals.php"; if($ir['jail'] or $ir['hospital']) { die("This page cannot be accessed while in jail or hospital."); } $mpq = $db->query("SELECT * FROM houses WHERE hWILL={$ir['maxwill']}"); $mp = $db->fetch_row($mpq); $_GET['property']=abs((float) $_GET['property']); if($_GET['property']) { $npq = $db->query("SELECT * FROM houses WHERE hID={$_GET['property']}"); $np = $db->fetch_row($npq); if($np['hWILL'] < $mp['hWILL']) { echo "You cannot go backwards in houses!"; } else if ($np['hPRICE'] > $ir['money']) { echo "You do not have enough money to buy the " . $np['hNAME']; } else { $houseprice = ($np['hPRICE']); $db->query("UPDATE users SET money=money-$houseprice,will=0,maxwill={$np['hWILL']} WHERE userid=$userid"); echo "Congrats, you bought the {$np['hNAME']} for £{$np['hPRICE']}!"; } } else if (isset($_GET['sellhouse'])) { $npq = $db->query("SELECT * FROM houses WHERE hWILL={$ir['maxwill']}"); $np = $db->fetch_row($npq); if($ir['maxwill'] == 100) { echo "You already live in the lowest property!"; } else { $houseprice = ($np['hPRICE']); $db->query("UPDATE users SET money=money+$houseprice,will=0,maxwill=100 WHERE userid=$userid"); echo "You sold your {$np['hNAME']} and went back to your wooden hut."; } } else { echo "Your current property: [b]{$mp['hNAME']}[/b] The houses you can buy are listed below. Click a house to buy it. "; if($ir['maxwill'] > 100) { echo "[url='estate.php?sellhouse']Sell Your House[/url] "; } $hq=$db->query("SELECT * FROM houses WHERE hWILL>{$ir['maxwill']} ORDER BY hWILL ASC"); while($r=$db->fetch_row($hq)) { echo "[url='estate.php?property={$r[']{$r['hNAME']}[/url] &nbsp - Cost: £" . number_format($r['hPRICE'], "") . " &nbsp - Will Bar: " . number_format($r['hWILL'], "") . " "; } } $h->endpage(); ?>
  17. Re: Drugs Error How about instead of chucking random errors at us - give us the code 10 lines and and 10 lines down from the error line. (Obviously include the error line!)
  18. Re: ipn_donator help please By "auto-donating" I guess you mean auto crediting? For that you will need to edit your PayPal preferences. I believe it's "sand-box"? Or something like that..
  19. Re: HELP Again - yet another error I have fixed for him..
  20. Re: Voting redemption centre error Or even simpler. Instead of writing the function. Replace mny_stripfmt with mysql_real_escape_string
  21. Re: crons? His crons work fine. It's ej.am! I've fixed this for him..
  22. Re: Slight Problem! Need Help Did you double click it by accident? Sometimes that happens..
  23. Re: Urgent Cron Help Needed Looks like it would work fine :P
  24. Re: Help What version are you running on?
  25. Re: Voting For Crystals This will obviously need to be done and implemented into your PHP but here you go! You will also need a few SQL's..May as well add a full mod on xD Stick this somewhere on your voting.php page (remove the <?php and ?>) <?php include "globals.php"; if($ir['voted'] == 1) { $voted = "<font color=green>Yes</font>"; } else { $voted = "<font color=red>No</font>"; } <table> <tr> <td>Sites</td> <td>Reward</td> <td>Voted Today?</td> <td>Cast Vote</td> </tr> <tr> <td>vote link</td><td>12 crystals</td><td>$voted</td><td>your href to vote</td> </tr> </table> ?>   Very basic but there you go.. EDIT: For got to include the globals file!
×
×
  • Create New...