Product:
Search Type:

I am programming some custom pages for our control panel. How do I find the current language and skin on a custom page?

Article ID: 775 
Last Review: Mar,23 2006
APPLIES TO:
  • Plesk 7.5.x Reloaded

RESOLUTION


You can use the following PHP variables for clients session to determine locale and php session Id:

_REQUEST["locale"]
_REQUEST["PHPSESSID"]

And then you can determine a user skin with the help of mysql queries like:

1. select login from sessions where sess_id='<php_session_id>';
this query will show you the client's login name for current session.

2. select c.login, s.name, s.id from clients c, cl_param cl, Skins s where
cl.cl_id=c.id and cl.param='skin_id' and c.login='<user_name>' and
s.id=cl.val;

Where <user_name> is the client's login name for current session. This query will show you the user name, the skin name and the skin ID.

3. Also you can determine the locale with the query:

select locale from clients where login='<user_name>';

You can use mysql user 'admin' with the same password as for the control panel admin login. You can place all custom php scripts into admin's document root :

/usr/local/psa/admin/htdocs



Please provide feedback on this article

Did this article help you solve your issue?
Yes
No
Partially
I do not know yet
 
Strongly Agree   Strongly Disagree
  9 8 7 6 5 4 3 2 1
The article is easy to understand
The article is accurate
Additional Comments:
*Please provide us with your email address in case we need to contact you.
*Please type the code you can see.
* - required fields