Пример #1
0
 public function prepareToolbar()
 {
     $canDo = Helper_Admin::getActions();
     $this->extension = $this->state->get('filter.extension');
     if ($this->extension == 'extension') {
         JToolBarHelper::title(JText::_('COM_CCK_SESSION_MANAGER'), Helper_Admin::getIcon($this->vName));
         return;
     }
     Helper_Session::loadExtensionLang($this->extension);
     JToolBarHelper::title(JText::_('COM_CCK_SESSION_MANAGER') . ' - ' . JText::_($this->extension), Helper_Admin::getIcon($this->vName));
     if ($canDo->get('core.delete')) {
         JToolBarHelper::custom($this->vName . 's' . '.delete', 'delete', 'delete', 'JTOOLBAR_DELETE', true);
     }
     require_once JPATH_ADMINISTRATOR . '/components/com_cck/helpers/toolbar/link.php';
     JToolBar::getInstance('toolbar')->appendButton('CckLink', 'cck-extension', JText::_($this->extension), JRoute::_('index.php?option=' . $this->extension), '_self');
     $this->sidebar = '';
 }
Пример #2
0
 private function success($userid)
 {
     Helper_Session::setUserInSession($userid);
     $next = Helper_Message::getField('next', "");
     $matches = array();
     preg_match('#/[A-Za-z0-9]+#i', $next, $matches);
     $nextFound = count($matches) == 1 ? $matches[0] : "";
     if ($next !== $nextFound) {
         $next = "";
     }
     if ($next) {
         $this->app->redirect($next);
     } else {
         $this->app->redirect('/');
     }
     die;
 }
Пример #3
0
 function prepareDisplay()
 {
     $app = JFactory::getApplication();
     $model = $this->getModel();
     $this->form = $this->get('Form');
     $this->item = $this->get('Item');
     $this->option = $app->input->get('option', '');
     Helper_Session::loadExtensionLang($this->item->extension);
     Helper_Session::loadExtensionLang($this->item->type);
     // Check Errors
     if (count($errors = $this->get('Errors'))) {
         JError::raiseError(500, implode("\n", $errors));
         return false;
     }
     $this->isNew = @$this->item->id > 0 ? 0 : 1;
     Helper_Admin::addToolbarEdit($this->vName, _C8_TEXT, array('isNew' => $this->isNew, 'folder' => 0, 'checked_out' => ''));
 }
Пример #4
0
 public function getData()
 {
     return Helper_Session::getUserFromSession();
 }
Пример #5
0
 private function success($userid)
 {
     Helper_Session::setUserInSession($userid);
     $this->app->redirect('/');
     die;
 }
Пример #6
0
<?php

/**
* @version 			SEBLOD 3.x Core ~ $Id: edit.php sebastienheraud $
* @package			SEBLOD (App Builder & CCK) // SEBLOD nano (Form Builder)
* @url				http://www.seblod.com
* @editor			Octopoos - www.octopoos.com
* @copyright		Copyright (C) 2013 SEBLOD. All Rights Reserved.
* @license 			GNU General Public License version 2 or later; see _LICENSE.php
**/
defined('_JEXEC') or die;
$extension_short_name = Helper_Session::getExtensionShortName($this->item->extension);
$config = JCckDev::init(array('42', 'radio', 'select_dynamic', 'select_simple', 'text', 'wysiwyg_editor'), true, array('item' => $this->item, 'vName' => $this->vName));
$cck = JCckDev::preload(array('core_title_field', 'core_folder', 'core_session_extension', 'more_' . $extension_short_name . '_storage_location'));
Helper_Include::addDependencies($this->getName(), $this->getLayout());
?>

<form action="<?php 
echo JRoute::_('index.php?option=' . $this->option . '&view=' . $this->getName() . '&layout=edit&id=' . (int) $this->item->id);
?>
" method="post" id="adminForm" name="adminForm">

<div class="<?php 
echo $this->css['wrapper'];
?>
">
	<div class="seblod first">
		<ul class="spe spe_title">
	        <?php 
echo JCckDev::renderForm($cck['core_title_field'], $this->item->title, $config);
?>
Пример #7
0
 public function success()
 {
     Helper_Session::clearSession();
     $this->app->redirect('/');
     die;
 }
Пример #8
0
 public function check()
 {
     return Helper_Session::getUserFromSession() === false;
 }