/var
/www
/vhosts
/h551219.linp047.arubabusiness.it
/aarteinvernizzi.it
/private
/aarte
/libraries
/Appuntamenti.php
{
$this->queryBuilder->table('v_appuntamenti_frontend');
$this->queryBuilder->fields(['slug_' . $this->language, 'titolo_' . $this->language, 'data_' . $this->language, 'immagine']);
$this->queryBuilder->orderBy('data', 'ASC');
//get
$records = $this->queryBuilder->get();
foreach($records as $record) {
$this->extractFile($record, 'immagine', 'middle');
}
return $records;
}
/**
* Gets selected appuntamento
*/
private function getAppuntamento()
{
$this->templateParameters['appuntamento'] = current($this->queryBuilder->table($this->dbView)->where('slug_' . $this->language, $this->routeParameters['appuntamento'])->get());
$this->templateParameters['itemActions'] = [];
$this->templateParameters['pageTitle'] = $this->templateParameters['appuntamento']->{'titolo_' . $this->language} . ' ' .$this->templateParameters['appuntamento']->{'data_' . $this->language} . ' - ' . $this->translations['frontend']['navigation'][$this->subject];
}
/**
* Displays frontend list
*/
protected function execListFrontend()
{
$this->templateParameters['appuntamenti'] = $this->getListFrontend();
$this->renderTemplate();
}
/**
* Displays frontend dettaglio
*/
protected function execDettaglio()
{
$this->getAppuntamento();
$this->extractFile($this->templateParameters['appuntamento'], 'immagine', 'full');
$this->renderTemplate();
}
/var
/www
/vhosts
/h551219.linp047.arubabusiness.it
/aarteinvernizzi.it
/private
/aarte
/libraries
/Appuntamenti.php
{
$this->queryBuilder->table('v_appuntamenti_frontend');
$this->queryBuilder->fields(['slug_' . $this->language, 'titolo_' . $this->language, 'data_' . $this->language, 'immagine']);
$this->queryBuilder->orderBy('data', 'ASC');
//get
$records = $this->queryBuilder->get();
foreach($records as $record) {
$this->extractFile($record, 'immagine', 'middle');
}
return $records;
}
/**
* Gets selected appuntamento
*/
private function getAppuntamento()
{
$this->templateParameters['appuntamento'] = current($this->queryBuilder->table($this->dbView)->where('slug_' . $this->language, $this->routeParameters['appuntamento'])->get());
$this->templateParameters['itemActions'] = [];
$this->templateParameters['pageTitle'] = $this->templateParameters['appuntamento']->{'titolo_' . $this->language} . ' ' .$this->templateParameters['appuntamento']->{'data_' . $this->language} . ' - ' . $this->translations['frontend']['navigation'][$this->subject];
}
/**
* Displays frontend list
*/
protected function execListFrontend()
{
$this->templateParameters['appuntamenti'] = $this->getListFrontend();
$this->renderTemplate();
}
/**
* Displays frontend dettaglio
*/
protected function execDettaglio()
{
$this->getAppuntamento();
$this->extractFile($this->templateParameters['appuntamento'], 'immagine', 'full');
$this->renderTemplate();
}
/var
/www
/vhosts
/h551219.linp047.arubabusiness.it
/aarteinvernizzi.it
/private
/aarte
/libraries
/Appuntamenti.php
$this->templateParameters['appuntamento'] = current($this->queryBuilder->table($this->dbView)->where('slug_' . $this->language, $this->routeParameters['appuntamento'])->get());
$this->templateParameters['itemActions'] = [];
$this->templateParameters['pageTitle'] = $this->templateParameters['appuntamento']->{'titolo_' . $this->language} . ' ' .$this->templateParameters['appuntamento']->{'data_' . $this->language} . ' - ' . $this->translations['frontend']['navigation'][$this->subject];
}
/**
* Displays frontend list
*/
protected function execListFrontend()
{
$this->templateParameters['appuntamenti'] = $this->getListFrontend();
$this->renderTemplate();
}
/**
* Displays frontend dettaglio
*/
protected function execDettaglio()
{
$this->getAppuntamento();
$this->extractFile($this->templateParameters['appuntamento'], 'immagine', 'full');
$this->renderTemplate();
}
}
/var
/www
/vhosts
/h551219.linp047.arubabusiness.it
/aarteinvernizzi.it
/private
/aarte
/libraries
/vendor
/phpcraft
/subject
/src
/Subject.php
* @param string $pathToIniFile file path into private/application-name/curent-language/
* @throws InvalidArgumentException if file is not found
**/
public function addApplicationTranslations($key, $pathToIniFile)
{
$path = sprintf('private/%s/locales/%s/%s', $this->application, $this->language, $pathToIniFile);
$this->addTranslations($key, $path);
}
/**
* tries to exec current action
* @throws Exception if there is no method defined to handle action
**/
public function execAction()
{
try {
$this->templateParameters['area'] = $this->area;
$this->templateParameters['areaAuthentication'] = $this->areaAuthentication;
$this->getBackPaths();
$this->{'exec'.ucfirst($this->sanitizeAction($this->action))}();
} catch(Exception $exception) {
throw new Exception(sprintf('no method for handling %s %s %s', $this->area, $this->subject, $this->action));
}
}
/**
* Stores a path to turn back lately
**/
public function execBackPath()
{
$arguments = array(
'backId' => FILTER_SANITIZE_STRING,
'backPath' => array(
'filter' => FILTER_SANITIZE_URL,
'flags' => FILTER_FLAG_PATH_REQUIRED
),
'backLabel' => FILTER_SANITIZE_STRING,
);
$input = filter_input_array(INPUT_POST, $arguments);
$this->cookie->set('backPaths[' . $input['backId'] . '][path]', $input['backPath']);
/var
/www
/vhosts
/h551219.linp047.arubabusiness.it
/aarteinvernizzi.it
/private
/aarte
/libraries
/vendor
/phpcraft
/subject
/src
/SubjectWithCRUD.php
$this->message = $message;
$this->message->setCookie($cookie);
$this->csv = $csv;
$this->dbTable = $dbTable;
$this->dbView = $dbView;
$this->primaryKey = $primaryKey;
$this->postedFieldsDefinition = $postedFieldsDefinition;
$this->exportFields = $exportFields;
}
/**
* Tries to exec current action
*
* @throws Exception if there is no method defined to handle action
**/
public function execAction()
{
$this->templateParameters['primaryKey'] = $this->primaryKey;
$this->templateParameters['sideMenuOpenend'] = $this->isSideMenuOpened();
parent::execAction();
}
/**
* gets list for the table
*
* @param array $fields to be selected
*/
abstract protected function getList($fields = array());
/**
* Displays list table
*/
protected function execList()
{
//get records
$this->templateParameters['records'] = $this->getList();
// form translations
$this->addTranslations('list', sprintf('private/global/locales/%s/list.ini', $this->language));
//render
$this->renderTemplate();
/var
/www
/vhosts
/h551219.linp047.arubabusiness.it
/aarteinvernizzi.it
/private
/aarte
/libraries
/Appuntamenti.php
'url' => implode('', $this->pathToSubject) . 'list',
'action' => 'list',
'label' => $this->translations[$this->area]['operations']['list'] . ' ' . $this->translations[$this->subject]['plural']
],
[
'url' => implode('', $this->pathToSubject) . 'insertForm',
'action' => 'insertForm',
'label' => $this->translations[$this->area]['operations']['do_insert'] . ' ' . $this->translations[$this->subject]['singular']
]
]);
if(isset($this->routeParameters['key'])) {
$this->templateParameters['key'] = $this->routeParameters['key'];
}
$this->templateParameters['pageTitle'] = $this->translations[$this->subject]['subject_name'];
break;
case 'frontend':
$this->templateParameters['pageTitle'] = $this->translations['frontend']['navigation'][$this->subject];
break;
}
parent::execAction();
}
/**
* Sets uploadField definitions
* @param array $uploadFieldsDefinitions indexed by field names
**/
protected function setUploadFieldsDefinitions()
{
$uploadFieldsDefinitions = [
'immagine' => [
'validations' => [
[
'type' => 'image',
'options' => [
'allowed' => ['jpg','png'],
],
'message' => $this->translations['form']['upload']['validation_file_images']
]
],
/var
/www
/vhosts
/h551219.linp047.arubabusiness.it
/aarteinvernizzi.it
/private
/aarte
/procedures
/bootstrap.php
if(!in_array(LANGUAGE, $configuration['languages'])) throw new Exception("language not into configured languages");
//load specific area configuration and procedure if needed
if($configuration['areas'][AREA]['configuration']) {
require sprintf('private/%s/configurations/%s.php', APPLICATION, AREA);
}
if($configuration['areas'][AREA]['procedure']) {
require sprintf('private/%s/procedures/%s.php', APPLICATION, AREA);
}
//require subject procedure
$subject = require sprintf('private/%s/procedures/%s/%s.php', APPLICATION, AREA, SUBJECT);
if($subjectHasClass) {
//load specific application and area translations if needed
if($configuration['locale']) {
$subject->addApplicationTranslations('application', 'application.ini');
}
if($configuration['areas'][AREA]['locale']) {
$subject->addApplicationTranslations(AREA, sprintf('%s.ini', AREA));
}
//subject action
$subject->execAction();
}
} else {
}
//output
// set headers
//r($http->response->getHeaders());
foreach ($http->response->getHeaders() as $name => $values) {
foreach ($values as $value) {
@header(sprintf('%s: %s', $name, $value), false);
}
}
//check status code
switch($http->response->getStatusCode()) {
case 200:
break;
default:
@header($_SERVER["SERVER_PROTOCOL"]." " . $http->response->getStatusCode());
break;
}
// output body
/var
/www
/vhosts
/h551219.linp047.arubabusiness.it
/aarteinvernizzi.it
/index.php
<?php
ini_set("display_errors", 1);
error_reporting(E_ALL);
//application name and namesapce
define('APPLICATION','aarte');
define('APPLICATION_NAMESPACE','Aarte');
//bootstrap
require sprintf('private/%s/procedures/bootstrap.php', APPLICATION);