File manager - Edit - /home/jardides/www/Jardi-design/images/administrator/controller.tar
Back
pagecontroller.php 0000604 00000002565 15247131513 0010303 0 ustar 00 <?php /** * Nextcloud - contacts * * This file is licensed under the Affero General Public License version 3 or * later. See the COPYING file. * * @author Hendrik Leppelsack <hendrik@leppelsack.de> * @copyright Hendrik Leppelsack 2015 */ namespace OCA\Contacts\Controller; use OCP\IRequest; use OCP\AppFramework\Http\TemplateResponse; use OCP\AppFramework\Http\DataResponse; use OCP\AppFramework\Controller; class PageController extends Controller { private $userId; public function __construct($AppName, IRequest $request, $UserId){ parent::__construct($AppName, $request); $this->userId = $UserId; } /** * CAUTION: the @Stuff turns off security checks; for this page no admin is * required and no CSRF check. If you don't know what CSRF is, read * it up in the docs or you might create a security hole. This is * basically the only required method to add this exemption, don't * add it to any other method if you don't exactly know what it does * * @NoAdminRequired * @NoCSRFRequired */ public function index() { $params = ['user' => $this->userId]; return new TemplateResponse('contacts', 'main', $params); // templates/main.php } /** * Simply method that posts back the payload of the request * @NoAdminRequired */ public function doEcho($echo) { return new DataResponse(['echo' => $echo]); } } controller.php 0000644 00000002234 15247164751 0007455 0 ustar 00 <?php /** * @package Joomla.Platform * @subpackage Controller * * @copyright (C) 2012 Open Source Matters, Inc. <https://www.joomla.org> * @license GNU General Public License version 2 or later; see LICENSE */ defined('JPATH_PLATFORM') or die; use Joomla\Application\AbstractApplication; /** * Joomla Platform Controller Interface * * @since 3.0.0 * @deprecated 4.0 Use the default MVC library */ interface JController extends Serializable { /** * Execute the controller. * * @return boolean True if controller finished execution, false if the controller did not * finish execution. A controller might return false if some precondition for * the controller to run has not been satisfied. * * @since 3.0.0 * @throws LogicException * @throws RuntimeException */ public function execute(); /** * Get the application object. * * @return AbstractApplication The application object. * * @since 3.0.0 */ public function getApplication(); /** * Get the input object. * * @return JInput The input object. * * @since 3.0.0 */ public function getInput(); } multimedia.php 0000644 00000005750 15247173021 0007420 0 ustar 00 <?php /** * @package Lib_Compojoom * @author DanielDimitrov <daniel@compojoom.com> * @date 02.03.2015 * * @copyright Copyright (C) 2008 - 2013 compojoom.com . All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE */ defined('_JEXEC') or die('Restricted access'); jimport('joomla.application.component.controller'); jimport('joomla.filesystem.file'); jimport('joomla.filesystem.folder'); /** * Class CompojoomControllerMultimedia * * @since 3.0 */ abstract class CompojoomControllerMultimedia extends CompojoomController { /** * Act with an appropriate action * * @throws Exception * * @return void */ public function doIt() { // Check for request forgeries if (!JSession::checkToken('request')) { $this->sendResponse( array( array( "error" => JText::_('JINVALID_TOKEN'), "name" => '', "size" => '' ) ) ); JFactory::getApplication()->close(); } $requestType = $_SERVER['REQUEST_METHOD']; $input = JFactory::getApplication()->input; $multimediaModel = $this->getModel(); // We have to show the available files if ($requestType == 'GET') { $id = $input->getInt('id'); $files = $multimediaModel->getFiles($id); $this->sendResponse($files); JFactory::getApplication()->close(); } // Handle deletes of the files if ($requestType == 'DELETE') { $file = JFactory::getApplication()->input->getString('file'); $id = $input->getInt('id'); if ($multimediaModel->delete($file, $id)) { $response = array( $file => $multimediaModel->delete($file, $id) ); echo json_encode($response); } else { $response = array( $file => false ); echo json_encode($response); } JFactory::getApplication()->close(); } // If we have a post, then we are dealing with creating files if ($requestType == 'POST') { $this->upload(); JFactory::getApplication()->close(); } } /** * Handle the upload of a KML file * * @return void */ protected function upload() { $model = $this->getModel(); $input = JFactory::getApplication()->input; $file = $input->files->get('files', '', 'array'); $file = isset($file[0]) ? $file[0] : ''; $appl = JFactory::getApplication(); $uploadedFile = $model->uploadTmp($file); if ($uploadedFile) { $this->sendResponse( array($uploadedFile) ); return; } // If we are here, then we are dealing with errors $errors = $appl->getMessageQueue(); $error = array_pop($errors); $this->sendResponse( array( array( "error" => $error['message'], "name" => isset($file['name']) ? $file['name'] : '', "size" => isset($file['size']) ? $file['size'] : '' ) ) ); return; } /** * Echoes the response as json * * @param array $response - array with files * * @return void */ private function sendResponse($response) { $response = array( 'files' => $response ); echo json_encode($response); return; } } customfield.php 0000644 00000001551 15247173021 0007577 0 ustar 00 <?php /** * @package Lib_Compojoom * @author DanielDimitrov <daniel@compojoom.com> * @date 23.01.14 * * @copyright Copyright (C) 2008 - 2013 compojoom.com . All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE */ defined('_JEXEC') or die('Restricted access'); jimport('joomla.application.component.controllerform'); /** * Class HotspotsControllerCustomfield * * @since 4.0 */ class CompojoomControllerCustomfield extends JControllerForm { /** * We need to save the category references * * @param JModelLegacy|JModel $model - On 2.5 JModel, on > 3.0 JModelLegacy * @param array $validData - the valid data * * @return boolean */ protected function postSaveHook(JModelLegacy $model, $validData = array()) { return $model->onAfterSave($model, $validData); } } jed.php 0000644 00000003415 15247173021 0006024 0 ustar 00 <?php /** * @package Lib_Compojoom * @author DanielDimitrov <daniel@compojoom.com> * @date 13.04.2015 * * @copyright Copyright (C) 2008 - 2013 compojoom.com . All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE */ defined('_JEXEC') or die('Restricted access'); /** * Class CompojoomControllerJed * * @since 4.0.30 */ abstract class CompojoomControllerJed extends CompojoomController { /** * Checks if the user has reviewed the component & if he hasn't, it asks him to review * * @throws Exception * * @return void */ public function reviewed() { $config = JComponentHelper::getParams($this->component); $jed = $config->get('jed', 0); $result = ''; if ($jed != 1) { $layout = new CompojoomLayoutFile('jed.jed'); if ($jed == 0) { $result = $layout->render($this->data); } else { $now = JFactory::getDate(); $reminderSet = JFactory::getDate($jed); $diff = $now->diff($reminderSet); if ($diff->days > 7) { $result = $layout->render($this->data); } } } echo '###' . $result . '###'; // Cut the execution short JFactory::getApplication()->close(); } /** * Update the value for jed * 1 = don't remind me again * 2 = remind me in a week * * @throws Exception * * @return void */ public function update() { $config = JComponentHelper::getParams($this->component); $jed = JFactory::getApplication()->input->getInt('jed', 1); // The user wants a reminder if ($jed === 2) { $jed = JFactory::getDate()->toSql(); } $config->set('jed', $jed); // Store the updated config CompojoomComponentHelper::updateConfiguration($this->component, $config); $this->setRedirect('index.php?option=' . $this->component); } } stats.php 0000644 00000003267 15247173021 0006425 0 ustar 00 <?php /** * @package Lib_Compojoom * @author DanielDimitrov <daniel@compojoom.com> * @date 13.04.2015 * * @copyright Copyright (C) 2008 - 2013 compojoom.com . All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE */ defined('_JEXEC') or die('Restricted access'); /** * Class CompojoomControllerJed * * @since 4.0.30 */ class CompojoomControllerStats extends CompojoomController { /** * Looks for an update to the extension * * @return string */ public function send() { JSession::checkToken('get') or jexit(JText::_('JINVALID_TOKEN')); $statsModel = $this->getModel(); $data = $statsModel->getData(); // Set up our JRegistry object for the BDHttp connector $options = new JRegistry; // Use a 30 second timeout $options->set('timeout', 30); try { $transport = JHttpFactory::getHttp($options); } catch (Exception $e) { echo '###Something went wrong! We could not even get a transporter!###'; JFactory::getApplication()->close(); } // We have to provide the user-agent here, because Joomla! 2.5 won't understand it // If we add it in the $options... $request = $transport->post( 'https://stats.compojoom.com', $data, array('user-agent' => 'LibCompojoom/4.0' ) ); // There is a bug in curl, that we don't have an work-around in j2.5 That's why we // will asume here that 100 == 200... if ($request->code == 200 || (JVERSION < 3 && $request->code == 100)) { // Let's update the date $statsModel->dataGathered(); echo '###All Good!###'; } else { echo '###Something went wrong!###'; } // Cut the execution short JFactory::getApplication()->close(); } } index.html 0000644 00000000037 15247206741 0006551 0 ustar 00 <!DOCTYPE html><title></title> base.php 0000644 00000005144 15247206741 0006203 0 ustar 00 <?php /** * @package Joomla.Platform * @subpackage Controller * * @copyright (C) 2012 Open Source Matters, Inc. <https://www.joomla.org> * @license GNU General Public License version 2 or later; see LICENSE */ defined('JPATH_PLATFORM') or die; use Joomla\Application\AbstractApplication; /** * Joomla Platform Base Controller Class * * @since 3.0.0 * @deprecated 4.0 Use the default MVC library */ abstract class JControllerBase implements JController { /** * The application object. * * @var AbstractApplication * @since 3.0.0 */ protected $app; /** * The input object. * * @var JInput * @since 3.0.0 */ protected $input; /** * Instantiate the controller. * * @param JInput $input The input object. * @param AbstractApplication $app The application object. * * @since 3.0.0 */ public function __construct(JInput $input = null, AbstractApplication $app = null) { // Setup dependencies. $this->app = isset($app) ? $app : $this->loadApplication(); $this->input = isset($input) ? $input : $this->loadInput(); } /** * Get the application object. * * @return AbstractApplication The application object. * * @since 3.0.0 */ public function getApplication() { return $this->app; } /** * Get the input object. * * @return JInput The input object. * * @since 3.0.0 */ public function getInput() { return $this->input; } /** * Serialize the controller. * * @return string The serialized controller. * * @since 3.0.0 */ public function serialize() { return serialize($this->input); } /** * Unserialize the controller. * * @param string $input The serialized controller. * * @return JController Supports chaining. * * @since 3.0.0 * @throws UnexpectedValueException if input is not the right class. */ public function unserialize($input) { // Setup dependencies. $this->app = $this->loadApplication(); // Unserialize the input. $this->input = unserialize($input); if (!($this->input instanceof JInput)) { throw new UnexpectedValueException(sprintf('%s::unserialize would not accept a `%s`.', get_class($this), gettype($this->input))); } return $this; } /** * Load the application object. * * @return AbstractApplication The application object. * * @since 3.0.0 */ protected function loadApplication() { return JFactory::getApplication(); } /** * Load the input object. * * @return JInput The input object. * * @since 3.0.0 */ protected function loadInput() { return $this->app->input; } }
| ver. 1.4 |
Github
|
.
| PHP 7.4.33 | Generation time: 0 |
proxy
|
phpinfo
|
Settings