primo commit
This commit is contained in:
@ -0,0 +1 @@
|
||||
<html><body bgcolor="#FFFFFF"></body></html>
|
||||
@ -0,0 +1 @@
|
||||
<html><body bgcolor="#FFFFFF"></body></html>
|
||||
@ -0,0 +1,71 @@
|
||||
<?php
|
||||
/* @package Joomla
|
||||
* @copyright Copyright (C) Open Source Matters. All rights reserved.
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see LICENSE.php
|
||||
* @extension Phoca Extension
|
||||
* @copyright Copyright (C) Jan Pavelka www.phoca.cz
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
|
||||
*/
|
||||
defined('_JEXEC') or die;
|
||||
use Joomla\CMS\Factory;
|
||||
use Joomla\CMS\Language\Text;
|
||||
|
||||
$r = $this->r;
|
||||
|
||||
Factory::getDocument()->addScriptDeclaration(
|
||||
|
||||
'Joomla.submitbutton = function(task) {
|
||||
if (task == "'. $this->t['task'].'.cancel" || document.formvalidator.isValid(document.getElementById("adminForm"))) {
|
||||
Joomla.submitform(task, document.getElementById("adminForm"));
|
||||
} else {
|
||||
Joomla.renderMessages({"error": ["'. Text::_('JGLOBAL_VALIDATION_FORM_FAILED', true).'"]});
|
||||
}
|
||||
}'
|
||||
|
||||
);
|
||||
|
||||
echo $r->startForm($this->t['o'], $this->t['task'], $this->item->id, 'adminForm', 'adminForm');
|
||||
// First Column
|
||||
echo '<div class="span12 form-horizontal">';
|
||||
$tabs = array (
|
||||
'general' => Text::_($this->t['l'].'_GENERAL_OPTIONS'),
|
||||
'publishing' => Text::_($this->t['l'].'_PUBLISHING_OPTIONS'),
|
||||
'metadata' => Text::_($this->t['l'].'_METADATA_OPTIONS'));
|
||||
echo $r->navigation($tabs);
|
||||
|
||||
$formArray = array ('title', 'alias');
|
||||
echo $r->groupHeader($this->form, $formArray);
|
||||
|
||||
echo $r->startTabs();
|
||||
|
||||
echo $r->startTab('general', $tabs['general'], 'active');
|
||||
$formArray = array ( 'parent_id', 'image', 'project_name', 'ordering', 'access', 'accessuserid', 'uploaduserid', 'deleteuserid');
|
||||
echo $r->group($this->form, $formArray);
|
||||
$formArray = array('description');
|
||||
echo $r->group($this->form, $formArray, 1);
|
||||
echo $r->endTab();
|
||||
|
||||
echo $r->startTab('publishing', $tabs['publishing']);
|
||||
foreach($this->form->getFieldset('publish') as $field) {
|
||||
echo '<div class="control-group">';
|
||||
if (!$field->hidden) {
|
||||
echo '<div class="control-label">'.$field->label.'</div>';
|
||||
}
|
||||
echo '<div class="controls">';
|
||||
echo $field->input;
|
||||
echo '</div></div>';
|
||||
}
|
||||
echo $r->endTab();
|
||||
|
||||
echo $r->startTab('metadata', $tabs['metadata']);
|
||||
echo $this->loadTemplate('metadata');
|
||||
echo $r->endTab();
|
||||
|
||||
|
||||
echo '</div>';//end tab content
|
||||
echo '</div>';//end span10
|
||||
|
||||
|
||||
echo $r->formInputs($this->t['task']);
|
||||
echo $r->endForm();
|
||||
?>
|
||||
@ -0,0 +1,31 @@
|
||||
<?php
|
||||
/* @package Joomla
|
||||
* @copyright Copyright (C) Open Source Matters. All rights reserved.
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see LICENSE.php
|
||||
* @extension Phoca Extension
|
||||
* @copyright Copyright (C) Jan Pavelka www.phoca.cz
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
|
||||
*/
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
$fieldSets = $this->form->getFieldsets('metadata');
|
||||
foreach ($fieldSets as $name => $fieldSet) :
|
||||
?>
|
||||
<fieldset class="panelform">
|
||||
<div class="adminform">
|
||||
<?php if ($name == 'metadata') : // Include the real fields in this panel. ?>
|
||||
<div class="control-group">
|
||||
<div class="control-label"><?php echo $this->form->getLabel('metadesc'); ?></div>
|
||||
<div class="controls"><?php echo $this->form->getInput('metadesc'); ?></div></div>
|
||||
<div class="control-group">
|
||||
<div class="control-label"><?php echo $this->form->getLabel('metakey'); ?></div>
|
||||
<div class="controls"><?php echo $this->form->getInput('metakey'); ?></div></div>
|
||||
<?php endif; ?>
|
||||
<?php foreach ($this->form->getFieldset($name) as $field) : ?>
|
||||
<div class="control-group">
|
||||
<div class="control-label"><?php echo $field->label; ?>
|
||||
<div class="controls"><?php echo $field->input; ?></div></div>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
</fieldset>
|
||||
<?php endforeach; ?>
|
||||
@ -0,0 +1 @@
|
||||
<html><body bgcolor="#FFFFFF"></body></html>
|
||||
@ -0,0 +1,96 @@
|
||||
<?php
|
||||
/* @package Joomla
|
||||
* @copyright Copyright (C) Open Source Matters. All rights reserved.
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see LICENSE.php
|
||||
* @extension Phoca Extension
|
||||
* @copyright Copyright (C) Jan Pavelka www.phoca.cz
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
|
||||
*/
|
||||
defined('_JEXEC') or die();
|
||||
use Joomla\CMS\MVC\View\HtmlView;
|
||||
use Joomla\CMS\Factory;
|
||||
use Joomla\CMS\Toolbar\Toolbar;
|
||||
use Joomla\CMS\Language\Text;
|
||||
use Joomla\CMS\Toolbar\ToolbarHelper;
|
||||
jimport( 'joomla.application.component.view' );
|
||||
|
||||
class PhocaDownloadCpViewPhocaDownloadCat extends HtmlView
|
||||
{
|
||||
protected $state;
|
||||
protected $item;
|
||||
protected $form;
|
||||
protected $t;
|
||||
protected $r;
|
||||
|
||||
public function display($tpl = null) {
|
||||
|
||||
$this->t = PhocaDownloadUtils::setVars('cat');
|
||||
$this->r = new PhocaDownloadRenderAdminview();
|
||||
|
||||
$this->state = $this->get('State');
|
||||
$this->form = $this->get('Form');
|
||||
$this->item = $this->get('Item');
|
||||
$user = Factory::getUser();
|
||||
$model = $this->getModel();
|
||||
|
||||
//JHtml::_('behavior.calendar');
|
||||
|
||||
|
||||
//Data from model
|
||||
//$this->item =& $this->get('Data');
|
||||
|
||||
$lists = array();
|
||||
$isNew = ((int)$this->item->id == 0);
|
||||
|
||||
// Edit or Create?
|
||||
if (!$isNew) {
|
||||
$model->checkout( $user->get('id') );
|
||||
} else {
|
||||
// Initialise new record
|
||||
$this->item->approved = 1;
|
||||
$this->item->published = 1;
|
||||
$this->item->order = 0;
|
||||
$this->item->access = 0;
|
||||
}
|
||||
|
||||
$this->addToolbar();
|
||||
parent::display($tpl);
|
||||
}
|
||||
|
||||
|
||||
protected function addToolbar() {
|
||||
|
||||
require_once JPATH_COMPONENT.'/helpers/'.$this->t['tasks'].'.php';
|
||||
Factory::getApplication()->input->set('hidemainmenu', true);
|
||||
$bar = Toolbar::getInstance('toolbar');
|
||||
$user = Factory::getUser();
|
||||
$isNew = ($this->item->id == 0);
|
||||
$checkedOut = !($this->item->checked_out == 0 || $this->item->checked_out == $user->get('id'));
|
||||
$class = ucfirst($this->t['tasks']).'Helper';
|
||||
$canDo = $class::getActions($this->t, $this->state->get('filter.category_id'));
|
||||
|
||||
$text = $isNew ? Text::_( $this->t['l'].'_NEW' ) : Text::_($this->t['l'].'_EDIT');
|
||||
ToolbarHelper::title( Text::_( $this->t['l'].'_CATEGORY' ).': <small><small>[ ' . $text.' ]</small></small>' , 'folder');
|
||||
|
||||
// If not checked out, can save the item.
|
||||
if (!$checkedOut && $canDo->get('core.edit')){
|
||||
ToolbarHelper::apply($this->t['task'].'.apply', 'JTOOLBAR_APPLY');
|
||||
ToolbarHelper::save($this->t['task'].'.save', 'JTOOLBAR_SAVE');
|
||||
ToolbarHelper::addNew($this->t['task'].'.save2new', 'JTOOLBAR_SAVE_AND_NEW');
|
||||
|
||||
}
|
||||
// If an existing item, can save to a copy.
|
||||
if (!$isNew && $canDo->get('core.create')) {
|
||||
//JToolbarHelper::custom($this->t['c'].'cat.save2copy', 'copy.png', 'copy_f2.png', 'JTOOLBAR_SAVE_AS_COPY', false);
|
||||
}
|
||||
if (empty($this->item->id)) {
|
||||
ToolbarHelper::cancel($this->t['task'].'.cancel', 'JTOOLBAR_CANCEL');
|
||||
}
|
||||
else {
|
||||
ToolbarHelper::cancel($this->t['task'].'.cancel', 'JTOOLBAR_CLOSE');
|
||||
}
|
||||
ToolbarHelper::divider();
|
||||
ToolbarHelper::help( 'screen.'.$this->t['c'], true );
|
||||
}
|
||||
}
|
||||
?>
|
||||
@ -0,0 +1 @@
|
||||
<html><body bgcolor="#FFFFFF"></body></html>
|
||||
@ -0,0 +1,165 @@
|
||||
<?php
|
||||
/* @package Joomla
|
||||
* @copyright Copyright (C) Open Source Matters. All rights reserved.
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see LICENSE.php
|
||||
* @extension Phoca Extension
|
||||
* @copyright Copyright (C) Jan Pavelka www.phoca.cz
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
|
||||
*/
|
||||
defined('_JEXEC') or die;
|
||||
use Joomla\CMS\Factory;
|
||||
use Joomla\CMS\Language\Text;
|
||||
use Joomla\CMS\Layout\LayoutHelper;
|
||||
use Joomla\CMS\HTML\HTMLHelper;
|
||||
use Joomla\CMS\Router\Route;
|
||||
$r = $this->r;
|
||||
$user = Factory::getUser();
|
||||
$userId = $user->get('id');
|
||||
$listOrder = $this->escape($this->state->get('list.ordering'));
|
||||
$listDirn = $this->escape($this->state->get('list.direction'));
|
||||
$canOrder = $user->authorise('core.edit.state', $this->t['o']);
|
||||
$saveOrder = $listOrder == 'a.ordering';
|
||||
$saveOrderingUrl = '';
|
||||
if ($saveOrder && !empty($this->items)) {
|
||||
$saveOrderingUrl = $r->saveOrder($this->t, $listDirn);
|
||||
}
|
||||
$sortFields = $this->getSortFields();
|
||||
|
||||
echo $r->jsJorderTable($listOrder);
|
||||
|
||||
//echo '<div class="clearfix"></div>';
|
||||
|
||||
echo $r->startForm($this->t['o'], $this->t['tasks'], 'adminForm');
|
||||
//echo $r->startFilter();
|
||||
//echo $r->selectFilterPublished('JOPTION_SELECT_PUBLISHED', $this->state->get('filter.published'));
|
||||
//echo $r->selectFilterLanguage('JOPTION_SELECT_LANGUAGE', $this->state->get('filter.language'));
|
||||
//echo $r->selectFilterLevels('COM_PHOCADOWNLOAD_SELECT_MAX_LEVELS', $this->state->get('filter.level'));
|
||||
//echo $r->endFilter();
|
||||
|
||||
echo $r->startMainContainer();
|
||||
|
||||
if ($this->t['search']) {
|
||||
echo '<div class="alert alert-message">' . Text::_('COM_PHOCADOWNLOAD_SEARCH_FILTER_IS_ACTIVE') .'</div>';
|
||||
}
|
||||
/*
|
||||
echo $r->startFilterBar();
|
||||
echo $r->inputFilterSearch($this->t['l'].'_FILTER_SEARCH_LABEL', $this->t['l'].'_FILTER_SEARCH_DESC',
|
||||
$this->escape($this->state->get('filter.search')));
|
||||
echo $r->inputFilterSearchClear('JSEARCH_FILTER_SUBMIT', 'JSEARCH_FILTER_CLEAR');
|
||||
echo $r->inputFilterSearchLimit('JFIELD_PLG_SEARCH_SEARCHLIMIT_DESC', $this->pagination->getLimitBox());
|
||||
echo $r->selectFilterDirection('JFIELD_ORDERING_DESC', 'JGLOBAL_ORDER_ASCENDING', 'JGLOBAL_ORDER_DESCENDING', $listDirn);
|
||||
echo $r->selectFilterSortBy('JGLOBAL_SORT_BY', $sortFields, $listOrder);
|
||||
|
||||
echo $r->startFilterBar(2);
|
||||
echo $r->selectFilterPublished('JOPTION_SELECT_PUBLISHED', $this->state->get('filter.published'));
|
||||
echo $r->selectFilterLanguage('JOPTION_SELECT_LANGUAGE', $this->state->get('filter.language'));
|
||||
echo $r->selectFilterLevels('COM_PHOCADOWNLOAD_SELECT_MAX_LEVELS', $this->state->get('filter.level'));
|
||||
echo $r->endFilterBar();
|
||||
|
||||
echo $r->endFilterBar();*/
|
||||
echo LayoutHelper::render('joomla.searchtools.default', array('view' => $this));
|
||||
|
||||
echo $r->startTable('categoryList');
|
||||
|
||||
echo $r->startTblHeader();
|
||||
|
||||
echo $r->firstColumnHeader($listDirn, $listOrder);
|
||||
echo $r->secondColumnHeader($listDirn, $listOrder);
|
||||
//echo $r->thOrderingXML('JGRID_HEADING_ORDERING', $listDirn, $listOrder);
|
||||
//echo $r->thCheck('JGLOBAL_CHECK_ALL');
|
||||
echo '<th class="ph-title">'.HTMLHelper::_('searchtools.sort', $this->t['l'].'_TITLE', 'a.title', $listDirn, $listOrder ).'</th>'."\n";
|
||||
echo '<th class="ph-published">'.HTMLHelper::_('searchtools.sort', $this->t['l'].'_PUBLISHED', 'a.published', $listDirn, $listOrder ).'</th>'."\n";
|
||||
echo '<th class="ph-parentcattitle">'.HTMLHelper::_('searchtools.sort', $this->t['l'].'_PARENT_CATEGORY', 'parentcat_title', $listDirn, $listOrder ).'</th>'."\n";
|
||||
echo '<th class="ph-access">'.Text::_($this->t['l'].'_ACCESS').'</th>'."\n";
|
||||
echo '<th class="ph-language">'.HTMLHelper::_('searchtools.sort', 'JGRID_HEADING_LANGUAGE', 'a.language', $listDirn, $listOrder ).'</th>'."\n";
|
||||
echo '<th class="ph-id">'.HTMLHelper::_('searchtools.sort', $this->t['l'].'_ID', 'a.id', $listDirn, $listOrder ).'</th>'."\n";
|
||||
|
||||
echo $r->endTblHeader();
|
||||
|
||||
echo $r->startTblBody($saveOrder, $saveOrderingUrl, $listDirn);
|
||||
|
||||
$originalOrders = array();
|
||||
$parentsStr = "";
|
||||
$j = 0;
|
||||
|
||||
if (is_array($this->items)) {
|
||||
foreach ($this->items as $i => $item) {
|
||||
if ($i >= (int)$this->pagination->limitstart && $j < (int)$this->pagination->limit) {
|
||||
$j++;
|
||||
|
||||
$urlEdit = 'index.php?option='.$this->t['o'].'&task='.$this->t['task'].'.edit&id=';
|
||||
$orderkey = array_search($item->id, $this->ordering[$item->parent_id]);
|
||||
$ordering = ($listOrder == 'a.ordering');
|
||||
$canCreate = $user->authorise('core.create', $this->t['o']);
|
||||
$canEdit = $user->authorise('core.edit', $this->t['o']);
|
||||
$canCheckin = $user->authorise('core.manage', 'com_checkin') || $item->checked_out==$user->get('id') || $item->checked_out==0;
|
||||
$canChange = $user->authorise('core.edit.state', $this->t['o']) && $canCheckin;
|
||||
$linkEdit = Route::_( $urlEdit.(int) $item->id );
|
||||
$linkParent = Route::_( $urlEdit.(int) $item->parent_id );
|
||||
$canEditParent = $user->authorise('core.edit', $this->t['o']);
|
||||
|
||||
$parentsStr = '';
|
||||
if (isset($item->parentstree)) {
|
||||
$parentsStr = ' '.$item->parentstree;
|
||||
}
|
||||
if (!isset($item->level)) {
|
||||
$item->level = 0;
|
||||
}
|
||||
|
||||
/*$iD = $i % 2;
|
||||
echo "\n\n";
|
||||
echo '<tr class="row'.$iD.'" sortable-group-id="'.$item->parent_id.'" item-id="'.$item->id.'" parents="'.$parentsStr.'" level="'. $item->level.'">'. "\n";
|
||||
|
||||
echo $r->tdOrder($canChange, $saveOrder, $orderkey, $item->ordering);
|
||||
echo $r->td(JHtml::_('grid.id', $i, $item->id), "small hidden-phone");*/
|
||||
echo $r->startTr($i, isset($item->parent_id) ? (int)$item->parent_id : 0, $item->id);
|
||||
echo $r->firstColumn($i, $item->id, $canChange, $saveOrder, $orderkey, $item->ordering);
|
||||
echo $r->secondColumn($i, $item->id, $canChange, $saveOrder, $orderkey, $item->ordering);
|
||||
|
||||
|
||||
$checkO = '';
|
||||
if ($item->checked_out) {
|
||||
$checkO .= HTMLHelper::_('jgrid.checkedout', $i, $item->editor, $item->checked_out_time, $this->t['tasks'].'.', $canCheckin);
|
||||
}
|
||||
|
||||
|
||||
if ($canCreate || $canEdit) {
|
||||
$checkO .= '<a href="'. Route::_($linkEdit).'">'. $this->escape($item->title).'</a>';
|
||||
} else {
|
||||
$checkO .= $this->escape($item->title);
|
||||
}
|
||||
$checkO .= ' <span class="smallsub">(<span>'.Text::_($this->t['l'].'_FIELD_ALIAS_LABEL').':</span>'. $this->escape($item->alias).')</span>';
|
||||
$indentation = $r->createIndentation($item->level);
|
||||
echo $r->td($indentation . $checkO, "small");
|
||||
echo $r->td(HTMLHelper::_('jgrid.published', $item->published, $i, $this->t['tasks'].'.', $canChange), "small hidden-phone");
|
||||
|
||||
if ($canEditParent) {
|
||||
$parentO = '<a href="'. Route::_($linkParent).'">'. $this->escape($item->parentcat_title).'</a>';
|
||||
} else {
|
||||
$parentO = $this->escape($item->parentcat_title);
|
||||
}
|
||||
echo $r->td($parentO, "small hidden-phone");
|
||||
echo $r->td($this->escape($item->access_level), "small hidden-phone");
|
||||
|
||||
|
||||
|
||||
echo $r->tdLanguage($item->language, $item->language_title, $this->escape($item->language_title));
|
||||
echo $r->td($item->id, "small hidden-phone");
|
||||
|
||||
echo $r->endTr();
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
echo $r->endTblBody();
|
||||
|
||||
echo $r->tblFoot($this->pagination->getListFooter(), 8);
|
||||
echo $r->endTable();
|
||||
|
||||
echo $this->loadTemplate('batch');
|
||||
|
||||
//echo $r->formInputsXML($listOrder, $originalOrders);
|
||||
echo $r->formInputsXML($listOrder, $listDirn, $originalOrders);
|
||||
echo $r->endMainContainer();
|
||||
echo $r->endForm();
|
||||
?>
|
||||
@ -0,0 +1,59 @@
|
||||
<?php
|
||||
/* @package Joomla
|
||||
* @copyright Copyright (C) Open Source Matters. All rights reserved.
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see LICENSE.php
|
||||
* @extension Phoca Extension
|
||||
* @copyright Copyright (C) Jan Pavelka www.phoca.cz
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
use Joomla\CMS\Language\Text;
|
||||
use Joomla\CMS\Layout\LayoutHelper;
|
||||
|
||||
//$published = $this->state->get('filter.published');
|
||||
?>
|
||||
|
||||
<div id="collapseModal" role="dialog" tabindex="-1" class="joomla-modal modal fade">
|
||||
<div class="modal-dialog modal-lg">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h3 class="modal-title"><?php echo Text::_('COM_PHOCADOWNLOAD_BATCH_OPTIONS_CATEGORIES');?></h3>
|
||||
<button type="button" class="btn-close novalidate" data-bs-dismiss="modal" aria-label="<?php Text::_('COM_PHOCADOWNLOAD_CLOSE'); ?>">
|
||||
</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
|
||||
<div class="p-3">
|
||||
<div class="row">
|
||||
<div class="form-group col-md-6">
|
||||
<div class="controls"><?php echo LayoutHelper::render('joomla.html.batch.access', []);?></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="form-group col-md-6">
|
||||
<div class="controls"><?php echo LayoutHelper::render('joomla.html.batch.language', []); ?></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="form-group col-md-6">
|
||||
<div class="controls"><?php echo PhocaDownloadBatch::item('', 1); ?></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="modal-footer">
|
||||
<button class="btn" type="button" onclick="document.getElementById('batch-category-id').value='';document.getElementById('batch-access').value='';document.getElementById('batch-language-id').value=''" data-bs-dismiss="modal">
|
||||
<?php echo Text::_('JCANCEL'); ?>
|
||||
</button>
|
||||
<button class="btn btn-primary" type="submit" onclick="Joomla.submitbutton('<?php echo $this->t['task'] ?>.batch');" id="batch-submit-button-id" data-submit-task="<?php echo $this->t['task'] ?>.batch">
|
||||
<?php echo Text::_('JGLOBAL_BATCH_PROCESS'); ?>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -0,0 +1 @@
|
||||
<html><body bgcolor="#FFFFFF"></body></html>
|
||||
@ -0,0 +1,233 @@
|
||||
<?php
|
||||
/* @package Joomla
|
||||
* @copyright Copyright (C) Open Source Matters. All rights reserved.
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see LICENSE.php
|
||||
* @extension Phoca Extension
|
||||
* @copyright Copyright (C) Jan Pavelka www.phoca.cz
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
|
||||
*/
|
||||
defined('_JEXEC') or die();
|
||||
use Joomla\CMS\MVC\View\HtmlView;
|
||||
use Joomla\CMS\Toolbar\ToolbarHelper;
|
||||
use Joomla\CMS\Language\Text;
|
||||
use Joomla\CMS\Factory;
|
||||
use Joomla\CMS\Toolbar\Toolbar;
|
||||
use Joomla\CMS\HTML\HTMLHelper;
|
||||
use Joomla\CMS\Object\CMSObject;
|
||||
jimport( 'joomla.application.component.view' );
|
||||
|
||||
class PhocaDownloadCpViewPhocaDownloadCats extends HtmlView
|
||||
{
|
||||
protected $items;
|
||||
protected $pagination;
|
||||
protected $state;
|
||||
protected $t;
|
||||
protected $r;
|
||||
public $filterForm;
|
||||
public $activeFilters;
|
||||
|
||||
function display($tpl = null) {
|
||||
|
||||
$this->t = PhocaDownloadUtils::setVars('cat');
|
||||
$this->r = new PhocaDownloadRenderAdminViews();
|
||||
|
||||
$model = $this->getModel();
|
||||
$this->items = $this->get('Items');
|
||||
$this->pagination = $this->get('Pagination');
|
||||
$this->state = $this->get('State');
|
||||
$this->filterForm = $this->get('FilterForm');
|
||||
$this->activeFilters = $this->get('ActiveFilters');
|
||||
|
||||
// Preprocess the list of items to find ordering divisions.
|
||||
foreach ($this->items as &$item) {
|
||||
$this->ordering[$item->parent_id][] = $item->id;
|
||||
}
|
||||
|
||||
// if search, don't do a tree, only display the searched items
|
||||
$this->t['search'] = $this->state->get('filter.search');
|
||||
// We need to load all items because of creating tree
|
||||
// After creating tree we get info from pagination
|
||||
// and will set displaying of categories for current pagination
|
||||
//E.g. pagination is limitstart 5, limit 5 - so only categories from 5 to 10 will be displayed
|
||||
|
||||
// the same for max levels
|
||||
$this->t['level'] = $this->state->get('filter.level');
|
||||
|
||||
if (!empty($this->items) && !$this->t['search']) {
|
||||
$text = ''; // text is tree name e.g. Category >> Subcategory
|
||||
$tree = array();
|
||||
|
||||
// Filter max levels
|
||||
if (isset($this->t['level']) && $this->t['level'] > 0) {
|
||||
$maxLevel = (int)$this->t['level'] + 1;
|
||||
} else {
|
||||
$maxLevel = false;
|
||||
}
|
||||
|
||||
$this->items = $this->processTree($this->items, $tree, 0, $text, -1, 0, '', $maxLevel);
|
||||
|
||||
// Re count the pagination
|
||||
$countTotal = count($this->items);
|
||||
$model->setTotal($countTotal);
|
||||
$this->pagination = $model->getPagination();
|
||||
}
|
||||
|
||||
//$this->tmpl['notapproved'] = $this->get( 'NotApprovedCategory' );
|
||||
|
||||
|
||||
$this->addToolbar();
|
||||
parent::display($tpl);
|
||||
}
|
||||
|
||||
protected function addToolbar() {
|
||||
require_once JPATH_COMPONENT.'/helpers/'.$this->t['tasks'].'.php';
|
||||
$state = $this->get('State');
|
||||
$class = ucfirst($this->t['tasks']).'Helper';
|
||||
$canDo = $class::getActions($this->t, $state->get('filter.category_id'));
|
||||
ToolbarHelper::title( Text::_( $this->t['l'].'_CATEGORIES' ),'folder' );
|
||||
$user = Factory::getUser();
|
||||
$bar = Toolbar::getInstance('toolbar');
|
||||
|
||||
if ($canDo->get('core.create')) {
|
||||
ToolbarHelper::addNew($this->t['task'].'.add','JTOOLBAR_NEW');
|
||||
}
|
||||
if ($canDo->get('core.edit')) {
|
||||
ToolbarHelper::editList($this->t['task'].'.edit','JTOOLBAR_EDIT');
|
||||
}
|
||||
if ($canDo->get('core.edit.state')) {
|
||||
|
||||
ToolbarHelper::divider();
|
||||
ToolbarHelper::custom($this->t['tasks'].'.publish', 'publish.png', 'publish_f2.png','JTOOLBAR_PUBLISH', true);
|
||||
ToolbarHelper::custom($this->t['tasks'].'.unpublish', 'unpublish.png', 'unpublish_f2.png', 'JTOOLBAR_UNPUBLISH', true);
|
||||
}
|
||||
|
||||
if ($canDo->get('core.delete')) {
|
||||
ToolbarHelper::deleteList( Text::_( $this->t['l'].'_WARNING_DELETE_ITEMS' ), $this->t['tasks'].'.delete', $this->t['l'].'_DELETE');
|
||||
}
|
||||
|
||||
// Add a batch button
|
||||
if ($user->authorise('core.edit'))
|
||||
{
|
||||
//HTMLHelper::_('bootstrap.renderModal', 'collapseModal');
|
||||
/*$title = Text::_('JTOOLBAR_BATCH');
|
||||
|
||||
|
||||
$dhtml = '<joomla-toolbar-button id="toolbar-batch" list-selection>';
|
||||
$dhtml .= "<button data-bs-toggle=\"modal\" data-bs-target=\"#collapseModal\" class=\"btn btn-small\">
|
||||
<i class=\"icon-checkbox-partial\" title=\"$title\"></i>
|
||||
$title</button>";
|
||||
$dhtml .= '</joomla-toolbar-button>';
|
||||
|
||||
$bar->appendButton('Custom', $dhtml, 'batch');*/
|
||||
|
||||
$bar->popupButton('batch')
|
||||
->text('JTOOLBAR_BATCH')
|
||||
->selector('collapseModal')
|
||||
->listCheck(true);
|
||||
}
|
||||
|
||||
ToolbarHelper::divider();
|
||||
ToolbarHelper::help( 'screen.'.$this->t['c'], true );
|
||||
|
||||
}
|
||||
|
||||
|
||||
protected function processTree( $data, $tree, $id = 0, $text='', $currentId = 0, $level = 0, $parentsTreeString = '', $maxLevel = false) {
|
||||
|
||||
|
||||
$countItemsInCat = 0;// Ordering
|
||||
$level = $level + 1;
|
||||
$parentsTreeString = $id . ' '. $parentsTreeString;
|
||||
|
||||
// Limit the level of tree
|
||||
if (!$maxLevel || ($maxLevel && $level < $maxLevel)) {
|
||||
foreach ($data as $key) {
|
||||
|
||||
$show_text = $text . $key->title;
|
||||
//$show_text = $key->title;
|
||||
|
||||
static $iCT = 0;// All displayed items
|
||||
|
||||
if ($key->parent_id == $id && $currentId != $id && $currentId != $key->id ) {
|
||||
$tree[$iCT] = new CMSObject();
|
||||
|
||||
// Ordering MUST be solved here
|
||||
if ($countItemsInCat > 0) {
|
||||
$tree[$iCT]->orderup = 1;
|
||||
} else {
|
||||
$tree[$iCT]->orderup = 0;
|
||||
}
|
||||
|
||||
if ($countItemsInCat < ($key->countid - 1)) {
|
||||
$tree[$iCT]->orderdown = 1;
|
||||
} else {
|
||||
$tree[$iCT]->orderdown = 0;
|
||||
}
|
||||
|
||||
$tree[$iCT] = new CMSObject();
|
||||
|
||||
$tree[$iCT]->level = $level;
|
||||
$tree[$iCT]->parentstree = $parentsTreeString;
|
||||
|
||||
$tree[$iCT]->id = $key->id;
|
||||
$tree[$iCT]->title = $show_text;
|
||||
$tree[$iCT]->title_self = $key->title;
|
||||
$tree[$iCT]->parent_id = $key->parent_id;
|
||||
// $tree[$iCT]->owner_id = $key->owner_id;
|
||||
$tree[$iCT]->name = $key->name;
|
||||
$tree[$iCT]->alias = $key->alias;
|
||||
$tree[$iCT]->image = $key->image;
|
||||
$tree[$iCT]->section = $key->section;
|
||||
$tree[$iCT]->image_position = $key->image_position;
|
||||
$tree[$iCT]->description = $key->description;
|
||||
$tree[$iCT]->published = $key->published;
|
||||
$tree[$iCT]->editor = $key->editor;
|
||||
$tree[$iCT]->ordering = $key->ordering;
|
||||
$tree[$iCT]->access = $key->access;
|
||||
$tree[$iCT]->access_level = $key->access_level;
|
||||
$tree[$iCT]->count = $key->count;
|
||||
$tree[$iCT]->params = $key->params;
|
||||
$tree[$iCT]->checked_out = $key->checked_out;
|
||||
$tree[$iCT]->checked_out_time = $key->checked_out_time;
|
||||
$tree[$iCT]->groupname = 0;
|
||||
// $tree[$iCT]->username = $key->username;
|
||||
// $tree[$iCT]->usernameno = $key->usernameno;
|
||||
$tree[$iCT]->parentcat_title = $key->parentcat_title;
|
||||
$tree[$iCT]->parentcat_id = $key->parentcat_id;
|
||||
$tree[$iCT]->hits = $key->hits;
|
||||
// $tree[$iCT]->ratingavg = $key->ratingavg;
|
||||
$tree[$iCT]->accessuserid = $key->accessuserid;
|
||||
$tree[$iCT]->uploaduserid = $key->uploaduserid;
|
||||
$tree[$iCT]->language = $key->language;
|
||||
$tree[$iCT]->language_title = $key->language_title;
|
||||
// $tree[$iCT]->deleteuserid = $key->deleteuserid;
|
||||
// $tree[$iCT]->userfolder = $key->userfolder;
|
||||
// $tree[$iCT]->approved = $key->approved;
|
||||
// $tree[$iCT]->link = '';
|
||||
// $tree[$iCT]->filename = '';// Will be added in View (after items will be reduced)
|
||||
// $tree[$iCT]->linkthumbnailpath = '';
|
||||
|
||||
$iCT++;
|
||||
|
||||
$tree = $this->processTree($data, $tree, $key->id, $show_text . " - ", $currentId, $level, $parentsTreeString, $maxLevel);
|
||||
|
||||
$countItemsInCat++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return($tree);
|
||||
}
|
||||
|
||||
protected function getSortFields() {
|
||||
return array(
|
||||
'a.ordering' => Text::_('JGRID_HEADING_ORDERING'),
|
||||
'a.title' => Text::_($this->t['l'] . '_TITLE'),
|
||||
'a.published' => Text::_($this->t['l'] . '_PUBLISHED'),
|
||||
'parentcat_title' => Text::_($this->t['l'] . '_PARENT_CATEGORY'),
|
||||
'language' => Text::_('JGRID_HEADING_LANGUAGE'),
|
||||
'a.id' => Text::_('JGRID_HEADING_ID')
|
||||
);
|
||||
}
|
||||
}
|
||||
?>
|
||||
@ -0,0 +1 @@
|
||||
<html><body bgcolor="#FFFFFF"></body></html>
|
||||
@ -0,0 +1,80 @@
|
||||
<?php
|
||||
/*
|
||||
* @package Joomla
|
||||
* @copyright Copyright (C) Open Source Matters. All rights reserved.
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see LICENSE.php
|
||||
* @component Phoca Gallery
|
||||
* @copyright Copyright (C) Jan Pavelka www.phoca.cz
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
|
||||
*/
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
use Joomla\CMS\Language\Text;
|
||||
use Joomla\CMS\HTML\HTMLHelper;
|
||||
|
||||
|
||||
|
||||
|
||||
$r = $this->r;
|
||||
echo $r->startCp();
|
||||
|
||||
|
||||
|
||||
echo '<div class="ph-box-cp">';
|
||||
echo '<div class="ph-left-cp">';
|
||||
|
||||
echo '<div class="ph-cp-item-box">';
|
||||
$link = 'index.php?option='.$this->t['o'].'&view=';
|
||||
foreach ($this->views as $k => $v) {
|
||||
$linkV = $link . $this->t['c'] . $k;
|
||||
echo $r->quickIconButton( $linkV, Text::_($v[0]), $v[1], $v[2]);
|
||||
}
|
||||
echo '</div>';
|
||||
echo '</div>';
|
||||
|
||||
echo '<civ class="ph-right-cp">';
|
||||
|
||||
echo '<div class="ph-extension-info-box">';
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
echo '<div class="ph-cpanel-logo">'.HTMLHelper::_('image', $this->t['i'] . 'logo-'.str_replace('phoca', 'phoca-', $this->t['c']).'.png', 'Phoca.cz') . '</div>';
|
||||
echo '<div class="ph-cpanel-logo-seal">'. HTMLHelper::_('image', $this->t['i'] . 'logo-phoca.png', 'Phoca.cz' ).'</div>';
|
||||
|
||||
|
||||
|
||||
echo '<h3>'. Text::_($this->t['l'] . '_VERSION').'</h3>'
|
||||
.'<p>'. $this->t['version'] .'</p>';
|
||||
|
||||
echo '<h3>'. Text::_($this->t['l'] . '_COPYRIGHT').'</h3>'
|
||||
.'<p>© 2007 - '. date("Y"). ' Jan Pavelka</p>'
|
||||
.'<p><a href="https://www.phoca.cz/" target="_blank">www.phoca.cz</a></p>';
|
||||
|
||||
echo '<h3>'. Text::_($this->t['l'] . '_LICENSE').'</h3>'
|
||||
.'<p><a href="http://www.gnu.org/licenses/gpl-2.0.html" target="_blank">GPLv2</a></p>';
|
||||
|
||||
echo '<h3>'. Text::_($this->t['l'] . '_TRANSLATION').': '. Text::_($this->t['l'] . '_TRANSLATION_LANGUAGE_TAG').'</h3>'
|
||||
.'<p>© 2007 - '. date("Y"). ' '. Text::_($this->t['l'] . '_TRANSLATER'). '</p>'
|
||||
.'<p>'.Text::_($this->t['l'] . '_TRANSLATION_SUPPORT_URL').'</p>';
|
||||
|
||||
|
||||
echo '<div class="ph-cp-hr"></div>'
|
||||
.'<div class="btn-group"><a class="btn btn-large btn-primary" href="https://www.phoca.cz/version/index.php?'.$this->t['c'].'='. $this->t['version'] .'" target="_blank"><i class="icon-loop icon-white"></i> '. Text::_($this->t['l'] . '_CHECK_FOR_UPDATE') .'</a></div>'
|
||||
.'<div style="float:right; margin: 0 10px"><a href="https://www.phoca.cz/" target="_blank">'.HTMLHelper::_('image', $this->t['i'] . 'logo.png', 'Phoca.cz' ).'</a></div>';
|
||||
|
||||
|
||||
|
||||
echo '</div>';
|
||||
|
||||
echo '<div class="ph-extension-links-box">';
|
||||
echo $r->getLinks();
|
||||
echo '</div>';
|
||||
|
||||
echo '</div>';
|
||||
|
||||
echo '</div>';
|
||||
echo $r->endCp();
|
||||
|
||||
?>
|
||||
@ -0,0 +1 @@
|
||||
<html><body bgcolor="#FFFFFF"></body></html>
|
||||
@ -0,0 +1,69 @@
|
||||
<?php
|
||||
/* @package Joomla
|
||||
* @copyright Copyright (C) Open Source Matters. All rights reserved.
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see LICENSE.php
|
||||
* @extension Phoca Extension
|
||||
* @copyright Copyright (C) Jan Pavelka www.phoca.cz
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
|
||||
*/
|
||||
defined('_JEXEC') or die();
|
||||
use Joomla\CMS\MVC\View\HtmlView;
|
||||
use Joomla\CMS\Toolbar\ToolbarHelper;
|
||||
use Joomla\CMS\Language\Text;
|
||||
use Joomla\CMS\Toolbar\Toolbar;
|
||||
jimport( 'joomla.application.component.view' );
|
||||
jimport( 'joomla.html.pane' );
|
||||
|
||||
class PhocaDownloadCpViewPhocaDownloadCp extends HtmlView
|
||||
{
|
||||
protected $t;
|
||||
protected $r;
|
||||
protected $views;
|
||||
|
||||
public function display($tpl = null) {
|
||||
|
||||
$this->t = PhocaDownloadUtils::setVars('cp');
|
||||
$this->r = new PhocaDownloadRenderAdminview();
|
||||
$i = ' icon-';
|
||||
$d = 'duotone ';
|
||||
|
||||
$this->views= array(
|
||||
'files' => array($this->t['l'] . '_FILES', $d.$i.'archive', '#c1a46d'),
|
||||
'cats' => array($this->t['l'] . '_CATEGORIES', $d.$i.'folder-open', '#da7400'),
|
||||
'lics' => array($this->t['l'] . '_LICENSES', $d.$i.'file-check', '#fb1000'),
|
||||
'stat' => array($this->t['l'] . '_STATISTICS', $d.$i.'chart', '#8c0069'),
|
||||
'downloads' => array($this->t['l'] . '_DOWNLOADS', $i.'box-remove', '#33af49'),
|
||||
'uploads' => array($this->t['l'] . '_UPLOADS', $i.'box-add', '#ff9326'),
|
||||
'rafile' => array($this->t['l'] . '_FILE_RATING', $i.'featured', '#FFC93C'),
|
||||
'tags' => array($this->t['l'] . '_TAGS', $d.$i.'tag-double', '#CC0033'),
|
||||
//'layouts' => array($this->t['l'] . '_LAYOUT', $d.$i.'modules', '#cd76cc'),
|
||||
'styles' => array($this->t['l'] . '_STYLES', $i.'styles', '#9900CC'),
|
||||
'logs' => array($this->t['l'] . '_LOGGING', $d.$i.'logs', '#c0c0c0'),
|
||||
'info' => array($this->t['l'] . '_INFO', $d.$i.'info-circle', '#3378cc')
|
||||
);
|
||||
|
||||
|
||||
$this->t['version'] = PhocaDownloadUtils::getExtensionVersion();
|
||||
$this->addToolbar();
|
||||
parent::display($tpl);
|
||||
}
|
||||
|
||||
protected function addToolbar() {
|
||||
require_once JPATH_COMPONENT.'/helpers/phocadownloadcp.php';
|
||||
|
||||
$canDo = PhocaDownloadCpHelper::getActions($this->t['c']);
|
||||
ToolbarHelper::title( Text::_( $this->t['l'].'_PD_CONTROL_PANEL' ), 'home-2 cpanel' );
|
||||
|
||||
// This button is unnecessary but it is displayed because Joomla! design bug
|
||||
$bar = Toolbar::getInstance( 'toolbar' );
|
||||
$dhtml = '<a href="index.php?option=com_phocadownload" class="btn btn-primary btn-small"><i class="icon-home-2" title="'.Text::_($this->t['l'].'_CONTROL_PANEL').'"></i> '.Text::_($this->t['l'].'_CONTROL_PANEL').'</a>';
|
||||
$bar->appendButton('Custom', $dhtml);
|
||||
|
||||
if ($canDo->get('core.admin')) {
|
||||
ToolbarHelper::preferences('com_phocadownload');
|
||||
ToolbarHelper::divider();
|
||||
}
|
||||
ToolbarHelper::help( 'screen.phocadownload', true );
|
||||
}
|
||||
}
|
||||
?>
|
||||
@ -0,0 +1 @@
|
||||
<html><body bgcolor="#FFFFFF"></body></html>
|
||||
@ -0,0 +1,144 @@
|
||||
<?php
|
||||
/*
|
||||
* @package Joomla
|
||||
* @copyright Copyright (C) Open Source Matters. All rights reserved.
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see LICENSE.php
|
||||
* @component Phoca Gallery
|
||||
* @copyright Copyright (C) Jan Pavelka www.phoca.cz
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
|
||||
*/
|
||||
defined('_JEXEC') or die;
|
||||
use Joomla\CMS\Factory;
|
||||
use Joomla\CMS\Language\Text;
|
||||
use Joomla\CMS\Layout\LayoutHelper;
|
||||
use Joomla\CMS\HTML\HTMLHelper;
|
||||
use Joomla\CMS\Router\Route;
|
||||
$r = $this->r;
|
||||
$user = Factory::getUser();
|
||||
$userId = $user->get('id');
|
||||
$listOrder = $this->escape($this->state->get('list.ordering'));
|
||||
$listDirn = $this->escape($this->state->get('list.direction'));
|
||||
$canOrder = $user->authorise('core.edit.state', $this->t['o']);
|
||||
$saveOrder = $listOrder == 'a.ordering';
|
||||
$saveOrderingUrl = '';
|
||||
if ($saveOrder && !empty($this->items)) {
|
||||
$saveOrderingUrl = $r->saveOrder($this->t, $listDirn);
|
||||
}
|
||||
$sortFields = $this->getSortFields();
|
||||
|
||||
echo $r->jsJorderTable($listOrder);
|
||||
|
||||
|
||||
|
||||
echo $r->startForm($this->t['o'], $this->t['tasks'], 'adminForm');
|
||||
//echo $r->startFilter();
|
||||
//echo $r->selectFilterPublished('JOPTION_SELECT_PUBLISHED', $this->state->get('filter.published'));
|
||||
//echo $r->selectFilterLanguage('JOPTION_SELECT_LANGUAGE', $this->state->get('filter.language'));
|
||||
//echo $r->selectFilterCategory(PhocaDownloadCategory::options($this->t['o']), 'JOPTION_SELECT_CATEGORY', $this->state->get('filter.category_id'));
|
||||
//echo $r->endFilter();
|
||||
|
||||
echo $r->startMainContainer();
|
||||
|
||||
if (isset($this->tmpl['notapproved']->count) && (int)$this->tmpl['notapproved']->count > 0 ) {
|
||||
echo '<div class="alert alert-danger alert-dismissible">'.Text::_($this->t['l'].'_NOT_APPROVED_FILES_COUNT').': '
|
||||
.(int)$this->tmpl['notapproved']->count.'<button type="button" class="btn-close" data-bs-dismiss="alert"></button></div>';
|
||||
}
|
||||
/*
|
||||
echo $r->startFilterBar();
|
||||
echo $r->inputFilterSearch($this->t['l'].'_FILTER_SEARCH_LABEL', $this->t['l'].'_FILTER_SEARCH_DESC',
|
||||
$this->escape($this->state->get('filter.search')));
|
||||
echo $r->inputFilterSearchClear('JSEARCH_FILTER_SUBMIT', 'JSEARCH_FILTER_CLEAR');
|
||||
echo $r->inputFilterSearchLimit('JFIELD_PLG_SEARCH_SEARCHLIMIT_DESC', $this->pagination->getLimitBox());
|
||||
echo $r->selectFilterDirection('JFIELD_ORDERING_DESC', 'JGLOBAL_ORDER_ASCENDING', 'JGLOBAL_ORDER_DESCENDING', $listDirn);
|
||||
echo $r->selectFilterSortBy('JGLOBAL_SORT_BY', $sortFields, $listOrder);
|
||||
|
||||
echo $r->startFilterBar(2);
|
||||
echo $r->selectFilterPublished('JOPTION_SELECT_PUBLISHED', $this->state->get('filter.published'));
|
||||
echo $r->endFilterBar();
|
||||
|
||||
echo $r->endFilterBar();*/
|
||||
echo LayoutHelper::render('joomla.searchtools.default', array('view' => $this));
|
||||
|
||||
echo $r->startTable('categoryList');
|
||||
|
||||
echo $r->startTblHeader();
|
||||
|
||||
echo $r->firstColumnHeader($listDirn, $listOrder, 'a', true);
|
||||
///echo $r->secondColumnHeader($listDirn, $listOrder, 'a', true);
|
||||
|
||||
//echo '<th class="nowrap center hidden-phone ph-ordering"></th>';//$r->thOrderingXML('JGRID_HEADING_ORDERING', $listDirn, $listOrder);
|
||||
//echo $r->thCheck('JGLOBAL_CHECK_ALL');
|
||||
echo '<th class="ph-uploaduser">'.HTMLHelper::_('searchtools.sort', $this->t['l'].'_USER', 'username', $listDirn, $listOrder ).'</th>'."\n";
|
||||
//echo '<th class="ph-title-stat">'.JHtml::_('searchtools.sort', $this->t['l'].'_TITLE', 'd.title', $listDirn, $listOrder ).'</th>'."\n";
|
||||
echo '<th class="ph-filename-stat">'.HTMLHelper::_('searchtools.sort', $this->t['l'].'_FILE', 'filename', $listDirn, $listOrder ).'</th>'."\n";
|
||||
|
||||
//echo '<th class="ph-uploaduser">'.JHtml::_('searchtools.sort', $this->t['l'].'_USERNAME', 'username', $listDirn, $listOrder ).'</th>'."\n";
|
||||
echo '<th class="ph-count">'.HTMLHelper::_('searchtools.sort', $this->t['l'].'_COUNT', 'a.count', $listDirn, $listOrder ).'</th>'."\n";
|
||||
//echo '<th class="ph-id">'.JHtml::_('searchtools.sort', $this->t['l'].'_ID', 'a.id', $listDirn, $listOrder ).'</th>'."\n";
|
||||
|
||||
echo $r->endTblHeader();
|
||||
|
||||
echo $r->startTblBody($saveOrder, $saveOrderingUrl, $listDirn);
|
||||
|
||||
$originalOrders = array();
|
||||
$parentsStr = "";
|
||||
$j = 0;
|
||||
|
||||
if (is_array($this->items)) {
|
||||
foreach ($this->items as $i => $item) {
|
||||
//if ($i >= (int)$this->pagination->limitstart && $j < (int)$this->pagination->limit) {
|
||||
$j++;
|
||||
/*
|
||||
$urlEdit = 'index.php?option='.$this->t['o'].'&task='.$this->t['task'].'.edit&id=';
|
||||
$urlTask = 'index.php?option='.$this->t['o'].'&task='.$this->t['task'];
|
||||
$orderkey = array_search($item->id, $this->ordering[$item->catid]);
|
||||
$ordering = ($listOrder == 'a.ordering');
|
||||
$canCreate = $user->authorise('core.create', $this->t['o']);
|
||||
$canEdit = $user->authorise('core.edit', $this->t['o']);
|
||||
$canCheckin = $user->authorise('core.manage', 'com_checkin') || $item->checked_out==$user->get('id') || $item->checked_out==0;
|
||||
$canChange = $user->authorise('core.edit.state', $this->t['o']) && $canCheckin;
|
||||
$linkEdit = Route::_( $urlEdit. $item->id );
|
||||
|
||||
$linkCat = Route::_( 'index.php?option='.$this->t['o'].'&task='.$this->t['c'].'cat.edit&id='.(int) $item->category_id );
|
||||
$canEditCat = $user->authorise('core.edit', $this->t['o']);*/
|
||||
$canChange = false;
|
||||
$orderkey = 0;
|
||||
|
||||
echo $r->startTr($i, isset($item->catid) ? (int)$item->catid : 0);
|
||||
echo $r->firstColumn($i, $item->id, $canChange, $saveOrder, $orderkey, $item->ordering);
|
||||
///echo $r->secondColumn($i, $item->id, $canChange, $saveOrder, $orderkey, $item->ordering);
|
||||
|
||||
$usrO = $item->usernameno;
|
||||
if ($item->username) {$usrO = $usrO . ' ('.$item->username.')';}
|
||||
if (!$usrO) {
|
||||
$usrO = Text::_('COM_PHOCADOWNLOAD_GUEST');
|
||||
}
|
||||
echo $r->td($usrO, "small hidden-phone");
|
||||
|
||||
|
||||
|
||||
|
||||
//echo $r->td($this->escape($item->filetitle));
|
||||
echo $r->td($this->escape($item->filetitle) . ' ('.$this->escape($item->filename) . ')');
|
||||
|
||||
echo $r->td($this->escape($item->count), 'ph-right');
|
||||
|
||||
//echo $r->td($item->id, "small hidden-phone");
|
||||
|
||||
echo $r->endTr();
|
||||
|
||||
//}
|
||||
}
|
||||
}
|
||||
echo $r->endTblBody();
|
||||
|
||||
echo $r->tblFoot($this->pagination->getListFooter(), 15);
|
||||
echo $r->endTable();
|
||||
|
||||
|
||||
|
||||
//echo $r->formInputsXML($listOrder, $originalOrders);
|
||||
echo $r->formInputsXML($listOrder, $listDirn, $originalOrders);
|
||||
echo $r->endMainContainer();
|
||||
echo $r->endForm();
|
||||
?>
|
||||
@ -0,0 +1 @@
|
||||
<html><body bgcolor="#FFFFFF"></body></html>
|
||||
@ -0,0 +1,89 @@
|
||||
<?php
|
||||
/* @package Joomla
|
||||
* @copyright Copyright (C) Open Source Matters. All rights reserved.
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see LICENSE.php
|
||||
* @extension Phoca Extension
|
||||
* @copyright Copyright (C) Jan Pavelka www.phoca.cz
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
|
||||
*/
|
||||
defined('_JEXEC') or die();
|
||||
use Joomla\CMS\MVC\View\HtmlView;
|
||||
use Joomla\CMS\Toolbar\ToolbarHelper;
|
||||
use Joomla\CMS\Language\Text;
|
||||
use Joomla\CMS\Toolbar\Toolbar;
|
||||
jimport( 'joomla.application.component.view' );
|
||||
|
||||
class PhocaDownloadCpViewPhocaDownloadDownloads extends HtmlView
|
||||
{
|
||||
protected $items;
|
||||
protected $pagination;
|
||||
protected $state;
|
||||
protected $maxandsum;
|
||||
protected $t;
|
||||
protected $r;
|
||||
public $filterForm;
|
||||
public $activeFilters;
|
||||
|
||||
function display($tpl = null) {
|
||||
|
||||
$this->t = PhocaDownloadUtils::setVars('download');
|
||||
$this->r = new PhocaDownloadRenderAdminviews();
|
||||
$this->items = $this->get('Items');
|
||||
$this->pagination = $this->get('Pagination');
|
||||
$this->state = $this->get('State');
|
||||
$this->filterForm = $this->get('FilterForm');
|
||||
$this->activeFilters = $this->get('ActiveFilters');
|
||||
$this->maxandsum = $this->get('MaxAndSum');
|
||||
|
||||
|
||||
// Check for errors.
|
||||
if (count($errors = $this->get('Errors'))) {
|
||||
throw new Exception(implode("\n", $errors), 500);
|
||||
return false;
|
||||
}
|
||||
|
||||
$this->addToolbar();
|
||||
parent::display($tpl);
|
||||
|
||||
}
|
||||
|
||||
function addToolbar() {
|
||||
|
||||
require_once JPATH_COMPONENT.'/helpers/'.$this->t['tasks'].'.php';
|
||||
//$state = $this->get('State');
|
||||
$class = ucfirst($this->t['tasks']).'Helper';
|
||||
$canDo = $class::getActions($this->t);
|
||||
|
||||
ToolbarHelper::title( Text::_( $this->t['l'].'_DOWNLOADS' ), 'download' );
|
||||
|
||||
if ($canDo->get('core.edit')){
|
||||
|
||||
$bar = Toolbar::getInstance('toolbar');
|
||||
|
||||
$dhtml = '<button class="btn btn-small btn-danger" onclick="javascript:if(document.adminForm.boxchecked.value==0){alert(\''.Text::_('COM_PHOCADOWNLOAD_SELECT_ITEM_RESET').'\');}else{if(confirm(\''.Text::_('COM_PHOCADOWNLOAD_WARNING_RESET_DOWNLOADS').'\')){Joomla.submitbutton(\''.$this->t['tasks'].'.reset\');}}" ><i class="icon-reset" title="'.Text::_('COM_PHOCADOWNLOAD_RESET').'"></i> '.Text::_('COM_PHOCADOWNLOAD_RESET').'</button>';
|
||||
$bar->appendButton('Custom', $dhtml);
|
||||
ToolbarHelper::divider();
|
||||
//JToolbarHelper::custom('phocadownloaduserstat.reset', 'reset.png', '', 'COM_PHOCADOWNLOAD_RESET' , false);
|
||||
|
||||
if ($canDo->get('core.delete')) {
|
||||
ToolbarHelper::deleteList( Text::_( $this->t['l'].'_WARNING_DELETE_ITEMS' ), $this->t['tasks'].'.delete', $this->t['l'].'_DELETE');
|
||||
}
|
||||
}
|
||||
|
||||
//JToolbarHelper::cancel($this->t['tasks'].'.cancel', 'JTOOLBAR_CLOSE');
|
||||
|
||||
ToolbarHelper::help( 'screen.'.$this->t['c'], true );
|
||||
}
|
||||
|
||||
protected function getSortFields() {
|
||||
return array(
|
||||
|
||||
'username' => Text::_($this->t['l'] . '_USERNAME'),
|
||||
'a.count' => Text::_($this->t['l'] . '_COUNT'),
|
||||
'filename' => Text::_($this->t['l'] . '_FILENAME')
|
||||
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
?>
|
||||
@ -0,0 +1 @@
|
||||
<html><body bgcolor="#FFFFFF"></body></html>
|
||||
@ -0,0 +1,138 @@
|
||||
<?php
|
||||
/* @package Joomla
|
||||
* @copyright Copyright (C) Open Source Matters. All rights reserved.
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see LICENSE.php
|
||||
* @extension Phoca Extension
|
||||
* @copyright Copyright (C) Jan Pavelka www.phoca.cz
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
|
||||
*/
|
||||
defined('_JEXEC') or die;
|
||||
use Joomla\CMS\Factory;
|
||||
use Joomla\CMS\Language\Text;
|
||||
use Joomla\CMS\Router\SiteRouter;
|
||||
use Joomla\CMS\Uri\Uri;
|
||||
|
||||
use Joomla\CMS\Application\CMSApplication;
|
||||
|
||||
$extlink = 0;
|
||||
if (isset($this->item->extid) && $this->item->extid != '') {
|
||||
$extlink = 1;
|
||||
}
|
||||
|
||||
$r = $this->r;
|
||||
|
||||
Factory::getDocument()->addScriptDeclaration(
|
||||
|
||||
'Joomla.submitbutton = function(task) {
|
||||
if (task != "'. $this->t['task'].'.cancel" && document.getElementById("jform_catid").value == "") {
|
||||
alert("'. $this->escape(Text::_('JGLOBAL_VALIDATION_FORM_FAILED')) . ' - '. $this->escape(Text::_('COM_PHOCADOWNLOAD_CATEGORY_NOT_SELECTED')).'");
|
||||
} else if (task == "'. $this->t['task'].'.cancel" || document.formvalidator.isValid(document.getElementById("adminForm"))) {
|
||||
Joomla.submitform(task, document.getElementById("adminForm"));
|
||||
} else {
|
||||
Joomla.renderMessages({"error": ["'. Text::_('JGLOBAL_VALIDATION_FORM_FAILED', true).'"]});
|
||||
}
|
||||
}'
|
||||
|
||||
);
|
||||
|
||||
echo $r->startForm($this->t['o'], $this->t['task'], $this->item->id, 'adminForm', 'adminForm');
|
||||
// First Column
|
||||
echo '<div class="span12 form-horizontal">';
|
||||
$tabs = array (
|
||||
'general' => Text::_($this->t['l'].'_GENERAL_OPTIONS'),
|
||||
'publishing' => Text::_($this->t['l'].'_PUBLISHING_OPTIONS'),
|
||||
'metadata' => Text::_($this->t['l'].'_METADATA_OPTIONS'),
|
||||
'mirror' => Text::_($this->t['l'].'_MIRROR_DETAILS'),
|
||||
'video' => Text::_($this->t['l'].'_YOUTUBE_OPTIONS')
|
||||
);
|
||||
echo $r->navigation($tabs);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
$formArray = array ('title', 'alias');
|
||||
echo $r->groupHeader($this->form, $formArray);
|
||||
|
||||
echo $r->startTabs();
|
||||
|
||||
echo $r->startTab('general', $tabs['general'], 'active');
|
||||
$formArray = array ('catid', 'ordering',
|
||||
'filename', 'filename_play', 'filename_preview', 'image_filename', 'image_filename_spec1', 'image_filename_spec2', 'image_download', 'project_name', 'version', 'author', 'author_url', 'author_email', 'license', 'license_url', 'confirm_license', 'directlink', 'link_external', 'access', 'unaccessible_file', 'userid', 'owner_id');
|
||||
echo $r->group($this->form, $formArray);
|
||||
$formArray = array('description', 'features', 'changelog', 'notes' );
|
||||
echo $r->group($this->form, $formArray, 1);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
echo $r->endTab();
|
||||
|
||||
echo $r->startTab('publishing', $tabs['publishing']);
|
||||
|
||||
$additionalBox = '';
|
||||
if (isset($this->item->id) && isset($this->item->catid) && isset($this->item->token)
|
||||
&& (int)$this->item->id > 0 && (int)$this->item->catid > 0 && $this->item->token != '') {
|
||||
|
||||
phocadownloadimport('phocadownload.path.route');
|
||||
$downloadLink = PhocaDownloadRoute::getDownloadRoute((int)$this->item->id, (int)$this->item->catid, $this->item->token, 0);
|
||||
//$app = CMSApplication::getInstance('site');
|
||||
//$router = $app->getRouter();
|
||||
$router = Factory::getContainer()->get(SiteRouter::class);
|
||||
$uri = $router->build($downloadLink);
|
||||
$frontendUrl = str_replace(Uri::root(true).'/administrator/', '',$uri->toString());
|
||||
$frontendUrl = str_replace(Uri::root(true), '', $frontendUrl);
|
||||
$frontendUrl = str_replace('\\', '/', $frontendUrl);
|
||||
//$frontendUrl = JUri::root(false). str_replace('//', '/', $frontendUrl);
|
||||
$frontendUrl = preg_replace('/([^:])(\/{2,})/', '$1/', Uri::root(false). $frontendUrl);
|
||||
$additionalBox .= '<div>'.Text::_('COM_PHOCADOWNLOAD_UNIQUE_DOWNLOAD_URL').'</div>';
|
||||
$additionalBox .= '<textarea class="form-control ph-admin-additional-box-textarea">'.$frontendUrl.'</textarea>';
|
||||
$additionalBox .= '<div><small>('.Text::_('COM_PHOCADOWNLOAD_URL_FORMAT_DEPENDS_ON_SEF').')</small></div>';
|
||||
|
||||
echo '<div class="ph-admin-additional-box">'.$additionalBox.'</div>';
|
||||
}
|
||||
|
||||
|
||||
foreach($this->form->getFieldset('publish') as $field) {
|
||||
echo '<div class="control-group">';
|
||||
if (!$field->hidden) {
|
||||
echo '<div class="control-label">'.$field->label.'</div>';
|
||||
}
|
||||
echo '<div class="controls">';
|
||||
|
||||
echo $field->input;
|
||||
echo '</div></div>';
|
||||
}
|
||||
echo $r->endTab();
|
||||
|
||||
echo $r->startTab('metadata', $tabs['metadata']);
|
||||
echo $this->loadTemplate('metadata');
|
||||
echo $r->endTab();
|
||||
|
||||
echo $r->startTab('mirror', $tabs['mirror']);
|
||||
$formArray = array ('mirror1link', 'mirror1title', 'mirror1target', 'mirror2link', 'mirror2title', 'mirror2target');
|
||||
echo $r->group($this->form, $formArray);
|
||||
echo $r->endTab();
|
||||
|
||||
echo $r->startTab('video', $tabs['video']);
|
||||
$formArray = array ('video_filename');
|
||||
echo $r->group($this->form, $formArray);
|
||||
echo $r->endTab();
|
||||
|
||||
|
||||
echo $r->endTabs();
|
||||
//echo '</div>';//end span10
|
||||
// Second Column
|
||||
//echo '<div class="span2">';
|
||||
|
||||
|
||||
echo '</div>';//end span2
|
||||
|
||||
|
||||
|
||||
echo $r->formInputs($this->t['task']);
|
||||
echo $r->endForm();
|
||||
?>
|
||||
|
||||
@ -0,0 +1,31 @@
|
||||
<?php
|
||||
/* @package Joomla
|
||||
* @copyright Copyright (C) Open Source Matters. All rights reserved.
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see LICENSE.php
|
||||
* @extension Phoca Extension
|
||||
* @copyright Copyright (C) Jan Pavelka www.phoca.cz
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
|
||||
*/
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
$fieldSets = $this->form->getFieldsets('metadata');
|
||||
foreach ($fieldSets as $name => $fieldSet) :
|
||||
?>
|
||||
<fieldset class="panelform">
|
||||
<div class="adminform">
|
||||
<?php if ($name == 'metadata') : // Include the real fields in this panel. ?>
|
||||
<div class="control-group">
|
||||
<div class="control-label"><?php echo $this->form->getLabel('metadesc'); ?></div>
|
||||
<div class="controls"><?php echo $this->form->getInput('metadesc'); ?></div></div>
|
||||
<div class="control-group">
|
||||
<div class="control-label"><?php echo $this->form->getLabel('metakey'); ?></div>
|
||||
<div class="controls"><?php echo $this->form->getInput('metakey'); ?></div></div>
|
||||
<?php endif; ?>
|
||||
<?php foreach ($this->form->getFieldset($name) as $field) : ?>
|
||||
<div class="control-group">
|
||||
<div class="control-label"><?php echo $field->label; ?>
|
||||
<div class="controls"><?php echo $field->input; ?></div></div>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
</fieldset>
|
||||
<?php endforeach; ?>
|
||||
@ -0,0 +1,83 @@
|
||||
<?php
|
||||
/* @package Joomla
|
||||
* @copyright Copyright (C) Open Source Matters. All rights reserved.
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see LICENSE.php
|
||||
* @extension Phoca Extension
|
||||
* @copyright Copyright (C) Jan Pavelka www.phoca.cz
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
|
||||
*/
|
||||
defined('_JEXEC') or die;
|
||||
use Joomla\CMS\HTML\HTMLHelper;
|
||||
use Joomla\CMS\Language\Text;
|
||||
use Joomla\CMS\Factory;
|
||||
/*JHtml::_('behavior.tooltip');
|
||||
JHtml::_('behavior.formvalidation');
|
||||
JHtml::_('behavior.keepalive');
|
||||
JHtml::_('formbehavior.chosen', 'select');
|
||||
*/
|
||||
$extlink = 0;
|
||||
if (isset($this->item->extid) && $this->item->extid != '') {
|
||||
$extlink = 1;
|
||||
}
|
||||
|
||||
$r = $this->r;
|
||||
|
||||
|
||||
Factory::getDocument()->addScriptDeclaration(
|
||||
|
||||
'Joomla.submitbutton = function(task) {
|
||||
if (task != "'. $this->t['task'].'.cancel" && document.getElementById("jform_catid").value == "") {
|
||||
alert("'. $this->escape(Text::_('JGLOBAL_VALIDATION_FORM_FAILED')) . ' - '. $this->escape(Text::_('COM_PHOCADOWNLOAD_CATEGORY_NOT_SELECTED')).'");
|
||||
} else if (task == "'. $this->t['task'].'.cancel" || document.formvalidator.isValid(document.getElementById("adminForm"))) {
|
||||
Joomla.submitform(task, document.getElementById("adminForm"));
|
||||
} else {
|
||||
Joomla.renderMessages({"error": ["'. Text::_('JGLOBAL_VALIDATION_FORM_FAILED', true).'"]});
|
||||
}
|
||||
}'
|
||||
|
||||
);
|
||||
|
||||
echo $r->startForm($this->t['o'], $this->t['task'], $this->item->id, 'adminForm', 'adminForm');
|
||||
// First Column
|
||||
echo '<div class="span12 form-horizontal">';
|
||||
$tabs = array (
|
||||
'general' => Text::_($this->t['l'].'_GENERAL_OPTIONS'),
|
||||
'publishing' => Text::_($this->t['l'].'_PUBLISHING_OPTIONS')
|
||||
);
|
||||
echo $r->navigation($tabs);
|
||||
|
||||
$formArray = array ('title', 'alias');
|
||||
echo $r->groupHeader($this->form, $formArray);
|
||||
|
||||
echo $r->startTabs();
|
||||
|
||||
echo $r->startTab('general', $tabs['general'], 'active');
|
||||
$formArray = array ( 'catid', 'ordering','access');
|
||||
echo $r->group($this->form, $formArray);
|
||||
$formArray = array('description');
|
||||
echo $r->group($this->form, $formArray, 1);
|
||||
echo $r->endTab();
|
||||
|
||||
echo $r->startTab('publishing', $tabs['publishing']);
|
||||
foreach($this->form->getFieldset('publish') as $field) {
|
||||
echo '<div class="control-group">';
|
||||
if (!$field->hidden) {
|
||||
echo '<div class="control-label">'.$field->label.'</div>';
|
||||
}
|
||||
echo '<div class="controls">';
|
||||
echo $field->input;
|
||||
echo '</div></div>';
|
||||
}
|
||||
echo $r->endTab();
|
||||
|
||||
|
||||
echo $r->endTabs();
|
||||
echo '</div>';//end span10
|
||||
// Second Column
|
||||
//echo '<div class="span2"></div>';//end span2
|
||||
|
||||
echo '<input type="hidden" name="jform[filename]" id="jform_filename" value="-" />'
|
||||
.'<input type="hidden" name="jform[textonly]" id="jform_textonly" value="1" />';
|
||||
echo $r->formInputs($this->t['task']);
|
||||
echo $r->endForm();
|
||||
?>
|
||||
@ -0,0 +1 @@
|
||||
<html><body bgcolor="#FFFFFF"></body></html>
|
||||
@ -0,0 +1,77 @@
|
||||
<?php
|
||||
/* @package Joomla
|
||||
* @copyright Copyright (C) Open Source Matters. All rights reserved.
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see LICENSE.php
|
||||
* @extension Phoca Extension
|
||||
* @copyright Copyright (C) Jan Pavelka www.phoca.cz
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
|
||||
*/
|
||||
defined('_JEXEC') or die();
|
||||
use Joomla\CMS\MVC\View\HtmlView;
|
||||
use Joomla\CMS\Factory;
|
||||
use Joomla\CMS\Toolbar\Toolbar;
|
||||
use Joomla\CMS\Language\Text;
|
||||
use Joomla\CMS\Toolbar\ToolbarHelper;
|
||||
jimport( 'joomla.application.component.view' );
|
||||
|
||||
class PhocaDownloadCpViewPhocaDownloadFile extends HtmlView
|
||||
{
|
||||
protected $state;
|
||||
protected $item;
|
||||
protected $form;
|
||||
protected $t;
|
||||
protected $r;
|
||||
|
||||
public function display($tpl = null) {
|
||||
|
||||
$this->t = PhocaDownloadUtils::setVars('file');
|
||||
$this->r = new PhocaDownloadRenderAdminView();
|
||||
$this->state = $this->get('State');
|
||||
$this->form = $this->get('Form');
|
||||
$this->item = $this->get('Item');
|
||||
|
||||
|
||||
if (isset($this->item->textonly) && (int)$this->item->textonly == 1 && Factory::getApplication()->input->get('layout') != 'edit_text') {
|
||||
$tpl = 'text';
|
||||
}
|
||||
$this->addToolbar();
|
||||
parent::display($tpl);
|
||||
}
|
||||
|
||||
protected function addToolbar() {
|
||||
|
||||
require_once JPATH_COMPONENT.'/helpers/'.$this->t['tasks'].'.php';
|
||||
Factory::getApplication()->input->set('hidemainmenu', true);
|
||||
$bar = Toolbar::getInstance('toolbar');
|
||||
$user = Factory::getUser();
|
||||
$isNew = ($this->item->id == 0);
|
||||
$checkedOut = !($this->item->checked_out == 0 || $this->item->checked_out == $user->get('id'));
|
||||
$class = ucfirst($this->t['tasks']).'Helper';
|
||||
$canDo = $class::getActions($this->t, $this->state->get('filter.category_id'));
|
||||
|
||||
$text = $isNew ? Text::_( $this->t['l'] . '_NEW' ) : Text::_($this->t['l'] . '_EDIT');
|
||||
ToolbarHelper::title( Text::_( $this->t['l'] . '_FILE' ).': <small><small>[ ' . $text.' ]</small></small>' , 'file');
|
||||
|
||||
// If not checked out, can save the item.
|
||||
if (!$checkedOut && $canDo->get('core.edit')){
|
||||
ToolbarHelper::apply($this->t['task'] . '.apply', 'JTOOLBAR_APPLY');
|
||||
ToolbarHelper::save($this->t['task'] . '.save', 'JTOOLBAR_SAVE');
|
||||
ToolbarHelper::addNew($this->t['task'] . '.save2new', 'JTOOLBAR_SAVE_AND_NEW');
|
||||
|
||||
}
|
||||
// If an existing item, can save to a copy.
|
||||
if (!$isNew && $canDo->get('core.create')) {
|
||||
//JToolbarHelper::custom($this->t.'.save2copy', 'copy.png', 'copy_f2.png', 'JTOOLBAR_SAVE_AS_COPY', false);
|
||||
}
|
||||
if (empty($this->item->id)) {
|
||||
ToolbarHelper::cancel($this->t['task'] . '.cancel', 'JTOOLBAR_CANCEL');
|
||||
}
|
||||
else {
|
||||
ToolbarHelper::cancel($this->t['task'] . '.cancel', 'JTOOLBAR_CLOSE');
|
||||
}
|
||||
|
||||
ToolbarHelper::divider();
|
||||
ToolbarHelper::help( 'screen.'.$this->t['c'], true );
|
||||
}
|
||||
}
|
||||
?>
|
||||
@ -0,0 +1 @@
|
||||
<html><body bgcolor="#FFFFFF"></body></html>
|
||||
@ -0,0 +1,170 @@
|
||||
<?php
|
||||
/*
|
||||
* @package Joomla
|
||||
* @copyright Copyright (C) Open Source Matters. All rights reserved.
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see LICENSE.php
|
||||
* @component Phoca Gallery
|
||||
* @copyright Copyright (C) Jan Pavelka www.phoca.cz
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
|
||||
*/
|
||||
defined('_JEXEC') or die;
|
||||
use Joomla\CMS\Factory;
|
||||
use Joomla\CMS\Language\Text;
|
||||
use Joomla\CMS\Layout\LayoutHelper;
|
||||
use Joomla\CMS\HTML\HTMLHelper;
|
||||
use Joomla\CMS\Router\Route;
|
||||
|
||||
$r = $this->r;
|
||||
$user = Factory::getUser();
|
||||
$userId = $user->get('id');
|
||||
$listOrder = $this->escape($this->state->get('list.ordering'));
|
||||
$listDirn = $this->escape($this->state->get('list.direction'));
|
||||
$canOrder = $user->authorise('core.edit.state', $this->t['o']);
|
||||
$saveOrder = $listOrder == 'a.ordering';
|
||||
$saveOrderingUrl = '';
|
||||
if ($saveOrder && !empty($this->items)) {
|
||||
$saveOrderingUrl = $r->saveOrder($this->t, $listDirn);
|
||||
}
|
||||
$sortFields = $this->getSortFields();
|
||||
|
||||
echo $r->jsJorderTable($listOrder);
|
||||
|
||||
|
||||
echo $r->startForm($this->t['o'], $this->t['tasks'], 'adminForm');
|
||||
//echo $r->startFilter();
|
||||
//echo $r->endFilter();
|
||||
|
||||
echo $r->startMainContainer();
|
||||
|
||||
if (isset($this->tmpl['notapproved']->count) && (int)$this->tmpl['notapproved']->count > 0 ) {
|
||||
echo '<div class="alert alert-danger alert-dismissible">'.Text::_($this->t['l'].'_NOT_APPROVED_FILES_COUNT').': '
|
||||
.(int)$this->tmpl['notapproved']->count.'<button type="button" class="btn-close" data-bs-dismiss="alert"></button></div>';
|
||||
}
|
||||
/*
|
||||
echo $r->startFilterBar();
|
||||
echo $r->inputFilterSearch($this->t['l'].'_FILTER_SEARCH_LABEL', $this->t['l'].'_FILTER_SEARCH_DESC',
|
||||
$this->escape($this->state->get('filter.search')));
|
||||
echo $r->inputFilterSearchClear('JSEARCH_FILTER_SUBMIT', 'JSEARCH_FILTER_CLEAR');
|
||||
echo $r->inputFilterSearchLimit('JFIELD_PLG_SEARCH_SEARCHLIMIT_DESC', $this->pagination->getLimitBox());
|
||||
echo $r->selectFilterDirection('JFIELD_ORDERING_DESC', 'JGLOBAL_ORDER_ASCENDING', 'JGLOBAL_ORDER_DESCENDING', $listDirn);
|
||||
echo $r->selectFilterSortBy('JGLOBAL_SORT_BY', $sortFields, $listOrder);
|
||||
|
||||
echo $r->startFilterBar(2);
|
||||
echo $r->selectFilterPublished('JOPTION_SELECT_PUBLISHED', $this->state->get('filter.published'));
|
||||
echo $r->selectFilterLanguage('JOPTION_SELECT_LANGUAGE', $this->state->get('filter.language'));
|
||||
echo $r->selectFilterCategory(PhocaDownloadCategory::options($this->t['o']), 'JOPTION_SELECT_CATEGORY', $this->state->get('filter.category_id'));
|
||||
echo $r->endFilterBar();
|
||||
|
||||
echo $r->endFilterBar();*/
|
||||
echo LayoutHelper::render('joomla.searchtools.default', array('view' => $this));
|
||||
|
||||
echo $r->startTable('categoryList');
|
||||
|
||||
echo $r->startTblHeader();
|
||||
echo $r->firstColumnHeader($listDirn, $listOrder);
|
||||
echo $r->secondColumnHeader($listDirn, $listOrder);
|
||||
//echo $r->thOrderingXML('JGRID_HEADING_ORDERING', $listDirn, $listOrder);
|
||||
//echo $r->thCheck('JGLOBAL_CHECK_ALL');
|
||||
echo '<th class="ph-title">'.HTMLHelper::_('searchtools.sort', $this->t['l'].'_TITLE', 'a.title', $listDirn, $listOrder ).'</th>'."\n";
|
||||
echo '<th class="ph-filename-long">'.HTMLHelper::_('searchtools.sort', $this->t['l'].'_FILENAME', 'a.filename', $listDirn, $listOrder ).'</th>'."\n";
|
||||
echo '<th class="ph-published">'.HTMLHelper::_('searchtools.sort', $this->t['l'].'_PUBLISHED', 'a.published', $listDirn, $listOrder ).'</th>'."\n";
|
||||
echo '<th class="ph-approved">'.HTMLHelper::_('searchtools.sort', $this->t['l'].'_APPROVED', 'a.approved', $listDirn, $listOrder ).'</th>'."\n";
|
||||
echo '<th class="ph-parentcattitle">'.HTMLHelper::_('searchtools.sort', $this->t['l'].'_CATEGORY', 'category_id', $listDirn, $listOrder ).'</th>'."\n";
|
||||
echo '<th class="ph-owner">'.HTMLHelper::_('searchtools.sort', $this->t['l'].'_OWNER', 'a.owner_id', $listDirn, $listOrder ).'</th>'."\n";
|
||||
echo '<th class="ph-uploaduser">'.HTMLHelper::_('searchtools.sort', $this->t['l'].'_UPLOADED_BY', 'uploadusername', $listDirn, $listOrder ).'</th>'."\n";
|
||||
echo '<th class="ph-hits">'.HTMLHelper::_('searchtools.sort', $this->t['l'].'_DOWNLOADS', 'a.hits', $listDirn, $listOrder ).'</th>'."\n";
|
||||
echo '<th class="ph-active">'.Text::_($this->t['l'].'_ACTIVE').'</th>'."\n";
|
||||
echo '<th class="ph-access">'.Text::_($this->t['l'].'_ACCESS').'</th>'."\n";
|
||||
echo '<th class="ph-language">'.HTMLHelper::_('searchtools.sort', 'JGRID_HEADING_LANGUAGE', 'a.language', $listDirn, $listOrder ).'</th>'."\n";
|
||||
echo '<th class="ph-id">'.HTMLHelper::_('searchtools.sort', $this->t['l'].'_ID', 'a.id', $listDirn, $listOrder ).'</th>'."\n";
|
||||
|
||||
echo $r->endTblHeader();
|
||||
|
||||
echo $r->startTblBody($saveOrder, $saveOrderingUrl, $listDirn);
|
||||
|
||||
$originalOrders = array();
|
||||
$parentsStr = "";
|
||||
$j = 0;
|
||||
|
||||
if (is_array($this->items)) {
|
||||
foreach ($this->items as $i => $item) {
|
||||
//if ($i >= (int)$this->pagination->limitstart && $j < (int)$this->pagination->limit) {
|
||||
$j++;
|
||||
|
||||
$urlEdit = 'index.php?option='.$this->t['o'].'&task='.$this->t['task'].'.edit&id=';
|
||||
$urlTask = 'index.php?option='.$this->t['o'].'&task='.$this->t['task'];
|
||||
$orderkey = array_search($item->id, $this->ordering[$item->catid]);
|
||||
$ordering = ($listOrder == 'a.ordering');
|
||||
$canCreate = $user->authorise('core.create', $this->t['o']);
|
||||
$canEdit = $user->authorise('core.edit', $this->t['o']);
|
||||
$canCheckin = $user->authorise('core.manage', 'com_checkin') || $item->checked_out==$user->get('id') || $item->checked_out==0;
|
||||
$canChange = $user->authorise('core.edit.state', $this->t['o']) && $canCheckin;
|
||||
$linkEdit = Route::_( $urlEdit. $item->id );
|
||||
|
||||
$linkCat = Route::_( 'index.php?option='.$this->t['o'].'&task='.$this->t['c'].'cat.edit&id='.(int) $item->category_id );
|
||||
$canEditCat = $user->authorise('core.edit', $this->t['o']);
|
||||
|
||||
|
||||
echo $r->startTr($i, isset($item->catid) ? (int)$item->catid : 0);
|
||||
echo $r->firstColumn($i, $item->id, $canChange, $saveOrder, $orderkey, $item->ordering);
|
||||
echo $r->secondColumn($i, $item->id, $canChange, $saveOrder, $orderkey, $item->ordering);
|
||||
|
||||
$checkO = '';
|
||||
if ($item->checked_out) {
|
||||
$checkO .= HTMLHelper::_('jgrid.checkedout', $i, $item->editor, $item->checked_out_time, $this->t['tasks'].'.', $canCheckin);
|
||||
}
|
||||
if ($canCreate || $canEdit) {
|
||||
$checkO .= '<a href="'. Route::_($linkEdit).'">'. $this->escape($item->title).'</a>';
|
||||
} else {
|
||||
$checkO .= $this->escape($item->title);
|
||||
}
|
||||
$checkO .= '<br /><span class="smallsub">(<span>'.Text::_($this->t['l'].'_FIELD_ALIAS_LABEL').':</span>'. $this->escape($item->alias).')</span>';
|
||||
echo $r->td($checkO, "small hidden-phone ph-wrap-12");
|
||||
|
||||
echo $r->td($item->filename, "small ph-wrap-12");
|
||||
|
||||
echo $r->td(HTMLHelper::_('jgrid.published', $item->published, $i, $this->t['tasks'].'.', $canChange), "small hidden-phone");
|
||||
echo $r->td(PhocaDownloadJGrid::approved( $item->approved, $i, $this->t['tasks'].'.', $canChange), "small hidden-phone");
|
||||
|
||||
if ($canEditCat) {
|
||||
$catO = '<a href="'. Route::_($linkCat).'">'. $this->escape($item->category_title).'</a>';
|
||||
} else {
|
||||
$catO = $this->escape($item->category_title);
|
||||
}
|
||||
echo $r->td($catO, "small hidden-phone");
|
||||
//echo $r->td($this->escape($item->access_level), "small hidden-phone");
|
||||
|
||||
$usrO = $item->usernameno;
|
||||
if ($item->username) {$usrO = $usrO . ' ('.$item->username.')';}
|
||||
echo $r->td($usrO, "small hidden-phone");
|
||||
|
||||
$usrU = $item->uploadname;
|
||||
if ($item->uploadusername) {$usrU = $usrU . ' ('.$item->uploadusername.')';}
|
||||
echo $r->td($usrU, "small hidden-phone");
|
||||
|
||||
echo $r->td($item->hits, "small hidden-phone");
|
||||
|
||||
echo $r->tdPublishDownUp ($item->publish_up, $item->publish_down, "small hidden-phone");
|
||||
|
||||
echo $r->td($this->escape($item->access_level), 'small hidden-phone');
|
||||
|
||||
echo $r->tdLanguage($item->language, $item->language_title, $this->escape($item->language_title));
|
||||
echo $r->td($item->id, "small hidden-phone");
|
||||
|
||||
echo $r->endTr();
|
||||
|
||||
//}
|
||||
}
|
||||
}
|
||||
echo $r->endTblBody();
|
||||
|
||||
echo $r->tblFoot($this->pagination->getListFooter(), 15);
|
||||
echo $r->endTable();
|
||||
|
||||
echo $this->loadTemplate('batch');
|
||||
|
||||
//echo $r->formInputsXML($listOrder, $originalOrders);
|
||||
echo $r->formInputsXML($listOrder, $listDirn, $originalOrders);
|
||||
echo $r->endMainContainer();
|
||||
echo $r->endForm();
|
||||
?>
|
||||
@ -0,0 +1,59 @@
|
||||
<?php
|
||||
/* @package Joomla
|
||||
* @copyright Copyright (C) Open Source Matters. All rights reserved.
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see LICENSE.php
|
||||
* @extension Phoca Extension
|
||||
* @copyright Copyright (C) Jan Pavelka www.phoca.cz
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
use Joomla\CMS\Language\Text;
|
||||
use Joomla\CMS\Layout\LayoutHelper;
|
||||
|
||||
//$published = $this->state->get('filter.published');
|
||||
?>
|
||||
|
||||
<div id="collapseModal" role="dialog" tabindex="-1" class="joomla-modal modal fade">
|
||||
<div class="modal-dialog modal-lg">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h3 class="modal-title"><?php echo Text::_('COM_PHOCADOWNLOAD_BATCH_OPTIONS_FILES');?></h3>
|
||||
<button type="button" class="btn-close novalidate" data-bs-dismiss="modal" aria-label="<?php Text::_('COM_PHOCADOWNLOAD_CLOSE'); ?>">
|
||||
</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
|
||||
<div class="p-3">
|
||||
<div class="row">
|
||||
<div class="form-group col-md-6">
|
||||
<div class="controls"><?php echo LayoutHelper::render('joomla.html.batch.access', []);?></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="form-group col-md-6">
|
||||
<div class="controls"><?php echo LayoutHelper::render('joomla.html.batch.language', []); ?></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="form-group col-md-6">
|
||||
<div class="controls"><?php echo PhocaDownloadBatch::item('', 0); ?></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="modal-footer">
|
||||
<button class="btn" type="button" onclick="document.getElementById('batch-category-id').value='';document.getElementById('batch-access').value='';document.getElementById('batch-language-id').value=''" data-bs-dismiss="modal">
|
||||
<?php echo Text::_('JCANCEL'); ?>
|
||||
</button>
|
||||
<button class="btn btn-primary" type="submit" onclick="Joomla.submitbutton('<?php echo $this->t['task'] ?>.batch');" id="batch-submit-button-id" data-submit-task="<?php echo $this->t['task'] ?>.batch">
|
||||
<?php echo Text::_('JGLOBAL_BATCH_PROCESS'); ?>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -0,0 +1 @@
|
||||
<html><body bgcolor="#FFFFFF"></body></html>
|
||||
@ -0,0 +1,150 @@
|
||||
<?php
|
||||
/* @package Joomla
|
||||
* @copyright Copyright (C) Open Source Matters. All rights reserved.
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see LICENSE.php
|
||||
* @extension Phoca Extension
|
||||
* @copyright Copyright (C) Jan Pavelka www.phoca.cz
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
|
||||
*/
|
||||
|
||||
defined( '_JEXEC' ) or die();
|
||||
use Joomla\CMS\Language\Text;
|
||||
use Joomla\CMS\MVC\View\HtmlView;
|
||||
use Joomla\CMS\Factory;
|
||||
use Joomla\CMS\Toolbar\Toolbar;
|
||||
use Joomla\CMS\Toolbar\ToolbarHelper;
|
||||
use Joomla\CMS\HTML\HTMLHelper;
|
||||
jimport( 'joomla.application.component.view' );
|
||||
|
||||
class PhocaDownloadCpViewPhocaDownloadFiles extends HtmlView
|
||||
{
|
||||
|
||||
protected $items;
|
||||
protected $pagination;
|
||||
protected $state;
|
||||
protected $t;
|
||||
protected $r;
|
||||
public $filterForm;
|
||||
public $activeFilters;
|
||||
|
||||
function display($tpl = null) {
|
||||
|
||||
$this->t = PhocaDownloadUtils::setVars('file');
|
||||
$this->r = new PhocaDownloadRenderAdminViews();
|
||||
$this->items = $this->get('Items');
|
||||
$this->pagination = $this->get('Pagination');
|
||||
$this->state = $this->get('State');
|
||||
$this->filterForm = $this->get('FilterForm');
|
||||
$this->activeFilters = $this->get('ActiveFilters');
|
||||
|
||||
// Preprocess the list of items to find ordering divisions.
|
||||
foreach ($this->items as &$item) {
|
||||
$this->ordering[$item->catid][] = $item->id;
|
||||
}
|
||||
|
||||
|
||||
$this->tmpl['notapproved'] = $this->get( 'NotApprovedFile' );
|
||||
|
||||
$this->addToolbar();
|
||||
parent::display($tpl);
|
||||
}
|
||||
|
||||
protected function addToolbar() {
|
||||
|
||||
require_once JPATH_COMPONENT.'/helpers/'.$this->t['tasks'].'.php';
|
||||
$state = $this->get('State');
|
||||
$class = ucfirst($this->t['tasks']).'Helper';
|
||||
$canDo = $class::getActions($this->t, $state->get('filter.file_id'));
|
||||
$user = Factory::getUser();
|
||||
$bar = Toolbar::getInstance('toolbar');
|
||||
|
||||
ToolbarHelper::title( Text::_($this->t['l'].'_FILES'), 'file.png' );
|
||||
if ($canDo->get('core.create')) {
|
||||
ToolbarHelper::addNew( $this->t['task'].'.add','JTOOLBAR_NEW');
|
||||
ToolbarHelper::addNew( $this->t['task'].'.addtext', $this->t['l'].'_ADD_TEXT');
|
||||
ToolbarHelper::custom( $this->t['c'].'m.edit', 'multiple.png', '', $this->t['l'].'_MULTIPLE_ADD' , false);
|
||||
}
|
||||
|
||||
if ($canDo->get('core.edit')) {
|
||||
ToolbarHelper::editList($this->t['task'].'.edit','JTOOLBAR_EDIT');
|
||||
}
|
||||
|
||||
if ($canDo->get('core.create')) {
|
||||
//JToolbarHelper::divider();
|
||||
//JToolbarHelper::custom( $this->t['task'].'.copyquick','copy.png', '', $this->t['l'].'_QUICK_COPY', true);
|
||||
//JToolbarHelper::custom( $this->t['task'].'.copy','copy.png', '', $this->t['l'].'_COPY', true);
|
||||
}
|
||||
|
||||
$dropdown = $bar->dropdownButton('status-group')->text('JTOOLBAR_CHANGE_STATUS')->toggleSplit(false)->icon('icon-ellipsis-h')->buttonClass('btn btn-action')->listCheck(true);
|
||||
$childBar = $dropdown->getChildToolbar();
|
||||
|
||||
if ($canDo->get('core.edit.state')) {
|
||||
|
||||
//ToolbarHelper::divider();
|
||||
$childBar->publish($this->t['tasks'].'.publish')->listCheck(true);
|
||||
$childBar->unpublish($this->t['tasks'].'.unpublish')->listCheck(true);
|
||||
$childBar->standardButton('approve')->text($this->t['l'].'_APPROVE')->task($this->t['tasks'].'.approve')->listCheck(true);
|
||||
$childBar->standardButton('disapprove')->text($this->t['l'].'_NOT_APPROVE')->task($this->t['tasks'].'.disapprove')->listCheck(true);
|
||||
//ToolbarHelper::custom($this->t['tasks'].'.publish', 'publish.png', 'publish_f2.png','JTOOLBAR_PUBLISH', true);
|
||||
//ToolbarHelper::custom($this->t['tasks'].'.unpublish', 'unpublish.png', 'unpublish_f2.png', 'JTOOLBAR_UNPUBLISH', true);
|
||||
//ToolbarHelper::custom( $this->t['tasks'].'.approve', 'approve.png', '', $this->t['l'].'_APPROVE' , true);
|
||||
//ToolbarHelper::custom( $this->t['tasks'].'.disapprove', 'disapprove.png', '', $this->t['l'].'_NOT_APPROVE' , true);
|
||||
}
|
||||
|
||||
if ($canDo->get('core.delete')) {
|
||||
$childBar->delete($this->t['tasks'].'.delete')->text($this->t['l'].'_DELETE')->message( $this->t['l'].'_WARNING_DELETE_ITEMS')->icon('icon-trash')->listCheck(true);
|
||||
//ToolbarHelper::deleteList( Text::_( $this->t['l'].'_WARNING_DELETE_ITEMS' ), $this->t['tasks'].'.delete', $this->t['l'].'_DELETE');
|
||||
}
|
||||
|
||||
// Add a batch button
|
||||
if ($user->authorise('core.edit'))
|
||||
{
|
||||
|
||||
/*$title = Text::_('JTOOLBAR_BATCH');
|
||||
|
||||
$dhtml = '<joomla-toolbar-button id="toolbar-batch" list-selection>';
|
||||
$dhtml .= "<button data-bs-toggle=\"modal\" data-bs-target=\"#collapseModal\" class=\"btn btn-small\">
|
||||
<i class=\"icon-checkbox-partial\" title=\"$title\"></i>
|
||||
$title</button>";
|
||||
$dhtml .= '</joomla-toolbar-button>';
|
||||
|
||||
$bar->appendButton('Custom', $dhtml, 'batch');*/
|
||||
|
||||
|
||||
/*$bar->popupButton('batch')
|
||||
->text('JTOOLBAR_BATCH')
|
||||
->selector('collapseModal')
|
||||
->listCheck(true);*/
|
||||
$childBar->popupButton('batch')->text('JTOOLBAR_BATCH')->selector('collapseModal')->listCheck(true);
|
||||
|
||||
|
||||
/*HTMLHelper::_('bootstrap.renderModal', 'collapseModal');
|
||||
$title = \JText::_('JTOOLBAR_BATCHx');
|
||||
$layout = new \JLayoutFile('joomla.toolbar.batch');
|
||||
$dhtml = $layout->render(array('title' => $title));
|
||||
\JToolbar::getInstance('toolbar')->appendButton('Custom', $dhtml, 'batch');*/
|
||||
|
||||
}
|
||||
|
||||
ToolbarHelper::divider();
|
||||
ToolbarHelper::help( 'screen.'.$this->t['c'], true );
|
||||
}
|
||||
|
||||
protected function getSortFields() {
|
||||
return array(
|
||||
'a.ordering' => Text::_('JGRID_HEADING_ORDERING'),
|
||||
'a.title' => Text::_($this->t['l'] . '_TITLE'),
|
||||
'a.filename' => Text::_($this->t['l'] . '_FILENAME'),
|
||||
'a.date' => Text::_($this->t['l'] . '_DATE'),
|
||||
'a.hits' => Text::_($this->t['l'] . '_DOWNLOADS'),
|
||||
'a.owner_id' => Text::_($this->t['l'] . '_OWNER'),
|
||||
'uploadusername'=> Text::_($this->t['l'] . '_UPLOADED_BY'),
|
||||
'a.published' => Text::_($this->t['l'] . '_PUBLISHED'),
|
||||
'a.approved' => Text::_($this->t['l'] . '_APPROVED'),
|
||||
'category_id' => Text::_($this->t['l'] . '_CATEGORY'),
|
||||
'language' => Text::_('JGRID_HEADING_LANGUAGE'),
|
||||
'a.id' => Text::_('JGRID_HEADING_ID')
|
||||
);
|
||||
}
|
||||
}
|
||||
?>
|
||||
@ -0,0 +1 @@
|
||||
<html><body bgcolor="#FFFFFF"></body></html>
|
||||
@ -0,0 +1,172 @@
|
||||
<?php
|
||||
/* @package Joomla
|
||||
* @copyright Copyright (C) Open Source Matters. All rights reserved.
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see LICENSE.php
|
||||
* @extension Phoca Extension
|
||||
* @copyright Copyright (C) Jan Pavelka www.phoca.cz
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
|
||||
*/
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
use Joomla\CMS\Factory;
|
||||
use Joomla\CMS\HTML\HTMLHelper;
|
||||
use Joomla\CMS\Language\Text;
|
||||
use Joomla\CMS\Uri\Uri;
|
||||
|
||||
$r = $this->r;
|
||||
echo $r->startCp();
|
||||
|
||||
echo '<div class="ph-box-info">';
|
||||
|
||||
echo '<div style="float:right;margin:10px;">' . HTMLHelper::_('image', $this->t['i'] . 'logo-phoca.png', 'Phoca.cz' ) .'</div>'
|
||||
. '<div class="ph-cpanel-logo">'.HTMLHelper::_('image', $this->t['i'] . 'logo-'.str_replace('phoca', 'phoca-', $this->t['c']).'.png', 'Phoca.cz') . '</div>'
|
||||
.'<h3>'.Text::_($this->t['component_head']).' - '. Text::_($this->t['l'].'_INFORMATION').'</h3>'
|
||||
.'<div style="clear:both;"></div>';
|
||||
|
||||
echo '<h3>'. Text::_($this->t['l'].'_HELP').'</h3>';
|
||||
|
||||
echo '<div>';
|
||||
if (!empty($this->t['component_links'])) {
|
||||
foreach ($this->t['component_links'] as $k => $v) {
|
||||
echo '<div><a href="'.$v[1].'" target="_blank">'.$v[0].'</a></div>';
|
||||
}
|
||||
}
|
||||
echo '</div>';
|
||||
|
||||
echo '<h3>'. Text::_($this->t['l'] . '_VERSION').'</h3>'
|
||||
.'<p>'. $this->t['version'] .'</p>';
|
||||
|
||||
echo '<h3>'. Text::_($this->t['l'] . '_COPYRIGHT').'</h3>'
|
||||
.'<p>© 2007 - '. date("Y"). ' Jan Pavelka</p>'
|
||||
.'<p><a href="https://www.phoca.cz/" target="_blank">www.phoca.cz</a></p>';
|
||||
|
||||
echo '<h3>'. Text::_($this->t['l'] . '_LICENSE').'</h3>'
|
||||
.'<p><a href="http://www.gnu.org/licenses/gpl-2.0.html" target="_blank">GPLv2</a></p>';
|
||||
|
||||
echo '<h3>'. Text::_($this->t['l'] . '_TRANSLATION').': '. Text::_($this->t['l'] . '_TRANSLATION_LANGUAGE_TAG').'</h3>'
|
||||
.'<p>© 2007 - '. date("Y"). ' '. Text::_($this->t['l'] . '_TRANSLATER'). '</p>'
|
||||
.'<p>'.Text::_($this->t['l'] . '_TRANSLATION_SUPPORT_URL').'</p>';
|
||||
|
||||
echo '<input type="hidden" name="task" value="" />'
|
||||
.'<input type="hidden" name="option" value="'.$this->t['o'].'" />'
|
||||
.'<input type="hidden" name="controller" value="'.$this->t['c'].'info" />';
|
||||
|
||||
echo HTMLHelper::_('image', $this->t['i'] . 'logo.png', 'Phoca.cz');
|
||||
|
||||
echo '<p> </p>';
|
||||
|
||||
|
||||
$wa = Factory::getApplication()->getDocument()->getWebAssetManager();
|
||||
$wa->addInlineStyle('
|
||||
|
||||
.upBox {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
margin-top:1em;
|
||||
margin-bottom: 2em;
|
||||
}
|
||||
|
||||
.upItemText {
|
||||
margin-bottom: 1em;
|
||||
}
|
||||
|
||||
.upItem {
|
||||
padding: 1em;
|
||||
text-align: center;
|
||||
width: calc(50% - 0.4em);
|
||||
margin: 0.2em;
|
||||
border-radius: 0.3em;
|
||||
}
|
||||
|
||||
.upItemD {
|
||||
background: #F5D042;
|
||||
color: #000;
|
||||
border: 2px solid #F5D042;
|
||||
|
||||
}
|
||||
.upItemPh {
|
||||
background: rgba(255,255,255,0.7);
|
||||
color: #000;
|
||||
border: 2px solid #000;
|
||||
}
|
||||
.upItemDoc {
|
||||
background: rgba(255,255,255,0.7);
|
||||
color: #000;
|
||||
border: 2px solid #000;
|
||||
}
|
||||
.upItemJ {
|
||||
background: rgba(255,255,255,0.7);
|
||||
color: #000;
|
||||
border: 2px solid #000;
|
||||
}
|
||||
|
||||
a.upItemLink {
|
||||
padding: 0.5em 1em;
|
||||
border-radius: 9999px;
|
||||
margin: 1em;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
a.upItemLink::before {
|
||||
content: none;
|
||||
}
|
||||
.upItemPh a.upItemLink {
|
||||
background: #000;
|
||||
color: #fff;
|
||||
}
|
||||
.upItemDoc a.upItemLink {
|
||||
background: #000;
|
||||
color: #fff;
|
||||
}
|
||||
.upItemJ a.upItemLink {
|
||||
background: #000;
|
||||
color: #fff;
|
||||
}
|
||||
');
|
||||
|
||||
$upEL = 'https://extensions.joomla.org/extension/phoca-download/';
|
||||
$upE = 'Phoca Download';
|
||||
|
||||
$o = '<div class="upBox">';
|
||||
|
||||
$o .= '<div class="upItem upItemD">';
|
||||
$o .= '<div class="upItemText">If you find this project useful, please support it with a donation</div>';
|
||||
$o .= '<form action="https://www.paypal.com/donate" method="post" target="_top">';
|
||||
$o .= '<input type="hidden" name="hosted_button_id" value="ZVPH25SQ2DDBY" />';
|
||||
$o .= '<input type="image" src="https://www.paypalobjects.com/en_US/i/btn/btn_donateCC_LG.gif" border="0" name="submit" title="PayPal - The safer, easier way to pay online!" alt="Donate with PayPal button" />';
|
||||
$o .= '<img alt="" border="0" src="https://www.paypal.com/en_CZ/i/scr/pixel.gif" width="1" height="1" />';
|
||||
$o .= '</form>';
|
||||
$o .= '</div>';
|
||||
|
||||
$o .= '<div class="upItem upItemJ">';
|
||||
$o .= '<div class="upItemText">If you find this project useful, please post a rating and review on the Joomla! Extension Directory website</div>';
|
||||
$o .= '<a class="upItemLink" target="_blank" href="'. $upEL.'">'. $upE.' (JED website)</a>';
|
||||
$o .= '</form>';
|
||||
$o .= '</div>';
|
||||
|
||||
$o .= '<div class="upItem upItemDoc">';
|
||||
$o .= '<div class="upItemText">If you need help, visit</div>';
|
||||
$o .= '<a class="upItemLink" target="_blank" href="https://www.phoca.cz/documentation">Phoca documentation website</a>';
|
||||
$o .= '<div class="upItemText">or ask directly in</div>';
|
||||
$o .= '<a class="upItemLink" target="_blank" href="https://www.phoca.cz/forum">Phoca forum website</a>';
|
||||
$o .= '</div>';
|
||||
|
||||
$o .= '<div class="upItem upItemPh">';
|
||||
$o .= '<div class="upItemText">There are over a hundred more useful Phoca extensions, discover them on</div>';
|
||||
$o .= '<a class="upItemLink" target="_blank" href="https://www.phoca.cz">Phoca website</a>';
|
||||
$o .= '</div>';
|
||||
|
||||
$o .= '</div>';
|
||||
echo $o;
|
||||
|
||||
echo '<div class="ph-cp-hr"></div>'.'<div class="btn-group">
|
||||
|
||||
<a class="btn btn-large btn-primary" href="https://www.phoca.cz/version/index.php?'.$this->t['c'].'='. $this->t['version'] .'" target="_blank"><i class="icon-loop icon-white"></i> '. Text::_($this->t['l'].'_CHECK_FOR_UPDATE') .'</a></div>';
|
||||
|
||||
echo '<div style="margin-top:30px;height:39px;background: url(\''.Uri::root(true).'/media/com_'.$this->t['c'].'/images/administrator/line.png\') 100% 0 no-repeat;"> </div>';
|
||||
|
||||
echo '</div>';
|
||||
|
||||
|
||||
echo '</div>';
|
||||
echo $r->endCp();
|
||||
@ -0,0 +1 @@
|
||||
<html><body bgcolor="#FFFFFF"></body></html>
|
||||
@ -0,0 +1,51 @@
|
||||
<?php
|
||||
/* @package Joomla
|
||||
* @copyright Copyright (C) Open Source Matters. All rights reserved.
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see LICENSE.php
|
||||
* @extension Phoca Extension
|
||||
* @copyright Copyright (C) Jan Pavelka www.phoca.cz
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
|
||||
*/
|
||||
defined('_JEXEC') or die();
|
||||
use Joomla\CMS\MVC\View\HtmlView;
|
||||
use Joomla\CMS\Toolbar\ToolbarHelper;
|
||||
use Joomla\CMS\Language\Text;
|
||||
use Joomla\CMS\Toolbar\Toolbar;
|
||||
jimport( 'joomla.application.component.view' );
|
||||
|
||||
class PhocaDownloadCpViewPhocaDownloadInfo extends HtmlView
|
||||
{
|
||||
protected $t;
|
||||
protected $r;
|
||||
|
||||
function display($tpl = null) {
|
||||
|
||||
$this->t = PhocaDownloadUtils::setVars('info');
|
||||
$this->r = new PhocaDownloadRenderAdminview();
|
||||
$this->t['component_head'] = 'COM_PHOCADOWNLOAD_PHOCA_DOWNLOAD';
|
||||
$this->t['component_links'] = $this->r->getLinks(1);
|
||||
$this->t['version'] = PhocaDownloadUtils::getExtensionVersion();
|
||||
$this->addToolbar();
|
||||
parent::display($tpl);
|
||||
}
|
||||
|
||||
protected function addToolbar() {
|
||||
require_once JPATH_COMPONENT.'/helpers/'.$this->t['c'].'cp.php';
|
||||
$class = $this->t['n'] . 'CpHelper';
|
||||
$canDo = $class::getActions($this->t['c']);
|
||||
|
||||
ToolbarHelper::title( Text::_($this->t['l'].'_PD_INFO' ), 'info' );
|
||||
|
||||
// This button is unnecessary but it is displayed because Joomla! design bug
|
||||
$bar = Toolbar::getInstance( 'toolbar' );
|
||||
$dhtml = '<a href="index.php?option=com_phocadownload" class="btn btn-primary btn-small"><i class="icon-home-2" title="'.Text::_($this->t['l'].'_CONTROL_PANEL').'"></i> '.Text::_($this->t['l'].'_CONTROL_PANEL').'</a>';
|
||||
$bar->appendButton('Custom', $dhtml);
|
||||
|
||||
if ($canDo->get('core.admin')) {
|
||||
ToolbarHelper::preferences('com_'.$this->t['c']);
|
||||
}
|
||||
ToolbarHelper::divider();
|
||||
ToolbarHelper::help( 'screen.'.$this->t['c'], true );
|
||||
}
|
||||
}
|
||||
?>
|
||||
@ -0,0 +1 @@
|
||||
<html><body bgcolor="#FFFFFF"></body></html>
|
||||
@ -0,0 +1,110 @@
|
||||
<?php
|
||||
/* @package Joomla
|
||||
* @copyright Copyright (C) Open Source Matters. All rights reserved.
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see LICENSE.php
|
||||
* @extension Phoca Extension
|
||||
* @copyright Copyright (C) Jan Pavelka www.phoca.cz
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
|
||||
*/
|
||||
defined('_JEXEC') or die;
|
||||
use Joomla\CMS\HTML\HTMLHelper;
|
||||
use Joomla\CMS\Language\Text;
|
||||
|
||||
|
||||
$extlink = 0;
|
||||
if (isset($this->item->extid) && $this->item->extid != '') {
|
||||
$extlink = 1;
|
||||
}
|
||||
$class = $this->t['n'] . 'RenderAdminView';
|
||||
$r = $this->r;
|
||||
|
||||
?>
|
||||
<script type="text/javascript">
|
||||
Joomla.submitbutton = function(task) {
|
||||
if (task == '<?php echo $this->t['task'] ?>.cancel' || document.formvalidator.isValid(document.getElementById('adminForm'))) {
|
||||
<?php /*echo $this->form->getField('categories')->save(); ?>
|
||||
<?php echo $this->form->getField('category')->save(); ?>
|
||||
<?php echo $this->form->getField('file')->save(); */ ?>
|
||||
Joomla.submitform(task, document.getElementById('adminForm'));
|
||||
}
|
||||
else {
|
||||
Joomla.renderMessages({"error": ["<?php echo Text::_('JGLOBAL_VALIDATION_FORM_FAILED', true);?>"]});
|
||||
<?php /* alert('<?php echo JText::_('JGLOBAL_VALIDATION_FORM_FAILED', true);?>'); */ ?>
|
||||
}
|
||||
}
|
||||
</script><?php
|
||||
echo $r->startForm($this->t['o'], $this->t['task'], $this->item->id, 'adminForm', 'adminForm');
|
||||
// First Column
|
||||
echo '<div class="span8 form-horizontal">';
|
||||
$tabs = array (
|
||||
'general' => Text::_($this->t['l'].'_GENERAL_OPTIONS')
|
||||
);
|
||||
echo $r->navigation($tabs);
|
||||
|
||||
echo $r->startTabs();
|
||||
|
||||
echo $r->startTab('general', $tabs['general'], 'active');
|
||||
|
||||
$formArray = array('categories', 'category', 'file' );
|
||||
echo $r->group($this->form, $formArray, 1);
|
||||
echo '</div>'. "\n";
|
||||
|
||||
|
||||
echo '</div>';//end tab content
|
||||
echo '</div>';//end span10
|
||||
// Second Column
|
||||
echo '<div class="span4">';
|
||||
|
||||
echo '<div class="alert alert-danger">' . Text::_('COM_PHOCADOWNLOAD_LAYOUT_WARNING').'</div>';
|
||||
|
||||
echo '<div class="alert alert-info"><h4>' . Text::_('COM_PHOCADOWNLOAD_CATEGORIES_VIEW').'</h4>';
|
||||
$lP = PhocaDownloadSettings::getLayoutParams('categories');
|
||||
echo '<div><h3>' . Text::_('COM_PHOCADOWNLOAD_PARAMETERS').'</h3></div>';
|
||||
if (isset($lP['search'])) {
|
||||
foreach ($lP['search'] as $k => $v) {
|
||||
echo $v . ' ';
|
||||
}
|
||||
}
|
||||
echo '<div><h3>' . Text::_('COM_PHOCADOWNLOAD_STYLES').'</h3></div>';
|
||||
if (isset($lP['style'])) {
|
||||
foreach ($lP['style'] as $k => $v) {
|
||||
echo $v . ' ';
|
||||
}
|
||||
}
|
||||
echo '</div>';
|
||||
|
||||
echo '<div class="alert alert-info"><h4>' . Text::_('COM_PHOCADOWNLOAD_CATEGORY_VIEW').'</h4>';
|
||||
$lP = PhocaDownloadSettings::getLayoutParams('category');
|
||||
echo '<div><h3>' . Text::_('COM_PHOCADOWNLOAD_PARAMETERS').'</h3></div>';
|
||||
if (isset($lP['search'])) {
|
||||
foreach ($lP['search'] as $k => $v) {
|
||||
echo $v . ' ';
|
||||
}
|
||||
}
|
||||
echo '<div><h3>' . Text::_('COM_PHOCADOWNLOAD_STYLES').'</h3></div>';
|
||||
if (isset($lP['style'])) {
|
||||
foreach ($lP['style'] as $k => $v) {
|
||||
echo $v . ' ';
|
||||
}
|
||||
}
|
||||
echo '</div>';
|
||||
|
||||
echo '<div class="alert alert-info"><h4>' . Text::_('COM_PHOCADOWNLOAD_FILE_VIEW').'</h4>';
|
||||
$lP = PhocaDownloadSettings::getLayoutParams('file');
|
||||
echo '<div><h3>' . Text::_('COM_PHOCADOWNLOAD_PARAMETERS').'</h3></div>';
|
||||
if (isset($lP['search'])) {
|
||||
foreach ($lP['search'] as $k => $v) {
|
||||
echo $v . ' ';
|
||||
}
|
||||
}
|
||||
echo '<div><h3>' . Text::_('COM_PHOCADOWNLOAD_STYLES').'</h3></div>';
|
||||
if (isset($lP['style'])) {
|
||||
foreach ($lP['style'] as $k => $v) {
|
||||
echo $v . ' ';
|
||||
}
|
||||
}
|
||||
|
||||
echo '</div>';//end span2
|
||||
echo $r->formInputs($this->t['task']);
|
||||
echo $r->endForm();
|
||||
?>
|
||||
@ -0,0 +1 @@
|
||||
<html><body bgcolor="#FFFFFF"></body></html>
|
||||
@ -0,0 +1,62 @@
|
||||
<?php
|
||||
/* @package Joomla
|
||||
* @copyright Copyright (C) Open Source Matters. All rights reserved.
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see LICENSE.php
|
||||
* @extension Phoca Extension
|
||||
* @copyright Copyright (C) Jan Pavelka www.phoca.cz
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
|
||||
*/
|
||||
defined('_JEXEC') or die();
|
||||
use Joomla\CMS\MVC\View\HtmlView;
|
||||
use Joomla\CMS\Factory;
|
||||
use Joomla\CMS\Toolbar\Toolbar;
|
||||
use Joomla\CMS\Toolbar\ToolbarHelper;
|
||||
use Joomla\CMS\Language\Text;
|
||||
jimport( 'joomla.application.component.view' );
|
||||
|
||||
class PhocaDownloadCpViewPhocaDownloadLayout extends HtmlView
|
||||
{
|
||||
protected $state;
|
||||
protected $item;
|
||||
protected $form;
|
||||
protected $t;
|
||||
protected $r;
|
||||
|
||||
public function display($tpl = null) {
|
||||
|
||||
$this->t = PhocaDownloadUtils::setVars('layout');
|
||||
$this->r = new PhocaDownloadRenderAdminView();
|
||||
$this->state = $this->get('State');
|
||||
$this->form = $this->get('Form');
|
||||
$this->item = $this->get('Item');
|
||||
|
||||
|
||||
|
||||
$this->addToolbar();
|
||||
parent::display($tpl);
|
||||
}
|
||||
|
||||
protected function addToolbar() {
|
||||
|
||||
require_once JPATH_COMPONENT.'/helpers/'.$this->t['tasks'].'.php';
|
||||
Factory::getApplication()->input->set('hidemainmenu', true);
|
||||
$bar = Toolbar::getInstance('toolbar');
|
||||
$user = Factory::getUser();
|
||||
//$isNew = ($this->item->id == 0);
|
||||
//$checkedOut = !($this->item->checked_out == 0 || $this->item->checked_out == $user->get('id'));
|
||||
$class = ucfirst($this->t['tasks']).'Helper';
|
||||
$canDo = $class::getActions($this->t);
|
||||
|
||||
ToolbarHelper::title( Text::_( $this->t['l'].'_LAYOUT' ), 'file-2' );
|
||||
ToolbarHelper::custom($this->t['task'].'.back', 'home-2', '', $this->t['l'].'_CONTROL_PANEL', false);
|
||||
//JToolbarHelper::cancel('phocadownloadlayout.cancel', 'JTOOLBAR_CANCEL');
|
||||
|
||||
if ($canDo->get('core.edit')) {
|
||||
ToolbarHelper::apply($this->t['task'].'.apply', 'JTOOLBAR_APPLY');
|
||||
//JToolbarHelper::save('phocapdfplugin.save', 'JTOOLBAR_SAVE');
|
||||
}
|
||||
ToolbarHelper::divider();
|
||||
ToolbarHelper::help( 'screen.'.$this->t['c'], true );
|
||||
}
|
||||
}
|
||||
?>
|
||||
@ -0,0 +1 @@
|
||||
<html><body bgcolor="#FFFFFF"></body></html>
|
||||
@ -0,0 +1,9 @@
|
||||
<?php
|
||||
/* @package Joomla
|
||||
* @copyright Copyright (C) Open Source Matters. All rights reserved.
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see LICENSE.php
|
||||
* @extension Phoca Extension
|
||||
* @copyright Copyright (C) Jan Pavelka www.phoca.cz
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
|
||||
*/
|
||||
defined('_JEXEC') or die('Restricted access'); ?>
|
||||
@ -0,0 +1 @@
|
||||
<html><body bgcolor="#FFFFFF"></body></html>
|
||||
@ -0,0 +1,29 @@
|
||||
<?php
|
||||
/* @package Joomla
|
||||
* @copyright Copyright (C) Open Source Matters. All rights reserved.
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see LICENSE.php
|
||||
* @extension Phoca Extension
|
||||
* @copyright Copyright (C) Jan Pavelka www.phoca.cz
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
|
||||
*/
|
||||
defined('_JEXEC') or die();
|
||||
use Joomla\CMS\MVC\View\HtmlView;
|
||||
use Joomla\CMS\Factory;
|
||||
use Joomla\CMS\Router\Route;
|
||||
jimport( 'joomla.html.pane' );
|
||||
jimport( 'joomla.application.component.view' );
|
||||
|
||||
class PhocaDownloadCpViewPhocaDownloadLayouts extends HtmlView
|
||||
{
|
||||
protected $items;
|
||||
|
||||
function display($tpl = null) {
|
||||
|
||||
require_once JPATH_COMPONENT.'/helpers/phocadownloadlayouts.php';
|
||||
$idString = PhocaDownloadLayoutsHelper::getTableId();
|
||||
$app = Factory::getApplication();
|
||||
$app->redirect(Route::_('index.php?option=com_phocadownload&view=phocadownloadlayout&task=phocadownloadlayout.edit'.$idString, false));
|
||||
return;
|
||||
}
|
||||
}
|
||||
?>
|
||||
@ -0,0 +1 @@
|
||||
<html><body bgcolor="#FFFFFF"></body></html>
|
||||
@ -0,0 +1,63 @@
|
||||
<?php
|
||||
/* @package Joomla
|
||||
* @copyright Copyright (C) Open Source Matters. All rights reserved.
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see LICENSE.php
|
||||
* @extension Phoca Extension
|
||||
* @copyright Copyright (C) Jan Pavelka www.phoca.cz
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
|
||||
*/
|
||||
defined('_JEXEC') or die;
|
||||
use Joomla\CMS\Factory;
|
||||
use Joomla\CMS\Language\Text;
|
||||
|
||||
$r = $this->r;
|
||||
|
||||
Factory::getDocument()->addScriptDeclaration(
|
||||
|
||||
'Joomla.submitbutton = function(task) {
|
||||
if (task == "'. $this->t['task'].'.cancel" || document.formvalidator.isValid(document.getElementById("adminForm"))) {
|
||||
Joomla.submitform(task, document.getElementById("adminForm"));
|
||||
} else {
|
||||
Joomla.renderMessages({"error": ["'. Text::_('JGLOBAL_VALIDATION_FORM_FAILED', true).'"]});
|
||||
}
|
||||
}'
|
||||
|
||||
);
|
||||
echo $r->startForm($this->t['o'], $this->t['task'], $this->item->id, 'adminForm', 'adminForm');
|
||||
// First Column
|
||||
echo '<div class="span12 form-horizontal">';
|
||||
$tabs = array (
|
||||
'general' => Text::_($this->t['l'].'_GENERAL_OPTIONS'),
|
||||
'publishing' => Text::_($this->t['l'].'_PUBLISHING_OPTIONS'));
|
||||
echo $r->navigation($tabs);
|
||||
|
||||
$formArray = array ('title', 'alias');
|
||||
echo $r->groupHeader($this->form, $formArray);
|
||||
|
||||
echo $r->startTabs();
|
||||
|
||||
echo $r->startTab('general', $tabs['general'], 'active');
|
||||
$formArray = array ( 'ordering');
|
||||
echo $r->group($this->form, $formArray);
|
||||
$formArray = array('description');
|
||||
echo $r->group($this->form, $formArray, 1);
|
||||
echo $r->endTab();
|
||||
|
||||
echo $r->startTab('publishing', $tabs['publishing']);
|
||||
foreach($this->form->getFieldset('publish') as $field) {
|
||||
echo '<div class="control-group">';
|
||||
if (!$field->hidden) {
|
||||
echo '<div class="control-label">'.$field->label.'</div>';
|
||||
}
|
||||
echo '<div class="controls">';
|
||||
echo $field->input;
|
||||
echo '</div></div>';
|
||||
}
|
||||
echo $r->endTab();
|
||||
|
||||
echo '</div>';//end tab content
|
||||
echo '</div>';//end span10
|
||||
|
||||
echo $r->formInputs($this->t['task']);
|
||||
echo $r->endForm();
|
||||
?>
|
||||
@ -0,0 +1 @@
|
||||
<html><body bgcolor="#FFFFFF"></body></html>
|
||||
@ -0,0 +1,68 @@
|
||||
<?php
|
||||
/* @package Joomla
|
||||
* @copyright Copyright (C) Open Source Matters. All rights reserved.
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see LICENSE.php
|
||||
* @extension Phoca Extension
|
||||
* @copyright Copyright (C) Jan Pavelka www.phoca.cz
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
|
||||
*/
|
||||
defined('_JEXEC') or die();
|
||||
use Joomla\CMS\MVC\View\HtmlView;
|
||||
use Joomla\CMS\Factory;
|
||||
use Joomla\CMS\Language\Text;
|
||||
use Joomla\CMS\Toolbar\ToolbarHelper;
|
||||
jimport( 'joomla.application.component.view' );
|
||||
|
||||
class PhocaDownloadCpViewPhocaDownloadLic extends HtmlView
|
||||
{
|
||||
protected $state;
|
||||
protected $item;
|
||||
protected $form;
|
||||
protected $t;
|
||||
protected $r;
|
||||
|
||||
public function display($tpl = null) {
|
||||
|
||||
$this->t = PhocaDownloadUtils::setVars('lic');
|
||||
$this->r = new PhocaDownloadRenderAdminView();
|
||||
$this->state = $this->get('State');
|
||||
$this->form = $this->get('Form');
|
||||
$this->item = $this->get('Item');
|
||||
|
||||
|
||||
$this->addToolbar();
|
||||
parent::display($tpl);
|
||||
}
|
||||
|
||||
protected function addToolbar() {
|
||||
|
||||
require_once JPATH_COMPONENT.'/helpers/'.$this->t['tasks'].'.php';
|
||||
Factory::getApplication()->input->set('hidemainmenu', true);
|
||||
$user = Factory::getUser();
|
||||
$isNew = ($this->item->id == 0);
|
||||
$checkedOut = !($this->item->checked_out == 0 || $this->item->checked_out == $user->get('id'));
|
||||
$class = ucfirst($this->t['tasks']).'Helper';
|
||||
$canDo = $class::getActions($this->t, $this->state->get('filter.lic_id'));
|
||||
|
||||
$text = $isNew ? Text::_( $this->t['l'] . '_NEW' ) : Text::_($this->t['l'] . '_EDIT');
|
||||
ToolbarHelper::title( Text::_( $this->t['l'] . '_LICENSE' ).': <small><small>[ ' . $text.' ]</small></small>' , 'bookmark');
|
||||
|
||||
// If not checked out, can save the item.
|
||||
if (!$checkedOut && $canDo->get('core.edit')){
|
||||
ToolbarHelper::apply($this->t['task'] . '.apply', 'JTOOLBAR_APPLY');
|
||||
ToolbarHelper::save($this->t['task'] . '.save', 'JTOOLBAR_SAVE');
|
||||
ToolbarHelper::addNew($this->t['task'] . '.save2new', 'JTOOLBAR_SAVE_AND_NEW');
|
||||
}
|
||||
|
||||
if (empty($this->item->id)) {
|
||||
ToolbarHelper::cancel($this->t['task'] . '.cancel', 'JTOOLBAR_CANCEL');
|
||||
}
|
||||
else {
|
||||
ToolbarHelper::cancel($this->t['task'] . '.cancel', 'JTOOLBAR_CLOSE');
|
||||
}
|
||||
|
||||
ToolbarHelper::divider();
|
||||
ToolbarHelper::help( 'screen.'.$this->t['c'], true );
|
||||
}
|
||||
}
|
||||
?>
|
||||
@ -0,0 +1 @@
|
||||
<html><body bgcolor="#FFFFFF"></body></html>
|
||||
@ -0,0 +1,125 @@
|
||||
<?php
|
||||
/*
|
||||
* @package Joomla
|
||||
* @copyright Copyright (C) Open Source Matters. All rights reserved.
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see LICENSE.php
|
||||
* @component Phoca Gallery
|
||||
* @copyright Copyright (C) Jan Pavelka www.phoca.cz
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
|
||||
*/
|
||||
defined('_JEXEC') or die;
|
||||
use Joomla\CMS\Factory;
|
||||
use Joomla\CMS\Layout\LayoutHelper;
|
||||
use Joomla\CMS\HTML\HTMLHelper;
|
||||
use Joomla\CMS\Router\Route;
|
||||
use Joomla\CMS\Language\Text;
|
||||
$r = $this->r;
|
||||
$user = Factory::getUser();
|
||||
$userId = $user->get('id');
|
||||
$listOrder = $this->escape($this->state->get('list.ordering'));
|
||||
$listDirn = $this->escape($this->state->get('list.direction'));
|
||||
$canOrder = $user->authorise('core.edit.state', $this->t['o']);
|
||||
$saveOrder = $listOrder == 'a.ordering';
|
||||
$saveOrderingUrl = '';
|
||||
if ($saveOrder && !empty($this->items)) {
|
||||
$saveOrderingUrl = $r->saveOrder($this->t, $listDirn);
|
||||
}
|
||||
$sortFields = $this->getSortFields();
|
||||
|
||||
echo $r->jsJorderTable($listOrder);
|
||||
|
||||
|
||||
echo $r->startForm($this->t['o'], $this->t['tasks'], 'adminForm');
|
||||
//echo $r->startFilter();
|
||||
//echo $r->endFilter();
|
||||
|
||||
echo $r->startMainContainer();
|
||||
/*
|
||||
echo $r->startFilterBar();
|
||||
echo $r->inputFilterSearch($this->t['l'].'_FILTER_SEARCH_LABEL', $this->t['l'].'_FILTER_SEARCH_DESC',
|
||||
$this->escape($this->state->get('filter.search')));
|
||||
echo $r->inputFilterSearchClear('JSEARCH_FILTER_SUBMIT', 'JSEARCH_FILTER_CLEAR');
|
||||
echo $r->inputFilterSearchLimit('JFIELD_PLG_SEARCH_SEARCHLIMIT_DESC', $this->pagination->getLimitBox());
|
||||
echo $r->selectFilterDirection('JFIELD_ORDERING_DESC', 'JGLOBAL_ORDER_ASCENDING', 'JGLOBAL_ORDER_DESCENDING', $listDirn);
|
||||
echo $r->selectFilterSortBy('JGLOBAL_SORT_BY', $sortFields, $listOrder);
|
||||
|
||||
echo $r->startFilterBar(2);
|
||||
echo $r->selectFilterPublished('JOPTION_SELECT_PUBLISHED', $this->state->get('filter.published'));
|
||||
echo $r->endFilterBar();
|
||||
|
||||
|
||||
echo $r->endFilterBar();*/
|
||||
echo LayoutHelper::render('joomla.searchtools.default', array('view' => $this));
|
||||
|
||||
echo $r->startTable('categoryList');
|
||||
|
||||
echo $r->startTblHeader();
|
||||
|
||||
echo $r->firstColumnHeader($listDirn, $listOrder);
|
||||
echo $r->secondColumnHeader($listDirn, $listOrder);
|
||||
|
||||
//echo $r->thOrderingXML('JGRID_HEADING_ORDERING', $listDirn, $listOrder);
|
||||
//echo $r->thCheck('JGLOBAL_CHECK_ALL');
|
||||
echo '<th class="ph-title">'.HTMLHelper::_('searchtools.sort', $this->t['l'].'_TITLE', 'a.title', $listDirn, $listOrder ).'</th>'."\n";
|
||||
echo '<th class="ph-published">'.HTMLHelper::_('searchtools.sort', $this->t['l'].'_PUBLISHED', 'a.published', $listDirn, $listOrder ).'</th>'."\n";
|
||||
echo '<th class="ph-id">'.HTMLHelper::_('searchtools.sort', $this->t['l'].'_ID', 'a.id', $listDirn, $listOrder ).'</th>'."\n";
|
||||
|
||||
echo $r->endTblHeader();
|
||||
|
||||
echo $r->startTblBody($saveOrder, $saveOrderingUrl, $listDirn);
|
||||
|
||||
$originalOrders = array();
|
||||
$parentsStr = "";
|
||||
$j = 0;
|
||||
|
||||
if (is_array($this->items)) {
|
||||
foreach ($this->items as $i => $item) {
|
||||
//if ($i >= (int)$this->pagination->limitstart && $j < (int)$this->pagination->limit) {
|
||||
$j++;
|
||||
|
||||
$urlEdit = 'index.php?option='.$this->t['o'].'&task='.$this->t['task'].'.edit&id=';
|
||||
$urlTask = 'index.php?option='.$this->t['o'].'&task='.$this->t['task'];
|
||||
$orderkey = array_search($item->id, $this->ordering[0]);
|
||||
$ordering = ($listOrder == 'a.ordering');
|
||||
$canCreate = $user->authorise('core.create', $this->t['o']);
|
||||
$canEdit = $user->authorise('core.edit', $this->t['o']);
|
||||
$canCheckin = $user->authorise('core.manage', 'com_checkin') || $item->checked_out==$user->get('id') || $item->checked_out==0;
|
||||
$canChange = $user->authorise('core.edit.state', $this->t['o']) && $canCheckin;
|
||||
$linkEdit = Route::_( $urlEdit. $item->id );
|
||||
|
||||
|
||||
echo $r->startTr($i, isset($item->catid) ? (int)$item->catid : 0);
|
||||
echo $r->firstColumn($i, $item->id, $canChange, $saveOrder, $orderkey, $item->ordering);
|
||||
echo $r->secondColumn($i, $item->id, $canChange, $saveOrder, $orderkey, $item->ordering);
|
||||
|
||||
$checkO = '';
|
||||
if ($item->checked_out) {
|
||||
$checkO .= HTMLHelper::_('jgrid.checkedout', $i, $item->editor, $item->checked_out_time, $this->t['tasks'].'.', $canCheckin);
|
||||
}
|
||||
if ($canCreate || $canEdit) {
|
||||
$checkO .= '<a href="'. Route::_($linkEdit).'">'. $this->escape($item->title).'</a>';
|
||||
} else {
|
||||
$checkO .= $this->escape($item->title);
|
||||
}
|
||||
$checkO .= ' <span class="smallsub">(<span>'.Text::_($this->t['l'].'_FIELD_ALIAS_LABEL').':</span>'. $this->escape($item->alias).')</span>';
|
||||
echo $r->td($checkO, "small hidden-phone");
|
||||
|
||||
echo $r->td(HTMLHelper::_('jgrid.published', $item->published, $i, $this->t['tasks'].'.', $canChange), "small hidden-phone");
|
||||
|
||||
echo $r->td($item->id, "small hidden-phone");
|
||||
|
||||
echo $r->endTr();
|
||||
|
||||
//}
|
||||
}
|
||||
}
|
||||
echo $r->endTblBody();
|
||||
|
||||
echo $r->tblFoot($this->pagination->getListFooter(), 5);
|
||||
echo $r->endTable();
|
||||
|
||||
//echo $r->formInputsXML($listOrder, $originalOrders);
|
||||
echo $r->formInputsXML($listOrder, $listDirn, $originalOrders);
|
||||
echo $r->endMainContainer();
|
||||
echo $r->endForm();
|
||||
?>
|
||||
@ -0,0 +1 @@
|
||||
<html><body bgcolor="#FFFFFF"></body></html>
|
||||
@ -0,0 +1,90 @@
|
||||
<?php
|
||||
/* @package Joomla
|
||||
* @copyright Copyright (C) Open Source Matters. All rights reserved.
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see LICENSE.php
|
||||
* @extension Phoca Extension
|
||||
* @copyright Copyright (C) Jan Pavelka www.phoca.cz
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
|
||||
*/
|
||||
defined('_JEXEC') or die();
|
||||
use Joomla\CMS\MVC\View\HtmlView;
|
||||
use Joomla\CMS\Toolbar\ToolbarHelper;
|
||||
use Joomla\CMS\Language\Text;
|
||||
jimport( 'joomla.application.component.view' );
|
||||
|
||||
class PhocaDownloadCpViewPhocaDownloadLics extends HtmlView
|
||||
{
|
||||
protected $items;
|
||||
protected $pagination;
|
||||
protected $state;
|
||||
protected $t;
|
||||
protected $r;
|
||||
public $filterForm;
|
||||
public $activeFilters;
|
||||
|
||||
function display($tpl = null) {
|
||||
|
||||
$this->t = PhocaDownloadUtils::setVars('lic');
|
||||
$this->r = new PhocaDownloadRenderAdminViews();
|
||||
$this->items = $this->get('Items');
|
||||
$this->pagination = $this->get('Pagination');
|
||||
$this->state = $this->get('State');
|
||||
$this->filterForm = $this->get('FilterForm');
|
||||
$this->activeFilters = $this->get('ActiveFilters');
|
||||
|
||||
// Preprocess the list of items to find ordering divisions.
|
||||
foreach ($this->items as &$item) {
|
||||
$this->ordering[0][] = $item->id;
|
||||
}
|
||||
|
||||
|
||||
|
||||
if (count($errors = $this->get('Errors'))) {
|
||||
throw new Exception(implode("\n", $errors), 500);
|
||||
return false;
|
||||
}
|
||||
|
||||
$this->addToolbar();
|
||||
parent::display($tpl);
|
||||
}
|
||||
|
||||
function addToolbar() {
|
||||
|
||||
require_once JPATH_COMPONENT.'/helpers/'.$this->t['tasks'].'.php';
|
||||
$state = $this->get('State');
|
||||
$class = ucfirst($this->t['tasks']).'Helper';
|
||||
$canDo = $class::getActions($this->t, $state->get('filter.lic_id'));
|
||||
|
||||
ToolbarHelper::title( Text::_( $this->t['l'].'_LICENSES' ), 'bookmark' );
|
||||
|
||||
if ($canDo->get('core.create')) {
|
||||
ToolbarHelper::addNew($this->t['task'].'.add','JTOOLBAR_NEW');
|
||||
}
|
||||
|
||||
if ($canDo->get('core.edit')) {
|
||||
ToolbarHelper::editList($this->t['task'].'.edit','JTOOLBAR_EDIT');
|
||||
}
|
||||
if ($canDo->get('core.edit.state')) {
|
||||
|
||||
ToolbarHelper::divider();
|
||||
ToolbarHelper::custom($this->t['tasks'].'.publish', 'publish.png', 'publish_f2.png','JTOOLBAR_PUBLISH', true);
|
||||
ToolbarHelper::custom($this->t['tasks'].'.unpublish', 'unpublish.png', 'unpublish_f2.png', 'JTOOLBAR_UNPUBLISH', true);
|
||||
}
|
||||
|
||||
if ($canDo->get('core.delete')) {
|
||||
ToolbarHelper::deleteList( $this->t['l'].'_WARNING_DELETE_ITEMS', $this->t['tasks'].'.delete', $this->t['l'].'_DELETE');
|
||||
}
|
||||
ToolbarHelper::divider();
|
||||
ToolbarHelper::help( 'screen.'.$this->t['c'], true );
|
||||
}
|
||||
|
||||
protected function getSortFields() {
|
||||
return array(
|
||||
'a.ordering' => Text::_('JGRID_HEADING_ORDERING'),
|
||||
'a.title' => Text::_($this->t['l'] . '_TITLE'),
|
||||
'a.published' => Text::_($this->t['l'] . '_PUBLISHED'),
|
||||
'a.id' => Text::_('JGRID_HEADING_ID')
|
||||
);
|
||||
}
|
||||
}
|
||||
?>
|
||||
@ -0,0 +1 @@
|
||||
<html><body bgcolor="#FFFFFF"></body></html>
|
||||
@ -0,0 +1,104 @@
|
||||
<?php
|
||||
/* @package Joomla
|
||||
* @copyright Copyright (C) Open Source Matters. All rights reserved.
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see LICENSE.php
|
||||
* @extension Phoca Extension
|
||||
* @copyright Copyright (C) Jan Pavelka www.phoca.cz
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
|
||||
*/
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
use Joomla\CMS\HTML\HTMLHelper;
|
||||
use Joomla\CMS\Language\Text;
|
||||
|
||||
//JHtml::_('behavior.tooltip');
|
||||
?>
|
||||
<script type="text/javascript">
|
||||
function insertLink() {
|
||||
|
||||
if (!Joomla.getOptions('xtd-phocadownload')) {
|
||||
return false;
|
||||
}
|
||||
|
||||
var _Joomla$getOptions = Joomla.getOptions('xtd-phocadownload'), editor = _Joomla$getOptions.editor;
|
||||
|
||||
var title = document.getElementById("title").value;
|
||||
if (title != '') {
|
||||
title = "|text=" + title;
|
||||
}
|
||||
var target = document.getElementById("target").value;
|
||||
if (target != '') {
|
||||
target = "|target=" + target;
|
||||
}
|
||||
var categoryIdOutput;
|
||||
var categoryid = document.getElementById("catid").value;
|
||||
if (categoryid != '' && parseInt(categoryid) > 0) {
|
||||
categoryIdOutput = "|id=" + categoryid;
|
||||
} else {
|
||||
categoryIdOutput = '';
|
||||
}
|
||||
|
||||
if (categoryIdOutput != '' && parseInt(categoryid) > 0) {
|
||||
var tag = "{phocadownload view=category" + categoryIdOutput + title + target + "}";
|
||||
window.parent.Joomla.editors.instances[editor].replaceSelection(tag);
|
||||
|
||||
if (window.parent.Joomla.Modal) {
|
||||
window.parent.Joomla.Modal.getCurrent().close();
|
||||
}
|
||||
|
||||
return false;
|
||||
} else {
|
||||
alert("<?php echo Text::_('COM_PHOCADOWNLOAD_YOU_MUST_SELECT_CATEGORY', true); ?>");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<div id="phocadownload-links">
|
||||
<fieldset class="adminform options-menu options-form">
|
||||
<legend><?php echo Text::_('COM_PHOCADOWNLOAD_CATEGORY'); ?></legend>
|
||||
<form name="adminForm" id="adminForm">
|
||||
<div class="control-group">
|
||||
<div class="control-label">
|
||||
<label for="title">
|
||||
<?php echo Text::_('COM_PHOCADOWNLOAD_CATEGORY'); ?>
|
||||
</label>
|
||||
</div>
|
||||
<div class="controls">
|
||||
<?php echo $this->t['lists']['catid']; ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<div class="control-label">
|
||||
<label for="title">
|
||||
<?php echo Text::_('COM_PHOCADOWNLOAD_TITLE'); ?>
|
||||
</label>
|
||||
</div>
|
||||
<div class="controls">
|
||||
<input type="text" id="title" name="title" class="form-control"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<div class="control-label">
|
||||
<label for="target">
|
||||
<?php echo Text::_('COM_PHOCADOWNLOAD_TARGET'); ?>
|
||||
</label>
|
||||
<
|
||||
</div>
|
||||
|
||||
<div class="controls">
|
||||
<select name="target" id="target" class="form-select">
|
||||
<option value="s" selected="selected"><?php echo Text::_('COM_PHOCADOWNLOAD_TARGET_SELF'); ?></option>
|
||||
<option value="b"><?php echo Text::_('COM_PHOCADOWNLOAD_TARGET_BLANK'); ?></option>
|
||||
<option value="t"><?php echo Text::_('COM_PHOCADOWNLOAD_TARGET_TOP'); ?></option>
|
||||
<option value="p"><?php echo Text::_('COM_PHOCADOWNLOAD_TARGET_PARENT'); ?></option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="btn-box-submit">
|
||||
<button class="btn btn-primary plg-button-insert " onclick="insertLink();return false;"><span class="icon-ok"></span> <?php echo Text::_('COM_PHOCADOWNLOAD_INSERT_CODE'); ?></button>
|
||||
</div>
|
||||
</form>
|
||||
</fieldset>
|
||||
<div class="btn-box-back"><a class="btn btn-light" href="<?php echo $this->t['backlink']; ?>"><span class="icon-arrow-left"></span> <?php echo Text::_('COM_PHOCADOWNLOAD_BACK') ?></a></div>
|
||||
</div>
|
||||
@ -0,0 +1 @@
|
||||
<html><body bgcolor="#FFFFFF"></body></html>
|
||||
@ -0,0 +1,78 @@
|
||||
<?php
|
||||
/*
|
||||
* @package Joomla 1.5
|
||||
* @copyright Copyright (C) 2005 Open Source Matters. All rights reserved.
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see LICENSE.php
|
||||
*
|
||||
* @component Phoca Component
|
||||
* @copyright Copyright (C) Jan Pavelka www.phoca.cz
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
|
||||
*/
|
||||
defined('_JEXEC') or die();
|
||||
use Joomla\CMS\MVC\View\HtmlView;
|
||||
use Joomla\CMS\Factory;
|
||||
use Joomla\CMS\Uri\Uri;
|
||||
use Joomla\CMS\HTML\HTMLHelper;
|
||||
use Joomla\CMS\Language\Text;
|
||||
jimport('joomla.application.component.view');
|
||||
class phocaDownloadCpViewphocaDownloadLinkCat extends HtmlView
|
||||
{
|
||||
|
||||
protected $t;
|
||||
protected $r;
|
||||
|
||||
function display($tpl = null) {
|
||||
$app = Factory::getApplication();
|
||||
$db = Factory::getDBO();
|
||||
$this->r = new PhocaDownloadRenderAdminViews();
|
||||
$this->t = PhocaDownloadUtils::setVars('linkcat');
|
||||
//Frontend Changes
|
||||
$tUri = '';
|
||||
if (!$app->isClient('administrator')) {
|
||||
$tUri = Uri::base();
|
||||
|
||||
}
|
||||
|
||||
$editor = $app->input->getCmd('editor', '');
|
||||
if (!empty($editor)) {
|
||||
$this->document->addScriptOptions('xtd-phocadownload', array('editor' => $editor));
|
||||
}
|
||||
|
||||
$document = Factory::getDocument();
|
||||
$uri = Uri::getInstance();
|
||||
HTMLHelper::stylesheet( 'media/com_phocadownload/css/administrator/phocadownload.css' );
|
||||
HTMLHelper::stylesheet( 'media/plg_editors-xtd_phocadownload/css/phocadownload.css' );
|
||||
|
||||
$eName = Factory::getApplication()->input->get('editor');
|
||||
$this->t['ename'] = preg_replace( '#[^A-Z0-9\-\_\[\]]#i', '', $eName );
|
||||
$this->t['backlink'] = $tUri.'index.php?option=com_phocadownload&view=phocadownloadlinks&tmpl=component&editor='.$this->t['ename'];
|
||||
|
||||
$model = $this->getModel();
|
||||
|
||||
// build list of categories
|
||||
//$javascript = 'class="form-control" size="1" onchange="submitform( );"';
|
||||
$attr = 'class="form-select" size="1"';
|
||||
$filter_catid = '';
|
||||
|
||||
$query = 'SELECT a.title AS text, a.id AS value, a.parent_id as parent_id'
|
||||
. ' FROM #__phocadownload_categories AS a'
|
||||
. ' WHERE a.published = 1'
|
||||
//. ' AND a.approved = 1'
|
||||
. ' ORDER BY a.ordering';
|
||||
$db->setQuery( $query );
|
||||
$phocadownloads = $db->loadObjectList();
|
||||
|
||||
$tree = array();
|
||||
$text = '';
|
||||
$tree = PhocaDownloadCategory::CategoryTreeOption($phocadownloads, $tree, 0, $text, -1);
|
||||
array_unshift($tree, HTMLHelper::_('select.option', '0', '- '.Text::_('COM_PHOCADOWNLOAD_SELECT_CATEGORY').' -', 'value', 'text'));
|
||||
$lists['catid'] = HTMLHelper::_( 'select.genericlist', $tree, 'catid', $attr , 'value', 'text', $filter_catid );
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
//$this->assignRef('lists', $lists);
|
||||
$this->t['lists'] = $lists;
|
||||
|
||||
parent::display($tpl);
|
||||
}
|
||||
}
|
||||
?>
|
||||
@ -0,0 +1 @@
|
||||
<html><body bgcolor="#FFFFFF"></body></html>
|
||||
@ -0,0 +1,88 @@
|
||||
<?php
|
||||
/* @package Joomla
|
||||
* @copyright Copyright (C) Open Source Matters. All rights reserved.
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see LICENSE.php
|
||||
* @extension Phoca Extension
|
||||
* @copyright Copyright (C) Jan Pavelka www.phoca.cz
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
|
||||
*/
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
use Joomla\CMS\HTML\HTMLHelper;
|
||||
use Joomla\CMS\Language\Text;
|
||||
|
||||
?>
|
||||
|
||||
<script type="text/javascript">
|
||||
function insertLink() {
|
||||
|
||||
if (!Joomla.getOptions('xtd-phocadownload')) {
|
||||
return false;
|
||||
}
|
||||
|
||||
var _Joomla$getOptions = Joomla.getOptions('xtd-phocadownload'), editor = _Joomla$getOptions.editor;
|
||||
|
||||
var title = document.getElementById("title").value;
|
||||
if (title != '') {
|
||||
title = "|text=" + title;
|
||||
}
|
||||
var target = document.getElementById("target").value;
|
||||
if (target != '') {
|
||||
target = "|target=" + target;
|
||||
}
|
||||
|
||||
var tag = "{phocadownload view=categories" + title + target + "}";
|
||||
|
||||
<?php /*
|
||||
//window.parent.jInsertEditorText(tag, '<?php echo $this->t['ename']; ?>');
|
||||
//window.parent.document.getElementById('sbox-window').close();
|
||||
//window.parent.SqueezeBox.close();
|
||||
*/ ?>
|
||||
|
||||
window.parent.Joomla.editors.instances[editor].replaceSelection(tag);
|
||||
|
||||
if (window.parent.Joomla.Modal) {
|
||||
window.parent.Joomla.Modal.getCurrent().close();
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
</script>
|
||||
<div id="phocadownload-links">
|
||||
<fieldset class="adminform options-menu options-form">
|
||||
<legend><?php echo Text::_('COM_PHOCADOWNLOAD_CATEGORIES'); ?></legend>
|
||||
<form name="adminFormLink" id="adminFormLink">
|
||||
<div class="control-group">
|
||||
<div class="control-label">
|
||||
<label for="title">
|
||||
<?php echo Text::_('COM_PHOCADOWNLOAD_TITLE'); ?>
|
||||
</label>
|
||||
</div>
|
||||
<div class="controls">
|
||||
<input type="text" id="title" name="title" class="form-control"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<div class="control-label">
|
||||
<label for="target">
|
||||
<?php echo Text::_('COM_PHOCADOWNLOAD_TARGET'); ?>
|
||||
</label>
|
||||
</div>
|
||||
<div class="controls">
|
||||
<select name="target" id="target" class="form-select">
|
||||
<option value="s" selected="selected"><?php echo Text::_('COM_PHOCADOWNLOAD_TARGET_SELF'); ?></option>
|
||||
<option value="b"><?php echo Text::_('COM_PHOCADOWNLOAD_TARGET_BLANK'); ?></option>
|
||||
<option value="t"><?php echo Text::_('COM_PHOCADOWNLOAD_TARGET_TOP'); ?></option>
|
||||
<option value="p"><?php echo Text::_('COM_PHOCADOWNLOAD_TARGET_PARENT'); ?></option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="btn-box-submit">
|
||||
<button class="btn btn-primary plg-button-insert " onclick="insertLink();return false;"><span class="icon-ok"></span> <?php echo Text::_('COM_PHOCADOWNLOAD_INSERT_CODE'); ?></button>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
</fieldset>
|
||||
<div class="btn-box-back"><a class="btn btn-light" href="<?php echo $this->t['backlink']; ?>"><span class="icon-arrow-left"></span> <?php echo Text::_('COM_PHOCADOWNLOAD_BACK') ?></a></div>
|
||||
</div>
|
||||
@ -0,0 +1 @@
|
||||
<html><body bgcolor="#FFFFFF"></body></html>
|
||||
@ -0,0 +1,83 @@
|
||||
<?php
|
||||
/*
|
||||
* @package Joomla 1.5
|
||||
* @copyright Copyright (C) 2005 Open Source Matters. All rights reserved.
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see LICENSE.php
|
||||
*
|
||||
* @component Phoca Component
|
||||
* @copyright Copyright (C) Jan Pavelka www.phoca.cz
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
|
||||
*/
|
||||
defined('_JEXEC') or die();
|
||||
use Joomla\CMS\MVC\View\HtmlView;
|
||||
use Joomla\CMS\Factory;
|
||||
use Joomla\CMS\Uri\Uri;
|
||||
use Joomla\CMS\HTML\HTMLHelper;
|
||||
jimport( 'joomla.application.component.view' );
|
||||
|
||||
class phocaDownloadCpViewphocaDownloadLinkCats extends HtmlView
|
||||
{
|
||||
protected $t;
|
||||
protected $r;
|
||||
|
||||
function display($tpl = null) {
|
||||
$app = Factory::getApplication();
|
||||
$this->r = new PhocaDownloadRenderAdminViews();
|
||||
$this->t = PhocaDownloadUtils::setVars('linkcats');
|
||||
|
||||
//Frontend Changes
|
||||
$tUri = '';
|
||||
if (!$app->isClient('administrator')) {
|
||||
$tUri = Uri::base();
|
||||
|
||||
}
|
||||
|
||||
$editor = $app->input->getCmd('editor', '');
|
||||
if (!empty($editor)) {
|
||||
$this->document->addScriptOptions('xtd-phocadownload', array('editor' => $editor));
|
||||
}
|
||||
|
||||
HTMLHelper::stylesheet( 'media/com_phocadownload/css/administrator/phocadownload.css' );
|
||||
HTMLHelper::stylesheet( 'media/plg_editors-xtd_phocadownload/css/phocadownload.css' );
|
||||
|
||||
$document = Factory::getDocument();
|
||||
$uri = Uri::getInstance();
|
||||
|
||||
$eName = $app->input->get('editor');
|
||||
$this->t['ename'] = preg_replace( '#[^A-Z0-9\-\_\[\]]#i', '', $eName );
|
||||
$this->t['backlink'] = $tUri.'index.php?option=com_phocadownload&view=phocadownloadlinks&tmpl=component&editor='.$this->t['ename'];
|
||||
|
||||
|
||||
// Category Tree
|
||||
/* $db = JFactory::getDBO();
|
||||
$query = 'SELECT a.title AS text, a.id AS value, a.parent_id as parent_id'
|
||||
. ' FROM #__phocadownload_categories AS a'
|
||||
// . ' WHERE a.published = 1' You can hide not published and not authorized categories too
|
||||
// . ' AND a.approved = 1'
|
||||
. ' ORDER BY a.ordering';
|
||||
$db->setQuery( $query );
|
||||
$categories = $db->loadObjectList();
|
||||
|
||||
$tree = array();
|
||||
$text = '';
|
||||
$tree = PhocaDownloadCategory::CategoryTreeOption($categories, $tree, 0, $text, -1);
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
// Multiple
|
||||
$ctrl = 'hidecategories';
|
||||
$attribs = ' ';
|
||||
$attribs .= ' size="5"';
|
||||
//$attribs .= 'class="'.$v.'"';
|
||||
$attribs .= ' class="form-control"';
|
||||
$attribs .= ' multiple="multiple"';
|
||||
$ctrl .= '';
|
||||
//$value = implode( '|', )
|
||||
|
||||
$categoriesOutput = HTMLHelper::_('select.genericlist', $tree, $ctrl, $attribs, 'value', 'text', 0, 'hidecategories' );
|
||||
|
||||
$this->assignRef('categoriesoutput', $categoriesOutput);*/
|
||||
|
||||
parent::display($tpl);
|
||||
}
|
||||
}
|
||||
?>
|
||||
@ -0,0 +1 @@
|
||||
<html><body bgcolor="#FFFFFF"></body></html>
|
||||
@ -0,0 +1,419 @@
|
||||
<?php
|
||||
/* @package Joomla
|
||||
* @copyright Copyright (C) Open Source Matters. All rights reserved.
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see LICENSE.php
|
||||
* @extension Phoca Extension
|
||||
* @copyright Copyright (C) Jan Pavelka www.phoca.cz
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
|
||||
*/
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
use Joomla\CMS\Factory;
|
||||
use Joomla\CMS\HTML\HTMLHelper;
|
||||
use Joomla\CMS\Language\Text;
|
||||
|
||||
$user = Factory::getUser();
|
||||
|
||||
//Ordering allowed ?
|
||||
$ordering = ($this->t['lists']['order'] == 'a.ordering');
|
||||
|
||||
|
||||
if ($this->t['type'] == 0) {
|
||||
$view = 'file';
|
||||
} else if ($this->t['type'] == 1) {
|
||||
$view = 'fileplaylink';
|
||||
} else if ($this->t['type'] == 2) {
|
||||
$view = 'fileplay';
|
||||
} else if ($this->t['type'] == 3) {
|
||||
$view = 'filepreviewlink';
|
||||
} else if ($this->t['type'] == 4) {
|
||||
$view = 'filelist';
|
||||
}
|
||||
|
||||
$js = '';
|
||||
$js .= '
|
||||
function insertLink() {
|
||||
|
||||
if (!Joomla.getOptions(\'xtd-phocadownload\')) {
|
||||
return false;
|
||||
}
|
||||
|
||||
var _Joomla$getOptions = Joomla.getOptions(\'xtd-phocadownload\'), editor = _Joomla$getOptions.editor;
|
||||
|
||||
var title = document.getElementById("title").value;
|
||||
if (title != "") {
|
||||
title = "|text="+title;
|
||||
}';
|
||||
if ($this->t['type'] == 0) {
|
||||
$js .= 'var target = document.getElementById("target").value;
|
||||
if (target != "") {
|
||||
target = "|target="+target;
|
||||
}';
|
||||
} else if ($this->t['type'] == 1 || $this->t['type'] == 2) {
|
||||
$js .= 'var playerwidth = document.getElementById("playerwidth").value;
|
||||
if (playerwidth != "") {
|
||||
playerwidth = "|playerwidth="+playerwidth;
|
||||
}
|
||||
var playerheight = document.getElementById("playerheight").value;
|
||||
if (playerheight != "") {
|
||||
playerheight = "|playerheight="+playerheight;
|
||||
}
|
||||
var playerheightmp3 = document.getElementById("playerheightmp3").value;
|
||||
if (playerheightmp3 != "") {
|
||||
playerheightmp3 = "|playerheightmp3="+playerheightmp3;
|
||||
}';
|
||||
} else if ($this->t['type'] == 3) {
|
||||
$js .= 'var previewwidth = document.getElementById("previewwidth").value;
|
||||
if (previewwidth != "") {
|
||||
previewwidth = "|previewwidth="+previewwidth;
|
||||
}
|
||||
var previewheight = document.getElementById("previewheight").value;
|
||||
if (previewheight != "") {
|
||||
previewheight = "|previewheight="+previewheight;
|
||||
}';
|
||||
|
||||
} else if ($this->t['type'] == 4) {
|
||||
$js .= 'var limit = document.getElementById("limit").value;
|
||||
if (limit != "") {
|
||||
limit = "|limit="+limit;
|
||||
}
|
||||
var categoryid = document.getElementById("catid").value;
|
||||
if (categoryid != "" && parseInt(categoryid) > 0) {
|
||||
categoryIdOutput = "|id="+categoryid;
|
||||
} else {
|
||||
categoryIdOutput = "";
|
||||
}';
|
||||
|
||||
}
|
||||
|
||||
$js .= 'var fileIdOutput;
|
||||
fileIdOutput = "";
|
||||
len = document.getElementsByName("fileid").length;
|
||||
for (i = 0; i <len; i++) {
|
||||
if (document.getElementsByName(\'fileid\')[i].checked) {
|
||||
fileid = document.getElementsByName(\'fileid\')[i].value;
|
||||
if (fileid != "" && parseInt(fileid) > 0) {
|
||||
fileIdOutput = "|id="+fileid;
|
||||
} else {
|
||||
fileIdOutput = "";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (fileIdOutput != "" && parseInt(fileid) > 0) {';
|
||||
if ($this->t['type'] == 0) {
|
||||
$js .= 'var tag = "{phocadownload view=' . $view . '"+fileIdOutput+title+target+"}";';
|
||||
} else if ($this->t['type'] == 1) {
|
||||
$js .= 'var tag = "{phocadownload view=' . $view . '"+fileIdOutput+title+playerwidth+playerheight+playerheightmp3+"}";';
|
||||
} else if ($this->t['type'] == 2) {
|
||||
$js .= 'var tag = "{phocadownload view=' . $view . '"+fileIdOutput+title+playerwidth+playerheight+playerheightmp3+"}";';
|
||||
} else if ($this->t['type'] == 3) {
|
||||
$js .= 'var tag = "{phocadownload view=' . $view . '"+fileIdOutput+title+previewwidth+previewheight+"}";';
|
||||
} else if ($this->t['type'] == 4) {
|
||||
$js .= 'var tag = "{phocadownload view=' . $view . '"+fileIdOutput+limit+"}";';
|
||||
}
|
||||
/*$js .= 'window.parent.jInsertEditorText(tag, \''. htmlspecialchars($this->t['ename']).'\');';
|
||||
//window.parent.document.getElementById('sbox-window').close();
|
||||
$js .= 'window.parent.SqueezeBox.close();
|
||||
return false;*/
|
||||
$js .= 'window.parent.Joomla.editors.instances[editor].replaceSelection(tag);
|
||||
|
||||
if (window.parent.Joomla.Modal) {
|
||||
window.parent.Joomla.Modal.getCurrent().close();
|
||||
}
|
||||
|
||||
return false;
|
||||
} else {';
|
||||
|
||||
if ($this->t['type'] == 4) {
|
||||
|
||||
$js .= 'if (categoryIdOutput != \'\' && parseInt(categoryid) > 0) {
|
||||
var tag = "{phocadownload view=' . $view . '"+categoryIdOutput+limit+"}";';
|
||||
|
||||
$js .= 'window.parent.Joomla.editors.instances[editor].replaceSelection(tag);
|
||||
|
||||
if (window.parent.Joomla.Modal) {
|
||||
window.parent.Joomla.Modal.getCurrent().close();
|
||||
}
|
||||
|
||||
return false;
|
||||
|
||||
} else {
|
||||
alert("' . Text::_('COM_PHOCADOWNLOAD_YOU_MUST_SELECT_CATEGORY', true) . '");
|
||||
return false;
|
||||
}';
|
||||
} else {
|
||||
$js .= 'alert("' . Text::_('COM_PHOCADOWNLOAD_YOU_MUST_SELECT_FILE', true) . '");
|
||||
return false;';
|
||||
}
|
||||
$js .= '}';
|
||||
$js .= '}';
|
||||
|
||||
Factory::getDocument()->addScriptDeclaration($js); ?>
|
||||
|
||||
<div id="phocadownload-links">
|
||||
<fieldset class="adminform options-menu options-form">
|
||||
|
||||
<legend><?php echo Text::_('COM_PHOCADOWNLOAD_FILE'); ?></legend>
|
||||
<form action="<?php echo $this->t['request_url']; ?>" method="post" name="adminForm" id="adminForm">
|
||||
<?php if ($this->t['type'] != 4) { ?>
|
||||
<table class="admintable" width="100%">
|
||||
<tr>
|
||||
<td class="key" align="right" width="20%">
|
||||
<label for="title">
|
||||
<?php echo Text::_('COM_PHOCADOWNLOAD_FILTER'); ?>
|
||||
</label>
|
||||
</td>
|
||||
<td width="80%">
|
||||
<div class="input-append"><input type="text" name="search" id="search" value="<?php echo PhocaDownloadUtils::filterValue($this->t['lists']['search'], 'text'); ?>" class="form-control"
|
||||
onchange="document.adminForm.submit();"/>
|
||||
<button class="btn btn-primary" onclick="this.form.submit();"><?php echo Text::_('COM_PHOCADOWNLOAD_FILTER'); ?></button>
|
||||
<button class="btn btn-primary" onclick="document.getElementById('search').value='';this.form.submit();"><?php echo Text::_('COM_PHOCADOWNLOAD_RESET'); ?></button>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="key" align="right" nowrap="nowrap">
|
||||
<label for="title" nowrap="nowrap"><?php echo Text::_('COM_PHOCADOWNLOAD_CATEGORY'); ?></label>
|
||||
</td>
|
||||
<td><?php echo $this->t['lists']['catid']; ?></td>
|
||||
</tr>
|
||||
</table>
|
||||
<?php } ?>
|
||||
|
||||
<?php if ($this->t['type'] != 4) { ?>
|
||||
<div id="editcell">
|
||||
<table class="adminlist plg-button-tbl">
|
||||
<thead>
|
||||
<tr>
|
||||
<th width="5%"><?php echo Text::_('COM_PHOCADOWNLOAD_NUM'); ?></th>
|
||||
<th width="5%"></th>
|
||||
<th class="title" width="60%"><?php echo HTMLHelper::_('grid.sort', 'COM_PHOCADOWNLOAD_TITLE', 'a.title', $this->t['lists']['order_Dir'], $this->t['lists']['order']); ?>
|
||||
</th>
|
||||
<th width="20%" nowrap="nowrap"><?php echo HTMLHelper::_('grid.sort', 'COM_PHOCADOWNLOAD_FILENAME', 'a.filename', $this->t['lists']['order_Dir'], $this->t['lists']['order']); ?>
|
||||
</th>
|
||||
<th width="10%" nowrap="nowrap"><?php echo HTMLHelper::_('grid.sort', 'COM_PHOCADOWNLOAD_ID', 'a.id', $this->t['lists']['order_Dir'], $this->t['lists']['order']); ?>
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td colspan="5"><?php echo $this->t['pagination']->getListFooter(); ?></td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
<tbody>
|
||||
<?php
|
||||
$k = 0;
|
||||
for ($i = 0, $n = count($this->t['items']); $i < $n; $i++) {
|
||||
$row = &$this->t['items'][$i];
|
||||
|
||||
|
||||
?>
|
||||
<tr class="<?php echo "row$k"; ?>">
|
||||
<td><?php echo $this->t['pagination']->getRowOffset($i); ?></td>
|
||||
<td><label style="width: 100%; display: inline-block;"><input type="radio" name="fileid" value="<?php echo $row->id ?>"/></label></td>
|
||||
|
||||
<td><?php echo $row->title; ?></td>
|
||||
<td><?php echo $row->filename; ?></td>
|
||||
<td align="center"><?php echo $row->id; ?></td>
|
||||
</tr>
|
||||
<?php
|
||||
$k = 1 - $k;
|
||||
}
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
||||
<input type="hidden" name="controller" value="phocadownloadlinkfile"/>
|
||||
<input type="hidden" name="type" value="<?php echo $this->t['type']; ?>"/>
|
||||
<input type="hidden" name="task" value=""/>
|
||||
<input type="hidden" name="boxchecked" value="0"/>
|
||||
<input type="hidden" name="filter_order" value="<?php echo $this->t['lists']['order']; ?>"/>
|
||||
<input type="hidden" name="filter_order_Dir" value="<?php echo $this->t['lists']['order_Dir']; ?>"/>
|
||||
<input type="hidden" name="editor" value="<?php echo $this->t['ename'] ?>"/>
|
||||
</form>
|
||||
|
||||
<hr>
|
||||
<?php
|
||||
|
||||
if ($this->t['type'] == 0) {
|
||||
?>
|
||||
<form name="adminFormLink" id="adminFormLink">
|
||||
<div class="control-group">
|
||||
<div class="control-label">
|
||||
<label for="title"><?php echo Text::_('COM_PHOCADOWNLOAD_TITLE'); ?></label>
|
||||
</div>
|
||||
<div class="controls"><input class="form-control" type="text" id="title" name="title"/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="control-group">
|
||||
<div class="control-label">
|
||||
<label for="target">
|
||||
<?php echo Text::_('COM_PHOCADOWNLOAD_TARGET'); ?>
|
||||
</label>
|
||||
</div>
|
||||
<div class="controls">
|
||||
<select name="target" id="target" class="form-select">
|
||||
<option value="s" selected="selected"><?php echo Text::_('COM_PHOCADOWNLOAD_TARGET_SELF'); ?></option>
|
||||
<option value="b"><?php echo Text::_('COM_PHOCADOWNLOAD_TARGET_BLANK'); ?></option>
|
||||
<option value="t"><?php echo Text::_('COM_PHOCADOWNLOAD_TARGET_TOP'); ?></option>
|
||||
<option value="p"><?php echo Text::_('COM_PHOCADOWNLOAD_TARGET_PARENT'); ?></option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="btn-box-submit">
|
||||
<button class="btn btn-primary plg-button-insert " onclick="insertLink();return false;"><span class="icon-ok"></span> <?php echo Text::_('COM_PHOCADOWNLOAD_INSERT_CODE'); ?></button>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<?php
|
||||
} else if ($this->t['type'] == 1 || $this->t['type'] == 2) {
|
||||
?>
|
||||
|
||||
<form name="adminFormLink" id="adminFormLink">
|
||||
<div class="control-group">
|
||||
|
||||
<?php if ($this->t['type'] == 1) { ?>
|
||||
<div class="control-label">
|
||||
<label for="title">
|
||||
<?php echo Text::_('COM_PHOCADOWNLOAD_TITLE'); ?>
|
||||
</label>
|
||||
</div>
|
||||
<div class="controls">
|
||||
<input class="form-control" type="text" id="title" name="title"/>
|
||||
</div>
|
||||
|
||||
<?php } else { ?>
|
||||
<input type="hidden" id="title" name="title"/>
|
||||
<?php } ?>
|
||||
</div>
|
||||
|
||||
<div class="control-group">
|
||||
|
||||
<div class="control-label">
|
||||
<label for="playerwidth">
|
||||
<?php echo Text::_('COM_PHOCADOWNLOAD_PLAYER_WIDTH'); ?>
|
||||
</label>
|
||||
</div>
|
||||
<div class="controls">
|
||||
<input class="form-control" type="text" id="playerwidth" name="playerwidth" value="328"/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="control-group">
|
||||
|
||||
<div class="control-label">
|
||||
<label for="playerheight">
|
||||
<?php echo Text::_('COM_PHOCADOWNLOAD_PLAYER_HEIGHT'); ?>
|
||||
</label>
|
||||
</div>
|
||||
<div class="controls">
|
||||
<input class="form-control" type="text" id="playerheight" name="playerheight" value="200"/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="control-group">
|
||||
|
||||
<div class="control-label">
|
||||
<label for="playerheightmp3">
|
||||
<?php echo Text::_('COM_PHOCADOWNLOAD_PLAYER_HEIGHT_MP3'); ?>
|
||||
</label>
|
||||
</div>
|
||||
<div class="controls">
|
||||
<input class="form-control" type="text" id="playerheightmp3" name="playerheightmp3" value="30"/>
|
||||
</div>
|
||||
</div>
|
||||
<?php if ($this->t['type'] == 1) { ?>
|
||||
<div class="ph-warning"><?php echo Text::_('COM_PHOCADOWNLOAD_WARNING_PLAYER_SIZE') ?></div>
|
||||
<?php } ?>
|
||||
<div class="btn-box-submit">
|
||||
<button class="btn btn-primary plg-button-insert " onclick="insertLink();return false;"><span class="icon-ok"></span> <?php echo Text::_('COM_PHOCADOWNLOAD_INSERT_CODE'); ?></button>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<?php
|
||||
} else if ($this->t['type'] == 3) {
|
||||
?>
|
||||
|
||||
<form name="adminFormLink" id="adminFormLink">
|
||||
<div class="control-group">
|
||||
|
||||
<?php if ($this->t['type'] == 1) { ?>
|
||||
<div class="control-label">
|
||||
<label for="title">
|
||||
<?php echo Text::_('COM_PHOCADOWNLOAD_TITLE'); ?>
|
||||
</label>
|
||||
</div>
|
||||
<div class="controls">
|
||||
<input class="form-control" type="text" id="title" name="title"/>
|
||||
</div>
|
||||
<?php } else { ?>
|
||||
<input type="hidden" id="title" name="title"/>
|
||||
<?php } ?>
|
||||
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<div class="control-label">
|
||||
<label for="previewwidth">
|
||||
<?php echo Text::_('COM_PHOCADOWNLOAD_PREVIEW_WIDTH'); ?>
|
||||
</label>
|
||||
</div>
|
||||
<div class="controls">
|
||||
<input class="form-control" type="text" id="previewwidth" name="previewwidth" value="640"/>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<div class="control-label">
|
||||
<label for="previewheight">
|
||||
<?php echo Text::_('COM_PHOCADOWNLOAD_PREVIEW_HEIGHT'); ?>
|
||||
</label>
|
||||
</div>
|
||||
<div class="controls">
|
||||
<input type="text" class="form-control" id="previewheight" name="previewheight" value="480"/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="btn-box-submit">
|
||||
<button class="btn btn-primary plg-button-insert " onclick="insertLink();return false;"><span class="icon-ok"></span> <?php echo Text::_('COM_PHOCADOWNLOAD_INSERT_CODE'); ?></button>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<?php
|
||||
} else if ($this->t['type'] == 4) {
|
||||
?>
|
||||
|
||||
<form name="adminFormLink" id="adminFormLink">
|
||||
<div class="control-group">
|
||||
<div class="control-label">
|
||||
<label for="title" nowrap="nowrap"><?php echo Text::_('COM_PHOCADOWNLOAD_CATEGORY'); ?></label>
|
||||
</div>
|
||||
<div class="controls"><?php echo $this->t['lists']['catid']; ?></div>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<div class="control-label">
|
||||
<label for="title">
|
||||
<?php echo Text::_('COM_PHOCADOWNLOAD_LIMIT'); ?>
|
||||
</label>
|
||||
</div>
|
||||
<div class="controls">
|
||||
<input type="text" id="limit" name="limit" class="form-control"/>
|
||||
<input type="hidden" id="title" name="title"/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="btn-box-submit">
|
||||
<button class="btn btn-primary plg-button-insert " onclick="insertLink();return false;"><span class="icon-ok"></span> <?php echo Text::_('COM_PHOCADOWNLOAD_INSERT_CODE'); ?></button>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</fieldset>
|
||||
<div class="btn-box-back"><a class="btn btn-light" href="<?php echo $this->t['backlink']; ?>"><span class="icon-arrow-left"></span> <?php echo Text::_('COM_PHOCADOWNLOAD_BACK') ?></a></div>
|
||||
</div>
|
||||
@ -0,0 +1 @@
|
||||
<html><body bgcolor="#FFFFFF"></body></html>
|
||||
@ -0,0 +1,149 @@
|
||||
<?php
|
||||
/*
|
||||
* @package Joomla 1.5
|
||||
* @copyright Copyright (C) 2005 Open Source Matters. All rights reserved.
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see LICENSE.php
|
||||
*
|
||||
* @component Phoca Component
|
||||
* @copyright Copyright (C) Jan Pavelka www.phoca.cz
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
|
||||
*/
|
||||
defined('_JEXEC') or die();
|
||||
use Joomla\CMS\MVC\View\HtmlView;
|
||||
use Joomla\CMS\Factory;
|
||||
use Joomla\CMS\Uri\Uri;
|
||||
use Joomla\CMS\Component\ComponentHelper;
|
||||
use Joomla\CMS\HTML\HTMLHelper;
|
||||
jimport( 'joomla.application.component.view' );
|
||||
use Joomla\String\StringHelper;
|
||||
|
||||
class PhocaDownloadCpViewPhocaDownloadLinkFile extends HtmlView
|
||||
{
|
||||
public $_context = 'com_phocadownload.phocadownloadlinkfile';
|
||||
|
||||
protected $t;
|
||||
protected $r;
|
||||
|
||||
function display($tpl = null) {
|
||||
$app = Factory::getApplication();
|
||||
$this->r = new PhocaDownloadRenderAdminViews();
|
||||
$this->t = PhocaDownloadUtils::setVars('linkfile');
|
||||
|
||||
$uri = Uri::getInstance();
|
||||
$document = Factory::getDocument();
|
||||
$db = Factory::getDBO();
|
||||
|
||||
//Frontend Changes
|
||||
$tUri = '';
|
||||
if (!$app->isClient('administrator')) {
|
||||
$tUri = Uri::base();
|
||||
|
||||
}
|
||||
|
||||
$editor = $app->input->getCmd('editor', '');
|
||||
if (!empty($editor)) {
|
||||
$this->document->addScriptOptions('xtd-phocadownload', array('editor' => $editor));
|
||||
}
|
||||
|
||||
HTMLHelper::stylesheet( 'media/com_phocadownload/css/administrator/phocadownload.css' );
|
||||
HTMLHelper::stylesheet( 'media/plg_editors-xtd_phocadownload/css/phocadownload.css' );
|
||||
|
||||
//JHtml::stylesheet( 'media/com_phocadownload/css/administrator/phocadownload.css' );
|
||||
|
||||
$eName = $app->input->get('editor');
|
||||
$this->t['ename'] = preg_replace( '#[^A-Z0-9\-\_\[\]]#i', '', $eName );
|
||||
$this->t['type'] = $app->input->get( 'type', 1, '', 'int' );
|
||||
$this->t['backlink'] = $tUri.'index.php?option=com_phocadownload&view=phocadownloadlinks&tmpl=component&editor='.$this->t['ename'];
|
||||
|
||||
|
||||
$params = ComponentHelper::getParams('com_phocadownload') ;
|
||||
|
||||
//Filter
|
||||
$context = 'com_phocadownload.phocadownload.list.';
|
||||
//$sectionid = JFactory::getApplication()->input->get( 'sectionid', -1, '', 'int' );
|
||||
//$redirect = $sectionid;
|
||||
$option = Factory::getApplication()->input->getCmd( 'option' );
|
||||
|
||||
$filter_published = $app->getUserStateFromRequest( $this->_context.'.filter_published', 'filter_published', '', 'word' );
|
||||
$filter_catid = $app->getUserStateFromRequest( $this->_context.'.filter_catid', 'filter_catid', 0, 'int' );
|
||||
$catid = $app->getUserStateFromRequest( $this->_context.'.catid', 'catid', 0, 'int');
|
||||
// $filter_sectionid = $app->getUserStateFromRequest( $this->_context.'.filter_sectionid','filter_sectionid', -1, 'int');
|
||||
$filter_order = $app->getUserStateFromRequest( $this->_context.'.filter_order', 'filter_order', 'a.ordering', 'cmd' );
|
||||
$filter_order_Dir = $app->getUserStateFromRequest( $this->_context.'.filter_order_Dir', 'filter_order_Dir', '', 'word' );
|
||||
$search = $app->getUserStateFromRequest( $this->_context.'.search','search', '', 'string' );
|
||||
$search = StringHelper::strtolower( $search );
|
||||
|
||||
// Get data from the model
|
||||
$items = $this->get( 'Data');
|
||||
$total = $this->get( 'Total');
|
||||
$pagination = $this->get( 'Pagination' );
|
||||
|
||||
// build list of categories
|
||||
|
||||
if ($this->t['type'] != 4) {
|
||||
$javascript = 'class="form-control" size="1" onchange="submitform( );"';
|
||||
} else {
|
||||
$javascript = '';
|
||||
}
|
||||
// get list of categories for dropdown filter
|
||||
$filter = '';
|
||||
|
||||
//if ($filter_sectionid > 0) {
|
||||
// $filter = ' WHERE cc.section = '.$db->Quote($filter_sectionid);
|
||||
//}
|
||||
|
||||
// get list of categories for dropdown filter
|
||||
$query = 'SELECT cc.id AS value, cc.title AS text' .
|
||||
' FROM #__phocadownload_categories AS cc' .
|
||||
$filter .
|
||||
' ORDER BY cc.ordering';
|
||||
|
||||
if ($this->t['type'] != 4) {
|
||||
$lists['catid'] = PhocaDownloadCategory::filterCategory($query, $catid, null, true, true);
|
||||
} else {
|
||||
$lists['catid'] = PhocaDownloadCategory::filterCategory($query, $catid, null, false, true);
|
||||
}
|
||||
/*
|
||||
if ($this->t['type'] != 4) {
|
||||
$lists['catid'] = PhocaDownloadCategory::filterCategory($query, $catid, null, true);
|
||||
} else {
|
||||
$lists['catid'] = PhocaDownloadCategory::filterCategory($query, $catid, null, false);
|
||||
}*/
|
||||
|
||||
// sectionid
|
||||
/*$query = 'SELECT s.title AS text, s.id AS value'
|
||||
. ' FROM #__phocadownload_sections AS s'
|
||||
. ' WHERE s.published = 1'
|
||||
. ' ORDER BY s.ordering';
|
||||
|
||||
$lists['sectionid'] = PhocaDownloadCategory::filterSection($query, $filter_sectionid);*/
|
||||
|
||||
// state filter
|
||||
$lists['state'] = HTMLHelper::_('grid.state', $filter_published );
|
||||
|
||||
// table ordering
|
||||
$lists['order_Dir'] = $filter_order_Dir;
|
||||
$lists['order'] = $filter_order;
|
||||
|
||||
// search filter
|
||||
$lists['search']= $search;
|
||||
|
||||
|
||||
$user = Factory::getUser();
|
||||
$uriS = $uri->toString();
|
||||
//$this->assignRef('user', $user);
|
||||
//$this->assignRef('lists', $lists);
|
||||
$this->t['lists'] = $lists;
|
||||
|
||||
|
||||
//$this->assignRef('items', $items);
|
||||
$this->t['items'] = $items;
|
||||
//$this->assignRef('pagination', $pagination);
|
||||
$this->t['pagination'] = $pagination;
|
||||
//$this->assignRef('request_url', $uriS);
|
||||
$this->t['request_url'] = $uriS;
|
||||
|
||||
parent::display($tpl);
|
||||
}
|
||||
}
|
||||
?>
|
||||
@ -0,0 +1 @@
|
||||
<html><body bgcolor="#FFFFFF"></body></html>
|
||||
@ -0,0 +1,28 @@
|
||||
<?php
|
||||
/* @package Joomla
|
||||
* @copyright Copyright (C) Open Source Matters. All rights reserved.
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see LICENSE.php
|
||||
* @extension Phoca Extension
|
||||
* @copyright Copyright (C) Jan Pavelka www.phoca.cz
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
|
||||
*/
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
use Joomla\CMS\Language\Text;
|
||||
|
||||
|
||||
echo '<div id="phocadownload-links">'
|
||||
.'<fieldset class="adminform">'
|
||||
.'<legend>'.Text::_( 'COM_PHOCADOWNLOAD_SELECT_TYPE' ).'</legend>'
|
||||
.'<ul>'
|
||||
.'<li class="ph-icon-16-edb-categories"><a href="'.$this->t['linkcategories'].'">'.Text::_('COM_PHOCADOWNLOAD_LINK_TO_CATEGORIES').'</a></li>'
|
||||
.'<li class="ph-icon-16-edb-category"><a href="'.$this->t['linkcategory'].'">'.Text::_('COM_PHOCADOWNLOAD_LINK_TO_CATEGORY').'</a></li>'
|
||||
.'<li class="ph-icon-16-edb-file"><a href="'.$this->t['linkfile'].'&type=0">'.Text::_('COM_PHOCADOWNLOAD_LINK_TO_FILE').'</a></li>'
|
||||
.'<li class="ph-icon-16-edb-play"><a href="'.$this->t['linkfile'].'&type=1">'.Text::_('COM_PHOCADOWNLOAD_PLAY_FILE_LINK').'</a> <a href="'.$this->t['linkfile'].'&type=2">'.Text::_('COM_PHOCADOWNLOAD_PLAY_FILE_DIRECT').'</a></li>'
|
||||
.'<li class="ph-icon-16-edb-preview"><a href="'.$this->t['linkfile'].'&type=3">'.Text::_('COM_PHOCADOWNLOAD_PREVIEW_FILE_LINK').'</a></li>'
|
||||
.'<li class="ph-icon-16-edb-file"><a href="'.$this->t['linkfile'].'&type=4">'.Text::_('COM_PHOCADOWNLOAD_FILELIST').'</a></li>'
|
||||
.'<li class="ph-icon-16-edb-play"><a href="'.$this->t['linkytb'].'">'.Text::_('COM_PHOCADOWNLOAD_YOUTUBE_VIDEO').'</a></li>'
|
||||
.'</ul>'
|
||||
.'</div>'
|
||||
.'</fieldset>'
|
||||
.'</div>';
|
||||
?>
|
||||
@ -0,0 +1 @@
|
||||
<html><body bgcolor="#FFFFFF"></body></html>
|
||||
@ -0,0 +1,57 @@
|
||||
<?php
|
||||
/* @package Joomla
|
||||
* @copyright Copyright (C) Open Source Matters. All rights reserved.
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see LICENSE.php
|
||||
* @extension Phoca Extension
|
||||
* @copyright Copyright (C) Jan Pavelka www.phoca.cz
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
|
||||
*/
|
||||
defined('_JEXEC') or die();
|
||||
use Joomla\CMS\MVC\View\HtmlView;
|
||||
use Joomla\CMS\Factory;
|
||||
use Joomla\CMS\Uri\Uri;
|
||||
use Joomla\CMS\HTML\HTMLHelper;
|
||||
jimport( 'joomla.application.component.view' );
|
||||
|
||||
class phocaDownloadCpViewphocaDownloadLinks extends HtmlView
|
||||
{
|
||||
|
||||
protected $t;
|
||||
protected $r;
|
||||
|
||||
function display($tpl = null) {
|
||||
$app = Factory::getApplication();
|
||||
$this->r = new PhocaDownloadRenderAdminViews();
|
||||
$this->t = PhocaDownloadUtils::setVars('links');
|
||||
|
||||
//Frontend Changes
|
||||
$tUri = '';
|
||||
if (!$app->isClient('administrator')) {
|
||||
$tUri = Uri::base();
|
||||
|
||||
}
|
||||
|
||||
$editor = $app->input->getCmd('editor', '');
|
||||
if (!empty($editor)) {
|
||||
$this->document->addScriptOptions('xtd-phocadownload', array('editor' => $editor));
|
||||
}
|
||||
|
||||
$document = Factory::getDocument();
|
||||
$uri = Uri::getInstance();
|
||||
HTMLHelper::stylesheet( 'media/com_phocadownload/css/administrator/phocadownload.css' );
|
||||
HTMLHelper::stylesheet( 'media/plg_editors-xtd_phocadownload/css/phocadownload.css' );
|
||||
|
||||
$eName = Factory::getApplication()->input->get('editor');
|
||||
$eName = preg_replace( '#[^A-Z0-9\-\_\[\]]#i', '', $eName );
|
||||
|
||||
|
||||
$this->t['linkcategories'] = $tUri.'index.php?option=com_phocadownload&view=phocadownloadlinkcats&tmpl=component&editor='.$eName;
|
||||
$this->t['linkcategory'] = $tUri.'index.php?option=com_phocadownload&view=phocadownloadlinkcat&tmpl=component&editor='.$eName;
|
||||
$this->t['linkfile'] = $tUri.'index.php?option=com_phocadownload&view=phocadownloadlinkfile&tmpl=component&editor='.$eName;
|
||||
$this->t['linkytb'] = $tUri.'index.php?option=com_phocadownload&view=phocadownloadlinkytb&tmpl=component&editor='.$eName;
|
||||
|
||||
|
||||
parent::display($tpl);
|
||||
}
|
||||
}
|
||||
?>
|
||||
@ -0,0 +1 @@
|
||||
<html><body bgcolor="#FFFFFF"></body></html>
|
||||
@ -0,0 +1,70 @@
|
||||
<?php
|
||||
/* @package Joomla
|
||||
* @copyright Copyright (C) Open Source Matters. All rights reserved.
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see LICENSE.php
|
||||
* @extension Phoca Extension
|
||||
* @copyright Copyright (C) Jan Pavelka www.phoca.cz
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
|
||||
*/
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
use Joomla\CMS\Language\Text;
|
||||
use Joomla\CMS\Factory;
|
||||
|
||||
$js = '';
|
||||
$js .= '
|
||||
function insertLink() {
|
||||
|
||||
if (!Joomla.getOptions(\'xtd-phocadownload\')) {
|
||||
return false;
|
||||
}
|
||||
|
||||
var _Joomla$getOptions = Joomla.getOptions(\'xtd-phocadownload\'), editor = _Joomla$getOptions.editor;
|
||||
|
||||
var urlOutput;
|
||||
var url = document.getElementById("url").value;
|
||||
if (url != \'\' ) {
|
||||
urlOutput = "|url="+url;
|
||||
}
|
||||
|
||||
if (urlOutput != \'\' && urlOutput) {
|
||||
var tag = "{phocadownload view=youtube"+urlOutput+"}";
|
||||
window.parent.Joomla.editors.instances[editor].replaceSelection(tag);
|
||||
|
||||
if (window.parent.Joomla.Modal) {
|
||||
window.parent.Joomla.Modal.getCurrent().close();
|
||||
}
|
||||
|
||||
return false;
|
||||
} else {
|
||||
alert("' . Text::_('COM_PHOCADOWNLOAD_WARNING_SET_YOUTUBE_URL', true) . '");
|
||||
return false;
|
||||
}
|
||||
}';
|
||||
|
||||
Factory::getDocument()->addScriptDeclaration($js); ?>
|
||||
|
||||
<div id="phocadownload-links">
|
||||
<fieldset class="adminform options-menu options-form">
|
||||
<legend><?php echo Text::_('COM_PHOCADOWNLOAD_YOUTUBE_VIDEO'); ?></legend>
|
||||
<form name="adminFormLink" id="adminFormLink">
|
||||
<div class="control-group">
|
||||
<div class="control-label">
|
||||
<label for="url">
|
||||
<?php echo Text::_('COM_PHOCADOWNLOAD_YOUTUBE_URL'); ?>
|
||||
</label>
|
||||
</div>
|
||||
<div class="controls">
|
||||
<input type="text" id="url" name="url" class="form-control"/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="btn-box-submit">
|
||||
<button class="btn btn-primary plg-button-insert " onclick="insertLink();return false;"><span class="icon-ok"></span> <?php echo Text::_('COM_PHOCADOWNLOAD_INSERT_CODE'); ?></button>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
</fieldset>
|
||||
<div class="btn-box-back"><a class="btn btn-light" href="<?php echo $this->t['backlink']; ?>"><span class="icon-arrow-left"></span> <?php echo Text::_('COM_PHOCADOWNLOAD_BACK') ?></a></div>
|
||||
</div>
|
||||
@ -0,0 +1 @@
|
||||
<html><body bgcolor="#FFFFFF"></body></html>
|
||||
@ -0,0 +1,56 @@
|
||||
<?php
|
||||
/*
|
||||
* @package Joomla 1.5
|
||||
* @copyright Copyright (C) 2005 Open Source Matters. All rights reserved.
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see LICENSE.php
|
||||
*
|
||||
* @component Phoca Component
|
||||
* @copyright Copyright (C) Jan Pavelka www.phoca.cz
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
|
||||
*/
|
||||
defined('_JEXEC') or die();
|
||||
|
||||
use Joomla\CMS\HTML\HTMLHelper;
|
||||
use Joomla\CMS\MVC\View\HtmlView;
|
||||
use Joomla\CMS\Factory;
|
||||
use Joomla\CMS\Uri\Uri;
|
||||
jimport( 'joomla.application.component.view' );
|
||||
|
||||
class phocaDownloadCpViewphocaDownloadLinkYtb extends HtmlView
|
||||
{
|
||||
|
||||
protected $t;
|
||||
protected $r;
|
||||
|
||||
function display($tpl = null) {
|
||||
$app = Factory::getApplication();
|
||||
$this->r = new PhocaDownloadRenderAdminViews();
|
||||
$this->t = PhocaDownloadUtils::setVars('linkytb');
|
||||
$document = Factory::getDocument();
|
||||
$uri = Uri::getInstance();
|
||||
//Frontend Changes
|
||||
$tUri = '';
|
||||
if (!$app->isClient('administrator')) {
|
||||
$tUri = Uri::base();
|
||||
|
||||
}
|
||||
|
||||
$editor = $app->input->getCmd('editor', '');
|
||||
if (!empty($editor)) {
|
||||
$this->document->addScriptOptions('xtd-phocadownload', array('editor' => $editor));
|
||||
}
|
||||
|
||||
|
||||
HTMLHelper::stylesheet( 'media/com_phocadownload/css/administrator/phocadownload.css' );
|
||||
HTMLHelper::stylesheet( 'media/plg_editors-xtd_phocadownload/css/phocadownload.css' );
|
||||
|
||||
|
||||
$eName = Factory::getApplication()->input->get('editor');
|
||||
$this->t['ename'] = preg_replace( '#[^A-Z0-9\-\_\[\]]#i', '', $eName );
|
||||
$this->t['backlink'] = $tUri.'index.php?option=com_phocadownload&view=phocadownloadlinks&tmpl=component&editor='.$this->t['ename'];
|
||||
|
||||
|
||||
parent::display($tpl);
|
||||
}
|
||||
}
|
||||
?>
|
||||
@ -0,0 +1 @@
|
||||
<html><body bgcolor="#FFFFFF"></body></html>
|
||||
@ -0,0 +1,157 @@
|
||||
<?php
|
||||
/*
|
||||
* @package Joomla
|
||||
* @copyright Copyright (C) Open Source Matters. All rights reserved.
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see LICENSE.php
|
||||
* @component Phoca Gallery
|
||||
* @copyright Copyright (C) Jan Pavelka www.phoca.cz
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
|
||||
*/
|
||||
defined('_JEXEC') or die;
|
||||
use Joomla\CMS\Factory;
|
||||
use Joomla\CMS\Language\Text;
|
||||
use Joomla\CMS\Layout\LayoutHelper;
|
||||
use Joomla\CMS\HTML\HTMLHelper;
|
||||
use Joomla\CMS\Router\Route;
|
||||
$r = $this->r;
|
||||
$user = Factory::getUser();
|
||||
$userId = $user->get('id');
|
||||
$listOrder = $this->escape($this->state->get('list.ordering'));
|
||||
$listDirn = $this->escape($this->state->get('list.direction'));
|
||||
$canOrder = $user->authorise('core.edit.state', $this->t['o']);
|
||||
$saveOrder = $listOrder == 'a.ordering';
|
||||
$saveOrderingUrl = '';
|
||||
if ($saveOrder && !empty($this->items)) {
|
||||
$saveOrderingUrl = $r->saveOrder($this->t, $listDirn);
|
||||
}
|
||||
$sortFields = $this->getSortFields();
|
||||
|
||||
echo $r->jsJorderTable($listOrder);
|
||||
|
||||
|
||||
|
||||
echo $r->startForm($this->t['o'], $this->t['tasks'], 'adminForm');
|
||||
|
||||
|
||||
|
||||
|
||||
//echo $r->startFilter();
|
||||
//echo $r->selectFilterLanguage('JOPTION_SELECT_LANGUAGE', $this->state->get('filter.language'));
|
||||
//echo $r->selectFilterCategory(PhocaDownloadCategory::options($this->t['o']), 'JOPTION_SELECT_CATEGORY', $this->state->get('filter.category_id'));
|
||||
//echo $r->endFilter();
|
||||
|
||||
echo $r->startMainContainer();
|
||||
|
||||
if ($this->t['p']->get('enable_logging', 0) == 0) {
|
||||
echo '<div class="alert alert-warning alert-dismissible fade show" role="alert">'. Text::_('COM_PHOCADOWNLOAD_LOGGING_NOT_ENABLED').'<button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="'.Text::_('COM_PHOCADOWNLOAD_CLOSE').'"></button></div>';
|
||||
}
|
||||
/*
|
||||
echo $r->startFilterBar();
|
||||
echo $r->inputFilterSearch($this->t['l'].'_FILTER_SEARCH_LABEL', $this->t['l'].'_FILTER_SEARCH_DESC',
|
||||
$this->escape($this->state->get('filter.search')));
|
||||
echo $r->inputFilterSearchClear('JSEARCH_FILTER_SUBMIT', 'JSEARCH_FILTER_CLEAR');
|
||||
echo $r->inputFilterSearchLimit('JFIELD_PLG_SEARCH_SEARCHLIMIT_DESC', $this->pagination->getLimitBox());
|
||||
echo $r->selectFilterDirection('JFIELD_ORDERING_DESC', 'JGLOBAL_ORDER_ASCENDING', 'JGLOBAL_ORDER_DESCENDING', $listDirn);
|
||||
echo $r->selectFilterSortBy('JGLOBAL_SORT_BY', $sortFields, $listOrder);
|
||||
|
||||
echo $r->startFilterBar(2);
|
||||
echo $r->selectFilterType($this->t['l'].'_SELECT_TYPE', $this->state->get('filter.type'), array(1 => Text::_($this->t['l'].'_DOWNLOADS'), 2 =>Text::_($this->t['l'].'_UPLOADS')));
|
||||
echo $r->endFilterBar();
|
||||
|
||||
|
||||
echo $r->endFilterBar();*/
|
||||
echo LayoutHelper::render('joomla.searchtools.default', array('view' => $this));
|
||||
|
||||
echo $r->startTable('categoryList');
|
||||
|
||||
echo $r->startTblHeader();
|
||||
|
||||
echo $r->firstColumnHeader($listDirn, $listOrder);
|
||||
echo $r->secondColumnHeader($listDirn, $listOrder);
|
||||
|
||||
//echo '<th></th>';//$r->thOrderingXML('JGRID_HEADING_ORDERING', 0,0);
|
||||
//echo $r->thCheck('JGLOBAL_CHECK_ALL');
|
||||
echo '<th class="ph-date">'.HTMLHelper::_('searchtools.sort', $this->t['l'].'_DATE', 'a.date', $listDirn, $listOrder ).'</th>'."\n";
|
||||
echo '<th class="ph-uploaduser">'.HTMLHelper::_('searchtools.sort', $this->t['l'].'_USER', 'username', $listDirn, $listOrder ).'</th>'."\n";
|
||||
echo '<th class="ph-ip">'.HTMLHelper::_('searchtools.sort', $this->t['l'].'_IP', 'a.ip', $listDirn, $listOrder ).'</th>'."\n";
|
||||
echo '<th class="ph-file-short">'.HTMLHelper::_('searchtools.sort', $this->t['l'].'_FILE', 'filename', $listDirn, $listOrder ).'</th>'."\n";
|
||||
echo '<th class="ph-catid">'.HTMLHelper::_('searchtools.sort', $this->t['l'].'_CATEGORY', 'category_id', $listDirn, $listOrder ).'</th>'."\n";
|
||||
echo '<th class="ph-page">'.HTMLHelper::_('searchtools.sort', $this->t['l'].'_PAGE', 'a.page', $listDirn, $listOrder ).'</th>'."\n";
|
||||
echo '<th class="ph-type">'.HTMLHelper::_('searchtools.sort', $this->t['l'].'_TYPE', 'a.type', $listDirn, $listOrder ).'</th>'."\n";
|
||||
echo '<th class="ph-id">'.HTMLHelper::_('searchtools.sort', $this->t['l'].'_ID', 'a.id', $listDirn, $listOrder ).'</th>'."\n";
|
||||
|
||||
echo $r->endTblHeader();
|
||||
|
||||
echo $r->startTblBody($saveOrder, $saveOrderingUrl, $listDirn);
|
||||
|
||||
$originalOrders = array();
|
||||
$parentsStr = "";
|
||||
$j = 0;
|
||||
|
||||
if (is_array($this->items)) {
|
||||
foreach ($this->items as $i => $item) {
|
||||
//if ($i >= (int)$this->pagination->limitstart && $j < (int)$this->pagination->limit) {
|
||||
$j++;
|
||||
/*
|
||||
$urlEdit = 'index.php?option='.$this->t['o'].'&task='.$this->t['task'].'.edit&id=';
|
||||
$urlTask = 'index.php?option='.$this->t['o'].'&task='.$this->t['task'];
|
||||
$orderkey = array_search($item->id, $this->ordering[$item->catid]);
|
||||
$ordering = ($listOrder == 'a.ordering');
|
||||
$canCreate = $user->authorise('core.create', $this->t['o']);
|
||||
$canEdit = $user->authorise('core.edit', $this->t['o']);
|
||||
$canCheckin = $user->authorise('core.manage', 'com_checkin') || $item->checked_out==$user->get('id') || $item->checked_out==0;
|
||||
$canChange = $user->authorise('core.edit.state', $this->t['o']) && $canCheckin;
|
||||
$linkEdit = Route::_( $urlEdit. $item->id );
|
||||
|
||||
$linkCat = Route::_( 'index.php?option='.$this->t['o'].'&task='.$this->t['c'].'cat.edit&id='.(int) $item->category_id );
|
||||
$canEditCat = $user->authorise('core.edit', $this->t['o']);*/
|
||||
$canChange = 0;
|
||||
$orderkey = 0;
|
||||
$item->ordering = 0;
|
||||
|
||||
echo $r->startTr($i, isset($item->catid) ? (int)$item->catid : 0);
|
||||
echo $r->firstColumn($i, $item->id, $canChange, $saveOrder, $orderkey, $item->ordering);
|
||||
echo $r->secondColumn($i, $item->id, $canChange, $saveOrder, $orderkey, $item->ordering);
|
||||
|
||||
|
||||
echo $r->td($this->escape($item->date));
|
||||
|
||||
$usrO = $item->usernameno;
|
||||
if ($item->username) {$usrO = $usrO . ' ('.$item->username.')';}
|
||||
if (!$usrO) {
|
||||
$usrO = Text::_('COM_PHOCADOWNLOAD_GUEST');
|
||||
}
|
||||
echo $r->td($usrO, "small hidden-phone");
|
||||
|
||||
echo $r->td($this->escape($item->ip));
|
||||
|
||||
//echo $r->td($this->escape($item->filetitle));
|
||||
echo $r->td($this->escape($item->file_title) . ' ('.$this->escape($item->filename) . ')');
|
||||
|
||||
echo $r->td($this->escape($item->category_id));
|
||||
echo $r->td('<span class="editlinktip hasTip" title="'. Text::_( $this->t['l'].'_PAGE' ).'::'. $this->escape($item->page).'">'
|
||||
.'<a href="'.$this->escape($item->page).'" target="_blank" >'. Text::_( $this->t['l'].'_PAGE' ).'</a></span>');
|
||||
|
||||
if ($item->type == 2) {
|
||||
echo $r->td('<span class="label label-warning badge bg-warning">'.Text::_($this->t['l'].'_UPLOAD').'</span>', "small hidden-phone");
|
||||
} else {
|
||||
echo $r->td('<span class="label label-success badge bg-success">'.Text::_($this->t['l'].'_DOWNLOAD').'</span>', "small hidden-phone");
|
||||
}
|
||||
|
||||
echo $r->td($item->id, "small hidden-phone");
|
||||
|
||||
echo $r->endTr();
|
||||
|
||||
//}
|
||||
}
|
||||
}
|
||||
echo $r->endTblBody();
|
||||
|
||||
echo $r->tblFoot($this->pagination->getListFooter(), 15);
|
||||
echo $r->endTable();
|
||||
|
||||
//echo $r->formInputsXML($listOrder, $originalOrders);
|
||||
echo $r->formInputsXML($listOrder, $listDirn, $originalOrders);
|
||||
echo $r->endMainContainer();
|
||||
echo $r->endForm();
|
||||
?>
|
||||
@ -0,0 +1 @@
|
||||
<html><body bgcolor="#FFFFFF"></body></html>
|
||||
@ -0,0 +1,93 @@
|
||||
<?php
|
||||
/* @package Joomla
|
||||
* @copyright Copyright (C) Open Source Matters. All rights reserved.
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see LICENSE.php
|
||||
* @extension Phoca Extension
|
||||
* @copyright Copyright (C) Jan Pavelka www.phoca.cz
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
|
||||
*/
|
||||
defined('_JEXEC') or die();
|
||||
use Joomla\CMS\MVC\View\HtmlView;
|
||||
use Joomla\CMS\Component\ComponentHelper;
|
||||
use Joomla\CMS\Toolbar\ToolbarHelper;
|
||||
use Joomla\CMS\Language\Text;
|
||||
use Joomla\CMS\Toolbar\Toolbar;
|
||||
jimport( 'joomla.application.component.view' );
|
||||
|
||||
class PhocaDownloadCpViewPhocaDownloadLogs extends HtmlView
|
||||
{
|
||||
protected $items;
|
||||
protected $pagination;
|
||||
protected $state;
|
||||
//protected $maxandsum;
|
||||
protected $t;
|
||||
protected $r;
|
||||
public $filterForm;
|
||||
public $activeFilters;
|
||||
|
||||
function display($tpl = null) {
|
||||
|
||||
$this->t = PhocaDownloadUtils::setVars('log');
|
||||
$this->r = new PhocaDownloadRenderAdminViews();
|
||||
$this->items = $this->get('Items');
|
||||
$this->pagination = $this->get('Pagination');
|
||||
$this->state = $this->get('State');
|
||||
$this->filterForm = $this->get('FilterForm');
|
||||
$this->activeFilters = $this->get('ActiveFilters');
|
||||
$this->t['p'] = ComponentHelper::getParams('com_phocadownload');
|
||||
|
||||
|
||||
|
||||
// Check for errors.
|
||||
if (count($errors = $this->get('Errors'))) {
|
||||
throw new Exception(implode("\n", $errors), 500);
|
||||
return false;
|
||||
}
|
||||
|
||||
$this->addToolbar();
|
||||
parent::display($tpl);
|
||||
|
||||
}
|
||||
|
||||
function addToolbar() {
|
||||
|
||||
require_once JPATH_COMPONENT.'/helpers/'.$this->t['tasks'].'.php';
|
||||
//$state = $this->get('State');
|
||||
$class = ucfirst($this->t['tasks']).'Helper';
|
||||
$canDo = $class::getActions($this->t);
|
||||
|
||||
ToolbarHelper::title( Text::_( $this->t['l'].'_LOGGING' ), 'file-2' );
|
||||
|
||||
if ($canDo->get('core.edit')){
|
||||
|
||||
$bar = Toolbar::getInstance('toolbar');
|
||||
|
||||
$dhtml = '<button class="btn btn-small btn-danger" onclick="javascript:if(confirm(\''.addslashes(Text::_('COM_PHOCADOWNLOAD_WARNING_RESET_LOG')).'\')){Joomla.submitbutton(\'phocadownloadlogs.reset\');}" ><i class="icon-approve" title="'.Text::_('COM_PHOCADOWNLOAD_RESET_LOG').'"></i> '.Text::_('COM_PHOCADOWNLOAD_RESET_LOG').'</button>';
|
||||
$bar->appendButton('Custom', $dhtml);
|
||||
ToolbarHelper::divider();
|
||||
//JToolbarHelper::custom('phocadownloaduserstat.reset', 'reset.png', '', 'COM_PHOCADOWNLOAD_RESET' , false);
|
||||
}
|
||||
|
||||
//JToolbarHelper::cancel($this->t['tasks'].'.cancel', 'JTOOLBAR_CLOSE');
|
||||
|
||||
ToolbarHelper::help( 'screen.'.$this->t['c'], true );
|
||||
}
|
||||
|
||||
protected function getSortFields() {
|
||||
return array(
|
||||
'a.date' => Text::_($this->t['l'] . '_DATE'),
|
||||
//'usernameno' => JText::_($this->t['l'] . '_USER'),
|
||||
'username' => Text::_($this->t['l'] . '_USERNAME'),
|
||||
//'d.title' => JText::_($this->t['l'] . '_TITLE'),
|
||||
'filename' => Text::_($this->t['l'] . '_FILENAME'),
|
||||
'category_id' => Text::_($this->t['l'] . '_CATEGORY'),
|
||||
'a.ip' => Text::_($this->t['l'] . '_IP'),
|
||||
'a.page' => Text::_($this->t['l'] . '_PAGE'),
|
||||
'a.type' => Text::_($this->t['l'] . '_TYPE'),
|
||||
'a.id' => Text::_($this->t['l'] . '_ID')
|
||||
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
?>
|
||||
@ -0,0 +1 @@
|
||||
<html><body bgcolor="#FFFFFF"></body></html>
|
||||
@ -0,0 +1,237 @@
|
||||
<?php
|
||||
/* @package Joomla
|
||||
* @copyright Copyright (C) Open Source Matters. All rights reserved.
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see LICENSE.php
|
||||
* @extension Phoca Extension
|
||||
* @copyright Copyright (C) Jan Pavelka www.phoca.cz
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
|
||||
*/
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
use Joomla\CMS\HTML\HTMLHelper;
|
||||
use Joomla\CMS\Factory;
|
||||
use Joomla\CMS\Language\Text;
|
||||
use Joomla\CMS\Filesystem\Path;
|
||||
/*
|
||||
JHtml::_('bootstrap.tooltip');
|
||||
JHtml::_('behavior.multiselect');
|
||||
JHtml::_('dropdown.init');
|
||||
JHtml::_('formbehavior.chosen', 'select');*/
|
||||
|
||||
$r = new PhocaDownloadRenderAdminView();
|
||||
|
||||
//if ($this->manager == 'filemultiple') {
|
||||
|
||||
Factory::getDocument()->addScriptDeclaration('
|
||||
|
||||
Joomla.submitbutton = function(task)
|
||||
{
|
||||
if (task == \'phocadownloadm.cancel\') {
|
||||
Joomla.submitform(task);
|
||||
}
|
||||
|
||||
if (task == \'phocadownloadm.save\') {
|
||||
var phocadownloadmform = document.getElementById(\'adminForm\');
|
||||
if (phocadownloadmform.boxchecked.value==0) {
|
||||
alert( "'. Text::_( 'COM_PHOCADOWNLOAD_WARNING_SELECT_FILENAME_OR_FOLDER', true ).'" );
|
||||
} else {
|
||||
var f = phocadownloadmform;
|
||||
var nSelectedImages = 0;
|
||||
var nSelectedFolders = 0;
|
||||
var i=0;
|
||||
cb = eval( \'f.cb\' + i );
|
||||
while (cb) {
|
||||
if (cb.checked == false) {
|
||||
// Do nothing
|
||||
}
|
||||
else if (cb.name == "cid[]") {
|
||||
nSelectedImages++;
|
||||
}
|
||||
else {
|
||||
nSelectedFolders++;
|
||||
}
|
||||
// Get next
|
||||
i++;
|
||||
cb = eval( \'f.cb\' + i );
|
||||
}
|
||||
|
||||
if (phocadownloadmform.jform_catid.value == "" && nSelectedImages > 0){
|
||||
alert( "'. Text::_( 'COM_PHOCADOWNLOAD_WARNING_FILE_SELECTED_SELECT_CATEGORY', true ).'" );
|
||||
} else {
|
||||
Joomla.submitform(task);
|
||||
}
|
||||
}
|
||||
}
|
||||
//Joomla.submitform(task);
|
||||
}');
|
||||
|
||||
//}
|
||||
|
||||
echo '<div id="phocadownloadmanager">';
|
||||
|
||||
if ($this->manager == 'filemultiple') {
|
||||
echo $r->startForm($this->t['o'], $this->t['task'], 'adminForm', 'adminForm');
|
||||
echo '<div class="col-sm-4 form-horizontal" style="border-right: 1px solid #d3d3d3;padding-right: 5px;">';
|
||||
echo '<h4>'. Text::_('COM_PHOCADOWNLOAD_MULTIPLE_ADD').'</h4>';
|
||||
|
||||
echo '<div>'."\n";
|
||||
$formArray = array ('title', 'alias','published', 'approved', 'ordering', 'catid', 'language', 'pap_copy_m');
|
||||
echo $r->group($this->form, $formArray);
|
||||
echo '</div>'. "\n";
|
||||
|
||||
echo '</div>'. "\n";
|
||||
} else {
|
||||
echo $r->startForm($this->t['o'], $this->t['task'], 'adminForm', 'adminForm');
|
||||
}
|
||||
|
||||
if ($this->manager == 'filemultiple') {
|
||||
echo '<div class="col-sm-8 form-horizontal">';
|
||||
} else {
|
||||
echo '<div class="span12 form-horizontal">';
|
||||
}
|
||||
|
||||
echo '<div class="pd-admin-path">' . Text::_('COM_PHOCADOWNLOAD_PATH'). ': '.Path::clean($this->t['path']['orig_abs_ds']. $this->folderstate->folder) .'</div>';
|
||||
|
||||
//$countFaF = count($this->images) + count($this->folders);
|
||||
echo '<table class="table table-hover table-condensed ph-multiple-table">'
|
||||
.'<thead>'
|
||||
.'<tr>';
|
||||
echo '<th class="hidden-phone ph-check">'. "\n";
|
||||
if ($this->manager == 'filemultiple') {
|
||||
echo '<input type="checkbox" name="checkall-toggle" value="" title="'.Text::_('JGLOBAL_CHECK_ALL').'" onclick="Joomla.checkAll(this)" />'. "\n";
|
||||
} else {
|
||||
echo '<div style="display:none"><input type="checkbox" name="checkall-toggle" value="" title="'.Text::_('JGLOBAL_CHECK_ALL').'" onclick="Joomla.checkAll(this)" /></div>'. "\n";
|
||||
echo '';
|
||||
}
|
||||
echo '</th>'. "\n";
|
||||
|
||||
echo '<th width="20"> </th>'
|
||||
.'<th width="95%">'.Text::_( $this->t['l'].'_FILENAME' ).'</th>'
|
||||
.'</tr>'
|
||||
.'</thead>';
|
||||
|
||||
|
||||
|
||||
|
||||
/*
|
||||
echo '<div class="pd-admin-files">';
|
||||
|
||||
if ($this->manager == 'filemultiple' && (count($this->files) > 0 || count($this->folders) > 0)) {
|
||||
echo '<div class="pd-admin-file-checkbox">';
|
||||
$fileFolders = count($this->files) + count($this->folders);
|
||||
echo '<input type="checkbox" name="toggle" value="" onclick="checkAll('.$fileFolders.');" />';
|
||||
echo ' '. Text::_('COM_PHOCADOWNLOAD_CHECK_ALL');
|
||||
echo '</div>';
|
||||
}*/
|
||||
echo '<tbody>';
|
||||
echo $this->loadTemplate('up');
|
||||
if (count($this->files) > 0 || count($this->folders) > 0) { ?>
|
||||
<div>
|
||||
|
||||
<?php for ($i=0,$n=count($this->folders); $i<$n; $i++) :
|
||||
$this->setFolder($i);
|
||||
$this->folderi = $i;
|
||||
echo $this->loadTemplate('folder');
|
||||
endfor; ?>
|
||||
|
||||
<?php for ($i=0,$n=count($this->files); $i<$n; $i++) :
|
||||
$this->setFile($i);
|
||||
$this->filei = $i;
|
||||
echo $this->loadTemplate('file');
|
||||
endfor; ?>
|
||||
|
||||
</div>
|
||||
<?php } else {
|
||||
echo '<tr>'
|
||||
.'<td> </td>'
|
||||
.'<td> </td>'
|
||||
.'<td>'.Text::_( $this->t['l'].'_THERE_IS_NO_FILE' ).'</td>'
|
||||
.'</tr>';
|
||||
}
|
||||
echo '</tbody>'
|
||||
.'</table>';
|
||||
|
||||
|
||||
// we have now delete function
|
||||
|
||||
//if ($this->manager == 'filemultiple') {
|
||||
|
||||
echo '<input type="hidden" name="task" value="" />'. "\n";
|
||||
echo '<input type="hidden" name="boxchecked" value="0" />'. "\n";
|
||||
echo '<input type="hidden" name="layout" value="edit" />'. "\n";
|
||||
echo '<input type="hidden" name="return-url" value="'. $this->returnUrl.'" />';
|
||||
echo '<input type="hidden" name="manager" value="'. $this->manager.'" />';
|
||||
echo HTMLHelper::_('form.token');
|
||||
echo $r->endForm();
|
||||
|
||||
echo '</div>';
|
||||
echo '<div class="clearfix"></div>';
|
||||
|
||||
//}
|
||||
?>
|
||||
|
||||
<div style="border-bottom:1px solid #cccccc;margin-bottom: 10px"> </div>
|
||||
|
||||
<?php
|
||||
if ($this->t['displaytabs'] > 0) {
|
||||
|
||||
/*echo '<ul class="nav nav-tabs" id="configTabs">';
|
||||
|
||||
$label = HTMLHelper::_( 'image', $this->t['i'].'icon-16-upload.png','') . ' '.Text::_($this->t['l'].'_UPLOAD');
|
||||
echo '<li><a href="#upload" data-toggle="tab">'.$label.'</a></li>';
|
||||
|
||||
if((int)$this->t['enablemultiple'] > 0) {
|
||||
$label = HTMLHelper::_( 'image', $this->t['i'].'icon-16-upload-multiple.png','') . ' '.Text::_($this->t['l'].'_MULTIPLE_UPLOAD');
|
||||
echo '<li><a href="#multipleupload" data-toggle="tab">'.$label.'</a></li>';
|
||||
}
|
||||
|
||||
$label = HTMLHelper::_( 'image', $this->t['i'].'icon-16-folder.png','') . ' '.Text::_($this->t['l'].'_CREATE_FOLDER');
|
||||
echo '<li><a href="#createfolder" data-toggle="tab">'.$label.'</a></li>';
|
||||
|
||||
echo '</ul>';*/
|
||||
|
||||
$activeTab = '';
|
||||
if (isset($this->t['tab']) && $this->t['tab'] != '') {
|
||||
$activeTab = $this->t['tab'];
|
||||
} else {
|
||||
$activeTab = 'multipleupload';
|
||||
}
|
||||
|
||||
echo $r->startTabs($activeTab);
|
||||
|
||||
$tabs = array();
|
||||
$tabs['multipleupload'] = '<span class="ph-cp-item"><i class="phi phi-fs-s phi-fc-bl duotone icon-upload"></i></span>' . ' '.Text::_('COM_PHOCADOWNLOAD_MULTIPLE_UPLOAD');
|
||||
$tabs['upload'] = '<span class="ph-cp-item"><i class="phi phi-fs-s phi-fc-bd duotone icon-upload"></i></span>' . ' '.Text::_('COM_PHOCADOWNLOAD_UPLOAD');
|
||||
|
||||
if (!empty($this->t['javaupload'])) {
|
||||
$tabs['javaupload'] = '<span class="ph-cp-item"><i class="phi phi-fs-s phi-fc-rl duotone icon-upload"></i></span>' . ' '.Text::_('COM_PHOCADOWNLOAD_JAVA_UPLOAD');
|
||||
}
|
||||
|
||||
$tabs['createfolder'] = '<span class="ph-cp-item"><i class="phi phi-fs-s phi-fc-brd duotone icon-folder"></i></span>' . ' '.Text::_('COM_PHOCADOWNLOAD_CREATE_FOLDER');
|
||||
|
||||
echo $r->navigation($tabs, $activeTab);
|
||||
|
||||
echo $r->startTab('multipleupload', $tabs['multipleupload'], $activeTab == 'multipleupload' ? 'active' : '');
|
||||
echo $this->loadTemplate('multipleupload');
|
||||
echo $r->endTab();
|
||||
|
||||
echo $r->startTab('upload', $tabs['upload'], $activeTab == 'upload' ? 'active' : '');
|
||||
echo $this->loadTemplate('upload');
|
||||
echo $r->endTab();
|
||||
|
||||
echo $r->startTab('createfolder', $tabs['createfolder'], $activeTab == 'createfolder' ? 'active' : '');
|
||||
|
||||
|
||||
echo PhocaDownloadFileUpload::renderCreateFolder($this->session->getName(), $this->session->getId(), $this->currentFolder, 'phocadownloadmanager', 'manager='.PhocaDownloadUtils::filterValue($this->manager, 'alphanumeric').'&tab=createfolder&field='. PhocaDownloadUtils::filterValue($this->field, 'alphanumeric2') );
|
||||
echo $r->endTab();
|
||||
|
||||
echo $r->endTabs();
|
||||
}
|
||||
echo '</div>';
|
||||
|
||||
/*
|
||||
if ($this->t['tab'] != '') {$jsCt = 'a[href=#'.PhocaDownloadUtils::filterValue($this->t['tab'], 'alphanumeric') .']';} else {$jsCt = 'a:first';}
|
||||
echo '<script type="text/javascript">';
|
||||
echo ' jQuery(\'#configTabs '.$jsCt.'\').tab(\'show\');'; // Select first tab
|
||||
echo '</script>';
|
||||
*/
|
||||
?>
|
||||
@ -0,0 +1,92 @@
|
||||
<?php
|
||||
/* @package Joomla
|
||||
* @copyright Copyright (C) Open Source Matters. All rights reserved.
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see LICENSE.php
|
||||
* @extension Phoca Extension
|
||||
* @copyright Copyright (C) Jan Pavelka www.phoca.cz
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
|
||||
*/
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
use Joomla\CMS\HTML\HTMLHelper;
|
||||
use Joomla\CMS\Language\Text;
|
||||
|
||||
jimport( 'joomla.filesystem.file' );
|
||||
|
||||
$ext = PhocaDownloadFile::getExtension( $this->_tmp_file->path_without_name_relative );
|
||||
$group = PhocaDownloadSettings::getManagerGroup($this->manager);
|
||||
|
||||
|
||||
|
||||
$checked = HTMLHelper::_('grid.id', $this->filei + count($this->folders), $this->files[$this->filei]->path_with_name_relative_no );
|
||||
$deleteCode = '<a class="ph-action-inline-icon-box ph-inline-task" href="javascript:void(0);" onclick="javascript:if (confirm(\''.Text::_('COM_PHOCADOWNLOAD_DELETE_FILE_SERVER_WARNING').'\')){ return Joomla.listItemTask(\'cb'.$this->filei + count($this->folders).'\',\'phocadownloadmanager.delete\');}" title="'.Text::_('COM_PHOCADOWNLOAD_DELETE').'"><span class="ph-cp-item ph-icon-task ph-icon-leftm"><i class="duotone icon-purge"></i></span></a>';
|
||||
|
||||
if ($this->manager == 'filemultiple') {
|
||||
|
||||
|
||||
$icon = PhocaDownloadFile::getMimeTypeIcon($this->_tmp_file->name);
|
||||
|
||||
//$fileNameEncode = urlencode($this->_tmp_file->path_with_name_relative_no);
|
||||
//$deleteCode = '<input class="form-check-input" autocomplete="off" type="checkbox" id="cid'.$fileNameEncode.'" name="cid['.$fileNameEncode.']" value="'.$fileNameEncode.'" onclick="Joomla.isChecked(this.checked);">';
|
||||
|
||||
|
||||
echo '<tr>'
|
||||
.' <td>'. $checked .'</td>'
|
||||
.' <td class="ph-img-table">'
|
||||
. $icon .'</td>'
|
||||
.' <td>'
|
||||
.'<div class="ph-files-row">'
|
||||
.'<div>' . $this->_tmp_file->name . '</div>'
|
||||
.'<div class="ph-files-row-item">' . $deleteCode . '</div>'
|
||||
.'</div>'
|
||||
. '</td>'
|
||||
.'</tr>';
|
||||
|
||||
|
||||
} else {
|
||||
|
||||
|
||||
|
||||
if (($group['i'] == 1) && ($ext == 'png' || $ext == 'jpg' || $ext == 'gif' || $ext == 'jpeg') ) {
|
||||
|
||||
echo '<tr>'
|
||||
.'<td><div style="display:none">'.$checked.'</div></td>'
|
||||
.'<td>'
|
||||
.'<a href="#" onclick="if (window.parent) window.parent.'. $this->fce.'(\'' .$this->_tmp_file->path_with_name_relative_no.'\')">'
|
||||
. HTMLHelper::_( 'image', str_replace( '../', '', $this->_tmp_file->path_without_name_relative), Text::_('COM_PHOCADOWNLOAD_INSERT'), array('title' => Text::_('COM_PHOCADOWNLOAD_INSERT_ICON'), 'class' => 'pd-file-image'))
|
||||
.'</a>'
|
||||
.'</td><td>'
|
||||
.'<div class="ph-files-row">'
|
||||
.'<div>'
|
||||
.'<a href="#" onclick="if (window.parent) window.parent.'. $this->fce.'(\'' . $this->_tmp_file->path_with_name_relative_no.'\')">'
|
||||
. $this->_tmp_file->name
|
||||
.'</a>'
|
||||
.'</div>'
|
||||
.'<div class="ph-files-row-item">' . $deleteCode . '</div>'
|
||||
.'</div>'
|
||||
|
||||
.'</td>'
|
||||
.'</tr>';
|
||||
|
||||
} else {
|
||||
|
||||
echo '<tr>'
|
||||
.'<td><div style="display:none">'.$checked.'</div></td>'
|
||||
.'<td>'
|
||||
.'<a href="#" onclick="if (window.parent) window.parent.'. $this->fce.'(\'' .$this->_tmp_file->path_with_name_relative_no.'\')">'
|
||||
. HTMLHelper::_( 'image', $this->t['i'].'icon-file.png', '', Text::_('COM_PHOCADOWNLOAD_INSERT_FILENAME'))
|
||||
.'</a>'
|
||||
.'</td><td>'
|
||||
.'<div class="ph-files-row">'
|
||||
.'<div>'
|
||||
.'<a href="#" onclick="if (window.parent) window.parent.'. $this->fce.'(\'' .$this->_tmp_file->path_with_name_relative_no.'\')">'
|
||||
. $this->_tmp_file->name
|
||||
.'</a>'
|
||||
.'</div>'
|
||||
.'<div class="ph-files-row-item">' . $deleteCode . '</div>'
|
||||
.'</div>'
|
||||
|
||||
.'</td>'
|
||||
.'</tr>';
|
||||
}
|
||||
}
|
||||
?>
|
||||
@ -0,0 +1,46 @@
|
||||
<?php
|
||||
/* @package Joomla
|
||||
* @copyright Copyright (C) Open Source Matters. All rights reserved.
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see LICENSE.php
|
||||
* @extension Phoca Extension
|
||||
* @copyright Copyright (C) Jan Pavelka www.phoca.cz
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
|
||||
*/
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
use Joomla\CMS\HTML\HTMLHelper;
|
||||
use Joomla\CMS\Router\Route;
|
||||
use Joomla\CMS\Language\Text;
|
||||
$group = PhocaDownloadSettings::getManagerGroup($this->manager);
|
||||
|
||||
if ($this->manager == 'filemultiple') {
|
||||
|
||||
$checked = HTMLHelper::_('grid.id', $this->folderi, $this->folders[$this->folderi]->path_with_name_relative_no, 0, 'foldercid' );
|
||||
$link = 'index.php?option=com_phocadownload&view=phocadownloadmanager'
|
||||
.'&manager='.htmlspecialchars($this->manager)
|
||||
.$group['c']
|
||||
.'&folder='.htmlspecialchars($this->_tmp_folder->path_with_name_relative_no)
|
||||
.'&field='. htmlspecialchars((string)$this->field);
|
||||
|
||||
echo '<tr>'
|
||||
.' <td>'. $checked .'</td>'
|
||||
.' <td class="ph-img-table"><a href="'. Route::_( $link ).'">'
|
||||
. HTMLHelper::_( 'image', $this->t['i'].'icon-16-folder-small.png', '').'</a></td>'
|
||||
.' <td><a href="'. Route::_( $link ).'">'. $this->_tmp_folder->name.'</a></td>'
|
||||
.'</tr>';
|
||||
|
||||
} else {
|
||||
|
||||
$link = 'index.php?option=com_phocadownload&view=phocadownloadmanager'
|
||||
.'&manager='. $this->manager
|
||||
. $group['c']
|
||||
.'&folder='.$this->_tmp_folder->path_with_name_relative_no
|
||||
.'&field='. $this->field;
|
||||
|
||||
echo '<tr>'
|
||||
.' <td></td>'
|
||||
.' <td class="ph-img-table"><a href="'. Route::_( $link ).'">'
|
||||
. HTMLHelper::_( 'image', $this->t['i'].'icon-16-folder-small.png', Text::_('COM_PHOCADOWNLOAD_OPEN')).'</a></td>'
|
||||
.' <td><a href="'. Route::_( $link ).'">'. $this->_tmp_folder->name.'</a></td>'
|
||||
.'</tr>';
|
||||
}
|
||||
?>
|
||||
@ -0,0 +1,22 @@
|
||||
<?php
|
||||
/* @package Joomla
|
||||
* @copyright Copyright (C) Open Source Matters. All rights reserved.
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see LICENSE.php
|
||||
* @extension Phoca Extension
|
||||
* @copyright Copyright (C) Jan Pavelka www.phoca.cz
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
|
||||
*/
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
use Joomla\CMS\Uri\Uri;
|
||||
use Joomla\CMS\Language\Text;
|
||||
echo '<div id="'.$this->t['c'].'-multipleupload" class="ph-in">';
|
||||
echo $this->t['mu_response_msg'] ;
|
||||
echo '<form action="'. Uri::base().'index.php?option='.$this->t['o'].'" >';
|
||||
if ($this->t['ftp']) {echo PhocaDownloadFileUpload::renderFTPaccess();}
|
||||
echo '<div class="control-label ph-head-form-small">' . Text::_( $this->t['l'].'_UPLOAD_FILE' ).' ['. Text::_( $this->t['l'].'_MAX_SIZE' ).': '.$this->t['uploadmaxsizeread']
|
||||
.']</div>';
|
||||
echo '<small>'.Text::_($this->t['l'].'_SELECT_FILES').'. '.Text::_($this->t['l'].'_ADD_FILES_TO_UPLOAD_QUEUE_AND_CLICK_START_BUTTON').'</small>';
|
||||
echo $this->t['mu_output'];
|
||||
echo '</form>';
|
||||
echo '</div>';
|
||||
?>
|
||||
@ -0,0 +1,21 @@
|
||||
<?php
|
||||
/* @package Joomla
|
||||
* @copyright Copyright (C) Open Source Matters. All rights reserved.
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see LICENSE.php
|
||||
* @extension Phoca Extension
|
||||
* @copyright Copyright (C) Jan Pavelka www.phoca.cz
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
|
||||
*/
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
use Joomla\CMS\HTML\HTMLHelper;
|
||||
|
||||
$group = PhocaDownloadSettings::getManagerGroup($this->manager);
|
||||
|
||||
$link = 'index.php?option='.$this->t['o'].'&view='. PhocaDownloadUtils::filterValue($this->t['task'], 'alphanumeric').'&manager='.PhocaDownloadUtils::filterValue($this->manager, 'alphanumeric'). $group['c'] .'&folder='.PhocaDownloadUtils::filterValue($this->folderstate->parent, 'folderpath') .'&field='. PhocaDownloadUtils::filterValue($this->field, 'alphanumeric2');
|
||||
echo '<tr><td> </td>'
|
||||
.'<td class="ph-img-table">'
|
||||
.'<a href="'.$link.'" >'
|
||||
. HTMLHelper::_( 'image', $this->t['i'].'icon-16-up.png', '').'</a>'
|
||||
.'</td>'
|
||||
.'<td><a href="'.$link.'" >..</a></td>'
|
||||
.'</tr>';
|
||||
@ -0,0 +1,20 @@
|
||||
<?php
|
||||
/* @package Joomla
|
||||
* @copyright Copyright (C) Open Source Matters. All rights reserved.
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see LICENSE.php
|
||||
* @extension Phoca Extension
|
||||
* @copyright Copyright (C) Jan Pavelka www.phoca.cz
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
|
||||
*/
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
use Joomla\CMS\Language\Text;
|
||||
echo '<div id="'.$this->t['c'].'-upload" class="ph-in">';
|
||||
echo '<div id="upload-noflash" class="actions">';
|
||||
echo '<form action="'. $this->t['su_url'] .'" id="uploadFormU" method="post" enctype="multipart/form-data">';
|
||||
if ($this->t['ftp']) { echo PhocaDownloadFileUpload::renderFTPaccess();}
|
||||
echo '<div class="control-label ph-head-form">'. Text::_( $this->t['l'].'_UPLOAD_FILE' ).' ['. Text::_( $this->t['l'].'_MAX_SIZE' ).': '.$this->t['uploadmaxsizeread'].'] </div>';
|
||||
echo $this->t['su_output'];
|
||||
echo '</form>';
|
||||
echo '</div>';
|
||||
echo '</div>';
|
||||
?>
|
||||
@ -0,0 +1 @@
|
||||
<html><body bgcolor="#FFFFFF"></body></html>
|
||||
@ -0,0 +1,196 @@
|
||||
<?php
|
||||
/* @package Joomla
|
||||
* @copyright Copyright (C) Open Source Matters. All rights reserved.
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see LICENSE.php
|
||||
* @extension Phoca Extension
|
||||
* @copyright Copyright (C) Jan Pavelka www.phoca.cz
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
|
||||
*/
|
||||
defined( '_JEXEC' ) or die();
|
||||
use Joomla\CMS\MVC\View\HtmlView;
|
||||
use Joomla\CMS\Factory;
|
||||
use Joomla\CMS\Component\ComponentHelper;
|
||||
use Joomla\CMS\Uri\Uri;
|
||||
use Joomla\CMS\Session\Session;
|
||||
use Joomla\CMS\Language\Text;
|
||||
use Joomla\CMS\Client\ClientHelper;
|
||||
use Joomla\CMS\HTML\HTMLHelper;
|
||||
use Joomla\CMS\Object\CMSObject;
|
||||
use Joomla\CMS\Toolbar\ToolbarHelper;
|
||||
jimport( 'joomla.client.helper' );
|
||||
jimport( 'joomla.application.component.view' );
|
||||
jimport( 'joomla.html.pane' );
|
||||
|
||||
class PhocaDownloadCpViewPhocaDownloadManager extends HtmlView
|
||||
{
|
||||
protected $field;
|
||||
protected $fce;
|
||||
protected $folderstate;
|
||||
protected $images;
|
||||
protected $folders;
|
||||
protected $tmpl;
|
||||
protected $session;
|
||||
protected $currentFolder;
|
||||
protected $t;
|
||||
protected $r;
|
||||
protected $returnUrl;
|
||||
|
||||
public function display($tpl = null) {
|
||||
|
||||
$this->t = PhocaDownloadUtils::setVars('manager');
|
||||
$this->r = new PhocaDownloadRenderAdminView();
|
||||
$this->field = Factory::getApplication()->input->get('field');
|
||||
$this->fce = 'phocaSelectFileName_'.$this->field;
|
||||
$this->returnUrl = base64_encode(Uri::getInstance()->toString());
|
||||
$this->folderstate = $this->get('FolderState');
|
||||
$this->files = $this->get('Files');
|
||||
$this->folders = $this->get('Folders');
|
||||
$this->session = Factory::getSession();
|
||||
$this->manager = Factory::getApplication()->input->get( 'manager', '', 'file' );
|
||||
|
||||
|
||||
if ($this->manager == 'filemultiple') {
|
||||
$this->form = $this->get('Form');
|
||||
}
|
||||
|
||||
$params = ComponentHelper::getParams($this->t['o']);
|
||||
|
||||
$this->t['multipleuploadchunk'] = $params->get( 'multiple_upload_chunk', 0 );
|
||||
$this->t['uploadmaxsize'] = $params->get( 'upload_maxsize', 3145728 );
|
||||
$this->t['uploadmaxsizeread'] = PhocaDownloadFile::getFileSizeReadable($this->t['uploadmaxsize']);
|
||||
$this->t['enablemultiple'] = $params->get( 'enable_multiple_upload_admin', 1 );
|
||||
$this->t['multipleuploadmethod'] = $params->get( 'multiple_upload_method', 4 );
|
||||
|
||||
$this->currentFolder = '';
|
||||
if (isset($this->folderstate->folder) && $this->folderstate->folder != '') {
|
||||
$this->currentFolder = $this->folderstate->folder;
|
||||
}
|
||||
|
||||
// - - - - - - - - - -
|
||||
//TABS
|
||||
// - - - - - - - - - -
|
||||
$this->t['tab'] = Factory::getApplication()->input->get('tab', '', '', 'string');
|
||||
$this->t['displaytabs'] = 0;
|
||||
|
||||
// UPLOAD
|
||||
$this->t['currenttab']['upload'] = $this->t['displaytabs'];
|
||||
$this->t['displaytabs']++;
|
||||
|
||||
// MULTIPLE UPLOAD
|
||||
if((int)$this->t['enablemultiple'] >= 0) {
|
||||
$this->t['currenttab']['multipleupload'] = $this->t['displaytabs'];
|
||||
$this->t['displaytabs']++;
|
||||
}
|
||||
|
||||
$group = PhocaDownloadSettings::getManagerGroup($this->manager);
|
||||
|
||||
// - - - - - - - - - - -
|
||||
// Upload
|
||||
// - - - - - - - - - - -
|
||||
$sU = new PhocaDownloadFileUploadSingle();
|
||||
$sU->returnUrl = 'index.php?option=com_phocadownload&view=phocadownloadmanager&tab=upload'.str_replace('&', '&', $group['c']).'&manager='.PhocaDownloadUtils::filterValue($this->manager, 'alphanumeric').'&field='.PhocaDownloadUtils::filterValue($this->field, 'alphanumeric2').'&folder='.PhocaDownloadUtils::filterValue($this->currentFolder, 'folderpath');
|
||||
$sU->tab = 'upload';
|
||||
$this->t['su_output'] = $sU->getSingleUploadHTML();
|
||||
$this->t['su_url'] = Uri::base().'index.php?option=com_phocadownload&task=phocadownloadupload.upload&'
|
||||
.$this->session->getName().'='.$this->session->getId().'&'
|
||||
. Session::getFormToken().'=1&viewback=phocadownloadmanager&manager='.PhocaDownloadUtils::filterValue($this->manager, 'alphanumeric').'&field='.PhocaDownloadUtils::filterValue($this->field, 'alphanumeric2').'&'
|
||||
.'folder='. PhocaDownloadUtils::filterValue($this->currentFolder, 'folderpath').'&tab=upload';
|
||||
|
||||
|
||||
// - - - - - - - - - - -
|
||||
// Multiple Upload
|
||||
// - - - - - - - - - - -
|
||||
// Get infos from multiple upload
|
||||
$muFailed = Factory::getApplication()->input->get( 'mufailed', '0', '', 'int' );
|
||||
$muUploaded = Factory::getApplication()->input->get( 'muuploaded', '0', '', 'int' );
|
||||
$this->t['mu_response_msg'] = $muUploadedMsg = '';
|
||||
|
||||
if ($muUploaded > 0) {
|
||||
$muUploadedMsg = Text::_('COM_PHOCADOWNLOAD_COUNT_UPLOADED_FILE'). ': ' . $muUploaded;
|
||||
}
|
||||
if ($muFailed > 0) {
|
||||
$muFailedMsg = Text::_('COM_PHOCADOWNLOAD_COUNT_NOT_UPLOADED_FILE'). ': ' . $muFailed;
|
||||
}
|
||||
if ($muFailed > 0 && $muUploaded > 0) {
|
||||
$this->t['mu_response_msg'] = '<div class="alert alert-info alert-dismissible">'
|
||||
.''
|
||||
.Text::_('COM_PHOCADOWNLOAD_COUNT_UPLOADED_FILE'). ': ' . $muUploaded .'<br />'
|
||||
.Text::_('COM_PHOCADOWNLOAD_COUNT_NOT_UPLOADED_FILE'). ': ' . $muFailed.'<button type="button" class="btn-close" data-bs-dismiss="alert"></button></div>';
|
||||
} else if ($muFailed > 0 && $muUploaded == 0) {
|
||||
$this->t['mu_response_msg'] = '<div class="alert alert-danger alert-dismissible">'
|
||||
.''
|
||||
.Text::_('COM_PHOCADOWNLOAD_COUNT_NOT_UPLOADED_FILE'). ': ' . $muFailed.'<button type="button" class="btn-close" data-bs-dismiss="alert"></button></div>';
|
||||
} else if ($muFailed == 0 && $muUploaded > 0){
|
||||
$this->t['mu_response_msg'] = '<div class="alert alert-success alert-dismissible">'
|
||||
.''
|
||||
.Text::_('COM_PHOCADOWNLOAD_COUNT_UPLOADED_FILE'). ': ' . $muUploaded.'<button type="button" class="btn-close" data-bs-dismiss="alert"></button></div>';
|
||||
} else {
|
||||
$this->t['mu_response_msg'] = '';
|
||||
}
|
||||
|
||||
if((int)$this->t['enablemultiple'] >= 0) {
|
||||
|
||||
PhocadownloadFileUploadMultiple::renderMultipleUploadLibraries();
|
||||
$mU = new PhocaDownloadFileUploadMultiple();
|
||||
$mU->frontEnd = 0;
|
||||
$mU->method = $this->t['multipleuploadmethod'];
|
||||
$mU->url = Uri::base().'index.php?option=com_phocadownload&task=phocadownloadupload.multipleupload&'
|
||||
.$this->session->getName().'='.$this->session->getId().'&'
|
||||
. Session::getFormToken().'=1&tab=multipleupload&manager='.PhocaDownloadUtils::filterValue($this->manager, 'alphanumeric').'&field='.PhocaDownloadUtils::filterValue($this->field, 'alphanumeric2').'&folder='. PhocaDownloadUtils::filterValue($this->currentFolder, 'folderpath');
|
||||
$mU->reload = Uri::base().'index.php?option=com_phocadownload&view=phocadownloadmanager'
|
||||
.str_replace('&', '&', $group['c']).'&'
|
||||
.$this->session->getName().'='.$this->session->getId().'&'
|
||||
. Session::getFormToken().'=1&tab=multipleupload&'
|
||||
.'manager='.PhocaDownloadUtils::filterValue($this->manager, 'alphanumeric').'&field='.PhocaDownloadUtils::filterValue($this->field, 'alphanumeric2').'&folder='. PhocaDownloadUtils::filterValue($this->currentFolder, 'folderpath');
|
||||
$mU->maxFileSize = PhocadownloadFileUploadMultiple::getMultipleUploadSizeFormat($this->t['uploadmaxsize']);
|
||||
$mU->chunkSize = '1mb';
|
||||
|
||||
$mU->renderMultipleUploadJS(0, $this->t['multipleuploadchunk']);
|
||||
$this->t['mu_output']= $mU->getMultipleUploadHTML();
|
||||
}
|
||||
|
||||
|
||||
$this->t['ftp'] = !ClientHelper::hasCredentials('ftp');
|
||||
$this->t['path'] = PhocaDownloadPath::getPathSet($this->manager);
|
||||
|
||||
$this->addToolbar();
|
||||
parent::display($tpl);
|
||||
echo HTMLHelper::_('behavior.keepalive');
|
||||
}
|
||||
|
||||
function setFolder($index = 0) {
|
||||
if (isset($this->folders[$index])) {
|
||||
$this->_tmp_folder = &$this->folders[$index];
|
||||
} else {
|
||||
$this->_tmp_folder = new CMSObject;
|
||||
}
|
||||
}
|
||||
|
||||
function setFile($index = 0) {
|
||||
if (isset($this->files[$index])) {
|
||||
$this->_tmp_file = &$this->files[$index];
|
||||
} else {
|
||||
$this->_tmp_file = new CMSObject;
|
||||
}
|
||||
}
|
||||
|
||||
protected function addToolbar() {
|
||||
|
||||
Factory::getApplication()->input->set('hidemainmenu', true);
|
||||
require_once JPATH_COMPONENT.'/helpers/'.$this->t['task'].'.php';
|
||||
$state = $this->get('State');
|
||||
$class = ucfirst($this->t['task']).'Helper';
|
||||
$canDo = $class::getActions($this->t, $state->get('filter.multiple'));
|
||||
|
||||
ToolbarHelper::title( Text::_( $this->t['l'].'_MULTIPLE_ADD' ), 'plus' );
|
||||
|
||||
if ($canDo->get('core.create')){
|
||||
ToolbarHelper::save($this->t['c'].'m.save', 'JTOOLBAR_SAVE');
|
||||
}
|
||||
|
||||
ToolbarHelper::cancel($this->t['c'].'m.cancel', 'JTOOLBAR_CLOSE');
|
||||
ToolbarHelper::divider();
|
||||
ToolbarHelper::help( 'screen.'.$this->t['c'], true );
|
||||
}
|
||||
}
|
||||
?>
|
||||
@ -0,0 +1 @@
|
||||
<html><body bgcolor="#FFFFFF"></body></html>
|
||||
@ -0,0 +1,155 @@
|
||||
<?php
|
||||
/*
|
||||
* @package Joomla
|
||||
* @copyright Copyright (C) Open Source Matters. All rights reserved.
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see LICENSE.php
|
||||
* @component Phoca Gallery
|
||||
* @copyright Copyright (C) Jan Pavelka www.phoca.cz
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
|
||||
*/
|
||||
defined('_JEXEC') or die;
|
||||
use Joomla\CMS\Factory;
|
||||
use Joomla\CMS\Language\Text;
|
||||
use Joomla\CMS\Layout\LayoutHelper;
|
||||
use Joomla\CMS\HTML\HTMLHelper;
|
||||
use Joomla\CMS\Router\Route;
|
||||
$r = $this->r;
|
||||
$user = Factory::getUser();
|
||||
$userId = $user->get('id');
|
||||
$listOrder = $this->escape($this->state->get('list.ordering'));
|
||||
|
||||
$listDirn = $this->escape($this->state->get('list.direction'));
|
||||
$canOrder = $user->authorise('core.edit.state', $this->t['o']);
|
||||
$saveOrder = $listOrder == 'a.ordering';
|
||||
$saveOrderingUrl = '';
|
||||
if ($saveOrder && !empty($this->items)) {
|
||||
$saveOrderingUrl = $r->saveOrder($this->t, $listDirn);
|
||||
}
|
||||
$sortFields = $this->getSortFields();
|
||||
|
||||
|
||||
|
||||
echo $r->jsJorderTable($listOrder);
|
||||
|
||||
|
||||
|
||||
echo $r->startForm($this->t['o'], $this->t['task'], 'adminForm');
|
||||
//echo $r->startFilter();
|
||||
//echo $r->selectFilterPublished('JOPTION_SELECT_PUBLISHED', $this->state->get('filter.published'));
|
||||
//echo $r->selectFilterLanguage('JOPTION_SELECT_LANGUAGE', $this->state->get('filter.language'));
|
||||
//echo $r->selectFilterCategory(PhocaDownloadCategory::options($this->t['o']), 'JOPTION_SELECT_CATEGORY', $this->state->get('filter.category_id'));
|
||||
//echo $r->endFilter();
|
||||
|
||||
echo $r->startMainContainer();
|
||||
|
||||
if (isset($this->tmpl['notapproved']->count) && (int)$this->tmpl['notapproved']->count > 0 ) {
|
||||
echo '<div class="alert alert-danger alert-dismissible">'.Text::_($this->t['l'].'_NOT_APPROVED_FILES_COUNT').': '
|
||||
.(int)$this->tmpl['notapproved']->count.'<button type="button" class="btn-close" data-bs-dismiss="alert"></button></div>';
|
||||
}
|
||||
|
||||
/*
|
||||
echo $r->startFilterBar();
|
||||
echo $r->inputFilterSearch($this->t['l'].'_FILTER_SEARCH_LABEL', $this->t['l'].'_FILTER_SEARCH_DESC',
|
||||
$this->escape($this->state->get('filter.search')));
|
||||
echo $r->inputFilterSearchClear('JSEARCH_FILTER_SUBMIT', 'JSEARCH_FILTER_CLEAR');
|
||||
echo $r->inputFilterSearchLimit('JFIELD_PLG_SEARCH_SEARCHLIMIT_DESC', $this->pagination->getLimitBox());
|
||||
echo $r->selectFilterDirection('JFIELD_ORDERING_DESC', 'JGLOBAL_ORDER_ASCENDING', 'JGLOBAL_ORDER_DESCENDING', $listDirn);
|
||||
echo $r->selectFilterSortBy('JGLOBAL_SORT_BY', $sortFields, $listOrder);
|
||||
echo $r->endFilterBar();*/
|
||||
echo LayoutHelper::render('joomla.searchtools.default', array('view' => $this));
|
||||
|
||||
echo $r->startTable('categoryList');
|
||||
|
||||
echo $r->startTblHeader();
|
||||
echo $r->firstColumnHeader($listDirn, $listOrder, 'a', true);
|
||||
///echo $r->secondColumnHeader($listDirn, $listOrder, 'a', true);
|
||||
|
||||
|
||||
|
||||
//echo $r->thOrderingXML('JGRID_HEADING_ORDERING', $listDirn, $listOrder);
|
||||
//echo '<th class="nowrap center hidden-phone ph-ordering"></th>';
|
||||
//echo $r->thCheck('JGLOBAL_CHECK_ALL');
|
||||
//echo '<th class="ph-id"></th>'."\n";
|
||||
echo '<th class="ph-user">'.HTMLHelper::_('searchtools.sort', $this->t['l'].'_USER', 'ua.username', $listDirn, $listOrder ).'</th>'."\n";
|
||||
echo '<th class="ph-filename">'.HTMLHelper::_('searchtools.sort', $this->t['l'].'_FILENAME', 'file_title', $listDirn, $listOrder ).'</th>'."\n";
|
||||
echo '<th class="ph-parentcattitle">'.HTMLHelper::_('searchtools.sort', $this->t['l'].'_CATEGORY', 'category_title', $listDirn, $listOrder ).'</th>'."\n";
|
||||
echo '<th class="ph-rating">'.HTMLHelper::_('searchtools.sort', $this->t['l'].'_RATING', 'a.rating', $listDirn, $listOrder ).'</th>'."\n";
|
||||
echo '<th class="ph-id">'.HTMLHelper::_('searchtools.sort', $this->t['l'].'_ID', 'a.id', $listDirn, $listOrder ).'</th>'."\n";
|
||||
|
||||
echo $r->endTblHeader();
|
||||
|
||||
echo $r->startTblBody($saveOrder, $saveOrderingUrl, $listDirn);
|
||||
|
||||
$originalOrders = array();
|
||||
$parentsStr = "";
|
||||
$j = 0;
|
||||
|
||||
if (is_array($this->items)) {
|
||||
foreach ($this->items as $i => $item) {
|
||||
//if ($i >= (int)$this->pagination->limitstart && $j < (int)$this->pagination->limit) {
|
||||
$j++;
|
||||
|
||||
$urlEdit = 'index.php?option='.$this->t['o'].'&task='.$this->t['task'].'.edit&id=';
|
||||
$urlTask = 'index.php?option='.$this->t['o'].'&task='.$this->t['task'];
|
||||
$orderkey = 0;//array_search($item->id, $this->ordering[0]);
|
||||
$ordering = ($listOrder == 'a.ordering');
|
||||
$canCreate = $user->authorise('core.create', $this->t['o']);
|
||||
$canEdit = $user->authorise('core.edit', $this->t['o']);
|
||||
$canCheckin = $user->authorise('core.manage', 'com_checkin') || $item->checked_out==$user->get('id') || $item->checked_out==0;
|
||||
$canChange = $user->authorise('core.edit.state', $this->t['o']) && $canCheckin;
|
||||
$linkEdit = Route::_( $urlEdit. $item->id );
|
||||
|
||||
$linkCat = Route::_( 'index.php?option='.$this->t['o'].'&task='.$this->t['c'].'cat.edit&id='.(int) $item->category_id );
|
||||
$canEditCat = $user->authorise('core.edit', $this->t['o']);
|
||||
|
||||
$linkImg = Route::_( 'index.php?option='.$this->t['o'].'&task='.$this->t['c'].'file.edit&id='.(int) $item->file_id );
|
||||
$canEditF = $user->authorise('core.edit', $this->t['o']);
|
||||
|
||||
$orderkey = 0;
|
||||
|
||||
|
||||
echo $r->startTr($i, isset($item->catid) ? (int)$item->catid : 0);
|
||||
echo $r->firstColumn($i, $item->id, $canChange, $saveOrder, $orderkey, $item->ordering);
|
||||
///echo $r->secondColumn($i, $item->id, $canChange, $saveOrder, $orderkey, $item->ordering);
|
||||
|
||||
$usrU = $item->ratingname;
|
||||
if ($item->ratingusername) {$usrU = $usrU . ' ('.$item->ratingusername.')';}
|
||||
echo $r->td($usrU, "small hidden-phone");
|
||||
|
||||
|
||||
|
||||
if ($canEditF) {
|
||||
$imgO = '<a href="'. Route::_($linkImg).'">'. $this->escape($item->file_title).'</a>';
|
||||
} else {
|
||||
$imgO = $this->escape($item->file_title);
|
||||
}
|
||||
echo $r->td($imgO, "small hidden-phone");
|
||||
|
||||
if ($canEditCat) {
|
||||
$catO = '<a href="'. Route::_($linkCat).'">'. $this->escape($item->category_title).'</a>';
|
||||
} else {
|
||||
$catO = $this->escape($item->category_title);
|
||||
}
|
||||
echo $r->td($catO, "small hidden-phone");
|
||||
|
||||
//echo $r->td($item->rating, "small hidden-phone");
|
||||
echo $r->tdRating($item->rating);
|
||||
|
||||
echo $r->td($item->id, "small hidden-phone");
|
||||
|
||||
echo $r->endTr();
|
||||
|
||||
//}
|
||||
}
|
||||
}
|
||||
echo $r->endTblBody();
|
||||
|
||||
echo $r->tblFoot($this->pagination->getListFooter(), 7);
|
||||
echo $r->endTable();
|
||||
|
||||
//echo $r->formInputsXML($listOrder, $originalOrders);
|
||||
|
||||
echo $r->formInputsXML($listOrder, $listDirn, $originalOrders);
|
||||
echo $r->endMainContainer();
|
||||
echo $r->endForm();
|
||||
?>
|
||||
@ -0,0 +1 @@
|
||||
<html><body bgcolor="#FFFFFF"></body></html>
|
||||
@ -0,0 +1,80 @@
|
||||
<?php
|
||||
/* @package Joomla
|
||||
* @copyright Copyright (C) Open Source Matters. All rights reserved.
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see LICENSE.php
|
||||
* @extension Phoca Extension
|
||||
* @copyright Copyright (C) Jan Pavelka www.phoca.cz
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
|
||||
*/
|
||||
defined('_JEXEC') or die();
|
||||
use Joomla\CMS\MVC\View\HtmlView;
|
||||
use Joomla\CMS\Toolbar\Toolbar;
|
||||
use Joomla\CMS\Factory;
|
||||
use Joomla\CMS\Toolbar\ToolbarHelper;
|
||||
use Joomla\CMS\Language\Text;
|
||||
jimport( 'joomla.application.component.view' );
|
||||
|
||||
class PhocaDownloadCpViewPhocaDownloadRaFile extends HtmlView
|
||||
{
|
||||
protected $items;
|
||||
protected $pagination;
|
||||
protected $state;
|
||||
protected $t;
|
||||
protected $r;
|
||||
public $filterForm;
|
||||
public $activeFilters;
|
||||
|
||||
function display($tpl = null) {
|
||||
|
||||
$this->t = PhocaDownloadUtils::setVars('rafile');
|
||||
$this->r = new PhocaDownloadRenderAdminViews();
|
||||
$this->items = $this->get('Items');
|
||||
$this->pagination = $this->get('Pagination');
|
||||
$this->state = $this->get('State');
|
||||
$this->filterForm = $this->get('FilterForm');
|
||||
$this->activeFilters = $this->get('ActiveFilters');
|
||||
|
||||
|
||||
if (count($errors = $this->get('Errors'))) {
|
||||
throw new Exception(implode("\n", $errors), 500);
|
||||
return false;
|
||||
}
|
||||
|
||||
$this->addToolbar();
|
||||
parent::display($tpl);
|
||||
}
|
||||
|
||||
function addToolbar() {
|
||||
|
||||
require_once JPATH_COMPONENT.'/helpers/'.$this->t['task'].'.php';
|
||||
|
||||
$bar = Toolbar::getInstance('toolbar');
|
||||
$user = Factory::getUser();
|
||||
$state = $this->get('State');
|
||||
//$isNew = ($this->item->id == 0);
|
||||
//$checkedOut = !($this->item->checked_out == 0 || $this->item->checked_out == $user->get('id'));
|
||||
$class = ucfirst($this->t['task']).'Helper';
|
||||
$canDo = $class::getActions($this->t, $state->get('filter.category_id'));
|
||||
|
||||
|
||||
ToolbarHelper::title( Text::_( $this->t['l'].'_FILE_RATING' ), 'star' );
|
||||
|
||||
if ($canDo->get('core.delete')) {
|
||||
ToolbarHelper::deleteList( Text::_( $this->t['l'].'_WARNING_DELETE_ITEMS' ), $this->t['task'].'.delete', $this->t['l'].'_DELETE');
|
||||
}
|
||||
ToolbarHelper::divider();
|
||||
ToolbarHelper::help( 'screen.'.$this->t['c'], true );
|
||||
}
|
||||
|
||||
protected function getSortFields() {
|
||||
return array(
|
||||
|
||||
'ua.username' => Text::_($this->t['l'] . '_USER'),
|
||||
'file_title' => Text::_($this->t['l'] . '_FILENAME'),
|
||||
'category_title' => Text::_($this->t['l'] . '_CATEGORY'),
|
||||
'a.rating' => Text::_($this->t['l'] . '_RATING'),
|
||||
'a.id' => Text::_('JGRID_HEADING_ID')
|
||||
);
|
||||
}
|
||||
}
|
||||
?>
|
||||
@ -0,0 +1 @@
|
||||
<html><body bgcolor="#FFFFFF"></body></html>
|
||||
@ -0,0 +1,76 @@
|
||||
<?php
|
||||
/* @package Joomla
|
||||
* @copyright Copyright (C) Open Source Matters. All rights reserved.
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see LICENSE.php
|
||||
* @extension Phoca Extension
|
||||
* @copyright Copyright (C) Jan Pavelka www.phoca.cz
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
|
||||
*/
|
||||
defined('_JEXEC') or die('Restricted access'); ?>
|
||||
use Joomla\CMS\HTML\HTMLHelper;
|
||||
use Joomla\CMS\Language\Text;
|
||||
<?php HTMLHelper::_('behavior.tooltip'); ?>
|
||||
|
||||
|
||||
|
||||
<form action="index.php" method="post" name="adminForm">
|
||||
|
||||
<div class="col60">
|
||||
<fieldset class="adminform">
|
||||
<legend><?php echo Text::_( 'Details' ); ?></legend>
|
||||
|
||||
<table class="admintable">
|
||||
<?php
|
||||
foreach ($this->t['items'] as $value) {
|
||||
|
||||
echo '<tr>';
|
||||
echo '<td class="key">';
|
||||
echo '<label for="'.$value->title.'" width="100" title="'.Text::_($value->title . ' DESC').'">';
|
||||
echo Text::_($value->title);
|
||||
echo '</label>';
|
||||
echo '</td>';
|
||||
|
||||
echo '<td colspan="2">';
|
||||
|
||||
switch ($value->type) {
|
||||
case 'textarea':
|
||||
echo PhocaDownloadHelper::getTextareaSettings($value->id, $value->title, $value->value);
|
||||
break;
|
||||
|
||||
case 'textareaeditor':
|
||||
echo PhocaDownloadHelper::getTextareaEditorSettings($value->id, $value->title, $value->value);
|
||||
break;
|
||||
|
||||
case 'select':
|
||||
echo PhocaDownloadHelper::getSelectSettings($value->id, $value->title, $value->value, $value->values);
|
||||
break;
|
||||
|
||||
|
||||
case 'text':
|
||||
default:
|
||||
if ($value->title == 'absolute_path') {
|
||||
echo '<div style="color:red;font-weight:bold">' . Text::_('Experts only!'). '</div>';
|
||||
echo '<div>' . Text::_('Root Path') . ': ' . JPATH_ROOT . '</div>';
|
||||
}
|
||||
echo PhocaDownloadHelper::getTextSettings($value->id, $value->title, $value->value);
|
||||
break;
|
||||
|
||||
}
|
||||
echo '</td>';
|
||||
echo '</tr>';
|
||||
|
||||
}
|
||||
?>
|
||||
|
||||
</table>
|
||||
</fieldset>
|
||||
</div>
|
||||
<div class="clearfix"></div>
|
||||
|
||||
<input type="hidden" name="option" value="com_phocadownload" />
|
||||
<input type="hidden" name="task" value="" />
|
||||
<input type="hidden" name="controller" value="phocadownloadset" />
|
||||
<?php echo HTMLHelper::_( 'form.token' ); ?>
|
||||
</form>
|
||||
|
||||
|
||||
@ -0,0 +1 @@
|
||||
<html><body bgcolor="#FFFFFF"></body></html>
|
||||
@ -0,0 +1,48 @@
|
||||
<?php
|
||||
/*
|
||||
* @package Joomla 1.5
|
||||
* @copyright Copyright (C) 2005 Open Source Matters. All rights reserved.
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see LICENSE.php
|
||||
*
|
||||
* @component Phoca Component
|
||||
* @copyright Copyright (C) Jan Pavelka www.phoca.cz
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
|
||||
*/
|
||||
defined('_JEXEC') or die();
|
||||
use Joomla\CMS\MVC\View\HtmlView;
|
||||
use Joomla\CMS\Uri\Uri;
|
||||
use Joomla\CMS\Factory;
|
||||
use Joomla\CMS\Toolbar\ToolbarHelper;
|
||||
use Joomla\CMS\Language\Text;
|
||||
jimport( 'joomla.application.component.view' );
|
||||
|
||||
class PhocaDownloadCpViewPhocaDownloadset extends HtmlView
|
||||
{
|
||||
function display($tpl = null) {
|
||||
|
||||
|
||||
$uri = Uri::getInstance();
|
||||
$document = Factory::getDocument();
|
||||
$db = Factory::getDBO();
|
||||
|
||||
|
||||
// Get data from the model
|
||||
$items = & $this->get( 'Data');
|
||||
|
||||
//$this->assignRef('items', $items);
|
||||
$this->t['items'] = $items;
|
||||
//$this->assignRef('request_url', $uri->toString());
|
||||
|
||||
parent::display($tpl);
|
||||
$this->_setToolbar();
|
||||
}
|
||||
|
||||
function _setToolbar() {
|
||||
ToolbarHelper::title( Text::_( 'Phoca Download Settings' ), 'settings.png' );
|
||||
ToolbarHelper::save();
|
||||
ToolbarHelper::apply();
|
||||
ToolbarHelper::cancel( 'cancel', 'Close' );
|
||||
ToolbarHelper::help( 'screen.phocadownload', true );
|
||||
}
|
||||
}
|
||||
?>
|
||||
@ -0,0 +1 @@
|
||||
<html><body bgcolor="#FFFFFF"></body></html>
|
||||
@ -0,0 +1,153 @@
|
||||
<?php
|
||||
/* @package Joomla
|
||||
* @copyright Copyright (C) Open Source Matters. All rights reserved.
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see LICENSE.php
|
||||
* @extension Phoca Extension
|
||||
* @copyright Copyright (C) Jan Pavelka www.phoca.cz
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
|
||||
*/
|
||||
defined('_JEXEC') or die;
|
||||
use Joomla\CMS\Factory;
|
||||
use Joomla\CMS\Layout\LayoutHelper;
|
||||
use Joomla\CMS\HTML\HTMLHelper;
|
||||
use Joomla\CMS\Router\Route;
|
||||
use Joomla\CMS\Language\Text;
|
||||
use Joomla\CMS\Uri\Uri;
|
||||
$r = $this->r;
|
||||
$user = Factory::getUser();
|
||||
$userId = $user->get('id');
|
||||
$listOrder = $this->escape($this->state->get('list.ordering'));
|
||||
$listDirn = $this->escape($this->state->get('list.direction'));
|
||||
$canOrder = $user->authorise('core.edit.state', $this->t['o']);
|
||||
$saveOrder = $listOrder == 'a.ordering';
|
||||
$saveOrderingUrl = '';
|
||||
if ($saveOrder && !empty($this->items)) {
|
||||
$saveOrderingUrl = $r->saveOrder($this->t, $listDirn);
|
||||
}
|
||||
$sortFields = $this->getSortFields();
|
||||
|
||||
echo $r->jsJorderTable($listOrder);
|
||||
|
||||
echo '<div class="clearfix"></div>';
|
||||
|
||||
echo $r->startForm($this->t['o'], $this->t['task'], 'adminForm');
|
||||
//echo $r->startFilter();
|
||||
//echo $r->startFilter($this->t['l'].'_FILTER');
|
||||
//echo $r->selectFilterPublished('JOPTION_SELECT_PUBLISHED', $this->state->get('filter.published'));
|
||||
//echo $r->selectFilterLanguage('JOPTION_SELECT_LANGUAGE', $this->state->get('filter.language'));
|
||||
//echo $r->endFilter();
|
||||
|
||||
echo $r->startMainContainer();
|
||||
/*
|
||||
echo $r->startFilterBar();
|
||||
echo $r->inputFilterSearch($this->t['l'].'_FILTER_SEARCH_LABEL', $this->t['l'].'_FILTER_SEARCH_DESC',
|
||||
$this->escape($this->state->get('filter.search')));
|
||||
echo $r->inputFilterSearchClear('JSEARCH_FILTER_SUBMIT', 'JSEARCH_FILTER_CLEAR');
|
||||
echo $r->inputFilterSearchLimit('JFIELD_PLG_SEARCH_SEARCHLIMIT_DESC', $this->pagination->getLimitBox());
|
||||
echo $r->selectFilterDirection('JFIELD_ORDERING_DESC', 'JGLOBAL_ORDER_ASCENDING', 'JGLOBAL_ORDER_DESCENDING', $listDirn);
|
||||
echo $r->selectFilterSortBy('JGLOBAL_SORT_BY', $sortFields, $listOrder);
|
||||
echo $r->endFilterBar();*/
|
||||
echo LayoutHelper::render('joomla.searchtools.default', array('view' => $this));
|
||||
|
||||
echo $r->startTable('categoryList');
|
||||
|
||||
echo $r->startTblHeader();
|
||||
echo $r->firstColumnHeader($listDirn, $listOrder, 'a', true);
|
||||
///echo $r->secondColumnHeader($listDirn, $listOrder, 'a', true);
|
||||
|
||||
//echo $r->thOrderingXML('JGRID_HEADING_ORDERING', $listDirn, $listOrder);
|
||||
//echo '<th class="nowrap center hidden-phone ph-ordering"></th>';
|
||||
//echo $r->thCheck('JGLOBAL_CHECK_ALL');
|
||||
//echo '<th class=""></th>'."\n";
|
||||
echo '<th class="ph-title">'.HTMLHelper::_('searchtools.sort', $this->t['l'].'_TITLE', 'a.title', $listDirn, $listOrder ).'</th>'."\n";
|
||||
echo '<th class="ph-filename-long">'.HTMLHelper::_('searchtools.sort', $this->t['l'].'_FILENAME', 'a.filename', $listDirn, $listOrder ).'</th>'."\n";
|
||||
echo '<th class="ph-hits">'.HTMLHelper::_('searchtools.sort', $this->t['l'].'_DOWNLOADS', 'a.hits', $listDirn, $listOrder ).'</th>'."\n";
|
||||
|
||||
echo $r->endTblHeader();
|
||||
|
||||
|
||||
echo $r->startTblBody($saveOrder, $saveOrderingUrl, $listDirn);
|
||||
|
||||
$color = 0;
|
||||
$colors = array (
|
||||
'#FF8080','#FF9980','#FFB380','#FFC080','#FFCC80','#FFD980','#FFE680','#FFF280','#FFFF80','#E6FF80',
|
||||
'#CCFF80','#99FF80','#80FF80','#80FFC9','#80FFFF','#80C9FF','#809FFF','#9191FF','#AA80FF','#B580FF',
|
||||
'#D580FF','#FF80FF','#FF80DF','#FF80B8');
|
||||
|
||||
$originalOrders = array();
|
||||
$parentsStr = "";
|
||||
$j = 0;
|
||||
|
||||
if (is_array($this->items)) {
|
||||
foreach ($this->items as $i => $item) {
|
||||
//if ($i >= (int)$this->pagination->limitstart && $j < (int)$this->pagination->limit) {
|
||||
if ($item->textonly == 0) {
|
||||
$j++;
|
||||
|
||||
|
||||
$urlEdit = 'index.php?option='.$this->t['o'].'&task='.$this->t['task'].'.edit&id=';
|
||||
$urlTask = 'index.php?option='.$this->t['o'].'&task='.$this->t['task'];
|
||||
$orderkey = array_search($item->id, $this->ordering[0]);
|
||||
$ordering = ($listOrder == 'a.ordering');
|
||||
$canCreate = $user->authorise('core.create', $this->t['o']);
|
||||
$canEdit = $user->authorise('core.edit', $this->t['o']);
|
||||
$canCheckin = $user->authorise('core.manage', 'com_checkin') || $item->checked_out==$user->get('id') || $item->checked_out==0;
|
||||
$canChange = $user->authorise('core.edit.state', $this->t['o']) && $canCheckin;
|
||||
$linkEdit = Route::_( $urlEdit. $item->id );
|
||||
|
||||
|
||||
echo $r->startTr($i, isset($item->catid) ? (int)$item->catid : 0);
|
||||
echo $r->firstColumn($i, $item->id, $canChange, $saveOrder, $orderkey, $item->ordering);
|
||||
///echo $r->secondColumn($i, $item->id, $canChange, $saveOrder, $orderkey, $item->ordering);
|
||||
$checkO = '';
|
||||
/*if ($item->checked_out) {
|
||||
$checkO .= HTMLHelper::_('jgrid.checkedout', $i, $item->editor, $item->checked_out_time, $this->t['tasks'].'.', $canCheckin);
|
||||
}
|
||||
if ($canCreate || $canEdit) {
|
||||
$checkO .= '<a href="'. Route::_($linkEdit).'">'. $this->escape($item->title).'</a>';
|
||||
} else {*/
|
||||
$checkO .= $this->escape($item->title);
|
||||
//}
|
||||
$checkO .= '<br /><span class="smallsub">(<span>'.Text::_($this->t['l'].'_FIELD_ALIAS_LABEL').':</span>'. $this->escape($item->alias).')</span>';
|
||||
echo $r->td($checkO, "small hidden-phone ph-wrap-12");
|
||||
|
||||
echo $r->td($item->filename, 'ph-wrap-12');
|
||||
|
||||
|
||||
if ((int)$this->maxandsum->maxhit == 0) {
|
||||
$per = 0;
|
||||
$perOutput = 0;
|
||||
} else {
|
||||
$per = round((int)$item->hits / (int)$this->maxandsum->maxhit * 500);
|
||||
$perOutput = round((int)$item->hits / (int)$this->maxandsum->sumhit * 100);
|
||||
}
|
||||
|
||||
echo '<td>';
|
||||
echo '<div style="background:'.$colors[$color].' url(\''. Uri::root(true).'/media/com_phocadownload/images/white-space.png'.'\') '.$per.'px 0px no-repeat;width:500px;padding:5px 0px;margin:5px 0px;border:1px solid #ccc;">';
|
||||
// echo '<small style="color:#666666">['. $row->id .']</small>';
|
||||
echo '<div> '.$item->hits.' ('.$perOutput .' %) </div>';
|
||||
echo '</div>';
|
||||
echo '</td></tr>';
|
||||
|
||||
$color++;
|
||||
if ($color > 23) {
|
||||
$color = 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
echo $r->endTr();
|
||||
}
|
||||
//}
|
||||
}
|
||||
}
|
||||
echo $r->endTblBody();
|
||||
|
||||
echo $r->tblFoot($this->pagination->getListFooter(), 5);
|
||||
echo $r->endTable();
|
||||
|
||||
//echo $r->formInputsXML($listOrder, $originalOrders);
|
||||
echo $r->formInputsXML($listOrder, $listDirn, $originalOrders);
|
||||
echo $r->endMainContainer();
|
||||
echo $r->endForm();
|
||||
?>
|
||||
@ -0,0 +1 @@
|
||||
<html><body bgcolor="#FFFFFF"></body></html>
|
||||
@ -0,0 +1,73 @@
|
||||
<?php
|
||||
/* @package Joomla
|
||||
* @copyright Copyright (C) Open Source Matters. All rights reserved.
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see LICENSE.php
|
||||
* @extension Phoca Extension
|
||||
* @copyright Copyright (C) Jan Pavelka www.phoca.cz
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
|
||||
*/
|
||||
defined('_JEXEC') or die();
|
||||
use Joomla\CMS\MVC\View\HtmlView;
|
||||
use Joomla\CMS\Toolbar\ToolbarHelper;
|
||||
use Joomla\CMS\Language\Text;
|
||||
jimport( 'joomla.application.component.view' );
|
||||
|
||||
class PhocaDownloadCpViewPhocaDownloadStat extends HtmlView
|
||||
{
|
||||
protected $items;
|
||||
protected $pagination;
|
||||
protected $state;
|
||||
protected $maxandsum;
|
||||
protected $t;
|
||||
protected $r;
|
||||
|
||||
function display($tpl = null) {
|
||||
|
||||
$this->t = PhocaDownloadUtils::setVars('stat');
|
||||
$this->r = new PhocaDownloadRenderAdminViews();
|
||||
$this->items = $this->get('Items');
|
||||
$this->pagination = $this->get('Pagination');
|
||||
$this->state = $this->get('State');
|
||||
$this->filterForm = $this->get('FilterForm');
|
||||
$this->activeFilters = $this->get('ActiveFilters');
|
||||
$this->maxandsum = $this->get('MaxAndSum');
|
||||
|
||||
foreach ($this->items as &$item) {
|
||||
if ($item->textonly == 0) {
|
||||
$this->ordering[0][] = $item->id;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
if (count($errors = $this->get('Errors'))) {
|
||||
throw new Exception(implode("\n", $errors), 500);
|
||||
return false;
|
||||
}
|
||||
|
||||
$this->addToolbar();
|
||||
parent::display($tpl);
|
||||
}
|
||||
|
||||
function addToolbar() {
|
||||
require_once JPATH_COMPONENT.'/helpers/'.$this->t['task'].'.php';
|
||||
$class = ucfirst($this->t['task']).'Helper';
|
||||
$canDo = $class::getActions($this->t);
|
||||
ToolbarHelper::title( Text::_( $this->t['l'].'_STATISTICS' ), 'chart' );
|
||||
ToolbarHelper::custom($this->t['task'].'.back', 'home-2', '', $this->t['l'].'_CONTROL_PANEL', false);
|
||||
// JToolbarHelper::cancel($this->t['task'].'.cancel', 'JTOOLBAR_CLOSE');
|
||||
ToolbarHelper::divider();
|
||||
ToolbarHelper::help( 'screen.'.$this->t['c'], true );
|
||||
}
|
||||
|
||||
protected function getSortFields() {
|
||||
return array(
|
||||
/*'a.ordering' => JText::_('JGRID_HEADING_ORDERING'),*/
|
||||
'a.title' => Text::_($this->t['l'] . '_TITLE'),
|
||||
'a.filename' => Text::_($this->t['l'] . '_FILENAME'),
|
||||
'a.hits' => Text::_($this->t['l'] . '_DOWNLOADS')
|
||||
/*'a.id' => JText::_('JGRID_HEADING_ID')*/
|
||||
);
|
||||
}
|
||||
}
|
||||
?>
|
||||
@ -0,0 +1 @@
|
||||
<html><body bgcolor="#FFFFFF"></body></html>
|
||||
@ -0,0 +1,88 @@
|
||||
<?php
|
||||
/* @package Joomla
|
||||
* @copyright Copyright (C) Open Source Matters. All rights reserved.
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see LICENSE.php
|
||||
* @extension Phoca Extension
|
||||
* @copyright Copyright (C) Jan Pavelka www.phoca.cz
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
|
||||
*/
|
||||
defined('_JEXEC') or die;
|
||||
use Joomla\CMS\HTML\HTMLHelper;
|
||||
use Joomla\CMS\Language\Text;
|
||||
/*
|
||||
JHtml::_('behavior.tooltip');
|
||||
JHtml::_('behavior.formvalidation');
|
||||
JHtml::_('behavior.keepalive');
|
||||
JHtml::_('formbehavior.chosen', 'select');
|
||||
*/
|
||||
$class = $this->t['n'] . 'RenderAdminView';
|
||||
$r = $this->r;
|
||||
|
||||
?>
|
||||
<script type="text/javascript">
|
||||
Joomla.submitbutton = function(task)
|
||||
{
|
||||
if (task == '<?php echo $this->t['task'] ?>.cancel' || document.formvalidator.isValid(document.getElementById('adminForm'))) {
|
||||
Joomla.submitform(task, document.getElementById('adminForm'));
|
||||
}
|
||||
else {
|
||||
Joomla.renderMessages({"error": ["<?php echo Text::_('JGLOBAL_VALIDATION_FORM_FAILED', true);?>"]});
|
||||
<?php /* alert('<?php echo JText::_('JGLOBAL_VALIDATION_FORM_FAILED', true);?>'); */ ?>
|
||||
}
|
||||
}
|
||||
</script><?php
|
||||
echo $r->startForm($this->t['o'], $this->t['task'], $this->item->id, 'adminForm', 'adminForm');
|
||||
// First Column
|
||||
echo '<div class="span12 form-horizontal">';
|
||||
$tabs = array (
|
||||
'general' => Text::_($this->t['l'].'_GENERAL_OPTIONS'),
|
||||
'publishing' => Text::_($this->t['l'].'_PUBLISHING_OPTIONS'));
|
||||
echo $r->navigation($tabs);
|
||||
|
||||
$formArray = array ('title');
|
||||
echo $r->groupHeader($this->form, $formArray);
|
||||
|
||||
echo $r->startTabs();
|
||||
|
||||
echo $r->startTab('general', $tabs['general'], 'active');
|
||||
|
||||
if ($this->ftp) { echo $this->loadTemplate('ftp');}
|
||||
|
||||
//$formArray = array ('title', 'type', 'filename', 'ordering');
|
||||
//echo $r->group($this->form, $formArray);
|
||||
|
||||
//echo '<div class="control-group">';
|
||||
//echo $r->item($this->form, 'title');
|
||||
echo $this->form->getInput('type');
|
||||
echo $r->item($this->form, 'typeoutput');
|
||||
echo $r->item($this->form, 'filename', $this->t['ssuffixtype']);
|
||||
echo $r->item($this->form, 'ordering');
|
||||
|
||||
//echo '</div>';
|
||||
|
||||
echo '<div class="clr"></div>';
|
||||
echo $this->form->getLabel('source');
|
||||
echo '<div class="clr"></div>';
|
||||
echo '<div class="editor-border" id="ph-editor">';
|
||||
echo $this->form->getInput('source');
|
||||
echo '</div>';
|
||||
|
||||
echo $r->endTab();
|
||||
|
||||
echo $r->startTab('publishing', $tabs['publishing']);
|
||||
foreach($this->form->getFieldset('publish') as $field) {
|
||||
echo '<div class="control-group">';
|
||||
if (!$field->hidden) {
|
||||
echo '<div class="control-label">'.$field->label.'</div>';
|
||||
}
|
||||
echo '<div class="controls">';
|
||||
echo $field->input;
|
||||
echo '</div></div>';
|
||||
}
|
||||
echo $r->endTab();
|
||||
|
||||
// Second Column
|
||||
//echo '<div class="span2"></div>';//end span2
|
||||
echo $r->formInputs($this->t['task']);
|
||||
echo $r->endForm();
|
||||
?>
|
||||
@ -0,0 +1,42 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.Administrator
|
||||
* @subpackage com_templates
|
||||
*
|
||||
* @copyright Copyright (C) 2005 - 2012 Open Source Matters, Inc. All rights reserved.
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
use Joomla\CMS\Language\Text;
|
||||
?>
|
||||
<fieldset class="adminform" title="<?php echo Text::_('COM_PHOCADOWNLOAD_FTP_TITLE'); ?>">
|
||||
<legend><?php echo Text::_('COM_PHOCADOWNLOAD_FTP_TITLE'); ?></legend>
|
||||
|
||||
<?php echo Text::_('COM_PHOCADOWNLOAD_FTP_DESC'); ?>
|
||||
|
||||
<?php if ($this->ftp instanceof Exception): ?>
|
||||
<p class="error"><?php echo Text::_($this->ftp->message); ?></p>
|
||||
<?php endif; ?>
|
||||
|
||||
<table class="adminform">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td width="120">
|
||||
<label for="username"><?php echo Text::_('JGLOBAL_USERNAME'); ?></label>
|
||||
</td>
|
||||
<td>
|
||||
<input type="text" id="username" name="username" class="form-control" size="70" value="" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="120">
|
||||
<label for="password"><?php echo Text::_('JGLOBAL_PASSWORD'); ?></label>
|
||||
</td>
|
||||
<td>
|
||||
<input type="password" id="password" name="password" class="form-control" size="70" value="" />
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</fieldset>
|
||||
@ -0,0 +1 @@
|
||||
<html><body bgcolor="#FFFFFF"></body></html>
|
||||
@ -0,0 +1,97 @@
|
||||
<?php
|
||||
/* @package Joomla
|
||||
* @copyright Copyright (C) Open Source Matters. All rights reserved.
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see LICENSE.php
|
||||
* @extension Phoca Extension
|
||||
* @copyright Copyright (C) Jan Pavelka www.phoca.cz
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
|
||||
*/
|
||||
defined('_JEXEC') or die;
|
||||
use Joomla\CMS\MVC\View\HtmlView;
|
||||
use Joomla\CMS\Client\ClientHelper;
|
||||
use Joomla\CMS\Factory;
|
||||
use Joomla\CMS\Language\Text;
|
||||
use Joomla\CMS\Toolbar\Toolbar;
|
||||
use Joomla\CMS\Toolbar\ToolbarHelper;
|
||||
jimport('joomla.application.component.view');
|
||||
|
||||
|
||||
class PhocaDownloadCpViewPhocaDownloadStyle extends HtmlView
|
||||
{
|
||||
protected $item;
|
||||
protected $form;
|
||||
protected $state;
|
||||
protected $t;
|
||||
protected $r;
|
||||
|
||||
public function display($tpl = null)
|
||||
{
|
||||
$this->t = PhocaDownloadUtils::setVars('style');
|
||||
$this->r = new PhocaDownloadRenderAdminView();
|
||||
|
||||
|
||||
$this->state = $this->get('State');
|
||||
$this->item = $this->get('Item');
|
||||
$this->form = $this->get('Form');
|
||||
$this->ftp = ClientHelper::setCredentialsFromRequest('ftp');
|
||||
$model = $this->getModel();
|
||||
|
||||
// Set CSS for codemirror
|
||||
Factory::getApplication()->setUserState('editor.source.syntax', 'css');
|
||||
|
||||
|
||||
// New or edit
|
||||
if (!$this->form->getValue('id') || $this->form->getValue('id') == 0) {
|
||||
$this->form->setValue('source', null, '');
|
||||
$this->form->setValue('type', null, 2);
|
||||
$this->t['ssuffixtype'] = Text::_($this->t['l'].'_WILL_BE_CREATED_FROM_TITLE');
|
||||
|
||||
} else {
|
||||
$this->source = $model->getSource($this->form->getValue('id'), $this->form->getValue('filename'), $this->form->getValue('type'));
|
||||
$this->form->setValue('source', null, $this->source->source);
|
||||
$this->t['ssuffixtype'] = '';
|
||||
}
|
||||
|
||||
// Only help input form field - to display Main instead of 1 and Custom instead of 2
|
||||
if ($this->form->getValue('type') == 1) {
|
||||
$this->form->setValue('typeoutput', null, Text::_($this->t['l'].'_MAIN_CSS'));
|
||||
} else {
|
||||
$this->form->setValue('typeoutput', null, Text::_($this->t['l'].'_CUSTOM_CSS'));
|
||||
}
|
||||
|
||||
if (count($errors = $this->get('Errors'))) {
|
||||
throw new Exception(implode("\n", $errors), 500);
|
||||
return false;
|
||||
}
|
||||
|
||||
$this->addToolbar();
|
||||
parent::display($tpl);
|
||||
}
|
||||
|
||||
protected function addToolbar() {
|
||||
|
||||
require_once JPATH_COMPONENT.'/helpers/'.$this->t['tasks'].'.php';
|
||||
Factory::getApplication()->input->set('hidemainmenu', true);
|
||||
$bar = Toolbar::getInstance('toolbar');
|
||||
$user = Factory::getUser();
|
||||
$isNew = ($this->item->id == 0);
|
||||
$checkedOut = !($this->item->checked_out == 0 || $this->item->checked_out == $user->get('id'));
|
||||
$class = ucfirst($this->t['tasks']).'Helper';
|
||||
$canDo = $class::getActions($this->t, $this->state->get('filter.category_id'));
|
||||
|
||||
$text = $isNew ? Text::_( $this->t['l'] . '_NEW' ) : Text::_($this->t['l'] . '_EDIT');
|
||||
ToolbarHelper::title( Text::_( $this->t['l'] . '_STYLE' ).': <small><small>[ ' . $text.' ]</small></small>' , 'eye');
|
||||
|
||||
// If not checked out, can save the item.
|
||||
if (!$checkedOut && $canDo->get('core.edit')){
|
||||
ToolbarHelper::apply($this->t['task'].'.apply', 'JTOOLBAR_APPLY');
|
||||
ToolbarHelper::save($this->t['task'].'.save', 'JTOOLBAR_SAVE');
|
||||
}
|
||||
|
||||
ToolbarHelper::cancel($this->t['task'].'.cancel', 'JTOOLBAR_CLOSE');
|
||||
ToolbarHelper::divider();
|
||||
ToolbarHelper::help( 'screen.'.$this->t['c'], true );
|
||||
}
|
||||
|
||||
}
|
||||
?>
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user