| Server IP : 195.130.67.5 / Your IP : 216.73.217.154 Web Server : Microsoft-IIS/10.0 System : Windows NT WEBSERVER1 10.0 build 17763 (Windows Server 2016) i586 User : IUSR ( 0) PHP Version : 7.4.19 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /inetpub/wwwroot/icd/modules/mod_jumi/ |
Upload File : |
<?php
/**
* @version $Id: helper.php 10 2008-10-30 10:50:25Z martin2hajek $
* @package Joomla! 1.5
* @copyright (c) 2008 Martin Hajek
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
*/
defined('_JEXEC') or die('Restricted access');
require_once (JPATH_SITE.DS.'components'.DS.'com_content'.DS.'helpers'.DS.'route.php');
class modJumiHelper
{
function getCodeWritten(&$params){ //returns code written or ""
return trim($params->get( 'code_written' ));
}
function getStorageSource(&$params){ //returns filepathname or a record id or ""
$storage=trim($params->get('source_code_storage'));
if ($storage!=""){
if ($id = substr(strchr($storage,"*"),1)) { //if record id return it
return (int)$id;
}
else { // else return filepathname
return $params->def('default_absolute_path',JPATH_ROOT).DS.$storage;
}
}
else {
return "";
}
}
function getCodeStored($source){ //returns code stored in the database or null.
$database = &JFactory::getDBO();
//$user = &JFactory::getUser();
//$database->setQuery("select custom_script from #__jumi where id = '{$source}' and access <= {$user->gid} and published = 1");
$database->setQuery("select custom_script from #__jumi where id = $source");
return $database->loadResult();
}
}
?>