Beispiel #1
0
<?php

/********************************************************************************
Autor: Vitor Hugo
Data Criação: 06/12/2005
Data Atualização: 06/12/2005 - Vitor Hugo
Sistema: Home Bank
Descrição: Cadastra de Usuário
************************************************************************************/
include "funcoes_js.php";
$escondercampo = " readonly style='border:none;' ";
if (Conexao($opcao = 'open', conexao_host, conexao_user, conexao_pass, conexao_db)) {
    ?>

<script language=javascript>
function VerificaCamposObrigatorios()
{
    if (document.form.codtipocliente.value =='')
    {
      alert('Campo "Tipo de Cliente" obrigatório.');
      document.form.codtipocliente.focus();
      return false;
    }
	
    if (document.form.nomcliente.value =='')
    {
      alert('Campo "Nome" obrigatório.');
      document.form.nomcliente.focus();
      return false;
    }
	
<br>

<table border="1" width="600" cellspacing="0" class="table">
  <tr>
      <td width="5"align="center">&nbsp;
          
      </td>
      <td class="td2" align="center">
          <b>Ordem de Serviço já Solicitadas</b>
      </td>
  </tr>
</table>

<?php 
// Abre conexão com o bd
$achou = Conexao($opcao = 'open', conexao_host, conexao_user, conexao_pass, conexao_db);
// Lista dados que estão cadastrados na tabela
if ($_REQUEST['tipoacao'] == "") {
    // Verifica se o usuário é delegado
    $sqldel = "select coddelegado From delegado where codcliente = " . $_SESSION['codcliente'];
    $querydel = mysql_query($sqldel);
    $rsresultdel = mysql_fetch_array($querydel);
    if ($rsresultdel['coddelegado'] != "") {
        // Sql para recuperar as solicitações que o delegado fez
        $sqlString = "Select s.*, t.destiposervsol\n                 From solicitacaoserv s, tiposervsolicitacao t\n                 where s.codtiposervsol = t.codtiposervsol\n\t\t\t\t and s.codcliente = '" . $_SESSION['codcliente'] . "'" . "\n                 order by s.codsolicitacao desc";
    } else {
        //  Sql para recuperar as solicitações do cliente
        $sqlString = "Select s.*, t.destiposervsol\n                 From solicitacaoserv s, tiposervsolicitacao t\n                 where s.codtiposervsol = t.codtiposervsol\n\t\t\t\t and s.numcontacorrente = '" . $_SESSION['numcontacorrente'] . "'" . "\n                 order by s.codsolicitacao desc";
    }
    $rsqry = mysql_query($sqlString);
    $dados = mysql_fetch_array($rsqry);
Beispiel #3
0
                    /* GERA DATA ATUAL*/
                    $datatualacesso = date("Y-m-d", time());
                    /*BUSCA ÚLTIMA DATA DE ACESSO NO BD*/
                    $sql2 = "select * from cliente where codcliente = " . $_SESSION['codcliente'];
                    $result2 = mysql_query($sql2) or die(mysql_error());
                    $dadosresult = mysql_fetch_array($result2);
                    $_SESSION['datultacessocli'] = $dadosresult['datultacesso'];
                    /*CADASTRA ULTIMO ACESSO DO CLIENTE*/
                    $sql = "update cliente set datultacesso = '" . $datatualacesso . "' where codcliente = " . $_SESSION['codcliente'];
                    $result = mysql_query($sql) or die(mysql_error());
                    /* Inclui página inicial */
                    $nomePAG = "index.php";
                } else {
                    $ValLoginErro = "Dados incorretos, tente novamente.";
                }
                Conexao($opcao = 'close');
            } else {
                $ValLoginErro = "Dados incorretos, tente novamente.";
            }
        }
    }
}
?>
<body background="img/bg.gif" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<table width="100%" height="100%" id="central">
  <tr><td width="100%" height="100%" align="center" valign="middle">
<script language="JavaScript1.2">mmLoadMenus();</script>
<!--The following section is an HTML table which reassembles the sliced image in a browser.-->
<!--Copy the table section including the opening and closing table tags, and paste the data where-->
<!--you want the reassembled image to appear in the destination document. -->
<!--======================== BEGIN COPYING THE HTML HERE ==========================-->