-
Posts
3,137 -
Joined
-
Last visited
-
Days Won
35
Content Type
Profiles
Forums
Events
Everything posted by Djkanna
-
I'll end it... Harry Potter = Great Books not so great films... Done finished end of... :P
-
No idea lol the only thing I know about Harry Potter is it has Alan Rickman in it lol
-
Only Anthony and Spydee calls me that online and most times it's just Djkanna or Dj But yeah I forgot that lol
-
Mccodes v1 Crime failure with both hospital time and jail time
Djkanna replied to HITMAN 17's topic in Engine Support
I wouldn't say (X)HTML more like HTML allthough if I remember correctly it does use the XHTML doctype :P -
Meh I have a few but not as many as Anthony or Zero Djkanna DjKanna DJK DJ Some Dr one thanks to Spydee Sir Kaine (I was knighted by a few members of DevF (tis because I'm cool)) and Idiot ;) :P
-
grpg-v1 [Mod] GRPG profile signatures [My First]
Djkanna replied to SlanderDesign's topic in Free Plugins
/me really needs to update his BBcode... Nice work Slander Design ;) -
Line 71: $db->query("INSERT INTO applications VALUES('',$userid,{$_GET['ID']},'".mysql_real_escape_string($_POST['application'])."');"); somethings not right :P Nice job Pudda a suggestion: Be consistent ;) if you're using htmlspecialchars() stick with it don't alternate between hsc and htmlentities() <?php include(dirname(__file__) . '/globals.php'); $_GET['ID'] = isset($_GET['ID']); if(!$_GET['ID']) { echo 'Invalid use of file'; } else { $gq=$db->query("SELECT `gangPRESIDENT`,`gangVICEPRES`,`gangRESPECT`,`gangID`,`gangDESC` FROM `gangs` WHERE(`gangID` = ".abs(intval($_GET['ID'])).")"); $gangdata=$db->fetch_row($gq); $_GET['action'] = isset($_GET['action']) && ctype_alpha($_GET['action']) ? trim($_GET['action']) : ''; switch($_GET['action']) { case 'view':gang_view();break; case 'userlist':gang_userlist();break; case 'apply':gang_applyform();break; case 'applys':gang_applysubmit();break; } if (!in_array($_GET['action'], array('view','userlist','apply','applys'))) { echo "<h2>Illegal Operation</h2>"; $h->endpage(); exit; } } function gang_view() { global $db,$ir,$c,$h,$gangdata,$bbc; $pq=$db->query("SELECT `username`,`userid` FROM `users` WHERE (`userid` =".$gangdata['gangPRESIDENT']).")"); $ldr=$db->fetch_row($pq); $vpq=$db->query("SELECT `username`, `userid`FROM `users` WHERE (`userid` = ".$gangdata['gangVICEPRES'].")"); $coldr=$db->fetch_row($vpq); echo "<h3><span style='text-decoration: underline;'>".stripslashes(htmlentities($gangdata['gangNAME'], ENT_QUOTES))." Gang</span></h3><hr /> President: [url='viewuser.php?u=".$ldr[']".stripslashes(htmlentities($ldr['username'], ENT_QUOTES))."[/url] Vice-President: [url='viewuser.php?u=".$coldr[']".stripslashes(htmlentities($coldr['username'], ENT_QUOTES))."[/url] [b]Respect Level: [/b] ".number_format($gangdata['gangRESPECT'])." <hr />"; $cnt=$db->query("SELECT `username` FROM `users` WHERE `gang` = (".$gangdata['gangID'].")"); echo "[b]Members:[/b] ".$db->num_rows($cnt)." [b]Description:[/b]".stripslashes(htmlentities($gangdata['gangDESC'], ENT_QUOTES))." > [url='gangs.php?action=userlist&ID=".$gangdata[']User List[/url] > [url='gangs.php?action=apply&ID=".$gangdata[']Apply[/url]"; } function gang_userlist() { global $db,$ir,$c,$h,$gangdata; echo "<h3>Userlist for ".stripslashes(htmlentities($gangdata['gangNAME'], ENT_QUOTES))."</h3> <table><tr style='background: gray;'><th>User</th><th>Level</th><th>Days In Gang</th></tr>"; $q=$db->query("SELECT `userid`,`username`,`daysingang` FROM `users` WHERE ( `gang` = ".$gangdata['gangID']." ) ORDER BY `daysingang` DESC, `level` DESC"); while($r=$db->fetch_row($q)) { echo "<tr><td>".stripslashes(htmlentities($r['username'], ENT_QUOTES))." [".number_format($r['userid'])."] </td><td>".number_format($r['level'])."</td><td>".number_format($r['daysingang'])."</td></tr>"; } echo "</table> [url='gangs.php?action=view&ID=".$gangdata[']> Back[/url]"; } function gang_applyform() { global $ir,$c,$h,$gangdata; if(!$ir['gang']) { echo "<form action='gangs.php?action=applys&ID=".abs(intval($_GET['ID']))."' method='post'> Type the reason you should be in this faction. <textarea name='application' rows='7' cols='40'></textarea> <input type='submit' value='Apply' /></form>"; } else { echo "You cannot apply for a gang when you are already in one."; } } function gang_applysubmit() { global $db,$ir,$c,$h,$gangdata,$userid; if(!$ir['gang']) { $db->query("INSERT INTO applications VALUES('',$userid,".abs(intval($_GET['ID'])).",'".mysql_real_escape_string(strip_tags($_POST['application']))."')"); $db->query("INSERT INTO gangevents VALUES('',".abs(intval($_GET['ID'])).",unix_timestamp(),'[url='viewuser.php?u=$userid']".strip_tags(mysql_real_escape_string($ir['username']))."[/url] sent an application to join this gang.')"); print "You sent your application to the ".stripslashes(htmlentities($gangdata['gangNAME'], ENT_QUOTES))."gang."; event_add($gangdata['gangPRESIDENT'], '[url="viewuser.php?u='.$userid.'"]'.strip_tags(mysql_real_escape_string($ir['username'])).'[/url] just applied to your gang!'); event_add($gangdata['gangVICEPRES'], '[url="viewuser.php?u='.$userid.'"]'.strip_tags(mysql_real_escape_string($ir['username'])).'[/url] just applied to your gang!'); } else { print "You cannot apply for a gang when you are already in one."; } } $h->endpage(); ?> Just made it neater, I also don't like relying on a single function to secure the ID so I changed that and added it in one by one each time the ID was called :) consistent he() and stripslashes() and strip_tags() functions Also correct me if I'm wrong but doesn't event_add() insert into the database therefore you should escape the variables I maybe wrong on this I've never used the event_add() function but yeah change that back if not required ;) Again nice one Puddy :P PS: Note: Untested however should work fine :)
-
Yeah it's a shame Channel Four have ended their contract to show Friends so now I guess it's only available in some other place lol as it won't be on E4 either.....
-
Djkanna keeps his opinions too himself.... Yeah Cronus's mods do work well from what I've seen. So I suppose asking Cronus to update his Raffle mod isn't a bad idea. Or do as Zero said there might be a basic one to work from on here.
-
Um the match?
-
Great idea.
-
Queue ;)
-
Wrx: Loving it :L
-
You don't need free hosting just create a .html file save it to your desktop and open it up in a browser :)
-
Create an .html file, add your css into it, load it in a browser of your choice :)
-
Reinventing the wheel is *sometimes* a good thing :)
-
Intval(): Get's the integer value :) so echo intval('-35'); would return 35.
-
Look into CSS's :nth-child element :) Unfortunatly there is no support for it within IE (might of known) Which then is fixable using Javascript (Jquery too) But that then leaves the 1% of IE users that are paranoid and have Javascript turned off where it will not work but generally no-one bothers about them so yeah..
-
One second then who is that picture of that he/she used as a display picture :/
-
In the CronTab add the curl infront of the http:// :) curl http://www.domain.tld/cron_day.php?code=codehere
-
It takes it's time see if anything happens within five minutes :)
-
a76980f6a5008353c3de36f9c4a7394c Use that code but now change it as people could now run your crons without you knowing :) cron_day.php?code=a76980f6a5008353c3de36f9c4a7394c ;)
-
I'm pretty sure it's the code in the config.php file, add it too the end ?code=codehere :)
-
Safari has a way of spoofing your user agent so you can use any in theory :)
-
Thank you Rpmb, That certainly gives me a lot to think about, aswell as others.. Djkanna is having a think now lol