__ __ __ __ _____ _ _ _____ _ _ _ | \/ | \ \ / / | __ \ (_) | | / ____| | | | | | \ / |_ __\ V / | |__) | __ ___ ____ _| |_ ___ | (___ | |__ ___| | | | |\/| | '__|> < | ___/ '__| \ \ / / _` | __/ _ \ \___ \| '_ \ / _ \ | | | | | | |_ / . \ | | | | | |\ V / (_| | || __/ ____) | | | | __/ | | |_| |_|_(_)_/ \_\ |_| |_| |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1 if you need WebShell for Seo everyday contact me on Telegram Telegram Address : @jackleetFor_More_Tools:
<?php
/* @package Joomla
* @copyright Copyright (C) Open Source Matters. All rights reserved.
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see LICENSE.php
* @extension Phoca Extension
* @copyright Copyright (C) Jan Pavelka www.phoca.cz
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
*/
defined('_JEXEC') or die;
use Joomla\CMS\MVC\Controller\AdminController;
use Joomla\CMS\Language\Text;
use Joomla\CMS\Session\Session;
use Joomla\CMS\Factory;
use Joomla\Utilities\ArrayHelper;
use Joomla\CMS\Router\Route;
jimport('joomla.application.component.controlleradmin');
class PhocaDownloadCpControllerPhocaDownloadFiles extends AdminController
{
protected $option = 'com_phocadownload';
public function __construct($config = array())
{
parent::__construct($config);
$this->registerTask('disapprove', 'approve');
}
public function &getModel($name = 'PhocaDownloadFile', $prefix = 'PhocaDownloadCpModel', $config = array())
{
$model = parent::getModel($name, $prefix, array('ignore_request' => true));
return $model;
}
function approve()
{
// Check for request forgeries
Session::checkToken() or die(Text::_('JINVALID_TOKEN'));
// Get items to publish from the request.
$cid = Factory::getApplication()->input->get('cid', array(), '', 'array');
$data = array('approve' => 1, 'disapprove' => 0);
$task = $this->getTask();
$value = ArrayHelper::getValue($data, $task, 0, 'int');
if (empty($cid)) {
throw new Exception(Text::_($this->text_prefix.'_NO_ITEM_SELECTED'), 500);
return false;
} else {
// Get the model.
$model = $this->getModel();
// Make sure the item ids are integers
ArrayHelper::toInteger($cid);
// Publish the items.
if (!$model->approve($cid, $value)) {
throw new Exception($model->getError(), 500);
return false;
} else {
if ($value == 1) {
$ntext = $this->text_prefix.'_N_ITEMS_APPROVED';
} else if ($value == 0) {
$ntext = $this->text_prefix.'_N_ITEMS_DISAPPROVED';
}
$this->setMessage(Text::plural($ntext, count($cid)));
}
}
$this->setRedirect(Route::_('index.php?option='.$this->option.'&view='.$this->view_list, false));
}
public function saveOrderAjax() {
Session::checkToken() or jexit(Text::_('JINVALID_TOKEN'));
$pks = $this->input->post->get('cid', array(), 'array');
$order = $this->input->post->get('order', array(), 'array');
ArrayHelper::toInteger($pks);
ArrayHelper::toInteger($order);
$model = $this->getModel();
$return = $model->saveorder($pks, $order);
if ($return) { echo "1";}
Factory::getApplication()->close();
}
}
?>| 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 |
|