本文整理汇总了PHP中JUtility类的典型用法代码示例。如果您正苦于以下问题:PHP JUtility类的具体用法?PHP JUtility怎么用?PHP JUtility使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了JUtility类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: testParseAttributes
/**
* Test parseAttributes
*
* @param string $tag tag to be parsed
* @param array $expected resulting array of attribute values
*
* @return void
*
* @dataProvider casesParseAttributes
* @covers JUtility::parseAttributes
*/
public function testParseAttributes($tag, $expected)
{
$this->assertThat(
JUtility::parseAttributes($tag),
$this->equalTo($expected)
);
}
开发者ID:robschley,项目名称:joomla-platform,代码行数:18,代码来源:JUtilityTest.php
示例2: sendEmail
function sendEmail()
{
// Check for request forgeries
JRequest::checkToken() or jexit('Invalid Token');
$post = JRequest::get('post');
$this->addModelPath(JPATH_COMPONENT_ADMINISTRATOR . DS . 'models');
$model = $this->getModel('location');
$location = $model->getData();
$contact_name = $post['contact_name'];
$contact_email = $post['contact_email'];
$contact_message = $post['contact_message'];
if ($contact_name == null || $contact_message == null) {
echo JText::_('Please enter a name and message to send.');
return false;
} else {
if (false) {
return false;
} else {
JUtility::sendMail($contact_email, $contact_name, $location->email, 'Contact Message for: ' . $location->name, $contact_message, 0, null, null, null, $contact_email, $contact_name);
echo JText::_('Message Sent');
return true;
}
}
return false;
}
开发者ID:notWood,项目名称:webmapplus,代码行数:25,代码来源:controller.php
示例3: save
function save()
{
// Check for request forgeries
JRequest::checkToken() or die('COM_JOOMLEAGUE_GLOBAL_INVALID_TOKEN');
$cid = JRequest::getInt("cid", 0);
$post = JRequest::get('post');
if ($cid > 0) {
$club =& JTable::getInstance("Club", "Table");
$club->load($cid);
$club->bind($post);
$params =& JComponentHelper::getParams('com_joomleague');
if ($club->store() && $params->get('cfg_edit_club_info_update_notify') == "1") {
$db = JFactory::getDBO();
$user = JFactory::getUser();
$query = "SELECT email\n FROM #__users \n WHERE usertype = 'Super Administrator' \n OR usertype = 'Administrator'";
$db->setQuery($query);
$to = $db->loadResultArray();
$subject = addslashes(sprintf(JText::_("COM_JOOMLEAGUE_ADMIN_EDIT_CLUB_INFO_SUBJECT"), $club->name));
$message = addslashes(sprintf(JText::_("COM_JOOMLEAGUE_ADMIN_EDIT_CLUB_INFO_MESSAGE"), $user->name, $club->name));
$message .= $this->_getShowClubInfoLink();
JUtility::sendMail('', '', $to, $subject, $message);
}
}
$this->setRedirect($this->_getShowClubInfoLink());
}
开发者ID:santas156,项目名称:joomleague-2-komplettpaket,代码行数:25,代码来源:clubinfo.php
示例4: onAfterInitialise
function onAfterInitialise()
{
$app = JFactory::getApplication();
// No remember me for admin
if ($app->isAdmin()) {
return;
}
$user = JFactory::getUser();
if ($user->get('guest')) {
jimport('joomla.utilities.utility');
$hash = JUtility::getHash('JLOGIN_REMEMBER');
if ($str = JRequest::getString($hash, '', 'cookie', JREQUEST_ALLOWRAW | JREQUEST_NOTRIM)) {
jimport('joomla.utilities.simplecrypt');
//Create the encryption key, apply extra hardening using the user agent string
$key = JUtility::getHash(@$_SERVER['HTTP_USER_AGENT']);
$crypt = new JSimpleCrypt($key);
$str = $crypt->decrypt($str);
$options = array();
$options['silent'] = true;
if (!$app->login(@unserialize($str), $options)) {
$config = JFactory::getConfig();
$cookie_domain = $config->get('cookie_domain', '');
$cookie_path = $config->get('cookie_path', '/');
// Clear the remember me cookie
setcookie(JUtility::getHash('JLOGIN_REMEMBER'), false, time() - 86400, $cookie_path, $cookie_domain);
}
}
}
}
开发者ID:carmerin,项目名称:cesae-web,代码行数:29,代码来源:remember.php
示例5: onAfterRoute
public function onAfterRoute()
{
$application = JFactory::getApplication();
if($application->isSite())
{
switch(JRequest::getVar('option', null, 'method', 'cmd'))
{
case 'com_user':
JRequest::setVar('option', 'com_users', 'get');
switch(JRequest::getVar('view', null, 'method', 'cmd'))
{
case 'login':
if(!JFactory::getUser()->guest) {
JRequest::setVar('view', 'logout', 'get');
}
break;
case 'remind':
JRequest::setVar('view', 'remind', 'get');
break;
case 'register':
JRequest::setVar('view', 'user', 'get');
JRequest::setVar('layout', 'register', 'get');
break;
case 'user':
if(JRequest::getVar('task', null, 'get', 'cmd') == 'edit') {
JRequest::setVar('layout', 'form', 'get');
}
}
switch(JRequest::getVar('task', null, 'method', 'cmd'))
{
case 'login':
JRequest::setVar('view', 'login', 'get');
JRequest::setVar('action', 'login', 'post');
JRequest::setVar('password', JRequest::getVar('passwd', null, 'method', 'none'), 'post');
break;
}
break;
}
if(JRequest::getMethod() == 'POST')
{
$token = JUtility::getToken();
if(JRequest::getVar($token, null, 'post', 'alnum') == 1) {
JRequest::setVar('_token', $token, 'post');
}
}
}
}
开发者ID:raeldc,项目名称:com_learn,代码行数:60,代码来源:legacy.php
示例6: display
public function display()
{
$this->assign('sitebase', trim(JURI::root(), '/'));
$this->assign('token', JUtility::getToken());
$this->assign('container', $this->getModel()->getState()->container);
return parent::display();
}
开发者ID:janssit,项目名称:www.ondernemenddiest.be,代码行数:7,代码来源:html.php
示例7: delete
public function delete($id = null)
{
// Include dependencies
jimport('joomla.application.component.controller');
jimport('joomla.form.form');
jimport('joomla.database.table');
require_once JPATH_ADMINISTRATOR . '/components/com_categories/controllers/categories.php';
require_once JPATH_ADMINISTRATOR . '/components/com_categories/models/category.php';
JForm::addFormPath(JPATH_ADMINISTRATOR . '/components/com_categories/models/forms/');
// Fake parameters
$_POST['task'] = 'trash';
$_REQUEST['task'] = 'trash';
$_REQUEST[JUtility::getToken()] = 1;
$_POST[JUtility::getToken()] = 1;
JFactory::getLanguage()->load('com_categories', JPATH_ADMINISTRATOR);
$controller = new CategoriesControllerCategories();
try {
$controller->execute('trash');
} catch (JException $e) {
$success = false;
$controller->set('messageType', 'error');
$controller->set('message', $e->getMessage());
}
if ($controller->getError()) {
$response = $this->getErrorResponse(400, $controller->getError());
} elseif ('error' == $controller->get('messageType')) {
$response = $this->getErrorResponse(400, $controller->get('message'));
} else {
$response = $this->getSuccessResponse(200, $controller->get('message'));
}
$this->plugin->setResponse($response);
}
开发者ID:rcorral,项目名称:com_api-plugins,代码行数:32,代码来源:categories.php
示例8: cria_html
function cria_html()
{
// adiciona a biblioteca juri
jimport('joomla.environment.uri');
// verifica se a urlbase foi adicionada
if (!is_null($this->url_base)) {
$u =& JURI::getInstance($this->url_base);
} else {
$u =& JURI::getInstance();
}
$links = '';
$paginas_adm_select = '';
$select = '';
// loop nas páginas
for ($i = 1; $i <= $this->total_paginas; $i++) {
// adiciona a var na url
$u->setVar($this->get_var_pagina, $i);
// retorna o html tag a
$class = $i == $this->pagina_atual ? ' class="atual"' : '';
$links .= sprintf('<a href="%s"%s>%d</a> ', JRoute::_($u->toString()), $class, $i);
// retorna o html select
$selected = $i == $this->pagina_atual ? ' selected="selected"' : '';
// cria o select para o site
$select .= sprintf('<option value="%s" %s>Página %d</option> ', JRoute::_($u->toString()), $selected, $i);
// cria o select para o adm
$paginas_adm_select .= sprintf('<option value="%s" %s>Página %d</option> ', $i, $selected, $i);
}
// paginas para o adm
$query = JRequest::get('post');
unset($query[JUtility::getToken()], $query['funcao'], $query['method'], $query['class'], $query['pagina'], $query['programa'], $query['template'], $query['processID']);
$u->setQuery($query);
$u->setVar($this->get_var_pagina, '');
$js = sprintf('<script type="text/javascript">$(function(){ $(\'select#%s\').change(function(){ eDesktop.dialog.load({programa: "%s", processID: "%s", pagina: "%s", query: "%s"+ $(this).val() }); });});</script>', $this->get_var_pagina, JRequest::getvar('programa'), JRequest::getvar('processID'), JRequest::getvar('pagina'), $u->getQuery());
$paginas_adm_select = sprintf('<select name="%s" id="%s">%s</select>%s ', $this->get_var_pagina, $this->get_var_pagina, $paginas_adm_select, $js);
$this->html['paginas.adm.select'] = $paginas_adm_select;
// páginas para o site
$js = sprintf('<script type="text/javascript">$(function(){ $(\'select#%s\').change(function(){window.location = $(this).val();});});</script>', $this->get_var_pagina);
$select = sprintf('<select name="%s" id="%s">%s</select>%s', $this->get_var_pagina, $this->get_var_pagina, $select, $js);
$this->html['paginas.links'] = $links;
$this->html['paginas.select'] = $select;
// ordem para site
$order = '';
$this->order_atual = JRequest::getVar($this->get_var_order);
if (count($this->orders)) {
foreach ($this->orders as $k => $v) {
$u->setVar($this->get_var_pagina, 1);
$u->setVar($this->get_var_order, $k);
$selected = $k == $this->order_atual ? ' selected="selected"' : '';
$order .= sprintf('<option value="%s" %s>%s</option> ', JRoute::_($u->toString()), $selected, $v['label']);
}
$js = sprintf('<script type="text/javascript">$(function(){ $(\'select#%s\').change(function(){window.location = $(this).val();});});</script>', $this->get_var_order);
$order = sprintf('<select name="%s" id="%s">%s</select>%s', $this->get_var_order, $this->get_var_order, $order, $js);
//
$this->html['order.select'] = $order;
}
foreach ($this->html as $k => $v) {
$key = str_replace('.', '_', $k);
$this->html[$key] = $v;
}
}
开发者ID:eliasrosa,项目名称:eJoomla,代码行数:60,代码来源:paginacao.php
示例9: display
/**
* Display the view
*/
public function display($tpl = null)
{
$this->items = $this->get('Items');
$this->pagination = $this->get('Pagination');
$this->state = $this->get('State');
$this->enabled = $this->state->params->get('enabled');
// Check for errors. @todo this has to be queed up and converted to JSON
if (count($errors = $this->get('Errors'))) {
JError::raiseError(500, implode("\n", $errors));
return false;
}
$r = new JObject;
$r->token = JUtility::getToken(true);
$r->items = array();
foreach ($this->items as $i => $item) {
$rItem = new JObject;
$rItem->index = $i + 1 + $this->pagination->limitstart;
$rItem->search_term = $item->search_term;
if ($this->state->get('filter.results')) {
$rItem->results = (int) $item->returns;
} else {
$rItem->results = JText::_('COM_SEARCH_NO_RESULTS');
}
$r->items[$i] = $rItem;
}
echo json_encode($r);
}
开发者ID:realityking,项目名称:JAJAX,代码行数:33,代码来源:view.json.php
示例10: alreadyVoted
function alreadyVoted($id)
{
$mainframe = JFactory::getApplication();
$cookieName = JUtility::getHash($mainframe->getName() . 'poll' . $id);
$voted = JRequest::getVar($cookieName, '0', 'COOKIE', 'INT');
return $voted;
}
开发者ID:vuchannguyen,项目名称:dayhoc,代码行数:7,代码来源:helper.php
示例11: display
function display($tpl = null)
{
// Frontpage hack
$this->addTemplatePath(JPATH_COMPONENT_ADMINISTRATOR . DS . 'views' . DS . 'link' . DS . 'tmpl');
// Only allow "component" template
JRequest::setVar('tmpl', 'component');
// JFactory
$user =& JFactory::getUser();
$config =& JFactory::getConfig();
$doc =& JFactory::getDocument();
$lingo =& JFactory::getLanguage();
// Include styles
$doc->addStyleSheet(LINKR_ASSETS . 'css/modal.css?' . LINKR_VERSION_INC);
// Template override
global $mainframe;
$tmpl = $mainframe->getTemplate();
if (file_exists(JPATH_BASE . DS . 'templates' . DS . $tmpl . DS . 'linkr.css')) {
$doc->addStyleSheet(JURI::base() . 'templates/' . $tmpl . '/linkr.css');
} elseif (file_exists(JPATH_BASE . DS . 'templates' . DS . $tmpl . DS . 'css' . DS . 'linkr.css')) {
$doc->addStyleSheet(JURI::base() . 'templates/' . $tmpl . '/css/linkr.css');
}
// Editor name, request endpoint, document base
$editor = JRequest::getString('e_name', 'text');
$rUrl = JURI::base() . 'index.php?option=com_linkr&view=request&' . JUtility::getToken() . '=1';
// Include scripts
JHTML::_('behavior.mootools');
$unc = LinkrHelper::getParam('compress', 1) ? '.js' : '-UCP.js';
$doc->addScript(LINKR_ASSETS . 'js/helper' . $unc . '?' . LINKR_VERSION_INC);
$doc->addScriptDeclaration('var Linkr=new LinkrAPI(' . '[' . implode(',', explode('.', LINKR_VERSION_READ)) . '],' . '"' . $rUrl . '",' . '"' . $editor . '",' . '"' . JURI::root() . '",' . '[' . '"' . JRequest::getWord('mode', 'squeezebox') . '",' . '"' . $lingo->getTag() . '",' . '"' . LinkrHelper::UTF8Encode(JText::_('MISSING_TEXT', true)) . '",' . '"' . LinkrHelper::UTF8Encode(JText::_('IMG_ANCHOR', true)) . '",' . '"' . LINKR_ASSETS . 'img/",' . $user->get('aid') . ']' . ');' . 'var LinkrHelper=Linkr;');
// Frontend fix
if (LinkrHelper::isSite()) {
//$doc->setBase(LinkrHelper::getLinkrUrl($editor));
}
// References
$this->assign('links', $this->get('Links'));
$this->assign('tools', $this->get('ToolLinks'));
// Localize text
if ($text = $this->get('L18N')) {
$l18n = array();
foreach ($text as $k => $v) {
$l18n[] = '["' . $k . '","' . $v . '"]';
}
$doc->addScriptDeclaration('Linkr.setL18N([' . implode(',', $l18n) . ']);');
}
// 3rd party javascript
if ($js = $this->get('Scripts')) {
$doc->addScriptDeclaration($js);
}
// Load single link
$load = '';
$inc = $this->get('IncludedLinks');
if (!$this->tools['count'] && $this->links['count'] == 1) {
$load = 'Linkr.__fr=function(){' . $inc[$this->links['name'][0]] . '};';
} elseif (!$this->links['count'] && $this->tools['count'] == 1) {
$load = 'Linkr.__fr=function(){' . $inc[$this->tools['name'][0]] . '};';
}
// Fire "onLoad" event
$doc->addScriptDeclaration('window.addEvent("domready",function(){' . $load . 'Linkr.fireEvent("onLoad");' . '});');
parent::display($tpl);
}
开发者ID:jtresca,项目名称:nysurveyor,代码行数:60,代码来源:view.html.php
示例12: view
/**
* Show the form in the admin
*
* @return null
*/
public function view()
{
$document = JFactory::getDocument();
$model = JModel::getInstance('Form', 'FabrikFEModel');
$viewType = $document->getType();
$this->setPath('view', COM_FABRIK_FRONTEND . '/views');
$viewLayout = JRequest::getCmd('layout', 'default');
$view = $this->getView('form', $viewType, '');
$view->setModel($model, true);
$view->isMambot = $this->isMambot;
// Set the layout
$view->setLayout($viewLayout);
// @TODO check for cached version
JToolBarHelper::title(JText::_('COM_FABRIK_MANAGER_FORMS'), 'forms.png');
if (in_array(JRequest::getCmd('format'), array('raw', 'csv', 'pdf'))) {
$view->display();
} else {
$user = JFactory::getUser();
$post = JRequest::get('post');
$cacheid = serialize(array(JRequest::getURI(), $post, $user->get('id'), get_class($view), 'display', $this->cacheId));
$cache = JFactory::getCache('com_fabrik', 'view');
ob_start();
$cache->get($view, 'display', $cacheid);
$contents = ob_get_contents();
ob_end_clean();
$token = JUtility::getToken();
$search = '#<input type="hidden" name="[0-9a-f]{32}" value="1" />#';
$replacement = '<input type="hidden" name="' . $token . '" value="1" />';
echo preg_replace($search, $replacement, $contents);
}
FabrikAdminHelper::addSubmenu(JRequest::getWord('view', 'lists'));
}
开发者ID:rogeriocc,项目名称:fabrik,代码行数:37,代码来源:form.php
示例13: parseLang
public function parseLang($vars)
{
if (Mijosef::getConfig()->multilang == 0) {
return;
}
if (empty($vars['lang'])) {
$lang = JRequest::getWord('lang', '');
if (empty($lang)) {
return;
}
$vars['lang'] = $lang;
}
$languages = JLanguageHelper::getLanguages('sef');
$lang_code = $languages[$vars['lang']]->lang_code;
// if current language, don't bother
if ($lang_code == JFactory::getLanguage()->getTag()) {
//self::checkHomepage($vars['lang']);
return;
}
// Create a cookie
$conf = JFactory::getConfig();
$cookie_domain = $conf->get('config.cookie_domain', '');
$cookie_path = $conf->get('config.cookie_path', '/');
setcookie(JUtility::getHash('language'), $lang_code, time() + 365 * 86400, $cookie_path, $cookie_domain);
// set the request var
JRequest::setVar('language', $lang_code);
// set current language
jimport('joomla.language.language');
$conf = JFactory::getConfig();
$debug = $conf->get('debug_lang');
$lang = JLanguage::getInstance($lang_code, $debug);
JFactory::$language = $lang;
self::$_lang = $vars['lang'];
}
开发者ID:affiliatelk,项目名称:ecc,代码行数:34,代码来源:language.php
示例14: sendOnPageLoad
function sendOnPageLoad($max = 5)
{
$db = EasyBlogHelper::db();
$config = EasyBlogHelper::getConfig();
$sendHTML = $config->get('main_mailqueuehtmlformat', 0);
// Delete existing mails that has already been sent.
$query = 'DELETE FROM ' . $db->nameQuote('#__easyblog_mailq') . ' WHERE ' . $db->nameQuote('status') . '=' . $db->Quote(1) . ' AND DATEDIFF(NOW(), `created`) >= 7';
$db->setQuery($query);
$db->Query();
$query = 'SELECT `id` FROM `#__easyblog_mailq` WHERE `status` = 0';
$query .= ' ORDER BY `created` ASC';
$query .= ' LIMIT ' . $max;
$db->setQuery($query);
$result = $db->loadObjectList();
if (!empty($result)) {
foreach ($result as $mail) {
$mailq = EasyBlogHelper::getTable('MailQueue', 'Table');
$mailq->load($mail->id);
// update the status to 1 == proccessed
$mailq->status = 1;
if ($mailq->store()) {
// Send emails out.
if (EasyBlogHelper::getJoomlaVersion() >= '3.0') {
$mail = JFactory::getMailer();
$mail->sendMail($mailq->mailfrom, $mailq->fromname, $mailq->recipient, $mailq->subject, $mailq->body, $sendHTML);
} else {
JUtility::sendMail($mailq->mailfrom, $mailq->fromname, $mailq->recipient, $mailq->subject, $mailq->body, $sendHTML);
}
}
}
}
}
开发者ID:Tommar,项目名称:vino2,代码行数:32,代码来源:mailqueue.php
示例15: _tokenValue
protected function _tokenValue($force = false)
{
if (empty($this->_token_value) || $force) {
$this->_token_value = JUtility::getToken($force);
}
return parent::_tokenValue($force);
}
开发者ID:stonyyi,项目名称:anahita,代码行数:7,代码来源:form.php
示例16: display
function display($tpl=null)
{
$r = new JObject();
$r->token = JUtility::getToken(true);
echo json_encode($r);
}
开发者ID:realityking,项目名称:JAJAX,代码行数:7,代码来源:view.json.php
示例17: display
public function display()
{
$state = $this->getModel()->getState();
$folders = KFactory::get('com://admin/files.controller.folder')
->container($state->container)
->tree(true)
->browse();
$this->assign('folders', $folders);
$config = KFactory::get('com://admin/files.model.configs')->getItem();
// prepare an extensions array for fancyupload
$extensions = $config->upload_extensions;
$this->assign('allowed_extensions', $extensions);
$this->assign('maxsize' , $config->upload_maxsize);
$this->assign('path' , $state->container->relative_path);
$this->assign('sitebase' , ltrim(JURI::root(true), '/'));
$this->assign('token' , JUtility::getToken());
$this->assign('session' , JFactory::getSession());
if (!$this->editor) {
$this->assign('editor', '');
}
return parent::display();
}
开发者ID:raeldc,项目名称:com_learn,代码行数:29,代码来源:html.php
示例18: _actionRequest
protected function _actionRequest(KCommandContext $context)
{
if (!($email = KRequest::get('post.email', 'email'))) {
$this->setRedirect(KRequest::referrer(), JText::_('INVALID_EMAIL_ADDRESS'), 'error');
return false;
}
$user = $this->getService('com://site/users.model.users')->set('email', $email)->getItem();
if (!$user->id || $user->block) {
$this->setRedirect(KRequest::referrer(), JText::_('COULD_NOT_FIND_USER'), 'error');
return false;
}
$helper = $this->getService('com://site/users.helper.password');
$token = $helper->getHash($helper->getRandom());
$salt = $helper->getSalt($token);
$user->activation = md5($token . $salt) . ':' . $salt;
$user->save();
$configuration = JFactory::getConfig();
$site_name = $configuration->getValue('sitename');
$site_url = KRequest::url()->get(KHttpUrl::SCHEME | KHttpUrl::HOST | KHttpUrl::PORT);
$url = $site_url . JRoute::_('index.php?option=com_users&view=reset&layout=confirm');
$from_email = $configuration->getValue('mailfrom');
$from_name = $configuration->getValue('fromname');
$subject = JText::sprintf('PASSWORD_RESET_CONFIRMATION_EMAIL_TITLE', $site_name);
$body = JText::sprintf('PASSWORD_RESET_CONFIRMATION_EMAIL_TEXT', $site_name, $token, $url);
if (!JUtility::sendMail($from_email, $from_name, $email, $subject, $body)) {
$this->setRedirect(KRequest::referrer(), JText::_('ERROR_SENDING_CONFIRMATION_EMAIL'), 'error');
return false;
} else {
$this->_redirect = 'index.php?option=com_users&view=reset&layout=confirm';
}
}
开发者ID:JSWebdesign,项目名称:intranet-platform,代码行数:31,代码来源:reset.php
示例19: doSSOLogout
/**
* Method for logging out with Magento (Single Sign On)
*
* @param string $username
* @return bool|exit
*/
public static function doSSOLogout($username = null)
{
// Abort if the input is not valid
if (empty($username)) {
return false;
}
// Get system variables
$application = JFactory::getApplication();
$session = JFactory::getSession();
// Determine the application
$application_name = $application->isAdmin() ? 'admin' : 'frontend';
// Get the security token
$token = method_exists('JSession', 'getFormToken') ? JSession::getFormToken() : JUtility::getToken();
// Set the redirection URL
if ($application_name == 'admin') {
$redirect = JURI::current();
} else {
$redirect = MageBridgeUrlHelper::current();
}
// Construct the URL
$arguments = array('sso=logout', 'app=' . $application_name, 'redirect=' . base64_encode($redirect), 'userhash=' . MageBridgeEncryptionHelper::encrypt($username), 'token=' . $token);
$url = MageBridgeModelBridge::getInstance()->getMagentoBridgeUrl() . '?' . implode('&', $arguments);
// Redirect the browser to Magento
MageBridgeModelDebug::getInstance()->notice("SSO: Logout of '{$username}' from " . $application_name);
$application->redirect($url);
return true;
}
开发者ID:apiceweb,项目名称:MageBridgeCore,代码行数:33,代码来源:sso.php
示例20: getOnClick
public function getOnClick()
{
$id = KRequest::get('get.id', 'int');
$token = JUtility::getToken();
$json = "{method:'post', url:'index.php?option=com_create&view=component&id={$id}', formelem:'adminForm', params:{action:'generate', _token:'{$token}'}}";
return 'new KForm(' . $json . ').submit();';
}
开发者ID:rpijpers,项目名称:Create,代码行数:7,代码来源:generate.php
注:本文中的JUtility类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论