Example #1
0
 function sql_ora($sql = "")
 {
     global $connect, $sql;
     $state = OCIparse($connect, $sql);
     OCIexecute($state);
 }
Example #2
0
                 $svbloq = 'S';
                 $sit = $sit + 1;
             }
         }
         if ($dat != 'CDOCORRENCIA') {
             print "<td {$cl}>{$data[$i]}</td>";
         }
     }
     print "</tr>";
 }
 print "</table></div>";
 $cl = '#FFFFFF';
 $sql = "\n                 SELECT OA.CDOCORRENCIA||' - '|| DECODE(O.MSG_POS,NULL,o.txocorrencia,O.MSG_POS)  MENSAGEM\n                 FROM\n                      AUTORIZACAO AU,\n                      servico_da_autorizacao SA ,\n                      OCORRENCIA_AUTORIZACAO OA,\n                      OCORRENCIA O\n                 WHERE\n                      AU.NRAUTORIZACAO = '{$v_nrautorizacao}'\n                      and\n                      ( (OA.NROCORRENCIA = au.nrocorrencia)\n                         or (OA.NROCORRENCIA = sa.nrocorrencia) )\n                      and OA.CDOCORRENCIA = O.CDOCORRENCIA\n                      and AU.NRAUTORIZACAO = SA.NRAUTORIZACAO\n                 GROUP BY OA.CDOCORRENCIA||' - '|| DECODE(O.MSG_POS,NULL,o.txocorrencia,O.MSG_POS)";
 $stmt2 = ociparse($conn, $sql);
 OCIdefineByName($stmt2, "mensagem", $mensagem);
 OCIexecute($stmt2);
 $nrow = OCIFetchStatement($stmt2, $output);
 $cl = "class='fundo_mesclado'";
 if ($nrow > 0) {
     print "<br><div align=\"center\"><table border=\"0\"><tr><td class='titulo'><p align=\"center\">Ocorrência da Autorização</font></p></td></tr>";
     for ($i = 0; $i < $nrow; $i++) {
         reset($output);
         print "<tr>";
         while ($column = each($output)) {
             $data = $column['value'];
             print "<td {$cl}><p align=\"center\">{$data[$i]}</font></p></td>";
         }
         print "</tr>";
     }
     print "</table></div>";
 }
 OCIbindbyname($stmt01, "nmusuario", $nmusuario, 60);
 OCIbindbyname($stmt01, "dtinicio", $dtinicio, 10);
 OCIbindbyname($stmt01, "dtnascimento", $dtnascimento, 10);
 OCIbindbyname($stmt01, "tpplano", $tpplano, 35);
 OCIbindbyname($stmt01, "tpcontrato", $tpcontrato, 35);
 OCIbindbyname($stmt01, "nrregistro_soli", $nrregistro_soli, 8);
 OCIbindbyname($stmt01, "nmsolicitante", $nmsolicitante, 60);
 OCIbindbyname($stmt01, "nrregistro_prest", $nrregistro_prest, 8);
 OCIbindbyname($stmt01, "nmprestador", $nmprestador, 60);
 OCIbindbyname($stmt01, "cdespecial", $cdespecial, 4);
 OCIbindbyname($stmt01, "especialidade", $especialidade, 40);
 OCIbindbyname($stmt01, "aoutiliza_cheque_consulta", $aoutiliza_cheque_consulta, 1);
 OCIbindbyname($stmt01, "cdespecial_req", $cdespecial_req, 4);
 OCIbindbyname($stmt01, "nrseq_prestador", $nrseq_prestador, 8);
 OCIbindbyname($stmt01, "nrseq_requisitante", $nrseq_requisitante, 8);
 OCIexecute($stmt01);
 OCIFreeStatement($stmt01);
 $codigo = "{$unimed}.{$contrato}.{$familia}.{$dependencia}-{$digito}";
 $cdprestador = $data2;
 if ($cdespecialidade != '') {
     $sql = "select NOESPECIALIDADE from especialidade es where es.cdespecialidade = '{$cdespecialidade}'";
     $result = $db->query($sql);
     $row = $db->fetch_array($result);
     $cdespecial = $cdespecialidade;
     $especialidade = $row[NOESPECIALIDADE];
 }
 /*******************************************************************************************
  ****    informacoes_usuario.php: Exibe as informações do usuário
  ********************************************************************************************/
 require_once "informacoes_usuario.php";
 if ($aw_ocorren == 'S' || $aw == 'S') {