aulinha›

This commit is contained in:
111111111111111111111111111 EMAIL
2025-10-02 20:01:35 -03:00
commit bf0d0595ed
18 changed files with 1391 additions and 0 deletions

1
12.txt Normal file
View File

@@ -0,0 +1 @@
<p class='verd'>domi foi aprovado com a média 8.5</p><p class='verd'>domi foi aprovado com a média 8.5</p>

36
Untitled-1.php Normal file
View File

@@ -0,0 +1,36 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
<?php
if(isset($_POST["rec"])){
$rec = $_POST["rec"];
}
else{
$rec = null;
}
echo"$rec";
if($rec != null){
$merec = ($me + $rec) / 2;
if($merec >= 6){
echo"<p>$nomes[$x] Nota1:$nota1[$x] Nota2: $nota2[$x] Média: $merec APROVADA!</p>";
}
else{
echo"<p>$nomes[$x] Nota1:$nota1[$x] Nota2: $nota2[$x] Média: $merec REPROVADA!</p>";
}
}
else{
echo"<p>$nomes[$x] Não respondeu a prova de recuperação. REPROVADA!</p>";
}
?>
</body>
</html>

75
aula1.php Normal file
View File

@@ -0,0 +1,75 @@
<!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.0">
<title>Aula 1</title>
<link rel="stylesheet" href="estilo.css">
</head>
<body>
<header><h1>Aula 1 - PHP </h1></header>
<nav></nav>
<main>
<form method="POST" action="aula1.php">
<table>
<tr><td>Nome:</td><td><input type="text" name="nome"></td></tr>
<tr><td>Matrícula:</td><td><input type="text" name="mat"></td></tr>
<tr><td>Nota 1:</td><td><input type="text" name="n1"></td></tr>
<tr><td>Nota 2:</td><td><input type="text" name="n2"></td></tr>
<tr><td><input type="reset" value="Limpar"></td>
<td><input type="submit" value="Enviar"></td></tr>
</table>
</form>
<?php
if(isset($_POST["nome"])){
$nome = $_POST["nome"];
}
else{
$nome = null;
}
if(isset($_POST["mat"])){
$mat = $_POST["mat"];
}
else{
$mat = null;
}
if(isset($_POST["n1"])){
$n1 = $_POST["n1"];
}
else{
$n1 = null;
}
if(isset($_POST["n2"])){
$n2 = $_POST["n2"];
}
else{
$n2 = null;
}
if($nome != null and $mat != null and $n1 != null and $n2 != null){
echo"<p>O(a) aluno(a) $nome Matrícula $mat obteve as notas $n1 e $n2</p>";
$m = ($n1 + $n2) / 2;
if($m >= 6){
echo"<p class='verd'> Aprovado com média $m</p>";
}
else{
echo"<p class='verm'> Reprovado com média $m</p>";
}
}
else{
echo"<p>Preencha todos os campos para ver o resultado do aluno</p>";
}
//echo"<h1><span class='azul'> Olá Mundo!</span></h1>";
?>
</main>
<footer><h1>Programação WEB II - Prof. James Willian</h1></footer>
</body>
</html>

75
aula10.php Normal file
View File

@@ -0,0 +1,75 @@
<!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.0">
<title>Aula 10</title>
<link rel="stylesheet" href="estilo.css">
</head>
<body>
<header><h1>Aula 10 - Vetor</h1></header>
<nav></nav>
<main>
<?php
$nomes = array("Ana Carolina", "Bianca", "Camila", "Daniela", "Erika","Fernanda");
$nota1 = array(10,9,8,7,6,5);
$nota2 = array(9,8,7,6,5,4);
$x = 0;
while($x <= 5){
echo"<p>$nomes[$x]</p>";
$x++;
}
echo"
<form action='aula10.php' method='POST'>
<p>Digite o nome para ver o resultado:
<input type='text' name='nome'><input type='submit' value='Buscar'></p>
</form>
";
if(isset($_POST["nome"])){
$nome = $_POST["nome"];
}
else{
$nome = null;
}
if($nome != null){
$b = 0;
$x = 0;
while($x <= 5){
if($nome == $nomes[$x]){
$me = ($nota1[$x] + $nota2[$x]) / 2;
if($me >= 6){
echo"<p class='verd'>$nomes[$x] Nota1:$nota1[$x] Nota2: $nota2[$x] Média: $me APROVADA!</p>";
}
else{
echo"<p class='verm'>$nomes[$x] Nota1:$nota1[$x] Nota2: $nota2[$x] Média: $me REPROVADA!</p>";
echo"
<form action='aula10B.php' method='POST'>
<p>Nota da Recuperação:
<input type='hidden' name='me' value='$me'>
<input type='hidden' name='nm' value='$nomes[$x]'>
<input type='text' name='rec'>
<input type='submit' value='Enviar'></p>
</form>
";
}
$b = 1;
}
$x++;
}
if($b == 0){
echo"<p class='verm'>Nome solicitado não encontrado!</p>";
}
}
?>
</main>
<footer><h1>Programação WEB II - Professor James Willian</h1></footer>
</body>
</html>

51
aula10B.php Normal file
View File

@@ -0,0 +1,51 @@
<!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.0">
<title>Recuperação</title>
<link rel="stylesheet" href="estilo.css">
</head>
<body>
<header><h1>RECUPERAÇÂO</h1></header>
<main>
<?php
if(isset($_POST["rec"])){
$rec = $_POST["rec"];
}
else{
$rec = null;
}
if(isset($_POST["me"])){
$me = $_POST["me"];
}
else{
$me = null;
}
if(isset($_POST["nm"])){
$nm = $_POST["nm"];
}
else{
$nm = null;
}
if($rec != null and $me != null){
$merec = ($me + $rec) / 2;
if($merec >= 6){
echo"<p class='verd'> $nm Média: $me Recuperação:$rec Média da Recuperação: $merec APROVADA!</p>";
}
else{
echo"<p class='verm'> $nm Média: $me Recuperação:$rec Média da Recuperação:$merec REPROVADA!</p>";
}
}
else{
echo"<p class='verm'> $nm Não respondeu a prova de recuperação. REPROVADA!</p>";
}
?>
</main>
</body>
</html>

113
aula11.php Normal file
View File

@@ -0,0 +1,113 @@
<!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.0">
<title>Aula 11 </title>
<link rel="stylesheet" href="estilo.css">
<style>
</style>
</head>
<body>
<header><h1>Aula 11 Vetores e formulários(Reorganizado) </h1></header>
<nav></nav><!--O nav esta vazio porque ainda não temos links -->
<main>
<?php
$nomes = array("Nomes:", "Ana Carolina", "Ana Paula", "Bruna",'Camila', "Daniella", "Erica");
$prova1 = array(0,9,8,7,6,5,4);
$prova2 = array(0,10,8,5,4,9,3);
$x = 1;
while($x <= 6){
echo"<p>$nomes[$x]</p>";
$x++;
}
echo"<form action='aula11.php' method='POST'>
<p>Buscar Notas:<input type='text' name='nome'>
<input type='submit' value='Buscar Notas'></p>
</form>";
if(isset($_POST['nome'])){
$nome = $_POST['nome'];
}
else{
$nome = null;
}
if(isset($_POST["rec"])){
$rec = $_POST["rec"];
}
else{
$rec = null;
}
if(isset($_POST["me"])){
$me = $_POST["me"];
}
else{
$me = null;
}
if(isset($_POST["nm"])){
$nm = $_POST["nm"];
}
else{
$nm = null;
}
if($nome != null){
$x = 1;
while($x <= 6){
if($nome == $nomes[$x]){
$n1 = $prova1[$x];
$n2 = $prova2[$x];
$m = ($n1 + $n2) / 2;
if($m >= 6){
echo"<p>A aluna $nomes[$x] com as notas $n1 e $n2 teve média final $m</p>";
}
else{
echo"<p class='verm'>$nomes[$x] Nota1:$n1 Nota2: $n2 Média: $m REPROVADA!</p>";
echo"
<form action='aula11.php' method='POST'>
<p>Nota da Recuperação:
<input type='hidden' name='nome' value='$nome'>
<input type='hidden' name='me' value='$m'>
<input type='hidden' name='nm' value='$nomes[$x]'>
<input type='text' name='rec'>
<input type='submit' value='Enviar'></p>
</form>
";
if($rec != null and $me != null){
$merec = ($me + $rec) / 2;
if($merec >= 6){
echo"<p class='verd'> $nm Média: $me Recuperação:$rec Média da Recuperação: $merec APROVADA!</p>";
}
else{
echo"<p class='verm'> $nm Média: $me Recuperação:$rec Média da Recuperação:$merec REPROVADA!</p>";
}
}
else{
echo"<p class='verm'> $nm Não respondeu a prova de recuperação. REPROVADA!</p>";
}
}
}
$x++;
}
}
?>
</main>
<footer><h1>Programação WEB II - Prof James Willian</h1><footer>
</body>
</html>

113
aula12.php Normal file
View File

@@ -0,0 +1,113 @@
<!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.0">
<link rel="stylesheet" href="estilo.css">
<title>Aula 12</title>
</head>
<body>
<header><h1>Aula 12 - Grava texto</h1></header>
<nav>
<button></button>
</nav>
<main>
<table>
<form action="aula12.php" method="POST">
<tr><td>CADASTRO<td></td></td></tr>
<tr><td>Matrícula:</td><td><input type="text" name="mat"></td></tr>
<tr><td>Nome:</td><td><input type="text" name="nome"></td></tr>
<tr><td>Nota 1:</td><td><input type="text" name="n1"></td></tr>
<tr><td>Nota 2</td><td><input type="text" name="n2"></td></tr>
<tr><td><td></td></td></tr>
<tr><td>CONSULTA</td><td></td></tr>
<tr><td>Matrícula</td><td><input type="text" name="matc"></td></tr>
<tr><td>lista:</td><td><input type="checkbox" name="lista"></td></tr>
<tr><td><td></td></td></tr>
<tr><td><input type="reset" value="Apaga"></td><td><input type="submit" value="Envia"></td></tr>
</form>
</table>
<?php
if(isset($_POST["mat"])){
$mat = $_POST["mat"];
}
else{
$mat = null;
}
if(isset($_POST["n1"])){
$n1 = $_POST["n1"];
}
else{
$n1 = null;
}
if(isset($_POST["n2"])){
$n2 = $_POST["n2"];
}
else{
$n2 = null;
}
if(isset($_POST["nome"])){
$nome = $_POST["nome"];
}
else{
$nome = null;
}
if(isset($_POST["matc"])){
$rec = $_POST["matc"];
}
else{
$matc = null;
}
if(isset($_POST["lista"])){
$lista = $_POST["lista"];
}
else{
$lista = null;
}
if($mat != null and $nome != null and $n1 != null and $n2 != null){
$me = ($n1 + $n2) / 2;
if ($me >=6) {
echo"<p class='verd'>$nome foi aprovado com a média $me</p>";
$texto = "<p class='verd'>$nome foi aprovado com a média $me</p>";
}
else{
echo"<p class='verm'>$nome foi reprovado com a média $me</p>";
$texto = "<p class='verm'>$nome foi reprovado com a média $me</p>";
}
$arquivo = "lista.txt";
$fp = fopen($arquivo, "a");
fwrite($fp, $texto);
fclose($fp);
$arquivo = $mat.".txt";
$fp = fopen($arquivo, "a");
fwrite($fp, $texto);
fclose($fp);
}
if ($matc != null) {
$arquivo = $matc. "txt";
$contents = fread($fp, filesize ($arquivo));
echo"$contents";
fclose($fp);
}
else {
echo"<p class='verm'>Arquivo não encontrado!</p>";
}
?>
</main>
</body>
</html>

35
aula14.php Normal file
View File

@@ -0,0 +1,35 @@
<!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.0">
<link rel="stylesheet" href="estilo.css">
<title>Aula 14</title>
</head>
<body>
<header><h1>Aula 14 - Grava texto</h1></header>
<main>
<?php
$arquivo = "visita.txt";
if(@$fp = fopen($arquivo,"r")){
$contents = fread($fp,filesize($arquivo));
fclose($fp);
}
$texto = $contents + 1;
echo"<h3 class='verd'>Você é o visitante n° $texto </h3>";
$arquivo = "visita.txt";
$fp = fopen($arquivo, "w");
fwrite($fp, $texto);
fclose($fp);
?>
</main>
</body>
</html>

167
aula15.php Normal file
View File

@@ -0,0 +1,167 @@
<!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.0">
<title>Atividade texto</title>
<style>
.f2{
position: fixed;
top:20%;
left:20%;
}
.f3{
position: fixed;
top:20%;
left:50%;
}
.verd {
color: green;
}
</style>
</head>
<body>
<h1>Atividade texto</h1>
<div class="f2">
<h2>Cadastro</h2>
<form action="aula15.php" method="POST">
<table>
<tr><td>Nome:</td><td><input type="text" name="nome"></td></tr>
<tr><td>Telefone:</td><td><input type="text" name="tel"></td></tr>
<tr><td>Documento:</td><td><input type="text" name="doc"></td></tr>
<tr><td>Curso:</td><td>
<select name="curso">
<option value="escolha">Escolha um curso</option>
<option value="Administração">Administração</option>
<option value="Mecânica">Mecânica</option>
<option value="Informatica">Informatica</option>
<option value="Enfermagem">Enfermagem</option>
</select>
</td></tr>
<tr>
<td><input type="reset" value="Apagar"></td>
<td><input type="submit" value="Cadastrar" name="cadastrar"></td>
</tr>
</table>
</form>
</div>
<div class="f3">
<h2>Consulta</h2>
<form action="aula15.php" method="POST">
<table>
<tr><td>Inscrição:</td><td><input type="text" name="inscricao"></td></tr>
<tr><td>Nome:</td><td><input type="text" name="nome_consulta"></td></tr>
<tr><td>Curso:</td><td>
<select name="curso_consulta">
<option value="escolha">Escolha um curso</option>
<option value="Administração">Administração</option>
<option value="Mecânica">Mecânica</option>
<option value="Informatica">Informatica</option>
<option value="Enfermagem">Enfermagem</option>
</select>
</td></tr>
<tr>
<td><input type="reset" value="Apagar"></td>
<td><input type="submit" value="Consultar" name="consultar"></td>
</tr>
</table>
</form>
</div>
<br><hr><br>
<?php
if (isset($_POST['cadastrar'])) {
$nome = isset($_POST['nome']) ? trim($_POST['nome']) : '';
$tel = isset($_POST['tel']) ? trim($_POST['tel']) : '';
$doc = isset($_POST['doc']) ? trim($_POST['doc']) : '';
$curso = isset($_POST['curso']) ? $_POST['curso'] : '';
if (!empty($nome) && !empty($tel) && !empty($doc) && $curso != 'escolha') {
$arquivo = "inscricoes.txt";
$inscricao_num = 1;
if (file_exists($arquivo)) {
$contents = file_get_contents($arquivo);
$linhas = explode("\n", trim($contents));
$inscricao_num = count(array_filter($linhas)) + 1;
}
$dados = "$inscricao_num|$nome|$tel|$doc|$curso\n";
file_put_contents($arquivo, $dados, FILE_APPEND | LOCK_EX);
echo "<p class='verd'>Inscrição n° $inscricao_num realizada com sucesso!<br>";
echo "Nome: $nome<br>";
echo "Telefone: $tel<br>";
echo "Documento: $doc<br>";
echo "Curso: $curso</p>";
} else {
echo "<p style='color: red;'>Por favor, preencha todos os campos e selecione um curso.</p>";
}
}
if (isset($_POST['consultar'])) {
$inscricao = isset($_POST['inscricao']) ? trim($_POST['inscricao']) : '';
$nome_consulta = isset($_POST['nome_consulta']) ? trim($_POST['nome_consulta']) : '';
$curso_consulta = isset($_POST['curso_consulta']) ? $_POST['curso_consulta'] : '';
$arquivo = "inscricoes.txt";
if (file_exists($arquivo)) {
$contents = file_get_contents($arquivo);
$linhas = explode("\n", trim($contents));
$encontrou = false;
echo "<h3>Resultados da Consulta:</h3>";
foreach ($linhas as $linha) {
if (empty($linha)) continue;
list($num, $nome_arq, $tel_arq, $doc_arq, $curso_arq) = explode("|", $linha);
$match = true;
if (!empty($inscricao) && $num != $inscricao) {
$match = false;
}
if (!empty($nome_consulta) && stripos($nome_arq, $nome_consulta) === false) {
$match = false;
}
if ($curso_consulta != 'escolha' && $curso_arq != $curso_consulta) {
$match = false;
}
if ($match) {
echo "<p class='verd'>";
echo "Inscrição: $num<br>";
echo "Nome: $nome_arq<br>";
echo "Telefone: $tel_arq<br>";
echo "Documento: $doc_arq<br>";
echo "Curso: $curso_arq";
echo "</p><hr>";
$encontrou = true;
}
}
if (!$encontrou) {
echo "<p style='color: red;'>Nenhuma inscrição encontrada com os critérios informados.</p>";
}
} else {
echo "<p style='color: red;'>Nenhuma inscrição cadastrada ainda.</p>";
}
}
?>
</body>
</html>

135
aula4.php Normal file
View File

@@ -0,0 +1,135 @@
<!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.0">
<title>Aula 4 - Jogo (soma 15)</title>
<link rel="stylesheet" href="estilo.css">
<style>
.resp{
position: fixed;
top: 20%;
left:50%;
font-size: 240%;
}
a:link {
color: black;
text-decoration: none;
}
a:visited{
color: black;
text-decoration: none;
}
</style>
</head>
<body>
<header><h1>Aula 4 - Jogo (soma 15)</h1></header>
<nav></nav>
<main>
<p>Prencha os nove campos com números de um a nove, <br>não repetindo nenhum número.</p>
<p>A soma de cada linha, cada coluna e cada diagonal deve ser 15.</p>
<form action="aula4.php" method="POST">
<input type="hidden" name="jogo" value="1">
<table>
<tr>
<td><input type="text" name="a1" size="4"></td>
<td><input type="text" name="b1" size="4"></td>
<td><input type="text" name="c1" size="4"></td>
</tr>
<tr>
<td><input type="text" name="a2" size="4"></td>
<td><input type="text" name="b2" size="4"></td>
<td><input type="text" name="c2" size="4"></td>
</tr>
<tr>
<td><input type="text" name="a3" size="4"></td>
<td><input type="text" name="b3" size="4"></td>
<td><input type="text" name="c3" size="4"></td>
</tr>
<tr>
<td><input type="reset" value="Limpar"></td>
<td><button><a href="aula4.php">Voltar</a></button></td>
<td><input type="submit" name="Enviar"></td>
</tr>
</table>
</form>
<div class="resp">
<?php
if(isset($_POST["jogo"])){$jogo = $_POST["jogo"];}else{$jogo = null;}
if(isset($_POST["a1"])){$a1 = $_POST["a1"];}else{$a1 = null;}
if(isset($_POST["b1"])){$b1 = $_POST["b1"];}else{$b1 = null;}
if(isset($_POST["c1"])){$c1 = $_POST["c1"];}else{$c1 = null;}
if(isset($_POST["a2"])){$a2 = $_POST["a2"];}else{$a2 = null;}
if(isset($_POST["b2"])){$b2 = $_POST["b2"];}else{$b2 = null;}
if(isset($_POST["c2"])){$c2 = $_POST["c2"];}else{$c2 = null;}
if(isset($_POST["a3"])){$a3 = $_POST["a3"];}else{$a3 = null;}
if(isset($_POST["b3"])){$b3 = $_POST["b3"];}else{$b3 = null;}
if(isset($_POST["c3"])){$c3 = $_POST["c3"];}else{$c3 = null;}
$er = 0;
if($jogo == "1"){
if($a1 == null or $b1 == null or $c1 == null or $a2 == null or $b2 == null or $c2 == null or $a3 == null or $b3 == null or $c3 == null){
echo"<p class='verm'>Preencha todos os campos!</p>";
}
else{
if(($a1 + $b1 + $c1) != 15){
echo"<p class='verm'>Erro na linha 1!</p>";
$er = 1;
}
if(($a2 + $b2 + $c2) != 15){
echo"<p class='verm'>Erro na linha 2!</p>";
$er = 1;
}
if(($a3 + $b3 + $c3) != 15){
echo"<p class='verm'>Erro na linha 3!</p>";
$er = 1;
}
if(($a1 + $a2 + $a3) != 15){
echo"<p class='verm'>Erro na coluna 1!</p>";
$er = 1;
}
if(($b1 + $b2 + $b3) != 15){
echo"<p class='verm'>Erro na coluna 2!</p>";
$er = 1;
}
if(($c1 + $c2 + $c3) != 15){
echo"<p class='verm'>Erro na coluna 3!</p>";
$er = 1;
}
if(($a1 + $b2 + $c3) != 15){
echo"<p class='verm'>Erro na diagonal descendente!</p>";
$er = 1;
}
if(($a3 + $b2 + $c1) != 15){
echo"<p class='verm'>Erro na diagonal ascendente!</p>";
$er = 1;
}
if($a1 == $a2){
echo"<p class='verm'>Números repetidos!</p>";
$er = 1;
}
if($er == 0){
echo"<p class='verd'>Vencedor!!!</p>";
echo"<p><button><a href='aula5.php'>Proximo Jogo</a></button></p>";
}
}
}
?>
</div>
</main>
<footer><h1>Programação WEB II - Prof James Willian</h1></footer>
</body>
</html>

201
aula5.php Normal file
View File

@@ -0,0 +1,201 @@
<!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.0">
<title>Aula 5 - Jogo (soma 15)</title>
<link rel="stylesheet" href="estilo.css">
<style>
.resp{
position: fixed;
top: 20%;
left:50%;
font-size: 240%;
}
a:link {
color: black;
text-decoration: none;
}
a:visited{
color: black;
text-decoration: none;
}
</style>
</head>
<body>
<header><h1>Aula 5 - Jogo (soma 15)</h1></header>
<nav></nav>
<main>
<p>Prencha os vinte e cinco campos com números de um a cinco, <br>não repetindo nenhum número na mesma linha ou coluna.</p>
<p>A soma de cada linha, cada coluna e cada diagonal deve ser igual a 15.</p>
<form action="aula5.php" method="POST">
<input type="hidden" name="jogo" value="1">
<table>
<tr>
<td><input type="text" name="a1" size="2" ></td>
<td><input type="text" name="b1" size="2"></td>
<td><input type="text" name="c1" size="2"></td>
<td><input type="text" name="d1" size="2"></td>
<td><input type="text" name="e1" size="2"></td>
</tr>
<tr>
<td><input type="text" name="a2" size="2"></td>
<td><input type="text" name="b2" size="2"></td>
<td><input type="text" name="c2" size="2"></td>
<td><input type="text" name="d2" size="2"></td>
<td><input type="text" name="e2" size="2"></td>
</tr>
<tr>
<td><input type="text" name="a3" size="2"></td>
<td><input type="text" name="b3" size="2"></td>
<td><input type="text" name="c3" size="2"></td>
<td><input type="text" name="d3" size="2"></td>
<td><input type="text" name="e3" size="2"></td>
</tr>
<tr>
<td><input type="text" name="a4" size="2"></td>
<td><input type="text" name="b4" size="2"></td>
<td><input type="text" name="c4" size="2"></td>
<td><input type="text" name="d4" size="2"></td>
<td><input type="text" name="e4" size="2"></td>
</tr>
<tr>
<td><input type="text" name="a5" size="2"></td>
<td><input type="text" name="b5" size="2"></td>
<td><input type="text" name="c5" size="2"></td>
<td><input type="text" name="d5" size="2"></td>
<td><input type="text" name="e5" size="2"></td>
</tr>
<tr>
<td><input type="reset" value="Limpa"></td>
<td><input type="submit" Value="Jogar"></td>
<td colspan="3"><button><a href='aula5.php'>Recarregar a página</a></button></td>
<td></td> <td></td>
</tr>
</table>
</form>
<div class="resp">
<?php
if(isset($_POST["jogo"])){$jogo = $_POST["jogo"];}else{$jogo = null;}
if(isset($_POST["a1"])){$a1 = $_POST["a1"];}else{$a1 = null;}
if(isset($_POST["b1"])){$b1 = $_POST["b1"];}else{$b1 = null;}
if(isset($_POST["c1"])){$c1 = $_POST["c1"];}else{$c1 = null;}
if(isset($_POST["d1"])){$d1 = $_POST["d1"];}else{$d1 = null;}
if(isset($_POST["e1"])){$e1 = $_POST["e1"];}else{$e1 = null;}
if(isset($_POST["a2"])){$a2 = $_POST["a2"];}else{$a2 = null;}
if(isset($_POST["b2"])){$b2 = $_POST["b2"];}else{$b2 = null;}
if(isset($_POST["c2"])){$c2 = $_POST["c2"];}else{$c2 = null;}
if(isset($_POST["d2"])){$d2 = $_POST["d2"];}else{$d2 = null;}
if(isset($_POST["e2"])){$e2 = $_POST["e2"];}else{$e2 = null;}
if(isset($_POST["a3"])){$a3 = $_POST["a3"];}else{$a3 = null;}
if(isset($_POST["b3"])){$b3 = $_POST["b3"];}else{$b3 = null;}
if(isset($_POST["c3"])){$c3 = $_POST["c3"];}else{$c3 = null;}
if(isset($_POST["d3"])){$d3 = $_POST["d3"];}else{$d3 = null;}
if(isset($_POST["e3"])){$e3 = $_POST["e3"];}else{$e3 = null;}
if(isset($_POST["a4"])){$a4 = $_POST["a4"];}else{$a4 = null;}
if(isset($_POST["b4"])){$b4 = $_POST["b4"];}else{$b4 = null;}
if(isset($_POST["c4"])){$c4 = $_POST["c4"];}else{$c4 = null;}
if(isset($_POST["d4"])){$d4 = $_POST["d4"];}else{$d4 = null;}
if(isset($_POST["e4"])){$e4 = $_POST["e4"];}else{$e4 = null;}
if(isset($_POST["a5"])){$a5 = $_POST["a5"];}else{$a5 = null;}
if(isset($_POST["b5"])){$b5 = $_POST["b5"];}else{$b5 = null;}
if(isset($_POST["c5"])){$c5 = $_POST["c5"];}else{$c5 = null;}
if(isset($_POST["d5"])){$d5 = $_POST["d5"];}else{$d5 = null;}
if(isset($_POST["e5"])){$e5 = $_POST["e5"];}else{$e5 = null;}
$er = 0;
if($jogo == "1"){
if($a1 == null or $b1 == null or $c1 == null or $d1 == null or $e1 == null or $a2 == null or $b2 == null or $c2 == null or $d2 == null or $e2 == null or $a3 == null or $b3 == null or $c3 == null or $d3 == null or $e3 == null or $a4 == null or $b4 == null or $c4 == null or $d4 == null or $e4 == null or $a5 == null or $b5 == null or $c5 == null or $d5 == null or $e5 == null){
echo"<p class='verm'>Preencha todos os campos!</p>";
}
else{
if(($a1 + $b1 + $c1 + $d1 + $e1) != 15){
echo"<p class='verm'>Erro na linha 1!</p>";
$er = 1;
}
if(($a2 + $b2 + $c2 + $d2 + $e2) != 15){
echo"<p class='verm'>Erro na linha 2!</p>";
$er = 1;
}
if(($a3 + $b3 + $c3 + $d3 + $e3) != 15){
echo"<p class='verm'>Erro na linha 3!</p>";
$er = 1;
}
if(($a4 + $b4 + $c4 + $d4 + $e4) != 15){
echo"<p class='verm'>Erro na linha 4!</p>";
$er = 1;
}
if(($a5 + $b5 + $c5 + $d5 + $e5) != 15){
echo"<p class='verm'>Erro na linha 5!</p>";
$er = 1;
}
if(($a1 + $a2 + $a3 + $a4 + $a5) != 15){
echo"<p class='verm'>Erro na coluna 1!</p>";
$er = 1;
}
if(($b1 + $b2 + $b3 + $b4 + $b5) != 15){
echo"<p class='verm'>Erro na coluna 2!</p>";
$er = 1;
}
if(($c1 + $c2 + $c3 + $c4 + $c5) != 15){
echo"<p class='verm'>Erro na coluna 3!</p>";
$er = 1;
}
if(($d1 + $d2 + $d3 + $d4 + $d5) != 15){
echo"<p class='verm'>Erro na coluna 4!</p>";
$er = 1;
}
if(($e1 + $e2 + $e3 + $e4 + $e5) != 15){
echo"<p class='verm'>Erro na coluna 5!</p>";
$er = 1;
}
if(($a1 + $b2 + $c3 + $d4 + $e5) != 15){
echo"<p class='verm'>Erro na diagonal descendente!</p>";
$er = 1;
}
if(($a5 + $b4 + $c3 + $d2 + $e1) != 15){
echo"<p class='verm'>Erro na diagonal ascendente!</p>";
$er = 1;
}
if($a1 == $a2 and ($a1 + $b1 + $c1 + $d1 + $e1) == 15){
echo"<p class='verm'>Números repetidos!</p>";
$er = 1;
}
if($er == 0){
echo"<p class='verd'>Vencedor!!!</p>";
}
}
}
?>
</div>
</main>
<footer><h1>Programação WEB II - Prof James Willian</h1></footer>
</body>
</html>

66
aula6.php Normal file
View File

@@ -0,0 +1,66 @@
<!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.0">
<title>Aula 6</title>
<link rel="stylesheet" href="estilo.css">
<style>
</style>
</head>
<body>
<header><h1>Aula 6</h1></header>
<nav></nav>
<main>
<form action="aula6.php" method="POST">
<table>
<tr>
<td>Início:</td>
<td><input type="number" name="ini" ></td>
</tr>
<tr>
<td>Fim:</td>
<td><input type="number" name="fim" ></td>
</tr>
<tr>
<td><input type="reset" value="Limpar"></td>
<td><input type="submit" name="Enviar"></td>
</tr>
</table>
</form>
<?php
if(isset($_POST["ini"])){
$ini = $_POST["ini"];
}
else{
$ini = null;
}
if(isset($_POST["fim"])){
$fim = $_POST["fim"];
}
else{
$fim = null;
}
if($ini != null and $fim != null){
$x = $ini;
while($x <= $fim){
$y = 1;
while($y <= 10){
$z = $x * $y;
echo"<p>$x X $y = $z</p>";
$y++;
}
$x++;
echo"<br><br>";
}
}
?>
</main>
<footer><h1>Programação WEB II - Prof James Willian</h1></footer>
</body>
</html>

49
estilo.css Normal file
View File

@@ -0,0 +1,49 @@
body{
background-color: lightblue;
}
header{
position: fixed;
top: 0%;
left: 0%;
height: 10%;
width: 100%;
text-align: center;
}
nav{
position: fixed;
top: 10%;
left: 0%;
height: 10%;
width: 100%;
text-align: center;
}
main{
position: fixed;
top: 20%;
left: 0%;
height: 70%;
width: 100%;
text-align: justify;
padding-left: 5%;
overflow: auto;
}
footer{
position: fixed;
top: 90%;
left: 0%;
height: 10%;
width: 100%;
text-align: center;
}
.azul{
font-size: 120%;
color: blue;
}
.verd{
font-size: 120%;
color: green;
}
.verm{
font-size: 120%;
color: red;
}

104
form.html Normal file
View File

@@ -0,0 +1,104 @@
<!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.0">
<link rel="stylesheet" href="estilo.css">
<title>Formulário</title>
</head>
<body>
<header><h1>Aula 2 - Formulários</h1></header>
<nav></nav>
<main>
<table>
<form action="form.php" method="POST">
<tr>
<td><b>Nome:</b></td><td><input type="text" name="nome"></td>
</tr>
<tr>
<td><b>Data de nascimento:</b></td><td><input type="date" name="dn"></td>
</tr>
<tr>
<td><b>Quantos meses de prática em programação?</b></td><td><input type="number" name="mp"></td>
</tr>
<tr>
<td><b>Quais linguangens de programação você conhece?</b></td><td></td>
</tr>
<tr>
<td><input type="checkbox" name="c" value="C"> Linguangem C</td><td></td>
</tr>
<tr>
<td><input type="checkbox" name="html" value="HTML e CSS"> HTML e CSS</td><td></td>
</tr>
<tr>
<td><input type="checkbox" name="cpp" value="C++"> Linguangem C++</td><td></td>
</tr>
<tr>
<td><input type="checkbox" name="PHP" value="PHP"> Linguangem PHP</td><td></td>
</tr>
<tr>
<td><input type="checkbox" name="JS" value="JS"> Linguangem JavaScript</td><td></td>
</tr>
<tr>
<td><input type="checkbox" name="java" value="Java"> Linguangem Java</td><td></td>
</tr>
<tr>
<td><input type="checkbox" name="cc" value="C#"> Linguangem C#</td><td></td>
</tr>
<tr>
<td><input type="checkbox" name="outra" value="Outra Linguagem: "> Outra qual?</td>
<td><input type="text" name="outral"></td>
</tr>
<tr>
<td><b>Quais linguas você fala?</b></td><td></td>
</tr>
<tr>
<td><input type="checkbox" name="en" value="Inglês">Inglês</td><td></td>
</tr>
<tr>
<td><input type="checkbox" name="es" value="Espanhol">Espanhol</td><td></td>
</tr>
<tr>
<td><input type="checkbox" name="ma" value="Mandarim">Mandarim</td><td></td>
</tr>
<tr>
<td><input type="checkbox" name="outrali" value="Conhece o idioma: "> Outra qual?</td>
<td><input type="text" name="outralin"></td>
</tr>
<tr>
<td><b>Qual sua maior formação?</b></td><td></td>
</tr>
<tr>
<td><input type="radio" name="for" value="Curso Livre">Curso Livre</td><td></td>
</tr>
<tr>
<td><input type="radio" name="for" value="Técnico">Técnico</td><td></td>
</tr>
<tr>
<td><input type="radio" name="for" value="Tecnólogo">Tecnólogo</td><td></td>
</tr>
<tr>
<td><input type="radio" name="for" value="Bacharel">Bacharel</td><td></td>
</tr>
<tr>
<td><input type="radio" name="for" value="Licenciatura">Licenciatura</td><td></td>
</tr>
<tr>
<td><input type="radio" name="for" value="Pós-graduação">Pós-graduação</td><td></td>
</tr>
<tr>
<td><b>Qual sua experiência profissional?</b></td>
<td><textarea name="ep" rows="5" cols="25"></textarea></td>
</tr>
<tr>
<td><input type="reset" value="Limpar"></td>
<td><input type="submit" value="Enviar"></td>
</tr>
</form>
</table>
</main>
<footer><h1>Programação WEB II - Prof. James Willian</h1></footer>
</body>
</html>

167
form.php Normal file
View File

@@ -0,0 +1,167 @@
<!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.0">
<title>Formulário</title>
<link rel="stylesheet" href="estilo.css">
</head>
<body>
<body>
<header><h1>Aula 2 - Formulários</h1></header>
<nav></nav>
<main>
<?php
if(isset($_POST["nome"])){
$nome = $_POST["nome"];
}
else{
$nome = null;
}
if(isset($_POST["dn"])){
$dn = $_POST["dn"];
}
else{
$dn = null;
}
if(isset($_POST["mp"])){
$mp = $_POST["mp"];
}
else{
$mp = null;
}
if(isset($_POST["c"])){
$c = $_POST["c"];
}
else{
$c = null;
}
if(isset($_POST["html"])){
$html = $_POST["html"];
}
else{
$html = null;
}
if(isset($_POST["cpp"])){
$cpp = $_POST["cpp"];
}
else{
$cpp = null;
}
if(isset($_POST["PHP"])){
$PHP = $_POST["PHP"];
}
else{
$PHP = null;
}
if(isset($_POST["JS"])){
$JS = $_POST["JS"];
}
else{
$JS = null;
}
if(isset($_POST["java"])){
$java = $_POST["java"];
}
else{
$java = null;
}
if(isset($_POST["cc"])){
$cc = $_POST["cc"];
}
else{
$cc = null;
}
if(isset($_POST["outra"])){
$outra = $_POST["outra"];
}
else{
$outra = null;
}
if(isset($_POST["outral"])){
$outral = $_POST["outral"];
}
else{
$outral = null;
}
if(isset($_POST["en"])){
$en = $_POST["en"];
}
else{
$en = null;
}
if(isset($_POST["es"])){
$es = $_POST["es"];
}
else{
$es = null;
}
if(isset($_POST["ma"])){
$ma = $_POST["ma"];
}
else{
$ma = null;
}
if(isset($_POST["outrali"])){
$outrali = $_POST["outrali"];
}
else{
$outrali = null;
}
if(isset($_POST["outralin"])){
$outralin = $_POST["outralin"];
}
else{
$outralin = null;
}
if(isset($_POST["for"])){
$for = $_POST["for"];
}
else{
$for = null;
}
if(isset($_POST["ep"])){
$ep = $_POST["ep"];
}
else{
$ep = null;
}
echo"
<p>Nome: $nome</p>
<p>Data de nascimento: $dn</p>
<p>Tempo de experiência: $mp meses</p>
<p>Conhece as linguagens: $c $cpp $html $JS $PHP $java $cc</p>
<p>$outra $outral</p>
<p>Fala as lingua: $en $es $ma </p>
<p>$outrali $outralin </p>
<p>Formação: $for</p>
<p>Experiência profissional: $ep</p>
";
?>
</main>
<footer><h1>Programação WEB II - Prof. James Willian</h1></footer>
</body>
</html>
</body>
</html>

1
inscricoes.txt Normal file
View File

@@ -0,0 +1 @@
1|morpheus|41660|34262345|Administração

1
lista.txt Normal file
View File

@@ -0,0 +1 @@
<p class='verd'>domi foi aprovado com a média 8.5</p><p class='verd'>domi foi aprovado com a média 8.5</p>

1
visita.txt Normal file
View File

@@ -0,0 +1 @@
7