Jump to content
MakeWebGames

Karlos

Members
  • Posts

    951
  • Joined

  • Last visited

    Never

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

Karlos's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. Re: Session_id() Question? Well thank you for the reply. I am also moving away from MC Codes and having ago at my own, where I also use tokens to prevent against CSRF. Would you recommend using session_id(); in my own scripts?
  2. Re: [MC Codes V2] Protection ($1) Note: New price! From $5 to $1!
  3. Re: Who is your fave bands on this list of a poll :-o Linkin Park (L)
  4. Karlos

    Best Band

    Re: Best Band Out of them.. Slipknot.. Out of everyone.. Bon Jovi :-P
  5. Re: FlameSpark - Test us now in BETA! It is indeed POG1.
  6. Re: Crack the Safe True, I'm going to look into cookies though.. See if they are better to use. :-)
  7. Re: Crack the Safe I wasn't really saying anything negative, I said they could of been coded better and provided an example...
  8. Re: Crack the Safe   Haven't had a great look into cookies yet, I'll have a look later, thanks! :wink:   I gathered what POG1 was saying Alan.. I'm getting used to having a few files which do the logic for me, and returns me to a page where I display it. But you can't do that through a variable, however in this case, you can. :-P   How about you stop claiming other peoples work, you idiot. :lol:
  9. Re: Crack the Safe I didn't think the coding on either one was great, so I recoded it, nothing is great... Just a quick recode so not the best it could be.. All credits go to carlg   <?php include_once ('globals.php'); echo '<h3>Guess The Code</h3>'; if ($ir['guess'] >= 10) { echo '<p style="color: #FF0000;">Error!</p><p style="color: #FF0000;">You have already attempted this 10 times.</p>'; die($h->endpage()); } if (isset($_POST['n1'])) { if (!ctype_digit($_POST['n1']) || !ctype_digit($_POST['n2']) || !ctype_digit($_POST['n3']) || !ctype_digit($_POST['n4'])) { $_SESSION['Error'] = 'You have inputted an invalid character.'; die(header('Location: guess.php')); } if (strlen($_POST['n1']) != 1 || strlen($_POST['n2']) != 1 || strlen($_POST['n3']) != 1 || strlen($_POST['n4']) != 1) { $_SESSION['Error'] = 'You number is an invalid one.'; die(header('Location: guess.php')); } $Join = $_POST['n1'] . $_POST['n2'] . $_POST['n3'] . $_POST['n4']; $Code = mt_rand(1000, 9999); //$Code = 1337; // Want the code to stay fixed? Add you code here. if ($Join == $Code) { $db->query("UPDATE `users` SET `money`=`money`+1200000 WHERE `userid`=".$userid); $db->query("UPDATE `users` SET `guess`=`guess`+1 WHERE `userid`=".$userid); $_SESSION['Success'] = 'Congrats! You success guessed the correct number!'; } else { $_SESSION['Error'] = 'Sorry, you guessed wrong, please try again.'; $db->query("UPDATE `users` SET `guess`=`guess`+1 WHERE `userid`=".$userid); } $db->query("SELECT `guess` FROM `users` WHERE `userid`=".$ir['userid']); if (isset($_SESSION['Success'])) { echo '<p style="color: #0D961F;">',$_SESSION['Success'],'</p>'; unset($_SESSION['Success']); } if (isset($_SESSION['Error'])) { echo '<p style="color: #FF0000;">',$_SESSION['Error'],'</p>'; unset($_SESSION['Error']); } echo 'Do you thing you are lucky enough to guess this code. If you guess the code correctly you shall win $1,200,000 dollars just for guessing 4 numbers correctly! You have used ',$ir['guess'],' of 10 guesses <form action="guess.php" method="post">'; foreach (array('n1', 'n2', 'n3', 'n4') as $Name) { echo '<select name="',$Name,'">'; for ($i=1; $i<10; ++$i) { echo '<option value="',$i,'">',$i,'</option>'; } echo '</select>'; } echo '<input type="submit" value="Submit" /> </form>'; $h->endpage(); ?>   Sql: UPDATE `users` SET `guess` TINYINT(1) UNSIGNED NOT NULL DEFAULT 0;   Cron: $db->query("UPDATE `users` SET `guess`=0 WHERE `guess`>0");
  10. Re: Crack the Safe I believe someone has already made this mod... :| Edit: I guess I was correct.. ^_^ http://criminalexistence.com/ceforums/i ... ic=17350.0
  11. Re: [V2] Saved Events Isn't UNION() used for SELECT queries only?
  12. Re: [MC Codes V2] Captcha ($1) Sold Out!
  13. Re: [MC Codes V2] Captcha ($1) Copies Left: 1
  14. Re: [MCCODES V2] File Creator and Editor ingame Note: This is not a flame, just personal opinion. I personally feel this mod is a bad idea, just think.. If they get hold of it, they can do serious damage to your site. Also you annoy one of your coders, and he decides to turn against you? Your quite literally fuxed. Why not give them a limited ftp account? :roll: Anyway.. Here's a couple of ideas.. Make it accessible to only a few admins, not all?   if (!in_array($ir['userid'], array(1, 2, 3))) { echo '<p style="color: #FF0000;">Error, invalid user id.</p>'; die(headers::endpage()); }   Make them have to enter a special pass before they can access the add/edit/delete screen..   $Pass = 'AccessMe'; if (isset($_POST['Pass'])) { if ($_POST['Pass'] != $Pass) { echo '<p style="color: #FF0000;">Error, invalid password.</p>'; die(headers::endpage()); } die(header('Location: file_location.php')); } else { // Form Here.. }
  15. Karlos

    PHP Question

    Re: PHP Question   I got to a new place! Upstairs and a brand new comfortable chair :wink:
×
×
  • Create New...