Guest User

Untitled

a guest
Dec 19th, 2016
44
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.68 KB | None | 0 0
  1. <?php
  2. require "contador.php";
  3. require "conexao.php";
  4.  
  5. ?>
  6.  
  7. <!DOCTYPE html>
  8. <html>
  9. <head>
  10. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  11. <title></title>
  12. <!-- Latest compiled and minified CSS -->
  13. <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
  14.  
  15. <!-- Optional theme -->
  16. <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap-theme.min.css" integrity="sha384-rHyoN1iRsVXV4nD0JutlnGaslCJuC7uwjduW9SVrLvRYooPp2bWYgmgJQIXwl/Sp" crossorigin="anonymous">
  17.  
  18. <!-- Latest compiled and minified JavaScript -->
  19. <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>
  20. <script src="https://code.jquery.com/jquery-2.2.0.min.js"></script>
  21. <script type="text/javascript" src="funcao.js"></script>
  22. <script type="text/javascript" src="funcao2.js"></script>
  23. <link rel="stylesheet" type="text/css" href="jquery-ui.min.css">
  24.  
  25. <script type="text/javascript">
  26. function calcular() {
  27. var soma = $('.calcular').get().reduce(function(soma, el) {
  28. return (parseInt(el.value, 10) || 0) + soma;
  29. }, 0);
  30. document.getElementById('result').value = soma;
  31. }
  32.  
  33. </script>
  34.  
  35. <style type="text/css">
  36. body{
  37. background: #E0E0E0;
  38. height: 100%;
  39. }
  40. form{
  41. position:absolute;
  42. top:5%;
  43. left:14%;
  44. background:#FFFFFF;
  45.  
  46. padding:50px;
  47. text-align:center;
  48. -moz-border-radius:7px;
  49. -webkit-border-radius:7px;
  50. border-radius:7px;
  51. }
  52. </style>
  53. </head>
  54. <body>
  55.  
  56. <div class="tamanho_form">
  57. <div class="table-responsive">
  58. <br>
  59.  
  60. <form method="post" action="salvar.php">
  61.  
  62. <table class="table table-hover table-bordered">
  63. <header class="row">
  64. <h2 class='text-center text-primary'>Pesquise o responsável</h2>
  65. </header>
  66.  
  67. <div class="row">
  68. <div class="form-group col-md-6 col-md-offset-3">
  69. <input type="text" class="form-control" id="busca" placeholder="Informe o nome do responśavel">
  70. </div>
  71. </div>
  72.  
  73.  
  74. <header class="row">
  75. <h2 class='text-center text-danger'>Detalhes do Responsável</h2>
  76. </header>
  77.  
  78. <br>
  79.  
  80. <div class="row">
  81. <div class="form-group col-md-2">
  82. <label for="titulo">Identificação:</label>
  83. <input type="text" class="form-control" name="identificacao" id="codigo_barra" readonly>
  84. </div>
  85.  
  86. <div class="form-group col-md-4">
  87. <label for="titulo">Nome Completo:</label>
  88. <input type="text" class="form-control" name="responsavel" id="titulo_livro" readonly>
  89. </div>
  90.  
  91. <div class="form-group col-md-3">
  92. <label for="titulo">Valor:</label>
  93. <input type="text" class="form-control calcular" id="txt1" name="adesao" onkeyup="calcular()">
  94. </div>
  95.  
  96. <div class="form-group col-md-3">
  97. <label for="titulo">Valor Total:</label>
  98. <input type="text" class="form-control" name="total" id="result" readonly>
  99. </div>
  100. </div>
  101. </table>
  102.  
  103. <hr />
  104.  
  105. <header class="row">
  106. <h2 class='text-center text-primary'>Cadastro de Dependentes</h2>
  107. </header>
  108.  
  109. <hr />
  110.  
  111. <table id="products-table" class="table">
  112. <tbody>
  113. <tr>
  114. <th>Nome:</th>
  115. <th>CPF:</th>
  116. <th>Cargo:</th>
  117. <th>E-mail:</th>
  118. <th>Parentesco:</th>
  119. <th>Valor Dependente:</th>
  120. <th class="actions">Ações</th>
  121. </tr>
  122.  
  123. <tr>
  124. <td><input type="text" name="usuarios[0][nome]"></td>
  125. <td><input type="text" name="usuarios[0][cpf]"></td>
  126.  
  127. <td>
  128. <select name="usuarios[0][cargo]">
  129. <option value="gerente" name="usuarios[0][gerente]">Gerente</option>
  130. <option value="Professor" name="usuarios[0][Professor]">Professor</option>
  131. <option value="Programador" name="usuarios[0][Programador]">Programador</option>
  132. </select>
  133. </td>
  134.  
  135.  
  136. <td><input type="text" name="usuarios[0][email]"></td>
  137. <td><input type="text" name="usuarios[0][parentesco]"></td>
  138. <td><input type="text" onkeyup="calcular()" class="calcular" name="usuarios[0][valordependente]"></td>
  139.  
  140. <td class="actions">
  141. <button class="btn btn-large btn-danger" onclick="RemoveTableRow(this)" type="button">Remover</button>
  142. </td>
  143. </tr>
  144. </tbody>
  145.  
  146. <tfoot>
  147. <tr>
  148. <td colspan="6" style="text-align: left;">
  149. <button class="btn btn-large btn-success" onclick="AddTableRow(this)" type="button">Adicionar Dependentes</button>
  150. </td>
  151. </tr>
  152. </tfoot>
  153. </table>
  154.  
  155. <button type="submit" class="btn btn-info pull-right">Cadastrar</button>
  156. </div>
  157. </form>
  158.  
  159.  
  160. <script type="text/javascript" src="https://code.jquery.com/jquery-3.1.1.js"></script>
  161. <script type="text/javascript" src="jquery-ui.min.js"></script>
  162. <script type="text/javascript" src="custom.js"></script>
  163. </body>
  164. </html>
Add Comment
Please, Sign In to add comment