first commit

This commit is contained in:
2024-07-15 11:28:08 +02:00
commit f52d538ea5
21891 changed files with 6161164 additions and 0 deletions

View File

@@ -0,0 +1,10 @@
[angie-prestashop]
name="ANGIE for PrestaShop"
package="angie.jpa,angie-prestashop.jpa"
language="language-angie.jpa,language-prestashop.jpa"
installerroot="installation"
sqlroot="installation/sql"
databasesini=1
readme=1
extrainfo=1
password=1

View File

@@ -0,0 +1,10 @@
[angie-wordpress]
name="ANGIE for WordPress"
package="angie.jpa,angie-wordpress.jpa"
language="language-angie.jpa,language-wordpress.jpa"
installerroot="installation"
sqlroot="installation/sql"
databasesini=1
readme=1
extrainfo=1
password=1

View File

@@ -0,0 +1,13 @@
{
"angie-wordpress": {
"name": "ANGIE for WordPress",
"package": "angie.jpa,angie-wordpress.jpa",
"language": "language-angie.jpa,language-wordpress.jpa",
"installerroot": "installation",
"sqlroot": "installation\/sql",
"databasesini": "1",
"readme": "1",
"extrainfo": "1",
"password": "1"
}
}

View File

@@ -0,0 +1,10 @@
[angie]
name="ANGIE for Joomla! Sites"
package="angie.jpa,angie-joomla.jpa"
language="language-angie.jpa,language-joomla.jpa"
installerroot="installation"
sqlroot="installation/sql"
databasesini=1
readme=1
extrainfo=1
password=1

View File

@@ -0,0 +1 @@
<html><head><title></title></head><body></body></html>

View File

@@ -0,0 +1,266 @@
<?php
/**
* @package akeebabackup
* @copyright Copyright (c)2006-2022 Nicholas K. Dionysopoulos / Akeeba Ltd
* @license GNU General Public License version 3, or later
*/
defined('KICKSTART') or die;
/**
* Akeeba Kickstart Site Transfer Helper add-on feature
*
* This file allows to remotely transfer files and perform other tasks required during site transfer using Akeeba
* Backup's Site Transfer Wizard. The features inside this file can only be accessed through Kickstart. Trying to access
* this file directly will of course fail.
*/
class AKFeatureTransfer
{
/**
* Returns information about the server we're running on.
*
* @param array $params
*
* @return array
*/
public function serverInfo($params)
{
$maxExecTime = 5;
$memLimit = '8M';
$baseDir = '';
$disabled = '';
$maxPostSize = '2M';
$uploadMaxSize = '2M';
if (function_exists('ini_get'))
{
$maxExecTime = ini_get("max_execution_time");
$memLimit = ini_get("memory_limit");
$baseDir = ini_get('open_basedir');
$disabled = ini_get("disable_functions");
$maxPostSize = ini_get("post_max_size");
$uploadMaxSize = ini_get("upload_max_filesize");
if (empty($maxExecTime))
{
$maxExecTime = 5;
}
}
$server = 'n/a';
if (isset($_SERVER['SERVER_SOFTWARE']))
{
$server = $_SERVER['SERVER_SOFTWARE'];
}
elseif (($sf = getenv('SERVER_SOFTWARE')))
{
$server = $sf;
}
$infoArray = array(
'freeSpace' => disk_free_space(dirname(__FILE__)),
'phpVersion' => PHP_VERSION,
'phpSAPI' => PHP_SAPI,
'phpOS' => PHP_OS,
'osVersion' => php_uname('s'),
'server' => $server,
'canWrite' => $this->canWriteToFiles(),
'canWriteTemp' => $this->canWriteToFiles('kicktemp'),
'maxExecTime' => $maxExecTime,
'memLimit' => $this->memoryToBytes($memLimit),
'maxPost' => $this->memoryToBytes($maxPostSize),
'maxUpload' => $this->memoryToBytes($uploadMaxSize),
'baseDir' => $baseDir,
'disabledFuncs' => $disabled,
);
return $infoArray;
}
public function uploadFile($params)
{
// Get the parameters describing the upload
$file = isset($_GET['file']) ? $_GET['file'] : '';
$directory = isset($_GET['directory']) ? $_GET['directory'] : '';
$frag = isset($_GET['frag']) ? $_GET['frag'] : 0;
$fragSize = isset($_GET['fragSize']) ? $_GET['fragSize'] : 1048576;
$data = isset($_POST['data']) ? $_POST['data'] : '';
$dataFile = isset($_GET['dataFile']) ? $_GET['dataFile'] : '';
// We need a file
if (empty($file))
{
return array(
'status' => false,
'message' => 'You have not specified a file'
);
}
// Let's make sure the remote end is not trying to do something nasty
$file = basename($file);
$pos = strrpos($file, '.');
if ($pos === false)
{
return array(
'status' => false,
'message' => 'Invalid file name specified'
);
}
$extension = substr($file, $pos + 1);
if (empty($extension))
{
return array(
'status' => false,
'message' => 'Invalid file name specified'
);
}
if (!preg_match('(jpa|zip|jps|j[\d]{2,}|z[\d]{2,})', $extension))
{
return array(
'status' => false,
'message' => 'Invalid file name specified'
);
}
// We only allow very specific directories
$directory = trim($directory, '/');
if (!in_array($directory, array('', 'kicktemp')))
{
return array(
'status' => false,
// Yes, the message is intentionally vague
'message' => 'Invalid file name specified'
);
}
// If a data file was given, read it to memory
if (empty($data) && !empty($dataFile))
{
// Do not remove the basename(). It makes sure we won't try to read a file outside our directory.
$data = @file_get_contents(__DIR__ . '/' . basename($dataFile));
}
// We need some data to write, yes?
if (empty($data))
{
return array(
'status' => false,
'message' => 'No data specified'
);
}
if (!empty($directory))
{
$directory = '/' . $directory;
}
$filename = __DIR__ . $directory . '/' . $file;
// Open the file for writing or append
$mode = ($frag == 0) ? 'w' : 'a';
$fp = @fopen($filename, $mode);
if ($fp === false)
{
$modeHuman = ($mode == 'w') ? 'write' : 'append';
return array(
'status' => false,
'message' => "Cannot open $file for $modeHuman"
);
}
// Seek to the correct offset
$offset = $frag * $fragSize;
@fseek($fp, $offset);
// Write to the file
$written = @fwrite($fp, $data);
@fclose($fp);
if (!$written || ($written != strlen($data)))
{
return array(
'status' => false,
'message' => "Cannot write to $file"
);
}
return array(
'status' => true,
'message' => ''
);
}
/**
* Can I write to arbitrary files in the Kickstart directory?
*
* @return bool
*/
private function canWriteToFiles($directory = '')
{
// Try to create a temporary file
$directory = dirname(__FILE__) . '/' . $directory;
$directory = rtrim($directory, '/');
$testFilename = tempnam($directory, 'kst');
// Failed completely?
if ($testFilename === false)
{
return false;
}
// File created in another directory?
if (dirname($testFilename) != $directory)
{
@unlink($testFilename);
return false;
}
@unlink($testFilename);
return true;
}
/**
* Converts a human formatted size to integer representation of bytes,
* e.g. 1M to 1024768
*
* @param string $setting The value in human readable format, e.g. "1M"
*
* @return integer The value in bytes
*/
private function memoryToBytes($setting)
{
$val = trim($setting);
$last = strtolower($val{strlen($val) - 1});
if (is_numeric($last))
{
return $setting;
}
switch ($last)
{
case 't':
$val *= 1024;
case 'g':
$val *= 1024;
case 'm':
$val *= 1024;
case 'k':
$val *= 1024;
}
return (int) $val;
}
}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,11 @@
{
"none": {
"name": "No Installer",
"package": "",
"installerroot": "",
"sqlroot": "sql",
"databasesini": 0,
"readme": 0,
"extrainfo": 0
}
}

View File

@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<system.web>
<authorization>
<deny users="*"/>
</authorization>
</system.web>
</configuration>

View File

@@ -0,0 +1,45 @@
<?php die; ?>
{
"dbdriver": "mysqli",
"dbhost": "localhost",
"dbuser": "solo",
"dbpass": "solo",
"dbname": "solo",
"prefix": "solo_",
"timezone": "Europe/Athens",
"live_site": "",
"base_url": "index.php",
"session_timeout": "1440",
"mail":
{
"online": true,
"mailer": "mail",
"smtpauth": false,
"smtpuser": "",
"smtppass": "",
"smtphost": "",
"smtpsecure": 0,
"smtpport": 25,
"mailfrom": "you@example.com",
"fromname": "Change This"
}
"fs":
{
"driver": "file",
"host": "localhost",
"port": "21",
"username": "",
"password": "",
"directory": "/",
"ssl": false,
"passive": true
},
"options":
{
}
}

View File

@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<system.web>
<authorization>
<deny users ="*" />
</authorization>
</system.web>
</configuration>

View File

@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<system.web>
<authorization>
<deny users ="*" />
</authorization>
</system.web>
</configuration>

View File

@@ -0,0 +1,229 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--~
~ @package solo
~ @copyright Copyright (c)2014-2022 Nicholas K. Dionysopoulos / Akeeba Ltd
~ @license GNU General Public License version 3, or later
-->
<schema>
<!-- Metadata -->
<meta>
<!-- Supported driver types -->
<drivers>
<driver>mysql</driver>
<driver>mysqli</driver>
<driver>pdomysql</driver>
</drivers>
</meta>
<!-- SQL commands to run on installation and update -->
<sql>
<action table="#__akeeba_common" canfail="0">
<condition type="missing" value=""/>
<query><![CDATA[
CREATE TABLE IF NOT EXISTS `#__akeeba_common` (
`key` varchar(190) NOT NULL,
`value` longtext NOT NULL,
PRIMARY KEY (`key`)
) DEFAULT COLLATE utf8_general_ci CHARSET=utf8;
]]></query>
</action>
<action table="#__ak_params" canfail="0">
<condition type="missing" value="" />
<query><![CDATA[
CREATE TABLE `#__ak_params` (
`tag` varchar(255) NOT NULL,
`data` longtext,
PRIMARY KEY (`tag`)
) DEFAULT CHARACTER SET utf8;
]]></query>
</action>
<action table="#__ak_profiles" canfail="0">
<condition type="missing" value="" />
<query><![CDATA[
CREATE TABLE `#__ak_profiles` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`description` varchar(255) NOT NULL,
`configuration` longtext,
`filters` longtext,
`quickicon` tinyint(3) NOT NULL DEFAULT '1',
PRIMARY KEY (`id`)
) DEFAULT CHARACTER SET utf8;
]]></query>
</action>
<action table="#__ak_profiles" canfail="1">
<condition type="equals" operator="not" value="1"><![CDATA[
SELECT COUNT(*) FROM `#__ak_profiles` WHERE `id` = 1;
]]></condition>
<query><![CDATA[
INSERT IGNORE INTO `#__ak_profiles`
(`id`,`description`, `configuration`, `filters`, `quickicon`) VALUES
(1,'Default Backup Profile','','',1);
]]></query>
</action>
<action table="#__ak_stats" canfail="0">
<condition type="missing" value="" />
<query><![CDATA[
CREATE TABLE `#__ak_stats` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`description` varchar(255) NOT NULL,
`comment` longtext,
`backupstart` timestamp NULL DEFAULT NULL,
`backupend` timestamp NULL DEFAULT NULL,
`status` enum('run','fail','complete') NOT NULL DEFAULT 'run',
`origin` varchar(30) NOT NULL DEFAULT 'backend',
`type` varchar(30) NOT NULL DEFAULT 'full',
`profile_id` bigint(20) NOT NULL DEFAULT '1',
`archivename` longtext,
`absolute_path` longtext,
`multipart` int(11) NOT NULL DEFAULT '0',
`tag` varchar(255) DEFAULT NULL,
`backupid` varchar(255) DEFAULT NULL,
`filesexist` tinyint(3) NOT NULL DEFAULT '1',
`remote_filename` varchar(1000) DEFAULT NULL,
`total_size` bigint(20) NOT NULL DEFAULT '0',
`frozen` tinyint(1) NOT NULL DEFAULT '0',
`instep` tinyint(1) NOT NULL DEFAULT '0',
PRIMARY KEY (`id`),
KEY `idx_fullstatus` (`filesexist`,`status`),
KEY `idx_stale` (`status`,`origin`)
) DEFAULT CHARACTER SET utf8;
]]></query>
</action>
<action table="#__ak_storage" canfail="0">
<condition type="missing" value="" />
<query><![CDATA[
CREATE TABLE `#__ak_storage` (
`tag` varchar(255) NOT NULL,
`lastupdate` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
`data` longtext,
PRIMARY KEY (`tag`)
) DEFAULT CHARACTER SET utf8;
]]></query>
</action>
<action table="#__ak_users" canfail="0">
<condition type="missing" value="" />
<query><![CDATA[
CREATE TABLE `#__ak_users` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`username` varchar(255) NOT NULL,
`name` varchar(255) NOT NULL,
`email` varchar(255) NOT NULL,
`password` varchar(255) NOT NULL,
`parameters` longtext,
PRIMARY KEY (`id`)
) DEFAULT CHARACTER SET utf8;
]]></query>
</action>
<!-- Add the backupid column to #__ak_stats if it's missing -->
<action table="#__ak_stats" canfail="1">
<condition type="missing" value="backupid" />
<query><![CDATA[
ALTER TABLE `#__ak_stats`
ADD COLUMN `backupid` varchar(255) DEFAULT NULL
AFTER `tag`
]]></query>
</action>
<!-- Add the quickicon column to #__ak_profiles if it's missing -->
<action table="#__ak_profiles" canfail="1">
<condition type="missing" value="quickicon" />
<query><![CDATA[
ALTER TABLE `#__ak_profiles`
ADD COLUMN `quickicon` tinyint(3) NOT NULL DEFAULT '1'
AFTER `filters`
]]></query>
</action>
<action table="#__akeeba_common" canfail="1">
<condition type="true" />
<query><![CDATA[
ALTER TABLE `#__akeeba_common` MODIFY COLUMN `key` varchar(190) COLLATE utf8_unicode_ci NOT NULL;
]]></query>
</action>
<!-- Add the frozen column to #__ak_stats if it's missing -->
<action table="#__ak_stats" canfail="1">
<condition type="missing" value="frozen" />
<query><![CDATA[
ALTER TABLE `#__ak_stats` ADD COLUMN `frozen` tinyint(1) DEFAULT '0';
]]></query>
</action>
<!-- Add the instep column to #__ak_stats if it's missing -->
<action table="#__ak_stats" canfail="1">
<condition type="missing" value="instep" />
<query><![CDATA[
ALTER TABLE `#__ak_stats` ADD COLUMN `instep` tinyint(1) DEFAULT '0';
]]></query>
</action>
<!-- Change datetime fields to nullable -->
<action table="#__ak_stats" canfail="1">
<condition type="nullable" value="backupstart" operator="not"/>
<query><![CDATA[
ALTER TABLE `#__ak_stats` MODIFY `backupstart` TIMESTAMP NULL DEFAULT NULL;
]]></query>
<query><![CDATA[
UPDATE `#__ak_stats` SET `backupstart` = NULL WHERE `backupstart` = '0000-00-00 00:00:00';
]]></query>
</action>
<action table="#__ak_stats" canfail="1">
<condition type="nullable" value="backupend" operator="not"/>
<query><![CDATA[
ALTER TABLE `#__ak_stats` MODIFY `backupend` TIMESTAMP NULL DEFAULT NULL;
]]></query>
<query><![CDATA[
UPDATE `#__ak_stats` SET `backupend` = NULL WHERE `backupend` = '0000-00-00 00:00:00';
]]></query>
</action>
<!-- Nuke any old record inside the ak_storage table -->
<action table="#__ak_storage" canfail="1">
<condition type="equals" operator="not" value="0"><![CDATA[
SELECT COUNT(*) FROM `#__ak_storage`;
]]></condition>
<query><![CDATA[
TRUNCATE TABLE `#__ak_storage`;
]]></query>
</action>
<!-- 7.5.6 :: Convert tables to InnoDB -->
<action table="#__ak_profiles" canfail="1">
<condition type="equals" operator="not" value="1"><![CDATA[
SELECT COUNT(*) FROM `INFORMATION_SCHEMA`.`TABLES` WHERE (`TABLE_NAME` = '#__ak_profiles') AND (`TABLE_SCHEMA` = DATABASE()) AND (`ENGINE` = 'InnoDB');
]]></condition>
<query><![CDATA[
ALTER TABLE `#__ak_profiles` ENGINE InnoDB;
]]></query>
</action>
<action table="#__ak_stats" canfail="1">
<condition type="equals" operator="not" value="1"><![CDATA[
SELECT COUNT(*) FROM `INFORMATION_SCHEMA`.`TABLES` WHERE (`TABLE_NAME` = '#__ak_stats') AND (`TABLE_SCHEMA` = DATABASE()) AND (`ENGINE` = 'InnoDB');
]]></condition>
<query><![CDATA[
ALTER TABLE `#__ak_stats` ENGINE InnoDB;
]]></query>
</action>
<action table="#__ak_storage" canfail="1">
<condition type="equals" operator="not" value="1"><![CDATA[
SELECT COUNT(*) FROM `INFORMATION_SCHEMA`.`TABLES` WHERE (`TABLE_NAME` = '#__ak_storage') AND (`TABLE_SCHEMA` = DATABASE()) AND (`ENGINE` = 'InnoDB');
]]></condition>
<query><![CDATA[
ALTER TABLE `#__ak_storage` ENGINE InnoDB;
]]></query>
</action>
</sql>
</schema>

View File

@@ -0,0 +1,71 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--~
~ @package solo
~ @copyright Copyright (c)2014-2022 Nicholas K. Dionysopoulos / Akeeba Ltd
~ @license GNU General Public License version 3, or later
-->
<schema>
<!-- Metadata -->
<meta>
<!-- Supported driver types -->
<drivers>
<driver>mysql</driver>
<driver>mysqli</driver>
</drivers>
</meta>
<!-- SQL commands to run on installation and update -->
<sql>
<action table="#__akeeba_common" canfail="1">
<condition type="missing" value="" operator="not"/>
<query><![CDATA[
ALTER TABLE `#__akeeba_common` MODIFY `key` VARCHAR(191) NOT NULL
]]></query>
<query><![CDATA[
ALTER TABLE `#__akeeba_common` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci
]]></query>
</action>
<action table="#__ak_params" canfail="1">
<condition type="missing" value="" operator="not"/>
<query><![CDATA[
ALTER TABLE `#__ak_params` MODIFY `tag` VARCHAR(191) NOT NULL
]]></query>
<query><![CDATA[
ALTER TABLE `#__ak_params` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci
]]></query>
</action>
<action table="#__ak_profiles" canfail="1">
<condition type="missing" value="" operator="not"/>
<query><![CDATA[
ALTER TABLE `#__ak_profiles` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci
]]></query>
</action>
<action table="#__ak_stats" canfail="1">
<condition type="missing" value="" operator="not"/>
<query><![CDATA[
ALTER TABLE `#__ak_stats` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci
]]></query>
</action>
<action table="#__ak_storage" canfail="1">
<condition type="missing" value="" operator="not"/>
<query><![CDATA[
ALTER TABLE `#__ak_storage` MODIFY `tag` VARCHAR(191) NOT NULL
]]></query>
<query><![CDATA[
ALTER TABLE `#__ak_storage` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci
]]></query>
</action>
<action table="#__ak_users" canfail="1">
<condition type="missing" value="" operator="not"/>
<query><![CDATA[
ALTER TABLE `#__ak_users` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci
]]></query>
</action>
</sql>
</schema>

View File

@@ -0,0 +1,102 @@
<?php
/**
* @package Usagestats
* @copyright Copyright (c)2014-2022 Nicholas K. Dionysopoulos / Akeeba Ltd
* @license GNU General Public License version 3, or later
*/
class AkeebaUsagestats
{
/**
* Unique identifier for the site, created from server variables
*
* @var string
*/
private $siteId;
/**
* Associative array of data being sent
*
* @var array
*/
private $data = [];
/**
* Remote url to upload the stats
*
* @var string
*/
private $remoteUrl = 'https://abrandnewsite.com/index.php';
/**
* Set the unique, anonymous site identifier
*
* @param string $siteId The site ID to set
*
* @return void
*/
public function setSiteId($siteId)
{
$this->siteId = $siteId;
}
/**
* Sets the value of a collected variable. Use NULL to unset it.
*
* @param string $key Variable name
* @param string $value Variable value
*/
public function setValue($key, $value)
{
$this->data[$key] = $value;
if (is_null($value))
{
unset($this->data[$key]);
}
}
/**
* Uploads collected data to the remote server
*
* @param bool $useIframe Should I create an iframe to upload data or should I use cURL/fopen?
*
* @return string|bool The HTML code if an iframe is requested or a boolean if we're using cURL/fopen
*/
public function sendInfo($useIframe = false)
{
// No site ID? Well, simply do nothing
if (!$this->siteId)
{
return '';
}
// First of all let's add the siteId
$this->setValue('sid', $this->siteId);
// Then let's create the url
$url = $this->remoteUrl . '?' . http_build_query($this->data);
// Should I create an iframe?
if ($useIframe)
{
return '<!-- Anonymous usage statistics collection for Akeeba software --><iframe style="display: none" src="' . $url . '"></iframe>';
}
// Do we have cURL installed?
if (
function_exists('curl_init')
&& function_exists('curl_setopt')
&& function_exists('curl_exec'))
{
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_TIMEOUT, 5);
return curl_exec($ch);
}
// We do not have cURL. Let's try with fopen instead.
return @fopen($url, 'r');
}
}