Example #1
0
 public function execute()
 {
     $siteProp = unserialize(org_glizy_Registry::get(__Config::get('REGISTRY_SITE_PROP') . $this->application->getEditingLanguage(), ''));
     if ($siteProp) {
         $this->view->setData($siteProp);
     }
 }
Example #2
0
 /**
  * @return array|mixed
  */
 static function getModulesState()
 {
     $pref = unserialize(org_glizy_Registry::get(__Config::get('BASE_REGISTRY_PATH') . '/modules', ''));
     if (empty($pref)) {
         $pref = array();
     }
     return $pref;
 }
 public function render($application, $view, $templateData)
 {
     $templateData = $this->getTemplateDataFromCache($templateData);
     $siteProp = unserialize(org_glizy_Registry::get(__Config::get('REGISTRY_SITE_PROP') . $view->_application->getLanguage(), ''));
     $view->addOutputCode($templateData->css, 'css');
     $view->addOutputCode($siteProp['title'], 'siteTitle');
     $view->addOutputCode($siteProp['subtitle'], 'siteSubtitle');
     $this->fixTemplateName($view);
     $this->addCustomOutput($view, $templateData);
 }
Example #4
0
 function render($application, $view, $templateData)
 {
     $templateData = $this->getTemplateDataFromCache($templateData);
     $siteProp = unserialize(org_glizy_Registry::get(__Config::get('REGISTRY_SITE_PROP') . $view->_application->getLanguage(), ''));
     $view->addOutputCode($templateData->css, 'css');
     $view->addOutputCode($siteProp['title'], 'siteTitle');
     $view->addOutputCode($siteProp['subtitle'], 'siteSubtitle');
     if ($templateData->footerLogo) {
         $view->addOutputCode($templateData->footerLogo, 'logoFooter');
     }
     $view->setAttribute('templateFileName', 'page.php');
 }
Example #5
0
 public static function getSiteTemplatePath()
 {
     $templateName = org_glizy_Registry::get(__Config::get('REGISTRY_TEMPLATE_NAME'), '');
     if (empty($templateName)) {
         $templateName = __Config::get('glizycms.template.default');
     }
     $templatePath = __Paths::get('TEMPLATE_FOLDER');
     if (empty($templatePath)) {
         // TODO verificare perché il path è sbagliato ed è necessartio mettere ../
         $templatePath = __Paths::get('APPLICATION_STATIC') . 'templates/';
     }
     $templatePath .= $templateName;
     return '../' . $templatePath;
 }
Example #6
0
 public function execute()
 {
     if (method_exists($this->view, 'setData')) {
         $siteProp = unserialize(org_glizy_Registry::get(__Config::get('REGISTRY_SITE_PROP') . $this->application->getLanguage(), ''));
         $lastUpdate = org_glizy_Registry::get('movio/modules/publishApp/lastUpdate');
         $data = new StdClass();
         $data->title = $siteProp['title'];
         $data->subtitle = $siteProp['subtitle'];
         if ($lastUpdate) {
             $data->lastUpdate = '<p>' . __T('Last exportation date') . ': ' . date(__T('GLZ_DATETIME_FORMAT') . '</p>', $lastUpdate);
         }
         $data->isExhibitionActive = 1;
         $it = org_glizy_ObjectFactory::createModelIterator('org.glizycms.core.models.Language')->load('getLanguageDictionary');
         $this->setComponentsAttribute('languages', 'rows', $it->count());
         $this->view->setData($data);
     }
 }
Example #7
0
 private function getData()
 {
     if (!$this->templateValues) {
         $this->templateValues = json_decode(org_glizy_Registry::get(__Config::get('REGISTRY_TEMPLATE_VALUES') . $this->getSelectedTemplate(), '{}'));
     }
 }
Example #8
0
 private function renderTemplateHeader($view, $templateData)
 {
     $siteProp = unserialize(org_glizy_Registry::get(__Config::get('REGISTRY_SITE_PROP') . $view->_application->getLanguage(), ''));
     $view->addOutputCode($siteProp['title'], 'title1');
     $view->addOutputCode($siteProp['subtitle'], 'title2');
     /*
     $view->addOutputCode(str_replace('../getImage.php', 'getImage.php', $templateData->title1), 'title1');
     $view->addOutputCode(str_replace('../getImage.php', 'getImage.php', $templateData->title2), 'title2');
     */
     $view->addOutputCode(str_replace('../getImage.php', 'getImage.php', $templateData->title3), 'title3');
     $view->addOutputCode(str_replace('../getImage.php', 'getImage.php', $templateData->title4), 'title4');
     $templateData->footerLogo = @json_decode($templateData->footerLogo);
     if ($templateData->footerLogo && $templateData->footerLogo->id) {
         $image = org_glizy_helpers_Media::getImageById($templateData->footerLogo->id);
         if ($templateData->footerLogoLink) {
             $image = __Link::formatLink($templateData->footerLogoLink, $templateData->footerLogoTitle, $image);
         }
         $view->addOutputCode($image, 'logoFooter');
     }
     $view->addOutputCode(org_glizy_helpers_CSS::CSScode($templateData->customCss), 'head');
 }
Example #9
0
 public static function getSharingButtonList()
 {
     return unserialize(org_glizy_Registry::get(__Config::get('BASE_REGISTRY_PATH') . self::REGISTRY_SHAREBUTTONS, ''));
 }
Example #10
0
<?php

require_once "core/core.inc.php";
$application = org_glizy_ObjectFactory::createObject('org.glizycms.core.application.Application', 'application');
org_glizy_Paths::addClassSearchPath('admin/application/classes/');
$application->runSoft();
$timestamp = __Request::get('timestamp');
$lastUpdate = org_glizy_Registry::get('movio/modules/publishApp/lastUpdate');
$result = array('updated' => $lastUpdate > $timestamp, 'lastUpdate' => $lastUpdate, 'fileSize' => @filesize(__Paths::getRealPath('BASE') . 'export/mobileContents.zip'), 'url' => GLZ_HOST . '/export/' . 'mobileContents.zip', 'checkUpdateUrl' => GLZ_HOST . '/checkUpdate.php');
header("Content-Type: application/json");
echo json_encode($result);
Example #11
0
 private function readSiteProperties()
 {
     $siteProp = unserialize(org_glizy_Registry::get(__Config::get('REGISTRY_SITE_PROP') . $this->getLanguage(), ''));
     if (!is_array($siteProp)) {
         // if the site properties are not defined
         // try to read the properties from default language
         $ar = org_glizy_ObjectFactory::createModel('org.glizycms.core.models.Language');
         $ar->language_isDefault = 1;
         $ar->find();
         $siteProp = org_glizy_Registry::get(__Config::get('REGISTRY_SITE_PROP') . $ar->language_code, '');
         org_glizy_Registry::set(__Config::get('REGISTRY_SITE_PROP') . $this->getLanguage(), $siteProp);
         $siteProp = unserialize($siteProp);
     }
     if (!is_array($siteProp)) {
         $siteProp = array();
     }
     $this->_siteProperty = $siteProp;
 }