
Jesse60905
Members-
Posts
265 -
Joined
-
Last visited
Never
Content Type
Profiles
Forums
Events
Everything posted by Jesse60905
-
Re: Please Can Someone Give Me A Kill Mod - Where Users Can Kill Each Other I suppose so however if a player were attacked when training they would have to stop playing for however long they were dead for. However it might be possible to make a small shop that you could access even when dead that could charge a good amount for items to revive you...? Or prehaps a donators item that revived you. Have a bodyguard for $2/hour or a revive pot for 2/$1? People would jump at them.
-
Re: error carnt divorce people Yeah I know but it was still pretty damn funny lol. So anyhoo... Seen anything good on TV?
-
Re: error carnt divorce people I TOLD YOU!!! I knew the noob would ask again. This is definitely a stolen marriage mod. I could make a better one. And I SUCK at coding :-D
-
Re: Hack Your host can't get it back...?
-
Re: Very strange problem.... I already thought of that and for some reason the same error shows. The problem is that it's not recgonizing the mysql_num_rows function and there is to reason it shouldn't.
-
Re: PLZ HELP ME !!!! ARGENTLY!!! yhl weee al herd hm mby nt tm h wll gt hlp erlr,. u no h wll sk gan Lol... By the way. The text above says: Yeah we all heard him. Maybe next time he will get help earlier. You know he will ask again.
-
Re: Please Can Someone Give Me A Kill Mod - Where Users Can Kill Each Other If you want owner to be immune use this: if($ir['hp'] ==1 && $userid !=1) { print "You Have Been Killed! [url='logout.php']> Home[/url]"; $h->endpage(); exit; } If you want staff to be immune use this: if($ir['hp'] ==1 && $ir['user_level'] ==1) { print "You Have Been Killed! [url='logout.php']> Home[/url]"; $h->endpage(); exit; } And if you want it a tad bit more efficient (in my view): if($ir['hp'] ==1) { die("You Have Been Killed"); } Owner immune+efficient if($ir['hp'] ==1 && $userid !=1) { die("You Have Been Killed"); } Staff immune+efficient if($ir['hp'] ==1 && $ir['user_level'] ==1) { die("You Have Been Killed"); } Personally I don't see why somebody would want to use this but I don't really care lol.
-
Ok I am setting up V1 to use on my game but I have run into a very annoying problem. Whenever I try to get promoted in job.php I get the following problem: Here is my entire promote function. function job_promote() { global $ir,$c,$userid,$h; $q=mysql_query("SELECT * FROM jobranks WHERE jrPAY>{$ir['jrPAY']} AND jrSTRN<={$ir['strength']} AND jrLABOURN<={$ir['labour']} AND jrIQN<={$ir['IQ']} AND jrJOB={$ir['job']} ORDER BY jrPAY DESC LIMIT 1",$c); if(mysql_num_rows($q) == 0) { print "Sorry, you cannot be promoted at this time. [url='job.php']> Back[/url]"; } else { $r=mysql_fetch_array($q); mysql_query("UPDATE users SET jobrank={$r['jrID']} WHERE userid=$userid",$c); print "Congrats, you have been promoted to {$r['jrNAME']} [url='job.php']> Back[/url]"; } } Line 97-99: $q=mysql_query("SELECT * FROM jobranks WHERE jrPAY>{$ir['jrPAY']} AND jrSTRN<={$ir['strength']} AND jrLABOURN<={$ir['labour']} AND jrIQN<={$ir['IQ']} AND jrJOB={$ir['job']} ORDER BY jrPAY DESC LIMIT 1",$c); if(mysql_num_rows($q) == 0) { Does anybody have any clue on how to fix?
-
Just want some advice on securing my game.
Jesse60905 replied to Jesse60905's topic in General Discussion
Re: Just want some advice on securing my game. True... -
Just want some advice on securing my game.
Jesse60905 replied to Jesse60905's topic in General Discussion
Re: Just want some advice on securing my game. I think before: function userdata($ir,$lv,$fm,$cm,$dosessh=1) { global $db,$c,$userid, $set; $IP = ($_SERVER['HTTP_X_FORWARDED_FOR']) ? $_SERVER['HTTP_X_FORWARDED_FOR'] : $_SERVER['REMOTE_ADDR']; $db->query("UPDATE users SET laston=unix_timestamp(),lastip='$IP' WHERE userid=$userid"); if(!$ir['email']) { global $domain; die ("<body>Your account may be broken. Please mail admin@{$domain} stating your username and player ID."); } if($dosessh && ($_SESSION['attacking'] || $ir['attacking'])) { print "You lost all your EXP for running from the fight."; $db->query("UPDATE users SET exp=0,attacking=0 WHERE userid=$userid"); $_SESSION['attacking']=0; } $enperc=(int) ($ir['energy']/$ir['maxenergy']*100); $wiperc=(int) ($ir['will']/$ir['maxwill']*100); $experc=(int) ( $ir['exp']/$ir['exp_needed']*100); $brperc=(int) ($ir['brave']/$ir['maxbrave']*100); $hpperc=(int) ($ir['hp']/$ir['maxhp']*100); $enopp=100-$enperc; $wiopp=100-$wiperc; $exopp=100-$experc; $bropp=100-$brperc; $hpopp=100-$hpperc; $d=""; $u=$ir['username']; if($ir['donatordays']) { $u = "[b]{$ir['username']}[/b]";$d="[img=donator.gif]"; } -
Re: SPECIAL ATTACK Hey hey. Watch your language. Round
-
Re: Guess the next poster YAY!!! Hmm.. Tears?
-
Re: Guess the next poster Noperz. Jesse?
-
Re: [Free] [v1] Profile Image Uploader <?php /*----------------------------------------------------- -- Isomerizer -- Copyright held 2007-2008 © Isomerizer.com -- uploadpic.php -----------------------------------------------------*/ include "globals.php"; if(empty($_FILES['imagefile'])) { echo ' Upload an Profile Image: <form name="imageuploader" method="post" action="'.$_SERVER['PHP_SELF'].'" enctype="multipart/form-data"> [i]Path of Image:[/i] <input type="file" name="imagefile"> <input type="submit" name="Submit" value="Upload Image"> </form> (Max 10000 file bytes , Must be file extention gif, jpg, jpeg, png, bmp....) (Images are resized to 150 x 150) '; } else { //Edit below for max fb size of the pic $maxsize=1000000; /*Basic security procedures*/ if(!$_SERVER['REQUEST_METHOD'] == "POST" || !isset($_SERVER['HTTP_USER_AGENT'])){ echo 'Hack Attempt!'; $h->endpage(); exit; } $headerinject = array("Content-Type:", "MIME-Version:", "Content-Transfer-Encoding:", "bcc:", "cc:"); foreach($_POST as $k => $v){ foreach($headerinject as $v2){ if(strpos($v, $v2) !== false){ logBadRequest(); header("HTTP/1.0 403 Forbidden"); exit; } } } /*What extensions can be used?*/ $valid = array( 'image/gif', 'image/png', 'image/jpeg', 'image/jpg', 'image/bmp' ); /*If the extension isnt allowed...*/ if(!in_array($_FILES['imagefile']['type'], $valid)) { $type = strrchr($_FILES['imagefile']['name'], '.'); echo 'This file type '.$type.' is not allowed. [url="'.$_SERVER['PHP_SELF'].'"]Back[/url]'; $h->endpage(); exit; } /*Check image size*/ if ($_FILES['imagefile']['size'] > $maxsize) { echo 'Image to large [url="'.$_SERVER['PHP_SELF'].'"]Back[/url]'; $h->endpage(); exit; } $check = ''.$_FILES['imagefile']['tmp_name'].''; /*Check for .exe files*/ if (is_executable($check) || !is_file($check)) { echo 'The file '.$_FILES['imagefile']['name'].' seems to be harmful to the server [url="u'.$_SERVER['PHP_SELF'].'"]Back[/url]'; @unlink($check); $h->endpage(); exit; } /*Now to create the correct image using php*/ if ($_FILES['imagefile']['type']=="image/jpeg") { $create = @ImageCreateFromJPEG(''.$_FILES['imagefile']['tmp_name'].''); $image = @Imagejpeg($create, 'profilepics/'.$_FILES['imagefile']['name'].''); } if ($_FILES['imagefile']['type']=="image/png") { $create = @ImageCreateFromPNG(''.$_FILES['imagefile']['tmp_name'].''); $image = @Imagepng($create, 'profilepics/'.$_FILES['imagefile']['name'].''); } if ($_FILES['imagefile']['type']=="image/jpg") { $create = @ImageCreateFromJPG(''.$_FILES['imagefile']['tmp_name'].''); $image = @Imagejpg($create, 'profilepics/'.$_FILES['imagefile']['name'].''); } if ($_FILES['imagefile']['type']=="image/gif") { $create = @ImageCreateFromGIF(''.$_FILES['imagefile']['tmp_name'].''); $image = @Imagegif($create, 'profilepics/'.$_FILES['imagefile']['name'].''); } if ($_FILES['imagefile']['type']=="image/bmp") { $create = @ImageCreateFromBMP(''.$_FILES['imagefile']['tmp_name'].''); $image = @Imagebmp($create, 'profilepics/'.$_FILES['imagefile']['name'].''); } /*Destroy the php image*/ @unlink(''.$_FILES['imagefile']['tmp_name'].''); @ImageDestroy($create); /*If php could not create the image*/ if (empty($image) || empty($create) || !$create || !$image) { echo 'The image you are trying to upload seems to be corrupt please try again! [url="'.$_SERVER['PHP_SELF'].'"]Back[/url]'; $h->endpage(); exit; } $path='profilepics/'; $pic=mysql_real_escape_string($_FILES['imagefile']['name']); $picture=$path.$pic; $oldpic=$ir['display_pic']; /*Check to see if its already uploaded*/ if ($picture==$oldpic) { echo ' Image already uploaded![url="'.$_SERVER['PHP_SELF'].'"]Back[/url]'; $h->endpage(); exit; } /*Delete previous image to save space*/ $delete=@unlink($oldpic); if ($delete) { echo 'Previous image deleted from system... '; } if (!$delete) { echo 'No Previous image to be deleted... '; } $dataa=$_FILES['imagefile']['size']; $datab=$_FILES['imagefile']['type']; $datad=$_FILES['imagefile']['name']; /*Information for user*/ echo 'Old Image Location: '.$oldpic.' New Image Location: '.$picture.' Image Uploaded <u>Info:</u> Image Name: '.$datad.' Image Size: '.$dataa.' bytes Type: '.$datab.' [url="'.$_SERVER['PHP_SELF'].'"]Back[/url]'; /*Check DB*/ $check=mysql_query("SELECT COUNT(*) as cnt FROM users WHERE display_pic='$picture'", $c); $checks=mysql_fetch_array($check); if ($checks['cnt']>0) { echo 'Please use another image name [url="'.$_SERVER['PHP_SELF'].'"]Back[/url]'; $h->endpage(); exit; } /*Update DB*/ $db->query("UPDATE users SET display_pic='$picture' WHERE userid=$userid",$c); } $h->endpage(); exit; ?> Converted to V2 =) This is the most updated version as of 11/2/07.
-
Re: [site tools] auto backup your site Yeah but wasn't my way totally awesome?
-
Re: Guess the next poster 5800 Dollar Chips Ferdi?
-
Re: throw an object at the top poster [me=Jesse]dies along with the point of this thread.[/me]
-
Re: throw an object at the top poster [me=Jesse]Laughs Throws brick at Vorless[/me]
-
Re: THIS OR THAT? Continue Posting Sunflower Seeds or Pumpkin Seeds You had better say Sunflower seeds...
-
Re: Contact Staff Form [FREE] VS. Yeah... I did that when just learning. Looking over it again I do see quite a few places where I messed up. But I still feel special =)
-
Just want some advice on securing my game.
Jesse60905 replied to Jesse60905's topic in General Discussion
Re: Just want some advice on securing my game. Ok. Can somebody just give their opinion on which is better? I am leaning towards striptags but I want to be 100% sure. -
Re: [Free] [v1] Profile Image Uploader I converted about 3 posts above. what am i doing rong i keep getting Internal Server Error The server encountered an internal error or misconfiguration and was unable to complete your request. Please contact the server administrator, and inform them of the time the error occurred, and anything you might have done that may have caused the error. More information about this error may be available in the server error log. Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request. and i get this in cpanel error log Premature end of script headers: /home/public_html/uploadpic.php Try contacting your hosting site. They will know more then me. All I know is that is working on my site 100%.
-
Re: Contact Staff Form [FREE] I feel special :-D