Salve!
Utilizzo il cms joomla 3 per il mio sito. Un componente di nome Jumi che permette di utilizzare i codici php mi sta dando dei problemi quando vado a visualizzare nel frontend ciò che ho creato. Ed è un problema del componente perchè il mio codice testato altrove funziona!
mi appare questo messaggio di errore quando vado alla pagina che dovrebbe riportarmi un form scaturito dal codice php:
\components\com_jumi\views\application\view.html.p hp(77) : eval()'d code on line 135
questo è il file incriminato ma non riesco a risolvere:
Codice PHP:
<?php
/**
* @version $Id$
* @package Jumi
* @copyright (C) 2008 - 2015 Edvard Ananyan
* @license GNU/GPL v3 http://www.gnu.org/licenses/gpl.html
*/
defined('_JEXEC') or die('Restricted access');
jimport('joomla.application.component.view');
/**
* HTML Contact View class for the Contact component
*
* @package Joomla.Site
* @subpackage com_contact
* @since 1.5
*/
if(JV == 'j2') {
//j2 stuff here///////////////////////////////////////////////////////////////////////////////////////////////////////
class JumiViewApplication extends JView {
function display($tpl = null) {
// Initialise variables.
$fileid = JRequest::getInt('fileid');
$database = JFactory::getDBO();
$user = JFactory::getUser();
$document = JFactory::getDocument();
$mainframe = JFactory::getApplication();
//$database->setQuery("select * from #__jumi where id = '{$fileid}' and access <= {$user->gid} and published = 1");
$database->setQuery("select * from #__jumi where id = '{$fileid}' and published = 1");
$appl = $database->loadObject();
if(!is_object($appl))
echo '<div style="color:#FF0000;background:#FFFF00;">'.JText::_("The Jumi Application is Unpublished or Removed").'</div>';
$document->setTitle($appl->title);
eval('?>'.$appl->custom_script);
if(!empty($appl->path)) {
$filepath = JPATH_BASE.DS.$appl->path;
if(is_file($appl->path)) {
require($appl->path);
}
elseif(is_file($filepath))
require $filepath;
else
echo '<div style="color:#FF0000;background:#FFFF00;">The file '.$filepath.' does not exists.</div>';
}
echo $noscript = '<noscript><strong>JavaScript is currently disabled.</strong>Please enable it for a better experience of <a href="http://2glux.com/projects/jumi">Jumi</a>.</noscript>';
parent::display($tpl);
}
}
}
else {
//j3 stuff here///////////////////////////////////////////////////////////////////////////////////////////////////////
class JumiViewApplication extends JViewLegacy {
function display($tpl = null) {
// Initialise variables.
$fileid = JRequest::getInt('fileid');
$database = JFactory::getDBO();
$user = JFactory::getUser();
$document = JFactory::getDocument();
$mainframe = JFactory::getApplication();
//$database->setQuery("select * from #__jumi where id = '{$fileid}' and access <= {$user->gid} and published = 1");
$database->setQuery("select * from #__jumi where id = '{$fileid}' and published = 1");
$appl = $database->loadObject();
if(!is_object($appl))
echo '<div style="color:#FF0000;background:#FFFF00;">'.JText::_("The Jumi Application is Unpublished or Removed").'</div>';
$document->setTitle($appl->title);
eval('?>'.$appl->custom_script);
if(!empty($appl->path)) {
$filepath = JPATH_BASE.DS.$appl->path;
if(is_file($appl->path)) {
require($appl->path);
}
elseif(is_file($filepath))
require $filepath;
else
echo '<div style="color:#FF0000;background:#FFFF00;">The file '.$filepath.' does not exists.</div>';
}
echo $noscript = '<noscript><strong>JavaScript is currently disabled.</strong>Please enable it for a better experience of <a href="http://2glux.com/projects/jumi">Jumi</a>.</noscript>';
parent::display($tpl);
}
}
}