| Новости | FAQ | Авторы | Документация | В действии | Библиотека |
| Инструменты | Полезные ссылки | Хостинги | Скачать | Примеры | Форум |
n3o 02.11.2009 14:03 / 02.11.2009 14:04
^if($auth.is_logon && def $form:id){
^try{
$f[^file::sql{Select profile_foto from mainfoto where user_id=$form:id order by id desc limit 1}]
}{
$exception.handled(true)
}
}
^if(!def $f){
$f[^file::load[binary;/images/man.gif]]
}Тогда уж вот так: ^if($auth.is_logon && ^form:id.int(0)){
^try{
$f[^file::sql{Select profile_foto from mainfoto where user_id=$form:id order by id desc limit 1}]
}{
$exception.handled(true)
}
}
^if(!def $f){
$f[^file::load[binary;/images/man.gif]]
}А, то вам передадут в $form:id то что не надо.