
Monkey644
Members-
Posts
112 -
Joined
-
Last visited
Content Type
Profiles
Forums
Events
Everything posted by Monkey644
-
Didn't see them within the program I use to edit the code. Removed these. All fine now, Thanks!!!
-
Hey all, I keep getting: Parse error: syntax error, unexpected '{' in /home/a4767764/public_html/header.php on line 273 This is what is on line 273 plus 5 lines of code either side: { **return (is_numeric($var)&&(intval($var)==floatval($var))); } $array = array_merge($_GET, $_POST); while ($post_cap = current($array)) { ***if ($post_cap < 0) { print "Illegal Operation"; die(""); ****} ***if (is_numeric($post_cap) && !is_whole_number($post_cap)) { print "Illegal Operation"; Any and all help would be appreciated. If its any help, I am converting my header into a split left and right sided design.
-
My bad guys! 000webhost is who I use.
-
Hey all, I get the following once I have installed the files... PHP Error Message Fatal error: Call to undefined function request_csrf_code() in /home/a4767764/public_html/myshop.php on line 70 Free Web Hosting
-
You're awesome! No more error. Thank you very much for everyones help and input.
-
I have found the following within the property mod globals, which is an included file. function get_house_name($id) { global $db; $get = $db->query("SELECT `name` FROM `property_mod` WHERE `id`={$id}"); return $db->fetch_single($get); } function get_house_name_by_row($row) { global $db; $get = $db->query("SELECT `name` FROM `property_mod` WHERE `id` IN (SELECT `houseid` FROM `properties_mod_user` WHERE `id`={$row})"); return $db->fetch_single($get); } This is out of the global func file. } function get_rank($stat, $mykey) { global $db; global $ir,$userid,$c; $q=$db->query("SELECT count(*) FROM userstats us LEFT JOIN users u ON us.userid=u.userid WHERE us.$mykey > $stat AND us.userid != $userid AND u.user_level != 0") ; return $db->fetch_single($q)+1; } function item_add($user, $itemid, $qty, $notid=0) { global $db; if($notid > 0) {
-
The function is: function fetch_single($result=0) { if(!$result) { $result=$this->result; } return mysql_result($result, 0, 0); } There is nothing containing fetch_single in the index.php and I have found this is happening on loggedin.php If it's any help, this has only appeared after I installed Sniko's Advanced Property Modification.
-
Will do when I get home from work. Thanks for looking into this for me.
-
The snippet of code that is causing this error is: if(!$result) { $result=$this->result; } return mysql_result($result, 0, 0); } Any advice?
-
Hey everyone, I am getting the following error message: Warning: mysql_result() [function.mysql-result]: Unable to jump to row 0 on MySQL result index 17 in /home/a4767764/public_html/class/class_db_mysql.php on line 94 Only on my index.php page, all other pages are fine. Any advice on this? Cheers
-
You, my good sir, are awesome :)
-
Hey all! The ZIP file is not opening :S Downloads, but does not open on my system.
-
I would be very interested in seeing the in-game and register. May look at using this.
-
Can anybody help?
-
Hiya everyone, Quick question, Does anyone know how i can edit my game so i can gain exp whilst training at the gym and possibly through crimes? Cheers :)
-
Warning: mysql_query(): supplied argument is not a valid MySQL-Link resource in /home/megawars/public_html/forums.php on line 138 Anyone?
-
Cheers :)
-
QUERY ERROR: Column count doesn't match value count at row 1 Query was INSERT INTO items VALUES('',1000,'IQ Potion','Gain 50,000 IQ through drinking this magic Potion',0,0,1, '1', 'a:4:{s:4:\"stat\";s:2:\"IQ\";s:3:\"dir\";s:3:\"pos\";s:8:\"inc_type\";s:6:\"figure\";s:10:\"inc_amount\";i:50000;}', '0', 'a:4:{s:4:\"stat\";s:6:\"energy\";s:3:\"dir\";s:3:\"pos\";s:8:\"inc_type\";s:6:\"figure\";s:10:\"inc_amount\";i:0;}', '0', 'a:4:{s:4:\"stat\";s:6:\"energy\";s:3:\"dir\";s:3:\"pos\";s:8:\"inc_type\";s:6:\"figure\";s:10:\"inc_amount\";i:0;}', 0, 0, 0, 0, 0, 0) Is the error i get. any help?
-
STARS!!!!!!!!!!! Absolutly Love all of MWG
-
I'll try this and see if it works. Cheers :D
-
When i got to veiw a users page with the veiwuser.php page, it show my username and not the persons that i go to see. Can anyone help me at all? My veiwuser.php code can be found below. <?php include "globals.php"; $_GET['u'] = abs((float) $_GET['u']); if(!$_GET['u']) { print "Invalid use of file"; } else { $q=$db->query("SELECT u.*,us.*,c.*,h.*,g.*,f.* FROM users u LEFT JOIN userstats us ON u.userid=us.userid 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={$_GET['u']}"); if($db->num_rows($q) == 0) { print "Sorry, we could not find a user with that ID, check your source."; } else { $r=$db->fetch_row($q); $m=$db->query("SELECT * FROM users WHERE userid={$r['married']}"); $par=$db->fetch_row($m); if($r['user_level'] == 1) { $userl="Member"; } else if($r['user_level'] == 2) { $userl="Admin"; } else if ($r['user_level'] == 3) { $userl="Secretary"; } else if($r['user_level'] == 0) { $userl="NPC"; } else if ($r['user_level'] == 4) { $userl="Fed Jail Warden"; } else if ($r['user_level'] == 5) {$userl="Assistant"; } else if ($r['user_level'] == 6) {$userl="Forum Moderator"; } $lon=($r['laston'] > 0) ?date('F j, Y g:i:s a',$r['laston']) : "Never"; $sup=date('F j, Y g:i:s a',$r['signedup']); $ts=$r['strength']+$r['agility']+$r['guard']+$r['labour']+$r['IQ']; if($r['laston'] > 0) { $la=time()-$r['laston']; $unit="seconds"; if($la >= 60) { $la=(int) ($la/60); $unit="minutes"; } if($la >= 60) { $la=(int) ($la/60); $unit="hours"; if($la >= 24) { $la=(int) ($la/24); $unit="days"; } } $str="$la $unit ago"; } else { $str="--"; } if($r['last_login'] > 0) { $ll=time()-$r['last_login']; $unit2="seconds"; if($ll >= 60) { $ll=(int) ($ll/60); $unit2="minutes"; } if($ll >= 60) { $ll=(int) ($ll/60); $unit2="hours"; if($ll >= 24) { $ll=(int) ($ll/24); $unit2="days"; } } $str2="$ll $unit2 ago"; } else { $str2="--"; } if($r['married'] != 0) { $partner= "[url='viewuser.php?u={$par[']<font color=green>{$par['username']}</font>[/url]"; } else { $partner= "<font color=red>N/A</font>"; } $zom=$db->query("SELECT * FROM hvzstats"); $hvz=$db->fetch_row($zom); if($ir['user_level'] > 1) { if($hvz['hvz'] ==1) { if($r['humanorzombie'] == 1) { $zomb="<font color='red'>Zombie</font>";$kills= "Kills: <font color='red'> {$ir['zombiekills']}</font> ";} if($r['humanorzombie'] == 0) { $zomb="<font color='#33CC33'>Human</font>"; } $ztext= "Status: $zomb $kills"; } } if($r['donatordays']) { $r['username'] = "<font color=green>{$ir['username']} </font> [img=donator.gif]"; } if($r['laston'] >= time()-15*60) { $on="<font color=green>[b]Online[/b]</font>"; } else { $on="<font color=red>[b]Offline[/b]</font>"; } print "<h3>Profile for {$r['username']}</h3> <table width=100% cellspacing=1 class='table'><tr style='background:gray'><th>General Info</th><th>Financial Info</th> <th>Display Pic</th></tr> <tr><td>Name: {$r['username']} $ztext User Level: $userl Duties: {$r['duties']} Gender: {$r['gender']} Married: $partner Signed Up: $sup Last Active: $lon Last Action: $str Last Login: $str2 Online: $on Days Old: {$r['daysold']} Location: {$r['cityname']}[url='travelto.php?to={$r['][Travel to Location][/url]</td><td> Money: \${$r['money']} Diamonds: {$r['diamonds']} Points: {$r['points']} "; if($r['married']) { $sql2 = sprintf("SELECT * FROM houses WHERE hID={$r['shared']}",$c); $ho = $db->query($sql2); $hs = $db->fetch_row($ho); $sql3 = sprintf("SELECT * FROM users WHERE userid={$r['married']}"); $ma = $db->query($sql3); $mr = $db->fetch_row($ma); print "Property: {$hs['hNAME']} [With: [url='viewuser.php?u={$mr[']{$mr['username']}[/url]]"; } else { print "Property: {$r['hNAME']}"; } print " Referals: "; $rr=$db->query("SELECT * FROM referals WHERE refREFER={$r['userid']}"); print $db->num_rows($rr); print " Friends: {$r['friend_count']} Enemies: {$r['enemy_count']} </td> <td>"; if($r['display_pic']) { print "[img={$r[]"; } else { print "This user has no display pic!"; } $sh=($ir['user_level'] >1) ? "Staff Info" : ""; print "</td></tr> <tr style='background:gray'><th>Physical Info</th><th>Links</th><th>$sh</th></tr> <tr><td>Level: {$r['level']} Health: {$r['hp']}/{$r['maxhp']} Forum Posts: {$r['posts']} Forum Credits: {$r['fcredits']} Gang: "; if($r['gang']) { print "[url='gangs.php?action=view&ID={$r[']{$r['gangNAME']}[/url]"; } else { print "N/A"; } if($r['fedjail']) { print " [b]<font color=red>In federal jail for {$r['fed_days']} day(s). {$r['fed_reason']}</font>"; } if($r['hospital']) { print " [b]<font color=red>In hospital for {$r['hospital']} minutes. {$r['hospreason']}</font>[/b]"; } if($r['jail']) { print " [b]<font color=red>In jail for {$r['jail']} minutes. {$r['jail_reason']}</font>[/b]"; } print "</td><td>[[url='mailbox.php?action=compose&ID={$r[']Send Mail[/url]] [[url='sendcash.php?ID={$r[']Send Cash[/url]] [[url='sendpoints.php?ID={$r[']Send Points[/url]] "; if($set['sendcrys_on']) { print "[[url='senddias.php?ID={$r[']Send Diamonds[/url]] "; } if($set['sendbank_on']) { if($ir['bankmoney'] >= 0 && $r['bankmoney'] >= 0) { print "[[url='sendbank.php?ID={$r[']Bank Xfer[/url]] "; } if($ir['cybermoney'] >= 0 && $r['cybermoney'] >= 0) { print "[[url='sendcyber.php?ID={$r[']CyberBank Xfer[/url]] "; } } print " [[url='assassin.php?ID={$r[']Assassinate[/url]] [[url='attack.php?ID={$r[']Attack[/url]] [[url='contactlist.php?action=add&ID={$r[']Add Contact[/url]]"; if($ir['user_level'] == 2 || $ir['user_level'] == 3 || $ir['user_level'] == 5) { print " [[url='jailuser.php?userid={$r[']Jail[/url]] [[url='mailban.php?userid={$r[']MailBan[/url]]"; } if($ir['donatordays'] > 0) { print " [[url='friendslist.php?action=add&ID={$r[']Add Friends[/url]] [[url='blacklist.php?action=add&ID={$r[']Add Enemies[/url]] "; } print "</td><td>"; if($ir['user_level'] == 2 || $ir['user_level'] == 3 || $ir['user_level'] == 5) { $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']); print "<h3>Internet Info</h3><table width='100%' border='0' cellspacing='1' class='table'> <tr><td></td><td class='h'>IP</td><td class='h'>Hostname</td></tr> <tr><td class='h'>Last Hit</td><td>$r[lastip]</td><td>$r[lastiph]</td></tr> <tr><td class='h'>Last Login</td><td>$r[lastip_login]</td><td>$r[lastip_loginh]</td></tr> <tr><td class='h'>Signup</td><td>$r[lastip_signup]</td><td>$r[lastip_signuph]</td></tr></table>"; print "<form action='staffnotes.php' method='post'> Staff Notes: <textarea rows=7 cols=40 name='staffnotes'>{$r['staffnotes']}</textarea> <input type='hidden' name='ID' value='{$_GET['u']}' /> <input type='submit' value='Change' /></form>"; } else { print ""; } print "</tr></table>"; } } function checkblank($in) { if(!$in) { return "N/A"; } return $in; } $h->endpage(); ?>
-
OMG Your a Legend!!! Works perfectly :) Thank you all for youe help!!!
-
As requested. $db->query("INSERT INTO gangs VALUES('','$name','$desc','','',0,0,100,$userid,$userid,5,0,0,'')"); And this is my gang table sql: [mysql]CREATE TABLE IF NOT EXISTS `gangs` ( `gangID` int(11) NOT NULL auto_increment, `gangNAME` varchar(255) NOT NULL default '', `gangDESC` text NOT NULL, `gangPREF` varchar(12) NOT NULL default '', `gangSUFF` varchar(12) NOT NULL default '', `gangMONEY` bigint(65) NOT NULL default '0', `gangCRYSTALS` bigint(65) NOT NULL default '0', `gangRESPECT` int(11) NOT NULL default '0', `gangPRESIDENT` int(11) NOT NULL default '0', `gangVICEPRES` int(11) NOT NULL default '0', `gangCAPACITY` int(11) NOT NULL default '0', `gangCRIME` int(11) NOT NULL default '0', `gangCHOURS` int(11) NOT NULL default '0', `gangAMENT` longtext NOT NULL, `gangSIG` varchar(255) NOT NULL, `gangSIG2` varchar(255) NOT NULL, `gangSTATUS` text NOT NULL, PRIMARY KEY (`gangID`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=27 ;[/mysql]
-
Hi everyone, I get the following error message when someone on my game tries to create a gang. I have replaced the entire gang pages and sqls with a backup copy i had, but still had no success. The error message is: 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 'test','testing gang system','','',0,0,100,1,1,5,0,0,'')', '/creategang.php', uni' at line 2 MySQL Version is: 5.0.91-community Can anyone help me at all?
-
As requested :) <?php include "globals.php"; if($ir['money'] < 500000){die("You don't have enough money. You need \$500,000."); } if($ir['gang']){die ("You're already in a gang!"); } if($_POST['submit']){$name=htmlspecialchars($_POST['name']); $desc=htmlspecialchars($_POST['desc']); $db->query("INSERT INTO gangs VALUES('','$name','$desc','','',0,0,100,$userid,$userid,5,0,0,'','','')"); $i=$db->insert_id(); $db->query("UPDATE users SET gang=$i,money=money-500000 where userid=$userid"); print "Gang created!"; }else { print "<h3> Create A Gang </h3><form action='creategang.php' method='post'><input type='hidden' name='submit' value='1' />Name:<input type='text' name='name' /> Description: <textarea name='desc' cols='40' rows='7'></textarea> <input type='submit' value='Create Gang for \$500,000' /></form>"; } $h->endpage(); ?>