예제 #1
0
 /**
  * action index
  *
  * @return void
  */
 public function indexAction()
 {
     $allConfigs = \Sng\Recordsmanager\Utility\Config::getAllConfigs(2);
     if (empty($allConfigs)) {
         return null;
     }
     $this->currentConfig = $allConfigs[0];
     $this->setCurrentConfig();
     $this->buildCalendar();
     $query = $this->buildQuery();
     $query->setCheckPids(false);
     $query->setConfig($this->currentConfig);
     $query->setExportMode(true);
     $query->execQuery();
     $this->exportRecords($query);
     $this->view->assign('moreThanSeven', version_compare(TYPO3_version, '7.0.0', '>='));
     $this->view->assign('currentconfig', $this->currentConfig);
     $this->view->assign('arguments', $this->request->getArguments());
     $this->view->assign('menuitems', $allConfigs);
     if ($query->getNbRows() > 0) {
         $this->view->assign('headers', $query->getHeaders());
         $this->view->assign('rows', $query->getRows());
         $this->view->assign('exportmodes', $this->getExportUrls());
     }
 }
예제 #2
0
 /**
  * action index
  *
  * @return void
  */
 public function indexAction()
 {
     $allConfigs = \Sng\Recordsmanager\Utility\Config::getAllConfigs(1);
     if (empty($allConfigs)) {
         return null;
     }
     $this->currentConfig = $allConfigs[0];
     $this->setCurrentConfig();
     $arguments = $this->request->getArguments();
     $temp_sys_page = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Frontend\\Page\\PageRepository');
     $addWhere = ' AND ' . $GLOBALS['BE_USER']->getPagePermsClause(1) . ' ';
     $pids = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows('count(' . $this->currentConfig['sqltable'] . '.pid) as "nbrecords",' . $this->currentConfig['sqltable'] . '.pid,pages.title', $this->currentConfig['sqltable'] . ',pages', 'pages.uid=' . $this->currentConfig['sqltable'] . '.pid AND ' . $this->currentConfig['sqltable'] . '.deleted=0 ' . $addWhere . 'GROUP BY ' . $this->currentConfig['sqltable'] . '.pid ');
     $content = '';
     $pidsFind = array();
     $pidsAdmin = array();
     // All find PIDs
     if (count($pids) > 0) {
         foreach ($pids as $pid) {
             $rootline = $temp_sys_page->getRootLine($pid['pid']);
             $path = $temp_sys_page->getPathFromRootline($rootline, 30);
             $pidsFind[] = array('pid' => $pid['pid'], 'path' => $path, 'nbrecords' => $pid['nbrecords']);
         }
     }
     // Admin specified PIDs
     if ($this->currentConfig['insertdefaultpid'] != '') {
         $pids = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows('pages.uid,pages.title', 'pages', 'pages.deleted=0 AND pages.uid IN (' . $this->currentConfig['insertdefaultpid'] . ')' . $addWhere);
         if (count($pids) > 0) {
             foreach ($pids as $pid) {
                 $nb = count($GLOBALS['TYPO3_DB']->exec_SELECTgetRows('uid', $this->currentConfig['sqltable'] . '', 'pid=' . $pid['uid'] . ' AND deleted=0 '));
                 $rootline = $temp_sys_page->getRootLine($pid['uid']);
                 $path = $temp_sys_page->getPathFromRootline($rootline, 30);
                 $pidsAdmin[] = array('pid' => $pid['uid'], 'path' => $path, 'nbrecords' => $nb);
             }
         }
     }
     $this->view->assign('pidsfind', $pidsFind);
     $this->view->assign('pidsadmin', $pidsAdmin);
     $this->view->assign('currentconfig', $this->currentConfig);
     $this->view->assign('arguments', $arguments);
     $this->view->assign('menuitems', $allConfigs);
     $this->view->assign('returnurl', $this->getReturnUrl());
     // redirect to tce form
     if (!empty($arguments['create'])) {
         $this->redirectToForm($arguments['create']);
     }
 }
예제 #3
0
 /**
  * action index
  *
  * @return void
  */
 public function indexAction()
 {
     $allConfigs = \Sng\Recordsmanager\Utility\Config::getAllConfigs(0);
     if (empty($allConfigs)) {
         return null;
     }
     $this->currentConfig = $allConfigs[0];
     $this->setCurrentConfig();
     $query = $this->buildQuery();
     $query->execQuery();
     $this->view->assign('headers', $query->getHeaders());
     $this->view->assign('rows', $query->getRows());
     $this->view->assign('currentconfig', $this->currentConfig);
     $this->view->assign('arguments', $this->request->getArguments());
     $this->view->assign('menuitems', $allConfigs);
     $this->view->assign('returnurl', rawurlencode($this->getReturnUrl()));
     $this->view->assign('deleteurl', $this->getDeleteUrl());
     $this->view->assign('baseediturl', $this->getBaseEditUrl());
     $this->view->assign('disableFields', implode(',', \tx_recordsmanager_flexfill::getDiffFieldsFromTable($this->currentConfig['sqltable'], $this->currentConfig['sqlfieldsinsert'])));
 }