query_fetch_assoc('SELECT `id`,`ban` FROM `users` WHERE (`name`="'.$posted['login'].'" AND `password` = "'.sha1($posted['password']).'" AND `active`=1)'); if (empty($loaded)) { $tpl->output['name'] = $posted['login']; $tpl->output['error'] = ''.$text['wrong_pass'].''; $tpl->output['botom'] = ''; } else { if ($loaded['ban']==1) { $tpl->output['name'] = $posted['login']; $tpl->output['error'] = ''.$text['banned'].''; $tpl->output['botom'] = ''; } else { $_SESSION['id'] = $loaded['id']; $tpl->output['error'] = ''.$text['loging_ok'].''; $tpl->output['error'] .= '
'; $tpl->output['botom'] = '
'; } } } else { $tpl->output['name']='Login'; $tpl->output['error'] = ''; $tpl->output['botom'] = ''; } ?>