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'); }
/** * @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'); }
function addmoduletodependency($modulename, $type, $dir) { if ($type == COMPONENT_HELPER) { includeeasyhelper($modulename); } else { if ($type == COMPONENT_LIBRARY || $type == COMPONENT_CONTROLLER || $type == COMPONENT_HANDLER) { includeeasymodule($dir . '/', $modulename); if (class_exists($modulename)) { $rc = new ReflectionClass($modulename); //echo $dir . '/', $modulename.' :'.$modulename.' rc:'.$rc.'<br>'; if (!$rc->isAbstract()) { $lib = new $modulename(); unset($lib); } unset($rc); } } } }
/** * @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' ); }
/** * @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()); }
{ 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); }
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()); }
if (!defined('easyframework_inited')) { exit('No direct script access allowed'); } /** * @file easycontroller.php * @brief Controller base class * * @author Vajay Attila (https://github.com/vajayattila/easyphpframe/) * @email vajay.attila@gmail.com * @date 2016.02.17. - 2016.03.11. * @copyright MIT License (MIT) */ includeeasyhelper('logger'); includeeasyhelper('html'); includeeasyhelper('showerror'); abstract class easycontroller { /** * @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); }
<?php if (!defined('easyframework_inited')) { exit('No direct script access allowed'); } /** * @file showerrorhandler.php * @brief Error showing handler * * @author Vajay Attila (https://github.com/vajayattila/easyphpframe/) * @email vajay.attila@gmail.com * @date 2016-03-11 * @copyright MIT License (MIT) */ includeeasylibrary('easycontroller'); includeeasyhelper('logger'); /* * @brief Error showing controller */ class showerrorhandler extends easycontroller { protected $errorcaption; protected $errormessage; protected $backurl; protected $type; 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); }