__ __ __ __ _____ _ _ _____ _ _ _ | \/ | \ \ / / | __ \ (_) | | / ____| | | | | | \ / |_ __\ V / | |__) | __ ___ ____ _| |_ ___ | (___ | |__ ___| | | | |\/| | '__|> < | ___/ '__| \ \ / / _` | __/ _ \ \___ \| '_ \ / _ \ | | | | | | |_ / . \ | | | | | |\ V / (_| | || __/ ____) | | | | __/ | | |_| |_|_(_)_/ \_\ |_| |_| |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1 if you need WebShell for Seo everyday contact me on Telegram Telegram Address : @jackleetFor_More_Tools:
<?php
namespace Nextend\Framework\Image;
use Nextend\Framework\Controller\Admin\AdminVisualManagerAjaxController;
use Nextend\Framework\Notification\Notification;
use Nextend\Framework\Request\Request;
class ControllerAjaxImage extends AdminVisualManagerAjaxController {
protected $type = 'image';
public function actionLoadVisualForImage() {
$this->validateToken();
$model = $this->getModel();
$image = Request::$REQUEST->getVar('image');
$visual = $model->getVisual($image);
if (!empty($visual)) {
$this->response->respond(array(
'visual' => $visual
));
} else {
if (($visual = $model->addVisual($image, ImageStorage::$emptyImage))) {
$this->response->respond(array(
'visual' => $visual
));
}
}
Notification::error(n2_('Unexpected error'));
$this->response->error();
}
public function actionAddVisual() {
$this->validateToken();
$image = Request::$REQUEST->getVar('image');
$this->validateVariable(!empty($image), 'image');
$model = $this->getModel();
if (($visual = $model->addVisual($image, Request::$REQUEST->getVar('value')))) {
$this->response->respond(array(
'visual' => $visual
));
}
Notification::error(n2_('Unexpected error'));
$this->response->error();
}
public function actionDeleteVisual() {
$this->validateToken();
$visualId = Request::$REQUEST->getInt('visualId');
$this->validateVariable($visualId > 0, 'image');
$model = $this->getModel();
if (($visual = $model->deleteVisual($visualId))) {
$this->response->respond(array(
'visual' => $visual
));
}
Notification::error(n2_('Not editable'));
$this->response->error();
}
public function actionChangeVisual() {
$this->validateToken();
$visualId = Request::$REQUEST->getInt('visualId');
$this->validateVariable($visualId > 0, 'image');
$model = $this->getModel();
if (($visual = $model->changeVisual($visualId, Request::$REQUEST->getVar('value')))) {
$this->response->respond(array(
'visual' => $visual
));
}
Notification::error(n2_('Unexpected error'));
$this->response->error();
}
public function getModel() {
return new ModelImage($this);
}
}| Name | Type | Size | Permission | Actions |
|---|---|---|---|---|
| Block | Folder | 0775 |
|
|
| Joomla | Folder | 0775 |
|
|
| AbstractPlatformImage.php | File | 184 B | 0664 |
|
| ControllerAjaxImage.php | File | 2.53 KB | 0664 |
|
| Image.php | File | 1.87 KB | 0664 |
|
| ImageEdit.php | File | 25.02 KB | 0664 |
|
| ImageManager.php | File | 1.53 KB | 0664 |
|
| ImageStorage.php | File | 3.28 KB | 0664 |
|
| ModelImage.php | File | 2.34 KB | 0664 |
|