Example #1
0
// Will be overwritten during initialization process
// @see EasySCP_Initializer::_setDisplayErrors()
ini_set('display_errors', 1);
// Define path for the EasySCP include directory
define('INCLUDEPATH', dirname(__FILE__));
/**
 * Register the AutoLoader for needed Classes
 */
require_once INCLUDEPATH . '/easyscp-autoloader.php';
spl_autoload_register('AutoLoader::loadClass');
/**
 * Exception Handler for uncaught exceptions
 *
 * Sets the exception handler for uncaught exceptions
 */
EasySCP_Exception::setHandler();
/**
 * Encryption data
 */
require_once INCLUDEPATH . '/easyscp-load-db-keys.php';
if ($easyscp_db_pass_key != '{KEY}' && $easyscp_db_pass_iv != '{IV}') {
    EasySCP_Registry::set('MCRYPT_KEY', $easyscp_db_pass_key);
    EasySCP_Registry::set('MCRYPT_IV', $easyscp_db_pass_iv);
    unset($easyscp_db_pass_key, $easyscp_db_pass_iv);
} else {
    throw new EasySCP_Exception('Error: Database key and/or initialization vector was not generated!');
}
/**
 * Include EasySCP common functions
 */
require_once 'Net/IDNA2.php';
Example #2
0
 /**
  * Prepares the template
  *
  * @return void
  */
 protected static function prepareTemplate()
 {
     self::$EasySCP_TemplateEngine = EasySCP_TemplateEngine::getInstance();
     // check if i18n support is available
     if (function_exists('tr')) {
         self::$EasySCP_TemplateEngine->assign(array('TR_PAGE_TITLE' => tr('EasySCP Error'), 'THEME_CHARSET' => tr('encoding'), 'MSG_TYPE' => 'error', 'MESSAGE' => self::$exceptionMessage));
     } else {
         self::$EasySCP_TemplateEngine->assign(array('TR_PAGE_TITLE' => 'EasySCP Error', 'THEME_CHARSET' => 'UTF-8', 'MSG_TYPE' => 'error', 'MESSAGE' => self::$exceptionMessage));
     }
 }