Jump to content
MakeWebGames

gurpreet

Members
  • Posts

    834
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by gurpreet

  1. I thought it could be a function in my global_func, header or another file, but again this issue only pops up here. I'll keep looking around in other files to see if there's an outstanding issue.     Both of you make very good points. However, with my skill level I wouldn't be able to accomplish the above. This page is just being used to see multiple users on a single IP so they can be monitored, to make sure they aren't transferring money and items between eachother. I've made it so people can only on the same IP but have advised that transfers will be monitored.
  2. Hi Djkanna, thanks for the reply. Now this is coming up, even though user_level isn't being called? You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'user_level='2'' at line 1. I've removed all of the custom functions and made it as default as I can, so I can't see why it's not working or calling the user_level field Here's the script, it was a free mod so I think I can post it:   <?php include "sglobals.php"; /* Created by Magictallguy */ error_reporting(E_ALL); if($ir['user_level'] != 2 && $ir['user_level'] != 3) { die("You can't access this"); } //----------- $_GET['action'] = isset($_GET['action']) && is_string($_GET['action']) ? strtolower(trim($_GET['action'])) : ""; //----------- switch($_GET['action']) { case 'index': index(); break; case 'status': status(); break; case 'status2': status_edit(); break; default: index(); break; } function index() { echo ("10.0.0.0 and 127.0.0.1 are default IPs. Pay no attention to those. <table border='1' class='table' cellpadding='2' cellspacing='2' width='100%'> <tr> <th>IP</th> <th>How Many</th> <th>ID's</th> <th>Usernames</th> <th>Status</th> <th>Cleared By</th> </tr>"); $sql = ( "SELECT `username`,`lastip`, COUNT(`userid`) AS `numusers`, `userid`, CAST(GROUP_CONCAT(`userid`) AS CHAR) AS `userlist`, fedjail " . "FROM `users` " . "WHERE (`lastip` != '') " . "GROUP BY `lastip` " . "HAVING (`numusers` > 1) " . "ORDER BY `lastip`"); $mysql = mysql_query($sql); while($z = mysql_fetch_array($mysql)) { $ipcheck = mysql_query("SELECT * FROM ipfinder WHERE ip = '".$z['lastip']."'") or die(mysql_error()); //Error is here $ip = mysql_fetch_array($ipcheck) or die(mysql_error()); if($ip['status'] == "" || !$ip['status']) { $status = "<font color=blue>Needs Checking</font>"; } ## else { $status = stripslashes($ip['status']); } ## if(!$ip['cleared_by']) { $cleared = "No-one"; } ## else { $cleared = $ip['cleared_by']; } echo ("<tr>"); echo sprintf("<td style='text-align:center;'><a href='ipfinder.php?action=status&ip=%s' target='_blank'>%s</a></td>", $z['lastip'], $z['lastip']); echo sprintf("<td style='text-align:center;'>%s</td>", $z['numusers']); echo sprintf("<td>%s</td>", wordwrap($z['userlist'], 50, " \n", true)); echo sprintf("<td style='text-align:center;'><a href='/viewuser.php?u=%s'>%s</td>", $z['userid'], $z['username']); echo sprintf("<td style='text-align:center;'>%s</td>", $status); echo sprintf("<td style='text-align:center;'>%s</td>", $cleared); echo ("</tr>"); } echo ("</table>"); } function status() { echo sprintf("Editing the status of IP: %s", $_GET['ip']); $GetIPDetails = sprintf("SELECT * FROM <span class='highlight'>ipfinder</span> WHERE (ip = '%s')", $_GET['ip']); $sql = mysql_query($GetIPDetails); $a = mysql_fetch_array($sql); echo (" "); echo ("You can use code, but limit it to font colours only (<font color=colour>Text</font>) "); echo ("<font color=red>Multi</font> - <font color=green>Federal Jailed</font> "); echo ("<font color=green>Library IP</font> "); echo (" <font color=orange>Side Note:</font> "); echo ("<form action='<span class='highlight'>ipfinder</span>.php?action=status2' method='post'>"); echo sprintf("<input type='hidden' name='ip' value='%s' />", $_GET['ip']); echo sprintf("<textarea rows='10' cols='50' name='status'>".$a['status']."</textarea> "); echo ("<input type='submit' value='Change Status'>"); echo ("</form>"); } function status_edit() { $Count = sprintf("SELECT ip FROM <span class='highlight'>ipfinder</span> WHERE (ip = '%s')", $_POST['ip']); $mq = mysql_query($Count); # $Name = sprintf("SELECT userid, username FROM users WHERE (userid = %u)", $_SESSION['userid']); $SN = mysql_query($Name); $fluff = mysql_fetch_array($SN); if(mysql_num_rows($mq) == 0) { $Update = sprintf("INSERT INTO <span class='highlight'>ipfinder</span> VALUES ('%s', '%s', '%s')", $_POST['ip'], mysql_real_escape_string($_POST['status']), mysql_real_escape_string($fluff['username'])); mysql_query($Update) OR DIE(mysql_error()); echo ("<b>Status Updated!</b><hr /><a href='ipfinder.php' target='_blank'>Back</a>"); } else { $Insert = sprintf("UPDATE <span class='highlight'>ipfinder</span> SET status = '%s', cleared_by = '%s' WHERE (ip = '%s')", $_POST['status'], mysql_real_escape_string($fluff['username']), $_POST['ip']); echo ("<b>Status Updated!</b><hr /><a href='ipfinder.php' target='_blank'>Back</a>"); mysql_query($Insert) OR DIE(mysql_error()); } stafflog_add(sprintf("Edited the status of IP %s", $_POST['ip'])); } ?>
  3. I finally decided to start up my game again, and am fixing all of the bugs before it goes live again. However on the IP finder page the query seems to fail and I can't see why.   $sql = ( "SELECT `username`,`lastip`, COUNT(`userid`) AS `numusers`, `userid`, CAST(GROUP_CONCAT(`userid`) AS CHAR) AS `userlist`, fedjail " . "FROM `users` " . "WHERE (`lastip` != '') " . "GROUP BY `lastip` " . "HAVING (`numusers` > 1) " . "ORDER BY `lastip`"); $mysql = mysql_query($sql); while($z = mysql_fetch_array($mysql)) { $ipcheck = mysql_query("SELECT * FROM ipfinder WHERE ip = ".$z['lastip']."") or die(mysql_error()); //Error is here $ip = mysql_fetch_array($ipcheck) or die(mysql_error());   The output is: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '2' at line 2 I tried to echo out $mysql and it came up with Resource ID#13 If you need some more code let me know, thanks
  4. What's the error message peterisgb?
  5. Well get it again and try to fix it?
  6. Lucky was saying that you put: `jail_reason' - Note the ' at the end, not a ` When it should be: `jail_reason`
  7. Post the code up, otherwise we can't help
  8. So you expect to get sales when users cannot even see a demo?
  9. That's the one, forgot what it was called.
  10. http://makewebgames.io/showthread.php/40629-Casino-Blackjack-System-30/page2 Look there.
  11. Just to point out, prototype's site did get hacked so the security may not be up to scratch.
  12. I think that is his site, but he didn't bother to implement basic security, so someone used the forwarding script thing
  13. Have you gone through all of your queries to make sure it is only being executed once?
  14. Hmm sniko posted this just 2 hours before you...
  15. Also post up the error, it could be a number of things.
  16. Define 'people'
  17. Post up your code so people can see what's wrong with it.
  18. Not to sound rude, but all I see is you asking for things. Attempt to do it then post up your code you have and any errors. If you want it done for you, you must be willing to pay.
  19. Well if you can't do that, then offer someone some cash to complete this because, as illusions said, this would get quite complicated
  20. It is just a general fee. This is a basic version of my original goal, but as it grew I had to simplify it to this. Basically if you have 10x an item with 100 upkeep and 20 items with no upkeep, your total is 1000/day.
  21. Bump. Still haven't had any time to complete this mod because I'm working overtime so if anyone can help with that last part it would be appreciated.
  22. So do we have to manually update the rank of the websites ourselves through the staff panel?
  23. Just wondering, why would you want to copy another game? It is obviously bigger, so why would someone want to play your game if they can just play that one?
  24. Check their number of steps before this die? Also chicka, that would only work if you link it like this:   $randnum = mt_rand(1,1000); //Not sure what numbers it is <a href='steets.php?tresde='$randnum'>Streets</a> You would need to generate that random number first.
  25. A good coder can just steal this idea anyway from your site? Why not just post it up?
×
×
  • Create New...