!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/noticia/   drwxr-xr-x
Free 9.4 GB of 93.48 GB (10.06%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Feedback    Self remove    Logout    


Viewing file:     noticia_cad.php (27.46 KB)      -rwxr-xr-x
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php
    
#############################################################################
    # Nome: noticia_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 notícias     #
    # Histórico:                                                                #
    #    . 06/08/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");
    include_once(
"../../lib/fckeditor/fckeditor.php");


    if(isset(
$_GET["cod_noticia"]))
    {
        
$_SESSION["link_voltar"] = basename($_SERVER["HTTP_REFERER"]);  
        
$hddAcao   "U";
        
$hddNoticia $_GET["cod_noticia"];
        
        
$sql_aux " WHERE NOT_RowID = $hddNoticia ";
                    
        
//Executa a query de pesquisa
        
$sql_noticia BUSCA_NOTICIAS $sql_aux;

        
$rs_noticia  $conexao->query($sql_noticia);
        
$noticia     $rs_noticia->fetch_array();
        
        
//Preenche campos do formulário com os valores do banco de dados  
        
list($dt_inicio_publicacao,$h_inicio_publicacao) = explode(" ",$noticia["NOT_DtInicioPublicacao"]);
        list(
$dt_termino_publicacao,$h_termino_publicacao) = explode(" ",$noticia["NOT_DtTerminoPublicacao"]);
        
        
$titulo                    $noticia["NOT_Titulo"];               
        
$dt_inicio_publicacao      FormataData($dt_inicio_publicacao,"SCREEN");                              
        
$dt_termino_publicacao     FormataData($dt_termino_publicacao,"SCREEN");   
        
$periodo_indefinidoSN      $noticia["NOT_PeriodoIndefinidoSN"];   
        
$hiperlink_externo         $noticia["NOT_HiperlinkExterno"];
        
$tipoFonte                 $noticia["NOT_TipoFonte"];
        
$fonte                     $noticia["NOT_Fonte"];
        
$novidadeSN                $noticia["NOT_NovidadeSN"];
        
$importanteSN              $noticia["NOT_ImportanteSN"];
        
$vis_homeSN                $noticia["NOT_VisualizacaoHomeSN"];
        
$texto_resumido            $noticia["NOT_TextoResumido"]; 
        
$texto_completo            $noticia["NOT_TextoCompleto"];
        
$destaque                $noticia["NOT_DestaqueSN"];
        
$imgDestaque            $noticia["NOT_ImgDestaque_DR"];
        
$ativoSN                  $noticia["NOT_AtivoSN"];
        
$ckbcheck_twitter         $noticia["NOT_TwitterSN"];
        
$chkNoticiaGeral         $noticia["NOT_AcessoGeralSN"];


        if((
$dt_termino_publicacao == "00/00/0000") && ($h_termino_publicacao == "00:00:00"))
        {
            
$dt_termino_publicacao "";
            
$h_termino_publicacao ""
        }
        
        if (
$imgDestaque != '') {
            
$sqlDestaque "
                SELECT *
                FROM imagens
                WHERE IMG_RowID = 
$imgDestaque
                    AND IMG_AtivoSN = 'S'
            "
;
            
$exeDestaque $conexao->query($sqlDestaque);
            
$rsDestaque mysqli_fetch_assoc($exeDestaque);
            
$nmImg substr($rsDestaque['IMG_Nome'],0,-4);
            
$idImg $rsDestaque['IMG_RowID'];
        }

    }
    else
    {
        
$hddAcao   "I";
        
$hddNoticia ""
        
        
$titulo                "";
        
$dt_inicio_publicacao  FormataData(date("Y-m-d"),"SCREEN");
        
$h_inicio_publicacao   date("H:i:s"); 
        
$dt_termino_publicacao "";   
        
$h_termino_publicacao  "";
        
$periodo_indefinidoSN  "";   
        
$hiperlink_externo     "";
        
$fonte                 "";
        
$novidadeSN            "";
        
$importanteSN          "";
        
$vis_homeSN            "";
        
$texto_resumido        ""
        
$texto_completo        "";  
        
$ativoSN               "";
    }                              
?>
<!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" />
    <!--[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>
    <link rel="stylesheet" href="http://dev.jquery.com/view/trunk/themes/flora/flora.datepicker.css" type="text/css" media="screen" title="Flora (Default)">
    <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/cnpj.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="noticia_cad.js"></script>
    <!-- TinyMCE -->


    <script type="text/javascript">



        function Caracteres(objeto){
        var limite = 140;
        var erro = "O limite de caracteres para o titulo é de 140 caracteres.";

        tamanho = objeto.value.length;
        if (tamanho>limite) {
            objeto.value = objeto.value.substring(0,limite);
            alert(erro);
        }
}

    </script>
    <!-- /TinyMCE -->
    <script type="text/javascript">
        $(function() {
            if ('<?= $destaque?>' == 'S') {
                $('#dstq').attr('checked',true);
                destaque(true);
            }
            if ('<?= $idImg?>' != '' && '<?= $nmImg?>' != '') {
                vincula('<?= $idImg?>','<?= $nmImg?>');
            }
            if ('<?= $tipoFonte?>' != '') {
                $("#rdgFonteNoticia<?= $tipoFonte?>").trigger('click');
            }
        });
        function destaque(status) {
            if ($('#dstq').is(':checked')) {
                $('#imagens_destaque').slideDown('fast');
            } else {
                $('#imagens_destaque').slideUp('fast');
            }
        }
        function vincula(id,nome) {
            $('#nomeIMG').attr('value',nome);
            $('#idIMG').attr('value',id);
            $('.imgVinc').css('border','none');
            $('#'+nome).css('border','2px solid #F00');
        }
        
    </script>                                         
    <style type="text/css">
<!--
.style1 {
    color: #666666;
    font-weight: bold;
}
-->
</style>
</head>
<body>
    <div id="wrap">
    
        <?php include "../topo_gestao.php";?>
        
        <div id="header-photo">
        </div>
        <!-- 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>CADASTRO DE NOTÍCIAS</h2>
                                    <div id="linha_h2" >
                                    </div> 
                                    <form action="noticia_grava.php" method="post" name="frmCadastroNoticia" id="frmCadastroNoticia" enctype="multipart/form-data" onsubmit="return ValidaFormulario();">
                                        <input type="hidden" name="hddAcao" id="hddAcao" value="<?=  $hddAcao;?>" />
                                        <input type="hidden" name="hddNoticia" id="hddNoticia" value="<?=  $hddNoticia;?>" />
                                        <table width="98%" border="0">     
                                            <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="23%" align="right" valign="top">
                                                    T&iacute;tulo <span class="obrigatorio">*</span>:
                                                </td>
                                                <td align="left" valign="top">
                                                    <textarea name="txtTitulo" id="txtTitulo" cols="80" rows="2"
                                                    onblur=Caracteres(this) onkeydown=Caracteres(this) onkeyup=Caracteres(this)><?=  $titulo;?></textarea>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td align="right" valign="top">
                                                    Fonte da Notícia:   
                                                </td>
                                                <td align="left" valign="top">
                                                    <input type="radio" name="rdgFonteNoticia" id="rdgFonteNoticiaO" value="O"  <?= ($tipoFonte == 'O' || $tipoFonte == '') ? 'checked="checked"' '' ?> />
                                                    Outros
                                                    <input type="radio" name="rdgFonteNoticia" id="rdgFonteNoticiaP" value="P" <?= ($tipoFonte == 'P') ? 'checked="checked"' '' ?>/>
                                                    IRPEN
                                                </td>
                                            </tr>

                                            <tr id="check_hiperlink_externo">
                                                <td align="right" valign="top">&nbsp;

                                                </td>
                                                <td align="left" valign="top" colspan="2">
                                                    <input type="checkbox" name="ckbDirecionaHiperlinkSN" id="ckbDirecionaHiperlinkSN" value="S" <?php if($hiperlink_externo != "") echo "checked"?> /> Direcionar para hiperlink externo
                                                </td>
                                            </tr>

                                            <tr id="hiperlink_externo">
                                                <td align="right" valign="top">
                                                    Hiperlink <span class="obrigatorio">*</span>:
                                                </td>
                                                <td align="left" valign="top">
                                                    <input name="txtHiperlinkExterno" type="text" id="txtHiperlinkExterno" size="50" value="<?=  $hiperlink_externo;?>" />
                                                </td>
                                            </tr>
                                            <tr id="fonte">
                                                <td width="23%" align="right" valign="top">
                                                    Fonte:
                                                </td>
                                                <td align="left" valign="top">
                                                    <input name="txtFonte" type="text" id="txtFonte" size="80" value="<?=  $fonte;?>" />
                                                </td>
                                            </tr>
                                            <tr>
                                                <td valign="top" colspan="2">
                                                    <fieldset>
                                                        <legend>Notícia Resumida (Chamada)</legend>
                                                        <p>
                                                            Descreva resumidamente do que se trata a notícia. Esta chamada será mostrada sob o título da notícia.
                                                        </p>
                                                        <?php
                                                          $oFCKeditor 
= new FCKeditor('txtTextoResumido') ;
                                                          
$oFCKeditor->BasePath '../../lib/fckeditor/' ;
                                                          
$oFCKeditor->Value $texto_resumido;
                                                          
$oFCKeditor->Create() ;
                                                        
?>
                                                    </fieldset>
                                                </td>
                                            </tr>
                                            <tr id="texto_completo">
                                                <td valign="top" colspan="2">           
                                                    <fieldset>
                                                        <legend>Texto Completo da Notícia</legend>
                                                        <?php
                                                          $oFCKeditor 
= new FCKeditor('txtTextoCompleto') ;
                                                          
$oFCKeditor->BasePath '../../lib/fckeditor/' ;
                                                          
$oFCKeditor->Value $texto_completo;
                                                          
$oFCKeditor->Create() ;
                                                        
?>
                                                    </fieldset>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td valign="top" colspan="2">
                                                    <fieldset id="noticia_periodo">
                                                        <legend>Per&iacute;odo de Publica&ccedil;&atilde;o<span class="obrigatorio"> *</span></legend>   
                                                        <input type="checkbox" name="ckbPeriodoIndefinidoSN" id="ckbPeriodoIndefinidoSN" value="S" <?php if($periodo_indefinidoSN == "S") echo "checked"?> /> Período Indefinido                                             
                                                        <br />
                                                        <fieldset id="inicio">
                                                            <legend>Início</legend>
                                                            Data: <input name="txtDtInicioPublicacao" type="text" id="txtDtInicioPublicacao" size="12" value="<?=  $dt_inicio_publicacao;?>" /> 
                                                            <br />
                                                            Hora: <input name="txtHInicioPublicacao" type="text" id="txtHInicioPublicacao" size="10" value="<?=  $h_inicio_publicacao;?>" />
                                                        </fieldset>  
                                                        <fieldset id="termino">
                                                            <legend>T&eacute;rmino</legend>
                                                            Data: <input name="txtDtTerminoPublicacao" type="text" id="txtDtTerminoPublicacao" size="12" value="<?=  $dt_termino_publicacao;?>" /> 
                                                            <br />
                                                            Hora: <input name="txtHTerminoPublicacao" type="text" id="txtHTerminoPublicacao" size="10" value="<?=  $h_termino_publicacao;?>" />                                       
                                                        </fieldset>
                                                    </fieldset>
                                                    <fieldset id="noticia_opcoes" style="width: 455px;"> 
                                                        <legend>Opções</legend>
                                                        <input name="ckbNovidadeSN"id="ckbNovidadeSN" type="checkbox" value="S" <?php if($novidadeSN == "S") echo "checked"?> />  
                                                        Destacar como novidade?    
                                                        <br />    
                                                        <input name="ckbImportanteSN" id="ckbImportanteSN" type="checkbox" value="S" <?php if($importanteSN == "S") echo "checked"?> />  
                                                        Destacar como importante?    
                                                        <br />
                                                        <input name="ckbVisHomeSN" id="ckbVisHomeSN" type="checkbox" value="S" <?php if($vis_homeSN == "S") echo "checked"?> />
                                                        Visualizar na página principal?
                                                        <br />
                                                        <input type="checkbox" name="ckbcheck_twitter" id="ckbcheck_twitter" value="S"
                                                         <?php if($ckbcheck_twitter == "S") echo "checked"?> /> Publicar titulo no twitter
                                                         <br />
                                                        <input type="checkbox" name="chkNoticiaGeral" id="chkNoticiaGeral" value="S"
                                                         <?php if($chkNoticiaGeral == "S") echo "checked"?> /> Exibir Notícia para o Público em Geral (Sem efetuar Login e Senha)
                                                    </fieldset>
                                                  <fieldset id="notica_destaque">
                                                       <legend>Destaque</legend>
                                                       <input name="dstq" type="checkbox" id="dstq" onclick="destaque(this.status)" value="1" />
                                                        <label for="dstq">Marcar notícia como destaque</label>
                                                        <div id="imagens_destaque" style="display:none; overflow:hidden;">
                                                        Vincular à imagem: <input type="text" name="nomeIMG" id="nomeIMG" readonly="readonly" /><input type="hidden" name="idIMG" id="idIMG" value="" /><br />Clique na imagem abaixo para vincular a notícia.<br />
                                                        <?php
                                                            $sqlBuscaIMGS 
"
                                                                SELECT *
                                                                FROM imagens
                                                                WHERE IMG_AtivoSN = 'S'
                                                                ORDER BY IMG_RowID
                                                            "
;
                                                            
$exeBuscaIMGS $conexao->query($sqlBuscaIMGS);
                                                            
$totIMG mysqli_num_rows($exeBuscaIMGS);
                                                            while (
$rsBuscaIMGS mysqli_fetch_assoc($exeBuscaIMGS)) {
                                                                
$nomeImagem substr($rsBuscaIMGS['IMG_Nome'],0,-4);
                                                                
?>
                                              <div style="width:100px; height:100px; float:left; margin:2px 5px; text-align:center;">
                                                                <img src="imagens/<?= $rsBuscaIMGS['IMG_Nome']?>" name="<?= $nomeImagem?>" id="<?= $nomeImagem?>" alt="<?= $nomeImagem?>" title="<?= $rsBuscaIMGS['IMG_Nome']?>" width="100" onclick="vincula('<?= $rsBuscaIMGS['IMG_RowID']?>','<?= $nomeImagem?>');" class="imgVinc" /><?= $nomeImagem?>
                                                                </div>
                                                                <?php
                                                            
}
                                                            echo 
$totIMG;
                                                            if (
$totIMG <= 500) {
                                                        
?>
                                                        <br />
                                                        <strong>OU</strong><br />
                                                        Cadastrar nova imagem:
                                                        <input type="file" name="imagem" id="imagem" />
                                                        <?php ?>
                                                        </div>
                                                    </fieldset>
                                                </td>
                                            </tr>
                                            <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";
                                                        
?>
                                                                
                                                        <?php 
                                                    
}
                                                    else
                                                    {
                                                        
$btnConfirmar "Alterar";
                                                        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.0052 ]--