Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
carolcordeiro authored Jun 3, 2023
1 parent 8e8b420 commit e6dd145
Show file tree
Hide file tree
Showing 24 changed files with 787 additions and 0 deletions.
48 changes: 48 additions & 0 deletions cadastros/cadastra_aluno.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
<?php
$host = "localhost";
$usuario = "root";
$senha = "";
$bd = "biblioteca";

$conn = new mysqli($host, $usuario, $senha, $bd);

?>

<!DOCTYPE html>
<html>
<head>
<meta charset = "utf-8">
<title>Cadastrar Aluno</title>
<link href="../css/cadastro.css" rel="stylesheet">
</head>
<body>
<main>
<form name="cadastro_aluno" method="post" action="../resp_cadastro_aluno.php" >
<Strong><p>CADASTRAR ALUNO</p></Strong>
<div class="input">
<label> <Strong>Nome: </Strong></label> <br>
<input type='text' name='nome'> <br>
<label> <Strong>Matrícula: </Strong></label><br>
<input type='text' name='matricula' > <br>
<label> <Strong>Período: </Strong></label> <br>
<input type='text' name='periodo'> <br>
<label> <Strong>Data de Nascimento: </Strong></label> <br>
<input type='date' name='data_nas'> <br>
<label> <Strong>Endereço: </Strong></label> <br>
<input type='text' name='endereco'> <br>
<label> <Strong>Email: </Strong></label> <br>
<input type='text' name='email'> <br>
<label> <Strong>Senha: </Strong></label> <br>
<input type='password' name='senha'> <br>
<label> <Strong>CPF do funcionário: </Strong></label> <br>
<input type='text' name='cpf_f'> <br>
</div>
<div>
<button type='submit' id='ok'>CADASTRAR</button>
</div>
<a href="../principal_func.php"> <button type="button"> VOLTAR </button> </a>
</form>

</main>
</body>
</html>
41 changes: 41 additions & 0 deletions cadastros/cadastro_func.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@

<?php

session_start();
$host = "localhost";
$usuario = "root";
$senha = "";
$bd = "biblioteca";

$conn = new mysqli($host, $usuario, $senha, $bd);

?>

<!DOCTYPE html>
<html>
<head>
<meta charset = "utf-8">
<title>Sistema Bibliotecário</title>
<link href="../css/cadastro.css" rel="stylesheet">
</head>
<body>
<main>
<form name="cadastrofuncionario" method="post" action="../resp_cadastro_func.php" >
<Strong><p>CADASTRAR FUNCIONARIO</p></Strong>
<div class="input">
<label> <Strong>Nome: </Strong></label> <br>
<input type='text' name='nome' > <br>
<label> <Strong>CPF: </Strong></label> <br>
<input type='text' name='cpf_f' > <br>
<label> <Strong>Senha: </Strong></label> <br>
<input type='password' name='senha'> <br>
</div>

<button type='submit' id='ok'>CADASTRAR</button>
<a href="../principal_func.php"> <button type="button"> VOLTAR </button> </a>

</form>

</main>
</body>
</html>
50 changes: 50 additions & 0 deletions cadastros/cadastro_livro.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@

<?php

session_start();
$host = "localhost";
$usuario = "root";
$senha = "";
$bd = "biblioteca";

$conn = new mysqli($host, $usuario, $senha, $bd);

?>

<!DOCTYPE html>
<html>
<head>
<meta charset = "utf-8">
<title>Sistema Bibliotecário</title>
<link href="../css/cadastro.css" rel="stylesheet">
</head>
<body>
<main>
<form name="validacacadastro" method="post" action="../resp_cadastro_livro.php" >
<Strong><p>CADASTRAR LIVRO</p></Strong>
<div class="input">


<label> <Strong>ISBN: </Strong></label><br>
<input type='int' name='isbn' ><br>
<label> <Strong>Título: </Strong></label><br>
<input type='text' name='titulo' ><br>
<label> <Strong>Autor: </Strong></label><br>
<input type='text' name='autor' ><br>
<label> <Strong>Quantidade: </Strong></label><br>
<input type='int' name='qntd' ><br>
<label> <Strong>Edição: </Strong></label><br>
<input type='text' name='edicao' ><br>
<label> <Strong>CPF: </Strong></label><br>
<input type='text' name='cpf_f' ><br>

</div>

<button type='submit' id='ok'>CADASTRAR</button>
<a href="../principal_func.php"> <button type="button"> VOLTAR </button> </a>

</form>

</main>
</body>
</html>
17 changes: 17 additions & 0 deletions conexaoBD.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?php

$host = "localhost";
$usuario = "root";
$senha = "";
$bd = "biblioteca";

$conn = new mysqli($host, $usuario, $senha, $bd);


if($conn -> connect_error){
echo "Falha na conexão: (".$conn -> connect_error.")<br>";
}
//echo "Conectado com sucesso!<br>";


?>
43 changes: 43 additions & 0 deletions consulta.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
<?php
session_start();
include("conexaoBD.php");
$sql="SELECT * FROM livro";
$resul = $conn->query($sql);
?>
<!DOCTYPE html>
<html>
<head>
<meta charset = "utf-8">
<title>Acervo</title>
<link href="css/acervo.css" rel="stylesheet">
</head>
<body>
<h1><Strong>Acervo</Strong></h1>
<table class="table">
<thead>
<tr>
<th scope="col">ISBN</th>
<th scope="col">Título</th>
<th scope="col">Autor</th>
<th scope="col">Quantidade</th>
<th scope="col">Edição</th>

</tr>
</thead>
<tbody>
<?php
while($user= mysqli_fetch_assoc($resul)){
echo"<tr>";
echo"<td>".$user['isbn']."</td>";
echo"<td>".$user['titulo']."</td>";
echo"<td>".$user['autor']."</td>";
echo"<td>".$user['qntd']."</td>";
echo"<td>".$user['edicao']."</td>";
echo"</tr>";
}
?>
</tbody>
</table>
<a href="principal_aluno.php"><button type="button">VOLTAR</button></a>
</body>
</html>
52 changes: 52 additions & 0 deletions css/acervo.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
body{

background-color: #555;
display: flex;
flex-direction: column;
align-items: center;
}

table{
background-color: #eee;
padding: 10px;
border-radius: 20px;
font-family: 'Lucida Sans', 'Lucida Sans Regular', 'Lucida Grande', 'Lucida Sans Unicode', Geneva, Verdana, sans-serif;
color: #555;
}

h1{
background-color: #eee;
width: 20%;
text-align: center;
padding: 5px;
font-family: Cambria, Cochin, Georgia, Times, 'Times New Roman', serif;
color: #555;
border-width: 2px;
border-style: outset;
border-color: buttonborder;
border-image: initial;
}

thead{
font-size: larger;
}

th{
padding-bottom: 5px;
}

td{
padding-left: 15px;
padding-right: 15px;
}

button{
background: #eee;
border-radius: 10px;
color: #555;
font-size: 100%;
margin:30px;
padding: 10px;
border-width: 2px;
border-style: outset;
}
54 changes: 54 additions & 0 deletions css/cadastro.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
body{
background-color: #555;
display: flex;
justify-content: center;
}

main{
padding: 40px;
background-color: #eee;
border-radius: 25px;
}

form{
display: flex;
flex-direction: column;
align-items: center;
}

p{
font-family: Cambria, Cochin, Georgia, Times, 'Times New Roman', serif;
color: #666666;
font-size: 1.5em;
margin-top: 0px;
}

.input input {
background: #fff;
border: 2px solid #ccc;
border-radius: 5px;
font-size: 120%;
height: 25px;
padding: 0 5px;
}

.input label {
font-family: 'Lucida Sans', 'Lucida Sans Regular', 'Lucida Grande', 'Lucida Sans Unicode', Geneva, Verdana, sans-serif;
color: #666666;
margin-top: 5px;
}

button {
background: #5cb85c;
border: 0 none;
border-radius: 25px;
color: #fff;
cursor: pointer;
display: inline-block;
white-space: nowrap;
font-size: 100%;
height: 25px;
width: 200px;
margin-top: 25px;
}

49 changes: 49 additions & 0 deletions css/index.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
body{
display: flex;
align-items: center;
flex-direction: column;
justify-content: center;
background-color: #555;
margin-left: 0px;
margin-right: 0px;
}
main{
margin-top: 10%;
display: grid;
grid-template-columns: 20% 20% 20%;
justify-content: space-around;
justify-items: center;
}

div{
background-color: #eee;
border-radius: 20px;
padding: 10px;
width: 300px;
height: 150px;
display: flex;
margin: 10px;
align-items: center;
font-family: 'Cambria', 'Cochin', Georgia, Times, 'Times New Roman', serif;
font-size: 2em;
text-align: center;
}
a{
outline: none;
text-decoration: none;
}
a:link{
color: #666666;
}
a:visited{
color: #666666;
}

button{
background: #eee;
border-radius: 10px;
color: #555;
font-size: 100%;
margin:30px;
padding: 10px;
}
Loading

0 comments on commit e6dd145

Please sign in to comment.