Показать сообщение отдельно
Старый 07.09.2007, 17:48   #2
Valery Romanchev
Administrator
 
Аватар для Valery Romanchev
 
Регистрация: 23.08.2003
Адрес: Moscow, Russia
Сообщений: 1,926
Отправить сообщение для Valery Romanchev с помощью Skype™
По умолчанию

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)]
__________________
Веб-студия ТТЛАБ
www.ttlab.ru
Valery Romanchev вне форума   Ответить с цитированием