示例#1
0
文件: view.php 项目: kidaa30/lojinha
 * Name: Sigrid Suski & Radek Suski, Sigsiu.NET GmbH
 * Email: sobi[at]sigsiu.net
 * Url: http://www.Sigsiu.NET
 * @copyright Copyright (C) 2006 - 2014 Sigsiu.NET GmbH (http://www.sigsiu.net). All rights reserved.
 * @license GNU/GPL Version 3
 * This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License version 3
 * as published by the Free Software Foundation, and under the additional terms according section 7 of GPL v3.
 * See http://www.gnu.org/licenses/gpl.html and http://sobipro.sigsiu.net/licenses.
 * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
 * $Date: 2015-02-04 18:50:21 +0100 (Wed, 04 Feb 2015) $
 * $Revision: 49 $
 * $Author: szymon $
 */
defined('_JEXEC') || die('Direct Access to this location is not allowed.');
SPLoader::loadView('section');
/**
 * @author Radek Suski
 * @version 1.0
 * @created 04-Apr-2011 10:13:08
 */
class SPEntriesDJMTView extends SPSectionView
{
    public function getEntires()
    {
        $data = array();
        $entries = $this->get('entries');
        $params = $this->get('params');
        if (count($entries)) {
            $this->loadNonStaticData($entries);
            foreach ($entries as $eid) {
示例#2
0
 * @author
 * Name: Sigrid Suski & Radek Suski, Sigsiu.NET GmbH
 * Email: sobi[at]sigsiu.net
 * Url: http://www.Sigsiu.NET
 * @copyright Copyright (C) 2006 - 2015 Sigsiu.NET GmbH (http://www.sigsiu.net). All rights reserved.
 * @license GNU/LGPL Version 3
 * This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License version 3 as published by the Free Software Foundation, and under the additional terms according section 7 of GPL v3.
 * See http://www.gnu.org/licenses/lgpl.html and http://sobipro.sigsiu.net/licenses.
 * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
 * $Date: 2015-02-19 13:24:35 +0100 (Thu, 19 Feb 2015) $
 * $Revision: 4387 $
 * $Author: Radek Suski $
 * $HeadURL: file:///opt/svn/SobiPro/Component/branches/SobiPro-1.1/Site/lib/views/view.php $
 */
defined('SOBIPRO') || exit('Restricted access');
SPLoader::loadView('interface');
/**
 * @author Radek Suski
 * @version 1.0
 * @created 14-Jan-2009 2:44:34 PM
 */
abstract class SPFrontView extends SPObject implements SPView
{
    /**
     * @var array
     */
    protected $_attr = array();
    /**
     * @var array
     */
    protected $_config = array();
示例#3
0
 * @author
 * Name: Sigrid Suski & Radek Suski, Sigsiu.NET GmbH
 * Email: sobi[at]sigsiu.net
 * Url: http://www.Sigsiu.NET
 * @copyright Copyright (C) 2006 - 2015 Sigsiu.NET GmbH (http://www.sigsiu.net). All rights reserved.
 * @license GNU/LGPL Version 3
 * This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License version 3 as published by the Free Software Foundation, and under the additional terms according section 7 of GPL v3.
 * See http://www.gnu.org/licenses/lgpl.html and http://sobipro.sigsiu.net/licenses.
 * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
 * $Date: 2015-02-19 13:24:35 +0100 (Thu, 19 Feb 2015) $
 * $Revision: 4387 $
 * $Author: Radek Suski $
 * $HeadURL: file:///opt/svn/SobiPro/Component/branches/SobiPro-1.1/Site/lib/views/adm/field.php $
 */
defined('SOBIPRO') || exit('Restricted access');
SPLoader::loadView('view', true);
/**
 * Design:
 * @author Radek Suski
 * @version 1.2
 * @created 10-Jan-2009 4:41:41 PM
 */
class SPFieldAdmView extends SPAdmView
{
    private $_templates = array();
    /**
     */
    public function display()
    {
        switch (trim($this->get('task'))) {
            case 'list':
示例#4
0
文件: entry.php 项目: pelloq1/SobiPro
 * @package: SobiPro Library
 * @author
 * Name: Sigrid Suski & Radek Suski, Sigsiu.NET GmbH
 * Email: sobi[at]sigsiu.net
 * Url: https://www.Sigsiu.NET
 * @copyright Copyright (C) 2006 - 2015 Sigsiu.NET GmbH (https://www.sigsiu.net). All rights reserved.
 * @license GNU/LGPL Version 3
 * This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License version 3
 * as published by the Free Software Foundation, and under the additional terms according section 7 of GPL v3.
 * See http://www.gnu.org/licenses/lgpl.html and https://www.sigsiu.net/licenses.
 *
 * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
 */
defined('SOBIPRO') || exit('Restricted access');
SPLoader::loadView('view');
/**
 * @author Radek Suski
 * @version 1.1
 * @created 10-Jan-2009 5:15:02 PM
 */
class SPEntryView extends SPFrontView implements SPView
{
    public function display()
    {
        $this->_task = $this->get('task');
        switch ($this->get('task')) {
            case 'edit':
            case 'add':
                $this->edit();
                break;
示例#5
0
 * @package: SobiPro Library
 * @author
 * Name: Sigrid Suski & Radek Suski, Sigsiu.NET GmbH
 * Email: sobi[at]sigsiu.net
 * Url: https://www.Sigsiu.NET
 * @copyright Copyright (C) 2006 - 2015 Sigsiu.NET GmbH (https://www.sigsiu.net). All rights reserved.
 * @license GNU/LGPL Version 3
 * This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License version 3
 * as published by the Free Software Foundation, and under the additional terms according section 7 of GPL v3.
 * See http://www.gnu.org/licenses/lgpl.html and https://www.sigsiu.net/licenses.
 *
 * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
 */
defined('SOBIPRO') || exit('Restricted access');
SPLoader::loadView('config', true);
/**
 * @author Radek Suski
 * @version 1.0
 * @created 10-Jun-2010 17:09:48
 */
class SPAdmTemplateView extends SPConfigAdmView
{
    public function display()
    {
        switch ($this->get('task')) {
            case 'edit':
                $this->edit();
                break;
        }
        parent::display();
示例#6
0
文件: entry.php 项目: pelloq1/SobiPro
 /**
  * Details view
  * @return void
  */
 private function details()
 {
     /* determine template package */
     $tplPackage = Sobi::Cfg('section.template', SPC::DEFAULT_TEMPLATE);
     /* load template config */
     $this->template();
     $this->tplCfg($tplPackage);
     if ($this->_model->get('oType') != 'entry') {
         Sobi::Error('Entry', sprintf('Serious security violation. Trying to save an object which claims to be an entry but it is a %s. Task was %s', $this->_model->get('oType'), SPRequest::task()), SPC::ERROR, 403, __LINE__, __FILE__);
         exit;
     }
     /* add pathway */
     SPFactory::mainframe()->addObjToPathway($this->_model);
     $this->_model->countVisit();
     $this->_model->loadFields(Sobi::Reg('current_section'));
     $class = SPLoader::loadView('entry');
     $view = new $class($this->template);
     $view->assign($this->_model, 'entry');
     $view->assign(SPFactory::user()->getCurrent(), 'visitor');
     $view->assign($this->_task, 'task');
     $view->setConfig($this->_tCfg, $this->template);
     $view->setTemplate($tplPackage . '.' . $this->templateType . '.' . $this->template);
     Sobi::Trigger($this->name(), __FUNCTION__, array(&$view));
     SPFactory::header()->objMeta($this->_model);
     $view->display();
     SPFactory::cache()->addObj($this->_model, 'entry', $this->_model->get('id'));
 }
示例#7
0
 /**
  * Show category chooser
  *
  */
 protected function chooser($menu = false)
 {
     $out = SPRequest::cmd('out', null);
     $exp = SPRequest::int('expand', 0);
     $multi = SPRequest::int('multiple', 0);
     $tpl = SPRequest::word('treetpl', null);
     /* load the SigsiuTree class */
     $tree = SPLoader::loadClass('mlo.tree');
     $ordering = defined('SOBI_ADM_PATH') ? Sobi::GetUserState('categories.order', 'corder', 'position.asc') : Sobi::Cfg('list.categories_ordering');
     /* create new instance */
     $tree = new $tree($ordering);
     /* set link */
     if ($menu) {
         $tree->setId('menuTree');
         if (defined('SOBIPRO_ADM')) {
             $link = Sobi::Url(array('sid' => '{sid}'), false, false, true);
         } else {
             $link = Sobi::Url(array('sid' => '{sid}'));
         }
     } else {
         $link = "javascript:SP_selectCat( '{sid}' )";
     }
     $tree->setHref($link);
     /* set the task to expand the tree */
     $tree->setTask('category.chooser');
     /* disable the category which is currently edited - category cannot be within it self */
     if (!$multi) {
         if (SPRequest::sid() != Sobi::Section()) {
             $tree->disable(SPRequest::sid());
         }
         $tree->setPid(SPRequest::sid());
     } else {
         $tree->disable(Sobi::Reg('current_section'));
     }
     /* case we extending existing tree */
     if ($out == 'xml' && $exp) {
         $pid = SPRequest::int('pid', 0);
         $pid = $pid ? $pid : SPRequest::sid();
         $tree->setPid($pid);
         $tree->disable($pid);
         $tree->extend($exp);
     } else {
         /* init the tree for the current section */
         $tree->init(Sobi::Reg('current_section'));
         /* load model */
         if (!$this->_model) {
             $this->setModel(SPLoader::loadModel('category'));
         }
         /* create new view */
         $class = SPLoader::loadView('category');
         $view = new $class();
         /* assign the task and the tree */
         $view->assign($this->_task, 'task');
         $view->assign($tree, 'tree');
         $view->assign($this->_model, 'category');
         /* select template to show */
         if ($tpl) {
             $view->setTemplate('category.' . $tpl);
         } elseif ($multi) {
             $view->setTemplate('category.mchooser');
         } else {
             $view->setTemplate('category.chooser');
         }
         Sobi::Trigger('Category', 'ChooserView', array(&$view));
         $view->chooser();
     }
 }
示例#8
0
 * @author
 * Name: Sigrid Suski & Radek Suski, Sigsiu.NET GmbH
 * Email: sobi[at]sigsiu.net
 * Url: http://www.Sigsiu.NET
 * @copyright Copyright (C) 2006 - 2015 Sigsiu.NET GmbH (http://www.sigsiu.net). All rights reserved.
 * @license GNU/LGPL Version 3
 * This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License version 3 as published by the Free Software Foundation, and under the additional terms according section 7 of GPL v3.
 * See http://www.gnu.org/licenses/lgpl.html and http://sobipro.sigsiu.net/licenses.
 * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
 * $Date: 2015-02-19 13:24:35 +0100 (Thu, 19 Feb 2015) $
 * $Revision: 4387 $
 * $Author: Radek Suski $
 * $HeadURL: file:///opt/svn/SobiPro/Component/branches/SobiPro-1.1/Site/lib/views/adm/category.php $
 */
defined('SOBIPRO') || exit('Restricted access');
SPLoader::loadView('section', true);
/**
 * @author Radek Suski
 * @version 1.0
 * @created 10-Jan-2009 4:42:13 PM
 */
class SPCategoryAdmView extends SPSectionAdmView
{
    /**
     * @param string $title
     * @return string
     */
    public function setTitle($title)
    {
        $name = $this->get('category.name');
        Sobi::Trigger('setTitle', $this->name(), array(&$title));