Esempio n. 1
0
 function display($tpl = null)
 {
     /*Ověření, jestli jde o přístup z administrace nebo front-endu*/
     if (JPATH_BASE == JPATH_ADMINISTRATOR) {
         require_once JApplicationHelper::getPath('toolbar_html');
         TOOLBAR_ginclude::_DEFAULT();
     } else {
         echo '<div class="componentheading">' . JText::_('GINCLUDE-UPDATE') . '</div>';
         $doc =& JFactory::getDocument();
         $doc->addStyleSheet('components/com_ginclude/css/general.css');
         $doc->addStyleSheet('components/com_ginclude/css/component.css');
     }
     /**/
     $model = $this->getModel();
     echo '<div>' . JText::_('RELOAD_PARTS_ABOUT') . '</div>';
     /*css*/
     $doc =& JFactory::getDocument();
     $declaration = "div.oldDiv {background-color:#F0C0FF;border:2px solid red;color:black;}\r\n     div.newDiv {background-color:#C0FFA0;border:2px solid green;color:black;}\r\n     hr#system-readmore {border:1px dotted red;}\r\n     div.radioDiv {background-color:#ECECEC;border:2px solid black;padding:2px;color:black;}";
     $doc->addStyleDeclaration($declaration);
     $article = $model->getArticleDB($this->articleId);
     $article = $article[0];
     echo '<div style="padding-left:10px;"><h2>' . $article->title . '</h2></div>';
     echo '<form action="index.php?option=com_ginclude&amp;task=reloadPartsSave" method="post">
       <input type="hidden" name="article" value="' . $this->articleId . '" />
       <div style="padding:10px;margin:5px;border:1px dotted gray;">';
     /*vypsani dat z modelu*/
     echo $model->getPartsView($this->articleId);
     echo '</div><div style="padding:10px;"><input type="submit" value="' . JText::_('SAVE_ARTICLE_CHANGES') . '" /></div>';
     echo '</form>';
 }
Esempio n. 2
0
 function display($tpl = null)
 {
     /*Ověření, jestli jde o přístup z administrace nebo front-endu*/
     $doc =& JFactory::getDocument();
     $doc->addScript('components/com_bkef/influences/influences.js');
     echo "<h1>Mutual Influences: " . $this->articleTitle . "</h1>";
     $user =& JFactory::getUser();
     echo "<script type=\"text/javascript\">prihlasenyUzivatel=\"" . $user->name . "\";</script>";
     if (JPATH_BASE == JPATH_ADMINISTRATOR) {
         //$doc->addStyleSheet('components/com_bkef/influences/style.css');
         //$doc->addScript('components/com_bkef/influences/influences.js');
         require_once JApplicationHelper::getPath('toolbar_html');
         TOOLBAR_bkef::_DEFAULT();
     } else {
         $doc->addStyleSheet('components/com_bkef/css/general.css');
         $doc->addStyleSheet('components/com_bkef/css/component.css');
         //$doc->addScript('components/com_bkef/influences/influences.js');
         echo '<div class="componentheading">' . JText::_('BKEF') . '</div>';
     }
     $doc->addScriptDeclaration("cestaKObrazku='components/com_bkef/influences/img/';");
     $doc->addScriptDeclaration("prihlasenyUzivatel='" . $this->username . "';");
     //$doc->addScript('components/com_bkef/influences/influences.js');
     /**/
     echo $this->influencesHTML();
 }
 function display($tpl = null)
 {
     /*Ověření, jestli jde o přístup z administrace nebo front-endu*/
     $doc =& JFactory::getDocument();
     if (JPATH_BASE == JPATH_ADMINISTRATOR) {
         require_once JApplicationHelper::getPath('toolbar_html');
         TOOLBAR_mapping::_DEFAULT();
     } else {
         echo '<div class="componentheading">' . JText::_('COM_MAPPING') . '</div>';
         $doc->addStyleSheet('components/com_mapping/css/general.css');
         $doc->addStyleSheet('components/com_mapping/css/component.css');
     }
     /**/
     echo '<h1>' . JText::_('MAPPING_FINALIZATION') . '</h1>';
     echo '<p>' . JText::_('MAPPING_SAVED_INFO') . '</p>';
     if ($this->redirectUrl) {
         echo '<p>' . JText::_('REDIRECT_INFO') . '</p>';
         echo '<script type="text/javascript">
           function redirectToUrl(){
             location.href="' . $this->redirectUrl . '";
           }
           var t=setTimeout("redirectToUrl();",5000);
           
         </script>';
     }
 }
Esempio n. 4
0
 function getUnidades()
 {
     $joopoa_helper = JApplicationHelper::getPath('helper', 'com_joopoa');
     require $joopoa_helper;
     $unidades =& JoopoaHelper::getUnidades();
     return $unidades;
 }
Esempio n. 5
0
 function display($tpl = null)
 {
     global $option;
     $db =& JFactory::getDBO();
     $user =& JFactory::getUser();
     $client = JRequest::getWord('client', 'site');
     $cid = JRequest::getVar('cid', array(0), '', 'array');
     JArrayHelper::toInteger($cid, array(0));
     $lists = array();
     $row =& JTable::getInstance('plugin');
     // load the row from the db table
     $row->load($cid[0]);
     // fail if checked out not by 'me'
     if ($row->isCheckedOut($user->get('id'))) {
         $msg = JText::sprintf('DESCBEINGEDITTED', JText::_('The plugin'), $row->title);
         $this->setRedirect('index.php?option=' . $option . '&client=' . $client, $msg, 'error');
         return false;
     }
     if ($client == 'admin') {
         $where = "client_id='1'";
     } else {
         $where = "client_id='0'";
     }
     // get list of groups
     if ($row->access == 99 || $row->client_id == 1) {
         $lists['access'] = 'Administrator<input type="hidden" name="access" value="99" />';
     } else {
         // build the html select list for the group access
         $lists['access'] = JHTML::_('list.accesslevel', $row);
     }
     if ($cid[0]) {
         $row->checkout($user->get('id'));
         if ($row->ordering > -10000 && $row->ordering < 10000) {
             // build the html select list for ordering
             $query = 'SELECT ordering AS value, name AS text' . ' FROM #__plugins' . ' WHERE folder = ' . $db->Quote($row->folder) . ' AND published > 0' . ' AND ' . $where . ' AND ordering > -10000' . ' AND ordering < 10000' . ' ORDER BY ordering';
             $order = JHTML::_('list.genericordering', $query);
             $lists['ordering'] = JHTML::_('select.genericlist', $order, 'ordering', 'class="inputbox" size="1"', 'value', 'text', intval($row->ordering));
         } else {
             $lists['ordering'] = '<input type="hidden" name="ordering" value="' . $row->ordering . '" />' . JText::_('This plugin cannot be reordered');
         }
         $lang =& JFactory::getLanguage();
         $lang->load('plg_' . trim($row->folder) . '_' . trim($row->element), JPATH_ADMINISTRATOR);
         $data = JApplicationHelper::parseXMLInstallFile(JPATH_SITE . DS . 'plugins' . DS . $row->folder . DS . $row->element . '.xml');
         $row->description = $data['description'];
     } else {
         $row->folder = '';
         $row->ordering = 999;
         $row->published = 1;
         $row->description = '';
     }
     $lists['published'] = JHTML::_('select.booleanlist', 'published', 'class="inputbox"', $row->published);
     // get params definitions
     $params = new JParameter($row->params, JApplicationHelper::getPath('plg_xml', $row->folder . DS . $row->element), 'plugin');
     $this->assignRef('lists', $lists);
     $this->assignRef('plugin', $row);
     $this->assignRef('params', $params);
     parent::display($tpl);
 }
Esempio n. 6
0
 public function login()
 {
     $helper = JApplicationHelper::getPath('helper');
     if (JDEBUG) {
         dump($helper, "helper");
     }
     require_once $helper;
     JoopoauserHelper::login();
 }
Esempio n. 7
0
 function _form($tpl = null)
 {
     parent::_form($tpl);
     // the row is already loaded in base view so this might not be needed leaving this hear to help figure this out in joomla 1.5 if needed.
     if (!version_compare(JVERSION, '1.6.0', 'ge')) {
         $row = $this->getModel()->getItem();
         $params = new DSCParameter($row->params, JApplicationHelper::getPath('plg_xml', $row->folder . '/' . $row->element), 'plugin');
         $this->assignRef('params', $params);
     }
 }
Esempio n. 8
0
 /**
  * After dispatching legacy render the toolbar.
  *
  * (non-PHPdoc)
  *
  * @see LibBaseDispatcherComponent::_actionRenderlegacy()
  */
 protected function _actionRenderlegacy(KCommandContext $context)
 {
     parent::_actionRenderlegacy($context);
     global $mainframe;
     jimport('joomla.application.helper');
     if (($path = JApplicationHelper::getPath('toolbar')) && $mainframe->isAdmin()) {
         // Get the task again, in case it has changed
         $task = JRequest::getString('task');
         // Make the toolbar
         include_once $path;
     }
 }
Esempio n. 9
0
 function display($tpl = null)
 {
     $model = $this->getModel();
     $doc =& JFactory::getDocument();
     if (JPATH_BASE != JPATH_ADMINISTRATOR) {
         $doc->addStyleSheet('components/com_bkef/css/general.css');
         $doc->addStyleSheet('components/com_bkef/css/component.css');
     }
     JHTML::_('behavior.modal');
     $doc->addStyleSheet('components/com_bkef/css/main.css');
     /*Ověření, jestli jde o přístup z administrace nebo front-endu*/
     require_once JApplicationHelper::getPath('toolbar_html');
     if (JPATH_BASE == JPATH_ADMINISTRATOR) {
         TOOLBAR_bkef::_DEFAULT();
     } else {
         TOOLBAR_bkef::frontend();
     }
     /**/
     echo '<h1>' . JText::_('NEW_BKEF_ARTICLE_H1') . '</h1>';
     echo '<div class="infotext">' . JText::_('NEW_BKEF_ARTICLE_INFO') . '</div>';
     echo '<form method="post" action="index.php?option=com_bkef&amp;task=newArticle">';
     echo '<strong>' . JText::_('NEW_BKEF_ARTICLE_NAME') . '</strong><br />';
     echo '<input type="text" name="articleName" value="" style="width:600px;"/><br />';
     echo '<strong>' . JText::_('NEW_BKEF_ARTICLE_CONTENT') . '</strong> ' . JText::_('NEW_BKEF_ARTICLE_CONTENT2') . '<br />';
     echo '<textarea name="articleContent" style="width:600px;height:300px;"></textarea><br />';
     echo '<br />';
     echo '<h3>' . JText::_('NEW_BKEF_ARTICLE_JOOMLA') . '</h3>';
     echo '<div class="infotext">' . JText::_('NEW_BKEF_ARTICLE_SECTION_INFO') . '</div>';
     echo '<table><tr><td><strong>' . JText::_('SECTIONCATEGORY') . '&nbsp;&nbsp;</strong></td>';
     echo '<td><select name="articleSection">';
     echo '<option value="-1">--none--</option>';
     $sections = $model->getSections();
     if (count($sections) > 0) {
         foreach ($sections as $key => $value) {
             echo '<option value="' . $key . '_0" >' . $value . '</option>';
             $categories = $model->getCategories($key);
             if (count($categories) > 0) {
                 foreach ($categories as $keyC => $valueC) {
                     echo '<option value="' . $key . '_' . $keyC . '" >&nbsp;&nbsp;-&nbsp;' . $valueC . '</option>';
                 }
             }
         }
     }
     echo '</select></td></tr>';
     echo '<tr><td><strong>' . JText::_('ARTICLE_STATE') . '&nbsp;&nbsp;</strong></td>';
     echo '<td><select name="articleState"><option value="1">' . JText::_('PUBLISHED') . '</option><option value="0">' . JText::_('UNPUBLISHED') . '</option></select></td></tr></table>';
     echo '<br /><input type="submit" value="' . JText::_('NEW_BKEF_ARTICLE_SUBMIT') . '"/></form>';
     ?>
   
   
   <?php 
 }
Esempio n. 10
0
 function display($tpl = null)
 {
     $doc =& JFactory::getDocument();
     $declaration = "\r\n     function gSelectArticle(oldId,newId,title) {\r\n       document.getElementById('art'+oldId).value=newId;\r\n       document.getElementById('input'+oldId).value=title;\r\n\t     document.getElementById('sbox-window').close();\r\n     }";
     $doc->addScriptDeclaration($declaration);
     JHTML::_('behavior.modal');
     /*Ověření, jestli jde o přístup z administrace nebo front-endu*/
     if (JPATH_BASE == JPATH_ADMINISTRATOR) {
         require_once JApplicationHelper::getPath('toolbar_html');
         TOOLBAR_ginclude::_DEFAULT();
     } else {
         echo '<div class="componentheading">' . JText::_('GINCLUDE-UPDATE') . '</div>';
         $doc =& JFactory::getDocument();
         $doc->addStyleSheet('components/com_ginclude/css/general.css');
         $doc->addStyleSheet('components/com_ginclude/css/component.css');
     }
     /**/
     $model = $this->getModel();
     $article = $model->getArticleDB($this->articleId);
     $article = $article[0];
     echo '<h3>' . JText::_('RELOAD_SELECT_ARTICLES0') . '</h3>';
     echo '<table><tr><td width="100">' . JText::_('TITLE') . ':</td><td><strong>' . $article->title . '</strong></td><td rowspan="2" style="padding-left:50px;"><button onclick="location.href=\'index.php?option=com_ginclude&task=reload\';">' . JText::_('SELECT_OTHER_ARTICLE') . '</button></td></tr>';
     echo '<tr><td>' . JText::_('CREATED') . ':</td><td>' . $article->cdate . '</td></tr></table>';
     echo '<h3>' . JText::_('RELOAD_SELECT_ARTICLES') . '</h3>';
     $linkArr = $model->getArticleLinks($this->articleId);
     if (count($linkArr) > 0) {
         /*ve článku je nějaký odkaz => nabídneme aktualizaci*/
         echo '<div>' . JText::_('RELOAD_SELECT_ARTICLES_ABOUT') . '</div>';
         echo '<form method="post" action="index.php?option=com_ginclude&amp;task=reloadParts">';
         echo '<input type="hidden" name="article" value="' . $this->articleId . '" />';
         echo '<table border="0" class="adminlist" cellspacing="1" style="margin-top:10px;margin-bottom:10px;"><tbody>';
         if (count($linkArr) > 0) {
             foreach ($linkArr as $artId => $artTitle) {
                 $art = $model->getArticleDB($artId);
                 $art = $art[0];
                 echo '<tr><td width="100">' . JText::_('ORIGINAL_ARTICLE') . '</td><td><strong>' . $art->title . '</strong>';
                 if (htmlspecialchars($art->title, ENT_QUOTES, 'utf-8') != $artTitle) {
                     echo '<span style="color:red;">&nbsp;-&nbsp;' . JText::_('ORIGINAL_ARTICLE_TITLE') . ' <strong>' . $artTitle . '</strong>&nbsp;!</span>';
                 }
                 echo '</td></tr>';
                 echo '<tr class="row1"><td>' . JText::_('RELOADED_ARTICLE') . '</td><td><input type="hidden" value="' . $art->id . '" name="art' . $art->id . '" id="art' . $art->id . '" /><input id="input' . $art->id . '" type="text" name="input' . $art->id . '" value="' . htmlspecialchars($art->title, ENT_QUOTES, 'utf-8') . '" style="width:250px;" readonly="readonly"/>&nbsp;&nbsp;&nbsp;' . $this->getSelectButton($art->id) . '</td></tr>';
             }
         }
         echo '</tbody></table>';
         echo '<div"><input type="submit" value="' . JText::_('SHOW_RELOADABLE_PARTS') . '" /></div></form>';
     } else {
         /*nenalezen žádný odkaz => zobrazíme upozornění...*/
         echo '<div>' . JText::_('NO_RELOADABLE_PARTS_ABOUT') . '</div>';
     }
 }
Esempio n. 11
0
 /**
  *
  * @see JAuthenticationResponse para obter detalhes de resposta da autenticação.
  *
  * @param array $param
  * @param array $options
  * @param JAuthenticationResponse &$response
  */
 function onAuthenticate($credentials, $options, &$response)
 {
     if (JDEBUG) {
         dump($credentials, "Credentials");
     }
     if (JDEBUG) {
         dump($options, "Options");
     }
     if (JDEBUG) {
         dump($response, "Response");
     }
     jimport('joomla.user.helper');
     // Joomla does not like blank passwords
     if (empty($credentials['password'])) {
         $response->status = JAUTHENTICATE_STATUS_FAILURE;
         $response->error_message = 'Não é permitido senha em Branco';
         return false;
     }
     $joopoa_helper = JApplicationHelper::getPath('helper', 'com_joopoa');
     if (JDEBUG) {
         dump($joopoa_helper, 'Path para o helper do com_joopoa');
     }
     require $joopoa_helper;
     $sawee = JoopoaHelper::getSaweeWSClientLib();
     // $matricula, $password, $tipo='aluno', $unidade=NULL, $periodo=NULL
     $usuario = $sawee->login_login($credentials['username'], $credentials['password'], 'aluno', $credentials['unit']);
     if ($usuario) {
         $joopoauser_helper = JApplicationHelper::getPath('helper', 'com_joopoauser');
         if (JDEBUG) {
             dump($joopoauser_helper, 'Path para o helper do com_joopoauser');
         }
         require $joopoauser_helper;
         $user = JoopoauserHelper::getJoomlaUser($usuario);
         // Bring this in line with the rest of the system
         if (JDEBUG) {
             dump($user, 'Usuário criado com base nos dados obtidos no SAWEE');
         }
         $response->email = $user->email;
         $response->fullname = $user->name;
         $response->status = JAUTHENTICATE_STATUS_SUCCESS;
         $response->error_message = '';
         return true;
     } else {
         $response->status = JAUTHENTICATE_STATUS_FAILURE;
         $response->error_message = 'User does not exist';
     }
     return false;
 }
Esempio n. 12
0
 function display($tpl = null)
 {
     /*Ověření, jestli jde o přístup z administrace nebo front-endu*/
     if (JPATH_BASE == JPATH_ADMINISTRATOR) {
         require_once JApplicationHelper::getPath('toolbar_html');
         TOOLBAR_ginclude::_DEFAULT();
     } else {
         echo '<div class="componentheading">' . JText::_('GINCLUDE-UPDATE') . '</div>';
         $doc =& JFactory::getDocument();
         $doc->addStyleSheet('components/com_ginclude/css/general.css');
         $doc->addStyleSheet('components/com_ginclude/css/component.css');
     }
     /**/
     echo '<h2>' . $this->title . '</h2>';
     echo '<div>' . $this->text . '</div>';
 }
Esempio n. 13
0
 function display($tpl = null)
 {
     /*Ověření, jestli jde o přístup z administrace nebo front-endu*/
     if (JPATH_BASE == JPATH_ADMINISTRATOR) {
         require_once JApplicationHelper::getPath('toolbar_html');
         TOOLBAR_mapping::_DEFAULT();
     } else {
         echo '<div class="componentheading">' . JText::_('COM_MAPPING') . '</div>';
         $doc =& JFactory::getDocument();
         $doc->addStyleSheet('components/com_mapping/css/general.css');
         $doc->addStyleSheet('components/com_mapping/css/component.css');
     }
     /**/
     echo '<h1>' . JText::_('ERROR') . '!</h1>';
     echo '<div style="border:2px solid red;">' . $this->text . '</div>';
     echo '<div><a href="' . $this->link . '">OK</a></div>';
 }
Esempio n. 14
0
 function display($tpl = null)
 {
     $doc =& JFactory::getDocument();
     $doc->addStyleSheet('components/com_mapping/css/useredit.css');
     $doc->addScript("components/com_mapping/js/jquery1.4.min.js");
     $doc->addScript("components/com_mapping/js/scroll.js");
     $doc->addScript("components/com_mapping/js/mapping_" . JText::_('langEN') . ".js");
     $doc->addScript("components/com_mapping/js/useredit.js");
     /*Ověření, jestli jde o přístup z administrace nebo front-endu*/
     if (JPATH_BASE == JPATH_ADMINISTRATOR) {
         require_once JApplicationHelper::getPath('toolbar_html');
         TOOLBAR_mapping::_DEFAULT();
     } else {
         echo '<div class="componentheading">' . JText::_('COM_MAPPING') . '</div>';
         $doc =& JFactory::getDocument();
         $doc->addStyleSheet('components/com_mapping/css/general.css');
         $doc->addStyleSheet('components/com_mapping/css/component.css');
     }
     /**/
 }
Esempio n. 15
0
 function &_getXML()
 {
     if (!$this->_xml) {
         $clientId = $this->getState('clientId', 0);
         $path = $clientId == 1 ? 'mod1_xml' : 'mod0_xml';
         $module =& $this->getModule();
         if ($module->module == 'custom') {
             $xmlpath = JApplicationHelper::getPath($path, 'mod_custom');
         } else {
             $xmlpath = JApplicationHelper::getPath($path, $module->module);
         }
         if (file_exists($xmlpath)) {
             $xml =& JFactory::getXMLParser('Simple');
             if ($xml->loadFile($xmlpath)) {
                 $this->_xml =& $xml;
             }
         }
     }
     return $this->_xml;
 }
Esempio n. 16
0
* @version		$Id: admin.content.php 18162 2010-07-16 07:00:47Z ian $
* @package		Joomla
* @subpackage	Content
* @copyright	Copyright (C) 2005 - 2010 Open Source Matters. All rights reserved.
* @license		GNU/GPL, see LICENSE.php
* Joomla! is free software. This version may have been modified pursuant
* to the GNU General Public License, and as distributed it includes or
* is derivative of works licensed under the GNU General Public License or
* other free or open source software licenses.
* See COPYRIGHT.php for copyright notices and details.
*/
// no direct access
defined('_JEXEC') or die('Restricted access');
require_once JPATH_COMPONENT . DS . 'controller.php';
require_once JPATH_COMPONENT . DS . 'helper.php';
require_once JApplicationHelper::getPath('admin_html');
// Set the helper directory
JHTML::addIncludePath(JPATH_COMPONENT . DS . 'helper');
$controller = new ContentController();
$task = JRequest::getCmd('task');
switch (strtolower($task)) {
    case 'element':
    case 'wizard':
        $controller->execute($task);
        $controller->redirect();
        break;
    case 'add':
    case 'new':
        ContentController::editContent(false);
        break;
    case 'edit':
Esempio n. 17
0
 function renderComponent($name = null, $params = array())
 {
     global $mainframe, $option;
     if (empty($name)) {
         // Throw 404 if no component
         JError::raiseError(404, JText::_("Component Not Found"));
         return;
     }
     $scope = $mainframe->scope;
     //record the scope
     $mainframe->scope = $name;
     //set scope to component name
     // Build the component path
     $name = preg_replace('/[^A-Z0-9_\\.-]/i', '', $name);
     $file = substr($name, 4);
     // Define component path
     define('JPATH_COMPONENT', JPATH_BASE . DS . 'components' . DS . $name);
     define('JPATH_COMPONENT_SITE', JPATH_SITE . DS . 'components' . DS . $name);
     define('JPATH_COMPONENT_ADMINISTRATOR', JPATH_ADMINISTRATOR . DS . 'components' . DS . $name);
     // get component path
     if ($mainframe->isAdmin() && file_exists(JPATH_COMPONENT . DS . 'admin.' . $file . '.php')) {
         $path = JPATH_COMPONENT . DS . 'admin.' . $file . '.php';
     } else {
         $path = JPATH_COMPONENT . DS . $file . '.php';
     }
     // If component disabled throw error
     if (!JComponentHelper::isEnabled($name) || !file_exists($path)) {
         JError::raiseError(404, JText::_('Component Not Found'));
     }
     // Handle legacy globals if enabled
     if ($mainframe->getCfg('legacy')) {
         // Include legacy globals
         global $my, $database, $id, $acl, $task;
         // For backwards compatibility extract the config vars as globals
         $registry =& JFactory::getConfig();
         foreach (get_object_vars($registry->toObject()) as $k => $v) {
             $varname = 'mosConfig_' . $k;
             ${$varname} = $v;
         }
         $contentConfig =& JComponentHelper::getParams('com_content');
         foreach (get_object_vars($contentConfig->toObject()) as $k => $v) {
             $varname = 'mosConfig_' . $k;
             ${$varname} = $v;
         }
         $usersConfig =& JComponentHelper::getParams('com_users');
         foreach (get_object_vars($usersConfig->toObject()) as $k => $v) {
             $varname = 'mosConfig_' . $k;
             ${$varname} = $v;
         }
     }
     $task = JRequest::getString('task');
     // Load common language files
     $lang =& JFactory::getLanguage();
     $lang->load($name);
     // Handle template preview outlining
     $contents = null;
     // Execute the component
     ob_start();
     require_once $path;
     $contents = ob_get_contents();
     ob_end_clean();
     // Build the component toolbar
     jimport('joomla.application.helper');
     if (($path = JApplicationHelper::getPath('toolbar')) && $mainframe->isAdmin()) {
         // Get the task again, in case it has changed
         $task = JRequest::getString('task');
         // Make the toolbar
         include_once $path;
     }
     $mainframe->scope = $scope;
     //revert the scope
     return $contents;
 }
Esempio n. 18
0
 /**
  * Deprecated, use JApplicationHelper::getPath instead.
  *
  * @since 1.0
  * @deprecated As of version 1.5
  * @see JApplicationHelper::getPath()
  */
 function getPath($varname, $user_option = null)
 {
     jimport('joomla.application.helper');
     return JApplicationHelper::getPath($varname, $user_option);
 }
Esempio n. 19
0
 * is derivative of works licensed under the GNU General Public License or
 * other free or open source software licenses.
 * See COPYRIGHT.php for copyright notices and details.
 */
// no direct access
defined('_JEXEC') or die('Restricted access');
/*
 * Make sure the user is authorized to view this page
 */
$user =& JFactory::getUser();
if (!$user->authorize('com_cache', 'manage')) {
    $mainframe->redirect('index.php', JText::_('ALERTNOTAUTH'));
}
// Load the html output class and the model class
require_once JApplicationHelper::getPath('admin_html');
require_once JApplicationHelper::getPath('class');
$cid = JRequest::getVar('cid', array(0), 'post', 'array');
/*
 * This is our main control structure for the component
 *
 * Each view is determined by the $task variable
 */
switch (JRequest::getVar('task')) {
    case 'delete':
        CacheController::deleteCache($cid);
        CacheController::showCache();
        break;
    default:
        CacheController::showCache();
        break;
}
Esempio n. 20
0
 function &_getStateXML()
 {
     static $xml;
     if (isset($xml)) {
         return $xml;
     }
     $xml = null;
     $xmlpath = null;
     $item =& $this->getItem();
     switch ($item->type) {
         case 'separator':
             $xmlpath = JPATH_BASE . DS . 'components' . DS . 'com_menus' . DS . 'models' . DS . 'metadata' . DS . 'separator.xml';
             break;
         case 'url':
             $xmlpath = JPATH_BASE . DS . 'components' . DS . 'com_menus' . DS . 'models' . DS . 'metadata' . DS . 'url.xml';
             break;
         case 'menulink':
             $xmlpath = JPATH_BASE . DS . 'components' . DS . 'com_menus' . DS . 'models' . DS . 'metadata' . DS . 'menulink.xml';
             break;
         case 'component':
         default:
             if (isset($item->linkparts['view'])) {
                 // View is set... so we konw to look in view file
                 if (isset($item->linkparts['layout'])) {
                     $layout = $item->linkparts['layout'];
                 } else {
                     $layout = 'default';
                 }
                 $lpath = JPATH_ROOT . DS . 'components' . DS . $item->linkparts['option'] . DS . 'views' . DS . $item->linkparts['view'] . DS . 'tmpl' . DS . $layout . '.xml';
                 $vpath = JPATH_ROOT . DS . 'components' . DS . $item->linkparts['option'] . DS . 'views' . DS . $item->linkparts['view'] . DS . 'metadata.xml';
                 if (file_exists($lpath)) {
                     $xmlpath = $lpath;
                 } elseif (file_exists($vpath)) {
                     $xmlpath = $vpath;
                 }
             }
             if (!$xmlpath && isset($item->linkparts['option'])) {
                 $xmlpath = JPATH_ROOT . DS . 'components' . DS . $item->linkparts['option'] . DS . 'metadata.xml';
                 if (!file_exists($xmlpath)) {
                     $xmlpath = JApplicationHelper::getPath('com_xml', $item->linkparts['option']);
                 }
             }
             break;
     }
     if (file_exists($xmlpath)) {
         $xml =& JFactory::getXMLParser('Simple');
         if ($xml->loadFile($xmlpath)) {
             $this->_xml =& $xml;
             $document =& $xml->document;
             /*
              * HANDLE NO OPTION CASE
              */
             $menus =& $document->getElementByPath('menu');
             if (is_a($menus, 'JSimpleXMLElement') && $menus->attributes('options') == 'none') {
                 $xml =& $menus->getElementByPath('state');
             } else {
                 $xml =& $document->getElementByPath('state');
             }
             // Handle error case... path doesn't exist
             if (!is_a($xml, 'JSimpleXMLElement')) {
                 return $document;
             }
             /*
              * HANDLE A SWITCH IF IT EXISTS
              */
             if ($switch = $xml->attributes('switch')) {
                 $default = $xml->attributes('default');
                 // Handle switch
                 $switchVal = isset($item->linkparts[$switch]) ? $item->linkparts[$switch] : 'default';
                 $found = false;
                 foreach ($xml->children() as $child) {
                     if ($child->name() == $switchVal) {
                         $xml =& $child;
                         $found = true;
                         break;
                     }
                 }
                 if (!$found) {
                     foreach ($xml->children() as $child) {
                         if ($child->name() == $default) {
                             $xml =& $child;
                             break;
                         }
                     }
                 }
             }
             /*
              * HANDLE INCLUDED PARAMS
              */
             $children = $xml->children();
             if (count($children) == 1) {
                 if ($children[0]->name() == 'include') {
                     $ret =& $this->_getIncludedParams($children[0]);
                     if ($ret) {
                         $xml =& $ret;
                     }
                 }
             }
             if ($switch = $xml->attributes('switch')) {
                 $default = $xml->attributes('default');
                 // Handle switch
                 $switchVal = $item->linkparts[$switch] ? $item->linkparts[$switch] : 'default';
                 $found = false;
                 foreach ($xml->children() as $child) {
                     if ($child->name() == $switchVal) {
                         $xml =& $child;
                         $found = true;
                         break;
                     }
                 }
                 if (!$found) {
                     foreach ($xml->children() as $child) {
                         if ($child->name() == $default) {
                             $xml =& $child;
                             break;
                         }
                     }
                 }
             }
         }
     }
     return $xml;
 }
Esempio n. 21
0
<?php

defined('_JEXEC') or die('Restricted access');
require_once JApplicationHelper::getPath('admin_functions');
class HTML_cbodb
{
    // moved to CbodbItem
    //static $itemBikeStyleArray = array("Not specified", "Road", "Hybrid", "Mountain", "City", "Cruiser", "BMX", "Kids");
    //static $itemStatusArray = array("Not specified", "Perfect", "Ready for Sale", "Ready for Rent", "Needs Repair");
    //static $itemLocationArray = array("Not specified", "Sales Floor", "LSR", "EAB Shed", "Rental Shed", "Rental cabinet", "Currently Out", "Lost");
    //static $itemBikeSizeUnitArray = array("Not specified", "cm", "in");
    //static $itemBikeTireStyleArray = array("Not specified", "Smooth", "Kinda Knobby", "Knobby");
    //static $itemBikeDrivetrainArray = array("Not specified", "F&R Derailer", "Rear Derailer", "Hub Gears", "Singlespeed", "Fixed Gear", "Unispeed");
    //static $itemSourceArray = array("Not specified", "Individual Donation", "Bike shop collection", "Police", "Purchased new");
    //static $itemBikeFrameStyleArray = array("Not specified", "Diamond", "Mixte", "Step-through", "Tandem");
    //static $commissionMechanics = array(0 => "No one", 1180 => "Al");
    /* Moved to CbodbTransaction 2012.07.21 Bart McPherson GiveCamp
    	Initing value after class declaration
    static $adminTransactionTypeArray = array(1001 => "Purchase", 1002 => "Credits Added", 1004 => "Volunteer time addition", 2001 => "Comment", 1005 => "Bike Credit");
    static $transactionTypeArray = array(
         1 => "Volunteering",
         2 => "Personal",
         3 => "Taking class",
    	   4 => "Staff",
    	   5 => "Ride",
    	1001 => "Purchase",
    	1002 => "Credits Added",
    	1003 => "Membership Renewal",
    	1004 => "Volunteer time addition",
    	2001 => "Comment",
    	1005 => "Bike Credit",
Esempio n. 22
0
    public function fetchElement($name, $value, &$node, $control_name)
    {
        $params['selector'] = 'div.dashboard';
        ComNinjaHtmlPane::getInstance('tabs', $params);
        jimport('joomla.filesystem.file');
        $doc =& JFactory::getDocument();
        $uri = JFactory::getURI();
        //Get path to manifestfile, and get required data
        $xml =& JFactory::getXMLParser('Simple');
        if ($node['path']) {
            $explode = explode('::', $node['path']);
            $path = JApplicationHelper::getPath(current($explode), next($explode));
        } else {
            if ($this->_parent->_path) {
                $path = $this->_parent->_path;
            }
        }
        $xml->loadFile($path);
        $xml = $xml->document;
        if (!defined('NAPI_DASHBOARD')) {
            //return '<pre>'.print_r($xml,true).'</pre>';
            define('NAPI_DASHBOARD', 1);
        }
        jimport('joomla.language.helper');
        $locale = JLanguageHelper::detectLanguage();
        $instructions = JText::_('NINSTRUCTIONS');
        //$instructions = JFile::read(JURI::root().'modules/'.$modname.'/dashboard/'.$locale.'/instructions.html');
        if (!$instructions) {
            //$instructions = JFile::read(JURI::root().'modules/'.$modname.'/dashboard/en-GB/instructions.html');
        }
        $changelog = JText::_($node['changelog']);
        if (!$changelog) {
            $changelog = 'No changelog here yet.';
        }
        $imgpath = $node['imgpath'] ? $node['imgpath'] : 'media/napi/img/dashboard/';
        $support = '<a href="http://ninjaforge.com/index.php?option=com_fireboard&Itemid=111"> NinjaForge forums</a>';
        $rate = '<a href="http://extensions.joomla.org/extensions/style-&-design/tabs-&-tabss/5726/details"> Joomla.org</a>';
        $return = '';
        $script = "\n\t\tfunction runonce()\n\t\t{\n\t\t\t\$('tablink1').getParent().addClass('tabactive');\n\t\t\t\$('tabcontent1').addClass('runonce');\n\t\t\t\$\$('ul.menu-nav a').each(function(e){\n\t\t\t\te.addEvent('click', function(){ \n\t\t\t\t\tif(!\$" . "defined(runonce))\n\t\t\t\t\t{\n\t\t\t\t\t\t\$('tabcontent1').removeClass('runonce');\n\t\t\t\t\t\tvar runonce = true;\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t});\n\t\t}\n\t\twindow.addEvent('domready', function(){\n\t\t\twindow.location.hash ? \$('tablink'+window.location.hash.substring(window.location.hash.length - 1, window.location.hash.length)).getParent().addClass('tabactive') : runonce();\n\t\t\tvar dashboard = \$\$('ul.menu-nav a');\n\t\t\tdashboard.each(function(e){\n\t\t\t\te.addEvent('click', (function(event){ \n\t\t\t\t\tthis.addClass('tabactive');\n\t\t\t\t\tindex = dashboard.indexOf(this);\n\t\t\t\t\tdashboard.each(function(e, i){ \n\t\t\t\t\t\tif(i!=index) e.removeClass('tabactive'); \n\t\t\t\t\t}); \n\t\t\t\t}).bindWithEvent(e));\n\t\t\t});\n\t\t});";
        //		$filter = ' {prefix: \'tab-\', invert: \'ui-filter-select\', parent: \'.ui-corner-all.ui-filter\', items: \'.nftab\', onfilter: function(){ '.$control_name.$name.'(this)} }';
        $filter = '';
        //$return .= $panel->endPanel();
        if (!$this->_parent->get('dashboardStyle')) {
            $return .= '<style type="text/css"> 

  
    #' . $control_name . $name . '{ border:1px solid #dddddd; }
    .nftab .inner{}
    .nftab{}
  </style>';
        } else {
            $return .= '<div id="' . $control_name . $name . '" class="ui-corner-all ui-filter">';
        }
        $doc->addStyleDeclaration('
		#paramsdashboard-lbl     {
			display: none;
		} 
		
    body{font-family:Helvetica,Arial,sans-serif; }
    #' . $control_name . $name . '{background: #ffffff 0 0; background-repeat: repeat-x; background-position: center -63px; 	border:0px solid #dddddd; position:relative; margin:0;overflow:hidden; }
    #' . $control_name . $name . '.content .ui-corner-top { -webkit-border-top-left-radius: 0px;
-webkit-border-top-right-radius: 0px; -moz-border-radius-topLeft: 0px;
-moz-border-radius-topRight: 0px; }
    
    .nftab {
    	display:none;
    }
    
    .nftab:target {
    	display:block;
    }
    
    .menu{ display:block;
background-position: 50% 100%; position:relative; }

    .menu img.dashbg{ width:100%; max-width:692px; display:block;margin: 0px auto 0px 0px auto; background-color: #6A84AB; }
    
    .menu ul{display: block; margin-left:auto; margin-right:auto; padding:0px; list-style:none; text-align:center; position: absolute; top:0px; width:100%;}
    .menu li{background:none; float:left; margin:0px 0px 0px 0px; padding:0px; display:inline-block; overflow:hidden;}
    .menu li img { float:left; cursor:pointer;visibility:hidden; position: relative; width: 100%; }
    .menu li#tablink0{max-width: 135px; width:19.5086705202312%;cursor:default; }
    .menu li#tablink1{max-width: 183px; width:26.4450867052023%}
    .menu li#tablink2{max-width:191px; width:27.6011560693642%;}
    .menu li#tablink3{max-width:183px; width:26.4450867052023%; }
    .menu li#tablink3 img{ cursor:default; }
    .menu a.tabactive li#tablink1,{backgroud:url(\'' . JURI::root() . $imgpath . 'bg.png\') no-repeat 0 0; }
    .menu a.tabactive li#tablink2,{backgrond:url(\'' . JURI::root() . $imgpath . 'bg.png\') no-repeat -139px 0; }
    .menu a.tabactive li#tablink3,.menu li#tablink3:hover{backgroud:url(\'' . JURI::root() . $imgpath . 'bg.png\') no-repeat -277px 0; }
    .menu a.tabactive li img, .menu li:hover img {
    	/*display:inline;*/
    	visibility: visible;
    }
    .menu .menu-nav li:hover {
    	opacity:0.1;
    }
    
    .menu .menu-nav a.tabactive li, .menu .menu-nav a.tabactive:active li {
    	opacity:1;
    }
    
    .tabtxt{padding:0 0 0 0px; float:none; display:none; }
    
    .nftab{ width:auto; text-align:left; padding:0px 10px 6px 10px; font-size:12px; margin-bottom:5px;
background-position: 50% -67px;
background-repeat: repeat-x;
background-color: transparent;
background-image: url(' . JURI::root() . $imgpath . 'dashbg.png); }
    .nftab .inner{ overflow-y:auto; overflow-x:hidden; width:100%; }
    .nftab h2,.nftab h1{font-weight:bold; text-align:center; padding: 10px 0px; }
    .nftab h1{color:#fff; margin:0px 0px 15px; padding: 1px 0px 0px 0px; }
    .nftab strong{font-weight:normal; }
    .nftab dt strong,.nftab h3 strong{font-weight:bold !important; }
    .nftab dt{font-weight:bold !important; padding:5px 0pt 2px; }
.buttons{border:none; padding:3px; }
.nftab .boxshot {
	text-align:center;
	margin:0px auto;
}
.nftab .boxshot img {
	max-width: ' . ($node['boxshotwidth'] ? $node['boxshotwidth'] : '233px') . ';
	width: 100%;
}
.runonce {
	display:block!important;
}
.nftab .nftab-content {
	display: inline-block;
	width: 50%;
	float:left;
}
.nftab .nftab-content p {
	margin-left: 10px;
}
.nftab ol {
	counter-reset: steps;
}
.nftab ol li {
	counter-increment: steps;
}
.nftab ol li:before {
	content: counter(steps)". "; 
}
.nftab.tab-changelog .inner div {
	float:left;
	width:100%;
	display:block;
	clear:both;
	margin-bottom: 40px;
}
.dashboard-footer {
	text-align:center;
	display:inline-block;
}');
        //die('<pre>'.JURI::base(true).print_r(parse_url(JRequest::getURI(), PHP_URL_QUERY), true).'</pre>');
        $return .= '
  <!--[if lte IE 6]>     
    <style>
  	 .nftab h1 {margin:0px 0px 15px 0px !important;}
     .nftab {padding:0px 0px 6px !important;}           
    </style>
	<![endif]--> 
<div class="menu ui-corner-top">
	<img src="' . JURI::root() . $imgpath . 'bg.png" class="dashbg ui-corner-top" />
	<ul class="menu-nav ui-corner-top">
	<li title="" id="tablink0" class="ui-corner-tl"><img src="' . JURI::root() . $imgpath . 'dashtabbg_0.png" class="ui-corner-tl" /></li>
    	<a href="#tabcontent1"><li title="" id="tablink1" class="tab ui-filter-trigger' . $filter . '"><img src="' . JURI::root() . $imgpath . 'dashtabbg_1.png" /><span id="info" class="tabtxt">General Info</span></li></a>
    	<a href="#tabcontent2"><li title="" id="tablink2" class="tab ui-filter-trigger' . $filter . '"><img src="' . JURI::root() . $imgpath . 'dashtabbg_2.png" /><span id="inst" class="tabtxt">Instructions</span></li></a>
    	<a href="#tabcontent3"><li title="" id="tablink3" class="tab ui-filter-trigger' . $filter . '"><img src="' . JURI::root() . $imgpath . 'dashtabbg_3.png" /><span id="change" class="tabtxt">Changelog</span></li></a>
	</ul>
</div>
		<div id="tabcontent1" class="nftab tab-general-info filter-general-info ui-filter-item ui-filter-select ">
	    	<h1>' . JText::_(current($xml->name)->data()) . '</h1>
		    <div class="inner">
			    <h2>' . JText::_(current($xml->slogan)->data()) . '</h2>
			    <div class="boxshot nftab-content"><img class="ui-widget-content" src="' . JURI::root() . 'media/' . basename($path, '.xml') . '/img/box.png" alt="' . JText::_(current($xml->name)->data()) . '" title="' . JText::_(current($xml->name)->data()) . '"></div>
			    <div class="description nftab-content">
				    <p><b>' . JText::_('EXTCREATEDBY') . '</b> ';
        $i = 0;
        $count = count($xml->author);
        $separator = '&nbsp;';
        foreach ($xml->author as $author) {
            $separator = '&nbsp;';
            $i++;
            if ($count != 1 && $i != $count) {
                $separator = $i + 1 == $count ? '&nbsp;&amp;' : ($i != 0 ? ',' : '');
            }
            //$separator = $i.$count;
            $email = $author['email'] ? $author['email'] : $xml['authorEmail'];
            $return .= '&nbsp;<a href="mailto:' . $email . '">' . $author->data() . '</a>' . $separator;
        }
        $creditsxml = current($xml->credits);
        $credits = array();
        $i = 0;
        foreach ($creditsxml->children() as $credit) {
            $credits[$i] = '<p>';
            $credits[$i] .= '<b>' . JText::_($credit['what']) . '</b> ';
            $credits[$i] .= '<a href="' . JText::_($credit['where']) . '">' . JText::_($credit['who']) . '</a>';
            $credits[$i] .= '</p>';
            $i++;
        }
        $credits = implode("\n", $credits);
        $return .= '</p>
				    ' . $credits . '
				    <p><b>' . JText::_('EXTPHPLIC') . '</b>  <a href="http://creativecommons.org/licenses/LGPL/2.1/"> CC-GNU LGPL</a></p>
				    <p><b>' . JText::_('EXTJSLIC') . '</b> <a rel="license" href="http://www.opensource.org/licenses/mit-license.php"> MIT </a></p>
				    <p><b>' . JText::_('EXTCSSIMGCOP') . '</b> ' . JText::sprintf('EXTCSSIMGCOPTXT', '2008', date('Y')) . ' <a target="_blank" href="http://' . current($xml->authorUrl)->data() . '" class="hasTip"  title="Click me!::Get more extensions at ' . JText::_(current($xml->copyright)->data()) . '">' . JText::_(current($xml->copyright)->data()) . '</a></p>
				    <p><b>' . JText::_('EXTSUP') . '</b> ' . JText::sprintf('EXTSUPTXT', $support) . '</p>
				    <p><b>' . JText::_('EXTRATE') . '</b> ' . JText::sprintf('EXTRATETXT', $rate) . '</p>
				</div>
			</div>
		</div>
		<div id="tabcontent2" class="nftab tab-instructions filter-instructions ui-helper-hidden ui-filter-select  ui-filter-item">
		    <h1>' . JText::_('INSTRUCTIONS') . '</h1>  
		    <div class="inner">   
		    	' . $instructions . '
			</div>
		</div>
		<div id="tabcontent3" class="nftab tab-changelog ui-helper-hidden ui-filter-select">
			<h1>' . JText::_('CHANGELOG') . '</h1> 
			<div class="inner">
			';
        $i = 0;
        $changelog = current($xml->changelog);
        $count = count($changelog->children());
        $count = 2;
        foreach ($changelog->children() as $log) {
            $i++;
            //$separator = $i.$count;
            //$children = $log[$i];
            //die(print_r($log, true));
            //$children = $children->children();
            //$test = print_r($children->children(), true);
            $version = $log['version'] ? '<p><b>' . JText::_('Version:') . '</b> ' . $log['version'] . '</p>' : '<p><b>' . JText::_('Version:') . '</b> ' . $xml['version'] . '</p>';
            $date = $log['date'] ? '<p><b>' . JText::_('Date:') . '</b> ' . $log['date'] . '</p>' : '';
            $state = $log['state'] ? '<p><b>' . JText::_('State:') . '</b> ' . $log['state'] . '</p>' : '';
            $changes = '<ul>';
            foreach ($log->children() as $child) {
                $changes .= '<li>' . $child->data() . '</li>';
            }
            $changes .= '</ul>';
            $return .= '<div>' . $version . $date . $state . $changes . '</div>';
            unset($email);
        }
        unset($i);
        unset($separator);
        $return .= '
			</div>
		</div>
	<span class="dashboard-footer">
		<a href="http://www.ninjaforge.com" target="_self"><img  class="buttons" src="' . JURI::root() . $imgpath . 'ninjaforge.png" alt="Visit NinjaForge" title="Visit Ninjaforge"/></a>
		<a href="http://jcd-a.org" target="_self"><img class="buttons" src="' . JURI::root() . $imgpath . 'jcda.png" alt="NinjaForge is a JCDA Member" title="NinjaForge is a JCDA Member"/></a>
		<a href="http://www.mozilla-europe.org/en/firefox/" target="_self"><img class="buttons" src="' . JURI::root() . $imgpath . 'firefox3.png" alt="Get Firefox for a better internet experience" title="Get Firefox for a better internet experience"/></a>
		<a href="http://getfirebug.com/" target="_self"><img class="buttons" src="' . JURI::root() . $imgpath . 'firebug.png" alt="Ninjas use and recommend Firebug" title="Ninjas use and recommend Firebug"/></a>
		<a href="http://validator.w3.org/check?uri=referer" target="_self"><img  class="buttons" src="' . JURI::root() . $imgpath . 'validation_xhtml.png" alt="Valid XHTML Transitional" title="Valid XHTML Transitional"/></a>
		<a href="http://jigsaw.w3.org/css-validator/check/referer" target="_self"><img  class="buttons" src="' . JURI::root() . $imgpath . 'validation_css.png" alt="Valid CSS" title="Valid CSS"/></a>
		<a href="http://creativecommons.org/licenses/by-nc-sa/3.0/us/"><img class="buttons" alt="Creative Commons License" src="' . JURI::root() . $imgpath . 'byncsa.png" /></a>
		<a href="http://creativecommons.org/licenses/LGPL/2.1/"><img  class="buttons" alt="CC-GNU GPL" src="' . JURI::root() . $imgpath . 'gnugpl.png" /></a>
	</span>';
        if ($this->_parent->get('dashboardStyle')) {
            $return .= '</div>';
        }
        JRequest::getCmd('format', 'html') == 'script' ? $doc->addScriptDeclaration($script, '', true) : $uri->setVar('format', 'script');
        $uri->setVar('strict', 'true');
        $doc->addScript($uri->toString());
        $uri->delVar('format');
        $uri->delVar('strict');
        //filter shortcut
        return $this->filter($return);
    }
Esempio n. 23
0
 function preview()
 {
     $document =& JFactory::getDocument();
     $document->setTitle(JText::_('AMM_MODULE_PREVIEW'));
     require_once JApplicationHelper::getPath('admin_html');
     HTML_modules::preview();
 }
Esempio n. 24
0
 function display($tpl = null)
 {
     $doc =& JFactory::getDocument();
     $declaration = "\r\n     function gSelectArticle(oldId,newId,title) {\r\n       document.getElementById('art'+oldId).value=newId;\r\n       document.getElementById('input'+oldId).value=title;\r\n\t     document.getElementById('sbox-window').close();\r\n     }";
     $doc->addScriptDeclaration($declaration);
     JHTML::_('behavior.modal');
     $doc->addStyleSheet('components/com_bkef/css/main.css');
     /*Ověření, jestli jde o přístup z administrace nebo front-endu*/
     if (JPATH_BASE == JPATH_ADMINISTRATOR) {
         require_once JApplicationHelper::getPath('toolbar_html');
         TOOLBAR_bkef::_DEFAULT();
     } else {
         echo '<div class="componentheading">' . JText::_('BKEF') . '</div>';
         $doc =& JFactory::getDocument();
         $doc->addStyleSheet('components/com_bkef/css/general.css');
         $doc->addStyleSheet('components/com_bkef/css/component.css');
     }
     /**/
     $xml = $this->xml;
     echo '<h1>BKEF:&nbsp;' . $xml->Header[0]->Title[0] . ' (' . $this->articleTitle . ')</h1>';
     echo '<br /><div class="level1Div">' . JText::_('APPLICATION') . ': <strong>' . $xml->Header[0]->Application[0]['name'] . '</strong>';
     if (@$xml->Header[0]->Application[0]['name']) {
         echo ' (' . JText::_('VERSION') . ': ' . $xml->Header[0]->Application[0]['version'] . ')';
     }
     echo '</div>';
     echo '<div style="margin-top:30px;margin-bottom:30px;" class="infotext">' . JText::_('SEL_META_INFO') . '</div>';
     /*
     echo '<h2>Nadřazené metaatributy</h2>';
     echo '<div class="infotext">Nadřazené metaatributy shrnují vlastnosti několika základních metaatributů</div>';
     */
     echo '<h2>' . JText::_('GROUP_METAATTRIBUTES') . '</h2>';
     echo '<div class="infotext">' . JText::_('GROUP_METAATTRIBUTES_INFO') . '</div>';
     if (count($xml->MetaAttributes[0]->MetaAttribute) > 0) {
         $maId = 0;
         $row = 0;
         echo '<table class="adminlist">';
         echo '<thead><tr><th>' . JText::_('name') . '</th><th></th></tr></thead>';
         foreach ($xml->MetaAttributes[0]->MetaAttribute as $key => $MetaAttribute) {
             if ($MetaAttribute['level'] == 1) {
                 echo '<tr class="row' . $row % 2 . '"><td><a href="index.php?option=com_bkef&amp;task=groupMetaAttribute&amp;article=' . $this->article . '&amp;maId=' . $maId . '"><strong>' . $MetaAttribute['name'] . '</strong></a>&nbsp;&nbsp;&nbsp;</td><td width="150">';
                 echo '<a href="index.php?option=com_bkef&amp;task=groupMetaAttribute&amp;article=' . $this->article . '&amp;maId=' . $maId . '">' . JText::_('EDIT') . '</a>';
                 echo '&nbsp;&nbsp;&nbsp;';
                 echo '<a href="index.php?option=com_bkef&amp;task=delMetaAttribute&amp;article=' . $this->article . '&amp;tmpl=component&amp;maId=' . $maId . '" rel="{handler: \'iframe\', size: {x: 400, y: 200}}" class="modal">' . JText::_('DELETE') . '</a></td>';
                 $row++;
             }
             $maId++;
         }
         echo '</table>';
     }
     echo '<br />';
     echo '<div class="linksDiv"><a href="index.php?option=com_bkef&amp;task=newGroupMetaAttribute&amp;article=' . $this->article . '&amp;tmpl=component&amp;level=0" rel="{handler: \'iframe\', size: {x: 500, y: 330}}" class="modal">' . JText::_('NEW_GROUP_META') . '</a></div>';
     echo '<br />';
     echo '<h2>' . JText::_('BASIC_METAATTRIBUTES') . '</h2>';
     echo '<div class="infotext">' . JText::_('BASIC_METAATTRIBUTES_INFO') . '</div>';
     $maCount = count($xml->MetaAttributes[0]->MetaAttribute);
     if ($maCount > 0) {
         echo '<table class="adminlist">';
         echo '<thead><tr><th>' . JText::_('name') . '</th><th></th></tr></thead>';
         $maId = 0;
         $row = 0;
         foreach ($xml->MetaAttributes[0]->MetaAttribute as $key => $MetaAttribute) {
             if ($MetaAttribute['level'] == 0) {
                 echo '<tr class="row' . $row % 2 . '"><td><a href="index.php?option=com_bkef&amp;task=metaAttribute&amp;article=' . $this->article . '&amp;maId=' . $maId . '"><strong>' . $MetaAttribute['name'] . '</strong></a>&nbsp;&nbsp;&nbsp;</td><td width="150">';
                 echo '<a href="index.php?option=com_bkef&amp;task=metaAttribute&amp;article=' . $this->article . '&amp;maId=' . $maId . '">' . JText::_('EDIT') . '</a>';
                 echo '&nbsp;&nbsp;&nbsp;';
                 echo '<a href="index.php?option=com_bkef&amp;task=delMetaAttribute&amp;article=' . $this->article . '&amp;tmpl=component&amp;maId=' . $maId . '" rel="{handler: \'iframe\', size: {x: 400, y: 200}}" class="modal">' . JText::_('DELETE') . '</a></td>';
                 $row++;
             }
             $maId++;
         }
         echo '</table>';
     } else {
         echo '<div class="missing infotext">' . JText::_('NO_META_INFO') . '</div>';
     }
     echo '<br />';
     echo '<div class="linksDiv"><a href="index.php?option=com_bkef&amp;task=newMetaAttribute&amp;article=' . $this->article . '&amp;tmpl=component&amp;level=0" rel="{handler: \'iframe\', size: {x: 500, y: 330}}" class="modal">' . JText::_('NEW_BASIC_META') . '</a></div>';
 }
Esempio n. 25
0
 function TranslateParams_modules($original, $translation, $fieldname, $fields = null)
 {
     $this->fieldname = $fieldname;
     global $mainframe;
     $module = null;
     foreach ($fields as $field) {
         if ($field->Name == "module") {
             $module = $field->originalValue;
             break;
         }
     }
     if (is_null($module)) {
         echo JText::_("PROBLEMS WITH CONTENT ELEMENT FILE");
         exit;
     }
     $lang = JFactory::getLanguage();
     $lang->load($module, JPATH_SITE);
     // xml file for module
     if ($module == 'custom') {
         $xmlfile = JApplicationHelper::getPath('mod0_xml', 'mod_custom');
     } else {
         $xmlfile = JApplicationHelper::getPath('mod0_xml', $module);
     }
     $this->origparams = new JParameter($original, $xmlfile, 'module');
     $this->transparams = new JParameter($translation, $xmlfile, 'module');
     $this->defaultparams = new JParameter("", $xmlfile, 'component');
     $this->fields = $fields;
 }
Esempio n. 26
0
 function display($tpl = null)
 {
     /*Ověření, jestli jde o přístup z administrace nebo front-endu*/
     require_once JApplicationHelper::getPath('toolbar_html');
     if (JPATH_BASE == JPATH_ADMINISTRATOR) {
         TOOLBAR_bkef::_DEFAULT();
     } else {
         TOOLBAR_bkef::frontend();
     }
     /**/
     echo JText::_('SELECT_ARTICLES_ABOUT');
     echo $this->articlesHTML();
 }
Esempio n. 27
0
<?php

/**
 * JFUploader 2.15.x Freeware - for Joomla 1.6.x
 *
 * Copyright (c) 2004-2011 TinyWebGallery
 * written by Michael Dempfle
 *
 * @license GNU / GPL 
 *   
 * For the latest version please go to http://jfu.tinywebgallery.com
**/
/** ensure this file is being included by a parent file */
defined('_JEXEC') or die('Restricted access');
require_once JApplicationHelper::getPath('toolbar_html');
if ($task) {
    $act = $task;
}
switch ($act) {
    case "edit":
    case "edituser":
    case "newConfig":
        TOOLBAR_jfuploader::_EDIT();
        break;
    case "config":
        TOOLBAR_jfuploader::_CONFIG();
        break;
    case "user":
        TOOLBAR_jfuploader::_USER();
        break;
    case "upload":
Esempio n. 28
0
 function display($tpl = null)
 {
     $doc =& JFactory::getDocument();
     if (JPATH_BASE != JPATH_ADMINISTRATOR) {
         $doc->addStyleSheet('components/com_bkef/css/general.css');
         $doc->addStyleSheet('components/com_bkef/css/component.css');
     }
     JHTML::_('behavior.modal');
     $doc->addStyleSheet('components/com_bkef/css/main.css');
     /*Ověření, jestli jde o přístup z administrace nebo front-endu*/
     require_once JApplicationHelper::getPath('toolbar_html');
     if (JPATH_BASE == JPATH_ADMINISTRATOR) {
         TOOLBAR_bkef::_DEFAULT();
     } else {
         TOOLBAR_bkef::frontend();
     }
     /**/
     $xml = $this->xml;
     $maId = intval($this->maId);
     $article = intval($this->article);
     $metaAttribute = $xml->MetaAttributes[0]->MetaAttribute[$maId];
     /*PATH*/
     echo '<div class="navigationDiv">';
     echo '<a href="index.php?option=com_bkef&amp;task=selArticle&amp;article=' . $article . '">' . $xml->Header[0]->Title[0] . ' (' . $this->articleTitle . ')</a>';
     echo '&nbsp;-&gt;&nbsp;Group MetaAttribute: <strong>' . $xml->MetaAttributes[0]->MetaAttribute[$maId]->Name[0] . '</strong>';
     echo '</div>';
     /**/
     echo '<h1>' . JText::_('GROUP_METAATTRIBUTE') . ': ' . $metaAttribute->Name[0] . '</h1>';
     echo '<div class="level1Div">';
     echo '<table>
           <tr>
             <td>' . JText::_('VARIABILITY') . '</td>
             <td><strong>' . $metaAttribute->Variability[0] . '</strong></td>
           </tr>
           <tr>
             <td>' . JText::_('CREATED') . '</td>
             <td><strong>' . date(JText::_('DATETIMEFORMAT'), strtotime($metaAttribute->Created[0]->Timestamp)) . ' (' . $metaAttribute->Created[0]->Author . ')' . '</strong></td>
           </tr>
           <tr>
             <td>' . JText::_('LAST_MODIFIED') . '</td>
             <td><strong>' . date(JText::_('DATETIMEFORMAT'), strtotime($metaAttribute->LastModified[0]->Timestamp)) . ' (' . $metaAttribute->LastModified[0]->Author . ')' . '</strong></td>
           </tr>
         </table>';
     if (count(@$metaAttribute->Annotations[0]->Annotation) > 0) {
         echo '<h3>' . JText::_('ANNOTATIONS') . '</h3>';
         $anId = 0;
         foreach ($metaAttribute->Annotations[0]->Annotation as $annotation) {
             echo '<div class="annotation level2Div">';
             echo '<strong>' . ($annotation->Text[0] != '' ? $annotation->Text[0] : '&lt;&lt;???&gt;&gt;') . '</strong>';
             echo '<br />' . JText::_('CREATED') . ': ' . $annotation->Created[0]->Author . ' (' . date(JText::_('DATETIMEFORMAT'), strtotime($annotation->Created[0]->Timestamp)) . ')';
             if ((string) $annotation->Created[0]->Timestamp != (string) $annotation->LastModified[0]->Timestamp) {
                 echo '; ' . JText::_('LAST_MODIFIED') . ': ' . $annotation->LastModified[0]->Author . ' (' . date(JText::_('DATETIMEFORMAT'), strtotime($annotation->LastModified[0]->Timestamp)) . ')';
             }
             echo ' |&nbsp;';
             echo '<a class="modal" href="index.php?option=com_bkef&amp;task=editMetaAttributeAnnotation&amp;article=' . $this->article . '&amp;tmpl=component&amp;maId=' . $maId . '&amp;anId=' . $anId . '" rel="{handler: \'iframe\', size: {x: 500, y: 330}}" >' . JText::_('EDIT_ANNOTATION') . '</a> ';
             echo ' |&nbsp;';
             echo '<a class="modal" href="index.php?option=com_bkef&amp;task=deleteMetaAttributeAnnotation&amp;article=' . $this->article . '&amp;tmpl=component&amp;maId=' . $maId . '&amp;anId=' . $anId . '" rel="{handler: \'iframe\', size: {x: 500, y: 330}}" >' . JText::_('DELETE_ANNOTATION') . '</a> ';
             echo '</div>';
             $anId++;
         }
     }
     echo '</div>';
     echo '<div class="linksDiv">
           <a class="modal" href="index.php?option=com_bkef&amp;task=editGroupMetaAttribute&amp;article=' . $this->article . '&amp;tmpl=component&amp;maId=' . $maId . '" rel="{handler: \'iframe\', size: {x: 500, y: 330}}">' . JText::_('EDIT_META') . '...</a>
           <a class="modal" href="index.php?option=com_bkef&amp;task=addMetaAttributeAnnotation&amp;article=' . $this->article . '&amp;tmpl=component&amp;maId=' . $maId . '" rel="{handler: \'iframe\', size: {x: 500, y: 330}}">' . JText::_('ADD_ANNOTATION') . '...</a>
         </div><br />';
     echo '<div class="infotext">' . JText::_('CHILDREN_BASIC_METAATTRIBUTES_INFO') . '</div>';
     echo '<h2>' . JText::_('CHILDREN_BASIC_METAATTRIBUTES') . '</h2>';
     if (count($metaAttribute->ChildMetaAttribute) > 0) {
         echo '<table class="adminlist">';
         echo '<thead><tr><th>' . JText::_('NAME') . '</th><th>' . JText::_('ACTIONS') . '</th></tr></thead>';
         $childArr = array();
         foreach ($metaAttribute->ChildMetaAttribute as $childMeta) {
             $childArr[] = intval($childMeta['id']);
         }
         $childId = 0;
         $row = 0;
         foreach ($xml->MetaAttributes[0]->MetaAttribute as $meta) {
             if (in_array(intval($meta[id]), $childArr)) {
                 echo '<tr class="row' . $fId % 2 . '"><td><a href="index.php?option=com_bkef&task=metaAttribute&article=' . $this->article . '&maId=' . $childId . '"><strong>' . $meta->Name[0] . '</strong></td><td width="200">';
                 echo '<a class="modal" href="index.php?option=com_bkef&amp;task=delChildMeta&amp;article=' . $this->article . '&amp;tmpl=component&amp;maId=' . $maId . '&amp;childId=' . array_search(intval($meta[id]), $childArr) . '" rel="{handler: \'iframe\', size: {x: 400, y: 200}}">' . JText::_('DELETE_CHILD_META') . '</a>';
                 echo '</td></tr>';
             }
             $childId++;
         }
         foreach ($metaAttribute->ChildMetaattribute as $childMeta) {
             $fId++;
         }
         echo '</table>';
     } else {
         echo '<div class="missing infotext">' . JText::_('NO_CHILDREN_INFO') . '</div>';
     }
     echo '<div class="linksDiv"><a href="index.php?option=com_bkef&amp;task=addChildMeta&amp;maId=' . $maId . '&amp;article=' . $this->article . '&amp;tmpl=component" rel="{handler: \'iframe\', size: {x: 500, y: 195}}" class="modal">' . JText::_('ADD_CHILD_META') . '</a></div>';
     ?>
   
   
   <?php 
 }
Esempio n. 29
0
 /**
  * Render the component.
  *
  * @param   string  $option  The component option.
  * @param   array   $params  The component parameters
  *
  * @return  object
  *
  * @since   11.1
  */
 public static function renderComponent($option, $params = array())
 {
     // Initialise variables.
     $app = JFactory::getApplication();
     // Load template language files.
     $template = $app->getTemplate(true)->template;
     $lang = JFactory::getLanguage();
     $lang->load('tpl_' . $template, JPATH_BASE, null, false, false) || $lang->load('tpl_' . $template, JPATH_THEMES . "/{$template}", null, false, false) || $lang->load('tpl_' . $template, JPATH_BASE, $lang->getDefault(), false, false) || $lang->load('tpl_' . $template, JPATH_THEMES . "/{$template}", $lang->getDefault(), false, false);
     if (empty($option)) {
         // Throw 404 if no component
         JError::raiseError(404, JText::_('JLIB_APPLICATION_ERROR_COMPONENT_NOT_FOUND'));
         return;
     }
     // Record the scope
     $scope = $app->scope;
     // Set scope to component name
     $app->scope = $option;
     // Build the component path.
     $option = preg_replace('/[^A-Z0-9_\\.-]/i', '', $option);
     $file = substr($option, 4);
     // Define component path.
     define('JPATH_COMPONENT', JPATH_BASE . '/components/' . $option);
     define('JPATH_COMPONENT_SITE', JPATH_SITE . '/components/' . $option);
     define('JPATH_COMPONENT_ADMINISTRATOR', JPATH_ADMINISTRATOR . '/components/' . $option);
     // Get component path
     if ($app->isAdmin() && file_exists(JPATH_COMPONENT . '/admin.' . $file . '.php')) {
         $path = JPATH_COMPONENT . '/admin.' . $file . '.php';
     } else {
         $path = JPATH_COMPONENT . '/' . $file . '.php';
     }
     // If component is disabled throw error
     if (!self::isEnabled($option) || !file_exists($path)) {
         JError::raiseError(404, JText::_('JLIB_APPLICATION_ERROR_COMPONENT_NOT_FOUND'));
     }
     $task = JRequest::getString('task');
     // Load common and local language files.
     $lang->load($option, JPATH_BASE, null, false, false) || $lang->load($option, JPATH_COMPONENT, null, false, false) || $lang->load($option, JPATH_BASE, $lang->getDefault(), false, false) || $lang->load($option, JPATH_COMPONENT, $lang->getDefault(), false, false);
     // Handle template preview outlining.
     $contents = null;
     // Execute the component.
     $contents = self::executeComponent($path);
     // Build the component toolbar
     $path = JApplicationHelper::getPath('toolbar');
     if ($path && $app->isAdmin()) {
         // Get the task again, in case it has changed
         $task = JRequest::getString('task');
         // Make the toolbar
         include_once $path;
     }
     // Revert the scope
     $app->scope = $scope;
     return $contents;
 }
/**
* RSGallery2 Toolbar Menu
* @version $Id: toolbar.rsgallery2.php 1010 2011-01-26 15:26:17Z mirjam $
* @package RSGallery2
* @copyright (C) 2003 - 2006 RSGallery2
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
**/
defined('_JEXEC') or die;
// RSG2 is a metacomponent.  joomla calls components options, RSG2 calls it's components rsgOptions
if (isset($_REQUEST['rsgOption'])) {
    $rsgOption = $_REQUEST['rsgOption'];
} else {
    $rsgOption = '';
}
require_once JApplicationHelper::getPath('toolbar_html');
require_once JApplicationHelper::getPath('toolbar_default');
switch ($rsgOption) {
    case 'images':
        switch ($task) {
            case 'new':
            case 'edit':
            case 'editA':
                menu_rsg2_images::edit($option);
                break;
            case 'remove':
                menu_rsg2_images::remove($option);
                break;
            case 'upload':
                menu_rsg2_images::upload($option);
                break;
            case "batchupload":