This repository has been archived by the owner on Jul 12, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmostrarCurso.php
executable file
·220 lines (179 loc) · 9.07 KB
/
mostrarCurso.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
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
<!DOCTYPE html>
<html lang="pt-br">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="">
<meta name="author" content="">
<title>Mostrar Curso</title>
<!-- jQuery -->
<script src="js/jquery.js"></script>
<!-- Bootstrap Core CSS -->
<link href="css/bootstrap.min.css" rel="stylesheet">
<!-- Custom CSS -->
<link href="css/sb-admin.css" rel="stylesheet">
<!-- Morris Charts CSS -->
<link href="css/plugins/morris.css" rel="stylesheet">
<!-- Custom Fonts -->
<link href="font-awesome/css/font-awesome.min.css" rel="stylesheet" type="text/css">
<link href="css/scrollTable.css" rel="stylesheet">
<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
<script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
<![endif]-->
<style>
.format {
padding-top:20px;
}
</style>
<script>
function acceptDateEmpty() {
var date = document.getElementById("date");
if (date.value == '') {
date.value = "NULL";
}
}
</script>
</head>
<body>
<script src="js/common.js"></script>
<div id="page-wrapper">
<div class="container-fluid">
<!-- Page Heading -->
<div class="row">
<div class="col-lg-12">
<h1 class="page-header">
<center>Ficha Informativa de Curso</center>
</h1>
</div>
</div><br>
<!-- /.row -->
<?php
include_once 'database.php';
$cod = $_POST['cod'];
$ni = $_POST['ni'];
$nc = $_POST['nc'];
$da = $_POST['da'];
$dt = $_POST['dt'];
$abreviatura = $_POST['abreviatura'];
$turno = $_POST['turno'];
$ma = $_POST['ma'];
if (isset($_POST['cadastroCurso'])) {
// Para Back-End
/*
$dao = new Database();
$dao->uploadPhoto($_FILES["fileToUpload"]["name"], $_FILES["fileToUpload"]["tmp_name"]);
$sql = "insert into titular (dataInscricao, validade, tipoPermissao, posto, nome, identidade, orgaoExpedidor,
dataExpedicao, tipo, estadoCivil, cpf, nascimento, telResidencial, celular, email, empresa, cargo, telComercial)
values ('$dataInscricao', '$validade', '$tipoPermissao', '$posto', '$nome', '$idt', '$orgaoExpedidor',
'$dataExpedicao', '$tipo', '$estadoCivil', '$cpf', '$nasc', '$telResidencial', '$celular', '$email',
'$empresa', '$cargo', '$telComercial');";
$sql = str_replace("''", "NULL", $sql);
if ($dao->query($sql))
$id = mysqli_insert_id($dao->link);
// echo "<script>getElementById('nrInscricao').innerHTML = " . $id + 1 . ";</script>";
$sqlEndereco = "insert into endereco (cod, numero, complemento, bairro, cidade, uf) values ('$id', '$numero',
'$complemento', '$bairro', '$cidade', '$uf');";
$dao->query($sqlEndereco);
*/
}
?>
<form action="<?php echo htmlspecialchars($_SERVER['PHP_SELF']);?>" method="POST" enctype="multipart/form-data">
<div class="row">
<aside class="col-lg-2">
<img width="120px" class="img-rounded" src="fotos/.jpg">
<input type="file" name="fileToUpload" id="fileToUpload" style="">
</aside>
</div> <br>
<fieldset>
<div class="row">
<div class="form-group">
<div class="col-lg-2">
<label>Nº de Identificação</label>
<input class="form-control" type="text" name="ni" id="nrInscricao" readonly>
</div>
<div class="col-lg-8">
<label>Nome do Curso</label>
<input class="form-control" type="text" name="nc" readonly>
</div>
</div>
</div> <br/>
<div class="row">
<div class="form-group">
<div class="col-lg-4">
<label>Data de Criação</label>
<input class="form-control" type="date" name="dc" value="<?php echo date("Y-m-d");?>" readonly>
</div>
<div class="col-lg-4">
<label>Turno</label>
<select class="form-control" name="turno" readonly>
<option value=""></option>
<option value="A">A - Oficiais Superiores</option>
<option value="B">B - Oficiais Subalternos</option>
<option value="C">C - Subtenentes e Sargentos</option>
</select>
</div>
<div class="col-lg-2">
<label>Abreviatura</label>
<input class="form-control" type="text" max="6" name="abreviatura" placeholder="ABC" readonly>
</div>
</div>
</div>
</fieldset>
<br/> <br/>
<fieldset>
<legend>Disciplinas</legend>
<!-- TAG COM A CAIXA DAS DISCIPLINAS, RESULTADO DE CONSULTA -->
<div class="scrollContainer">
<center>
<table class="table table-condensed" id="disciplinas">
<thead>
<tr>
<th>Nome da Discipina</th>
</tr>
</thead>
<tbody>
<tr class="text_data selected_grey">
<td>Assalto na Selva 1</td>
</tr>
<tr class="text_data selected_grey">
<td>Camuflagem 2</td>
</tr>
<tr class="text_data selected_grey">
<td>Operação de Viatura em Mata Fechada 3</td>
</tr>
<tr class="text_data selected_grey">
<td>Emboscada no Chão 3</td>
</tr>
<tr class="text_data selected_grey">
<td>Emboscada na Árvore 2</td>
</tr>
</tbody>
</table>
</center>
</div>
<div class="row">
<div class="form-group">
<div class="col-lg-10 col-lg-offset-4">
<a href="cadastroCurso.php" class="btn btn-info" role="button">Editar</a>
<button type="button" class="btn btn-warning" name="atitudes">Visualizar Atitudes</button>
</div>
</div>
</div>
</fieldset>
<br/> <br/>
</form>
</div>
</div>
<script src="js/selectTable.js"></script>
<!-- Bootstrap Core JavaScript -->
<script src="js/bootstrap.min.js"></script>
<!-- Morris Charts JavaScript -->
<script src="js/plugins/morris/raphael.min.js"></script>
<script src="js/plugins/morris/morris.min.js"></script>
<script src="js/plugins/morris/morris-data.js"></script>
</body>
</html>