primo commit
This commit is contained in:
@ -0,0 +1,55 @@
|
||||
<?php
|
||||
/**
|
||||
* @package ShackDefaultFiles
|
||||
* @contact www.joomlashack.com, help@joomlashack.com
|
||||
* @copyright 2015-2021 Joomlashack.com. All rights reserved
|
||||
* @license https://www.gnu.org/licenses/gpl.html GNU/GPL
|
||||
*
|
||||
* This file is part of ShackDefaultFiles.
|
||||
*
|
||||
* ShackDefaultFiles is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* ShackDefaultFiles is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with ShackDefaultFiles. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
use Joomla\CMS\HTML\HTMLHelper;
|
||||
|
||||
defined('_JEXEC') or die();
|
||||
|
||||
?>
|
||||
<div class="row-fluid">
|
||||
<div id="footer" class="span12">
|
||||
<div>
|
||||
<a href="https://www.joomlashack.com">
|
||||
<?php
|
||||
echo HTMLHelper::_(
|
||||
'image',
|
||||
$this->option . '/joomlashack-logo.png',
|
||||
'Joomlashack',
|
||||
['width' => '150'],
|
||||
true
|
||||
);
|
||||
?>
|
||||
</a>
|
||||
</div>
|
||||
<br/>
|
||||
<div>
|
||||
Powered by
|
||||
<?php echo HTMLHelper::_(
|
||||
'link',
|
||||
'https://www.joomlashack.com',
|
||||
'Joomlashack',
|
||||
['target' => '_blank']
|
||||
); ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -0,0 +1,62 @@
|
||||
<?php
|
||||
/**
|
||||
* @package ShackInstaller
|
||||
* @contact www.joomlashack.com, help@joomlashack.com
|
||||
* @copyright 2016-2023 Joomlashack.com. All rights reserved
|
||||
* @license https://www.gnu.org/licenses/gpl.html GNU/GPL
|
||||
*
|
||||
* This file is part of ShackInstaller.
|
||||
*
|
||||
* ShackInstaller is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* ShackInstaller is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with ShackInstaller. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
use Alledia\Installer\AbstractScript;
|
||||
use Alledia\Installer\Extension\Generic;
|
||||
use Alledia\Installer\Extension\Licensed;
|
||||
|
||||
defined('_JEXEC') or die();
|
||||
|
||||
/**
|
||||
* @var AbstractScript $this
|
||||
* @var string $type
|
||||
* @var Licensed $license
|
||||
* @var string $name
|
||||
* @var string $configPath
|
||||
* @var string $customFooterPath
|
||||
* @var string $extensionPath
|
||||
* @var Generic $licensesManagerExtension
|
||||
* @var string $string
|
||||
* @var string $path
|
||||
*/
|
||||
|
||||
?>
|
||||
<div class="joomlashack-wrapper">
|
||||
<div class="joomlashack-content">
|
||||
<h2><?php echo $this->welcomeMessage; ?></h2>
|
||||
|
||||
<?php
|
||||
if (is_file(__DIR__ . '/default_custom.php')) :
|
||||
include __DIR__ . '/default_custom.php';
|
||||
endif;
|
||||
|
||||
if ($license->isPro()) :
|
||||
include __DIR__ . '/default_license.php';
|
||||
endif;
|
||||
|
||||
include __DIR__ . "/default_info.php";
|
||||
?>
|
||||
|
||||
<?php echo $this->footer; ?>
|
||||
</div>
|
||||
</div>
|
||||
@ -0,0 +1,115 @@
|
||||
<?php
|
||||
/**
|
||||
* @package ShackInstaller
|
||||
* @contact www.joomlashack.com, help@joomlashack.com
|
||||
* @copyright 2016-2023 Joomlashack.com. All rights reserved
|
||||
* @license https://www.gnu.org/licenses/gpl.html GNU/GPL
|
||||
*
|
||||
* This file is part of ShackInstaller.
|
||||
*
|
||||
* ShackInstaller is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* ShackInstaller is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with ShackInstaller. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
use Alledia\Installer\AbstractScript;
|
||||
use Alledia\Installer\Extension\Generic;
|
||||
use Alledia\Installer\Extension\Licensed;
|
||||
use Joomla\CMS\Language\Text;
|
||||
|
||||
defined('_JEXEC') or die();
|
||||
|
||||
/**
|
||||
* @var AbstractScript $this
|
||||
* @var string $type
|
||||
* @var Licensed $license
|
||||
* @var string $name
|
||||
* @var string $configPath
|
||||
* @var string $customFooterPath
|
||||
* @var string $extensionPath
|
||||
* @var Generic $licensesManagerExtension
|
||||
* @var string $string
|
||||
* @var string $path
|
||||
*/
|
||||
|
||||
?>
|
||||
<div class="joomlashack-details-container">
|
||||
<a href="javascript:void(0);" id="joomlashack-installer-footer-toggler">
|
||||
<?php echo Text::_('LIB_SHACKINSTALLER_SHOW_DETAILS'); ?>
|
||||
</a>
|
||||
|
||||
<div id="joomlashack-installer-footer" style="display: none;">
|
||||
<div class="joomlashack-license">
|
||||
<?php echo Text::sprintf('LIB_SHACKINSTALLER_RELEASE_V', (string)$this->manifest->version); ?>
|
||||
</div>
|
||||
<br>
|
||||
<?php if (!empty($this->manifest->alledia->relatedExtensions)) : ?>
|
||||
<table class="joomlashack-related-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th colspan="2"><?php echo Text::_('LIB_SHACKINSTALLER_RELATED_EXTENSIONS'); ?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php foreach ($this->relatedExtensionFeedback as $data) : ?>
|
||||
<tr>
|
||||
<td><?php echo Text::_($data['name']); ?></td>
|
||||
<td>
|
||||
<?php
|
||||
$messages = [$data['message']];
|
||||
|
||||
if (isset($data['publish']) && $data['publish']) {
|
||||
$messages[] = Text::_('LIB_SHACKINSTALLER_PUBLISHED');
|
||||
}
|
||||
|
||||
if (isset($data['ordering'])) {
|
||||
$messages[] = Text::sprintf('LIB_SHACKINSTALLER_SORTED', $data['ordering']);
|
||||
}
|
||||
|
||||
$messages = implode(', ', $messages);
|
||||
echo $messages;
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
</tbody>
|
||||
</table>
|
||||
<?php endif; ?>
|
||||
|
||||
<div class="joomlashack-license">
|
||||
<?php
|
||||
echo Text::sprintf(
|
||||
'LIB_SHACKINSTALLER_LICENSED_AS',
|
||||
$this->getName(),
|
||||
'<a href="https://www.gnu.org/licenses/gpl-3.0">GNU/GPL v3.0</a>'
|
||||
);
|
||||
?>.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<script>
|
||||
(function() {
|
||||
let footer = document.getElementById('joomlashack-installer-footer'),
|
||||
toggle = document.getElementById('joomlashack-installer-footer-toggler');
|
||||
|
||||
if (footer && toggle) {
|
||||
toggle.addEventListener('click', function(event) {
|
||||
event.preventDefault();
|
||||
|
||||
footer.style.display = 'block';
|
||||
this.style.display = 'none';
|
||||
});
|
||||
}
|
||||
})();
|
||||
</script>
|
||||
@ -0,0 +1,158 @@
|
||||
<?php
|
||||
/**
|
||||
* @package ShackInstaller
|
||||
* @contact www.joomlashack.com, help@joomlashack.com
|
||||
* @copyright 2016-2023 Joomlashack.com. All rights reserved
|
||||
* @license https://www.gnu.org/licenses/gpl.html GNU/GPL
|
||||
*
|
||||
* This file is part of ShackInstaller.
|
||||
*
|
||||
* ShackInstaller is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* ShackInstaller is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with ShackInstaller. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
use Alledia\Installer\AbstractScript;
|
||||
use Alledia\Installer\Extension\Generic;
|
||||
use Alledia\Installer\Extension\Licensed;
|
||||
use Joomla\CMS\Language\Text;
|
||||
use Joomla\CMS\Uri\Uri;
|
||||
|
||||
defined('_JEXEC') or die();
|
||||
|
||||
/**
|
||||
* @var AbstractScript $this
|
||||
* @var string $type
|
||||
* @var Licensed $license
|
||||
* @var string $name
|
||||
* @var string $configPath
|
||||
* @var string $customFooterPath
|
||||
* @var string $extensionPath
|
||||
* @var Generic $licensesManagerExtension
|
||||
* @var string $string
|
||||
* @var string $path
|
||||
*/
|
||||
|
||||
$licenseUpdate = Uri::root() . '/administrator/index.php?plugin=system_osmylicensesmanager&task=license.save';
|
||||
|
||||
if ($this->isLicensesManagerInstalled) :
|
||||
?>
|
||||
<div class="joomlashack-license-form">
|
||||
<?php
|
||||
if (!empty($this->licenseKey)) :
|
||||
?>
|
||||
<a href="" class="joomlashack-installer-change-license-button btn btn-success">
|
||||
<?php echo Text::_('LIB_SHACKINSTALLER_CHANGE_LICENSE_KEY'); ?>
|
||||
</a>
|
||||
<?php endif; ?>
|
||||
|
||||
<div id="joomlashack-installer-license-panel">
|
||||
<input type="text"
|
||||
name="joomlashack-license-keys"
|
||||
id="joomlashack-license-keys"
|
||||
value="<?php echo $this->licenseKey; ?>"
|
||||
class="form-control"
|
||||
placeholder="<?php echo Text::_('LIB_SHACKINSTALLER_LICENSE_KEYS_PLACEHOLDER'); ?>"/>
|
||||
|
||||
<p class="joomlashack-empty-key-msg">
|
||||
<?php echo Text::_('LIB_SHACKINSTALLER_MSG_LICENSE_KEYS_EMPTY'); ?>
|
||||
<a href="https://www.joomlashack.com/account/key/" target="_blank">
|
||||
<?php echo Text::_('LIB_SHACKINSTALLER_I_DONT_REMEMBER_MY_KEY'); ?>
|
||||
</a>
|
||||
</p>
|
||||
|
||||
<a id="joomlashack-license-save-button"
|
||||
class="btn btn-success"
|
||||
href="#">
|
||||
<?php echo Text::_('LIB_SHACKINSTALLER_SAVE_LICENSE_KEY'); ?>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div id="joomlashack-installer-license-success" style="display: none">
|
||||
<p><?php echo Text::_('LIB_SHACKINSTALLER_LICENSE_KEY_SUCCESS'); ?></p>
|
||||
</div>
|
||||
|
||||
<div id="joomlashack-installer-license-error" style="display: none">
|
||||
<p><?php echo Text::_('LIB_SHACKINSTALLER_LICENSE_KEY_ERROR'); ?></p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
(function() {
|
||||
let panel = document.getElementById('joomlashack-installer-license-panel'),
|
||||
updateButtons = document.getElementsByClassName('joomlashack-installer-change-license-button'),
|
||||
saveButton = document.getElementById('joomlashack-license-save-button');
|
||||
|
||||
if (panel) {
|
||||
if (updateButtons.length > 0) {
|
||||
panel.style.display = 'none';
|
||||
|
||||
Array.from(updateButtons).forEach(function(button) {
|
||||
button.addEventListener('click', function(event) {
|
||||
event.preventDefault();
|
||||
|
||||
panel.style.display = 'block';
|
||||
this.style.display = 'none';
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
if (saveButton) {
|
||||
saveButton.addEventListener('click', function(event) {
|
||||
event.preventDefault();
|
||||
|
||||
let request = new XMLHttpRequest(),
|
||||
data = new FormData(),
|
||||
keyField = document.getElementById('joomlashack-license-keys')
|
||||
|
||||
data.append('license-keys', keyField.value)
|
||||
request.onreadystatechange = function(data) {
|
||||
if (this.readyState === XMLHttpRequest.DONE) {
|
||||
try {
|
||||
if (this.status === 200) {
|
||||
let result = JSON.parse(this.response),
|
||||
success = document.getElementById('joomlashack-installer-license-success'),
|
||||
error = document.getElementById('joomlashack-installer-license-error');
|
||||
|
||||
panel.style.display = 'none';
|
||||
|
||||
if (result.success) {
|
||||
success.style.display = 'block';
|
||||
|
||||
} else {
|
||||
error.style.display = 'block';
|
||||
}
|
||||
|
||||
} else {
|
||||
error.style.display = 'block';
|
||||
}
|
||||
|
||||
} catch (e) {
|
||||
panel.style.display = 'none';
|
||||
error.style.display = 'block';
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
request.open('POST', '<?php echo $licenseUpdate; ?>');
|
||||
request.send(data);
|
||||
});
|
||||
}
|
||||
}
|
||||
})();
|
||||
</script>
|
||||
|
||||
<?php else : ?>
|
||||
<div class="error">
|
||||
<?php echo Text::_('LIB_SHACKINSTALLER_LICENSE_KEYS_MANAGER_REQUIRED'); ?>
|
||||
</div>
|
||||
<?php endif;
|
||||
Reference in New Issue
Block a user