application/install/templates/images/de/.htaccess -text
application/install/templates/images/de/image/.htaccess -text
application/install/templates/images/de/image/base_code.xml -text
-application/install/templates/images/de/image/code_captcha.xml -text
+application/install/templates/images/de/image/code_captcha.img -text
/clear-cache.sh -text
db/.htaccess -text
docs/COPYING -text
--- /dev/null
+<?php
+// Needed in every image template to initialy set the image type
+$helper = ImageHelper::createImageHelper($this, "png");
+$helper->setImageName("code_captcha");
+$helper->setBaseImage("base_code");
+
+// Set image dimensions
+$helper->setWidth(100);
+$helper->setHeight(50);
+
+// Get random number
+$rand = $helper->getRngInstance()->randomNumber(0, 6);
+
+// Background and foreground color
+switch ($rand) {
+ case 1:
+ // First varriant
+ $helper->setBackgroundColorRedGreenBlue('rand', 0x90 , 0x00 );
+ $helper->setForegroundColorRedGreenBlue(0x00 , 0xff , 'rand');
+ break;
+
+ case 2:
+ // Second varriant
+ $helper->setBackgroundColorRedGreenBlue(0x90 , 'rand', 0x00 );
+ $helper->setForegroundColorRedGreenBlue(0xff , 0x00 , 'rand');
+ break;
+
+ case 3:
+ // Third varriant
+ $helper->setBackgroundColorRedGreenBlue('rand', 0x00 , 0x90 );
+ $helper->setForegroundColorRedGreenBlue(0x00 , 'rand', 0xff );
+ break;
+
+ case 4:
+ // Forth varriant
+ $helper->setBackgroundColorRedGreenBlue(0x00 , 0x90 , 'rand');
+ $helper->setForegroundColorRedGreenBlue(0x00 , 'rand', 0xa0 );
+ break;
+
+ case 5:
+ // Fith varriant
+ $helper->setBackgroundColorRedGreenBlue('rand', 0x00 , 0x90 );
+ $helper->setForegroundColorRedGreenBlue(0x00 , 0xe0 , 'rand');
+ break;
+
+ default:
+ // Last varriant
+ $helper->setBackgroundColorRedGreenBlue(0x00 , 'rand', 0x90 );
+ $helper->setForegroundColorRedGreenBlue(0xff , 0x00 , 'rand');
+ break;
+}
+
+// Random X/Y factors...
+$xRand = $helper->getRngInstance()->randomNumber(0, 45);
+$yRand = $helper->getRngInstance()->randomNumber(0, 25);
+
+// Add code
+$helper->addTextLine("code");
+$helper->setCoord((5 + $xRand), (5 + $yRand));
+$helper->setFontSize('rand');
+$helper->setImageString("{?decrypted_code?}");
+
+// Only for debug!
+/*
+$helper->addTextLine("debug");
+$helper->setCoord(90, 35);
+$helper->setFontSize(3);
+$helper->setImageString($rand);
+*/
+
+// Flush content to the template engine
+$helper->flushContent();
+
+// Comment this out if image is done
+//$this->debugInstance();
+
+// [EOF]
+?>
+++ /dev/null
-<?php
-// Needed in every image template to initialy set the image type
-$helper = ImageHelper::createImageHelper($this, "png");
-$helper->setImageName("code_captcha");
-$helper->setBaseImage("base_code");
-
-// Set image dimensions
-$helper->setWidth(100);
-$helper->setHeight(50);
-
-// Get random number
-$rand = $helper->getRngInstance()->randomNumber(0, 6);
-
-// Background and foreground color
-switch ($rand) {
- case 1:
- // First varriant
- $helper->setBackgroundColorRedGreenBlue('rand', 0x90 , 0x00 );
- $helper->setForegroundColorRedGreenBlue(0x00 , 0xff , 'rand');
- break;
-
- case 2:
- // Second varriant
- $helper->setBackgroundColorRedGreenBlue(0x90 , 'rand', 0x00 );
- $helper->setForegroundColorRedGreenBlue(0xff , 0x00 , 'rand');
- break;
-
- case 3:
- // Third varriant
- $helper->setBackgroundColorRedGreenBlue('rand', 0x00 , 0x90 );
- $helper->setForegroundColorRedGreenBlue(0x00 , 'rand', 0xff );
- break;
-
- case 4:
- // Forth varriant
- $helper->setBackgroundColorRedGreenBlue(0x00 , 0x90 , 'rand');
- $helper->setForegroundColorRedGreenBlue(0x00 , 'rand', 0xa0 );
- break;
-
- case 5:
- // Fith varriant
- $helper->setBackgroundColorRedGreenBlue('rand', 0x00 , 0x90 );
- $helper->setForegroundColorRedGreenBlue(0x00 , 0xe0 , 'rand');
- break;
-
- default:
- // Last varriant
- $helper->setBackgroundColorRedGreenBlue(0x00 , 'rand', 0x90 );
- $helper->setForegroundColorRedGreenBlue(0xff , 0x00 , 'rand');
- break;
-}
-
-// Random X/Y factors...
-$xRand = $helper->getRngInstance()->randomNumber(0, 45);
-$yRand = $helper->getRngInstance()->randomNumber(0, 25);
-
-// Add code
-$helper->addTextLine("code");
-$helper->setCoord((5 + $xRand), (5 + $yRand));
-$helper->setFontSize('rand');
-$helper->setImageString("{?decrypted_code?}");
-
-// Only for debug!
-/*
-$helper->addTextLine("debug");
-$helper->setCoord(90, 35);
-$helper->setFontSize(3);
-$helper->setImageString($rand);
-*/
-
-// Flush content to the template engine
-$helper->flushContent();
-
-// Comment this out if image is done
-//$this->debugInstance();
-
-// [EOF]
-?>
* @param $silentMode Wether not silent mode is turned on
* @return void
*/
- public static function app_die ($message = "", $code = false, $extraData = "", $silentMode = false) {
+ public static function app_die ($message = '', $code = false, $extraData = '', $silentMode = false) {
// Is this method already called?
if (defined('EMERGENCY_EXIT_CALLED')) {
// Then output the text directly
// Is a message set?
if (empty($message)) {
// No message provided
- $message = "No message provided!";
+ $message = 'No message provided!';
} // END - if
// Get config instance
$configInstance = FrameworkConfiguration::getInstance();
// Do we have debug installation?
- if (($configInstance->readConfig('product_install_mode') == "productive") || ($silentMode === true)) {
+ if (($configInstance->readConfig('product_install_mode') == 'productive') || ($silentMode === true)) {
// Abort here
die();
} // END - if
// Get and prepare backtrace for output
$backtraceArray = debug_backtrace();
- $backtrace = "";
+ $backtrace = '';
foreach ($backtraceArray as $key => $trace) {
if (!isset($trace['file'])) $trace['file'] = __FILE__;
if (!isset($trace['line'])) $trace['line'] = __LINE__;
}
/**
- * Determines the correct absolute path for all include
+ * Determines the correct absolute path for all includes only once per run.
+ * Other calls of this method are being "cached".
*
* @return $basePath Base path (core) for all includes
*/