-
Notifications
You must be signed in to change notification settings - Fork 0
/
ad_uso.php
92 lines (92 loc) · 2.51 KB
/
ad_uso.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
<?php
session_start();
if($_SESSION['acesso'] <> 4){
header("Location:tela_inicial.php");
die;
}
include_once "ConAL.php";
?>
<!DOCTYPE>
<html>
<head>
<meta charset="utf-8">
<link rel="stylesheet" type="text/css" href="css/es.css">
<?php
if(isset($_COOKIE["tema"])){
$tema = $_COOKIE["tema"];
}else{
setcookie("tema","a", (time() + (500 * 24 * 3600)));
}
if($_COOKIE["tema"] <> "a"){
echo "<link rel='stylesheet' type='text/css' href='css/$tema.css'>";
}
?>
<title>Adcionar usuarios</title>
<?php
if(isset($_SESSION['ifon'])){
echo $_SESSION['ifon'];
unset ($_SESSION['ifon']);
}
?>
</head>
<body>
<div id="logoufam" >
<label for="chec">
<img width="100px" height="90px" src="ufam.png"/>
</label>
<label id="insti">Universidade Federal do Amazonas<br>
Pró-Reitoria de Ensino de Graduação<br>
Departamento de Registro Acadêmico<br>
Arquivo Acadêmico<br>
</label>
</div>
<div>
<input type="checkbox" id="chec">
<nav id="nave" >
<ul>
<li><a href="tela_inicial.php">Inicio</a></li>
<li><a href="sair.php">Sair</a></li>
</ul>
</nav>
</div>
<div id="verificar_ad_uso">
<form method="POST">
<input id="username" name="username" required><br><br>
<input type="submit" value="Verificar dispolibilidade" >
</form>
<br><br><form action="admini.php">
<br><br><input type="submit" value="Voltar" >
</form>
</div>
<?php $nun = filter_input(INPUT_POST,'username',FILTER_SANITIZE_STRING);
if($nun <> ""){
$vl ="SELECT * FROM log WHERE ursu LIKE '".$nun."'";
$rvl = mysqli_query($conn, $vl);
$linha = mysqli_fetch_assoc($rvl);
if ($linha['id']<>""){
echo "<script>alert('Usuario já existe!!')</script>";
}else{
echo "<div id='form_ad_uso'><form method='POST' action='ad_uso_fun.php'>
<label >Nome de usuario:</label>
<input type='text' name='usernome' value='$nun' readonly><br><br>
<label >Setor:</label>
<select id='cli' name='cli'>
<option>Arquivo acadêmico</option>
<option>CRC</option>
<option>CRD</option>
<option>CM</option>
<option>COA</option>
<option>DPA</option>
<option>Protocolo</option>
</select><br><br>
<label >Digite o email:</label>
<input type='email' name='email_n_uso' required><br><br>
<label >Nivel de acesso</label>
<input type='number' min='1' max='3' name='acesso' required><br><br>
<input type='submit' value='Cadastrar'>
</form></div>";
}
}
?>
</body>
</html>