Файловый менеджер - Редактировать - /var/www/vhosts/studiocol.dev1.mndrn.cloud/app/documents/_/documents.ctrl.php
Назад
<?php ### GYURAL ### /* ---------- documents ---------- Filename: /app/documents/_/documents.ctrl.php Version: 0.1 Author: Andrea Rufo <orangedropdesign@gmail.com> Date: 06/03/2015 */ class documentsCtrl extends standardController { var $index_tollerant = true; function __construct() { } function getIndex(){ Application('theme/_v/header', null, $app_data); Application('documents/_v/index', null, $app_data); Application('theme/_v/footer', null, $app_data); } function getCircolari(){ $app_data['cat'] = 'circolari'; $app_data['menu-active'] = 'circolari'; $app_data['title'] = 'Circolari'; Application('theme/_v/header', null, $app_data); Application('documents/_v/index', null, $app_data); Application('theme/_v/footer', null, $app_data); } function getModulistica(){ $app_data['cat'] = 'modulistica'; $app_data['menu-active'] = 'modulistica'; $app_data['title'] = 'Modulistica'; Application('theme/_v/header', null, $app_data); Application('documents/_v/index', null, $app_data); Application('theme/_v/footer', null, $app_data); } function getGet(){ if( Logged() ){ $doc = LoadClass('documents', 1)->get( $_GET['id'] ); // echo '<pre>'.print_r($doc, 1).'</pre>'; exit; header('location: '.$doc->doc); }else{ header('location: /pages/registrazione/notauth:1/doc:'.$_GET['id']); } } function ApiGets() { $args = array(); //categoria $args[] = array('categoria', $_REQUEST['cat']); //mese e anno if( $_REQUEST['mese'] > 0 ){ $m = $_REQUEST['mese']; $y = ( $_REQUEST['anno'] == '' ) ? date('Y') : $_REQUEST['anno']; $from = strtotime( 'first day of '.$y . '-' . $m ); $to = strtotime( 'last day of '. $y . '-' . $m ); $args[] = array('creationTime', '>=', $from); $args[] = array('creationTime', '<=', $to); } elseif( $_REQUEST['anno'] > 0 ){ $y = ( $_REQUEST['anno'] == '' ) ? date('Y') : $_REQUEST['anno']; $from = strtotime( 'first day of '.$y . '-01-01' ); $to = strtotime( 'last day of '. $y . '-01-01' ); $args[] = array('creationTime', '>=', $from); $args[] = array('creationTime', '<=', $to); } //titolo if( $_REQUEST['titolo'] != '' ){ $args[] = array('title', 'LIKE', '%'.$_REQUEST['titolo'].'%'); } // ordinamento $args[] = 'ORDER BY `creationTime` DESC'; //paginazione $arg_c = $args; $arg_c[] = 'COUNT'; $count = LoadClass('documents', 1)->filter_array( $arg_c ); $perPage = 30; $maxPage = ceil($count / $perPage); $currentPage = ($_REQUEST['p']) ? $_REQUEST['p'] : 1; $startItem = $perPage*($currentPage-1); $args[] = array('LIMIT', $startItem, $perPage); $items = LoadClass('documents', 1)->filter_array( $args ); return $items; } function ApiGet() { $documents = LoadClass('documents', 1); } function CtrlFileGet() { $doc = LoadClass('documents', 1)->get( $_GET['id'] ); header('location: '.$doc->doc); #$items = LoadClass('area', 1)->filter( array('to', Me()->id),array('id', $_REQUEST["id"]), 'ONE'); #return $items; # http://www.studio-coletta.it/api/area.get/id:3049 } } ?>
| ver. 1.4 |
Github
|
.
| PHP 8.2.5 | Генерация страницы: 0 |
proxy
|
phpinfo
|
Настройка