File manager - Edit - /home/verseaumee/ptitsanes/plugins/user/solidres/components/com_solidres/views/myprofile/view.html.php
Back
<?php /*------------------------------------------------------------------------ Solidres - Hotel booking extension for Joomla ------------------------------------------------------------------------ @Author Solidres Team @Website http://www.solidres.com @Copyright Copyright (C) 2013 - 2019 Solidres. All Rights Reserved. @License GNU General Public License version 3, or later ------------------------------------------------------------------------*/ defined('_JEXEC') or die; use Joomla\CMS\Router\Route; use Joomla\CMS\HTML\HTMLHelper; use Joomla\CMS\Toolbar\Toolbar; use Joomla\CMS\Toolbar\ToolbarHelper; use Joomla\CMS\Language\Text; use Joomla\CMS\Factory as CMSFactory; /** * View to edit a coupon in front end * * @package Solidres * @subpackage MyProfile * @since 0.6.0 */ class SolidresViewMyProfile extends SRViewLegacy { protected $state; protected $form; protected $returnPage; protected $id; protected $config; public function display($tpl = null) { $user = CMSFactory::getUser(); $app = CMSFactory::getApplication(); if ($user->guest) { $return = JUri::getInstance()->toString(); $app->redirect(Route::_('index.php?option=com_users&view=login&return=' . base64_encode($return), false)); return false; } $this->state = $this->get('State'); $this->form = $this->getForm('Form'); $this->returnPage = $this->getModel()->getReturnPage(); $this->id = $this->form->getValue('id'); $doc = CMSFactory::getDocument(); $language = CMSFactory::getLanguage(); $language->load('com_solidres', JPATH_ADMINISTRATOR . '/components/com_solidres', null, 1); $doc->addScriptDeclaration(" Solidres.jQuery(function($) { $('.country_select').change(function() { $.ajax({ url : 'index.php?option=com_solidres&format=json&task=states' + Solidres.context + '.find&id=' + $(this).val(), success : function(html) { $('.state_select').empty().html(html); } }); }); }); "); if ($errors = $this->get('Errors')) { JError::raiseError(500, implode("\n", $errors)); return false; } $this->config = JComponentHelper::getParams('com_solidres'); $this->showPoweredByLink = $this->config->get('show_solidres_copyright', '1'); $options = ['relative' => true, 'version' => SRVersion::getHashVersion()]; HTMLHelper::_('stylesheet', 'com_solidres/assets/main.min.css', $options); HTMLHelper::_('stylesheet', 'plg_solidres_hub/assets/hub.min.css', $options); SRHtml::_('jquery.datepicker'); $this->addToolbar(); SRLayoutHelper::addIncludePath(SRPlugin::getSitePath('user').'/layouts'); parent::display($tpl); } /** * Add the page title and toolbar. * * @since 1.6 */ protected function addToolbar() { JLoader::register('Joomla\\CMS\\Toolbar\\Toolbar', JPATH_LIBRARIES . '/src/Toolbar/Toolbar.php'); JLoader::register('Joomla\\CMS\\Toolbar\\ToolbarHelper', JPATH_LIBRARIES . '/src/Toolbar/ToolbarHelper.php'); HTMLHelper::_('behavior.tooltip'); SRHtml::_('jquery.validate'); ToolbarHelper::apply('myprofile.apply', 'JToolbar_Apply'); $bar = Toolbar::getInstance(); $html = []; $onClick = 'if(confirm(\'' . Text::_('SR_API_KEY_GENERATE_CONFIRM') . '\')) Joomla.submitbutton(\'myprofile.generateKeys\')'; $html[] = '<button type="button" class="btn btn-primary btn-sm btn-small" onclick="' . $onClick . '">'; $html[] = ' <i class="fa fa-key"></i> ' . Text::_('SR_API_GENERATE_KEYS'); $html[] = '</button>'; $bar->appendButton('Custom', join("\n", $html), 'generateKeys'); ToolbarHelper::cancel('myprofile.cancel', 'JToolbar_Close'); } }
| ver. 1.4 |
Github
|
.
| PHP 8.5.7 | Generation time: 0 |
proxy
|
phpinfo
|
Settings