session_start(); include ('cabeca.inc'); $op = $_REQUEST['op']; if ($op=="" || $op<>1) $op=0; ?>
if ($op==0) { ?>
} ?> if ($op==1) { $usuario = $_REQUEST['usuario']; $senha = md5($_REQUEST['senha']); include('opendb.inc'); $q = "SELECT * FROM config c INNER JOIN esalq.esalqusuario e ON e.nrousp=c.nrousprespapadm " . "WHERE e.nrousp='$usuario' AND pwdcompare('$senha',senha)=1"; // $conn = mssql_connect('ci-67.ciagri.usp.br', 'sa', 'dbsiesalq'); // mssql_select_db("PASSAGEM",$conn); // $r1 = mssql_query($q,$conn); // if ($li = mssql_fetch_object($r1)) $r1 = mysqli_query($con, "SELECT * FROM tb_config WHERE usuario='$usuario' AND senha='$senha'"); if ($li = mysqli_fetch_object($r1)) { $nome = $li->nome; session_start('cpq'); $_SESSION["user"] = $nome; print ""; } else { $op=0; // print $q; print "Usuário ou senha inválido!
\n"; print "Voltar \n"; } } ?> include ('rodape.inc'); ?>