
Karlos
Members-
Posts
951 -
Joined
-
Last visited
Never
Content Type
Profiles
Forums
Events
Everything posted by Karlos
-
Well I finally decided to learn JavaScript.. But I ran into a few problems along the way and now I'm confused... Well I decided to use x as my variable but it says on w3schools I need to clear the variable before I can re-assign it to a new value. Well here's my script what I got: <?php require_once (DIRNAME(__FILE__) . '/globals.php'); ?> <script type="text/javascript"> <!-- var x = 5; if (x == 4) { document.write("Wrong!"); } else { document.write("Correct!"); } var x; document.write(" "); var x = 5; if (x == 5); { document.write("I'm learning"); } else { document.write("Or not...."); } var x; //--> </script> <?php $h->endpage(); ?>
-
Re: [MCCodes V2] View User Well to be honest I'm not great with arrays so and I don't have a good clue what I can use them for... I've been focusing on understanding them but I still can't.... If anyone can help thanks... But for when I release my next update for the script I will add this in.. Thanks POG1 and Zero :wink:
-
Re: Where do you do your shopping from? Food Shopping: Mother does that :roll: Clothes: River Island JD Republic Burtons The list can go on.....
-
Re: [MCCodes V2] View User Thanks radio_active I'll look into it after school tomorrow but I actually need a decent night sleep to get me up for 7am :wink: and I did do a few visual edits if you check the screen shot or read the code... not a lot of difference but there is some. *Karlos turns off computer, goes on xbox for a while...and goes to bed.
-
Re: [MCCodes V2] View User Okay but did I state that it was designed to be a professional looking?
-
Re: [MCCodes V2] View User Fair enough... But it would change a lot as soon as you put it on... Due to your CSS... But if you do edit it... Happy Editing! Thanks :wink:
-
Re: [MCC V2] - Brothel Non exploitable I kinda agree with you on this one. I have never found the use for a brothel before. I'll third that, but nether the less good coding from Kyle.
-
Re: [MCCodes V2] View User I noticed when different type of people viewed this like members, donators and non-donated staff the links where messed up, so here is a updated version with some extra features on it. (Sorry zero...no JS yet) <?php require_once (DIRNAME(__FILE__) . '/globals.php'); if($ir['userid'] == 1) { error_reporting(E_ALL); } else { error_reporting(0); } $_GET['u'] = abs(@intval($_GET['u'])); $_GET['to'] = abs(@intval($_GET['to'])); if(!$_GET['u']) { echo 'Invalid use of file'; $h->endpage(); exit; } else { $Select = sprintf( "SELECT " . "u.userid, u.username, u.level, u.money, u.crystals, u.laston, u.lastip, u.energy, u.will, u.maxwill, u.brave, u.maxbrave, u.maxenergy, u.hp, u.maxhp, u.location, u.hospital, u.jail, u.jail_reason, u.fedjail, u.user_level, u.gender, u.daysold, u.signedup, u.gang, u.donatordays, u.email, u.display_pic, u.duties, u.staffnotes, u.hospreason, u.lastip_login, u.lastip_signup, u.last_login, u.friend_count, u.enemy_count, " . "c.cityid, c.cityname, " . "h.hID, h.hNAME, h.hWILL, " . "g.gangID, g.gangNAME, " . "f.fed_userid, f.fed_days, f.fed_jailedby, f.fed_reason " . "FROM users u " . "LEFT JOIN cities c " . "ON u.location=c.cityid " . "LEFT JOIN houses h " . "ON u.maxwill=h.hWILL " . "LEFT JOIN gangs g " . "ON g.gangID=u.gang " . "LEFT JOIN fedjail f " . "ON f.fed_userid=u.userid " . "WHERE u.userid=('%u')", $_GET['u']); $q = $db->query($Select); if($db->num_rows($q) == 0) { echo 'Sorry, we could not find a user with that ID, check your source.'; $h->endpage(); exit; } else { $r = $db->fetch_row($q); if($r['user_level'] == 1) { $UserLevel = "Member"; } else if($r['user_level'] == 2) { $UserLevel = "Admin"; } else if ($r['user_level'] == 3) { $UserLevel = "Secretary"; } else if($r['user_level'] == 5) { $UserLevel = "Assistant"; } else if($r['user_level'] == 0) { $UserLevel = "NPC"; } else { $UserLevel = "Report To Admin."; } $LastOn = ($r['laston'] > 0) ?date('F j, Y g:i:s a',$r['laston']) : "Never"; $SignedUp = date('F j, Y g:i:s a',$r['signedup']); $d=""; if($r['laston'] > 0) { $LA = time() - $r['laston']; $Unit1 = "Seconds"; if($LA >= 60) { $LA = (int) ($LA/60); $Unit1 = "Minutes"; } if($LA >= 60) { $LA = (int) ($LA/60); $Unit1 = "Hours"; if($LA >= 24) { $LA = (int) ($LA/24); $Unit1 = "Days"; } } $LastAction = "$LA $Unit1 ago."; } else { $LastAction="--"; } if($r['donatordays']) { $r['username'] = '<font color=red>'.$r['username'].'</font>'; $D = '[img=donator.gif]'; } if($r['laston'] >= time()-15*60) { $On = "<blink><font color='green'>[b]Online[/b]</font></blink>"; } else { $On = "<font color='red'>[b]Offline[/b]</font>"; } $DaysOld = number_format($r['daysold']); $Money = number_format($r['money']); $Crystals = number_format($r['crystals']); $Level = number_format($r['level']); $HP = number_format($r['hp']); $MaxHP = number_format($r['maxhp']); $Friends = number_format($r['friend_count']); $Enemies = number_format($r['enemy_count']); echo '<h3>Profile for '.$r['username'].'</h3> <table width="98%" cellspacing="1" class="table"> <tr style="background:gray"> <th>General Info</th> <th>Display Pic</th> </tr> <tr> <td width="50%"> Name: '.$r['username'].' ['.$r['userid'].'] '.$D.' User Level: '.$UserLevel.' Duties: '.$r['duties'].' Level: '.$Level.' Money: $'.$Money.' Crystals: '.$Crystals.' Property: '.$r['hNAME'].' Gender: '.$r['gender'].' Days Old: '.$DaysOld.' Location: '.$r['cityname']; if ($ir['location'] != $r['location']) { echo '[[url="monorail.php?to='.$r['location'].'"]Travel[/url]]'; } echo ' Friends: '.$Friends.' Enemies: '.$Enemies.' Health: '.$HP.'/'.$MaxHP.' Gang: '; if($r['gang']) { echo '[url="gangs.php?action=view&ID='.$r['gang'].'"]'.$r['gangNAME'].'[/url] '; } else { echo 'Not in a gang. '; } echo ' Signed Up: '.$SignedUp.' Last Action: '.$LastAction.' Online: '.$On.' '; if($r['fedjail']) { echo ' [b]<font color="red">In federal jail for '.$r['fed_days'].' day(s). '.$r['fed_reason'].' Jailed By: '.$r['fed_jailedby'].'</font>'; } if($r['hospital']) { echo ' [b]<font color=red>In hospital for '.$r['hospital'].' minutes. Reason: '.$r['hospreason'].'</font>[/b]'; } if($r['jail']) { echo ' [b]<font color=red>In jail for '.$r['jail'].' minutes. Reason: '.$r['jail_reason'].'</font>[/b]'; } echo ' </td> <td width="50%" style="text-align:center;">'; if($r['display_pic']) { echo '[img='.$r['display_pic'].']'; } else { echo 'This user has not added a display picture!'; } echo ' </td> </tr> <tr> <th colspan="4">Links</th> </tr> <tr> <td colspan="2" style="text-align:center;"> <table width="100%" cellspacing="1" border="0" class="table"> <tr style="font-weight:bold;" align="center"> <td colspan="4">[[url="attack.php?ID='.$r['userid'].'"]Attack[/url]]</td> </tr> <tr style="font-weight:bold;" align="center"> <td colspan="2">[[url="mailbox.php?action=compose&ID='.$r['userid'].'"]Send Mail[/url]]</td> <td colspan="2">[[url="contactlist.php?action=add&ID='.$r['userid'].'"]Add Contact[/url]]</td> </tr> <tr style="font-weight:bold;" align="center"> <td>[[url="sendcash.php?ID='.$r['userid'].'"]Send Cash[/url]]</td> <td>[[url="sendcrys.php?ID='.$r['userid'].'"]Send Crystals[/url]]</td> <td>[[url="sendbank.php?ID='.$r['userid'].'"]Bank Xfer[/url]]</td> <td>[[url="sendcyber.php?ID='.$r['userid'].'"]CyberBank Xfer[/url]]</td> </tr> <tr style="font-weight:bold;" align="center">'; if($ir['user_level'] == 2 || $ir['user_level'] == 3 || $ir['user_level'] == 5) { echo ' <td colspan="2">[[url="jailuser.php?userid='.$r['userid'].'"]Jail[/url]]</td> <td colspan="2">[[url="mailban.php?userid='.$r['userid'].'"]Mail Ban[/url]]</td> '; } if($ir['donatordays'] > 0) { echo ' </tr> <tr style="font-weight:bold;" align="center"> <td colspan="2">[[url="friendslist.php?action=add&ID='.$r['userid'].'"]Add Friends[/url]]</td> <td colspan="2">[[url="blacklist.php?action=add&ID='.$r['userid'].'"]Add Enemies[/url]]</td>'; } echo ' </tr> </table> </td> </tr>'; if($ir['user_level'] == 2 || $ir['user_level'] == 3 || $ir['user_level'] == 5) { echo ' <tr> <th colspan="2">Staff Information</th> </tr> <tr> <td style="text-align:center;" colspan="2">'; $r['lastiph'] = @gethostbyaddr($r['lastip']); $r['lastiph'] = checkblank($r['lastiph']); $r['lastip_loginh'] = @gethostbyaddr($r['lastip_login']); $r['lastip_loginh'] = checkblank($r['lastip_loginh']); $r['lastip_signuph'] = @gethostbyaddr($r['lastip_signup']); $r['lastip_signuph'] = checkblank($r['lastip_signuph']); echo ' <h3>Internet Info</h3> <table width="98%" border="0" cellspacing="1" class="table"> <tr> <th></th> <th>IP</th> <th>Hostname</th> </tr> <tr> <td>Last Hit</td> <td>'.$r['lastip'].'</td> <td>'.$r['lastiph'].'</td> </tr> <tr> <td>Last Login</td> <td>'.$r['lastip_login'].'</td> <td>'.$r['lastip_loginh'].'</td> </tr> <tr> <td>Signup</td> <td>'.$r['lastip_signup'].'</td> <td>'.$r['lastip_signuph'].'</td> </tr> </table>'; echo ' <form action="staffnotes.php" method="post"> Staff Notes: <textarea rows="7" cols="100" name="staffnotes">'.$r['staffnotes'].'</textarea> <input type="hidden" name="ID" value="'.$_GET['u'].'" /> <input type="submit" value="Change" /></form> </td> </tr>'; } echo' </table> '; } } function checkblank($in) { if(!$in) { return 'N/A'; } return $in; } $h->endpage(); ?>[code]
-
Re: [v2]Simple Mine No probs, just remember to close you div as well next time :wink:
-
Re: [v2]Simple Mine
-
[mccode v2] Search.php in one | Optimized
Karlos replied to Haunted Dawg's topic in Free Modifications
Re: [MCC V2] - Search.php in one | Optimized And by guessing average MCCodes security and coding, this is more secure and better laid out out -
Re: [v2]Simple Mine Try this for mine.php <?php require_once (DIRNAME(__FILE__) . '/globals.php'); ?> <div align='center'> Welcome to the mine. Not many stop by here anymore for most of the minerals have been used. But you can go ahead and try, you might just get lucky. [img=http://i39.tinypic.com/2a7yftj.jpg] <map id="_Image-Maps_6200901041800089" name="Image-Maps_6200901041800089"> <area shape="rect" coords="159,239,236,316" href="minecheck.php" height="10" /> <area shape="rect" coords="3,82,74,155" href="minecheck.php" height="10" /> <area shape="rect" coords="2,163,75,233" href="minecheck.php" height="10" /> <area shape="rect" coords="0,242,74,315" href="minecheck.php" height="10" /> <area shape="rect" coords="161,92,235,155" href="minecheck.php" height="10" /> <area shape="rect" coords="82,102,157,157" href="minecheck.php" height="10" /> <area shape="rect" coords="82,164,153,234" href="minecheck.php" height="10" /> <area shape="rect" coords="81,243,153,313" href="minecheck.php" height="10" /> <area shape="rect" coords="161,163,231,233" href="minecheck.php" height="10" /> <area shape="rect" coords="240,95,312,156" href="minecheck.php" height="10" /> <area shape="rect" coords="239,161,312,234" href="minecheck.php" height="10" /> <area shape="rect" coords="240,240,312,314" href="minecheck.php" height="10" /> <area shape="rect" coords="318,87,391,155" href="minecheck.php" height="10" /> <area shape="rect" coords="318,161,392,233" href="minecheck.php" height="10" /> <area shape="rect" coords="317,240,391,312" href="minecheck.php" height="10" /> <area shape="rect" coords="397,81,470,155" href="minecheck.php" height="10" /> <area shape="rect" coords="398,160,472,234" href="minecheck.php" height="10" /> <area shape="rect" coords="396,241,470,315" href="minecheck.php" height="10" /> <area shape="rect" coords="476,82,549,153" href="minecheck.php" height="10" /> <area shape="rect" coords="476,159,548,234" href="minecheck.php" height="10" /> <area shape="rect" coords="476,242,548,314" href="minecheck.php" height="10" /> <area shape="rect" coords="479,64,549,75" href="minecheck.php" height="10" /> <area shape="rect" coords="405,68,469,78" href="minecheck.php" height="10" /> <area shape="rect" coords="551,317,553,319" href="http://www.image-maps.com/index.php?aff=mapped_users_6200901041800089" alt="Image Mapper" title="Image Mapper" /> </map> </div> <?php $h->endpage(); ?> Got rid of all unneeded code and closed your div -.- He has got a point Crazy-T...and stop stealing my sig -.-
-
Re: [MCCodes V2] View User Yea, okay I'll have a go...I'm just so bored at the moment..
-
Re: [MCCodes V2] View User As I said to you on MSN...I'm no good with JavaScript...Something I need to learn but never get round to do..
-
Re: DJ Control Center Thief :| I showed you that :-D
-
mccode-v2 Shops item stock - as requested (Not Tested)
Karlos replied to radio_active's topic in Free Modifications
Re: [MCcode v2] Shops item stock - as requested (Not Tested) Put the original code in...then replace the bits which altered code... -
Re: [mccode v2] Preferences Do whatever really... * Karlos continues to eat his curry...
-
Re: [mccode v2] Preferences Or maybe let "let" them change it.. but make the query always set it to demo..and say "you pass would have been changed but this is a demo" :lol:
-
Re: [MCCodes V2] View User No problem... I'm tired and all that..So Sorry :-)
-
Re: [MCCodes V2] View User I'm not... It's a personal preference how the links are..
-
Re: [MCCodes V2] View User If you don't like it...Don't use it :roll:
-
Re: [MCCodes V2] View User Thanks, As you always say ( * = bad) no point having it in view user not unless you want longer loading pages.. it took me 20/25 minutes thinking what I would need to select but I got their and done it :)
-
Re: [MCCodes V2] View User Yes but yours had a profile sig :-D Anyway so have i on cursed..
-
Re: [mccode v2] Annoucements Upgrade! Thanks redsnake :wink:
-
Re: Query Problem... [Fixed] In the end I found more problems and I have almost certainly got everything I need now. If anyone can see if i need more can they please mention it to me please. $JobQuery = sprintf( "SELECT u.userid, u.username, u.level, u.money, u.crystals, u.laston, u.lastip, u.energy, u.will, u.maxwill, u.brave, u.maxbrave, u.maxenergy, u.hp, u.maxhp, u.hospital, u.jail, u.jail_reason, u.fedjail, u.user_level, u.gender, u.gang, u.donatordays, u.email, u.hospreason, us.userid, us.strength, us.labour, us.IQ, j.jID, jr.jrID " . "FROM users u " . "LEFT JOIN userstats us " . "ON u.userid =us.userid " . "LEFT JOIN jobs j " . "ON j.jID = u.job " . "LEFT JOIN jobranks jr " . "ON jr.jrID = u.jobrank " . "WHERE u.userid = ('%u')", $userid); $is = $db->query($JobQuery);