Example #1
0
 public function process()
 {
     if (!parent::process()) {
         return false;
     }
     $this->assignModules($this->moduleList);
     $this->view->addJsLangVars(array('detailsHeadline' => $this->lang->translate('MODULES_LIST_INFORMATIONS')));
     $this->view->addJsVars(array('fpcmJqUploadInit' => 0));
     $this->view->setViewJsFiles(array(\fpcm\classes\baseconfig::$jsPath . 'modulelist.js', \fpcm\classes\baseconfig::$jsPath . 'filemanager.js'));
     if (!$this->permissions->check(array('modules' => 'install'))) {
         unset($this->moduleActions[$this->lang->translate('MODULES_LIST_INSTALL')], $this->moduleActions[$this->lang->translate('MODULES_LIST_UPDATE')]);
     }
     if (!$this->permissions->check(array('modules' => 'uninstall'))) {
         unset($this->moduleActions[$this->lang->translate('MODULES_LIST_UNINSTALL')]);
     }
     if (!$this->permissions->check(array('modules' => 'enable'))) {
         unset($this->moduleActions[$this->lang->translate('MODULES_LIST_ENABLE')], $this->moduleActions[$this->lang->translate('MODULES_LIST_DISABLE')]);
     }
     $this->view->assign('moduleManagerMode', true);
     if (!\fpcm\classes\baseconfig::canConnect()) {
         unset($this->moduleActions[$this->lang->translate('MODULES_LIST_INSTALL')], $this->moduleActions[$this->lang->translate('MODULES_LIST_UPDATE')]);
         $this->view->assign('moduleManagerMode', false);
     }
     $translInfo = array('{{filecount}}' => 1, '{{filesize}}' => \fpcm\classes\tools::calcSize(\fpcm\classes\baseconfig::uploadFilesizeLimit(true), 0));
     $this->view->assign('maxFilesInfo', $this->lang->translate('FILE_LIST_PHPMAXINFO', $translInfo));
     $this->view->assign('actionPath', \fpcm\classes\baseconfig::$rootPath . $this->getControllerLink('modules/list'));
     $this->view->assign('moduleActions', $this->moduleActions);
     $this->view->render();
 }
Example #2
0
 /**
  * Controller-Processing
  */
 public function process()
 {
     if (!parent::process()) {
         return false;
     }
     $fileList = new \fpcm\model\files\imagelist();
     $page = $this->getRequestVar('page', array(9));
     $list = $fileList->getDatabaseList($this->config->file_list_limit, \fpcm\classes\tools::getPageOffset($page, $this->config->file_list_limit));
     $pagerData = \fpcm\classes\tools::calcPagination($this->config->file_list_limit, $page, $fileList->getDatabaseFileCount(), count($list));
     $list = $this->events->runEvent('reloadFileList', $list);
     $userList = new \fpcm\model\users\userList();
     $this->initViewAssigns($list, $userList->getUsersAll(), $pagerData);
     $this->initPermissions();
     $this->view->initAssigns();
     $this->view->render();
 }
Example #3
0
 /**
  * Seitenvaigation erzeugen
  */
 protected function initPagination()
 {
     $this->view->assign('backBtn', false);
     $this->view->assign('nextBtn', false);
     $this->view->assign('listActionLimit', '');
     $page = $this->getRequestVar('page', array(9));
     $pagerData = \fpcm\classes\tools::calcPagination($this->listShowLimit, $page, $this->articleCount, count($this->articleItems));
     $this->listShowStart = \fpcm\classes\tools::getPageOffset($page, $this->listShowLimit);
     $this->view->assign('showPager', true);
     foreach ($pagerData as $key => $value) {
         $this->view->assign($key, $value);
     }
     $this->view->addJsVars(array('fpcmCurrentModule' => $this->getRequestVar('module')));
 }
Example #4
0
 /**
  * Controller-Processing
  * @return boolean
  */
 public function process()
 {
     if (!parent::process()) {
         return false;
     }
     $this->view->assign('replacementsArticle', $this->getReplacementTranslations('TEMPLATE_ARTICLE_', $this->articleTemplate->getReplacementTags()));
     $this->view->assign('contentArticle', $this->articleTemplate->getContent());
     if ($this->config->articles_template_active != $this->config->article_template_active) {
         $this->view->assign('replacementsArticleSingle', $this->getReplacementTranslations('TEMPLATE_ARTICLE_', $this->articleSingleTemplate->getReplacementTags()));
         $this->view->assign('contentArticleSingle', $this->articleSingleTemplate->getContent());
     }
     $this->view->assign('replacementsComment', $this->getReplacementTranslations('TEMPLATE_COMMMENT_', $this->commentTemplate->getReplacementTags()));
     $this->view->assign('contentComment', $this->commentTemplate->getContent());
     $this->view->assign('replacementsCommentForm', $this->getReplacementTranslations('TEMPLATE_COMMMENTFORM_', $this->commentFormTemplate->getReplacementTags()));
     $this->view->assign('contentCommentForm', $this->commentFormTemplate->getContent());
     $this->view->assign('replacementsLatestNews', $this->getReplacementTranslations('TEMPLATE_ARTICLE_', $this->latestNewsTemplate->getReplacementTags()));
     $this->view->assign('contentLatestNews', $this->latestNewsTemplate->getContent());
     $this->view->assign('replacementsTweet', $this->getReplacementTranslations('TEMPLATE_ARTICLE_', $this->tweetTemplate->getReplacementTags()));
     $this->view->assign('contentTweet', $this->tweetTemplate->getContent());
     $this->view->assign('allowedTags', htmlentities($this->articleTemplate->getAllowedTags(', ')));
     $this->view->addJsVars(array('fpcmTemplateId' => 1, 'fpcmJqUploadInit' => 0));
     $this->view->addJsLangVars(array('previewHeadline' => $this->lang->translate('HL_TEMPLATE_PREVIEW')));
     $tplfilelist = new \fpcm\model\files\templatefilelist();
     $this->view->assign('templateFiles', $tplfilelist->getFolderObjectList());
     $this->view->setViewJsFiles(array(\fpcm\classes\baseconfig::$jsPath . 'filemanager.js', \fpcm\classes\baseconfig::$jsPath . 'templates.js'));
     $translInfo = array('{{filecount}}' => 1, '{{filesize}}' => \fpcm\classes\tools::calcSize(\fpcm\classes\baseconfig::uploadFilesizeLimit(true), 0));
     $this->view->assign('maxFilesInfo', $this->lang->translate('FILE_LIST_PHPMAXINFO', $translInfo));
     $this->view->assign('actionPath', \fpcm\classes\baseconfig::$rootPath . $this->getControllerLink('modules/list'));
     $this->view->render();
 }
    <tr class="fpcm-td-spacer"><td></td></tr>
    <?php 
foreach ($templateFiles as $templateFile) {
    ?>
    <tr>
        <td class="fpcm-ui-editbutton-col fpcm-ui-center"><?php 
    \fpcm\model\view\helper::linkButton($templateFile->getFileUrl(), 'GLOBAL_DOWNLOAD', '', 'fpcm-ui-button-blank fpcm-download-btn', '_blank');
    ?>
</td>
        <td><?php 
    print $templateFile->getFilename();
    ?>
</td>
        <td><?php 
    print \fpcm\classes\tools::calcSize($templateFile->getFilesize());
    ?>
</td>
        <td class="fpcm-td-select-row"><?php 
    fpcm\model\view\helper::checkbox('deltplfiles[]', 'fpcm-list-selectbox', base64_encode($templateFile->getFilename()), '', '', false);
    ?>
</td>
    </tr>
    <?php 
}
?>

    <tr class="fpcm-td-spacer"><td colspan="3"></td></tr>
</table>

<p><?php 
Example #6
0
 public function process()
 {
     if (!parent::process()) {
         return false;
     }
     $loadAjax = $this->fileList->getDatabaseFileCount() >= 1 ? true : false;
     $this->view->assign('loadAjax', $loadAjax);
     $this->view->addJsVars(array('fpcmBaseUrl' => \fpcm\classes\baseconfig::$rootPath, 'fpcmFmgrMode' => $this->mode, 'fpcmEditorType' => $this->config->system_editor, 'fpcmJqUploadInit' => $this->config->file_uploader_new));
     $this->view->addJsLangVars(array('newNameMsg' => $this->lang->translate('FILE_LIST_RENAME_NEWNAME')));
     $this->view->assign('newUploader', $this->config->file_uploader_new);
     $this->view->assign('jquploadPath', \fpcm\classes\loader::libGetFileUrl('jqupload'));
     $this->view->setViewJsFiles(array(\fpcm\classes\baseconfig::$jsPath . 'filemanager.js'));
     if ($this->config->file_uploader_new) {
         $this->view->assign('actionPath', \fpcm\classes\baseconfig::$rootPath . $this->getControllerLink('ajax/jqupload'));
     } else {
         $this->view->assign('actionPath', \fpcm\classes\baseconfig::$rootPath . $this->getControllerLink('files/list', array('mode' => $this->mode)));
         $translInfo = array('{{filecount}}' => ini_get("max_file_uploads"), '{{filesize}}' => \fpcm\classes\tools::calcSize(\fpcm\classes\baseconfig::uploadFilesizeLimit(true), 0));
         $this->view->assign('maxFilesInfo', $this->lang->translate('FILE_LIST_PHPMAXINFO', $translInfo));
     }
     $this->initViewAssigns(array(), array(), \fpcm\classes\tools::calcPagination(1, 1, 0, 0));
     $this->initPermissions();
     $this->view->render();
 }
Example #7
0
 /**
  * CLI: Cache Aktionen durchführen
  * @return bool
  */
 public function processCache()
 {
     if (!isset($this->funcParams[1])) {
         $this->output('Invalid params detected, missing cache name or param "all"!');
         return true;
     }
     $cacheName = $this->funcParams[1] === 'all' ? null : $this->funcParams[1];
     $cacheModule = !isset($this->funcParams[2]) || $this->funcParams[2] === 'all' ? '' : $this->funcParams[2];
     $cache = new \fpcm\classes\cache($cacheName, $cacheModule);
     if ($this->funcParams[0] === self::FPCMCLI_PARAM_CLEAN) {
         $cache->cleanup($cacheName === null ? false : $cacheName, $cacheModule);
         $this->output('Cache was cleared!');
         return true;
     }
     if ($this->funcParams[0] === self::FPCMCLI_PARAM_INFO) {
         $this->output('Cache expiration interval: ' . date('Y-m-d H:i:s', $cache->getExpirationTime()));
         $this->output('Cache is expired: ' . (int) $cache->isExpired());
         return true;
     }
     if ($this->funcParams[0] === self::FPCMCLI_PARAM_SIZE) {
         $this->output('Cache total size: ' . \fpcm\classes\tools::calcSize($cache->getSize()));
         return true;
     }
     if ($this->funcParams[0] === self::FPCMCLI_PARAM_LIST) {
         $this->output('Cache structur: ');
         $this->output($cache->getCacheComplete());
         return true;
     }
 }
Example #8
0
 /**
  * Cache-Statistiken berechnen
  */
 protected function getCacheStats()
 {
     $folderSize = \fpcm\classes\tools::calcSize($this->cache->getSize());
     $this->tableContent[] = '<tr><td><strong>' . $this->language->translate('SYSTEM_STATS_CACHE_SIZE') . ':</strong></td><td class="fpcm-ui-center">' . $folderSize . '</td></tr>';
 }
Example #9
0
                    </tr>
                    <?php 
fpcm\model\view\helper::notFoundContainer($folderList, 2);
?>
                    
                    <tr class="fpcm-td-spacer"><td></td></tr>
                    <?php 
foreach ($folderList as $value) {
    ?>
                    <tr>
                        <td class="fpcm-ui-editbutton-col fpcm-ui-center"><?php 
    \fpcm\model\view\helper::linkButton(fpcm\classes\baseconfig::$rootPath . 'index.php?module=system/backups&save=' . str_rot13(base64_encode($value)), 'GLOBAL_DOWNLOAD', '', 'fpcm-ui-button-blank fpcm-download-btn', '_blank');
    ?>
</td>
                        <td><?php 
    print basename($value);
    ?>
</td>
                        <td><?php 
    print \fpcm\classes\tools::calcSize(filesize($value));
    ?>
</td>
                    </tr>
                    <?php 
}
?>
                </table>
            </div>
        </div>    
    </form>
</div>
Example #10
0
 /**
  * Create controller link
  * @param string $controller
  * @param array $params
  * @return string
  */
 protected function getControllerLink($controller = '', array $params = array())
 {
     return \fpcm\classes\tools::getControllerLink($controller, $params);
 }
Example #11
0
                        <td><strong><?php 
    $FPCM_LANG->write('FILE_LIST_UPLOAD_BY');
    ?>
:</strong></td>
                        <td><?php 
    print isset($users[$file->getUserid()]) ? $users[$file->getUserid()]->getDisplayName() : $FPCM_LANG->translate('GLOBAL_NOTFOUND');
    ?>
</td>                    
                    </tr>
                    <tr>
                        <td><strong><?php 
    $FPCM_LANG->write('FILE_LIST_FILESIZE');
    ?>
:</strong></td>
                        <td><?php 
    print \fpcm\classes\tools::calcSize($file->getFilesize());
    ?>
</td>                    
                    </tr>
                    <tr>
                        <td><strong><?php 
    $FPCM_LANG->write('FILE_LIST_RESOLUTION');
    ?>
:</strong></td>
                        <td><?php 
    print $file->getWidth();
    ?>
 <span class="fa fa-times fa-fw"></span> <?php 
    print $file->getHeight();
    ?>
 <?php 
Example #12
0
 /**
  * Gibt Direkt-Link zum Artikel zurück
  * @return string
  */
 public function getArticleLink()
 {
     $idParam = $this->config->articles_link_urlrewrite ? $this->getArticleNicePath() : $this->getId();
     if (!$this->config->system_mode) {
         return \fpcm\classes\baseconfig::$rootPath . \fpcm\classes\tools::getControllerLink('fpcm/article', array('id' => $idParam));
     }
     return $this->config->system_url . '?module=fpcm/article&id=' . $idParam;
 }