Advertisement
Guest User

Untitled

a guest
Jun 17th, 2019
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.18 KB | None | 0 0
  1. <!-- Titulo da Página -->
  2. <title>Fabrica de Solucoes Betim</title>
  3. <meta charset="utf-8">
  4.  
  5. <!-- Estilo customizado -->
  6. <link rel="stylesheet" type="text/css" href="estilo.css">
  7.  
  8. <h1> Fabrica de Soluções Betim</h1> <!-- Cabeçalho -->
  9. <hr><br><br>
  10.  
  11. <div><!-- Divisão nas paginas -->
  12.  
  13. <nav><!-- Barra de Navegação -->
  14. <ul>
  15. <li><a href="home.php"> Pagina Principal</a></li>
  16. <li><a href="aluno.php"> Cadastar Aluno</a></li>
  17. <li><a href="Curso.php"> Cadastar Curso</a></li>
  18. <li><a href="frequencia.php"> Controle de Frequência</a></li>
  19. <li><a href="certificados.php"> Emitir Certificado</a></li>
  20. <li><a href="sair.php"> Sair</a></li>
  21. </ul>
  22. </nav>
  23.  
  24. </div>
  25.  
  26. <div>
  27.  
  28. <form method="POST" action="fazer_chamada.php">
  29.  
  30. <select id="cursos" name="cursos">
  31. <option value="" selected="selected">Selecione Curso</option>
  32. <?php
  33.  
  34. $sql = "SELECT * FROM curso";
  35. $resultado = mysqli_query($link,$sql);
  36.  
  37. while ($dados= mysqli_fetch_array($resultado))
  38. {
  39.  
  40. $cursos = $dados['nome_curso'];
  41. echo "<option value='$cursos'>$cursos</option>";
  42. }
  43.  
  44. ?>
  45. </select>
  46. <br><br>
  47. <br><br>
  48. <select id="Professores" name="professores">
  49. <option value="" selected="selected">Professores</option>
  50. <?php
  51.  
  52. $sql2 = "SELECT * FROM professor";
  53. $resultado2 = mysqli_query($link,$sql2);
  54.  
  55. while ($dados2 = mysqli_fetch_array($resultado2))
  56. {
  57.  
  58. $usuario = $dados2['usuario'];
  59. echo "<option value='$usuario'>$usuario</option>";
  60. }
  61. ?>
  62. </select>
  63. <br><br>
  64. <br><br>
  65. <label for="Data">
  66. <input type="date" name="data" id="Data">
  67. </label>
  68.  
  69. <input type="submit" name="chamada" value="Fazer Chamada">
  70. </form>
  71.  
  72. </div>
  73.  
  74. <!-- Titulo da Página -->
  75. <title>Fabrica de Solucoes Betim</title>
  76. <meta charset="utf-8">
  77.  
  78. <!-- Estilo customizado -->
  79. <link rel="stylesheet" type="text/css" href="estilo.css">
  80.  
  81. <h1> Chamada </h1> <!-- Cabeçalho -->
  82. <hr><br><br>
  83.  
  84.  
  85. <div>
  86.  
  87. <form method="POST" action="registra_frequencia.php">
  88.  
  89. <?php
  90. require_once('bd.class.php');
  91. $conexaoSQL = new bancoDados();
  92. $link = $conexaoSQL->conecta_mysql();
  93.  
  94. $curso = $_POST['cursos'];
  95. $professores = $_POST['professores'];
  96. $data = $_POST['data'];
  97.  
  98.  
  99. echo "<table width='100%' border=0>";
  100. echo "<tr>";
  101. echo "<th> Matricula </th>";
  102. echo "<th> Nome </th>";
  103. echo "<th> Presente </th>";
  104. echo "</tr>";
  105.  
  106. $sql = "SELECT * FROM aluno WHERE curso_preferido = '$curso'";
  107.  
  108. $resultado = mysqli_query($link,$sql);
  109. while ($dados = mysqli_fetch_array($resultado))
  110. {
  111. $nome = $dados['nome_aluno'];
  112. $matricula = $dados['matricula'];
  113.  
  114. echo "<tr>";
  115. echo "<th> $matricula </th>";
  116. echo "<th> $nome</th>";
  117. echo "<th>
  118. <form method='POST' action='registra_frequencia.php'>
  119. <input type='radio' name='Presente' id='SIM' value='1' checked>SIM </input>
  120. <input type='radio' name='Presente' id='NAO' value='2' >NAO </input>
  121. </form>
  122. </th>";
  123. echo "</tr>";
  124.  
  125. }
  126. echo "</table>";
  127.  
  128. echo "<input type='hidden' name='curso' value='$curso'>";
  129. echo "<input type='hidden' name='professor' value='$professores'>";
  130. echo "<input type='hidden' name='datas' value='$data'>";
  131. ?>
  132. <input type="submit" name="enviar" value="Enviar">
  133. </form>
  134.  
  135. </div>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement