getNullDate(); $now = Factory::getDate(); echo '
'; if ($this->t['displayupload'] == 1) { ?>

t['catidfiles'] == 0 || $this->t['catidfiles'] == '') { echo '
'.Text::_('COM_PHOCADOWNLOAD_PLEASE_SELECT_CATEGORY_TO_BE_ABLE_TO_UPLOAD_FILES').'
'; } ?>
*/ ?>
t['listsfiles']['catid'] ?>
t['filesitems'] ); $rows = &$this->t['filesitems']; if (is_array($rows)) { foreach ($rows as $row) { // USER RIGHT - Delete (Publish/Unpublish) - - - - - - - - - - - // 2, 2 means that user access will be ignored in function getUserRight for display Delete button // because we cannot check the access and delete in one time $user = Factory::getUser(); $rightDisplayDelete = 0; $catAccess = PhocaDownloadAccess::getCategoryAccessByFileId((int)$row->id); if (!empty($catAccess)) { $rightDisplayDelete = PhocaDownloadAccess::getUserRight('deleteuserid', $catAccess->deleteuserid, 2, $user->getAuthorisedViewLevels(), $user->get('id', 0), 0); } // - - - - - - - - - - - - - - - - - - - - - - ?>"> '; if ($row->published == 1) { if ($rightDisplayDelete) { echo ''; //echo HTMLHelper::_('image', $this->t['pi'].'icon-publish.png', Text::_('COM_PHOCADOWNLOAD_PUBLISHED')); echo ''; echo ''; } else { //echo HTMLHelper::_('image', $this->t['pi'].'icon-publish-g.png', Text::_('COM_PHOCADOWNLOAD_PUBLISHED')); echo ''; } } if ($row->published == 0) { if ($rightDisplayDelete) { echo ''; //echo HTMLHelper::_('image', $this->t['pi'].'icon-unpublish.png', Text::_('COM_PHOCADOWNLOAD_UNPUBLISHED')); echo ''; echo ''; } else { //echo HTMLHelper::_('image', $this->t['pi'].'icon-unpublish-g.png', Text::_('COM_PHOCADOWNLOAD_UNPUBLISHED')); echo ''; } } echo ''; echo ''; echo ''; // Approved echo ''; $upload_date = Factory::getDate($row->date); $upload_date->setTimezone($tz); echo ''; //echo ''; echo '' //echo '' .''; $k = 1 - $k; $i++; } } ?>
t['listsfiles']['order_Dir'], $this->t['listsfiles']['order'], 'image'); ?> t['listsfiles']['order_Dir'], $this->t['listsfiles']['order'], 'image' ); ?> t['listsfiles']['order_Dir'], $this->t['listsfiles']['order'], 'image' ); ?> t['listsfiles']['order_Dir'], $this->t['listsfiles']['order'], 'image' ); ?> t['listsfiles']['order_Dir'], $this->t['listsfiles']['order'], 'image' ); ?>
filename); echo $icon . ' ' . $row->title; ?> '; if ($rightDisplayDelete) { echo ''; //echo HTMLHelper::_('image', $this->t['pi'].'icon-trash.png', Text::_('COM_PHOCADOWNLOAD_DELETE')); echo ''; echo ''; } else { //echo HTMLHelper::_('image', $this->t['pi'].'icon-trash-g.png', Text::_('COM_PHOCADOWNLOAD_DELETE')); echo ''; } echo ''; // User should get info about active/not active file (if e.g. admin change the active status) $publish_up = Factory::getDate($row->publish_up); $publish_down = Factory::getDate($row->publish_down); $tz = new DateTimeZone($config->get('offset')); $publish_up->setTimezone($tz); $publish_down->setTimezone($tz); if ( $now->toUnix() <= $publish_up->toUnix() ) { $text = Text::_( 'COM_PHOCADOWNLOAD_PENDING' ); } else if ( ( $now->toUnix() <= $publish_down->toUnix() || $row->publish_down == $nullDate ) ) { $text = Text::_( 'COM_PHOCADOWNLOAD_ACTIVE' ); } else if ( $now->toUnix() > $publish_down->toUnix() ) { $text = Text::_( 'COM_PHOCADOWNLOAD_EXPIRED' ); } $times = ''; if (isset($row->publish_up)) { if ($row->publish_up == $nullDate) { $times .= "\n".Text::_( 'COM_PHOCADOWNLOAD_START') . ': '.Text::_( 'COM_PHOCADOWNLOAD_ALWAYS' ); } else { $times .= "\n".Text::_( 'COM_PHOCADOWNLOAD_START') .": ". $publish_up->format("D, d M Y H:i:s"); } } if (isset($row->publish_down)) { if ($row->publish_down == $nullDate) { $times .= "\n". Text::_( 'COM_PHOCADOWNLOAD_FINISH'). ': '. Text::_('COM_PHOCADOWNLOAD_NO_EXPIRY' ); } else { $times .= "\n". Text::_( 'COM_PHOCADOWNLOAD_FINISH') .": ". $publish_up->format("D, d M Y H:i:s"); } } if ( $times ) { echo '' .''. $text.''; } echo ''; if ($row->approved == 1) { //echo HTMLHelper::_('image', $this->t['pi'].'icon-publish.png', Text::_('COM_PHOCADOWNLOAD_APPROVED')); echo ''; } else { //echo HTMLHelper::_('image', $this->t['pi'].'icon-unpublish.png', Text::_('COM_PHOCADOWNLOAD_NOT_APPROVED')); echo ''; } echo ''. $upload_date .''. $row->date .''. $row->categorytitle .''. $row->id .'
state->folder) && $this->state->folder != '') { $currentFolder = $this->state->folder; } ?>

t['uploadmaxsizeread'].']'; ?>

t['errorcatid'] != '') { echo ''; } ?>
t['errorfile'] != '') { echo ''; } ?> t['erroremail'] != '') { echo ''; } ?> t['errorwebsite'] != '') { echo ''; } ?>
:
:
:
 
:
:
:
:
:
*/ ?>
t['pi'].'icon-loading.gif', '') . Text::_('COM_PHOCADOWNLOAD_LOADING'); ?>
'; ?>