Jump to content
MakeWebGames

sfekt`

Members
  • Posts

    40
  • Joined

  • Last visited

    Never

Everything posted by sfekt`

  1. Re: How do You Code Php Tables uhh wtf?
  2. Re: User Notepad uhhh isnt that dbs's codes.. :?
  3. Re: Help me!!!!!!!!!!!!!!! change the folder name with your cronjobs in it.
  4. Re: How do i stop the integer overflow bug?? url to your game?
  5. Re: User "sifter" cron $25? lol.
  6. validation mod pm me if you want me to send you it, i dont wanna use b/w hosting it lol
  7. validation mod   Because on the pages you display it on, have it refresh to validate.php?p=gym or validate.php?p=docrime and it'll forward you back to the docrime.php or gym.php after it's done.
  8. validation mod :bleh:
  9. In lots of games without validations, many users will have bots training and doing crimes for them, so I have coded a validation mod. Step 1 - MySQL Fields: In the users table, create the following fields: valtries (int) 11 validation (int) 11 NOTE: Remember to add these 2 fields to the register.php when inserting new users. Step 2 - The Files: validate.php ------------- <?php session_start(); require "global_func.php"; if($_SESSION['loggedin']==0) { header("Location: login.php");exit; } $userid=$_SESSION['userid']; require "header.php"; $h = new headers; $h->startheaders(); include "mysql.php"; global $c; $is=mysql_query("SELECT u.*,us.* FROM users u LEFT JOIN userstats us ON u.userid=us.userid WHERE u.userid=$userid",$c) or die(mysql_error()); $ir=mysql_fetch_array($is); check_level(); $fm=money_formatter($ir['money']); $cm=money_formatter($ir['crystals'],''); $lv=date('F j, Y, g:i a',$ir['laston']); $h->userdata($ir,$lv,$fm,$cm); $h->menuarea(); if(!$_POST['action']) { $hi=rand(111111,999999); $rand=rand(1,9); $p=$_GET['p']; ?> </pre> <table border="1" width="50%"> [img=img.php] (Please enter the 5 digit number you see above you into this box to verify yourself.)</table> <br><?<br>}<br>else if($_POST['action'] == "go")<br>{<br>$_POST['choice']=abs((int)$_POST['choice']);<br>if($_POST['choice'] != $_SESSION['num'])<br>{<br>mysql_query("UPDATE users SET valtries=valtries-1 WHERE userid=$userid",$c);<br>if($ir['valtries'] == 0)<br>{<br>$jail=rand(100,200);<br>mysql_query("UPDATE users SET valtries='10' WHERE userid=$userid",$c);<br>mysql_query("UPDATE users SET jailreason='Failed to validate 10 times',jail=$jail WHERE userid=$userid",$c);<br>print "You have been sent to jail for $jail minutes for failing to validate within 10 tries.";<br>}<br>die("You have {$ir['valtries']} tries left to choose the correct validation number. If you fail to do so within 10, you will be sent to jail!<br>> [url='validate.php']Back[/url]");<br>}<br>else if($_SESSION['num'] == $_POST['choice'])<br>{<br>mysql_query("UPDATE users SET validation=20,valtries=10 WHERE userid=$userid",$c);<br>print "You successfully validated, now bringing you back to what you were doing.";<br>if($_POST['page'])<br>{<br>?><br><br><?<br>}<br>}<br>}<br>$h->endpage();<br   img.php -------- <?php session_start(); require "global_func.php"; require "mysql.php"; global $c; if($_SESSION['loggedin']==0) { header("Location: login.php");exit; } if(!$_SESSION['userid']) { header ("Location: login.php"); exit; } $userid=$_SESSION['userid']; $is=mysql_query("SELECT u.*,us.* FROM users u LEFT JOIN userstats us ON u.userid=us.userid WHERE u.userid=$userid",$c) or die(mysql_error()); $ir=mysql_fetch_array($is); check_level(); $num=rand(11111,99999); $_SESSION['num']=$num; header("Content-Type: image/png"); $img_handle = imageCreateFromPNG("background2.png"); $color = ImageColorAllocate ($img_handle, 0, 0, 0); ImageString ($img_handle, 5, 12, 9,"$num", $color); ImagePng ($img_handle); ImageDestroy ($img_handle); ?>   Step 3 - Editing Cron Jobs: Locate "cron_hp.php" and add the following line: mysql_query("UPDATE users SET validation=validation-1 WHERE validation > 0",$c);   Step 4 - Redirecting to validate.php: In the files you like the users to validate before using (ie: gym.php, docrime.php), locate the line "$lv=date('F j, Y, g:i a',$ir['laston']);" and directly underneath, paste this: if(!$ir['validation']) { ?> <? }   Any bugs/suggestions? Post it here.
  10. Jail break eh sorta plain :no:
  11. [Lite] Jail So they're jailed if they fail? That's smart :thumbsdown:
  12. [Lite] Jail why not make the jail time based on a rand from the crime brave and so on? Thats how my jail is. Mines a bit more in depth ;)
  13. [Lite] Hack Users PC Warning: Missing argument 4 for userdata() in /home/urbanrio/public_html/header.php on line 16
×
×
  • Create New...