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 style="background-color: #000;"></body></html>

View File

@ -0,0 +1,120 @@
<?php
/*
* @package Joomla.Framework
* @copyright Copyright (C) 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( 'Restricted access' );
if(!defined('DS')) define('DS', DIRECTORY_SEPARATOR);
jimport( 'joomla.filesystem.folder' );
class com_phocagalleryInstallerScript
{
function install($parent) {
//echo '<p>' . JText::_('COM_PHOCAGALLLERY_INSTALL_TEXT') . '</p>';
$folder[0][0] = 'images/phocagallery/' ;
$folder[0][1] = JPATH_ROOT . '/'. $folder[0][0];
$folder[1][0] = 'images/phocagallery/avatars/';
$folder[1][1] = JPATH_ROOT . '/' . $folder[1][0];
$message = '';
$error = array();
foreach ($folder as $key => $value)
{
if (!JFolder::exists( $value[1]))
{
if (JFolder::create( $value[1], 0755 ))
{
$data = "<html>\n<body bgcolor=\"#FFFFFF\">\n</body>\n</html>";
JFile::write($value[1]. '/'. "index.html", $data);
$message .= '<div><b><span style="color:#009933">Folder</span> ' . $value[0]
.' <span style="color:#009933">created!</span></b></div>';
$error[] = 0;
}
else
{
$message .= '<div><b><span style="color:#CC0033">Folder</span> ' . $value[0]
.' <span style="color:#CC0033">creation failed!</span></b> Please create it manually.</div>';
$error[] = 1;
}
}
else//Folder exist
{
$message .= '<div><b><span style="color:#009933">Folder</span> ' . $value[0]
.' <span style="color:#009933">exists!</span></b></div>';
$error[] = 0;
}
}
//$app = JFactory::getApplication();
//$app->redirect(JRoute::_('index.php?option=com_phocagallery'), $message);
JFactory::getApplication()->enqueueMessage($message);
$parent->getParent()->setRedirectURL('index.php?option=com_phocagallery');
}
function uninstall($parent) {
//echo '<p>' . JText::_('COM_PHOCAGALLLERY_UNINSTALL_TEXT') . '</p>';
}
function update($parent) {
//echo '<p>' . JText::sprintf('COM_PHOCAGALLERY_UPDATE_TEXT', $parent->get('manifest')->version) . '</p>';
$folder[0][0] = 'images/phocagallery/' ;
$folder[0][1] = JPATH_ROOT . '/'. $folder[0][0];
$folder[1][0] = 'images/phocagallery/avatars/';
$folder[1][1] = JPATH_ROOT . '/' . $folder[1][0];
$message = '';
$error = array();
foreach ($folder as $key => $value)
{
if (!JFolder::exists( $value[1]))
{
if (JFolder::create( $value[1], 0755 ))
{
$data = "<html>\n<body bgcolor=\"#FFFFFF\">\n</body>\n</html>";
JFile::write($value[1]. '/'. "index.html", $data);
$message .= '<div><b><span style="color:#009933">Folder</span> ' . $value[0]
.' <span style="color:#009933">created!</span></b></div>';
$error[] = 0;
}
else
{
$message .= '<div><b><span style="color:#CC0033">Folder</span> ' . $value[0]
.' <span style="color:#CC0033">creation failed!</span></b> Please create it manually.</div>';
$error[] = 1;
}
}
else//Folder exist
{
$message .= '<div><b><span style="color:#009933">Folder</span> ' . $value[0]
.' <span style="color:#009933">exists!</span></b></div>';
$error[] = 0;
}
}
$msg = JText::_('COM_PHOCAGALLERY_UPDATE_TEXT');
$msg .= ' (' . JText::_('COM_PHOCAGALLERY_VERSION'). ': ' . $parent->get('manifest')->version . ')';
$msg .= '<br />'. $message;
$app = JFactory::getApplication();
$app->enqueueMessage($msg);
$app->redirect(JRoute::_('index.php?option=com_phocagallery'));
}
function preflight($type, $parent) {
//echo '<p>' . JText::_('COM_PHOCAGALLERY_PREFLIGHT_' . $type . '_TEXT') . '</p>';
}
function postflight($type, $parent) {
//echo '<p>' . JText::_('COM_PHOCAGALLERY_POSTFLIGHT_' . $type . '_TEXT') . '</p>';
}
}

View File

@ -0,0 +1 @@
<html><body style="background-color: #000;"></body></html>

View File

@ -0,0 +1 @@
<html><body style="background-color: #000;"></body></html>

View File

@ -0,0 +1,272 @@
-- -------------------------------------------------------------------- --
-- Phoca Gallery manual installation --
-- -------------------------------------------------------------------- --
-- See documentation on https://www.phoca.cz/ --
-- --
-- Change all prefixes #__ to prefix which is set in your Joomla! site --
-- (e.g. from #__phocagallery to jos_phocagallery) --
-- Run this SQL queries in your database tool, e.g. in phpMyAdmin --
-- If you have questions, just ask in Phoca Forum --
-- https://www.phoca.cz/forum/ --
-- -------------------------------------------------------------------- --
CREATE TABLE IF NOT EXISTS `#__phocagallery` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`catid` int(11) NOT NULL DEFAULT '0',
`sid` int(11) NOT NULL DEFAULT '0',
`title` varchar(250) NOT NULL DEFAULT '',
`alias` varchar(255) NOT NULL DEFAULT '',
`filename` varchar(250) NOT NULL DEFAULT '',
`format` tinyint(1) NOT NULL DEFAULT '0',
`description` text,
`date` datetime NOT NULL,
`hits` int(11) NOT NULL DEFAULT '0',
`latitude` varchar(20) NOT NULL DEFAULT '',
`longitude` varchar(20) NOT NULL DEFAULT '',
`zoom` int(3) NOT NULL DEFAULT '0',
`geotitle` varchar(255) NOT NULL DEFAULT '',
`userid` int(11) NOT NULL DEFAULT '0',
`videocode` text,
`vmproductid` int(11) NOT NULL DEFAULT '0',
`pcproductid` int(11) NOT NULL DEFAULT '0',
`imgorigsize` int(11) NOT NULL DEFAULT '0',
`published` tinyint(1) NOT NULL DEFAULT '0',
`approved` tinyint(1) NOT NULL DEFAULT '0',
`checked_out` int(11) NOT NULL DEFAULT '0',
`checked_out_time` datetime,
`ordering` int(11) NOT NULL DEFAULT '0',
`params` text,
`metakey` text,
`metadesc` text,
`metadata` text,
`extlink1` text,
`extlink2` text,
`extid` varchar(255) NOT NULL DEFAULT '',
`exttype` tinyint(1) NOT NULL DEFAULT '0',
`extl` varchar(255) NOT NULL DEFAULT '',
`extm` varchar(255) NOT NULL DEFAULT '',
`exts` varchar(255) NOT NULL DEFAULT '',
`exto` varchar(255) NOT NULL DEFAULT '',
`extw` varchar(255) NOT NULL DEFAULT '',
`exth` varchar(255) NOT NULL DEFAULT '',
`language` char(7) NOT NULL DEFAULT '',
PRIMARY KEY (`id`),
KEY `catid` (`catid`,`published`)
) DEFAULT CHARSET=utf8 ;
CREATE TABLE IF NOT EXISTS `#__phocagallery_categories` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`parent_id` int(11) NOT NULL DEFAULT '0',
`owner_id` int(11) NOT NULL DEFAULT '0',
`image_id` int(11) NOT NULL DEFAULT '0',
`title` varchar(255) NOT NULL DEFAULT '',
`name` varchar(255) NOT NULL DEFAULT '',
`alias` varchar(255) NOT NULL DEFAULT '',
`image` varchar(255) NOT NULL DEFAULT '',
`section` varchar(50) NOT NULL DEFAULT '',
`image_position` varchar(30) NOT NULL DEFAULT '',
`description` text,
`date` datetime NOT NULL,
`published` tinyint(1) NOT NULL DEFAULT '0',
`approved` tinyint(1) NOT NULL DEFAULT '0',
`checked_out` int(11) unsigned NOT NULL DEFAULT '0',
`checked_out_time` datetime,
`editor` varchar(50) DEFAULT NULL,
`ordering` int(11) NOT NULL DEFAULT '0',
`access` tinyint(3) unsigned NOT NULL DEFAULT '0',
`count` int(11) NOT NULL DEFAULT '0',
`hits` int(11) NOT NULL DEFAULT '0',
`accessuserid` text,
`uploaduserid` text,
`deleteuserid` text,
`userfolder` text,
`latitude` varchar(20) NOT NULL DEFAULT '',
`longitude` varchar(20) NOT NULL DEFAULT '',
`zoom` int(3) NOT NULL DEFAULT '0',
`geotitle` varchar(255) NOT NULL DEFAULT '',
`extid` varchar(255) NOT NULL DEFAULT '',
`exta` varchar(255) NOT NULL DEFAULT '',
`extu` varchar(255) NOT NULL DEFAULT '',
`extauth` varchar(255) NOT NULL DEFAULT '',
`imgurclient` varchar(255) NOT NULL DEFAULT '',
`imguralbum` varchar(255) NOT NULL DEFAULT '',
`extfbuid` int(11) NOT NULL DEFAULT '0',
`extfbcatid` varchar(255) NOT NULL DEFAULT '',
`params` text,
`metakey` text,
`metadesc` text,
`metadata` text,
`language` char(7) NOT NULL DEFAULT '',
PRIMARY KEY (`id`),
KEY `cat_idx` (`section`,`published`,`access`),
KEY `idx_access` (`access`),
KEY `idx_checkout` (`checked_out`)
) DEFAULT CHARSET=utf8 ;
CREATE TABLE IF NOT EXISTS `#__phocagallery_comments` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`catid` int(11) NOT NULL DEFAULT '0',
`userid` int(11) NOT NULL DEFAULT '0',
`date` datetime NOT NULL,
`title` varchar(255) NOT NULL DEFAULT '',
`alias` varchar(255) NOT NULL DEFAULT '',
`comment` text,
`published` tinyint(1) NOT NULL DEFAULT '0',
`checked_out` int(11) unsigned NOT NULL DEFAULT '0',
`checked_out_time` datetime,
`ordering` int(11) NOT NULL DEFAULT '0',
`params` text,
`language` char(7) NOT NULL DEFAULT '',
PRIMARY KEY (`id`)
) DEFAULT CHARSET=utf8 ;
CREATE TABLE IF NOT EXISTS `#__phocagallery_fb_users` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`appid` varchar(255) NOT NULL DEFAULT '',
`appsid` varchar(255) NOT NULL DEFAULT '',
`uid` varchar(255) NOT NULL DEFAULT '',
`name` varchar(255) NOT NULL DEFAULT '',
`link` varchar(255) NOT NULL DEFAULT '',
`secret` varchar(255) NOT NULL DEFAULT '',
`base_domain` varchar(255) NOT NULL DEFAULT '',
`expires` varchar(100) NOT NULL DEFAULT '',
`session_key` text,
`access_token` text,
`sig` text,
`fanpageid` varchar(255) NOT NULL DEFAULT '',
`published` tinyint(1) NOT NULL DEFAULT '0',
`checked_out` int(11) unsigned NOT NULL DEFAULT '0',
`checked_out_time` datetime,
`ordering` int(11) NOT NULL DEFAULT '0',
`comments` text,
`params` text,
`language` char(7) NOT NULL DEFAULT '',
PRIMARY KEY (`id`)
) DEFAULT CHARSET=utf8 ;
CREATE TABLE IF NOT EXISTS `#__phocagallery_img_comments` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`imgid` int(11) NOT NULL DEFAULT '0',
`userid` int(11) NOT NULL DEFAULT '0',
`date` datetime NOT NULL,
`title` varchar(255) NOT NULL DEFAULT '',
`alias` varchar(255) NOT NULL DEFAULT '',
`comment` text,
`published` tinyint(1) NOT NULL DEFAULT '0',
`checked_out` int(11) unsigned NOT NULL DEFAULT '0',
`checked_out_time` datetime,
`ordering` int(11) NOT NULL DEFAULT '0',
`params` text,
`language` char(7) NOT NULL DEFAULT '',
PRIMARY KEY (`id`)
) DEFAULT CHARSET=utf8 ;
CREATE TABLE IF NOT EXISTS `#__phocagallery_img_votes` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`imgid` int(11) NOT NULL DEFAULT '0',
`userid` int(11) NOT NULL DEFAULT '0',
`date` datetime NOT NULL,
`rating` tinyint(1) NOT NULL DEFAULT '0',
`published` tinyint(1) NOT NULL DEFAULT '0',
`checked_out` int(11) unsigned NOT NULL DEFAULT '0',
`checked_out_time` datetime,
`ordering` int(11) NOT NULL DEFAULT '0',
`params` text,
`language` char(7) NOT NULL DEFAULT '',
PRIMARY KEY (`id`)
) DEFAULT CHARSET=utf8 ;
CREATE TABLE IF NOT EXISTS `#__phocagallery_img_votes_statistics` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`imgid` int(11) NOT NULL DEFAULT '0',
`count` int(11) NOT NULL DEFAULT '0',
`average` float(8,6) NOT NULL DEFAULT '0.000000',
`language` char(7) NOT NULL DEFAULT '',
PRIMARY KEY (`id`)
) DEFAULT CHARSET=utf8 ;
CREATE TABLE IF NOT EXISTS `#__phocagallery_styles` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`title` varchar(255) NOT NULL DEFAULT '',
`alias` varchar(255) NOT NULL DEFAULT '',
`filename` varchar(255) NOT NULL DEFAULT '',
`menulink` text,
`type` tinyint(1) NOT NULL DEFAULT '0',
`published` tinyint(1) NOT NULL DEFAULT '0',
`checked_out` int(11) unsigned NOT NULL DEFAULT '0',
`checked_out_time` datetime,
`ordering` int(11) NOT NULL DEFAULT '0',
`params` text,
`language` char(7) NOT NULL DEFAULT '',
PRIMARY KEY (`id`)
) DEFAULT CHARSET=utf8 ;
INSERT INTO `#__phocagallery_styles` (`id`, `title`, `alias`, `filename`, `menulink`, `type`, `published`, `checked_out`, `checked_out_time`, `ordering`, `params`, `language`) VALUES
(1, 'Phocagallery', 'phocagallery', 'phocagallery.css', '', 1, 1, 0, '0000-00-00 00:00:00', 1, NULL, '*'),
(2, 'Rating', '', 'rating.css', NULL, 1, 1, 0, '0000-00-00 00:00:00', 2, NULL, '*'),
(3, 'Default', '', 'default.css', NULL, 2, 1, 0, '0000-00-00 00:00:00', 3, NULL, '*'),
(4, 'Simple', '', 'theme_simple.css', NULL, 1, 1, 0, '0000-00-00 00:00:00', 3, NULL, '*');
CREATE TABLE IF NOT EXISTS `#__phocagallery_tags` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`title` varchar(255) NOT NULL DEFAULT '',
`alias` varchar(255) NOT NULL DEFAULT '',
`link_cat` int(11) NOT NULL DEFAULT '0',
`link_ext` varchar(255) NOT NULL DEFAULT '',
`description` text,
`published` tinyint(1) NOT NULL DEFAULT '0',
`checked_out` int(11) unsigned NOT NULL DEFAULT '0',
`checked_out_time` datetime,
`ordering` int(11) NOT NULL DEFAULT '0',
`params` text,
`language` char(7) NOT NULL DEFAULT '',
PRIMARY KEY (`id`)
) DEFAULT CHARSET=utf8 ;
CREATE TABLE IF NOT EXISTS `#__phocagallery_tags_ref` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`imgid` int(11) NOT NULL DEFAULT '0',
`tagid` int(11) NOT NULL DEFAULT '0',
PRIMARY KEY (`id`),
UNIQUE KEY `id` (`id`),
UNIQUE KEY `i_imgid` (`imgid`,`tagid`)
) DEFAULT CHARSET=utf8 ;
CREATE TABLE IF NOT EXISTS `#__phocagallery_user` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`userid` int(11) NOT NULL DEFAULT '0',
`avatar` varchar(40) NOT NULL DEFAULT '',
`published` tinyint(1) NOT NULL DEFAULT '0',
`approved` tinyint(1) NOT NULL DEFAULT '0',
`checked_out` int(11) NOT NULL DEFAULT '0',
`checked_out_time` datetime,
`ordering` int(11) NOT NULL DEFAULT '0',
`params` text,
`language` char(7) NOT NULL DEFAULT '',
PRIMARY KEY (`id`),
KEY `userid` (`userid`)
) DEFAULT CHARSET=utf8 ;
CREATE TABLE IF NOT EXISTS `#__phocagallery_votes` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`catid` int(11) NOT NULL DEFAULT '0',
`userid` int(11) NOT NULL DEFAULT '0',
`date` datetime NOT NULL,
`rating` tinyint(1) NOT NULL DEFAULT '0',
`published` tinyint(1) NOT NULL DEFAULT '0',
`checked_out` int(11) unsigned NOT NULL DEFAULT '0',
`checked_out_time` datetime,
`ordering` int(11) NOT NULL DEFAULT '0',
`params` text,
`language` char(7) NOT NULL DEFAULT '',
PRIMARY KEY (`id`)
) DEFAULT CHARSET=utf8 ;
CREATE TABLE IF NOT EXISTS `#__phocagallery_votes_statistics` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`catid` int(11) NOT NULL DEFAULT '0',
`count` int(11) NOT NULL DEFAULT '0',
`average` float(8,6) NOT NULL DEFAULT '0.000000',
`language` char(7) NOT NULL DEFAULT '',
PRIMARY KEY (`id`)
) DEFAULT CHARSET=utf8 ;

View File

@ -0,0 +1,13 @@
DROP TABLE IF EXISTS `#__phocagallery`;
DROP TABLE IF EXISTS `#__phocagallery_categories`;
DROP TABLE IF EXISTS `#__phocagallery_comments`;
DROP TABLE IF EXISTS `#__phocagallery_fb_users`;
DROP TABLE IF EXISTS `#__phocagallery_img_comments`;
DROP TABLE IF EXISTS `#__phocagallery_img_votes`;
DROP TABLE IF EXISTS `#__phocagallery_img_votes_statistics`;
DROP TABLE IF EXISTS `#__phocagallery_styles`;
DROP TABLE IF EXISTS `#__phocagallery_tags`;
DROP TABLE IF EXISTS `#__phocagallery_tags_ref`;
DROP TABLE IF EXISTS `#__phocagallery_user`;
DROP TABLE IF EXISTS `#__phocagallery_votes`;
DROP TABLE IF EXISTS `#__phocagallery_votes_statistics`;