Exemplo n.º 1
0
 function __construct()
 {
     $this->cipher = MCRYPT_RIJNDAEL_256;
     $this->mode = MCRYPT_MODE_ECB;
     includeeasyhelper('logger');
     adddependency($this->getlibraryname(), $this->getversion(), COMPONENT_LIBRARY, 'logger', '1.0.0.2', COMPONENT_HELPER);
 }
 function __construct()
 {
     parent::__construct();
     includeeasyhelper('logger');
     adddependency($this->gethandlername(), $this->getversion(), COMPONENT_HANDLER, 'logger', '1.0.0.2', COMPONENT_HELPER);
     adddependency($this->gethandlername(), $this->getversion(), COMPONENT_HANDLER, 'easysecurity', '1.0.0.0', COMPONENT_LIBRARY);
     $this->easysecurity = geteasylibrary('easysecurity');
 }
Exemplo n.º 3
0
 /**
  * @brief Constructor
  */
 function __construct()
 {
     includeeasyhelper('logger');
     includeeasyhelper('showerror');
     includeeasylibrary('easyinireaderwriter');
     log_message(LOGGER_DEBUG, 'called function: ' . $this->getlibraryname() . '.' . __FUNCTION__ . ' begin');
     //log_message ( LOGGER_SYSTEM, $this->getlibraryname () . ' library is inited. version:' . $this->getversion () );
     adddependency($this->getlibraryname(), $this->getversion(), COMPONENT_LIBRARY, 'logger', '1.0.0.2', COMPONENT_HELPER);
     adddependency($this->getlibraryname(), $this->getversion(), COMPONENT_LIBRARY, 'easyinireaderwriter', '1.0.0.5', COMPONENT_LIBRARY);
     $this->acturl = $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];
     $this->segments = array();
     $this->controller = '';
     $this->functionname = '';
     $tacturl = $this->acturl;
     $tbaseurl = substr(geteasy()->getbaseurl(), strpos(geteasy()->getbaseurl(), '://') + 3);
     if (substr($tacturl, 0, strlen($tbaseurl)) == $tbaseurl) {
         $tacturl = substr($tacturl, strlen($tbaseurl));
         // Find parameters
         $poz = strpos($tacturl, '?');
         if ($poz !== FALSE) {
             $arr = explode('&', substr($tacturl, $poz + 1));
             foreach ($arr as $item) {
                 $par = explode('=', $item);
                 $this->parameters[] = array('name' => isset($par[0]) ? urldecode($par[0]) : '', 'value' => isset($par[1]) ? urldecode($par[1]) : '');
             }
             log_message(LOGGER_INFO, 'found parameters=' . print_r($this->parameters, true));
             $tacturl = substr($tacturl, 0, strpos($tacturl, '?'));
         } else {
             $this->parameters = array();
         }
         if (!$tacturl || strtoupper($tacturl) == 'INDEX.PHP') {
             // Not found method
             getinivalue('config', 'config.ini', 'routes', 'default', 'default/index');
             // Create if not exists
             $tacturl = 'default';
         } else {
             // remove index.php
             $tacturl = str_replace('index.php/', '', $tacturl);
             $tacturl = str_replace('index.php', '', $tacturl);
         }
         if (!$this->parsemethod($tacturl)) {
             /*Show error*/
             $arr = explode('/', $tacturl);
             log_message(LOGGER_SYSTEM, print_r($arr[0], true) . ' method not found!');
             showerror('Hiba', 'A ' . $arr[0] . ' metódus nem található', '');
             exit;
         }
     } else {
         /*Show error*/
         log_message(LOGGER_SYSTEM, print_r($tbaseurl, true) . ' is not set in config file\'s baseurl entry!');
         showerror('Hiba', 'A megadott URL nem felel meg a config fájlban beállított baseurl értékének.', '');
         exit;
     }
     log_message(LOGGER_DEBUG, 'called function: ' . $this->getlibraryname() . '.' . __FUNCTION__ . ' end');
 }
Exemplo n.º 4
0
 /**
  * @brief Constructor
  */
 function __construct()
 {
     log_message(LOGGER_DEBUG, 'called function: ' . $this->getlibraryname() . '.' . __FUNCTION__ . ' begin');
     // log_message ( LOGGER_SYSTEM, $this->getlibraryname () . ' library is inited. version:' . $this->getversion () );
     if ($this->getmoduletype() == COMPONENT_CONTROLLER) {
         adddependency($this->getlibraryname(), $this->getversion(), COMPONENT_LIBRARY, 'logger', '1.0.0.2', COMPONENT_HELPER);
         adddependency($this->getcontrollername(), $this->getcontrollerversion(), COMPONENT_CONTROLLER, $this->getlibraryname(), $this->getversion(), COMPONENT_LIBRARY);
         adddependency($this->getcontrollername(), $this->getcontrollerversion(), COMPONENT_CONTROLLER, 'html', '1.0.0.1', COMPONENT_HELPER);
         adddependency($this->getcontrollername(), $this->getcontrollerversion(), COMPONENT_CONTROLLER, 'showerror', '1.0.0.0', COMPONENT_HELPER);
     }
     log_message(LOGGER_DEBUG, 'called function: ' . $this->getlibraryname() . '.' . __FUNCTION__ . ' end');
 }
 /**
  * @brief Constructor
  */
 function __construct()
 {
     includeeasyhelper('utils');
     includeeasyhelper('logger');
     // log_message ( LOGGER_DEBUG, 'called function: ' . $this->getlibraryname () . '.' . __FUNCTION__ . ' begin' );
     conddefine('EIRW_UNKNOWN_TYPE', 0);
     conddefine('EIRW_COMMENT', 1);
     conddefine('EIRW_LABELANDVALUE', 2);
     conddefine('EIRW_LABELANDVALUEANDCOMMENT', 3);
     conddefine('EIRW_SECTION', 4);
     conddefine('EIRW_SECTIONANDCOMMENT', 5);
     conddefine('EIRW_EMPTY', 6);
     if (!defined('easyinireaderwriter_inited')) {
         define('easyinireaderwriter_inited', true);
     }
     //log_message ( LOGGER_SYSTEM, $this->getlibraryname () . ' library is inited. version:' . $this->getversion () );
     adddependency($this->getlibraryname(), $this->getversion(), COMPONENT_LIBRARY, 'utils', '1.0.0.2', COMPONENT_HELPER);
     adddependency($this->getlibraryname(), $this->getversion(), COMPONENT_LIBRARY, 'logger', '1.0.0.2', COMPONENT_HELPER);
     // log_message ( LOGGER_DEBUG, 'called function: ' . $this->getlibraryname () . '.' . __FUNCTION__ . ' end' );
 }
Exemplo n.º 6
0
 /**
  * @brief Init
  */
 function init()
 {
     if (!defined('easyframework_inited')) {
         define('easyframework_inited', true);
     }
     includeeasyhelper('constants');
     includeeasyhelper('dependency');
     includeeasyhelper('logger');
     log_message(LOGGER_SYSTEM, 'Loading dependency informations begin ---------------------------------------');
     adddependencyofall();
     log_message(LOGGER_SYSTEM, 'Loading dependency informations end -----------------------------------------');
     includeeasyhelper('dependency');
     includeeasyhelper('constants');
     includeeasyhelper('logger');
     includeeasyhelper('utils');
     includeeasyhelper('ini');
     adddependency(easy::$instance->getlibraryname(), $this->getversion(), COMPONENT_LIBRARY, 'logger', '1.0.0.2', COMPONENT_HELPER);
     adddependency(easy::$instance->getlibraryname(), $this->getversion(), COMPONENT_LIBRARY, 'easyinireaderwriter', '1.0.0.5', COMPONENT_LIBRARY);
     adddependency(easy::$instance->getlibraryname(), $this->getversion(), COMPONENT_LIBRARY, 'ini', '1.0.0.1', COMPONENT_HELPER);
     adddependency(easy::$instance->getlibraryname(), $this->getversion(), COMPONENT_LIBRARY, 'utils', '1.0.0.3', COMPONENT_HELPER);
     log_message(LOGGER_SYSTEM, $this->getlibraryname() . ' library is inited. version:' . $this->getversion());
 }
Exemplo n.º 7
0
        return $retval;
    }
}
if (!function_exists('getinireqvalue')) {
    function getinireqvalue($folder, $inifile, $section, $label)
    {
        $retval = false;
        if (file_exists($folder)) {
            $ini = geteasylibrary('easyinireaderwriter');
            if ($ini->loadinifile($folder . '/' . $inifile)) {
                $retval = $ini->getvalue($section, $label);
            }
        }
        return $retval;
    }
}
if (!defined('ini_inited')) {
    define('ini_inited', true);
    /**
     *  @brief Get ini version
     *  
     *  @retval ini version
     */
    if (!function_exists('getiniversion')) {
        function getiniversion()
        {
            return '1.0.0.1';
        }
    }
    adddependency('ini', getiniversion(), COMPONENT_HELPER, 'utils', '1.0.0.2', COMPONENT_HELPER);
}
Exemplo n.º 8
0
    /**
     *  @brief Get logger version
     *  
     *  @retval logger version
     */
    if (!function_exists('getloggerversion')) {
        function getloggerversion()
        {
            return '1.0.0.2';
        }
    }
    if (!function_exists('setloglevel')) {
        /**
         *  @brief Setting log level
         *  
         *  @param [in] $level new log level
         *  @return old log level
         */
        function setloglevel($level)
        {
            $g_logger_loglevel =& geteasy()->getloglevel();
            $old = $g_logger_loglevel;
            $g_logger_loglevel = intval($level);
            log_message(LOGGER_DEBUG, 'called function: ' . __FUNCTION__ . ' with $level=' . $g_logger_loglevel);
            return $old;
        }
    }
    $g_logger_inited = TRUE;
    setloglevel(LOGGER_DISABLED);
    adddependency('logger', getloggerversion(), COMPONENT_HELPER, 'utils', '1.0.0.2', COMPONENT_HELPER);
}
Exemplo n.º 9
0
 */
/**
 * @brief Echo html begin
 * @caption - Error caption
 * @errormessage - Error message
 * @backurl - Show okay button for returning an URL
 * @viewname - default error view
 */
if (!function_exists('showerror')) {
    function showerror($caption = 'Error', $errormessage = '', $backurl = '', $viewname = 'defaulterror', $type = 'error')
    {
        $showerrorhandler = geteasyhandler('showerrorhandler');
        $showerrorhandler->showerror($caption, $errormessage, $backurl, $viewname, $type);
    }
}
if (!defined('showerror_inited')) {
    define('showerror_inited', true);
    /**
     * @brief Get logger version
     *
     * @retval logger version
     */
    if (!function_exists('getshowerrorversion')) {
        function getshowerrorversion()
        {
            return '1.0.0.1';
        }
    }
    adddependency('showerror', getshowerrorversion(), COMPONENT_HELPER, 'utils', '1.0.0.2', COMPONENT_HELPER);
    adddependency('showerror', getshowerrorversion(), COMPONENT_HELPER, 'easycontroller', '1.0.0.0', COMPONENT_LIBRARY);
}
Exemplo n.º 10
0
    {
        echo '</li>' . GETBR();
    }
}
/**
 *  @brief Load svg image. If it is not success then try to load png. For example:
 *  if logo.svg is can not load try to load logo.png   
 */
if (!function_exists('SVG')) {
    function SVG($name, $tagid = '', $tagclass = '', $additional = '')
    {
        $name = geteasy()->getbaseurl() . 'images/logo';
        echo '<img ' . ($tagid != '' ? 'id="' . $tagid . '"' : '') . ' ' . ($tagclass != '' ? 'class="' . $tagclass . '"' : '') . ' src="' . $name . '.svg" onerror="this.onerror=null; this.src=\'' . $name . '.png\'" ' . $additional . '/>';
    }
}
includeeasyhelper('utils');
if (!defined('html_inited')) {
    define('html_inited', true);
    /**
     *  @brief Get logger version
     *  
     *  @retval logger version
     */
    if (!function_exists('gethtmlversion')) {
        function gethtmlversion()
        {
            return '1.0.0.2';
        }
    }
    adddependency('html', gethtmlversion(), COMPONENT_HELPER, 'utils', '1.0.0.2', COMPONENT_HELPER);
}
Exemplo n.º 11
0
 function __construct()
 {
     includeeasylibrary('easyinireaderwriter');
     includeeasyhelper('showerror');
     includeeasyhelper('utils');
     adddependency($this->getlibraryname(), $this->getversion(), COMPONENT_LIBRARY, 'easyinireaderwriter', '1.0.0.5', COMPONENT_LIBRARY);
     adddependency($this->getlibraryname(), $this->getversion(), COMPONENT_LIBRARY, 'showerror', '1.0.0.0', COMPONENT_HELPER);
     adddependency($this->getlibraryname(), $this->getversion(), COMPONENT_LIBRARY, 'utils', '1.0.0.2', COMPONENT_HELPER);
     $this->mode = getinivalue('config', 'config.ini', 'system', 'session_mode', 'generic');
     switch (strtoupper($this->mode)) {
         case 'GENERIC':
             $this->handler = geteasyhandler('easygenericsession');
             break;
         case 'FILE':
             showerror($caption = 'Information', $errormessage = 'File based session handler is not implemented!', '', 'defaulterror', 'info');
             break;
         case 'DATABASE':
             showerror($caption = 'Information', $errormessage = 'Database based session handler is not implemented!', '', 'defaulterror', 'info');
             break;
     }
     $this->handleerror($this->create());
 }
Exemplo n.º 12
0
 function __construct()
 {
     parent::__construct();
     adddependency($this->gethandlername(), $this->getversion(), COMPONENT_HANDLER, 'logger', '1.0.0.2', COMPONENT_HELPER);
     adddependency($this->gethandlername(), $this->getversion(), COMPONENT_HANDLER, 'easycontroller', '1.0.0.2', COMPONENT_CONTROLLER);
 }