-
Posts
244 -
Joined
-
Last visited
-
Days Won
1
Content Type
Profiles
Forums
Events
Everything posted by Analog
-
Re: Add new level user_levels are set by default as 0, 1, or 2. 0 is for NPC (Non Playing Character), 1 for regular player, 2 for staff. So in theory you just expand this by adding 3, 4, 5, etc....to suit your needs. Now when expanding this it can create problems of security to certain things, ie owner only pages, limiting lower staffs actions, etc.... With a little planning adding multiple tiers of staff positioning is wonderful. As you can limit what each level of staff can do. However if you have no coding knowledge, you are probably better off just leaving it the way it is.
-
Re: Sql Injections? Why stop at the markets and forums. Any time data is passed from the user to the system it needs checked out to make sure its safe. I use the following functions to check all data passed. <?php // Check $_POST Number function SecureNumPost($key) { if(isset($_POST[$key]) && is_string($_POST[$key]) && preg_match("`^\d+$`ims", $_POST[$key])) { $value = @intval($_POST[$key]); return $value; } else { SecureError($_POST[$key]); } } // Check $_GET Number function SecureNumGet($key) { if(isset($_GET[$key]) && is_string($_GET[$key]) && preg_match("`^\d+$`ims", $_GET[$key])) { $value = @intval($_GET[$key]); return $value; } else { SecureError($_GET[$key]); } } //Check $_POST Text function SecureTextPost($key) { if(isset($_POST[$key]) && is_string($_POST[$key])) { if(get_magic_quotes_gpc()) { $value = stripslashes($_POST[$key]); } else { $value = $_POST[$key]; } return $value; } else { SecureError($_POST[$key]); } } //Check $_GET Text function SecureTextGet($key) { if(isset($_GET[$key]) && is_string($_GET[$key])) { if(get_magic_quotes_gpc()) { $value = stripslashes($_GET[$key]); } else { $value = $_GET[$key]; } return $value; } else { SecureError($_GET[$key]); } } //Deal with errors from security checks function SecureError($value) { die("You have tried passing invalid information through our system."); } ?>
-
Re: [v1/v2] Marrgiage with Shared House[v1/v2] Thanks for helping spread the use of illegal codes!
-
Re: Large Number.... It appears to basically be a problem of not enough room within the table to display the entire number, thus its making 3.3e+06...etc I say this because in the column to the right it is correctly displayed... Find: <td>[url='estate.php?property={$r[']{$r['hNAME']}[/url]   - Cost: £" . number_format($r['hPRICE'], "") . "   - Will Bar: " . number_format($r['hWILL'], "") . " </tr>"; Change to: <td>[url='estate.php?property={$r[']Buy[/url]</td></tr>"; What I did is removed all the house info from the link. Why display it twice in the same place?
-
Re: What game engine is... That has got to be a unique set of code. Very attractive game, even signed up for it.
-
Re: forum SQL injection Here is a search of phpBB on google http://www.google.com/search?hl=en&q=%2 ... y%22&meta= I'd suggest SMF
-
Re: New Amazing Register Page After looking at it again you are semi correct. Checking in IE it does display them centered, however in FF it does not.
-
Re: [mccodes] Free Crystal Bank [v1] Are you using the version 2 set of code? the function query() is specific to v2, it is not used in version 1 coding.
-
Re: [FAQ] Crons Guide 1. Make sure you have the correct code entered for the cron job 2. Make sure you have the correct path to the cron file.
-
Re: Introductions Welcome to our world livdolu. Enjoy your time with us... Got a question, don't be afraid to ask...
-
Any one got tips for a new mccode game creator? (v2)
Analog replied to Ragnar's topic in General Discussion
Re: Any one got tips for a new mccode game creator? (v2) The crime success rate can be changed for each crime...thus making some harder than others Security is important, don't just check $_GET....also check $_POST, depending if the input is text or numerical will also require a different check. Such as a string, integer, length, etc... -
Re: Items Pic mod [v2] I've seen it with pics in several different places. I don't even use this, someone had asked me too convert a similar mod from v1 to v2...
-
Re: New Amazing Register Page I'd actually have to agree. With them to the far left it makes the table seem off balance in a weird way. Even the header image is not centered, it is also pulled to the left side of the table.
-
Re: View User Addon - Profile Views correct, it would +1 the person viewing the profile... should be... v1 mysql_query ("UPDATE users SET pviews=pviews+1 WHERE userid={$r['userid']}"); v2 $db->query ("UPDATE users SET pviews=pviews+1 WHERE userid={$r['userid']}");
-
Re: Help!! bugs All the links, they'll have to follow the structure I posted, go through the code its easy to figure out.
-
Re: Items Pic mod [v2] Sorry, this code is not open source and should not be uploaded. The instructions are simple and tell you exactly where to place everything. Follow them from top to bottom and there shouldn't be any problems.
-
Re: Help!! bugs In its current version you can easily add mcc mods to it. Just a few notes though all links are done through index.php ie. index.php?module=filetobecalled Only basic player data is loaded by the main system. If a mod would need info that is not in the user table, it has to be called upon. Only the user table is load by default.
-
Re: Items Pic mod [v2] To add to edit item... Must have already done the first part of this mod Open staff_items.php Find: Armor Defense: <input type='text' name='armor' value='{$itemi['armor']}' /><hr /> After Add: [b]Item Pics[/b] <input type='text' name='itmpic' value='{$itemi['itmpic']}' /><hr /> Find: $m=$db->query("INSERT INTO items VALUES('{$_POST['itmid']}',{$_POST['itmtype']},'$itmname','$itmdesc',{$_POST['itmbuyprice']},{$_POST['itmsellprice']},$itmbuy, '{$_POST['effect1on']}', '$efx1', '{$_POST['effect2on']}', '$efx2', '{$_POST['effect3on']}', '$efx3', $weapon, $armor)"); Replace with: $m=$db->query("INSERT INTO items VALUES('{$_POST['itmid']}',{$_POST['itmtype']},'$itmname','$itmdesc',{$_POST['itmbuyprice']},{$_POST['itmsellprice']},$itmbuy, '{$_POST['effect1on']}', '$efx1', '{$_POST['effect2on']}', '$efx2', '{$_POST['effect3on']}', '$efx3', $weapon, $armor, '{$_POST['itmpic']}')"); Save staff_items.php Upload to server To be used for future file mods
-
This was requested for version 2, changes to 2 files...staff_items.php, iteminfo.php.... If you would like others, reply and I'll add them when time allows -------------------------------- BACKUP YOUR FILES BEFORE MAKING ANY CHANGES -------------------------------- Create a new directory (folder) in your root, name it itmpics Run this sql: ALTER TABLE `items` ADD `itmpic` VARCHAR( 255 ) NOT NULL ; Open staff_items.php Find: Armor Defense: <input type='text' name='armor' value='0' /><hr /> After add: [b]Item Pics[/b] <input type='text' name='itmpic' value='' /><hr /> Find: $m=$db->query("INSERT INTO items VALUES('',{$_POST['itmtype']},'$itmname','$itmdesc',{$_POST['itmbuyprice']},{$_POST['itmsellprice']},$itmbuy, '{$_POST['effect1on']}', '$efx1', '{$_POST['effect2on']}', '$efx2', '{$_POST['effect3on']}', '$efx3', $weapon, $armor)"); Replace with: $m=$db->query("INSERT INTO items VALUES('',{$_POST['itmtype']},'$itmname','$itmdesc',{$_POST['itmbuyprice']},{$_POST['itmsellprice']},$itmbuy, '{$_POST['effect1on']}', '$efx1', '{$_POST['effect2on']}', '$efx2', '{$_POST['effect3on']}', '$efx3', $weapon, $armor,'{$_POST['itmpic']}')"); Save staff_items.php Open iteminfo.php Find: print "<table width=75% class='table' cellspacing='1'><tr style='background: gray;'><th colspan=2>[b]Looking up info on {$id['itmname']}[/b]</th></tr><tr bgcolor=#dfdfdf><td colspan=2>The [b]{$id['itmname']}[/b] is a/an {$id['itmtypename']} Item - [b]{$id['itmdesc']}[/b]</th><tr style='background: gray;'><th colspan=2>Item Info</th></tr><tr style='background:gray'><th>Item Buy Price</th><th>Item Sell Price</th></tr><tr><td>"; Replace with: if($id['itmpic']) { $itmpic = "<tr style='background: gray;'><td colspan='2' style='text-align: center;'>[img=itmpics/".$id[]</td></tr>"; } print "<table width=75% class='table' cellspacing='1'><tr style='background: gray;'><th colspan=2>[b]Looking up info on {$id['itmname']}[/b]</th></tr>$itmpic<tr bgcolor=#dfdfdf><td colspan=2>The [b]{$id['itmname']}[/b] is a/an {$id['itmtypename']} Item - [b]{$id['itmdesc']}[/b]</th><tr style='background: gray;'><th colspan=2>Item Info</th></tr><tr style='background:gray'><th>Item Buy Price</th><th>Item Sell Price</th></tr><tr><td>"; Save iteminfo.php Upload files. Thats all Folks! -------------------------------- Usage notes: 1. All item pic files must be uploaded to the itmpics directory 2. When inputing the item pic info in the create item form only use the filename.ext...IE...img.jpg, pic.gif, etc...
-
Re: [mccodes] Training and crime logs. Really thats not a good way to tell if a refresher is being used. All you are doing is storing the time that the code was ran. Someone could simply set up a refresher to run every 10 seconds making it less obvious. Likewise a player can easily appear to be using a refresher when there not simply by training quickly. Basing your judgment on time alone is not an effective way to prevent refreshers.
-
Re: Help!! bugs PHPGamer Its a project I've been working on and releasing as I go. It started as Mc Lite, several security upgrades, a modular style file structure (or at least thats what I call it), and a simple template system. Current version is 2.0.1, it has no staff functions yet, I am still working on them but should be ready to start releasing them in the upcoming days.
-
Re: Advanced Player Search [v2] So like I already thought...v2 does NOT have a advanced search come standard
-
Re: Advanced Player Search [v2] Well that is an advanced search...not a match to mine though. However, asking around, nobody else seems to have an advsearch.php in there original v2 that I asked. Thanks for the demo though....
-
Re: Advanced Player Search [v2] I don't have that with my v2, is there a demo of it somewhere...
-
Title: Advanced Player Search Price: $5.00 Availability: Unlimited (Copies Sold: 1) Includes: - 1 PHP File (aps.php) - Instructions (instructions.txt) Description: This mod provides an advance search feature for your game. It allows players/staff to search for players based on name, location, house, jail, hospital, and fedjail. Any or all can be searched for at one time. For example you could do a search for players that have x in their name, at x city, in x house..it will load only players that meet all of the inputed search terms. Ability to search 1 field at a time, 2+, or all fields. Can be modified to further enhance the search features based upon your game. Delivery: Via paypal email...if different include email address to send to in the notes when making payment. Support: Support will be given via CE in this thread, or email ([email protected]) Pay: Paypal >> [email protected] *added screen shot