Jump to content
MakeWebGames

Item market admin link !?!


Pyromann

Recommended Posts

Hey,

I have a small question.

If anyone know ... please tell me what's that for ?

if($ir['user_level'] == '2') {

echo '

<br>

[<a href=?action=quantify&ID='.$r['imID].'">Merge</a>]

';

}

if found this link on itemmarket.php

i can't see that variable anywhere and the link goes on a invalid page.

Thanks in advance !

Link to comment
Share on other sites

The $ir variable hold the currently authenticated user's information, which is retrieved via a SQL query to the database(the `users` table).

Each user is referenced via the $_SESSION global, which is actually an two dimensional array. Within that array, there resides a key named "userid", and that is like the key to open the door to the player's data.

Now the SQL query mentioned above, searches for the player's data which hold the ID of `userid`. Everything that matches that ID, is manipulated into the $ir variable, which is also an array.

The `user_level` key used in the logical IF statement in your post, is the currently authenticated player's "permission" to access certain parts of the website.

A player holding an permission of "2", will be an administrator. If I remember correctly, here's a permission table MCCodes uses below:

 

0 - Guest

1 - Normal user

2 - Administrator/Owner

3 - Moderator

4 - Assistant

5 - IRC Op

This might not be accurate, I've not programmed with MCCodes in quite some time, so if anyone wishes to correct these please do.

Link to comment
Share on other sites

I really thank you for the reply, but i wanted to know about the link in the echo

<a href="?action=quantify&ID='.$r['imID'].'">Merge</a> !!

as you said, it appears only if the user_level is 2 - Admin/owner ... but i don't see a function for quantify

that action is missing in the code actually

Link to comment
Share on other sites

That is to merge items perhaps they failed to add the rest of the code you can actually delete that, as for there is a function that does so item_add in global_func.php if your using mccodes v2

what it is doing instead of in your inventory you have

potion

potion

potion

you click merge and it should add them together and you should have potion 3x instead of them individually cluttering up the inventory. It's a way earlier quantifier someone made without knowing of the one in global_func.php in v2 don't know about lite and v1

Edited by lucky3809
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...