JamesRage
Members-
Posts
86 -
Joined
-
Last visited
Content Type
Profiles
Forums
Events
Everything posted by JamesRage
-
Thanks AnonymousUser, but I still get an error when submitting the SQL: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '* (`imgID`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1' at line 5 Thanks for trying again. :(
-
Hey guys, I've really wanted a mod which was made by Richard, its his user images mod, but as you know the forum used to mess codes back then and it really interferes when using it in your game, I'm running on Mccodes V2.0.5b and really wanted someone to post a copy which isn't messed due to the forum system: Here is the code guys: CREATE TABLE `userimages` ( **`imgID` int(11) NOT NULL auto_increment, **`imgUSER` int(11) NOT NULL, **`imgURL` varchar(255) NOT NULL, **PRIMARY KEY* (`imgID`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 Error I get with SQL: #1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '**`imgID` int(11) NOT NULL auto_increment, **`imgUSER` int(11) NOT NULL, **`im' at line 2 userimages.php <?php include "globals.php"; print "<center><font size='4' face='Arial, Helvetica, sans-serif'>User images</font> <hr width=90%>"; switch($_GET['action']) { case 'view': view_image(); break; * default: user_images(); break; } function user_images() { global $db,$ir,$c,$userid,$h; $_GET['delete'] = abs((int) $_GET['delete']); if($_GET['delete']) { $db->query("DELETE FROM userimages WHERE imgID={$_GET['delete']} AND imgUSER=$userid"); print " Image deleted from gallery. * <hr width=90%>"; } $_GET['set'] = abs((int) $_GET['set']); if($_GET['set']) { $image=$db->query("SELECT * FROM userimages WHERE imgID={$_GET['set']}",$c); $imgs=$db->fetch_row($image); $db->query("UPDATE users SET display_pic='{$imgs['imgURL']}' WHERE userid=$userid"); print " New display image set. * <hr width=90%>"; } $_GET['XID'] = abs((int) $_GET['XID']); if(!$_GET['XID']) { print "No userID submitted<hr width=90%>> <a href="http://explore.php" target="_blank">Back to city</a><hr width=90%>"; } else { $q=$db->query("SELECT * FROM userimages WHERE imgUSER={$_GET['XID']}",$c); $x=$db->query("SELECT * FROM users WHERE userid={$_GET['XID']}",$c); $y=$db->fetch_row($x); if($db->num_rows($x) == 0) { die (" There is no user with this ID. * <hr width=90%>> <a href="http://explore.php" target="_blank">Back to city</a><hr width=90%>"); } print "<b>{$y['username']}'s uploaded images</b> * "; if($db->num_rows($q) == 0) { print "<table width=90% bgcolor=#DFDFDF><tr><td><center>This user has no uploaded images</center></td></tr></table><hr width=90%>> <a href="http://viewuser.php?u={$y[" target="_blank">Back to profile</a><hr width=90%>"; } else { print "<table width=90% bgcolor=#DFDFDF cellpadding='3'><tr>"; while($r=$db->fetch_row($q)) { $br++; if ($br == 3) { $div="</tr><tr>"; $br=0; } else { $div=""; } $cn++; print "<td align='center'><b>#$cn Profile image</b> * <a href="http://userimages.php?action=view&ID={$r[" target="_blank">[img={$r[]</a>"; if($_GET['XID'] == $userid) { print " [<a href="http://userimages.php?XID={$r[" target="_blank">Delete</a>] * [<a href="http://userimages.php?XID={$r[" target="_blank">Set Image</a>]"; } print " * </td>"; print "$div"; } print "</tr></table> <hr width=90%>> <a href="http://viewuser.php?u={$y[" target="_blank">Back to profile</a><hr width=90%>"; } } } function view_image() { global $db,$ir,$c,$userid,$h; $_GET['ID'] = abs((int) $_GET['ID']); $e=$db->query("SELECT * FROM userimages WHERE imgID={$_GET['ID']}",$c); $gh=$db->fetch_row($e); print "[img={$gh[] * <hr width=90%>> <a href="http://userimages.php?XID={$gh[" target="_blank">Back to images</a><hr width=90%>"; } $h->endpage(); ?> Error: Links (target blank the "http://" addon etc), and bb image tags mess up with the code and other errors, if you can fix anyone please do, urgently needed. :( Preferences edit: function pic_change() { global $db,$ir,$c,$userid,$h; print "<center><b>Upload your images here</b> * <font color='red'><b>Do not upload any offensive material, please keep it PG13 or your user may be at risk. * Uploaded images are only to be used for {$set['game_name']} material.</b></font> * 150x200 Maximum image width and height, any images exceeding this will be resized. Try to use only GIF, JPG and PNG formats.<form action='preferences.php?action=picchange2' method='post'> New Pic: <input type='text' name='newpic' /> * <input type='submit' value='Upload Image' /></form><hr width=75%>> <a href="http://preferences.php" target="_blank">Back</a><hr width=75%>"; } function do_pic_change() { global $db,$ir,$c,$userid,$h; print "<center>"; if($_POST['newpic'] == "") { print " You did not type a new image location. * * <hr width=75%>> <a href="http://preferences.php?action=picchange" target="_blank">Back</a><hr width=75%>"; } else { $_POST['newpic']=str_replace('\\\'',''', $_POST['newpic']); $db->query("UPDATE users SET display_pic='{$_POST['newpic']}' WHERE userid=$userid",$c); $db->query("INSERT INTO userimages VALUES('',$userid,'{$_POST['newpic']}');",$c); print " Image Changed. * * <hr width=75%>> <a href="http://preferences.php?action=picchange" target="_blank">Back</a><hr width=75%>"; } } In viewuser.php, add below display pic: $pics=$db->query("SELECT * FROM userimages WHERE imgUSER={$r['userid']}", $c); $pc=$db->num_rows($pics); print " [<a href="http://userimages.php?XID={$r[" target="_blank">$pc uploaded images</a>] "; Thanks guys! (:
-
If your using MCCodes V1 and adding mods that are MCCodes V2, it won't work. You have to convert your mods to work with your Mccodes V1. Here is a thread to help convert your mods in order to make them work: Click here!
-
Okay thanks Someone for fixing and releasing the working copy, another free mod for everyone who use NWE. (: And I'll definitely try to download a free copy of NWE later on in the day Alain. ;)
-
Hey guys, I don't have a NWE license or any of the codes for it, and I've used all the tips in this forum and another, and managed to create a Safe-cracker mod (originally made for MCCodes V2 but converted for NWE by me), I definitely know theres something wrong with it, but I'll leave it up-to you guys, please tell whats wrong and I'll try to adjust it, my first go at it. (: <?php if(isset($_POST['submit'])) { $three = rand(100,110); if($_POST['firstthree'] != $three) { ErrorMessage(Translate("Error, Wrong Combination!"); exit(0); } $two = rand(20,30); if($_POST['secondtwo'] != $two) { ErrorMessage(Translate("Error, Wrong Combination!"; exit(0); } $one = rand(1,9); if($_POST['lastone'] != $one) { ErrorMessage(Translate("Error, Wrong Combination!"); exit(0); } else if($_POST['firstthree'] == $three && $_POST['secondtwo'] == $two && $_POST['lastone'] == $one) { echo Translate("You press the numbers [{$_POST['firstthree']}][{$_POST['secondtwo']}][{$_POST['lastone']}]<br /> <font color='green' size='5'>Right Combination! Congratulations!</font>"); $muny=rand(10000,400000); $crys=rand(20,50); $db->Execute("UPDATE `users` SET !Currency=!Currency+{$muny},crystals=crystals+{$crys} WHERE userID=$userID"); } } else { echo "<form action='safecracker.php' method='post'> First Three: [<input type='text' name='firstthree' length='3' maxlength='3'>] <sup>Hint: 100 - 110</sup><br /> Second Two: [<input type='text' name='secondtwo' length='2' maxlength='2'>] <sup>Hint: 20 - 30</sup><br /> Last One: [<input type='text' name='lastone' length='1' maxlength='1'>] <sup>Hint: 1 - 9</sup><br /> <input type='submit' name='submit' value='Submit!'> </form>"; } Thanks!
-
Hey guys, I wanted this modification for some time now, and I would show deep appreciation to the person, who can lend me a copy. What I'm after is a Hide & Seek feature where users can hide in a php directory within the game and others can find each another, my members and I, really wanted this for quite some time now, please guys, if you have a copy, please share! Thanks guys, really need this! (:
-
Hey guys, this mod was originally made by Peterisgb, but I thought it was missing a few things here and there, so I made some edits. :) Edits - - Staff colors. - Staff icon. <?php require "globals.php"; global $db,$ir,$c,$r,$userid,$h; if ($_GET['time']) { $time=$_GET['time']; } else { $time=15; } $cn=0; $lk=mysql_query("SELECT * FROM users WHERE laston>unix_timestamp()-1440*60"); $aa=mysql_num_rows($lk); $ll=mysql_query("SELECT * FROM users WHERE laston>unix_timestamp()-60*60"); $ab=mysql_num_rows($ll); $lm=mysql_query("SELECT * FROM users WHERE laston>unix_timestamp()-45*60"); $ac=mysql_num_rows($lm); $ln=mysql_query("SELECT * FROM users WHERE laston>unix_timestamp()-30*60"); $ad=mysql_num_rows($ln); $lo=mysql_query("SELECT * FROM users WHERE laston>unix_timestamp()-15*60"); $ae=mysql_num_rows($lo); $he=mysql_query("SELECT * FROM users WHERE laston>unix_timestamp()-1*60"); $hu=mysql_num_rows($he); $q=mysql_query("SELECT * FROM users WHERE laston>unix_timestamp()-{$time}*60 ORDER BY laston DESC"); ?> <table border="0" class=table width="100%" cellpading="0" cellspacing="0"> <tr> <td class=table> <h3>Statistics</h3> Users online in the last minute: <?php print"{$hu}"; ?><br /> Users online in the last 15 Minutes: <?php print"{$ae}"; ?><br /> Users online in the last 30 Minutes: <?php print"{$ad}"; ?><br /> Users online in the last 45 Minutes: <?php print"{$ac}"; ?><br /> Users online in the last 60 Minutes: <?php print"{$ab}"; ?><br /> Users online in the last 24 Hours: <?php print"{$aa}"; ?><br /> </td> <td class=table> <h3>Time Selecter</h3> <a href='usersonline.php?time=1'>(1 Min)</a><br /> <a href='usersonline.php?time=15'>(15 Mins)</a><br /> <a href='usersonline.php?time=30'>(30 Mins)</a><br /> <a href='usersonline.php?time=45'>(45 Mins)</a><br /> <a href='usersonline.php?time=60'">(60 Mins)</a><br /> <a href='usersonline.php?time=1440'>(24 Hours)</a> <br /> </td> <td class=table> <h3>Legend</h3> Admins = <font color = gold>Gold<br /></font> Secretaries = <font color = blue>Blue<br /></font> Moderators = <font color = cyan>Cyan<br /></font> Assistants = <font color = purple>Purple<br /></font> Members = <font color = silver>Silver<br /></font> Game Staff = <img src='owner.gif' alt='Staff' /><br /> Donators = <img src='donator.gif' alt='Donator' /><br /> </td> <tr> </table> <table border="0" class=table width="100%" cellpading="0" cellspacing="0"> <tr> <td class=table> <h3></h3> </td> <td class=table> <u><b>Level</b></u> </td> <td class=table> <u> <b>User</b></u> </td> <td class=table> <u><b> Rate</b></u> </td> <td class=table> </td> <td class=table> <u> <b>Last Action</b></u> </td> <td class=table> <u> <b> Time Online</b></u> <td class=table> </td> <td class=table> <u><b>User Actions</b></u> </td> </tr><hr /> <?php while($r=mysql_fetch_assoc($q)) { $la=time()-$r['laston']; $unit="secs"; if($la >= 60) { $la=(int) ($la/60); $unit="mins"; } if($la >= 60) { $la=(int) ($la/60); $unit="hours"; if($la >= 24) { $la=(int) ($la/24); $unit="days"; } } $cn++; $name=$r['username']; $id=$r['userid']; $gangtag=$r['yourgangPREF']; if($r['donatordays'] > 0) { $donator="<img src='donator.gif' alt='Donator: {$r['donatordays']} Days Left' title='Donator: {$r['donatordays']} Days Left' />"; } if($r['donatordays'] == 0) { $donator=""; } if($r['user_level']== 2) { $staff="<img src='owner.gif' alt='Game Staff' alt='Admins' title='Admin'/>"; } if($r['user_level']== 3) { $staff="<img src='owner.gif' alt='Game Staff' alt='Staff' title='Secretary'/>"; } if($r['user_level']== 4) { $staff="<img src='owner.gif' alt='Game Staff' alt='Staff' title='Assistant'/>"; } if($r['user_level']== 5) { $staff="<img src='owner.gif' alt='Game Staff' alt='Staff' title='Moderator'/>"; } if($r['user_level']== 1) { $staff=""; } if($r['donatordays'] > 0) { $donator="<img src='donator.gif' alt='Donator: {$r['donatordays']} Days Left' title='Donator: {$r['donatordays']} Days Left' />"; } if($r['donatordays'] == 0) { $donator=""; } if($r['user_level']== 2) { $name="<font color=gold>$name</font>"; } if($r['user_level']== 3) { $name="<font color=blue>$name</font>"; } if($r['user_level']== 4) { $name="<font color=purple>$name</font>"; } if($r['user_level']== 5) { $name="<font color=cyan>$name</font>"; } if($r['user_level']== 1) { $name="<font color=silver>$name</font>"; } $r['username']="<a href='viewuser.php?u={$r['userid']}'>$name [$id]</a> $staff $donator"; print "<tr> <td class=table> $cn. </td> <td class=table> Level: {$r['level']} </td> <td class=table> {$r['username']} </td> <td class=table bgcolor='#000000'> <a href=rating.php?change=up&ID={$r['userid']}><img src=positive.gif height='12' width='12'></a> <b>{$r['rating']}</b> <a href=rating.php?change=down&ID={$r['userid']}><img src=negative.gif height='12' width='12'></a> </td> <td>"; print "</td> <td class=table> ($la $unit) </td> <td class=table>"; $lb=time()-$r['last_login']; $units="secs"; if($lb >= 60) { $lb=(int) ($lb/60); $units="mins"; } if($lb >= 60) { $lb=(int) ($lb/60); $units="hours"; if($lb >= 24) { $lb=(int) ($lb/24); $units="days"; } } if($r['laston'] <= time()-60*60) { $lb="Offline"; $unit=""; } print "{$lb} {$units}</td> <td>"; if($r['hospital'] > 0) { print"<td> <small> [<a href='mailbox.php?action=compose&ID={$r['userid']}'><font color='{$r['colour']}'>Mail</font></a>] (In Hospital)</small> </td>"; } if($r['jail'] > 0) { print"<td><small> [<a href='mailbox.php?action=compose&ID={$r['userid']}'><font color='{$r['colour']}'>Mail</font></a>] (In Jail)<small> </td>"; } if($r['hospital'] == 0 AND $r['jail'] == 0) { print"<td> <small> <small>[<a href='attack.php?ID={$r['userid']}'><font color='{$r['colour']}'>Attack</font></a>] [<a href='mailbox.php?action=compose&ID={$r['userid']}'><font color='{$r['colour']}'>Mail</font></a>]</small> </td>"; } print"</tr>"; } ?> </td> </tr> </table><hr /> <?php $h->endpage(); ?> Additional Information - Its only a few simple here and there edits, but I hope I've helped someone, and give Peterisgb some credit to. Thanks, and have a good day! (:
-
Nice, good luck with sales.
-
Thanks all, but I managed to code it all up, by starting fresh and changing my SQL and finished editing your banner ingame code, its all finished (glad to say), may release on MWG soon. :') Thanks again!
-
Nope nothing buddy ): Parse error: syntax error, unexpected '{', expecting ',' or ';' in /home/cvjcp26/public_html/gangs.php on line 103 And can someone please tell whats wrong "yourgang.php?action=warview" I get a query error? ):
-
Hey guys, I really getting frustrated with a mod I'm trying to create, I'm trying to re-arrange V2 gang files for a friend of mine, the mod is Gang Banners. I added the SQL: ALTER TABLE `gangs` ADD `gangsig` text NOT NULL ; Now, before adding the editing your gang banner code in "yourgang.php" I wanted to test it, so I changed the gangsig details through PHPMyAdmin, with a image link. And heres my code for the gang banner in gangs.php: <?php /** * MCCodes Version 2.0.5b * Copyright (C) 2005-2012 Dabomstew * All rights reserved. * * Redistribution of this code in any form is prohibited, except in * the specific cases set out in the MCCodes Customer License. * * This code license may be used to run one (1) game. * A game is defined as the set of users and other game database data, * so you are permitted to create alternative clients for your game. * * If you did not obtain this code from MCCodes.com, you are in all likelihood * using it illegally. Please contact MCCodes to discuss licensing options * in this case. * * File: gangs.php * Signature: 92dce273deb1646013f261098b78903c * Date: Fri, 20 Apr 12 08:50:30 +0000 */ require_once('globals.php'); if (!isset($_GET['ID'])) { $_GET['ID'] = 0; } $_GET['ID'] = abs((int) $_GET['ID']); if (!$_GET['ID']) { echo "Invalid use of file"; } else { $gq = $db->query( "SELECT `gangPRESIDENT`, `gangVICEPRES`, `gangNAME`, `gangID`, `gangRESPECT`, `gangsig`, `gangDESC` FROM `gangs` WHERE `gangID` = {$_GET['ID']}"); $gangdata = $db->fetch_row($gq); if (!isset($_GET['action'])) { $_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; default: gang_view(); break; } } function gang_view() { global $db, $ir, $c, $h, $gangdata; $pq = $db->query( "SELECT `userid`, `username` FROM `users` WHERE `userid` = {$gangdata['gangPRESIDENT']} LIMIT 1"); if ($db->num_rows($pq) == 0) { $ldr = array('userid' => 0); } else { $ldr = $db->fetch_row($pq); } $db->free_result($pq); $vpq = $db->query( "SELECT `userid`, `username` FROM `users` WHERE `userid` = {$gangdata['gangVICEPRES']}"); if ($db->num_rows($vpq) == 0) { $coldr = array('userid' => 0); } else { $coldr = $db->fetch_row($vpq); } $db->free_result($vpq); echo "<h3><u>{$gangdata['gangNAME']}</u></h3> <hr width=60%/><img src='{$gangdata['gangsig']}' /> <hr width=60%/>"; if ($ldr['userid'] > 0) { print "President: <a href='viewuser.php?u={$ldr['userid']}'>{$ldr['username']}</a><br />"; } else { print "President: N/A<br />"; } if ($coldr['userid'] > 0) { print "Vice-President: <a href='viewuser.php?u={$coldr['userid']}'>{$coldr['username']}</a><hr />"; } else { print "Vice-President: N/A<hr />"; } $cnt = $db->query( "SELECT COUNT(`userid`) FROM `users` WHERE `gang` = {$gangdata['gangID']}"); echo "<b>Members:</b> " . $db->fetch_single($cnt) . "<br /> <b>Description: </b> {$gangdata['gangDESC']}<br /> <b>Respect Level: </b> {$gangdata['gangRESPECT']}<br /> > <a href='gangs.php?action=userlist&ID={$gangdata['gangID']}'> User List </a><br /> > <a href='gangs.php?action=apply&ID={$gangdata['gangID']}'> Apply </a>"; $db->free_result($cnt); } function gang_userlist() { global $db, $ir, $c, $h, $gangdata; echo "<h3>Userlist for {$gangdata['gangNAME']}</h3> <table> <tr style='background: gray;'> <th>User</th> <th>Level</th> <th>Days In Gang</th> </tr>"; $q = $db->query( "SELECT `userid`, `username`, `level`, `daysingang` FROM `users` WHERE `gang` = {$gangdata['gangID']} ORDER BY `daysingang` DESC, `level` DESC"); while ($r = $db->fetch_row($q)) { echo "<tr> <td><a href='viewuser.php?u={$r['userid']}'> {$r['username']} </a></td> <td>{$r['level']}</td> <td>{$r['daysingang']}</td> </tr>"; } $db->free_result($q); echo "</table><br /> > <a href='gangs.php?action=view&ID={$gangdata['gangID']}'> Back </a>"; } function gang_applyform() { global $ir, $c, $h, $gangdata; if ($ir['gang'] == 0) { $apply_csrf = request_csrf_code('gang_apply'); echo "<form action='gangs.php?action=applys&ID={$_GET['ID']}' method='post'> Type the reason you should be in this faction.<br /> <textarea name='application' rows='7' cols='40'></textarea><br /> <input type='hidden' name='verf' value='{$apply_csrf}' /> <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; $application = (isset($_POST['application']) && is_string($_POST['application'])) ? $db->escape( htmlentities( stripslashes($_POST['application']), ENT_QUOTES, 'ISO-8859-1')) : ''; if (!isset($_POST['verf']) || !verify_csrf_code('gang_apply', stripslashes($_POST['verf']))) { echo " Your request to apply to this gang has expired. Please try again.<br /> > <a href='gangs.php?action=apply&ID={$_GET['ID']}'>Back</a> "; die($h->endpage()); } if (!$ir['gang']) { $db->query( "INSERT INTO `applications` VALUES(NULL, $userid, {$_GET['ID']}, '{$application}')"); $gev = $db->escape( "<a href='viewuser.php?u={$userid}'>{$ir['username']}</a>" . " sent an application to join this gang."); $db->query( "INSERT INTO `gangevents` VALUES(NULL, {$_GET['ID']}, " . time() . ", '{$gev}')"); echo "You sent your application to the {$gangdata['gangNAME']} gang."; } else { echo "You cannot apply for a gang when you are already in one."; } } $h->endpage(); Lines 103 is the main focus, thanks guys, really need this for a friend! :')
-
I'm trying to work as much as I can with templates now and then, and need some help? If you can, and want, please drop me a PM. Its really needed for my game. :) And quick question guys, how do I make it, that when a user scrolls up and down on a webpage the initial background doesn't move but the content within the webpage? :) I think crime-ink.net uses it? :) Thanks :)
-
Thanks all. :) Dave managed to fix it for me. :D
-
anyone please?
-
Hey i was trying to install daves ajax chat mod, all was good till i got a error on the initial chatbox: Error Handler not present I'm know the problem, i have to change the header information on the mod, anyone know the header code for version 2.0.5b of mccodes? Thanks ;)
-
The Coder has them his engine :)
-
Hey, i've been working on my first mod lately on v2 (a friends copy), what i've been doing is transforming my viewuser around, and everything is going well apart from some issues, when I view the viewuser file from a donator account or if they have a display pic, it comes out perfect (more or less). However, if they don't have a display pic, it comes out very dodgy. Here is the file: <?php include "globals.php"; $_GET['u'] = (isset($_GET['u']) && is_numeric($_GET['u'])) ? abs(intval($_GET['u'])) : ''; if (!$_GET['u']) { echo 'Invalid use of file'; } else { $q = $db->query( "SELECT `userid`, `user_level`, `laston`, `last_login`, `yahoo`, `signedup`, `duties`, `donatordays`, `username`, `gender`, `daysold`, `money`, `rating`, `crystals`, `level`, `friend_count`, `enemy_count`, `display_pic`, `hp`, `name`, `maxhp`, `sm`, `profileSIG`, `gang`, `fedjail`, `hospital`, `hospreason`, `jail`, `jail_reason`, `bankmoney`, `cybermoney`, `lastip`, `last_name`, `age`, `lastip`, `lastip_login`, `lastip_signup`, `staffnotes`, `cityname`, `hNAME`, `gangNAME`, `fed_days`, `fed_reason`, `aim_game`, `msn`, `AIM`, `AOL` FROM `users` `u` INNER JOIN `cities` AS `c` ON `u`.`location` = `c`.`cityid` INNER JOIN `houses` AS `h` ON `u`.`maxwill` = h.`hWILL` LEFT JOIN `gangs` AS `g` ON `g`.`gangID` = `u`.`gang` LEFT JOIN `fedjail` AS `f` ON `f`.`fed_userid` = `u`.`userid` WHERE `u`.`userid` = {$_GET['u']}"); if ($db->num_rows($q) == 0) { $db->free_result($q); echo 'Sorry, we could not find a user with that ID, check your source.'; } else { $r = $db->fetch_row($q); $db->free_result($q); $checkulevel = array(0 => 'NPC', 1 => 'Member', 2 => 'Owner', 3 => 'Secretary', 5 => 'Assistant'); $userl = $checkulevel[$r['user_level']]; $lon = ($r['laston'] > 0) ? date('F j, Y g:i:s a', $r['laston']) : "Never"; $ula = ($r['laston'] == 0) ? 'Never' : DateTime_Parse($r['laston']); $ull = ($r['last_login'] == 0) ? 'Never' : DateTime_Parse($r['last_login']); $sup = date('F j, Y g:i:s a', $r['signedup']); $u_duties = ($r['user_level'] > 1) ? 'Duties: ' . $r['duties'] . '<br />' : ''; $user_name = ($r['donatordays']) ? '<span style="color:red; font-weight:bold;">' . $r['username'] . '</span> [' . $r['userid'] . '] <img src="donator.gif" alt="Donator: ' . $r['donatordays'] . ' Days Left" title="Donator: ' . $r['donatordays'] . ' Days Left" />' : $r['username'] . ' [' . $r['userid'] . ']'; $on = ($r['laston'] >= $_SERVER['REQUEST_TIME'] - 15 * 60) ? '<font color="green"><b>Online</b></font>' : '<font color="red"><b>Offline</b></font>'; $ref_q = $db->query( "SELECT COUNT(`refID`) FROM `referals` WHERE `refREFER` = {$r['userid']}"); $ref = $db->fetch_single($ref_q); $db->free_result($ref_q); echo " <table width=95%><tr><td><h3>Profile for $user_name</h3></tr></td></table>"; if($r['display_pic'] == "") { print "<table width=95% align=center class=table><th colspan=10>General Information</th><tr><td><img src='nopic.jpg' width=150px height=150px/></td>"; print "<td width=50%>Status: {$r['sm']}</td>"; } else { print " <table width=95% align=center cellspacing=1 class=table><th colspan=10>General Information</th><tr><td><img src={$r['display_pic']} width=150px height=150px/></td>"; print "<td width=50%><b>Status:</b> {$r['sm']}</td>"; print "<tr><td><b>Name:</b> $user_name</td><td><b>User Level:</b> $userl</td></tr> <tr><td><b>Gender:</b> {$r['gender']}</td><td><b>Signed Up:</b> $sup</td></tr> <tr><td><b>Property:</b> {$r['hNAME']}</td><td><b>Crystals:</b> {$r['crystals']}</td></tr> <tr><td><b>Referrals:</b> {$ref}</td><td><b>Money:</b> " . money_formatter($r['money']). "</td></tr> <tr><td><b>Duties:</b> {$r['duties']}</td><td><b>Street Steps:</b> {$r['steps']}</td></tr> <tr><th colspan=10>Status</th></tr> <tr><td><b>Online:</b> $on</td><td><b>Level:</b> {$r['level']}</td></tr> <tr><td><b>Last Active:</b> $lon</td><td><b>Health:</b> {$r['hp']}/{$r['maxhp']}</td></tr> <tr><td><b>Days Old:</b> {$r['daysold']}</td><td><b>Location:</b> {$r['cityname']}</td></tr> <tr><td><b>Gang:</b> {$r['gangNAME']}</td><td><b>Rating:</b> <a href=rating.php?change=up&ID={$r['userid']}><img src=positive.gif></a> {$r['rating']} <a href=rating.php?change=down&ID={$r['userid']}><img src=negative.gif></a></td></tr> <tr><th colspan=10>Statistics</th></tr>"; $attacks_won = $db->query(sprintf('SELECT COUNT(`log_id`) AS attacking_won FROM `attacklogs` WHERE `attacker` = %u AND `result` = "%s"', $userid, 'won')); $attacks_wonc = $db->fetch_row($attacks_won); $attacks_lost = $db->query(sprintf('SELECT COUNT(`log_id`) AS attacking_lost FROM `attacklogs` WHERE `attacker` = %u AND `result` = "%s"', $userid, 'lost')); $attacks_lostc = $db->fetch_row($attacks_lost); if ($attacks_lostc['attacking_lost']) { $attacking_perl = $attacks_lostc['attacking_lost'] / ($attacks_wonc['attacking_won'] + $attacks_lostc['attacking_lost']) * 100; } elseif (!$attacks_lostc['attacking_lost']) { $attacking_perl = 0; } if ($attacks_wonc['attacking_won']) { $attacking_perw = $attacks_wonc['attacking_won'] / ($attacks_wonc['attacking_won'] + $attacks_lostc['attacking_lost']) * 100; } elseif (!$attacks_wonc['attacking_won']) { $attacking_perw = 0; } $attacksd_won = $db->query(sprintf('SELECT COUNT(`log_id`) AS defending_won FROM `attacklogs` WHERE `attacked` = %u AND `result` = "%s"', $userid, 'lost')); $attacksd_wonc = $db->fetch_row($attacksd_won); $attacksd_lost = $db->query(sprintf('SELECT COUNT(`log_id`) AS defending_lost FROM `attacklogs` WHERE `attacked` = %u AND `result` = "%s"', $userid, 'won')); $attacksd_lostc = $db->fetch_row($attacksd_lost); if ($attacksd_lostc['defending_lost']) { $defending_perl = $attacksd_lostc['defending_lost'] / ($attacksd_wonc['defending_won'] + $attacksd_lostc['defending_lost']) * 100; } elseif (!$attacksd_lostc['defending_lost']) { $defending_perl = 0; } if ($attacksd_wonc['defending_won']) { $defending_perw = $attacksd_wonc['defending_won'] / ($attacksd_wonc['defending_won'] + $attacksd_lostc['defending_lost']) * 100; } elseif (!$attacksd_wonc['defending_won']) { $defending_perw = 0; } $T_won = $attacks_wonc['attacking_won'] + $attacksd_wonc['defending_won']; $T_lost = $attacks_lostc['attacking_lost'] + $attacksd_lostc['defending_lost']; if ($T_won) { $T_won_per = $T_won / ($T_won + $T_lost) * 100; } elseif (!$T_won) { $T_won_per = 0; } if ($T_lost) { $T_lost_per = $T_lost / ($T_won + $T_lost) * 100; } elseif (!$T_lost) { $T_lost_per = 0; } echo sprintf(' <table width="95%%" class=table bgcolor="#000000" cellspacing=1 cellpadding="0" bordercolor="Silver" border="0"> <tr> <th > <font color=green> Won </font></th> <th > Amount</th> <th > <font color=red> Lost</th> </font> <th > Amount</th> </tr> <tr> <td> <font color=green>Attacking Won</font> </td> <td> %u (%u%%) </td> <center></center> <td> <font color=red> Attacking Lost</font> </td> <td> %u (%u%%) </td> </tr> <tr> <td> <font color=green>Defending Won</font> </td> <td> %u (%u%%) </td> <td> <font color=red>Defending Lost</font> </td> <td> %u (%u%%) </td> </tr> <tr> <td> <font color=green>Total Won</font> </td> <td> %u (%u%%) </td> <td> <font color=red>Total Lost</font> </td> <td> %u (%u%%) </td> ', $attacks_wonc['attacking_won'], $attacking_perw, $attacks_lostc['attacking_lost'], $attacking_perl, $attacksd_wonc['defending_won'], $defending_perw, $attacksd_lostc['defending_lost'], $defending_perl, $T_won, $T_won_per, $T_lost, $T_lost_per ); print "<tr><th colspan=10>Actions</th></tr> <tr><td>[<a href='mailbox.php?action=compose&ID={$r['userid']}'>Send Mail</a>]</td><td>[<a href='sendcash.php?ID={$r['userid']}'>Send Cash</a>]<td>[<a href='sendcrys.php?ID={$r['userid']}'>Send Crystals</a>]</td><td>[<a href='sendbank.php?ID={$r['userid']}'>Bank Xfer</a>]</td></tr> <tr><td>[<a href='sendcyber.php?ID={$r['userid']}'>CyberBank Xfer</a>]</td><td>[<a href='attack.php?ID={$r['userid']}'>Attack</a>]<td>[<a href='contactlist.php?action=add&ID={$r['userid']}'>Add Contact</a>]</td><td>[<a href='nudge.php?ID={$r['userid']}'>Nudge</a>]</td></tr>"; } if ($ir['donatordays'] > 0) { print " <tr><td>[<a href='office.php?ID={$r['userid']}'>Rob Office</a>]</td><td>[<a href='driveby.php?ID={$r['userid']}'>Drive By</a>]<td>[<a href='friendslist.php?action=add&ID={$r['userid']}'>Add Friends</a>]</td><td>[<a href='blacklist.php?action=add&ID={$r['userid']}'>Add Enemies</a>]</td></tr></table>"; print"<hr width=95%/><table class=table cellspacing=1 cellpadding=1 width=95%><tr><th colspan=2>Users Comments <A href=comments.php?ID={$r['userid']}>[Add Comment]</a></th>"; if($ir['userid'] == $r['userid'] || $ir['user_level'] > 1) { print"<th width=10%>Delete</th>"; } print"</tr>"; $blah=mysql_query("SELECT * FROM comments WHERE cmtTO={$r['userid']} ORDER BY cmtTIME DESC limit 5", $c); while($cmnt=mysql_fetch_array($blah)) { $they=mysql_query("SELECT * FROM users WHERE userid={$cmnt['cmtFROM']}",$c); $them=mysql_fetch_array($they); $sent=date('F j, Y, g:i:s a',$cmnt['cmtTIME']); print"<td width=25%><b>{$them['username']} [{$them['userid']}]</br></br></b>$sent</td><Td>{$cmnt['cmtTEXT']}</td>"; if($ir['userid'] == $r['userid'] || $ir['user_level'] > 1) { print"<td width=10%><a href=comments.php?action=delete&ID={$cmnt['cmtID']}>Delete</a></td>"; } print"</tr>"; } print"</table>"; } } function checkblank($in) { if(!$in) { return "N/A"; } return $in; } if($r['profileSIG'] == "") { print "<hr width=95%/><table cellspacing=0 class='table' width='95%'> <tr style='background:gray'> <th><b><center>Profile Signature</center></b></th> </tr> <td><center>This user has not got a profile signature!</center></td> </tr> </table><hr width=95%/><br /><br />"; } else { print "<hr width=95%/><table cellspacing=0 class='table' width='95%'> <tr style='background:gray'> <th><b><center>Profile Signature</center></b></th> </tr> <tr> <td>{$r['profileSIG']}</td> </tr> </table><hr width=95%/><br /><br />"; } } $h->endpage(); ?>
-
NWE Engine (full version) for sale, PM me if your interested. :D
-
If you can't find a fix, try and see if anyone will you let you have the edit user function from V2. And than convert it from there. :)
-
Sad to see you go, I'v seen your quite important to this forum. :( Side note, why does everyone in some sense, try to flame MCCodes, I'm not trying to kick off a arguement, but regardless if the code is buggy, surely there must be ups to mccodes, isn't it why alot of games use mccodes? :s
-
Keep the torn design lol. Common, but I like it & there should be a better template out of the box. Mafia games are common, true, but at the end of day...It comes down to opinion. However, if you really hate the mafia theme, I'd say a war theme, anything but space and things of that nature!:L
-
Yo, i'm sure you guys heard of the illuminati.. you have to much watch this, not gonna lie, this scared me :L Part 1: Part 2: Part 3: RIP MJ):
-
Sure, I'll participate :-)
-
NWE Free and Dev 1.1.3 released! Use it as will now!
JamesRage replied to a_bertrand's topic in New Worlds Engine
Nice work :-) Isit possible to convert a Mccodes feature to NWE? I saw on your site it is, but its pretty complicated, to me atleast lol. Would it be possible if someone who could make a simpler and well presented tutorial on how? Would be very appreciated.