Kyberia v2.3 - 1st revision from SVN (Without patches of kyberia.sk team)
[mirrors/Kyberia-bloodline.git] / inc / smarty / node_methodz / function.get_acc_lockout_data.php
diff --git a/inc/smarty/node_methodz/function.get_acc_lockout_data.php b/inc/smarty/node_methodz/function.get_acc_lockout_data.php
new file mode 100644 (file)
index 0000000..299068e
--- /dev/null
@@ -0,0 +1,30 @@
+<?php
+function smarty_function_get_acc_lockout_data($params,&$smarty) {
+    global $db,$user_id;
+    $q="select users.user_mail,acc_lockout from users where users.user_id=$user_id";
+    $set=$db->query($q);
+    $set->next();
+    $lockout_to=$set->getString('acc_lockout');
+    $pocet_mailov=$set->getString('user_mail');
+
+$now=date("Y-m-d H:i:s");
+$rok=date("Y");
+$mesiac=date("m");
+$den=date("d");
+$hodina=date("H");
+$minuta=date("i");
+
+if ($lockout_to >= $now) {$still_locked=true;}else{$still_locked=false;}
+
+    $smarty->assign('user_locked_out_til',$lockout_to);
+    $smarty->assign('lockedout_user_mail_count',$pocet_mailov);
+    $smarty->assign('still_locked_out',$still_locked);
+    $smarty->assign('actrok',$rok);
+    $smarty->assign('actmesiac',$mesiac);
+    $smarty->assign('actden',$den);
+    $smarty->assign('acthodina',$hodina);
+    $smarty->assign('actminuta',$minuta);
+
+
+}
+?>
\ No newline at end of file
This page took 0.136002 seconds and 4 git commands to generate.