
Karlos
Members-
Posts
951 -
Joined
-
Last visited
Never
Content Type
Profiles
Forums
Events
Everything posted by Karlos
-
Re: So many of one? Well thanks Jeff. Well i always do try to learn more and more each day and work out why it helps or put's a disadvantage over other piece's of code. I like to try and give stuff back to the community as i do on here and PHP-Forums. I shall admit that i do get stuff at times and i like to ask who to fix it and sometimes on how to aviod it in the future. I also like to help others out so they can progress and i feel like i achieved something by helping someone else do better.
-
Re: [v2] Point Temple with images ($5) If you look he hasn't been active since 2nd feb... Wait till he's online.
-
Re: So many of one? Any reason to say my name? (No offence intended)
-
Re: sprintf() Query.. No offence meant to be intended here, but I gathered that really.
-
[ADDON] V2 & V1 Invite other MCC websites for a tournament game...
Karlos replied to Uridium's topic in Free Modifications
Re: [ADDON] V2 & V1 Invite other MCC websites for a tournament game... -
Re: sprintf() Query.. So okay, it's not secure but neither insecure. I can understand that. I never rely on 1 part of a code to secure, you have to go through the whole thing. So the idea is that it's better to use %d because it's a signed integer so the user the person puts in will be above 0 and I'm also guessing that none of the params are secure or insecure?
-
Well me and Eternal are having a conversation on MSN and he is saying %u in a sprintf() is insecure. But i always believed it was secure. I am still adamant that %u is secure but I'm posting here so when can discuss it and also other can share their input. But as far as I know and learnt %u is secure... Anyone care to share info?
-
Re: [MCCODE V2] User Competitions Though this was comp mod... not a gang mod....
-
Re: V2 basic explore I used to open and close PHP tags but i have leant that keeping a PHP script in PHP and not HTML and PHP is quicker.
-
Re: [mccodes V2] Nudge Users Untested Re-Coded: <?php include_once (DIRNAME(__FILE__) . '/globals.php'); $_GET['ID'] = abs(@intval($_GET['ID'])); if(!$_GET['ID']) { echo 'Invalid User ID'; } else if($_GET['ID'] == $userid) { echo 'You cannot nudge yourself!'; } else if($ir['nudge'] > 0) { echo 'You already nudged a user, please try again in 5mins!'; } else { echo 'You have just nudged ID '.@intval($_GET['ID']); event_add($_GET['ID'] ,'[url="viewuser.php?u='.@intval($ir['userid']).'"][b]'.stripslashes($ir['username']).'[/b][/url] Nudged you!'); $Nudge = sprintf("UPDATE `users` SET `nudge`=`nudge`+1 WHERE `userid`='%u'", @intval($userid)); $db->query($Nudge); } echo '</table>'; $h->endpage(); ?>
-
Re: [mccodes V2] Nudge Users Joel made it... + any reason for : $it=$db->query("SELECT u.*,us.* FROM users u LEFT JOIN userstats us ON u.userid=us.userid WHERE u.userid={$_GET['ID']}"); $er=$db->fetch_row($it);
-
Re: [Request] Gang Addon Surely you mean stuff like keyloggers, brute forcers, shells, ect.
-
Re: Looking For A Custom Game script A one of a kind script?
-
Re: [mccodes] Save Events [$5] Add me on msn: [email protected]
-
Re: [mccodes] Save Events [$5] addslashes() And stripslashes()
-
Re: [mccode v2] Faction with Armoury I knew mine would work :-P
-
Re: Vote Mod? I have worked with iamwicked in the past and what you have said is completely false. He is probably one of the most reliable sellers on CE, so I think your statement is a lot of crap.
-
Re: [mccodes V2] my verry first log in page Well said.... And if I am completely honest, I'll second that.
-
Re: Reward the active! File (Without Events) <?php include_once (DIRNAME(__FILE__) . '/sglobals.php'); if($ir['user_level'] != 2) { header('Location: index.php'); } $_GET['action'] = isset($_GET['action']) && is_string($_GET['action']) ? strtolower(trim($_GET['action'])) : ""; switch($_GET['action']) { case 'reward': reward(); break; default: echo '<font color="#FF0000">[b]Error[/b] [i]This script requires an action.[/i]'; break; } function reward() { global $db, $ir, $c, $h; if($_POST['money'] AND $_POST['crystals']) { $Reward = sprintf( "UPDATE `users` SET `money` = `money` + '%u', `crystals` = `crystals` + '%u' WHERE `laston` > unix_timestamp()-15*60", @intval($_POST['money']), @intval($_POST['crystals'])); $db->query($Reward); echo 'The online users have been credited! [url="staff.php"]Back to Staff Index[/url]'; $h->endpage(); exit; } echo ' <h3>Reward The Active Users!</h3> <form action="'.$_SERVER['PHP_SELF'].'?action=reward" method="post"> Money: <input type="text" name="money" /> Crystals: <input type="text" name="crystals" /> <input type="submit" value="Reward The Online Users!" /> </form> '; } $h->endpage(); ?> Link [url='NAMEFILE.php?action=reward']Reward The Active![/url]
-
Re: [mccodes V2] my verry first log in page Lier. 15 Chill pills? Naa, trust me i don't need them. @ Killah: I'd rather die than share a room with him.
-
Re: [mccodes V2] my verry first log in page I swear i remember Killah, telling you to stop spamming a while ago, so you're not in a great position to tell me what to do. I didn't say this is a place to moan... if i did prove it by quoting it. And not being mean... but take a few chill pills. anyway... Have a Day.
-
Re: [mccodes V2] my verry first log in page Feeling abit.... Touchy? :-P
-
Re: [mccodes V2] my verry first log in page @ POG1: You missed a (") lol Oooo a little typo.... get over it :roll: <script language="javascript" src="js.js">
-
Re: [mccodes V2] my verry first log in page Warning - while you were typing a new reply has been posted. You may wish to review your post. the JS was in the script already.... and i left it their.. the top part has enter lines because I find it easier to read it. and the others? they where his own.
-
Re: [mccodes V2] my verry first log in page fair point. <?php session_start(); include_once (DIRNAME(__FILE__) . '/config.php'); global $_CONFIG; define("MONO_ON", 1); include_once (DIRNAME(__FILE__) . '/class/class_db_'.$_CONFIG["driver"].'.php'); $db = new database; $db->configure( $_CONFIG['hostname'], $_CONFIG['username'], $_CONFIG['password'], $_CONFIG['database'], $_CONFIG['persistent'] ); $db->connect(); $c = $db->connection_id; $Set = array(); $SelectSettings = $db->query("SELECT * FROM settings"); while($r = $db->fetch_row($SelectSettings)) { $Set[$r['conf_name']] = $r['conf_value']; } echo ' <html> <head> <title>'.stripslashes($Set['game_name']).'</title> <script language="JavaScript"> <!-- function getCookieVal (offset) { var endstr = document.cookie.indexOf (";", offset); if (endstr == -1) endstr = document.cookie.length; return unescape(document.cookie.substring(offset, endstr)); } function GetCookie (name) { var arg = name + "="; var alen = arg.length; var clen = document.cookie.length; var i = 0; while (i < clen) { var j = i + alen; if (document.cookie.substring(i, j) == arg) return getCookieVal (j); i = document.cookie.indexOf(" ", i) + 1; if (i == 0) break; } return null; } function SetCookie (name,value,expires,path,domain,secure) { document.cookie = name + "=" + escape (value) + ((expires) ? "; expires=" + expires.toGMTString() : "") + ((path) ? "; path=" + path : "") + ((domain) ? "; domain=" + domain : "") + ((secure) ? "; secure" : ""); } function DeleteCookie (name,path,domain) { if (GetCookie(name)) { document.cookie = name + "=" + ((path) ? "; path=" + path : "") + ((domain) ? "; domain=" + domain : "") + "; expires=Thu, 01-Jan-70 00:00:01 GMT"; } } // --> </script> <script language="JavaScript"> var usr; var pw; var sv; function getme() { usr = document.login.username; pw = document.login.password; sv = document.login.save; if (GetCookie("player") != null) { usr.value = GetCookie("username") pw.value = GetCookie("password") if (GetCookie("save") == "true") { sv[0].checked = true; } } } function saveme() { if (usr.value.length != 0 && pw.value.length != 0) { if (sv[0].checked) { expdate = new Date(); expdate.setTime(expdate.getTime()+(365 * 24 * 60 * 60 * 1000)); SetCookie("username", usr.value, expdate); SetCookie("password", pw.value, expdate); SetCookie("save", "true", expdate); } if (sv[1].checked) { DeleteCookie("username"); DeleteCookie("password"); DeleteCookie("save"); } } else { alert("You must enter a username/password."); return false; } } </script> <style> body { font-family:Century gothic;font-size:9pt;color: black; background-color:Silver; scrollbar-base-color: #000000; scrollbar-arrow-color: #000000; scrollbar-DarkShadow-Color: #000000; } a:visited,a:active,a:hover,a:link { color: black;text-decoration: none; } table,tr,td { font-size:9pt; } img { border:none; } </style> </head> <body> <td><center>[img=banner.jpg]<table width=50% border=1><td valign=top> <FORM METHOD="LINK" ACTION="register.php"><length=5><center> <INPUT TYPE="submit" VALUE="Register"></form> <center><td valign=top><FORM METHOD="LINK" ACTION="toc.php"><length=5><center> <INPUT TYPE="submit" VALUE="Currently Unavailable"> </form> <center><td valign=top><FORM METHOD="LINK" ACTION="gamestats.php"><length=5><center> <INPUT TYPE="submit" VALUE="Currently Unavailable"> </FORM> </table> <center><table width=50% border=1><td valign=top> '.stripslashes($Set['game_desc']).' </table> <h3><center>'.stripslashes($Set['game_name']).'</h3> <center><table width=20% border=1><tr><td width=50%><fieldset><font size=+2><center><legend>'.stripslashes($Set['game_name']).'</legend><form action=authenticate.php method=post name=login onsubmit="return saveme();">Username: <input type=text name=username> Password: <input type=password name=password> Remember me? <input type="radio" value="ON" name="save">Yes <input type="radio" name="save" value="OFF" checked>No <input type=submit value=Submit></form></fieldset></td></tr></table> [i]<center>Copyright © 2008 '.stripslashes($Set['game_owner']).'.</center>[/i]</body></html> '; ?>