about login form with session (user disabled) treatment

0
Hello, good afternoon, I would like to know how do I log in the system does not let the administrator log on that is not enabled (level == 5) I have already tried everything, and the code I am touching is very mixed, I wanted it would do the same thing when the person writes the wrong password, but with a different and out-of-session warning

if ($_SESSION ['s_logado']) {
	
	// BLOCO PARA RECARREGAR A PÁGINA NO MÓDULO ADMIN QUANDO FOR SELECIONADO NOVO TEMA
	if (isset ( $_GET ['LOAD'] ) && $_GET ['LOAD'] == 'ADMIN') {
		$PARAM = "&LOAD=ADMIN";
		$marca = "ADMIN";
	} else
		$PARAM = "";
	
	
	print "<tr>";
	
	print "<td style=\"width:100%;\" id='centro2'><iframe class='frm_centro' src='" . $sisPath . "" . $sistem . "'  name='centro' align='center' width='100%' height='77%' frameborder='0' STYLE='{border-bottom: thin solid #999999;}'></iframe></td>";
	print "</tr>";
} else {

	echo '<div class="container">';	
	$ip = $_SERVER["REMOTE_ADDR"];
	
	// Formulário de Login
	
	
	 
?>


	<form name='logar' method='post' action='<?php print"".$commonPath."login.php?".session_id ()."";?>' onSubmit=\"return valida()\">
	<div class='container_12 info'>
		<div class='grid_8'> <!-- Inicio da Nova DIV -->
			<h1>Central de Chamados <?php echo NOME_CENTRAL_ATENDIMENTO; ?></h1>
			<br><h3 align='left'>Informações</h3>
			<div class='menu'>
				<ul style="padding-top: 5px !important; padding-bottom:5px !important">
					<li align='left'><p>Sistema para auxiliar no gerenciamento de chamados do CTIC. <p>Para ter acesso ao sistema, você precisa de um usuário <p>cadastrado no SIG (<a href='http://sipac.***.edu.br' target='_blank'>acesso ao SIG</a>) </p></li>
					<li><p>A ** nunca pede confirmação de seus dados e senhas<p> via email.</p></li>
					<li><p>A senha de acesso é pessoal e intransferível.</p></li>
				</ul>
			</div>
			<h3 style="padding-bottom:10px">Seu IP é: <?php echo str_replace(":",".",$ip); ?></h3>
			<h3 align='left'>Dúvidas</h3>
			<p>Entre em contato através dos nossos canais de atendimento.</p>
			<table style="vertical-align: center">
			<tr><td><img src="includes/imgs/email.jpg" width="20px" height="20px"></td><td><a href="mailto:<?php echo EMAIL_CENTRAL_ATENDIMENTO; ?>"><?php echo EMAIL_CENTRAL_ATENDIMENTO; ?></a></td></tr>
			<tr><td><img src="includes/imgs/telefone.jpg" width="20px" height="20px"></td><td><?php echo TELEFONE_CENTRAL_ATENDIMENTO; ?></td></tr>
<!-- 			<tr><td><img src="includes/imgs/spark.png" width="20px" height="20px"></td><td>Atendimento CTIC (Spark)</td></tr> -->
			<tr><td><a href="https://ctic.**.edu.br" target="_blank"><img src="includes/imgs/site.png" width="20px" height="20px"></a></td><td><a href="<?php echo SITE_CENTRAL_ATENDIMENTO; ?>" target="_blank">Portal</a></td></tr>
			<tr><td><a href="https://wiki.***.edu.br" target="_blank"><img src="includes/imgs/wiki-icon.png" width="20px" height="20px"></a></td><td><a href="https://wiki.***.edu.br" target="_blank">WIKI Unifesspa</a></td></tr>
			</table>
	
		</div>
		<div class='grid_4' > <!-- Início Form de Login -->
			<?php 
			
		
				if (isset ( $_GET ['inv'] )) {
					if ($_GET ['inv'] == "1") {
					$aviso =TRANS ( 'ERR_LOGON' ) ;
						print "<div style='margin:0 auto; width:240px; padding:10px;'><center><label ><br><font color='red'>" . $aviso . "</font></label></center></div>";
					}
				}
				if (isset ( $_GET ['usu'] )) {
					$typedUser = $_GET ['usu'];
				} else {
					$typedUser = "";
				}
			
			?>
			<div style='margin:0 auto;margin-right:15px; width:180px; padding:10px;'>
				<img src = 'helpdesk.png'>
   			</div>
			<h2 align='center'>Área de acesso</h2>
			<div style='margin:0 auto; width:180px; padding:0px;'>
    			<div style='height:-3px;font-size:16px;font-weight:bold;color:#ccc;margin-top:5px;'></div>
       			<div style='height:-3px;'>
					<label  id='label_user' class='input_login' for='idLogin' style='display:block;'></label>
					<input class='input_l2' type='text' name='login' value='<?php print $typedUser ?>' id='idLogin' placeholder='Usuario' tabindex='1' onkeydown=\"Hide('label_user','idLogin');\" onblur=\"Show('label_user','idLogin');\">
					<br><br>
					<label  id='label_pass' class='input_login' for='idSenha' style='display:block;'></label>
					<input class='input_l2' type='password' name='password' id='idSenha' placeholder='Senha' tabindex='2' onkeydown=\"Hide('label_pass','idSenha');\" onblur=\"Show('label_pass','idSenha')>
        		</div>
				<div style='height:30px; margin-top:5px; text-align:center' >
					<input type='submit' style='float:center' class='blogin' value='<?php print TRANS ( 'cx_login' ) ?>' tabindex='3'>
				</div>
				<div style="text-align: center; font-size:1.4em; line-height:1.7em">
				<a href="https://sigadmin.***.edu.br/admin/public/recuperar_login.jsf" target="_blank">Esqueci meu login</a><br>
				<a href="https://sigadmin.***.edu.br/admin/public/recuperar_senha.jsf" target="_blank">Esqueci minha senha</a><br>
				<a href="https://wiki.**.edu.br/index.php/Categoria:Abertura_de_Ocorr%C3%AAncias" target="_blank">Primeiro Acesso</a>
				</div>
			</div>
		<a href="https://wiki.*****.edu.br" target="_blank">
		</div><br>
		<div class='grid_4' style="margin-top:10px; text-align: center;">
		<table>
		<tr><td style="padding-left:25px; line-height:1.4em !important;"><b>Antes de abrir um chamado, verifique se a solução do seu problema está na</b></td>
		<td rowspan="2"><img src="includes/imgs/wiki-unifesspa.jpg" width="100" height="100"></td></tr>
		</table>
		</div>
	</div>
	</a>
	</form>
	<?php }?>

What do I put inside the conditional to bring the form back, unlogged and with another warning?

f (($_SESSION ['s_ocomon'] == 1) && ! isIn ( $_SESSION ['s_area'], $rowconf ['conf_ownarea_2'] )) {
		if ($_SESSION['s_nivel']==5){



(aqui)



    }
    
asked by anonymous 30.05.2017 / 21:13

0 answers