
Karlos
Members-
Posts
951 -
Joined
-
Last visited
Never
Content Type
Profiles
Forums
Events
Everything posted by Karlos
-
Re: Need help with this I would but I have to many people asking me "How do I do this", "How do I do that", "You know any hacks?"... Kinda gets annoying.
-
Re: Need help with this Just use htmlspecialchars(); like I said :wink:
-
Re: Need help with this No site is 100% secure.... But here's some functions for you to look up mysql_real_escape_string(); htmlspecialchars(); abs(); intval(); floatval(); ctype_alpha(); ctype_digit(); ctype_alnum(); isset(); Just a few :-P
-
How to make sure assistants won't ban the admin?
Karlos replied to legrolls's topic in General Discussion
Re: How to make sure assistants won't ban the admin? Personally Magictallguy (Anthony) is one of the best coders I socialize with often, I learnt a lot off him, but I admit I wouldn't be were I am now without practice. Magic may find me annoying at times/if not all but oh well I can be. Magic is a good coder who helps a lot of people for free, heck I watched him code on TeamViewer (http://teamviewer.com) for two hours earlier to see what else I could learn and see his coding ways and how he secures/presents his code. I admit I'm not a fan of echo "Text"; on every line but I get over it because the standard of his code is pretty good. I still ask him for help here and there and when I don't feel like I am good enough to code certain mods he encourages me to make it. He always helps me to enhance my code when I miss bits out. So I just would like to say thank you Anthony. (Sorry for randomly hijacking thread... :wink:) -
Re: I need help with a Mod i made ALTER TABLE `users` ADD `street_level` INT(3) UNSIGNED NOT NULL DEFAULT '1'; ALTER TABLE `users` ADD `street_exp` INT(11) NOT NULL DEFAULT '0'; ALTER TABLE `users` ADD `street_needed` INT(11) NOT NULL DEFAULT '100'; ALTER TABLE `users` ADD `turns` TINYINT(2) UNSIGNED NOT NULL DEFAULT '25'; That should be a bit better for the SQL :wink: Note: Didn't look at code properly so I can't see what else I could edit xD Didn't check `street_exp` or `street_needed`
-
Re: Creat Crime and City I get people asking this alot... the simple fix.... Create Item 1) Delete you codes.... 2) Code... 3) Fill in all the boxes. Create City function addcity() { global $db, $ir, $c, $h, $userid; $minlevel=abs((int) $_POST['minlevel']); $name=$_POST['name']; $desc=$_POST['desc']; if($minlevel and $desc and $name) { $q=$db->query("SELECT * FROM cities WHERE cityname='{$name}'"); if($db->num_rows($q)) { print "Sorry, you cannot have two cities with the same name."; $h->endpage(); exit; } $db->query("INSERT INTO cities VALUES (NULL, '$name', '$desc', '$minlevel')"); print "City {$name} added to the game."; stafflog_add("Created City $name"); } else { print "<h3>Add City</h3><hr /> <form action='staff_cities.php?action=addcity' method='post'> Name: <input type='text' name='name' /> Description: <input type='text' name='desc' /> Minimum Level: <input type='text' name='minlevel' /> <input type='submit' value='Add City' /></form>"; } } I think (Never tested it, done ages ago (might have a look if you ask nicely xD)) :wink:.
-
Re: viewuser taking ages to load? @ Lithium: Ahh I just saw he said just his account, Thanks. Maybe have a general look around the code. Edit a few piece's. Run a few speed test I use YSlow. I'd still take a look at that SQL all those * just add more parsing time :wink:
-
Re: Fearless-Dojo Heck... Lite is a good engine to use IMHO... :wink:
-
Re: viewuser taking ages to load? Maybe it's actually the SQL. (Look near the top, Hint: Optimize...)
-
Re: PHP.net search bookmark Old topic.. Yes. Good Topic.. Yes. Very handy.. :wink:
-
Re: [McCodes V2] Unique Template's Dayo, can you contact me on MSN? [email protected]
-
Re: [REVIEW] Review my game plz. Fearless-Dojo Lmfao, Nice one Joel. +1 To you :-P
-
Re: [any] Kool name While your doing that make it XHTML :wink: // With sprintf() echo sprintf("<span style='color: blue;'>%s</span>", htmlspecialchars(stripslashes($ir['username']))); // Without sprintf() echo '<span style="color: blue;">'.htmlspecialchars(stripslashes($ir['username'])).'</span>';
-
Re: [REVIEW] Review my game plz. Fearless-Dojo Why not pay someone to make a decent banner?
-
Re: 2 questions - please help Gah, i've been using in_array() in a few of my mods recently, yet I forget about it.. :| *Karlos headbutt's the wall.
-
Re: V2 crystal temple.. Could use isset() Picked up sprintf() from me? Good Boy :wink: :-P
-
Re: 2 questions - please help http://uk2.php.net/manual/en/function.echo.php Faster than print... Not noticable though.
-
Re: 2 questions - please help if ($odata['userid'] == '1' OR $odata['userid'] == '2' OR $odata['userid'] == '3') { echo 'Tut Tut Tut....'; $h->endpage(); exit; }
-
Re: [REVIEW] Review my game plz. Fearless-Dojo What's with all the negative comments? Well It's CE.. I for one never normally say bad comments, but I feel like I should the way he has been talking to me recently.
-
Re: [REVIEW] Review my game plz. Fearless-Dojo Security Issues... Free Login Template... Free Hosting/Domain... Nice Register... :wink: Nice Banner... :wink: Should Add stripslashes() On Shoutbox... Red, Blue and Black In Game... Common. Error: Parse error: syntax error, unexpected $end in /home/fearless/public_html/chat.php on line 95 Next Time Don't Call Me A Twat For No Reason
-
Re: [V2] New Five Minute Cron Maybe learn MySQL's IF as well.
-
Re: Preferences Add On What about If a use has JS disabled? :| Got to include everyone..
-
Re: HTML posting in forums? He might be talking about you forums Magic :wink:
-
[MCCODES V2[ Announcements mod only visible to staff
Karlos replied to Uridium's topic in Free Modifications
Re: [MCCODES V2[ Announcements mod only visible to staff Or.. if($ir['user_level'] > 1) { echo ($ir['staffnew_announcements'] > 0) ? "[url='staffannouncements.php']<font color='orange'>Announcements ({$ir['staffnew_announcements']})[/url] " : "[url='staffannouncements.php']Announcements (0)[/url] "; } Got bored :P Save's using a varible tho. -
[MCCODES V2[ Announcements mod only visible to staff
Karlos replied to Uridium's topic in Free Modifications
Re: [MCCODES V2[ Announcements mod only visible to staff ALTER TABLE `users` ADD `staffnew_announcements` INT( 11 ) NOT NULL DEFAULT '0'; Save some room :P :roll: $db->query("UPDATE `users` SET `new_announcements`=`new_announcements`+'1' WHERE `user_level` >= '2'");