-
Posts
708 -
Joined
-
Last visited
-
Days Won
1
Content Type
Profiles
Forums
Events
Everything posted by CrazyT
-
Re: Count Down Clock I guess you haven't used GOOGLE... i just looked and found loads.. and no i aint posting.. you can do it your self :D
-
A moderate Requests that will Help A lot of forum members.
CrazyT replied to Joshua's topic in General Discussion
Re: A moderate Requests that will Help A lot of forum members. Also you could use preg_match for stuff to ;) For username for example.. <?php //for colors.. if(!preg_match("/^([a-zA-Z0-9._-])+$/", $_POST['new_name'])){ echo "Username can only contain alphanumeric characters, the underscore, dash and period."; } else { //update stuff } -
A moderate Requests that will Help A lot of forum members.
CrazyT replied to Joshua's topic in General Discussion
Re: A moderate Requests that will Help A lot of forum members. Only use htmlspecialchars/htmlentites/stripslashes on display.. i use more but ya will help you xD. EG.. <?php // just for colors.... echo "Username: ". htmlspecialchars(stripslashes($ir['username'])); [quote] You can use strip_tags to on going into the database... [url]http://php.net/strip_tags[/url] -
Re: Files For My Radio Web Site Amen lol. I've been trying to make one like hot108 i love there layout still trying to do it :)
-
A moderate Requests that will Help A lot of forum members.
CrazyT replied to Joshua's topic in General Discussion
Re: A moderate Requests that will Help A lot of forum members. lol.. <?php //remove php tags of course. function cleanQuery($string, $trim = false) { if(is_null($string)) { return $string; } if(is_string($string)) { if(function_exists('mysql_real_escape_string')) { if($trim == true) { return mysql_real_escape_string(trim($string)); } else { return mysql_real_escape_string($string); } } else { if($trim == true) { return mysql_escape_string(trim($string)); } else { return mysql_escape_string($string); } } } return $string; } I use something simular like that^. Example. Sprintf (loads of people use sprintf so ill show you in sprintf()) <?php //just for colors. $sql = sprintf("UPDATE `users` SET `username` = '%s' WHERE (userid = %u)", cleanQuery($_POST['new_username']), $ir['userid']); mysql_query($sql); Without sprintf. <?php //just for colors. mysql_query("UPDATE `users` SET `username` = '". cleanQuery($_POST['new_username']) ."' WHERE (userid = ". $ir['userid'] .")"); But if your using v2 you can just use there function $db->escape() Witch is just. <?php //just for colors. function escape($data) { return mysql_real_escape_string($data, $this->connection_id); } -
Re: Game Security Wtf? lol You saying you will secure his game, then your saying can you secure mine(as in yours).... Man that is so odd.
-
Could i steal 10 seconds of your life to help me? Thanks
CrazyT replied to bennyh's topic in Game Support
Re: Could i steal 10 seconds of your life to help me? Thanks lol. Your register page has nothing to do with inventory. Same as the email verification has nothing to do with inventory. lol. -
[$$$] For The final things I need to release my game.
CrazyT replied to Joshua's topic in Paid Modifications
Re: [$$$] For The final things I need to release my game. Boards? Do you mean forums yes?. If so there is one in DF. http://dev-forum.net/index.php/topic,760.0.html I think he mean's the one click attack mod? Oh i don't know then. ;) -
Re: [mcCodes v2] Header Text [First ever Mod] Yes and it does that... lol
-
Re: [mcCodes v2] Header Text [First ever Mod] <?php //only for colors function header_announcement() { global $db; $news = $db->fetch_single($db->query('SELECT text FROM `headers` LIMIT 1')); if(isset($_POST['newspaper'])) { $_POST['newspaper'] = $db->escape($_POST['newspaper']); $db->query('UPDATE header SET text = \''. $_POST['newspaper'] .'\''); stafflog_add("Updated game header"); echo "Game Header Updated. "; $news = $_POST['newspaper']; } echo "<h3>Editing Header</h3>"; echo "<form action='staff_special.php?action=headerann' method='post'>"; echo "<textarea rows='7' cols='35' name='newspaper2'>". stripslashes($news) ."</textarea> "; echo "<input type='submit' value='Change' /></form>"; } If that is what your on about?
-
Re: [mcCodes v2] Header Text [First ever Mod] lol true ;)
-
Re: [mcCodes v2] Header Text [First ever Mod] What about if someone get's admin some how then they guna use meta refresh or something like everyone else does. lol. echo htmlspecialchars(stripslashes($set['header_text']));
-
Re: [v2] Change game marquee No Offence or not saying anything about your mod but marquee sucks.
-
Re: [v2] custom txt colors <?php //remove if using << function conf_color_change() { global $db, $ir; $colors = array('Lime', 'Red', 'Blue', 'Yellow', 'Pink'); //Add more into the array.. echo "<h3>Color Change</h3>"; if(isset($_POST['color']) && in_array($_POST['color'], $colors)) { echo "You have changed your color type! "; $db->query('UPDATE `users` SET `color` = \''. $_POST['color'] .'\' WHERE `userid` = '. $ir['userid']); } echo "<form action='preferences.php?action=colorchange' method='POST' />"; echo "<select class='textbox' name='color'>"; foreach($colors as $color) { echo "<option value='". $color ."'>". $color ."</option>"; } echo "</select>"; echo "<input class='textbox' type='submit' value='Change color' /></form>"; } Only need 1 function and better :) Just add more colors to the array()
-
Re: My layout. Dang didn't know you don't brush your teeth :P.. lol jke :D
-
Re: Attack lost Help if($dosessh && (isset($_SESSION['attacking']) || $ir['attacking'])) { $db->query('UPDATE `users` SET `attacking` = 0 WHERE `userid` = '. $ir['userid']); $_SESSION['attacking'] = 0; } You should see something simular like that in header.... remove it :D
-
Re: [mc-codes ] 5 card draw [$5.00] w00t i win all the time :D i keep refreshing on the submit and click enter says i win all the time :P
-
Re: Help in Gang Organised Crimes If your using cronus's Joinable oc's, then all you gota do is include("global_func.php");
-
Re: Level System Yeah he does i helped him yestoday do this, but then i felt tired, meh went to bed at 9pm meh got up at half 2pm lol
-
Re: Attempted css mod. $IP = $_SERVER['REMOTE_ADDR']; $IP=addslashes($IP); $IP=mysql_real_escape_string($IP); $IP=strip_tags($IP); What the hell ?lol
-
Re: Sing images uploaded to cpanel Make a new coloum in houses .. picture...
-
Re: [V2] Choose Benefits You could use switch() instead :D switch($_POST['benefit']) { case 'bankm': $bank = 1000; break; case 'crys': $crys = 10; case 'b': $b = 10; break; default: $bank = 1000; break; }
-
Re: Help fixing a small bug Yeah. You could use switch() instead or a array()
-
Re: Name bug Meh, no need for all that code -.- just filter out the space(s)
-
Re: Little Error It's saying there is no function called row().....