| 1 | <?php |
| 2 | function smarty_function_get_acc_lockout_data($params,&$smarty) { |
| 3 | global $db,$user_id; |
| 4 | $q="select users.user_mail,acc_lockout from users where users.user_id=$user_id"; |
| 5 | $set=$db->query($q); |
| 6 | $set->next(); |
| 7 | $lockout_to=$set->getString('acc_lockout'); |
| 8 | $pocet_mailov=$set->getString('user_mail'); |
| 9 | |
| 10 | $now=date("Y-m-d H:i:s"); |
| 11 | $rok=date("Y"); |
| 12 | $mesiac=date("m"); |
| 13 | $den=date("d"); |
| 14 | $hodina=date("H"); |
| 15 | $minuta=date("i"); |
| 16 | |
| 17 | if ($lockout_to >= $now) {$still_locked=true;}else{$still_locked=false;} |
| 18 | |
| 19 | $smarty->assign('user_locked_out_til',$lockout_to); |
| 20 | $smarty->assign('lockedout_user_mail_count',$pocet_mailov); |
| 21 | $smarty->assign('still_locked_out',$still_locked); |
| 22 | $smarty->assign('actrok',$rok); |
| 23 | $smarty->assign('actmesiac',$mesiac); |
| 24 | $smarty->assign('actden',$den); |
| 25 | $smarty->assign('acthodina',$hodina); |
| 26 | $smarty->assign('actminuta',$minuta); |
| 27 | |
| 28 | |
| 29 | } |
| 30 | ?> |