primo commit

This commit is contained in:
2024-12-17 17:34:10 +01:00
commit e650f8df99
16435 changed files with 2451012 additions and 0 deletions

View File

@ -0,0 +1 @@
<html><body bgcolor="#FFFFFF"></body></html>

View File

@ -0,0 +1,99 @@
<?php
/*
* @package Joomla
* @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 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\Factory;
use Joomla\CMS\Language\Text;
use Joomla\CMS\HTML\HTMLHelper;
Factory::getDocument()->addScriptDeclaration(
'Joomla.submitbutton = function(task) {
if (task == "'. $this->t['task'].'.cancel" || document.formvalidator.isValid(document.getElementById("phocagalleryt-form"))) {
Joomla.submitform(task, document.getElementById("phocagalleryt-form"));
} else {
return false;
}
}'
); ?>
<form enctype="multipart/form-data" action="index.php" method="post" name="adminForm" id="phocagalleryt-form" class="form-validate">
<?php
if ($this->require_ftp) {
echo PhocaGalleryFileUpload::renderFTPaccess();
}
?>
<table class="adminform" border="0">
<?php if ($this->theme_name != '') { ?>
<tr>
<td colspan="3"><?php echo Text::_( 'COM_PHOCAGALLERY_CURRENT_THEME' ); ?> : <?php echo $this->theme_name; ?></td>
</tr>
<tr>
<td colspan="3">&nbsp;</td>
</tr>
<?php
}
?>
<?php /*
<tr>
<td width="5"><input type="checkbox" name="theme_component" value="" /></td>
<td colspan="2"><?php echo Text::_( 'COM_PHOCAGALLERY_APPLY_COMPONENT' ); ?></td>
</tr>
<tr>
<td width="5"><input type="checkbox" name="theme_categories" value="" /></td>
<td colspan="2"><?php echo Text::_( 'COM_PHOCAGALLERY_APPLY_CATEGORIES' ); ?></td>
</tr>
<tr>
<td width="5"><input type="checkbox" name="theme_category" value="" /></td>
<td colspan="2"><?php echo Text::_( 'COM_PHOCAGALLERY_APPLY_CATEGORY' ); ?></td>
</tr>
*/ ?>
<tr>
<td colspan="3">&nbsp;</td>
</tr>
<tr>
<td>&nbsp;</td>
<td colspan="2"><b><?php echo Text::_( 'COM_PHOCAGALLERY_UPLOAD_THEME_PACKAGE_FILE' ); ?></b></td>
</tr>
<tr>
<td>&nbsp;</td>
<td width="120">
<label for="install_package"><?php echo Text::_( 'COM_PHOCAGALLERY_UPLOAD_FILE' ); ?>:</label>
</td>
<td>
<input type="file" id="sfile-upload" class="input" name="Filedata" size="57" />
<?php /* <input class="button" type="button" value="<?php echo JText::_( 'COM_PHOCAGALLERY_UPLOAD_FILE' ); ?> &amp; <?php echo JText::_( 'COM_PHOCAGALLERY_INSTALL' ); ?>" onclick="Joomla.submitbutton()" /> */ ?>
<button onclick="Joomla.submitbutton()" class="btn btn-primary" id="upload-submit"><i class="icon-upload icon-white"></i> <?php echo Text::_( 'COM_PHOCAGALLERY_UPLOAD_FILE' ); ?> &amp; <?php echo Text::_( 'COM_PHOCAGALLERY_INSTALL' ); ?></button>
</td>
</tr>
<tr>
<td colspan="3">&nbsp;</td>
</tr>
</table>
<input type="hidden" name="type" value="" />
<input type="hidden" name="option" value="com_phocagallery" />
<input type="hidden" name="task" value="phocagalleryt.themeinstall" />
<?php echo HTMLHelper::_( 'form.token' ); ?>
</form>
<?php
echo '<h4>'.Text::_('COM_PHOCAGALLERY_EDIT_CSS_FILES'). '</h4>';
echo '<ul class="nav nav-tabs nav-stacked"><li><a href="index.php?option=com_phocagallery&view=phocagalleryefs"><i class="icon-edit"></i> '.Text::_('COM_PHOCAGALLERY_EDIT_CSS_FILES'). '</a></li></ul>';
?>
<p>&nbsp;</p><div class="btn-group"><a class="btn btn-large btn-primary" href="https://www.phoca.cz/themes/" target="_blank"><i class="icon-grid-view-2 icon-white"></i>&nbsp;&nbsp;<?php echo Text::_('COM_PHOCAGALLERY_NEW_THEME_DOWNLOAD'); ?></a></div>

View File

@ -0,0 +1,160 @@
<?php
/*
* @package Joomla
* @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 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;
use Joomla\CMS\Uri\Uri;
<fieldset>
<legend><?php echo Text::_('COM_PHOCAGALLERY_BACKGROUND_IMAGE'). ' - '. Text::_('COM_PHOCAGALLERY_SMALL_THUMBNAIL');?></legend>
<div style="float:right;position:relative;margin-top:15px;margin-right:10px">
<?php echo HTMLHelper::_('image', 'media/com_phocagallery/images/administrator/image-bg-image.png', '' ); ?>
</div>
<form action="index.php" method="post" name="adminFormBackgroundImageSmall">
<table class="adminform">
<tr>
<td width="100" align="right" class="key"><label for="title"><?php echo Text::_( 'COM_PHOCAGALLERY_SMALL_IMAGE_WIDTH' ); ?>:</label></td>
<td colspan="2"><input class="text_area" type="text" name="siw" id="siw" size="12" maxlength="8" value="<?php echo $this->t['siw'];?>" /></td>
</tr>
<tr>
<td width="100" align="right" class="key"><label for="title"><?php echo Text::_( 'COM_PHOCAGALLERY_SMALL_IMAGE_HEIGHT' ); ?>:</label></td>
<td colspan="2"><input class="text_area" type="text" name="sih" id="sih" size="12" maxlength="8" value="<?php echo $this->t['sih'];?>" /></td>
</tr>
<tr>
<td width="100" align="right" class="key"><label for="title"><?php echo Text::_( 'COM_PHOCAGALLERY_SITE_BACKGROUND_COLOR' ); ?>:</label></td>
<td colspan="2"><input class="text_area" type="text" name="ssbgc" id="ssbgc" size="12" maxlength="8" value="<?php echo $this->t['ssbgc'];?>" /> <span style="margin-left:10px" onclick="openPicker('ssbgc')" class="picker_buttons"><?php echo Text::_('COM_PHOCAGALLERY_PICK_COLOR'); ?></span> (1)</td>
</tr>
<tr>
<td width="100" align="right" class="key"><label for="title"><?php echo Text::_( 'COM_PHOCAGALLERY_IMAGE_BACKGROUND_COLOR' ); ?>:</label></td>
<td colspan="2"><input class="text_area" type="text" name="sibgc" id="sibgc" size="12" maxlength="8" value="<?php echo $this->t['sibgc'];?>" /> <span style="margin-left:10px" onclick="openPicker('sibgc')" class="picker_buttons"><?php echo Text::_('COM_PHOCAGALLERY_PICK_COLOR'); ?></span> (2)</td>
</tr>
<tr>
<td width="100" align="right" class="key"><label for="title"><?php echo Text::_( 'COM_PHOCAGALLERY_IMAGE_BORDER_COLOR' ); ?>:</label></td>
<td colspan="2"><input class="text_area" type="text" name="sibrdc" id="sibrdc" size="12" maxlength="8" value="<?php echo $this->t['sibrdc'];?>" /> <span style="margin-left:10px" onclick="openPicker('sibrdc')" class="picker_buttons"><?php echo Text::_('COM_PHOCAGALLERY_PICK_COLOR'); ?></span> (3)</td>
</tr>
<tr>
<td valign="middle" align="right" class="key"><?php echo Text::_( 'COM_PHOCAGALLERY_IMAGE_EFFECT' ); ?>:</td>
<td valign="middle"><select id="sie" name="sie">
<option value="0" <?php if ($this->t['sie'] == 0) {echo 'selected="selected"';} ?> ><?php echo Text::_('COM_PHOCAGALLERY_NONE')?></option>
<option value="1" <?php if ($this->t['sie'] == 1) {echo 'selected="selected"';} ?> ><?php echo Text::_('COM_PHOCAGALLERY_DROP_SHADOW')?></option>
<option value="2" <?php if ($this->t['sie'] == 2) {echo 'selected="selected"';} ?> ><?php echo Text::_('COM_PHOCAGALLERY_DROP_SHADOW_TR')?></option>
<option value="3" <?php if ($this->t['sie'] == 3) {echo 'selected="selected"';} ?> ><?php echo Text::_('COM_PHOCAGALLERY_OUTER_GLOW')?></option>
</select></td>
</tr>
<tr>
<td width="100" align="right" class="key"><label for="title"><?php echo Text::_( 'COM_PHOCAGALLERY_IMAGE_EFFECT_COLOR' ); ?>:</label></td>
<td colspan="2"><input class="text_area" type="text" name="siec" id="siec" size="12" maxlength="8" value="<?php echo $this->t['siec'];?>" /> <span style="margin-left:10px" onclick="openPicker('siec')" class="picker_buttons"><?php echo Text::_('COM_PHOCAGALLERY_PICK_COLOR'); ?></span> (4)</td>
</tr>
<tr>
<td valign="middle" align="right" class="key"><?php echo Text::_( 'COM_PHOCAGALLERY_CURRENT_IMAGE' ); ?>:</td>
<td valign="middle">
<?php echo '(shadow3.png)';?>
<br />
<?php echo '<img src="'.Uri::root().'/media/com_phocagallery/images/shadow3.png' .'?imagesid='.md5(uniqid(time())) . '" alt="" />';
?>
</td>
</tr>
</table>
<div style="text-align:right"><input type="submit" name="sisubmit" value="<?php echo Text::_('COM_PHOCAGALLERY_CREATE_BG_IMAGE');?>" /></div>
<input type="hidden" name="type" value="" />
<input type="hidden" name="task" value="phocagalleryt.bgimagesmall" />
<input type="hidden" name="option" value="com_phocagallery" />
<?php echo HTMLHelper::_( 'form.token' ); ?>
</form>
</fieldset>
<fieldset>
<legend><?php echo Text::_('COM_PHOCAGALLERY_BACKGROUND_IMAGE'). ' - '. Text::_('COM_PHOCAGALLERY_MEDIUM_THUMBNAIL');?></legend>
<div style="float:right;position:relative;margin-top:15px;margin-right:10px">
<?php echo HTMLHelper::_('image', 'media/com_phocagallery/images/administrator/image-bg-image.png', '' ); ?>
</div>
<form action="index.php" method="post" name="adminFormBackgroundImageMedium">
<table class="adminform">
<tr>
<td width="100" align="right" class="key"><label for="title"><?php echo Text::_( 'COM_PHOCAGALLERY_MEDIUM_IMAGE_WIDTH' ); ?>:</label></td>
<td colspan="2"><input class="text_area" type="text" name="miw" id="miw" size="12" maxlength="8" value="<?php echo $this->t['miw'];?>" /></td>
</tr>
<tr>
<td width="100" align="right" class="key"><label for="title"><?php echo Text::_( 'COM_PHOCAGALLERY_MEDIUM_IMAGE_HEIGHT' ); ?>:</label></td>
<td colspan="2"><input class="text_area" type="text" name="mih" id="mih" size="12" maxlength="8" value="<?php echo $this->t['mih'];?>" /></td>
</tr>
<tr>
<td width="100" align="right" class="key"><label for="title"><?php echo Text::_( 'COM_PHOCAGALLERY_SITE_BACKGROUND_COLOR' ); ?>:</label></td>
<td colspan="2"><input class="text_area" type="text" name="msbgc" id="msbgc" size="12" maxlength="8" value="<?php echo $this->t['msbgc'];?>" /> <span style="margin-left:10px" onclick="openPicker('msbgc')" class="picker_buttons"><?php echo Text::_('COM_PHOCAGALLERY_PICK_COLOR'); ?></span> (1)</td>
</tr>
<tr>
<td width="100" align="right" class="key"><label for="title"><?php echo Text::_( 'COM_PHOCAGALLERY_IMAGE_BACKGROUND_COLOR' ); ?>:</label></td>
<td colspan="2"><input class="text_area" type="text" name="mibgc" id="mibgc" size="12" maxlength="8" value="<?php echo $this->t['mibgc'];?>" /> <span style="margin-left:10px" onclick="openPicker('mibgc')" class="picker_buttons"><?php echo Text::_('COM_PHOCAGALLERY_PICK_COLOR'); ?></span> (2)</td>
</tr>
<tr>
<td width="100" align="right" class="key"><label for="title"><?php echo Text::_( 'COM_PHOCAGALLERY_IMAGE_BORDER_COLOR' ); ?>:</label></td>
<td colspan="2"><input class="text_area" type="text" name="mibrdc" id="mibrdc" size="12" maxlength="8" value="<?php echo $this->t['mibrdc'];?>" /> <span style="margin-left:10px" onclick="openPicker('mibrdc')" class="picker_buttons"><?php echo Text::_('COM_PHOCAGALLERY_PICK_COLOR'); ?></span> (3)</td>
</tr>
<tr>
<td valign="middle" align="right" class="key"><?php echo Text::_( 'COM_PHOCAGALLERY_IMAGE_EFFECT' ); ?>:</td>
<td valign="middle"><select id="mie" name="mie">
<option value="0" <?php if ($this->t['mie'] == 0) {echo 'selected="selected"';} ?> ><?php echo Text::_('COM_PHOCAGALLERY_NONE')?></option>
<option value="1" <?php if ($this->t['mie'] == 1) {echo 'selected="selected"';} ?> ><?php echo Text::_('COM_PHOCAGALLERY_DROP_SHADOW')?></option>
<option value="2" <?php if ($this->t['mie'] == 2) {echo 'selected="selected"';} ?> ><?php echo Text::_('COM_PHOCAGALLERY_DROP_SHADOW_TR')?></option>
<option value="3" <?php if ($this->t['mie'] == 3) {echo 'selected="selected"';} ?> ><?php echo Text::_('COM_PHOCAGALLERY_OUTER_GLOW')?></option>
</select></td>
</tr>
<tr>
<td width="100" align="right" class="key"><label for="title"><?php echo Text::_( 'COM_PHOCAGALLERY_IMAGE_EFFECT_COLOR' ); ?>:</label></td>
<td colspan="2"><input class="text_area" type="text" name="miec" id="miec" size="12" maxlength="8" value="<?php echo $this->t['miec'];?>" /> <span style="margin-left:10px" onclick="openPicker('miec')" class="picker_buttons"><?php echo Text::_('COM_PHOCAGALLERY_PICK_COLOR'); ?></span> (4)</td>
</tr>
<tr>
<td valign="middle" align="right" class="key"><?php echo Text::_( 'COM_PHOCAGALLERY_CURRENT_IMAGE' ); ?>:</td>
<td valign="middle">
<?php echo '(shadow1.png)';?>
<br />
<?php echo '<img src="'.Uri::root().'/media/com_phocagallery/images/shadow1.png' .'?imagesid='.md5(uniqid(time())) . '" alt="" />';
//echo JHtml::_('image', 'media/com_phocagallery/images/shadow1.'.$this->t['formaticon'] .'?imagesid='.md5(uniqid(time())),'');
?>
</td>
</tr>
</table>
<div style="text-align:right"><input type="submit" name="misubmit" value="<?php echo Text::_('COM_PHOCAGALLERY_CREATE_BG_IMAGE');?>" /></div>
<input type="hidden" name="type" value="" />
<input type="hidden" name="task" value="phocagalleryt.bgimagemedium" />
<input type="hidden" name="option" value="com_phocagallery" />
<?php echo HTMLHelper::_( 'form.token' ); ?>
</form>
</fieldset>

View File

@ -0,0 +1 @@
<html><body bgcolor="#FFFFFF"></body></html>

View File

@ -0,0 +1,167 @@
<?php
/*
* @package Joomla.Framework
* @copyright Copyright (C) 2005 - 2010 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*
* @component Phoca Component
* @copyright Copyright (C) Jan Pavelka www.phoca.cz
* @license http://www.gnu.org/copyleft/gpl.html GNU General Public License version 2 or later;
*/
defined('_JEXEC') or die();
use Joomla\CMS\MVC\View\HtmlView;
use Joomla\CMS\Factory;
use Joomla\CMS\Client\ClientHelper;
use Joomla\CMS\Component\ComponentHelper;
use Joomla\CMS\Toolbar\ToolbarHelper;
use Joomla\CMS\Language\Text;
use Joomla\CMS\Toolbar\Toolbar;
use Joomla\CMS\Filesystem\Folder;
jimport( 'joomla.application.component.view' );
jimport( 'joomla.client.helper' );
phocagalleryimport( 'phocagallery.image.image' );
class PhocaGalleryCpViewPhocaGalleryT extends HtmlView
{
protected $require_ftp;
protected $theme_name;
protected $files;
protected $r;
protected $t;
public function display($tpl = null) {
$document = Factory::getDocument();
$this->t = PhocaGalleryUtils::setVars('t');
$this->r = new PhocaGalleryRenderAdminview();
//JHtml::stylesheet( 'media/com_phocagallery/js/jcp/picker.css' );
//$document->addScript(JUri::base(true).'/media/com_phocagallery/js/jcp/picker.js');
$this->require_ftp = ClientHelper::setCredentialsFromRequest('ftp');
$this->files = $this->get('Files');
$this->form = $this->get('Form');
if($this->themeName()) {
$this->theme_name = $this->themeName();
}
// Background Image
/*
$params = ComponentHelper::getParams('com_phocagallery');
// Small
$this->t['siw'] = $params->get('small_image_width', 128 );
$this->t['sih'] = $params->get('small_image_height', 96 );
//After creating an image (post with data);
$this->t['ssbgc'] = Factory::getApplication()->input->get( 'ssbgc', '', '', 'string' );
$this->t['sibgc'] = Factory::getApplication()->input->get( 'sibgc', '', '', 'string' );
$this->t['sibrdc'] = Factory::getApplication()->input->get( 'sibrdc', '', '', 'string' );
$this->t['sie'] = Factory::getApplication()->input->get( 'sie', '', '', 'int' );
$this->t['siec'] = Factory::getApplication()->input->get( 'siec', '', '', 'string' );
$siw = Factory::getApplication()->input->get( 'siw', '', '', 'int' );
$sih = Factory::getApplication()->input->get( 'sih', '', '', 'int' );
$this->t['ssbgc'] = PhocaGalleryUtils::filterInput($this->t['ssbgc']);
$this->t['sibgc'] = PhocaGalleryUtils::filterInput($this->t['sibgc']);
$this->t['sibrdc'] = PhocaGalleryUtils::filterInput($this->t['sibrdc']);
$this->t['siec'] = PhocaGalleryUtils::filterInput($this->t['siec']);
if($this->t['ssbgc'] != '') {$this->t['ssbgc'] = '#'.$this->t['ssbgc'];}
if($this->t['sibgc'] != '') {$this->t['sibgc'] = '#'.$this->t['sibgc'];}
if($this->t['sibrdc'] != '') {$this->t['sibrdc'] = '#'.$this->t['sibrdc'];}
if($this->t['siec'] != '') {$this->t['siec'] = '#'.$this->t['siec'];}
if ((int)$siw > 0) {$this->t['siw'] = (int)$siw;}
if ((int)$sih > 0) {$this->t['sih'] = (int)$sih;}
// Medium
$this->t['miw'] = $params->get('medium_image_width', 256 );
$this->t['mih'] = $params->get('medium_image_height', 192 );
//After creating an image (post with data);
$this->t['msbgc'] = Factory::getApplication()->input->get( 'msbgc', '', '', 'string' );
$this->t['mibgc'] = Factory::getApplication()->input->get( 'mibgc', '', '', 'string' );
$this->t['mibrdc'] = Factory::getApplication()->input->get( 'mibrdc', '', '', 'string' );
$this->t['mie'] = Factory::getApplication()->input->get( 'mie', '', '', 'int' );
$this->t['miec'] = Factory::getApplication()->input->get( 'miec', '', '', 'string' );
$miw = Factory::getApplication()->input->get( 'miw', '', '', 'int' );
$mih = Factory::getApplication()->input->get( 'mih', '', '', 'int' );
$this->t['msbgc'] = PhocaGalleryUtils::filterInput($this->t['msbgc']);
$this->t['mibgc'] = PhocaGalleryUtils::filterInput($this->t['mibgc']);
$this->t['mibrdc'] = PhocaGalleryUtils::filterInput($this->t['mibrdc']);
$this->t['miec'] = PhocaGalleryUtils::filterInput($this->t['miec']);
if($this->t['msbgc'] != '') {$this->t['msbgc'] = '#'.$this->t['msbgc'];}
if($this->t['mibgc'] != '') {$this->t['mibgc'] = '#'.$this->t['mibgc'];}
if($this->t['mibrdc'] != '') {$this->t['mibrdc'] = '#'.$this->t['mibrdc'];}
if($this->t['miec'] != '') {$this->t['miec'] = '#'.$this->t['miec'];}
if ((int)$miw > 0) {$this->t['miw'] = (int)$miw;}
if ((int)$mih > 0) {$this->t['mih'] = (int)$mih;}*/
$this->addToolbar();
parent::display($tpl);
}
protected function addToolbar() {
ToolbarHelper::title( Text::_( 'COM_PHOCAGALLERY_THEMES' ), 'grid-view-2');
ToolbarHelper::cancel('phocagalleryt.cancel', 'JToolbar_CLOSE');
ToolbarHelper::divider();
ToolbarHelper::help( 'screen.phocagallery', true );
}
function themeName() {
// Get an array of all the xml files from teh installation directory
$path = PhocaGalleryPath::getPath();
$xmlFiles = Folder::files($path->image_abs_front, '.xml$', 1, true);
// If at least one xml file exists
if (count($xmlFiles) > 0) {
foreach ($xmlFiles as $file)
{
// Is it a valid joomla installation manifest file?
$manifest = $this->_isManifest($file);
if(!is_null($manifest)) {
foreach ($manifest->children() as $key => $value){
if ((string)$value->getName() == 'name') {
return (string)$value;
}
}
}
return false;
}
return false;
} else {
return false;
}
}
function _isManifest($file) {
$xml = simplexml_load_file($file);
if (!$xml) {
unset ($xml);
return null;
}
if (!is_object($xml) || ($xml->getName() != 'install' )) {
unset ($xml);
return null;
}
return $xml;
}
}
?>