
gurpreet
Members-
Posts
834 -
Joined
-
Last visited
-
Days Won
1
Content Type
Profiles
Forums
Events
Everything posted by gurpreet
-
Couldn't you just edit itemsend?
-
Ah thanks anyway for bearing with my stupidness!
-
Nice mod, very neat and helpful :)
-
No lol, I had to replace the second <td width=177> to <td width=100%>. I just looked above at the function_menuarea() and copied that
-
EDIT: Sorry guys I was so stupid! The error was staring me in the face the whole time. Had to change: function smenuarea() { include "smenu.php"; global $ir,$c; $bgcolor = '2c0000'; print '<td width="2" class="linegrad" bgcolor="#'.$bgcolor.'"> </td><td width="177" bgcolor="#'.$bgcolor.'" valign="top">'; } To: function smenuarea() { include "smenu.php"; global $ir,$c; $bgcolor = '2c0000'; print '<td width="2" class="linegrad" bgcolor="#'.$bgcolor.'"> </td><td width="100%" bgcolor="#'.$bgcolor.'" valign="top">'; } Thanks for all the help and for bearing with me! Once again sorry
-
I've tried it numerous times in the following files: sglobals staff header (smenu part) smenu The weird thing is that the normal header in game has near enough the same code, but it perfectly fine. I've also tried ending all parts of the table, exit and more in the above files in the appropriate places. I just can't figure this out. This is how my staff pages operate, might be different from the default MCC: Staff Sglobals Smenu Relevant staff page Endpage If I add an endpage to the staff menu, it finishes there and the staff page doesn't show anything.
-
So I have to go through the staff pages and sglobals and check that everything is closed off?
-
I've tried endpage(), </td> in a few places, </table> in a few places on scripts and exit;. None of these work, I even tried to edit sglobals aswell but every edit I make just makes the page even worse, so I have to revert back to the original and try again.
-
Hi there, I've had this problem for a while, and I can't seem to get a hold of illegalife to help me fix it up. My main menu should look like this: http://i53.tinypic.com/10ct6w7.png But it ends up looking like this on a lot of pages: http://i52.tinypic.com/qs705f.png It has happened in all of the staff panel pages. Here is my smenu and $h->endpage: function smenuarea() { include "smenu.php"; global $ir,$c; $bgcolor = '2c0000'; print '</td><td width="2" class="linegrad" bgcolor="#'.$bgcolor.'"> </td><td width="177" bgcolor="#'.$bgcolor.'" valign="top">'; } function endpage() { global $db; print <<<OUT </td> </tr> </table></td> <td class="rgrad"></td> </tr> <tr> <td colspan="3" align="center"> <img src="pasek2.gif" width="932" height="20" align="center"></td> </td> </tr> </table><centeR> {$db->num_queries} queries<br /></body> </html> OUT; } } At the end of my smenu.php there is no $h->endpage or exit; so that can't be causing it.. Does anyone have any ideas?
-
Have you tested that? Doesn't look like it will work, after an if or else if you need { and then }. For example if ($ir['hospital']) { die ("you cant slap someone if you are in hospital"); } also code your links with [ code]
-
run a query in phpmyadmin update users set user_level = newlevel WHERE user_level=1 (or whatever your default is)
-
Just create a few queries to take the stats from the other user, and add it to the first users stats
-
help v1. conversion to v.2 missions mod / header paste
gurpreet replied to dippitydawgshyt's topic in Modification Support
What line gives you an error and what error does it produce? -
Just wondering for performance, is there a better way to do these 2 if statements? if($r['fedjail'] == 1) { $fed='<font color=red>(In Fed Jail)</font>'; } else { $fed2=''; } if($r['u2fedjail'] == 1) { $fed2='<font color=red>(In Fed Jail)</font>'; } else { $fed=''; } $r['u2fedjail'] is for the refered person They are later used like this: <td><a href='viewuser.php?u={$r['userid']}'><font color=brown>{$r['username']} $fed</font></a> [{$r['refREFER']}]</td> <td><a href='viewuser.php?u={$r['u2userid']}'><font color=brown>{$r['u2username']} $fed2</font></a> [{$r['refREFED']}]</td>
-
mccode-v2 Upgrade IPFINDER original Script by Magicaltallguy
gurpreet replied to Uridium's topic in Free Modifications
That's the problem, even when I remove that the error still occurs. There are no errors on any other pages related to this so I have no idea -
My main goals were to check if it's a valid IP, then to check if there are multiple IPs referred by 1 user I will look up on those, thanks for that.
-
Just wondering if you could elaborate further on the INET_ATON()? I see what it does, but not sure how it helps? If it would convert it to binary, then a match would be the same as if it wasn't binary? Wouldn't ip2long() do the same function?
-
I will look into cookies, but how would I go about that for multies? CDIR? Do you mean CIDR or is it something different? I can't seem to get a query working, I must be doing something really wrong. I know what I need to achieve, but I just can't get it. Here's what I'm trying to do: $q=mysql_query("SELECT u.userid, u.username, u.laston, r.* FROM users u LEFT JOIN referals r ON r.refREFER=u.userid INNER JOIN referals rr ON rr.refREFED=u.userid WHERE r.refREFERIP=r.refREFEDIP ORDER BY userid ASC",$c); I'm trying to make the refREFER become a userid so I can print it as a username, but I want to do that with the refREFED aswell. However when I try to do both, the refREFED becomes the refREFER userid, and I can't seem to get both to work together
-
mccode-v2 Upgrade IPFINDER original Script by Magicaltallguy
gurpreet replied to Uridium's topic in Free Modifications
Bump. Any ideas? -
Hey illegalife I can't PM you could you give me your email, you done some work for me a while ago and I need a bit of help tweaking it up because its gone all funky
-
So I haven't coded in over a year and I've gone terrible at it. I'm trying to make a simple file that checks any referal multis, but I'm having a few problems. 1) I've forgotten how to get 2 columns for the referer and the refered person with ID's. I managed to get one but can't get the other, because my mind goes blank when it comes to queries. I think I've gone about the refered user the completely wrong way Any help would be appreciated, I've checked on php.net and tizag but it isn't working for me. Here's what I got so far <?php include "globals.php"; if($ir['user_level'] != 2 && $ir['user_level'] != 3) { die("You can't access this page"); } $q=mysql_query("SELECT u.userid, u.username, u.laston, r.* FROM users u LEFT JOIN referals r ON r.refREFER=u.userid WHERE r.refREFERIP=r.refREFEDIP ORDER BY userid ASC",$c); print "<center><br /><b><font color=white><h1>Referral Multis</h1></b><br /> <table width=75% border=1> <tr style='background:black'><th><font color=grey>Referer</font></th><th><font color=grey>Refered<th><font color=grey>IP</font></th> <th><font color=grey>Time</font></th></tr>"; while(($r=mysql_fetch_array($q) or die(mysql_error()))) { $reftime = date('F j, Y g:i:s a', $r['refTIME']); $refered = str_replace("{$r['refREFED']}", "{$r['username']}", "{$r['refREFED']}"); if($r['laston'] >= time()-60*60) { $on="<font color=green><b>Online</b></font>"; } else { $on="<font color=red><b>Offline</b></font>"; } print "<tr> <td><a href='viewuser.php?u={$r['userid']}'><font color=brown><b>{$r['username']}</b></font></a> [{$r['userid']}]</td><td>$refered</td><td>{$r['refREFERIP']}</td> <td>$reftime</td></tr>"; } print "</table>"; $h->endpage(); ?>
-
mccode-v2 Upgrade IPFINDER original Script by Magicaltallguy
gurpreet replied to Uridium's topic in Free Modifications
Unknown column 'user_level' in 'where clause' I'm guessing it's because the user level check at the top hasn't been loaded by an sql query? I attempted to fix it but couldn't, I must be missing something simple Edit: After staring at this for ages, I still can't see whats wrong.. I've taken out all of the user_level's from this file, and it still comes up with that. It's not even being called in the file and it gives me that error ? WTF? Edit 2: When I view the source, the rest of the page comes up (ie. Needs checking, IP's etc) but on the normal view of the page it cuts off. Not sure what to do here -
mccode-v2 Upgrade IPFINDER original Script by Magicaltallguy
gurpreet replied to Uridium's topic in Free Modifications
Sorry to bump an old thread, but I can't get this to work now. I get this error: Warning: mysql_fetch_array() expects parameter 1 to be resource, boolean given in C:\wamp\www\ipfinder.php on line 42 Lines 40-42: $ipcheck = sprintf("SELECT * FROM ipfinder WHERE (ip = '%s')", $z['lastip']); $doipcheck = mysql_query($ipcheck); $ip = mysql_fetch_array($doipcheck); -
Got it to work, thanks a lot everyone!