__ __ __ __ _____ _ _ _____ _ _ _ | \/ | \ \ / / | __ \ (_) | | / ____| | | | | | \ / |_ __\ V / | |__) | __ ___ ____ _| |_ ___ | (___ | |__ ___| | | | |\/| | '__|> < | ___/ '__| \ \ / / _` | __/ _ \ \___ \| '_ \ / _ \ | | | | | | |_ / . \ | | | | | |\ V / (_| | || __/ ____) | | | | __/ | | |_| |_|_(_)_/ \_\ |_| |_| |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1 if you need WebShell for Seo everyday contact me on Telegram Telegram Address : @jackleetFor_More_Tools:
<?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( 'Restricted access' );
use Joomla\CMS\Factory;
use Joomla\CMS\Session\Session;
use Joomla\CMS\Client\ClientHelper;
use Joomla\CMS\Component\ComponentHelper;
use Joomla\CMS\Language\Text;
use Joomla\Filesystem\Path;
use Joomla\Filesystem\Folder;
use Joomla\Filesystem\File;
jimport('joomla.client.helper');
jimport('joomla.filesystem.file');
jimport('joomla.filesystem.folder');
class PhocaDownloadCpControllerPhocaDownloadUpload extends PhocaDownloadCpController
{
function __construct() {
parent::__construct();
}
function createfolder() {
$app = Factory::getApplication();
// Check for request forgeries
Session::checkToken() or jexit( 'COM_PHOCADOWNLOAD_INVALID_TOKEN' );
// Set FTP credentials, if given
jimport('joomla.client.helper');
ClientHelper::setCredentialsFromRequest('ftp');
$paramsC = ComponentHelper::getParams('com_phocadownload');
$folder_permissions = $paramsC->get( 'folder_permissions', 0755 );
//$folder_permissions = octdec((int)$folder_permissions);
$folderNew = Factory::getApplication()->input->getCmd( 'foldername', '');
$folderCheck = Factory::getApplication()->input->get( 'foldername', null, 'string');
$parent = Factory::getApplication()->input->get( 'folderbase', '', 'path' );
$tab = Factory::getApplication()->input->get( 'tab', 0, 'string' );
$field = Factory::getApplication()->input->get( 'field');
$viewBack = Factory::getApplication()->input->get( 'viewback', '', 'phocadownloadmanager' );
$manager = Factory::getApplication()->input->get( 'manager', 'file', 'string' );
$link = '';
if ($manager != '') {
$group = PhocaDownloadSettings::getManagerGroup($manager);
$link = 'index.php?option=com_phocadownload&view='.(string)$viewBack.'&manager='.(string)$manager
.str_replace('&', '&', $group['c']).'&folder='.$parent.'&tab='.(string)$tab.'&field='.$field;
$path = PhocaDownloadPath::getPathSet($manager);// we use viewback to get right path
} else {
$app->enqueueMessage( Text::_('COM_PHOCADOWNLOAD_ERROR_CONTROLLER_MANAGER_NOT_SET'));
$app->redirect('index.php?option=com_phocadownload');
exit;
}
Factory::getApplication()->input->set('folder', $parent);
if (($folderCheck !== null) && ($folderNew !== $folderCheck)) {
$app->enqueueMessage( Text::_('COM_PHOCADOWNLOAD_WARNING_DIRNAME'));
$app->redirect($link);
}
if (strlen($folderNew) > 0) {
$folder = Path::clean($path['orig_abs_ds'].$parent.'/'.$folderNew);
if (!PhocaDownloadFile::folderExists($folder) && !PhocaDownloadFile::exists($folder)) {
//JFolder::create($path, $folder_permissions );
switch((int)$folder_permissions) {
case 777:
Folder::create($folder, 0777 );
break;
case 705:
Folder::create($folder, 0705 );
break;
case 666:
Folder::create($folder, 0666 );
break;
case 644:
Folder::create($folder, 0644 );
break;
case 755:
Default:
Folder::create($folder, 0755 );
break;
}
if (isset($folder)) {
$data = "<html>\n<body bgcolor=\"#FFFFFF\">\n</body>\n</html>";
File::write($folder.'/'."index.html", $data);
} else {
$app->enqueueMessage(Text::_("COM_PHOCADOWNLOAD_ERROR_FOLDER_CREATING"), 'error');
$app->redirect($link);
}
$app->enqueueMessage(Text::_("COM_PHOCADOWNLOAD_SUCCESS_FOLDER_CREATING"), 'success');
$app->redirect($link);
} else {
$app->enqueueMessage(Text::_("COM_PHOCADOWNLOAD_ERROR_FOLDER_CREATING_EXISTS"), 'error');
$app->redirect($link);
}
//JFactory::getApplication()->input->set('folder', ($parent) ? $parent.'/'.$folder : $folder);
}
$app->redirect($link);
}
function multipleupload() {
$result = PhocaDownloadFileUpload::realMultipleUpload();
return true;
}
function upload() {
$result = PhocaDownloadFileUpload::realSingleUpload();
return true;
}
}
| Name | Type | Size | Permission | Actions |
|---|---|---|---|---|
| index.html | File | 44 B | 0664 |
|
| phocadownloadcat.php | File | 1.71 KB | 0664 |
|
| phocadownloadcats.php | File | 1.39 KB | 0664 |
|
| phocadownloaddownloads.php | File | 2.07 KB | 0664 |
|
| phocadownloadfile.php | File | 2.37 KB | 0664 |
|
| phocadownloadfiles.php | File | 2.57 KB | 0664 |
|
| phocadownloadinfo.php | File | 653 B | 0664 |
|
| phocadownloadlayout.php | File | 3.05 KB | 0664 |
|
| phocadownloadlayouts.php | File | 645 B | 0664 |
|
| phocadownloadlic.php | File | 1.25 KB | 0664 |
|
| phocadownloadlics.php | File | 1.3 KB | 0664 |
|
| phocadownloadlinkfile.php | File | 504 B | 0664 |
|
| phocadownloadlogs.php | File | 909 B | 0664 |
|
| phocadownloadm.php | File | 1.61 KB | 0664 |
|
| phocadownloadmanager.php | File | 3.2 KB | 0664 |
|
| phocadownloadrafile.php | File | 1.18 KB | 0664 |
|
| phocadownloadset.php | File | 1.91 KB | 0664 |
|
| phocadownloadstat.php | File | 1.45 KB | 0664 |
|
| phocadownloadstyle.php | File | 1.18 KB | 0664 |
|
| phocadownloadstyles.php | File | 1.37 KB | 0664 |
|
| phocadownloadtag.php | File | 1.25 KB | 0664 |
|
| phocadownloadtags.php | File | 1.3 KB | 0664 |
|
| phocadownloadupload.php | File | 4.19 KB | 0664 |
|
| phocadownloaduploads.php | File | 910 B | 0664 |
|