-
Notifications
You must be signed in to change notification settings - Fork 1
/
cadastroPlataforma.php
62 lines (61 loc) · 2.38 KB
/
cadastroPlataforma.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
<!DOCTYPE html>
<!--
To change this license header, choose License Headers in Project Properties.
To change this template file, choose Tools | Templates
and open the template in the editor.
-->
<?php
include_once './functions/plataforma.php';
header('Content-Type: text/html; charset=utf-8');
session_start();
?>
<html>
<head>
<meta charset="UTF-8">
<title>Plataformas</title>
</head>
<body>
<?php
include('cabecalhoAdmin.php');
$conexao = conecta();
$plataformas = listaPlataforma($conexao);
fechaConexao($conexao);
?>
<div class="main">
<h1 class="header">Plataformas</h1>
<?php
if(isset($_SESSION['sucesso'])){
$mensagem = $_SESSION['sucesso'];
echo "<div class='alert alert-success alert-dismissible' role='alert'>";
echo "<button type='button' class='close' data-dismiss='alert'><span aria-hidden='true'>×</span><span class='sr-only'>Close</span></button>";
echo $mensagem;
echo "</div>";
session_destroy();
}
if(isset($_SESSION['erro'])){
$mensagem = $_SESSION['erro'];
echo "<div class='alert alert-danger alert-dismissible' role='alert'>";
echo "<button type='button' class='close' data-dismiss='alert'><span aria-hidden='true'>×</span><span class='sr-only'>Close</span></button>";
echo $mensagem;
echo "</div>";
session_destroy();
}
?>
<table class="table table-hover" >
<th>Codigo</th>
<th>Plataforma</th>
<th>Ações</th>
<?php
montaTabela($plataformas)
?>
</table>
<form method="post" action="functions/plataforma.php">
<label for="nome">Categoria</label>
<input type="text" class="form-control" id="nome" placeholder="Categoria"
required="true" name="plataforma">
<button type="submit" class="btn btn-lg btn-success " value="Cadastrar" name="cadastrar">Cadastrar
<span class="glyphicon glyphicon-plus"></button>
</form>
</div>
</body>
</html>