
Yuri_orlov
Members-
Posts
25 -
Joined
-
Last visited
Never
Content Type
Profiles
Forums
Events
Everything posted by Yuri_orlov
-
Re: [mccode v2] Easter Egg Hunt I already have this in my game...but its an all weekend event
-
Re: IE issue ok so I turned it off in the ini. Every thing works fine (well on a double forward sometimes it has an issue and wont load the page but if you refresh it loads fine) so I do ob_start("ob_gzhandler"); and the download or gibberish starts again...(in IE 7) so does that mean I have found a bug in PHP?
-
Re: IE issue oh and to clarify I unset the session before forwarding, but dont destroy to keep the login active
-
Re: IE issue most resent version I think it may have something to do with the header location forwarding since it seems to happen mostly on pages where you are forwarded IE Login.php (b/c the server defaults to index.php). Crimes.php -> validation (does the php dl thing) or you get the validation but when you are forwarded to the crimes it tries to dl crimes.
-
Re: IE issue that would make sense but it happens in IE 7 as well, I am at wits end with the problem
-
I have an IE issue ever since I enabled zlib IE will want to download the php file or just gives gibberish outputs Works fine on all other browsers... Any Ideas other than disabling zlib?
-
Re: New improved mailbox. when the string is already contained within a variable
-
mccode-v2 8 Lines to secure your site from known sql injections.
Yuri_orlov replied to Haunted Dawg's topic in Free Modifications
Re: 8 Lines to secure your site from known sql injections. If you dont understand the mechanics of this then you probably shouldn't have a MC game cause it is going to get hacked... basically he is creating an array to check the get variables that should be intergers and make them integers if not. problem with this general use in the header is that if you reuse variable names and pass a string in a get variable you are screwed. I prefer to check variables on a page by page basis, its a bit more work but it avoids unintended consequences. Also you need to check variables that aren't just gets, since posts can be activated by XSS as well as check strings. You can still inject the stock v2 forums even if you (int) check the topic id -
Re: Clean up cron I started with v1 beta so I have no idea how the mail system is in 2, but I would figure you could do a query that checks to see if there is 0 mails then put the counter to 0....maybe someone with v2 can explain what he is talking about
-
Re: [showcase] Lost City RPG why dont you review it and give some constructive criticism and who knows I might like what you have to say and change it....my users know that if they post something in suggestions that if I like it, it gets implemented
-
I guess its time to come out of the closet Name: Lost City url: http://www.Lostcity.cc use firefox
-
Re: Clean up cron its either 90 or 120 days...I don't know many people that go on vacation for that long...but feel free to change the time or put in a level < 5 or another check... the formula is 86400 X number of days as to logs, we are building a in foul able multi catcher (where the multi purpose is helping the other multis out) so logging more than 30 days in the transfer logs is pointless to us...the multi catching logs aren't touched.
-
Re: Upgrade Users Online the table is only for keeping historic records...
-
Re: Clean up cron it depends on the size of your game, but because most of the queries are delete queries it should actually be pretty efficient if run regularly...I think mine processes in almost a second... I am planning on adding to it a bit, to include a table optimize thing (because if you only run it a month it can create a lot of overhead after its done clearing)
-
ok i got tired of having to add the garbage at the top of every file when i wanted to create a new one so i consolidated and made something im sure a few of you can use create a file called standards.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.*,h.*,p.* FROM users u LEFT JOIN userstats us ON u.userid=us.userid LEFT JOIN houses h ON h.hWILL=u.maxwill LEFT JOIN persnotes p ON u.userid=p.notesID WHERE u.userid=$userid",$c) or die(mysql_error()); $ir=mysql_fetch_array($is); check_level(); check_crimexp(); get_gamerank(); $fm=money_formatter($ir['money']); $lv=date('F j, Y, g:i a',$ir['laston']); $h->userdata($ir,$lv,$fm); $h->menuarea(); $filename = $_SERVER["PHP_SELF"]; $filename = explode('/', $filename); $filename = $filename[count($filename) - 1]; Switch ($filename) { case "index.php": check_one(); break; case "bank.php": check_one(); break; case "criminal.php": check_seven(); break; case "gym.php": check_seven(); break; } function check_one() { global $ir, $c; if ($ir['jail'] != 0) { session_write_close();header('Location: jail.php');Print"You are in the jail for another {$ir['jail']} minutes [url='jail.php']Go There[/url]";exit; } if ($ir['hospital'] != 0) { session_write_close();header('Location: hospital.php');Print"You are in the hospital for another {$ir['hospital']} minutes [url='hospital.php']Go There[/url]";exit; } if ($ir['location'] != 1) { session_write_close(); header('Location: explore2.php'); Print"You are in another area [url='explore2.php']Go There[/url]"; exit; } } function check_seven() { global $ir, $c, $filename,$userid; if ($filename=="gym.php" && $ir['validate']==0) {session_write_close();header('Location: validate.php'); Print "[url='validate.php']Click Here To Validate[/url]"; exit;} if ($filename=="docrime.php" && $ir['validate']==0) {session_write_close();header('Location: validatec.php'); Print "[url='validatec.php']Click Here To Validate[/url]"; exit;} if ($filename=="criminal.php" && $ir['validate']==0) {session_write_close();header('Location: validatec.php'); Print "[url='validatec.php']Click Here To Validate[/url]"; exit;} if($ir['jail'] != 0) { session_write_close();header('Location: jail.php');Print"You are in the jail for another {$ir['jail']} minutes [url='jail.php']Go There[/url]";exit; } if($ir['hospital'] != 0) { session_write_close();header('Location: hospital.php');Print"You are in the hospital for another {$ir['hospital']} minutes [url='hospital.php']Go There[/url]";exit; } if($ir['location'] != 1) { session_write_close();header('Location: explore2.php'); exit; } } ?> then to write a new page all you have to do is: <?php include "standards.php"; code for page goes here $h->endpage(); ?> obviously you need to put each page into the case statement and create a function for each type of transfer and universal things that you need to add to each page, but im sure by now you got the idea of what you can do with this.
-
Re: [Mccode][Free] House Pictures just add a tinytext field into the houses table called hIMAGE then when you select the house on the index page just use ; you can manually edit your houses table to just include the pic name took me about 5 minutes to do....and no if statements, and no extra queries
-
Re: [mccode] How to Setup PayPal Instant Payment Notification - Free! does anyone actually have a working ipn file they can post here? I've tried this one and numerous ones on the web and none seem to work right....i even tried reading the paypal pdf file and everything looked alright on my modified one. Thanks
-
Re: [LITE][FREE] Job Job.php: <?php /*----------------------------------------------------- -- Forgotten-Lands v1.0 BETA -- A product of KrAiG -- Do not send or sell to anyone else -- Please keep this text here -----------------------------------------------------*/ 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']); $lv=date('F j, Y, g:i a',$ir['laston']); $h->userdata($ir,$lv,$fm); $h->menuarea(); switch($_GET['action']) { case "getjob": get_job(); break; case "quitjob": quit_job(); break; default: index(); break; } function index() { global $ir,$c,$userid,$h; If ($ir['job'] != 0) { print "You are already working as a street cleaner, you will recieve: \$1000 a day 2 Iq a day 5 Labour a day So stop slacking and get back to work! "; Print "Quit your job? "; print "[[url='job.php?action=quitjob']YES[/url]] [[url='index.php']NO[/url]]"; } else { print "<h3>Welcome To The Job Center</h3>"; print "There is one job avaliable right now and it envolves streets and cleaning, but atleast you get to drive a street cleaning vehicle! "; print "The job entitles you to: \$1000 a day 2 Iq a day 5 Labour a day "; print "So, if you want the job i will call Clean Street INC now and tell them Taking the job? [[url='job.php?action=getjob']YES[/url]] [[url='index.php']NO[/url]]"; } } function get_job() { global $ir,$c,$userid,$h; print "Ok, Congratulations, you have the job, i will phone them now, you start Today! "; print "Make sure you have a change of clothes, cleaners get alot of strange and, well, disgusting stuff thrown at them! "; mysql_query("UPDATE users SET job=1 WHERE userid=$userid;",$c); } function quit_job() { global $ir,$c,$userid,$h; print "You quit your job! "; print "[url='job.php']Find a new job[/url] "; mysql_query("UPDATE users SET job=0 WHERE userid=$userid;",$c); } $h->endpage(); ?> sql code: ALTER TABLE `users` ADD `job` INT( 11 ) NOT NULL DEFAULT '0' Ok now its fixed. and you can quit the job....use the sql from above