Jump to content
MakeWebGames

Tomo

Members
  • Posts

    17
  • Joined

  • Last visited

    Never

Tomo's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. Re: Silly question... Any help? :|
  2. Re: Silly question... I got {$r['cityname']} from viewuser.php, I assumed it would work elsewhere, I'm still new to PHP, sorry.
  3. I'm trying to set up a 'Location:' thing up on the main page but I can't get the right code for the cityname, I'm using {$r['cityname']} but it's not working. Shouldn't it be {$ir['cityname']} ? That doesn't work either, lol. :(
  4. Re: blocking Looks like it, but that would suck, if I was a donator I'd want full privelages. :P
  5. Re: Disable referrals on a user Perfect, kudos to you.
  6. Re: Counting (nr game) back to 1! :D 1. I'm just kidding, 835
  7. Re: Disable referrals on a user Works perfectly, thank you. If I want to add more than one, can I just seperate the ID's with commas, like 1, 23, 56, 87, 9 etc
  8. This is nothing spectacular and quite frankly anybody could do it but I've never done anything to help anyone here, so I guess I'll help. I noticed our staff were doing competitions by mailing all users with the questions etc, but if only the users that are online get it, it saves mailbox space and confusement for the people who are offline. Open admin.php Find: $q=mysql_query("SELECT * FROM users WHERE user_level=2",$c);   Add after: else if($_POST['cat']==4) $q=mysql_query("SELECT * FROM users WHERE laston>unix_timestamp()-15*60 ORDER BY laston DESC",$c);   Find: Send to admins only   Add after: Send to users online   And we're done. :) I've tested it, it works, but I'm not too sure if the admin panel is different to anyone elses, but if it's different you can use the same code anyway. :P
  9. Re: Disable referrals on a user Ok, this didn't work but there's no doubt I'm doing it wrong, could someone tell me exactly what to put and where to put it?   $_POST['ref'] = abs((int) $_POST['ref']); $ip = ($_SERVER['HTTP_X_FORWARDED_FOR']) ? $_SERVER['HTTP_X_FORWARDED_FOR'] : $_SERVER['REMOTE_ADDR']; $q=mysql_query("SELECT * FROM users WHERE lastip='$ip' AND userid={$_POST['ref']}",$c); if(mysql_num_rows($q)) { die("No creating referral multies. Bad dog."); } if($_POST['ref']) { $q=mysql_query("SELECT * FROM users WHERE userid={$_POST['ref']}",$c); $r=mysql_fetch_array($q); } mysql_query("INSERT INTO users (username, login_name, userpass, level, money, crystals, donatordays, user_level, energy, maxenergy, will, maxwill, brave, maxbrave, hp, maxhp, location, gender, signedup, email, bankmoney, lastip) VALUES( '{$username}', '{$username}', md5('{$_POST['password']}'), 1, $sm, 0, 0, 1, 12, 12, 100, 100, 5, 5, 100, 100, 1, '{$_POST['gender']}', unix_timestamp(), '{$_POST['email']}', -1, '$ip')", $c); $i=mysql_insert_id($c); mysql_query("INSERT INTO userstats VALUES($i, 10, 10, 10, 10, 10)", $c); if($_POST['ref']) { require "global_func.php"; mysql_query("UPDATE users SET crystals=crystals+100 WHERE userid={$_POST['ref']}",$c); event_add($_POST['ref'],"For refering $username to the game, you have earnt 100 valuable crystals!",$c); mysql_query("INSERT INTO referals VALUES('', {$_POST['ref']}, $i, unix_timestamp(),'{$r['lastip']}','$ip')", $c); }
  10. Tomo

    Help

    Re: Help No, not at all, how about you paste the paypal receipt? :P
  11. Yes, a user with a dynamic IP keeps referring a user without his permission and he's gaining countless crystals from it and I would like to disable referrals on just his account, is there any way I can do this?
  12. Re: Money cap.. Doesn't matter, I've fixed it. I missed the (int)'s in admin.php, just changed them to float and it's all cool, thanks guys.
  13. Re: Money cap.. All my int values on cyberbank, bank and money are already float.
  14. Re: Money cap.. Sorry for bumping, but I still need help with this. :(
  15. Re: Money cap.. They're already bigint(25) should I still change em to 20?
×
×
  • Create New...