
Isomerizer
Members-
Posts
1,170 -
Joined
-
Last visited
-
Days Won
3
Content Type
Profiles
Forums
Events
Everything posted by Isomerizer
-
Re: error bug help :p if($_GET['action'] == '1day') { if ($ir['money'] > 199) { $db->query("UPDATE `users` SET `money` = `money` - 200, `haha` = `haha` + 1 WHERE `userid` = ".$ir['userid']." "); } $db->query("UPDATE `users` SET `lol` = 24 WHERE `userid` = ".$ir['userid']." "); echo ' <h1>**********************</h1>'; $h->endpage(); exit; }
-
Re: The Best Game Ever Released GTA series, Rockstar has made the most money and sold the most copies sold so far in history.
-
Re: Best Console Manufacture & Console We all know its Sony's PS3.
-
Re: A simple, fast database class for PHP 4+ and MySQL This db class is great once you get used to it. :)
-
Re: [Free] TownView I see no threat from this, I know my coding skills are more advanced then yours. You make my mods, it proves your immature (proven several times before) and have way to much time on your hands. You might as well, You already attempt to re-sell my modifications. :lol: (http://criminalexistence.com/ceforums/i ... ic=19990.0) Their your admitted to giving my work away, just as bad as selling.
-
Re: online/offline/total users It could cause lag, as its performing them queries every time someone stumbles upon your login.php, one of your most visited pages, plus this page is open to the public and could be constantly hit on to cause the database to go crazy.
-
Re: TownView [$5] http://criminalexistence.com/ceforums/i ... ic=20538.0 Just for you.
-
Very basic mod that will allow users to view other users in the same location, and check to see if their attackable. <?php require("globals.php"); $query = mysql_query( sprintf("SELECT `userid` FROM `users` WHERE (`location` = %u)", $ir['location'])); $p = mysql_num_row($query); $pages = abs(@intval(( ($p / 10) + 1 )); if ($p % 10 == 0) { $pages--; } echo '<center> <form action="'.$_SERVER['PHP_SELF'].'" method="POST">Page:<select name="page">'; // Pages while ($pages = mysql_fetch_object($query)) { for($i=1; $i <= $pages; $i++) { $pa = ($i-1) * 10; echo '<option value="'.$pa.'">'.$pa.'</option>'; } } echo '</select><input type="submit" name="submit" value="Go To!" /></form> </center><table width="80%"> <tr><th width="33%">Name</th> <th>Level</th><th>Money</th><th>Gender</th><th>Online?</th><th>In Jail?</th> <th>In Hosp?</th><th width="33%">Attack?</th></tr>'; $pag = abs(@intval($_POST['page'])); $limit_a = 0; $limit_b = 10; if (isset($_POST['page'])) { $limit_a = $_POST['page'] * 10; $limit_b = $limit_a + 10; } $this_q = sprintf('SELECT username,userid,level,money,gender,laston,hospital,jail FROM `users` WHERE `location` = ("%u") ORDER BY userid ASC LIMIT %u , %u', $ir['location'], $limit_a, $limit_b); $this_qu = mysql_query($this_q) or die (mysql_error()); if(!mysql_num_rows($this_qu)) { echo 'You are the only person in this location'; } else { while($ud = mysql_fetch_object($this_qu)) { if ($ud->laston > unix_timestamp()-15*60) { $status = 'Online'; } else { $status = 'Offline'; } if ($ud->jail > 0) { $jail = 'Yes'; } else { $jail = 'No'; } if ($ud->hospital > 0) { $hosp = 'Yes'; } else { $hosp = 'No'; } echo ' <tr> <td>' . $ud->username . ' [' . $ud->userid . ']</td> <td>' . number_format($ud->level, "") . '</td> <td>'. money_formatter($ud->money) .'</td> <td>'. $ud->gender .'</td> <td>'. $status .'</td> <td>'. $jail .'</td> <td>'. $hosp .'</td>'; if ($hosp == 'No' || $jail == 'No') { echo 'Not attackable'; } else { echo '<td>[url="attack.php?ID=' . $ud->userid . '"]Attack[/url]</td>'; } echo '</tr>'; } } echo '</table>'; $h->endpage(); ?> Made by LostOne & Isomerizer.
-
Re: TownView [$5] Updated LostOnes post. <?php require("globals.php"); $query = mysql_query( sprintf("SELECT `userid` FROM `users` WHERE (`location` = %u)", $ir['location'])); $p = mysql_num_row($query); $pages= abs(@intval(( ($p / 10) + 1 )); if ($p % 10 == 0) { $pages--; } echo ' <center> <form action="'.$_SERVER['PHP_SELF'].'" method="POST">Page:<select name="page">'; // Pages while ($pages = mysql_fetch_object($query)) { for($i=1; $i <= $pages; $i++) { $pa = ($i-1) * 10; echo '<option value="'.$pa.'">'.$pa.'</option>'; } } echo '</select><input type="submit" name="submit" value="Go To!" /></form> </center><table width="80%"> <tr> <th width="33%">Name</th> <th>Level</th> <th>Money</th> <th>Gender</th> <th>Online?</th> <th>In Jail?</th> <th>In Hosp?</th> <th width="33%">Attack?</th> </tr>'; $pag = abs(@intval($_POST['page'])); $limit_a = 0; $limit_b = 10; if (isset($_POST['page'])) { $limit_a = $_POST['page'] * 10; $limit_b = $limit_a + 10; } $this_q = sprintf('SELECT username,userid,level,money,gender,laston,hospital,jail FROM `users` WHERE `location` = ("%u") ORDER BY userid ASC LIMIT %u , %u', $ir['location'], $limit_a, $limit_b); $this_qu = mysql_query($this_q) or die (mysql_error()); if(!mysql_num_rows($this_qu)) { echo 'You are the only person in this location'; } else { while($ud = mysql_fetch_object($this_qu)) { if ($ud->laston > unix_timestamp()-15*60) { $status = 'Online'; } else { $status = 'Offline'; } if ($ud->jail > 0) { $jail = 'Yes'; } else { $jail = 'No'; } if ($ud->hospital > 0) { $hosp = 'Yes'; } else { $hosp = 'No'; } echo ' <tr> <td>' . $ud->username . ' [' . $ud->userid . ']</td> <td>' . number_format($ud->level, "") . '</td> <td>'. money_formatter($ud->money) .'</td> <td>'. $ud->gender .'</td> <td>'. $status .'</td> <td>'. $jail .'</td> <td>'. $hosp .'</td>'; if ($hosp == 'No' || $jail == 'No') { echo 'Not attackable'; } else { echo '<td>[url="attack.php?ID=' . $ud->userid . '"]Attack[/url]</td>'; } echo '</tr>'; } } echo '</table>'; $h->endpage(); ?> (Not tested, will happily fix errors)
-
Re: Name Colour Change killah just basically said.. But here it is again.. $ID = 1; // User & 1 = blue, 2 = green, 3 = yellow, 4 = brown. if ($userid == $ID) { $color = array('1' => 'blue', '2' => 'green', '3' => 'yellow', '4' => 'brown'); echo '<font color="'.$color[$ID].'">'; } Add before username is displayed, then after </font>
-
Re: I don't think shes on about simple mis typed query errors, it could cause injections to become slightly easier with MySQL errors telling them exactly whats going wrong.
-
Re: Help using Tables! Change td .h { font-weight: bold; background-color: #0066FF; } .table th { font-weight: bold; background-color: #0066FF; } to... td .h { background-color: #0066FF; } .table th { background-color: #0066FF; }
-
Re: Honour Gamble {V2} Haven't you just modified mine or UCC's 50/50 gamble mod and just changed a bit of the SQL to money from honour. http://criminalexistence.com/ceforums/i ... ic=16169.0
-
Best way to write this?
Isomerizer replied to AlabamaHit's topic in MySQL, Oracle, Postgress or other DB
Re: Best way to write this? Thanks Floydian for the the replies to these questions, I have learn't quite a bit from this topic and now write mysql queries 100% correctly :-D. Also thank you AlabamaHit for asking the questions. -
Re: Guess Who! Thanks spud, have added to my game. :)
-
Title: Battle Arena Includes: - 1 PHP File - SQL File - Instruction File Description: This mod will be great for those competitive users. Users have the option to join a game, or create one if one is not in progress. 2 different types, Weaponless (Default weapon can only be used, in my game feet), and Normal. Once joined, they can attack others players in the arena, and if they win they earn 1 kill, and will go up in the scoreboard, all games last for 24 hours. Once the game is over all players who are currently playing in the arena will be informed of the winner and the game will be closed. Also, previous results can be seen by players, showing the previous winners and who has the top kills per game. :evil: Screen Shots Payment: Purchase from here: http://isomerizer.com/mods.php?mod=arena (Mod will be encrypted using ioncube, Please send details such as, Server OS, PHP Version, Domain it will be used on.) Can be seen fully working @ www.amazon-survival.com
-
Re: online/offline/total users I don't know why your using <?php ?> <? ?> Shouldn't this just work.. <?php $SecondsCounter = 600; $IPadres = $_SERVER["REMOTE_ADDR"]; // One too many ; $visitorsdb = "visitors.dat"; $time = time(); $count = 1; $file = file($visitorsdb); $OpenFile = fopen($visitorsdb,"w"); fputs($OpenFile,"exit;"); while(list($nr,$line) = each($file)) { list($time,$ipadres) = explode("|",$line); if($time > $time-$SecondsCounter && $ipadres != $IPadres) { fputs($OpenFile,"\n$time|$ipadres|"); $count++; } } fputs($OpenFile,"\n$time|$IPadres|"); fclose($OpenFile); echo sprintf("%s user%s online", number_format($count), $count == 1 ? "" : "s"); ?>
-
Re: [$20] Hide & Seek Ok, thanks to mdshare, I now have ioncube encryption. If you wish to purchase this, please send $20 to [email protected] Also, please provide what OS your server is running, along with the PHP version, and make sure the server has ioncube loader installed. (Most do by default). Oh, and the domain the script will run off of. Thanks.
-
Re: [$20] Hide & Seek You just went straight ahead and sent the payment, when i never actually said you could purchase the mod. Sorry. Wheres the refund button... :|
-
Re: [Free] Maths Challenge Fixed, missed an )
-
This is a little freebie i made for you lot, Will entertain some of the math loving users :P Will generate random sums for users, and allow them to answer them to get on the high score board. Default: 15 second timer. <?php /*----------------------------------------------------- -- Maths Challenge -- Copyright held 2007-2008 by Isomerizer.com -- Free Source -- maths.php -----------------------------------------------------*/ if (file_exists("globals.php")) { //V2 require("globals.php"); } else { //V1 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']); $lv=date('F j, Y, g:i a',$ir['laston']); $h->userdata($ir,$lv,$fm); $h->menuarea(); } echo '<h3>Maths Challenge</h3>'; $salt = 'i_poon_u'; // Salt function html_timer() { $time = 15; echo '<META HTTP-EQUIV="Refresh" CONTENT="'.$time.'; URL='.$_SERVER['PHP_SELF'].'?act='.urlencode('timeout').'">'; } switch ($_GET['act']) { default: index(); break; case 'timeout' : timeout(); break; } function index() { global $ir,$c,$userid,$h; if (isset($_POST['submit'])) { $result = htmlentities(trim($_POST['answer'])); // Trim the post if (!preg_match("`^\s*[-]{0,1}\d+\s*$`ims", $result)) { // Numbers only please! echo 'Numbers can only be input!'; $h->endpage(); exit; } if (md5($salt . $_SESSION['secure']) != md5($salt . $_POST['secure'])) { echo 'Error - Hack Attempt'; // Where are you posting from? ;) $h->endpage(); exit; } echo 'Your Answer: [i]'.$result.'[/i] '; $correct = ' The correct answer was '.$_SESSION['answer']; if ($result != $_SESSION['answer']) { echo 'Answer Incorrect! [url="'.$_SERVER['PHP_SELF'].'"][Restart!][/url]';// Incorrect echo $correct; $_SESSION['score'] = 0; $h->endpage(); exit; } echo 'You got the answer correct! <font color="green">+1 Score</font> [url="'.$_SERVER['PHP_SELF'].'"][Again!][/url]'; echo $correct; if (empty($_SESSION['score']) || $_SESSION['score'] == 0) { $_SESSION['score'] = 1; } else { $_SESSION['score']++; } // Update score $_SESSION['answer'] = 0; $_SESSION['secure'] = 0; $SQL_check = sprintf("SELECT highscore FROM `maths` LIMIT 1", $c); $PERFORM_check = mysql_query($SQL_check); $check = mysql_fetch_object($PERFORM_check); if ($check->highscore < $_SESSION['score']) { $highscore = abs(@intval($_SESSION['score'])); $SQL_update = sprintf("UPDATE `maths` SET `highscore` = ".$highscore.", `userid` = ".$userid."", $c); mysql_query($SQL_update); } $h->endpage(); exit; } $number_a = mt_rand(99,999); $number_b = mt_rand(99,999); $number_c = mt_rand(99,999); $number_d = mt_rand(99,999); $rand = mt_rand(1,3); $rand_b = mt_rand(1,3); $rand_c = mt_rand(1,3); $op = array('1' => '+', '2' => '-', '3' => '*'); // The operators :P (Note: Dont use /) ;) $operator = $op[$rand]; $operator_b = $op[$rand_b]; $operator_c = $op[$rand_c]; $length = mt_rand(1,3); html_timer(); echo '<table width="40%" border="0"><tr><td align="center" valign="middle"><form action="'.$_SERVER['PHP_SELF'].'" method="POST">'; echo $number_a.' '.$operator.' '.$number_b; $answ = $number_a . $operator . $number_b; $formula = "\$answer = $number_a $operator $number_b;"; if ($length == 2) { echo ' '.$operator_b.' '.$number_c; $answ = $number_a . $operator . $number_b . $operator_b . $number_c; $formula = "\$answer = $number_a $operator $number_b $operator_b $number_c;"; } if ($length == 3) { echo ' '.$operator.' '.$number_c.' '.$operator_c.' '.$number_d; $answ = $number_a . $operator . $number_b . $operator_b . $number_c . $operator_c . $number_d; $formula = "\$answer = $number_a $operator $number_b $operator_b $number_c $operator_c $number_d;"; } eval($formula); // Work out that sum! $_SESSION['answer'] = $answer; $SQL_top = sprintf("SELECT * FROM `maths` LIMIT 1", $c); $top = mysql_query($SQL_top); $top_score = mysql_fetch_object($top); $SQL_champ = sprintf("SElECT username FROM `users` WHERE `userid` = ".$top_score->userid." LIMIT 1", $c); $champ = mysql_query($SQL_champ); $champion = mysql_fetch_object($champ); $secure_form = mt_rand(999,9999); $_SESSION['secure'] = md5($salt . $secure_form); $time = 15; echo ' = <input type="text" name="answer" size="4" /> <input type="hidden" name="secure" value="'.md5($salt . $secure_form).'" /> <input type="submit" name="submit" value="Submit" /</form></td></tr></table> [url="'.$_SERVER['PHP_SELF'].'"][Refresh][/url] • Current Score: '.$_SESSION['score'].' • Top Score: '.$top_score->highscore.' • Maths Champion: [url="viewuser.php?u='.$top_score->userid.'"]'.$champion->username.'[/url] ('.$time.' seconds limit to answer question)'; $h->endpage(); exit; } function timeout() { global $ir,$c,$userid,$h; echo 'Your time is up! Score Reset [url="'.$_SERVER['PHP_SELF'].'"][Re-Try][/url]'; $_SESSION['score'] = 0; $_SESSION['answer'] = 0; $h->endpage(); exit; } ?> SQL: CREATE TABLE `maths` ( `highscore` int(255) NOT NULL default '0', `userid` mediumint(25) NOT NULL default '0' ) ENGINE=MyISAM DEFAULT CHARSET=utf8; INSERT INTO `maths` ( `highscore`, `userid` ) VALUES ( '1', '1' ); Can be seen working @ www.amazon-survival.com. Enjoy..
-
Re: [$20] Hide & Seek Can't blame me, 99% of your posts are sarcastic / abusive / insulting. Anyways, You add a little bit of code to your header, mainmenu, heck where ever you want to put these 2 buttons, When on a page it will display the 2 buttons you can choose to hide or search this page, It will then search the page for users. If you check it out on my game, you can see how its done.
-
Re: [$20] Hide & Seek Huh? Where does it say it selects a random PHP page? A user will have the option to hide / search somewhere in the game while playing hide and seek. This could be anywhere they choose, i guess they choose random places, But I'm guessing your referring to SQL selecting a random page for them from your remark, No. You could say the "users" select a random spot on a page. :-P Trusted users, will find out who they are, when if they wish to purchase this modification and contact me i will either Accept or Deny them. :wink: Thanks, My users love it and also find it very "COOL." :-)
-
Title: Hide & Seek Includes: - 1 PHP File - 1 SQL File - 1 Instructions Description: This mod is great fun for the users, They'll have the option to join the game, then go off and hide or search random parts of your site. They can find multiple users by searching parts of the game. Soon as i added it to my game, users loved it, It kills time and cures there boredom when in hospital or waiting around. If you are found by another player, you will receive an event and taking out of the game. Players compete to see who can stay in the game the longest without getting caught. Screenshots: http://isomerizer.com/mods.php?mod=hide Can be seen fully working @ www.amazon-survival.com (I will only sell this mod to trusted users)
-
Re: No I'S Eye lyk cheese on toast. :mrgreen: