07.09.2007, 17:48
|
#2
|
Administrator
Регистрация: 23.08.2003
Адрес: Moscow, Russia
Сообщений: 1,926
|
TSref рулит
Цитата:
userFunc:
Syntax:
[userFunc = user_match(checkLocalIP)]
Comparison:
This call the function ”user_match” with the first parameter ”checkLocalIP”. You write that function. You decide what it checks. Function result is evaluated as true/false.
Example:
Put this function in your localconf.php file:
function user_match($cmd){switch($cmd){case "checkLocalIP":if (strstr(getenv("REMOTE_ADDR"),"192.168")){return true;}break;case "checkSomethingElse":// ....break;}} This condition will return true if the remote address contains ”192.168” - which is what your function finds out.
[userFunc = user_match(checkLocalIP)]
|
|
|
|