function displaySchedule() { $dao = new DAO(); $stmt = oci_parse($dao->con, "SELECT TO_CHAR(TIMESTART, 'MM-DD-YYYY HH24:MI') AS TS ,TO_CHAR(TIMEEND, 'MM-DD-YYYY HH24:MI') AS TE, ID, THEATREID, MOVIEID FROM SCREENROOM"); OCIDefineByName($stmt, "TS", $timeS); OCIDefineByName($stmt, "TE", $timeE); OCIDefineByName($stmt, "ID", $scroomID); OCIDefineByName($stmt, "THEATREID", $tID); OCIDefineByName($stmt, "MOVIEID", $mID); oci_execute($stmt, OCI_DEFAULT); echo '<table border=1>'; while (oci_fetch($stmt)) { echo '<tr>'; // Use the uppercase column names for the associative array indices $bookLink = '<a href=order.php?sID=' . $scroomID . '>  book</a>'; $detailLink = '<a href=movieDetail.php?mID=' . $mID . '>  detaile</a>'; echo '<td> MOVIE: ' . $dao->fetchMovieName($mID) . '</td>' . ' <td>Start: ' . $timeS . ' </td><td>End: ' . $timeE . ' </td><td> theatre: ' . $dao->fetchTheatreName($tID) . '</td><td>' . $bookLink . ' </td><td>' . $detailLink . '</td>'; echo '</tr>'; } echo '</table>'; }
echo 'Autorização para acessar esta Página é requerida.'; exit; } else { session_start(); require_once "AW00DB.php"; require_once "{$database}.class.php"; require_once "AW00MD.php"; require_once "liberacaoteclado.php"; require_once "function_param.inc"; require_once "limpa_sessoes.php"; require_once "style.inc"; $sql1 = "SELECT COUNT(*) RESULT\n FROM FUNCIONARIO\n WHERE\n CDFUNCIONARIO=UPPER('{$PHP_AUTH_USER}')\n AND\n CDSENHA=CRIPT(UPPER('{$PHP_AUTH_PW}'),'')"; $noun_cpl = parameter('NOUN_CPL'); $nrunimed = parameter('NRUNIMED'); $stmt1 = OCIParse($conn, $sql1); OCIDefineByName($stmt1, "RESULT", $RESULT); OCIExecute($stmt1); OCIFetch($stmt1); OCIResult($stmt1, 1); if ($RESULT == '1') { $sql2 = "SELECT G.CDNIVEL NIV\n FROM FUNCIONARIO F,\n GRUPO_FUNCIONARIO G\n WHERE F.CDFUNCIONARIO = UPPER('{$PHP_AUTH_USER}')\n AND F.CDGRUPO = G.CDGRUPO"; $stmt2 = OCIParse($conn, $sql2); OCIdefineByName($stmt2, "niv", $niv); OCIexecute($stmt2); OCIFetch($stmt2); $nivel = OCIResult($stmt2, 1); $emissor = strtoupper($PHP_AUTH_USER); session_register('nivel'); session_register('emissor'); session_unregister('data1'); session_unregister('data2');
function fetchMovieDetail($mid) { $stmt = oci_parse($this->con, "select * from movie where id = {$mid} "); OCIDefineByName($stmt, "DIRECTOR", $DCT); OCIDefineByName($stmt, "STAR", $STAR); OCIDefineByName($stmt, "DESCRPITION", $DES); oci_execute($stmt, OCI_DEFAULT); while (oci_fetch($stmt)) { $str = 'DIRECTOR:  ' . $DCT . '  type:' . $this->getMovieType($mid) . '  STAR:' . $STAR . ' .<br><br>DETAIL: <br><br>' . $DES; echo wordwrap($str, 150, "<br>\n", false); } }
} print "\n\t\t <STYLE type=text/css>A:hover {\n\t\t COLOR: #000000; FONT-FAMILY: verdana, arial, sans-serif; font-size: 8pt; font-weight: bold; TEXT-DECORATION: none\n\t\t }\n\t\t A {\n\t\t COLOR: #000000; FONT-FAMILY: verdana, arial, sans-serif; font-size: 8pt; TEXT-DECORATION: none\n\t\t }\n\t\t </STYLE>\n\n\t\t <SCRIPT LANGUAGE=\"JavaScript\">\n\n\t\t\tfunction validate(){\n\n\t\t\tif (document.pesquisa.nome.value==\"\") {\n\t\t\talert(\"Você tem que digitar pelo menos as iniciais do usuário!\")\n\t\t\tdocument.pesquisa.nome.focus();\n\t\t\treturn false\n\t\t\t}\n\t\t\treturn true\n\t\t\t}\n\n\t\t\tfunction disableForm(theform) {\n\t\t\tfor (i = 0; i < theform.length; i++) {\n\t\t\tvar tempobj = theform.elements[i];\n\t\t\tif (tempobj.type.toLowerCase() == \"submit\" || tempobj.type.toLowerCase() == \"reset\")\n\n\t\t\ttempobj.disabled = true;\n\n\t\t\t}\n\t\t\t}\n\t\t </script>"; print "\n<form method=\"POST\" action=\"pesqusu1.php\" name=\"pesquisa\" onSubmit=\"return validate(); return disableForm(this); window.document.pesquisa.nome.value='';\">\n<center>\n<img src=\"img/barra.jpg\" width=\"380\" height=\"2\"><br>\n<font class='nome_campo'><em><strong>Nome: </em></font>\n <input type=\"text\" size=\"20\" name=\"nome\">\n <input type=\"hidden\" name=\"submit\" value=\"Pesquisar\">\n <input type=\"reset\" name=\"reset\" value=\"Limpar\" Onclick=\"window.document.pesquisa.nome.focus();\">\n <input type=\"button\" name=\"fecha\" value=\"Fechar\" onclick=\"window.close(); return false;\"\"><br>\n<img src=\"img/barra.jpg\" width=\"380\" height=\"3\"></p>\n</center>\n</form>"; if ($nome != !1) { require_once "AW00DB.php"; require_once "{$database}.class.php"; require_once "AW00MD.php"; if ($nivelacesso_funcionario != 'EMPRESA') { $sql = "SELECT\n\tus.cdareaacao ||'.'|| us.nrcontrato || '.'||lpad(us.nrfamilia,6,0) || '.'||us.tpusuario || '-'||us.nrdigitoct CODIGO,\n\tPE.NOPESSOA NOME,\n\tUS.DTEXCLUSAO\n\tFROM\n\tPESSOA PE,\n\tUSUARIO US,\n USUARIO_IDENTIFICACAO UI\n\tWHERE\n\t PE.NOPESSOA LIKE UPPER('{$nome}%')\n and UI.NRSEQUENCIAL_USUARIO = US.NRSEQUENCIAL_USUARIO\n AND us.nrregistro_usuario = PE.NRREGISTRO\n AND UI.NRDIGITOCT = US.NRDIGITOCT\n AND UI.NRVIA_CARTAO = (SELECT MAX(NRVIA_CARTAO) NRVIA_CARTAO\n FROM USUARIO_IDENTIFICACAO\n WHERE CDUSUARIO = UI.CDUSUARIO )"; } else { $sql = "SELECT\n\tus.cdareaacao ||'.'|| us.nrcontrato || '.'||lpad(us.nrfamilia,6,0) || '.'||us.tpusuario || '-'||us.nrdigitoct CODIGO,\n\tPE.NOPESSOA NOME,\n\tUS.DTEXCLUSAO\n\tFROM\n\tPESSOA PE,\n\tUSUARIO US,\n USUARIO_IDENTIFICACAO UI,\n ( select nrregistro, nrcontrato from (\n select pf.nrregistro, pf.nrcontrato\n from PERMISSAO_FUNCIONARIO_CONTRATO PF\n where PF.CDFUNCIONARIO = UPPER('{$PHP_AUTH_USER}')\n union\n select pg.nrregistro, pg.nrcontrato\n from FUNCIONARIO F,\n PERMISSAO_GRUPO_CONTRATO PG\n where F.CDGRUPO = PG.CDGRUPO\n and F.CDFUNCIONARIO = UPPER('{$PHP_AUTH_USER}') ) ) co\n\tWHERE\n\t UPPER(PE.NOPESSOA) LIKE UPPER('{$nome}%')\n and co.nrregistro = us.nrregistro\n and co.nrcontrato = us.nrcontrato\n and UI.NRSEQUENCIAL_USUARIO = US.NRSEQUENCIAL_USUARIO\n AND us.nrregistro_usuario = PE.NRREGISTRO\n AND UI.NRDIGITOCT = US.NRDIGITOCT\n AND UI.NRVIA_CARTAO = (SELECT MAX(NRVIA_CARTAO) NRVIA_CARTAO\n FROM USUARIO_IDENTIFICACAO\n WHERE CDUSUARIO = UI.CDUSUARIO)"; } echo "{$sql} "; $cl = ''; $stmt = OCIParse($conn, $sql); OCIDefineByName($stmt, "{$nome}", $nome); OCIExecute($stmt); $nrows = OCIFetchStatement($stmt, $results); if ($nrows > 0) { print "<div align=\"center\">\n\t<table border=\"0\">\n\t<tr>\n\t<td class='titulo'><p align=\"center\"><font\n\tclass='nome_campo'><strong>Código</strong></font></p>\n\t</td>\n\t<td class='titulo'><p align=\"center\"><font\n\tclass='nome_campo'><strong>Nome</strong></font></p>\n\t</td>\n\t<td class='titulo'><p align=\"center\"><font\n\tclass='nome_campo'><strong>Dt. Exclusão</strong></font></p>\n\t</td>\n\n\t</tr>"; for ($i = 0; $i < $nrows; $i++) { reset($results); print "<TR>"; while ($column = each($results)) { $data = $column['value']; $dat = $column['key']; if ($dat == "CODIGO") { $cdcon = $data[$i]; } print "<td {$cl}><a href=\"#\" target=\"guia\" onClick=\"window.opener.document.yourform.data1.value = '{$cdcon}'; window.opener.document.yourform.data1.focus(); window.close(); return false;\"><font color=\"#000000\" face=\"Arial\">{$data[$i]}</font></a></td>"; }
print "<option value=''> </option>"; while ($row = $db->fetch_array($result)) { print "<option value='{$row['CDMOTIVO_SAIDA']}'"; if ($row[CDMOTIVO_SAIDA] == $cdtipo_saida) { print " selected "; } print ">{$row['CDMOTIVO_SAIDA']} - {$row['NOMOTIVO_SAIDA']}</option>"; } print "\n </select>"; print "</td>\n </tr>"; if ($liberatecladousuario == 'S') { if ($liberamotivo == 'S') { $sql = "SELECT M.CDMOTIVO_AUTORIZ , M.TXMOTIVO_AUTORIZ FROM MOTIVO_AUTORIZACAO M WHERE AOUTILIZADO_TELA_AUTORIZACAO = 'S'"; $stmt = OCIParse($conn, $sql); OCIDefineByName($stmt, "CDMOTIVO_AUTORIZ", $cdmotivo_autoriz); OCIDefineByName($stmt, "TXMOTIVO_AUTORIZ", $txmotivo_autoriz); OCIExecute($stmt); print "\n <tr><td class=\"nome_campo\">\n Motivo da Autorizaçao:</td>\n <td>\n <select size=\"1\" name=\"motivo\" onFocus=\"nextfield ='rn'\"> "; while (OCIFetch($stmt)) { print "<option value='{$cdmotivo_autoriz}'> {$txmotivo_autoriz}</option>"; } OCIFreeStatement($stmt); print "\n </select>"; } print "</td>\n </tr>"; } if ($liberaprestador == 'C') { echo "<input type=\"hidden\" size=\"4\" name=\"cdarea_prestador\" value='{$area_prestador}'>"; /* if ( '$liberatecladousuario' == 'S' ){ document.forms[0].data1.focus();