Index: branches/2.8.x/CHANGELOG
===================================================================
--- branches/2.8.x/CHANGELOG	(revision 1534)
+++ branches/2.8.x/CHANGELOG	(revision 1535)
@@ -11,6 +11,11 @@
 ! = Update/Change
 
 =========================== add small Features 2.8.2 ==========================
+10 Dez-2011 Build 1535 Dietmar Woellbrink (Luisehahne)
+! changes in code modul
++ add function getTableEngine to class.database 
++ add Quickskin to include folder
++ add reworkes Droplet SectionPicker to load modules frontend.css
 08 Dez-2011 Build 1534 Werner v.d.Decken(DarkViper)
 # /output_filter/filter-routines.php rel-URL Filter fixed for mailto-links
 08 Dez-2011 Build 1533 Dietmar Woellbrink (Luisehahne)
Index: branches/2.8.x/wb/include/quickSkin/class.quickskindebugger.php
===================================================================
--- branches/2.8.x/wb/include/quickSkin/class.quickskindebugger.php	(nonexistent)
+++ branches/2.8.x/wb/include/quickSkin/class.quickskindebugger.php	(revision 1535)
@@ -0,0 +1,384 @@
+<?php
+/*~ class.quickskindebugger.php
+.---------------------------------------------------------------------------.
+|  Software: QuickSkinDebugger Class * Used by QuickSkin Class              |
+|   Version: 5.0                                                            |
+|   Contact: andy.prevost@worxteam.com,andy@codeworx.ca                     |
+|      Info: http://quickskin.sourceforge.net                               |
+|   Support: http://sourceforge.net/projects/quickskin/                     |
+| ------------------------------------------------------------------------- |
+|    Author: Andy Prevost andy.prevost@worxteam.com (admin)                 |
+|    Author: Manuel 'EndelWar' Dalla Lana endelwar@aregar.it (former admin) |
+|    Author: Philipp v. Criegern philipp@criegern.com (original founder)    |
+| Copyright (c) 2002-2009, Andy Prevost. All Rights Reserved.               |
+|    * NOTE: QuickSkin is the SmartTemplate project renamed. SmartTemplate  |
+|            information and downloads can still be accessed at the         |
+|            smarttemplate.sourceforge.net site                             |
+| ------------------------------------------------------------------------- |
+|   License: Distributed under the Lesser General Public License (LGPL)     |
+|            http://www.gnu.org/copyleft/lesser.html                        |
+| This program is distributed in the hope that it will be useful - WITHOUT  |
+| ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or     |
+| FITNESS FOR A PARTICULAR PURPOSE.                                         |
+| ------------------------------------------------------------------------- |
+| We offer a number of paid services:                                       |
+| - Web Hosting on highly optimized fast and secure servers                 |
+| - Technology Consulting                                                   |
+| - Oursourcing (highly qualified programmers and graphic designers)        |
+'---------------------------------------------------------------------------'
+Last modified: January 01 2009 ~*/
+
+/* designed to work with PHP5 - will NOT work with PHP4 */
+
+class QuickSkinDebugger {
+
+  /* The template Filename
+   * @access private
+   */
+  private $filename;
+
+  /* The template itself
+   * @access private
+   */
+  private $template;
+
+  /* Default Left delimiter
+   * Can be overwritten by global configuration array $_CONFIG['left_delimiter']
+   * @access public
+   */
+  private $left_delimiter =  '{';
+
+  /* Default Right delimiter
+   * Can be overwritten by global configuration array $_CONFIG['right_delimiter']
+   * @access public
+   */
+  private $right_delimiter =  '}';
+
+  /* QuickSkinDebugger Constructor
+   * @param string $template_filename HTML Template Filename
+   */
+  function __construct( $template_filename, $right_delimiter = '}', $left_delimiter = '{' ) {
+    $this->filename  =  $template_filename;
+
+    /* Load Template */
+    if ($hd  =  @fopen($template_filename,  'r')) {
+      $this->template  =  fread($hd,  filesize($template_filename));
+      fclose($hd);
+    } else {
+      $this->template  =  'QuickSkin Debugger Error: File not found: ' . $template_filename;
+    }
+    $this->tab[0]  =  '';
+    for ($i=1;  $i < 10;  $i++) {
+      $this->tab[$i]  =  str_repeat('    ', $i);
+    }
+    $this->right_delimiter = $right_delimiter;
+    $this->left_delimiter = $left_delimiter;
+  }
+
+  /* Main Template Parser
+   * @param string $compiled_template_filename Compiled Template Filename
+   * @desc Creates Compiled PHP Template
+   */
+  function start ( $vars ) {
+    $page  =  $this->template;
+
+    $page  =  preg_replace("/(<!-- BEGIN [ a-zA-Z0-9_.]* -->)/",  "\n$1\n",  $page);
+    $page  =  preg_replace("/(<!-- IF .+? -->)/",  "\n$1\n",  $page);
+    $page  =  preg_replace("/(<!-- END.*? -->)/",  "\n$1\n",  $page);
+    $page  =  preg_replace("/(<!-- ELSEIF .+? -->)/",  "\n$1\n",  $page);
+    $page  =  preg_replace("/(<!-- ELSE [ a-zA-Z0-9_.]*-->)/",  "\n$1\n",  $page);
+
+    $page  =  $this->highlight_html($page);
+
+    $rows      =  explode("\n",  $page);
+    $page_arr  =  array();
+    $level     =  0;
+    $blocklvl  =  0;
+    $rowcnt    =  0;
+    $spancnt   =  0;
+    $offset    =  22;
+    $lvl_block =  array();
+    $lvl_row   =  array();
+    $lvl_typ   =  array();
+    foreach ($rows as $row) {
+      if ($row  =  trim($row)) {
+        $closespan  =  false;
+        if (substr($row, $offset, 12) == '&lt;!-- END ') {
+          if ($level < 1) {
+            $level++;
+            $error[$rowcnt]  =  'END Without BEGIN';
+          } elseif ($lvl_typ[$level] != 'BEGIN') {
+            $error[$lvl_row[$level]]  =  'IF without ENDIF';
+            $error[$rowcnt]  =  'END Without BEGIN';
+          }
+          $blocklvl--;
+          $level--;
+          $closespan  =  true;
+        }
+        if (substr($row, $offset, 14) == '&lt;!-- ENDIF ') {
+          if ($level < 1) {
+            $level++;
+            $error[$rowcnt]  =  'ENDIF Without IF';
+          } elseif ($lvl_typ[$level] != 'IF') {
+            $error[$lvl_row[$level]]  =  'BEGIN without END';
+            $error[$rowcnt]  =  'ENDIF Without IF';
+          }
+          $closespan  =  true;
+          $level--;
+        }
+        if ($closespan) {
+          $page_arr[$rowcnt-1]  .=  '</span>';
+        }
+        $this_row  =  $this->tab[$level] . $row;
+        if (substr($row, $offset, 12) == '&lt;!-- ELSE') {
+          if ($level < 1) {
+            $error[$rowcnt]  =  'ELSE Without IF';
+          } elseif ($lvl_typ[$level] != 'IF') {
+            $error[$rowcnt]  =  'ELSE Without IF';
+          } else {
+            $this_row  =  $this->tab[$level-1] . $row;
+          }
+        }
+        if (substr($row, $offset, 14) == '&lt;!-- BEGIN ') {
+          if ($blocklvl == 0) {
+            if ($lp = strpos($row, '--&gt;')) {
+              if ($blockname  =  trim(substr($row, $offset + 14, $lp -$offset -14))) {
+                if ($nr = count($vars[$blockname])) {
+                  $this_row  .=  $this->toggleview($nr . ' Entries');
+                } else {
+                  $this_row  .=  $this->toggleview('Emtpy');
+                }
+              }
+            }
+          } else {
+            $this_row  .=  $this->toggleview('[');
+          }
+          $blocklvl++;
+          $level++;
+          $lvl_row[$level]  =  $rowcnt;
+          $lvl_typ[$level]  =  'BEGIN';
+        } elseif (substr($row, $offset, 11) == '&lt;!-- IF ') {
+          $level++;
+          $lvl_row[$level]  =  $rowcnt;
+          $lvl_typ[$level]  =  'IF';
+          $this_row  .=  $this->toggleview();
+        }
+        $page_arr[]  =  $this_row;
+        $lvl_block[$rowcnt]  =  $blocklvl;
+        $rowcnt++;
+      }
+    }
+    if ($level > 0) {
+      $error[$lvl_row[$level]]  =  'Block not closed';
+    }
+
+    $page  =  join("\n", $page_arr);
+    $rows  =  explode("\n",  $page);
+    $cnt   =  count($rows);
+
+    for ($i = 0;  $i < $cnt;  $i++) {
+      /* Add Errortext */
+      if (isset($error)) {
+        if ($err = $error[$i]) {
+          $rows[$i]  =  '<b>' . $rows[$i] . '        ERROR: ' . $err . '!</b>';
+        }
+      }
+
+      /* Replace Scalars */
+      $right_delimiter = preg_quote($this->right_delimiter);
+      $left_delimiter = preg_quote($this->left_delimiter);
+      if (preg_match_all("/$left_delimiter([a-zA-Z0-9_. &;]+)$right_delimiter/", $rows[$i], $var)) {
+        foreach ($var[1] as $tag) {
+          $fulltag  =  $tag;
+          if ($delim = strpos($tag, ' &gt; ')) {
+            $tag  =  substr($tag, 0, $delim);
+          }
+          if (substr($tag, 0, 4) == 'top.') {
+            $title  =  $this->tip($vars[substr($tag, 4)]);
+          } elseif ($lvl_block[$i] == 0) {
+            $title  =  $this->tip($vars[$tag]);
+          } else {
+            $title  =  '[BLOCK?]';
+          }
+          $code  =  '<b title="' . $title . '">' . $left_delimiter . $fulltag . $right_delimiter . '</b>';
+          $rows[$i]  =  str_replace('{'.$fulltag.'}',  $code,  $rows[$i]);
+        }
+      }
+
+      /* Replace Extensions */
+      if (preg_match_all("/$left_delimiter([a-zA-Z0-9_]+):([^}]*)$right_delimiter/", $rows[$i], $var)) {
+        foreach ($var[2] as $tmpcnt => $tag) {
+          $fulltag  =  $tag;
+          if ($delim = strpos($tag, ' &gt; ')) {
+            $tag  =  substr($tag, 0, $delim);
+          }
+          if (strpos($tag, ',')) {
+            list($tag, $addparam)  =  explode(',', $tag, 2);
+          }
+          $extension  =  $var[1][$tmpcnt];
+
+          if (substr($tag, 0, 4) == 'top.') {
+            $title  =  $this->tip($vars[substr($tag, 4)]);
+          } elseif ($lvl_block[$i] == 0) {
+            $title  =  $this->tip($vars[$tag]);
+          } else {
+            $title  =  '[BLOCK?]';
+          }
+          $code  =  '<b title="' . $title . '">' . $this->left_delimiter . $extension . ':' . $fulltag . $this->right_delimiter . '</b>';
+          $rows[$i]  =  str_replace($this->left_delimiter . $extension . ':' . $fulltag . $this->right_delimiter,  $code,  $rows[$i]);
+        }
+      }
+
+      /* 'IF nnn' Blocks */
+      if (preg_match_all('/&lt;!-- IF ([a-zA-Z0-9_.]+) --&gt;/', $rows[$i], $var)) {
+        foreach ($var[1] as $tag) {
+          if (substr($tag, 0, 4) == 'top.') {
+            $title  =  $this->tip($vars[substr($tag, 4)]);
+          } elseif ($lvl_block[$i] == 0) {
+            $title  =  $this->tip($vars[$tag]);
+          } else {
+            $title  =  '[BLOCK?]';
+          }
+          $code  =  '<span title="' . $title . '">&lt;!-- IF ' . $tag . ' --&gt;</span>';
+          $rows[$i]  =  str_replace("&lt;!-- IF $tag --&gt;",  $code,  $rows[$i]);
+          if ($title == '[NULL]') {
+            $rows[$i]  =  str_replace('Hide',  'Show',  $rows[$i]);
+            $rows[$i]  =  str_replace('block',  'none',  $rows[$i]);
+          }
+        }
+      }
+    }
+    $page  =  join('<br>', $rows);
+
+    /* Print Header */
+    echo '<html><head><script type="text/javascript">
+        function toggleVisibility(el, src) {
+        var v = el.style.display == "block";
+        var str = src.innerHTML;
+        el.style.display = v ? "none" : "block";
+        src.innerHTML = v ? str.replace(/Hide/, "Show") : str.replace(/Show/, "Hide");}
+        </script></head><body>';
+
+    /* Print Index */
+    echo '<font face="Arial" Size="3"><b>';
+    echo 'QuickSkin Debugger<br>';
+    echo '<font size="2"><li>PHP-Script: ' . $_SERVER['SCRIPT_FILENAME'] . '</li><li>Template: ' . $this->filename . '</li></font><hr>';
+    echo '<li><a href="#template_code">Template</a></li>';
+    echo '<li><a href="#compiled_code">Compiled Template</a></li>';
+    echo '<li><a href="#data_code">Data</a></li>';
+    echo '</b></font><hr>';
+
+    /* Print Template */
+    echo '<a name="template_code"><br><font face="Arial" Size="3"><b>Template:</b>&nbsp;[<a href="javascript:void(\'\');" onclick="toggleVisibility(document.getElementById(\'Template\'), this); return false">Hide Ouptut</a>]</font><br>';
+    echo '<table border="0" cellpadding="4" cellspacing="1" width="100%" bgcolor="#C6D3EF"><tr><td bgcolor="#F0F0F0"><pre id="Template" style="display:block">';
+    echo $page;
+    echo '</pre></td></tr></table>';
+
+    /* Print Compiled Template */
+    if (@include_once ("class.quickskinparser.php")) {
+      $parser = new QuickSkinParser($this->filename);
+      $compiled  =  $parser->compile();
+      echo '<a name="compiled_code"><br><br><font face="Arial" Size="3"><b>Compiled Template:</b>&nbsp;[<a href="javascript:void(\'\');" onclick="toggleVisibility(document.getElementById(\'Compiled\'), this); return false">Hide Ouptut</a>]</font><br>';
+      echo '<table border="0" cellpadding="4" cellspacing="1" width="100%" bgcolor="#C6D3EF"><tr><td bgcolor="#F0F0F0"><pre id="Compiled" style="display:block">';
+      highlight_string($compiled);
+      echo '</pre></td></tr></table>';
+    } else {
+      exit( "QuickSkin Error: Cannot find class.quickskinparser.php; check QuickSkin installation");
+    }
+
+    /* Print Data */
+    echo '<a name="data_code"><br><br><font face="Arial" Size="3"><b>Data:</b>&nbsp;[<a href="javascript:void(\'\');" onclick="toggleVisibility(document.getElementById(\'Data\'), this); return false">Hide Ouptut</a>]</font><br>';
+    echo '<table border="0" cellpadding="4" cellspacing="1" width="100%" bgcolor="#C6D3EF"><tr><td bgcolor="#F0F0F0"><pre id="Data" style="display:block">';
+    echo $this->vardump($vars);
+    echo '</pre></td></tr></table></body></html>';
+  }
+
+  /* Insert Hide/Show Layer Switch
+   * @param string $suffix Additional Text
+   * @desc Insert Hide/Show Layer Switch
+   */
+  function toggleview ( $suffix = '') {
+    global $spancnt;
+
+    $spancnt++;
+    if ($suffix) {
+      $suffix  .=  ':';
+    }
+    $ret =  '[' . $suffix . '<a href="javascript:void(\'\');" onclick="toggleVisibility(document.getElementById(\'Block' . $spancnt . '\'), this); return false">Hide Block</a>]<span id="Block' . $spancnt . '" style="display:block">';
+    return $ret;
+  }
+
+  /* Create Title Text
+   * @param string $value Content
+   * @desc Create Title Text
+   */
+  function tip ( $value ) {
+    if (empty($value)) {
+      return '[NULL]';
+    } else {
+      $ret = htmlentities(substr($value,0,200));
+      return $ret;
+    }
+  }
+
+  /* Recursive Variable Display Output
+   * @param mixed $var Content
+   * @param int $depth Incremented Indent Counter for Recursive Calls
+   * @return string Variable Content
+   * @access private
+   * @desc Recursive Variable Display Output
+   */
+    function vardump($var, $depth = 0) {
+      if (is_array($var)) {
+        $result  =  "Array (" . count($var) . ")<BR>";
+        foreach(array_keys($var) as $key) {
+          $result  .=  $this->tab[$depth] . "<B>$key</B>: " . $this->vardump($var[$key],  $depth+1);
+        }
+        return $result;
+      } else {
+        $ret =  htmlentities($var) . '<BR>';
+        return $ret;
+      }
+    }
+
+  /* Splits Template-Style Variable Names into an Array-Name/Key-Name Components
+   * @param string $tag Variale Name used in Template
+   * @return array  Array Name, Key Name
+   * @access private
+   * @desc Splits Template-Style Variable Names into an Array-Name/Key-Name Components
+   */
+  function var_name($tag) {
+    $parent_level  =  0;
+    while (substr($tag, 0, 7) == 'parent.') {
+      $tag  =  substr($tag, 7);
+      $parent_level++;
+    }
+    if (substr($tag, 0, 4) == 'top.') {
+      $ret = array('_stack[0]', substr($tag,4));
+      return $ret;
+    } elseif ($parent_level) {
+      $ret = array('_stack[$_stack_cnt-'.$parent_level.']', $tag);
+      return $ret;
+    } else {
+      $ret = array('_obj', $tag);
+      return $ret;
+    }
+  }
+
+  /* Highlight HTML Source
+   * @param string $code HTML Source
+   * @return string Hightlighte HTML Source
+   * @access private
+   * @desc Highlight HTML Source
+   */
+  function highlight_html ( $code ) {
+    $code  =  htmlentities($code);
+    $code  =  preg_replace('/([a-zA-Z_]+)=/',  '<font color="#FF0000">$1=</font>',  $code);
+    $code  =  preg_replace('/(&lt;[\/a-zA-Z0-9&;]+)/',  '<font color="#0000FF">$1</font>',  $code);
+    $code  =  str_replace('&lt;!--',  '<font color="#008080">&lt;!--',  $code);
+    $code  =  str_replace('--&gt;',  '--&gt;</font>',  $code);
+    $code  =  preg_replace('/[\r\n]+/',  "\n",  $code);
+    return $code;
+  }
+}
+?>

Property changes on: branches/2.8.x/wb/include/quickSkin/class.quickskindebugger.php
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Date Author Id Revision HeadURL
\ No newline at end of property
Index: branches/2.8.x/wb/include/quickSkin/qx/qx_substr.php
===================================================================
--- branches/2.8.x/wb/include/quickSkin/qx/qx_substr.php	(nonexistent)
+++ branches/2.8.x/wb/include/quickSkin/qx/qx_substr.php	(revision 1535)
@@ -0,0 +1,21 @@
+<?php
+  /**
+  * QuickSkin Extension substr
+  * Insert specific part of a string
+  *
+  * Usage Example:
+  * Content:  $template->assign('HEADLINE', 'My Title');
+  * Template: <font size=4>{substr:HEADLINE,0,1}</font>{substr:HEADLINE,1}
+  * Result:   <font size=4>M</font>y Title
+  *
+  * @author Andy Prevost andy@codeworxtech.com - original by Philipp v. Criegern philipp@criegern.de
+  */
+  function qx_substr ( $param, $lim0 = 0, $lim1 = 0 ) {
+    if ($lim1) {
+      return substr( $param, $lim0, $lim1 );
+    } else {
+      return substr( $param, $lim0 );
+    }
+  }
+
+?>

Property changes on: branches/2.8.x/wb/include/quickSkin/qx/qx_substr.php
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Date Author Id Revision HeadURL
\ No newline at end of property
Index: branches/2.8.x/wb/include/quickSkin/qx/qx_db_date.php
===================================================================
--- branches/2.8.x/wb/include/quickSkin/qx/qx_db_date.php	(nonexistent)
+++ branches/2.8.x/wb/include/quickSkin/qx/qx_db_date.php	(revision 1535)
@@ -0,0 +1,23 @@
+<?php
+  /**
+  * QuickSkin Extension db_date
+  * Convert Oracle Date (British Format) to Local Formatted Date
+  *
+  * Usage Example:
+  * Content:  $template->assign('UPDATE', $result['LAST_UPDATE_DATE_TIME']);
+  * Template: Last update: {db_date:UPDATE}
+  * Result:   Last update: 30.01.2003
+  *
+  * @author Andy Prevost andy@codeworxtech.com - original by Philipp v. Criegern philipp@criegern.de
+  */
+  function qx_db_date ( $param ) {
+    global $configuration;
+
+    if (preg_match('/\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}/', $param)) {
+      return date( $configuration['date_format'],  strtotime($param) );
+    } else {
+      return 'Invalid date format!';
+    }
+  }
+
+?>

Property changes on: branches/2.8.x/wb/include/quickSkin/qx/qx_db_date.php
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Date Author Id Revision HeadURL
\ No newline at end of property
Index: branches/2.8.x/wb/include/quickSkin/qx/qx_lowercase.php
===================================================================
--- branches/2.8.x/wb/include/quickSkin/qx/qx_lowercase.php	(nonexistent)
+++ branches/2.8.x/wb/include/quickSkin/qx/qx_lowercase.php	(revision 1535)
@@ -0,0 +1,17 @@
+<?php
+  /**
+  * QuickSkin Extension lowercase
+  * Converts String to lowercase
+  *
+  * Usage Example:
+  * Content:  $template->assign('NAME', 'John Doe');
+  * Template: Username: {lowercase:NAME}
+  * Result:   Username: john doe
+  *
+  * @author Andy Prevost andy@codeworxtech.com - original by Philipp v. Criegern philipp@criegern.de
+  */
+  function qx_lowercase ( $param ) {
+    return strtolower( $param );
+  }
+
+?>

Property changes on: branches/2.8.x/wb/include/quickSkin/qx/qx_lowercase.php
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Date Author Id Revision HeadURL
\ No newline at end of property
Index: branches/2.8.x/wb/include/quickSkin/qx/qx_mailto.php
===================================================================
--- branches/2.8.x/wb/include/quickSkin/qx/qx_mailto.php	(nonexistent)
+++ branches/2.8.x/wb/include/quickSkin/qx/qx_mailto.php	(revision 1535)
@@ -0,0 +1,48 @@
+<?php
+  /**
+  * QuickSkin Extension mailto
+  * creates Mailto-Link from email address
+  *
+  * Usage Example:
+  * Content:  $template->assign('CONTACT', 'philipp@criegern.de' );
+  * Template: Mail to Webmaster: {mailto:CONTACT}
+  * Result:   Mail to Webmaster: <a href="mailto:philipp@criegern.de">philipp@criegern.de</a>
+  *
+  * @author Andy Prevost andy@codeworxtech.com
+  */
+  function qx_mailto ( $param,$name='',$encode=false ) {
+    if ($encode === false) {
+      if ( $name != '' ) {
+        return '<a href="mailto:' . $param . '">' . $name . '</a>';
+      } else {
+        return '<a href="mailto:' . $param . '">' . $param . '</a>';
+      }
+    } else {
+      $obfuscatedMailTo = '';
+      $mailto = "mailto:";
+      $length = strlen($mailto);
+      for ($i = 0; $i < $length; $i++) {
+        $obfuscatedMailTo .= "&#" . ord($mailto[$i]);
+      }
+      $mailto = $param;
+      $length = strlen($mailto);
+      $param  = '';
+      for ($i = 0; $i < $length; $i++) {
+        $param .= "&#" . ord($mailto[$i]);
+      }
+      if ( $name != '' ) {
+        $mailto = $name;
+        $length = strlen($mailto);
+        $name  = '';
+        for ($i = 0; $i < $length; $i++) {
+          $name .= "&#" . ord($mailto[$i]);
+        }
+        return '<a href="' . $obfuscatedMailTo . ':' . $param . '">' . $name . '</a>';
+      } else {
+        return '<a href="' . $obfuscatedMailTo . ':' . $param . '">' . $param . '</a>';
+      }
+
+    }
+  }
+
+?>

Property changes on: branches/2.8.x/wb/include/quickSkin/qx/qx_mailto.php
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Date Author Id Revision HeadURL
\ No newline at end of property
Index: branches/2.8.x/wb/include/quickSkin/qx/qx_number.php
===================================================================
--- branches/2.8.x/wb/include/quickSkin/qx/qx_number.php	(nonexistent)
+++ branches/2.8.x/wb/include/quickSkin/qx/qx_number.php	(revision 1535)
@@ -0,0 +1,32 @@
+<?php
+  /**
+  * QuickSkin Extension number
+  * Format a number with grouped thousands
+  *
+  * Usage Example:
+  * Content:  $template->assign('SUM', 2500000);
+  * Template: Current balance: {number:SUM}
+  * Result:   Current balance: 2.500.000,00
+  *
+  * @author Andy Prevost andy@codeworxtech.com - original by Philipp v. Criegern philipp@criegern.de
+  */
+  function qx_number ( $param ) {
+    global $_CONFIG;
+
+    $decimalChar = ',';
+    if ( !empty($_CONFIG['decimal_char']) ) {
+      $decimalChar = $_CONFIG['decimal_char'];
+    }
+    $decimalPlaces = 2;
+    if ( !empty($_CONFIG['decimal_places']) ) {
+      $decimalPlaces = $_CONFIG['decimal_places'];
+    }
+    $thousandsSep = '.';
+    if ( !empty($_CONFIG['thousands_sep']) ) {
+      $thousandsSep = $_CONFIG['thousands_sep'];
+    }
+
+    return number_format( $param, $decimalChar, $decimalPlaces, $thousandsSep );
+  }
+
+?>

Property changes on: branches/2.8.x/wb/include/quickSkin/qx/qx_number.php
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Date Author Id Revision HeadURL
\ No newline at end of property
Index: branches/2.8.x/wb/include/quickSkin/qx/qx_count.php
===================================================================
--- branches/2.8.x/wb/include/quickSkin/qx/qx_count.php	(nonexistent)
+++ branches/2.8.x/wb/include/quickSkin/qx/qx_count.php	(revision 1535)
@@ -0,0 +1,18 @@
+<?php
+  /**
+  * QuickSkin Extension count
+  * count element of an array
+  *
+  * Usage Example:
+  * Content:  $template->assign('list', array('a','b'));
+  * Template: count: {count:list}
+  * Result:   count: 2
+  *
+  * @author Andy Prevost andy@codeworxtech.com - original by Philipp v. Criegern philipp@criegern.de
+  */
+  function qx_count ( $param ) {
+    $temp = count( $param );
+    return $temp;
+  }
+
+?>

Property changes on: branches/2.8.x/wb/include/quickSkin/qx/qx_count.php
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Date Author Id Revision HeadURL
\ No newline at end of property
Index: branches/2.8.x/wb/include/quickSkin/qx/qx_current_datetime.php
===================================================================
--- branches/2.8.x/wb/include/quickSkin/qx/qx_current_datetime.php	(nonexistent)
+++ branches/2.8.x/wb/include/quickSkin/qx/qx_current_datetime.php	(revision 1535)
@@ -0,0 +1,22 @@
+<?php
+  /**
+  * QuickSkin Extension current_datetime
+  * Print Current Date and Time
+  *
+  * Usage Example:
+  * Template: Time: {current_datetime:}
+  * Result:   Time: 01.01.2009 - 12:46:00
+  *
+  * @author Andy Prevost andy@codeworxtech.com - original by Philipp v. Criegern philipp@criegern.de
+  */
+  function qx_current_datetime () {
+    global $_CONFIG;
+
+    $datetimeFormat = 'F j, Y H:i:s';
+    if ( !empty($_CONFIG['datetime_format']) ) {
+      $datetimeFormat = $_CONFIG['datetime_format'];
+    }
+    return date( $datetimeFormat );
+  }
+
+?>
\ No newline at end of file

Property changes on: branches/2.8.x/wb/include/quickSkin/qx/qx_current_datetime.php
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Date Author Id Revision HeadURL
\ No newline at end of property
Index: branches/2.8.x/wb/include/quickSkin/qx/qx_nvl.php
===================================================================
--- branches/2.8.x/wb/include/quickSkin/qx/qx_nvl.php	(nonexistent)
+++ branches/2.8.x/wb/include/quickSkin/qx/qx_nvl.php	(revision 1535)
@@ -0,0 +1,21 @@
+<?php
+  /**
+  * QuickSkin Extension nvl
+  * Insert a default value if variable is empty
+  *
+  * Usage Example:
+  * Content:  $template->assign('PREVIEW1', 'picture_21.gif');
+  * Template: <img src="{nvl:PREVIEW1,'not_available.gif'}"> / <img src="{nvl:PREVIEW2,'not_available.gif'}">
+  * Result:   <img src="picture_21.gif"> / <img src="not_available.gif">
+  *
+  * @author Andy Prevost andy@codeworxtech.com - original by Philipp v. Criegern philipp@criegern.de
+  */
+  function qx_nvl ( $param, $default ) {
+    if (strlen($param)) {
+      return ( $param );
+    } else {
+      return ( $default );
+    }
+  }
+
+?>

Property changes on: branches/2.8.x/wb/include/quickSkin/qx/qx_nvl.php
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Date Author Id Revision HeadURL
\ No newline at end of property
Index: branches/2.8.x/wb/include/quickSkin/qx/qx_db_datetime.php
===================================================================
--- branches/2.8.x/wb/include/quickSkin/qx/qx_db_datetime.php	(nonexistent)
+++ branches/2.8.x/wb/include/quickSkin/qx/qx_db_datetime.php	(revision 1535)
@@ -0,0 +1,23 @@
+<?php
+  /**
+  * QuickSkin Extension db_datetime
+  * Convert Oracle Date (British Format) to Local Formatted Date and Time
+  *
+  * Usage Example:
+  * Content:  $template->assign('UPDATE', $result['LAST_UPDATE_DATE_TIME']);
+  * Template: Last update: {db_datetime:UPDATE}
+  * Result:   Last update: 30.01.2003 - 12:46:00
+  *
+  * @author Andy Prevost andy@codeworxtech.com - original by Philipp v. Criegern philipp@criegern.de
+  */
+  function qx_db_datetime ( $param ) {
+    global $configuration;
+
+    if (preg_match('/\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}/', $param)) {
+      return date( $configuration['datetime_format'],  strtotime($param) );
+    } else {
+      return 'Invalid date format!';
+    }
+  }
+
+?>

Property changes on: branches/2.8.x/wb/include/quickSkin/qx/qx_db_datetime.php
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Date Author Id Revision HeadURL
\ No newline at end of property
Index: branches/2.8.x/wb/include/quickSkin/qx/qx_load_config.php
===================================================================
--- branches/2.8.x/wb/include/quickSkin/qx/qx_load_config.php	(nonexistent)
+++ branches/2.8.x/wb/include/quickSkin/qx/qx_load_config.php	(revision 1535)
@@ -0,0 +1,56 @@
+<?php
+  /**
+  * QuickSkin Extension load_config
+  * Reads an INI-Style configuration file into an array
+  *
+  * Usage Example:
+  * Configuration File (parameter.ini):
+  *
+  *     PAGETITLE   =  Default Page Title
+  *     [colors]
+  *     BACKGROUND  =  #FFFFFF
+  *     TEXT        =  #000000
+  *
+  * Template:
+  *
+  *     {load_config:"parameter.ini","config"}
+  *     <title>{config.PAGETITLE}</title>
+  *     <body bgcolor="{config.colors.BACKGROUND}" text="{config.colors.TEXT}">
+  *
+  * Result:
+  *
+  *     <title>Default Page Title</title>
+  *     <body bgcolor="#FFFFFF" text="#000000">
+  *
+  * @author Andy Prevost andy@codeworxtech.com - original by Philipp v. Criegern philipp@criegern.de
+  */
+  function qx_load_config ( $filename,  $name = 'config' ) {
+    global $_top;
+
+    $section  =  null;
+    if (is_file($filename)) {
+      $cfgfile  =  file($filename);
+      if (is_array($cfgfile)) {
+        foreach ($cfgfile as $line) {
+          if (substr($line, 0, 1) != '#') {
+            if (substr($line, 0, 1) == '[') {
+              if ($rbr = strpos($line, ']')) {
+                $section  =  substr($line, 1, $rbr -1);
+              }
+            }
+            if ($tr = strpos($line, '=')) {
+              $k  =  trim(substr($line, 0, $tr));
+              $v  =  trim(substr($line, $tr+1));
+              if (isset($section)) {
+                $_top[$name][$section][$k]  =  $v;
+              } else {
+                $_top[$name][$k]  =  $v;
+              }
+            }
+          }
+        }
+      }
+    }
+  }
+
+?>

Property changes on: branches/2.8.x/wb/include/quickSkin/qx/qx_load_config.php
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Date Author Id Revision HeadURL
\ No newline at end of property
Index: branches/2.8.x/wb/include/quickSkin/qx/qx_regex.php
===================================================================
--- branches/2.8.x/wb/include/quickSkin/qx/qx_regex.php	(nonexistent)
+++ branches/2.8.x/wb/include/quickSkin/qx/qx_regex.php	(revision 1535)
@@ -0,0 +1,17 @@
+<?php
+  /**
+  * QuickSkin Extension regex
+  * Regular Expression String Replace
+  *
+  * Usage Example:
+  * Content:  $template->assign('NAME', '*My Document*');
+  * Template: Document Name: {regex:NAME,'/[^a-z0-9]/i','_'}
+  * Result:   Document Name: _My_Document_
+  *
+  * @author Andy Prevost andy@codeworxtech.com - original by Philipp v. Criegern philipp@criegern.de
+  */
+  function qx_regex ( $param, $pattern, $replace ) {
+    return preg_replace( $pattern, $replace, $param );
+  }
+
+?>

Property changes on: branches/2.8.x/wb/include/quickSkin/qx/qx_regex.php
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Date Author Id Revision HeadURL
\ No newline at end of property
Index: branches/2.8.x/wb/include/quickSkin/qx/qx_trim.php
===================================================================
--- branches/2.8.x/wb/include/quickSkin/qx/qx_trim.php	(nonexistent)
+++ branches/2.8.x/wb/include/quickSkin/qx/qx_trim.php	(revision 1535)
@@ -0,0 +1,17 @@
+<?php
+  /**
+  * QuickSkin Extension trim
+  * Removes leading and trailing Whitespaces and Line Feeds
+  *
+  * Usage Example:
+  * Content:  $template->assign('LINK', ' Click Here  ');
+  * Template: <a href="/">{trim:LINK}</a>
+  * Result:   <a href="/">Click Here</a>
+  *
+  * @author Andy Prevost andy@codeworxtech.com - original by Philipp v. Criegern philipp@criegern.de
+  */
+  function qx_trim ( $param ) {
+    return trim( $param );
+  }
+
+?>

Property changes on: branches/2.8.x/wb/include/quickSkin/qx/qx_trim.php
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Date Author Id Revision HeadURL
\ No newline at end of property
Index: branches/2.8.x/wb/include/quickSkin/qx/qx_replace.php
===================================================================
--- branches/2.8.x/wb/include/quickSkin/qx/qx_replace.php	(nonexistent)
+++ branches/2.8.x/wb/include/quickSkin/qx/qx_replace.php	(revision 1535)
@@ -0,0 +1,17 @@
+<?php
+  /**
+  * QuickSkin Extension replace
+  * String Replace
+  *
+  * Usage Example:
+  * Content:  $template->assign('PATH', $path_tranlated);  //  C:\Apache\htdocs\php\test.php
+  * Template: Script Name: {replace:PATH,'\\','/'}
+  * Result:   Script Name: C:/Apache/htdocs/php/test.php
+  *
+  * @author Andy Prevost andy@codeworxtech.com - original by Philipp v. Criegern philipp@criegern.de
+  */
+  function qx_replace ( $param, $pattern, $replace ) {
+    return str_replace( $pattern, $replace, $param );
+  }
+
+?>

Property changes on: branches/2.8.x/wb/include/quickSkin/qx/qx_replace.php
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Date Author Id Revision HeadURL
\ No newline at end of property
Index: branches/2.8.x/wb/include/quickSkin/qx/qx_stringformat.php
===================================================================
--- branches/2.8.x/wb/include/quickSkin/qx/qx_stringformat.php	(nonexistent)
+++ branches/2.8.x/wb/include/quickSkin/qx/qx_stringformat.php	(revision 1535)
@@ -0,0 +1,17 @@
+<?php
+  /**
+  * QuickSkin Extension stringformat
+  * Inserts a formatted String
+  *
+  * Usage Example:
+  * Content:  $template->assign('SUM', 25);
+  * Template: Current balance: {stringformat:SUM,'$ %01.2f'}
+  * Result:   Current balance: $ 25.00
+  *
+  * @author Andy Prevost andy@codeworxtech.com - original by Philipp v. Criegern philipp@criegern.de
+  */
+  function qx_stringformat ( $param, $format ) {
+    return sprintf( $format,  $param );
+  }
+
+?>

Property changes on: branches/2.8.x/wb/include/quickSkin/qx/qx_stringformat.php
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Date Author Id Revision HeadURL
\ No newline at end of property
Index: branches/2.8.x/wb/include/quickSkin/qx/qx_session.php
===================================================================
--- branches/2.8.x/wb/include/quickSkin/qx/qx_session.php	(nonexistent)
+++ branches/2.8.x/wb/include/quickSkin/qx/qx_session.php	(revision 1535)
@@ -0,0 +1,17 @@
+<?php
+  /**
+  * QuickSkin Extension session
+  * Print Content of Session variables
+  *
+  * Usage Example:
+  * Content:  $_SESSION['userName']  =  'Philipp von Criegern';
+  * Template: Current User: {session:"userName"}
+  * Result:   Current User: Philipp von Criegern
+  *
+  * @author Andy Prevost andy@codeworxtech.com - original by Philipp v. Criegern philipp@criegern.de
+  */
+  function qx_session ( $param ) {
+    return $_SESSION[$param];
+  }
+
+?>

Property changes on: branches/2.8.x/wb/include/quickSkin/qx/qx_session.php
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Date Author Id Revision HeadURL
\ No newline at end of property
Index: branches/2.8.x/wb/include/quickSkin/qx/qx_truncate.php
===================================================================
--- branches/2.8.x/wb/include/quickSkin/qx/qx_truncate.php	(nonexistent)
+++ branches/2.8.x/wb/include/quickSkin/qx/qx_truncate.php	(revision 1535)
@@ -0,0 +1,17 @@
+<?php
+  /**
+  * QuickSkin Extension truncate
+  * Restricts a String to a specific number characters
+  *
+  * Usage Example:
+  * Content:  $template->assign('TEASER', 'PHP 4.3.0RC1 has been released. This is the first release candidate');
+  * Template: News: {truncate:TEASER,50} ... [more]
+  * Result:   News: QuickSkin version 5.0 has been released. This is the first ... [more]
+  *
+  * @author Andy Prevost andy@codeworxtech.com - original by Philipp v. Criegern philipp@criegern.de
+  */
+  function qx_truncate ( $param, $size ) {
+    return substr( $param, 0, $size );
+  }
+
+?>

Property changes on: branches/2.8.x/wb/include/quickSkin/qx/qx_truncate.php
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Date Author Id Revision HeadURL
\ No newline at end of property
Index: branches/2.8.x/wb/include/quickSkin/qx/qx_uppercase.php
===================================================================
--- branches/2.8.x/wb/include/quickSkin/qx/qx_uppercase.php	(nonexistent)
+++ branches/2.8.x/wb/include/quickSkin/qx/qx_uppercase.php	(revision 1535)
@@ -0,0 +1,17 @@
+<?php
+  /**
+  * QuickSkin Extension uppercase
+  * Converts String to uppercase
+  *
+  * Usage Example:
+  * Content:  $template->assign('NAME', 'John Doe');
+  * Template: Username: {uppercase:NAME}
+  * Result:   Username: JOHN DOE
+  *
+  * @author Andy Prevost andy@codeworxtech.com - original by Philipp v. Criegern philipp@criegern.de
+  */
+  function qx_uppercase ( $param ) {
+    return strtoupper( $param );
+  }
+
+?>

Property changes on: branches/2.8.x/wb/include/quickSkin/qx/qx_uppercase.php
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Date Author Id Revision HeadURL
\ No newline at end of property
Index: branches/2.8.x/wb/include/quickSkin/qx/qx_header.php
===================================================================
--- branches/2.8.x/wb/include/quickSkin/qx/qx_header.php	(nonexistent)
+++ branches/2.8.x/wb/include/quickSkin/qx/qx_header.php	(revision 1535)
@@ -0,0 +1,23 @@
+<?php
+  /**
+  * QuickSkin Extension header
+  * Sends HTTP Header
+  *
+  * Usage Example:
+  * Content:  $template->assign( 'TITLE', 'SVG Template Demo:' );
+  *
+  * Template:
+  *     {header:"Content-type: image/svg+xml"}<?xml version="1.0" ?>
+  *     <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20010904//EN" "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">
+  *     <svg width="300px" height="150px" style="shape-rendering:optimizeQuality;text-rendering:optimizeQuality">
+  *       <circle id="ball" cx="150" cy="75" r="50" style="fill:rgb(200,200,255)" />
+  *       <text x="70" y="80" id="title" style="font-face:Courier;font-size:12pt">{TITLE}</text>
+  *     </svg>
+  *
+  * @author Andy Prevost andy@codeworxtech.com - original by Philipp v. Criegern philipp@criegern.de
+  */
+  function qx_header ( $param ) {
+    header($param);
+  }
+
+

Property changes on: branches/2.8.x/wb/include/quickSkin/qx/qx_header.php
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Date Author Id Revision HeadURL
\ No newline at end of property
Index: branches/2.8.x/wb/include/quickSkin/qx/qx_codesnippetstart.php
===================================================================
--- branches/2.8.x/wb/include/quickSkin/qx/qx_codesnippetstart.php	(nonexistent)
+++ branches/2.8.x/wb/include/quickSkin/qx/qx_codesnippetstart.php	(revision 1535)
@@ -0,0 +1,26 @@
+<?php
+  /**
+  * QuickSkin Extension codesnippetstart
+  * required for the start of a code snippet
+  *
+  * Usage Example:
+  * Template: Code Snippet<br />{codesnippetstart:}
+  *
+  * @author Andy Prevost andy@codeworxtech.com
+  */
+  function qx_codesnippetstart ( $param='' ) {
+    /*
+    nogutter = no line numbers
+    nocontrols = no menu at top
+    collapse = = display nothing, menu at top will display '+ expand source'
+    firstline[value] = starting number to start count
+    showcolumns = shows "ruler" at top
+    */
+    if ( $param = '' ) {
+      return '<pre name="code" class="php">';
+    } else {
+      return '<pre name="code" class="php:' . $param . '">';
+    }
+  }
+
+?>

Property changes on: branches/2.8.x/wb/include/quickSkin/qx/qx_codesnippetstart.php
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Date Author Id Revision HeadURL
\ No newline at end of property
Index: branches/2.8.x/wb/include/quickSkin/qx/qx_options.php
===================================================================
--- branches/2.8.x/wb/include/quickSkin/qx/qx_options.php	(nonexistent)
+++ branches/2.8.x/wb/include/quickSkin/qx/qx_options.php	(revision 1535)
@@ -0,0 +1,34 @@
+<?php
+  /**
+  * QuickSkin Extension options
+  * Creates HTML DropDown Option list from an array
+  *
+  * Usage Example I:
+  * Content:  $template->assign('pick', array( "on", "off" ) );
+  * Template: Choose: <select name="onoff"> {options:pick} </select>
+  * Result:   Choose: <select name="onoff"> <option>on</option><option>off</option> </select>
+  *
+  * Usage Example II:
+  * Content:  $template->assign('color',   array( "FF0000" => "Red", "00FF00" => "Green", "0000FF" => "Blue" ) );
+  *           $template->assign('default', "00FF00" );
+  * Template: Color: <select name="col"> {options:color,default} </select>
+  * Result:   Color: <select name="col"> <option value="FF0000">Red</option><option value="00FF00" selected>Green</option><option value="0000FF">Blue</option> </select>
+  *
+  * @author Andy Prevost andy@codeworxtech.com - original by Philipp v. Criegern philipp@criegern.de
+  */
+  function qx_options ( $param,  $default = '_DEFAULT_' ) {
+    $output  =  '';
+    if (is_array($param)) {
+      $keyindex  =  0;
+      foreach ($param as $key => $value) {
+        if ($key==$keyindex++ && is_numeric($key)) {
+          $output  .=  '<option' . (($value == $default) ? '  selected' : '') . '>' . $value . '</option>';
+        } else {
+          $output  .=  '<option value="' . $key . '"' . (($key == $default) ? '  selected' : '') . '>' . $value . '</option>';
+        }
+      }
+    }
+    return $output;
+  }
+
+?>

Property changes on: branches/2.8.x/wb/include/quickSkin/qx/qx_options.php
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Date Author Id Revision HeadURL
\ No newline at end of property
Index: branches/2.8.x/wb/include/quickSkin/qx/qx_dateformatgrid.php
===================================================================
--- branches/2.8.x/wb/include/quickSkin/qx/qx_dateformatgrid.php	(nonexistent)
+++ branches/2.8.x/wb/include/quickSkin/qx/qx_dateformatgrid.php	(revision 1535)
@@ -0,0 +1,19 @@
+<?php
+  /**
+  * QuickSkin Extension dateformatgrid
+  * Changes Dateformat
+  *
+  * @author Andy Prevost andy@codeworxtech.com - original by Philipp v. Criegern philipp@criegern.de
+  */
+  function qx_dateformatgrid ( $param, $format = 'F j, Y' ) {
+    list($month,$day,$year,$hour,$minute,$second) = split("[-:T\.]", $param);
+
+    // handle empty values
+    if (! $hour) { $hour = '00'; }
+    if (! $minute) { $minute = '00'; }
+    if (! $second) { $second = '00'; }
+
+    return date( $format, mktime($hour, $minute, $second, $month, $day, $year));
+  }
+
+?>

Property changes on: branches/2.8.x/wb/include/quickSkin/qx/qx_dateformatgrid.php
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Date Author Id Revision HeadURL
\ No newline at end of property
Index: branches/2.8.x/wb/include/quickSkin/qx/qx_encode.php
===================================================================
--- branches/2.8.x/wb/include/quickSkin/qx/qx_encode.php	(nonexistent)
+++ branches/2.8.x/wb/include/quickSkin/qx/qx_encode.php	(revision 1535)
@@ -0,0 +1,18 @@
+<?php
+  /**
+  * QuickSkin Extension encode
+  * Encodes String (md5)
+  *
+  * Usage Example:
+  * Content:  $template->assign('ID', 123);
+  * Template: <a href="delete.php?id={encode:ID}">delete</a>
+  * Result:   <a href="delete.php?id=7B600B6476167773626A">delete</a>
+  *
+  * @author Andy Prevost andy@codeworxtech.com
+  */
+
+  function qx_encode ( $param ) {
+    return md5( $param );
+  }
+
+?>

Property changes on: branches/2.8.x/wb/include/quickSkin/qx/qx_encode.php
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Date Author Id Revision HeadURL
\ No newline at end of property
Index: branches/2.8.x/wb/include/quickSkin/qx/qx_current_time.php
===================================================================
--- branches/2.8.x/wb/include/quickSkin/qx/qx_current_time.php	(nonexistent)
+++ branches/2.8.x/wb/include/quickSkin/qx/qx_current_time.php	(revision 1535)
@@ -0,0 +1,22 @@
+<?php
+  /**
+  * QuickSkin Extension current_time
+  * Print Current Time
+  *
+  * Usage Example:
+  * Template: Time: {current_time:}
+  * Result:   Time: 12:46:00
+  *
+  * @author Andy Prevost andy@codeworxtech.com - original by Philipp v. Criegern philipp@criegern.de
+  */
+  function qx_current_time ($meridiem='A') {
+    global $_CONFIG;
+
+    $timeFormat = 'g:i:s ' . $meridiem;
+    if ( !empty($_CONFIG['time_format']) ) {
+      $timeFormat = $_CONFIG['time_format'];
+    }
+    return date( $timeFormat );
+  }
+
+?>

Property changes on: branches/2.8.x/wb/include/quickSkin/qx/qx_current_time.php
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Date Author Id Revision HeadURL
\ No newline at end of property
Index: branches/2.8.x/wb/include/quickSkin/qx/qx_db_time.php
===================================================================
--- branches/2.8.x/wb/include/quickSkin/qx/qx_db_time.php	(nonexistent)
+++ branches/2.8.x/wb/include/quickSkin/qx/qx_db_time.php	(revision 1535)
@@ -0,0 +1,23 @@
+<?php
+  /**
+  * QuickSkin Extension db_time
+  * Convert Oracle Date (British Format) to Local Formatted Time
+  *
+  * Usage Example:
+  * Content:  $template->assign('UPDATE', $result['LAST_UPDATE_DATE_TIME']);
+  * Template: Last update: {db_time:UPDATE}
+  * Result:   Last update: 12:46:00
+  *
+  * @author Andy Prevost andy@codeworxtech.com - original by Philipp v. Criegern philipp@criegern.de
+  */
+  function qx_db_time ( $param ) {
+    global $configuration;
+
+    if (preg_match('/\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}/', $param)) {
+      return date( $configuration['time_format'],  strtotime($param) );
+    } else {
+      return 'Invalid date format!';
+    }
+  }
+
+?>

Property changes on: branches/2.8.x/wb/include/quickSkin/qx/qx_db_time.php
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Date Author Id Revision HeadURL
\ No newline at end of property
Index: branches/2.8.x/wb/include/quickSkin/qx/qx_mailtoencode.php
===================================================================
--- branches/2.8.x/wb/include/quickSkin/qx/qx_mailtoencode.php	(nonexistent)
+++ branches/2.8.x/wb/include/quickSkin/qx/qx_mailtoencode.php	(revision 1535)
@@ -0,0 +1,106 @@
+<?php
+  /**
+  * QuickSkin Extension mailtoencode
+  * Protects email address from being scanned by spam bots
+  * and optionally builds full mailto: link
+  *
+  * Usage Example 1:
+  * Content:  $template->assign('AUTHOR', 'yourname@yourdomain.com' );
+  * Template: Author: {mailtoencode:AUTHOR}
+  * Result:   Author: <a href="&#109&#97&#105&#108&#116&#111&#58&#121;&#111;&#117;&#114;&#110;&#97;&#109;&#101;&#64;&#121;&#111;&#117;&#114;&#100;&#111;&#109;&#97;&#105;&#110;&#46;&#99;&#111;&#109;">yourname&#64;yourdomain&#46;com</a>
+  *
+  * Usage Example 2 (Email address only):
+  * Template: Author: {mailtoencode:"yourname@yourdomain.com"}
+  * Result:   Author: <a href="&#109&#97&#105&#108&#116&#111&#58&#121;&#111;&#117;&#114;&#110;&#97;&#109;&#101;&#64;&#121;&#111;&#117;&#114;&#100;&#111;&#109;&#97;&#105;&#110;&#46;&#99;&#111;&#109;">yourname&#64;yourdomain&#46;com</a>
+  *
+  * Usage Example 3 (Email address and name):
+  * Template: Author: {mailtoencode:"yourname@yourdomain.com","Your Name"}
+  * Result:   Author: <a href="&#109&#97&#105&#108&#116&#111&#58&#121;&#111;&#117;&#114;&#110;&#97;&#109;&#101;&#64;&#121;&#111;&#117;&#114;&#100;&#111;&#109;&#97;&#105;&#110;&#46;&#99;&#111;&#109;">Your Name</a>
+  *
+  * Usage Example 4 (Email address and name, encode set to true, and class name):
+  * Template: Author: {mailtoencode:"yourname@yourdomain.com","Your Name",true,'white'}
+  * Result:   Author: <a href="&#109&#97&#105&#108&#116&#111&#58&#121;&#111;&#117;&#114;&#110;&#97;&#109;&#101;&#64;&#121;&#111;&#117;&#114;&#100;&#111;&#109;&#97;&#105;&#110;&#46;&#99;&#111;&#109;" class="white">Your Name</a>
+  *
+  * Usage Example 5 (Email address and name, encode set to true, class name and style defined):
+  * Template: Author: {mailtoencode:"yourname@yourdomain.com","Your Name",true,'white','font-size:18px;'}
+  * Result:   Author: <a href="&#109&#97&#105&#108&#116&#111&#58&#121;&#111;&#117;&#114;&#110;&#97;&#109;&#101;&#64;&#121;&#111;&#117;&#114;&#100;&#111;&#109;&#97;&#105;&#110;&#46;&#99;&#111;&#109;" class="white" style="font-size:18px;">Your Name</a>
+  *
+  * Usage Example 6 (Email address and name, encode set to true, no class name and style defined):
+  * Template: Author: {mailtoencode:"yourname@yourdomain.com","Your Name",true,'','font-size:18px;'}
+  * Result:   Author: <a href="&#109&#97&#105&#108&#116&#111&#58&#121;&#111;&#117;&#114;&#110;&#97;&#109;&#101;&#64;&#121;&#111;&#117;&#114;&#100;&#111;&#109;&#97;&#105;&#110;&#46;&#99;&#111;&#109;" style="font-size:18px;">Your Name</a>
+  *
+  * @author Andy Prevost andy@codeworxtech.com
+  */
+
+  if(!function_exists('str_split')){
+    function str_split($text, $split = 1){
+      $array = array();
+      for($i=0; $i < strlen($text); $i++){
+        $key = NULL;
+        for ($j = 0; $j < $split; $j++){
+          $key .= $text[$i];
+        }
+        array_push($array, $key);
+      }
+        return $array;
+    }
+  }
+
+  function qx_mailtoencode ($emailAddy,$text='',$buildLink=true,$class='',$style='') {
+    if ( $buildLink ) {
+      // mailto: portion
+      $obfuscatedMailTo = '';
+      $mailto           = "mailto:";
+      $length           = strlen($mailto);
+      for ($i = 0; $i < $length; $i++) {
+        $obfuscatedMailTo .= "&#" . ord($mailto[$i]);
+      }
+      // END - mailto: portion
+      $emailLink  = '<a href="';
+      $emailLink .= $obfuscatedMailTo;
+    }
+    $emailLink .= obfuscate($emailAddy);
+    if ( $buildLink ) {
+      $emailLink .= '"';
+      if ( trim($class) != '' ) {
+        $emailLink .= ' class="' . $class . '"';
+      }
+      if ( trim($style) != '' ) {
+        $emailLink .= ' style="' . $style . '"';
+      }
+      $emailLink .= '>';
+      if ( trim($text) != '' ) {
+        $newText    = trim($text);
+        $newText    = str_replace('@','&#64;',$newText);
+        $newText    = str_replace('.','&#46;',$newText);
+        $emailLink .= $newText;
+      } else {
+        $newText    = trim($emailAddy);
+        $newText    = str_replace('@','&#64;',$newText);
+        $newText    = str_replace('.','&#46;',$newText);
+        $emailLink .= $newText;
+      }
+      $emailLink .= "</a>";
+    }
+    return $emailLink;
+  }
+
+  function obfuscate($text) { // NOTE: Uses function str_split
+    preg_match_all("/[-a-z0-9\._]+@[-a-z0-9\._]+\.[a-z]{2,4}/", $text, $emails);
+    $patterns = array();
+    $replacements = array();
+    foreach($emails[0] as $email) {
+      if(!in_array("/$email/", $patterns)) {
+        $obfuscated = '';
+        foreach(str_split($email) as $char) {
+          $obfuscated .= '&#'.ord($char).';';
+        }
+        $patterns[] = "/$email/";
+        $replacements[] = $obfuscated;
+      }
+    }
+    $text = preg_replace($patterns, $replacements, $text);
+    return $text;
+  }
+
+?>

Property changes on: branches/2.8.x/wb/include/quickSkin/qx/qx_mailtoencode.php
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Date Author Id Revision HeadURL
\ No newline at end of property
Index: branches/2.8.x/wb/include/quickSkin/qx/qx_codesnippetend.php
===================================================================
--- branches/2.8.x/wb/include/quickSkin/qx/qx_codesnippetend.php	(nonexistent)
+++ branches/2.8.x/wb/include/quickSkin/qx/qx_codesnippetend.php	(revision 1535)
@@ -0,0 +1,15 @@
+<?php
+  /**
+  * QuickSkin Extension codesnippetend
+  * required for the end of a code snippet
+  *
+  * Usage Example:
+  * Template: Code Snippet<br />{codesnippetend:}
+  *
+  * @author Andy Prevost andy@codeworxtech.com
+  */
+  function qx_codesnippetend () {
+    return '</pre>';
+  }
+
+?>

Property changes on: branches/2.8.x/wb/include/quickSkin/qx/qx_codesnippetend.php
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Date Author Id Revision HeadURL
\ No newline at end of property
Index: branches/2.8.x/wb/include/quickSkin/qx/qx_config.php
===================================================================
--- branches/2.8.x/wb/include/quickSkin/qx/qx_config.php	(nonexistent)
+++ branches/2.8.x/wb/include/quickSkin/qx/qx_config.php	(revision 1535)
@@ -0,0 +1,19 @@
+<?php
+  /**
+  * QuickSkin Extension config
+  * Print Content of Configuration Parameters
+  *
+  * Usage Example:
+  * Content:  $_CONFIG['webmaster']  =  'philipp@criegern.de';
+  * Template: Please Contact Webmaster: {config:"webmaster"}
+  * Result:   Please Contact Webmaster: philipp@criegern.de
+  *
+  * @author Andy Prevost andy@codeworxtech.com - original by Philipp v. Criegern philipp@criegern.de
+  */
+  function qx_config ( $param ) {
+    global $_CONFIG;
+
+    return $_CONFIG[$param];
+  }
+
+?>

Property changes on: branches/2.8.x/wb/include/quickSkin/qx/qx_config.php
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Date Author Id Revision HeadURL
\ No newline at end of property
Index: branches/2.8.x/wb/include/quickSkin/qx/qx_htmlentities.php
===================================================================
--- branches/2.8.x/wb/include/quickSkin/qx/qx_htmlentities.php	(nonexistent)
+++ branches/2.8.x/wb/include/quickSkin/qx/qx_htmlentities.php	(revision 1535)
@@ -0,0 +1,17 @@
+<?php
+  /**
+  * QuickSkin Extension htmlentities
+  * Converts Special Characters to HTML Entities
+  *
+  * Usage Example:
+  * Content:  $template->assign('NEXT', 'Next Page >>');
+  * Template: <a href="next.php">{htmlentities:NEXT}</a>
+  * Result:   <a href="next.php">Next Page &gt;&gt;</a>
+  *
+  * @author Andy Prevost andy@codeworxtech.com - original by Philipp v. Criegern philipp@criegern.de
+  */
+  function qx_htmlentities ( $param ) {
+    return htmlentities( $param );
+  }
+
+?>

Property changes on: branches/2.8.x/wb/include/quickSkin/qx/qx_htmlentities.php
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Date Author Id Revision HeadURL
\ No newline at end of property
Index: branches/2.8.x/wb/include/quickSkin/qx/qx_hidemail.php
===================================================================
--- branches/2.8.x/wb/include/quickSkin/qx/qx_hidemail.php	(nonexistent)
+++ branches/2.8.x/wb/include/quickSkin/qx/qx_hidemail.php	(revision 1535)
@@ -0,0 +1,18 @@
+<?php
+  /**
+  * QuickSkin Extension hidemail
+  * Protects email address from being scanned by spam bots
+  *
+  * Usage Example:
+  * Content:  $template->assign('AUTHOR', 'andy@codeworxtech.com' );
+  * Template: Author: {hidemail:AUTHOR}
+  * Result Source:   Author: andy&#64;codeworxtech&#46;com
+  * Result Display:  Author: andy@codeworxtech.com
+  *
+  * @author Andy Prevost andy@codeworxtech.com
+  */
+  function qx_hidemail ( $param ) {
+    return str_replace('@', '&#64;', str_replace('.', '&#46;', $param));
+  }
+
+?>

Property changes on: branches/2.8.x/wb/include/quickSkin/qx/qx_hidemail.php
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Date Author Id Revision HeadURL
\ No newline at end of property
Index: branches/2.8.x/wb/include/quickSkin/qx/qx_vardump.php
===================================================================
--- branches/2.8.x/wb/include/quickSkin/qx/qx_vardump.php	(nonexistent)
+++ branches/2.8.x/wb/include/quickSkin/qx/qx_vardump.php	(revision 1535)
@@ -0,0 +1,23 @@
+<?php
+  /**
+  * QuickSkin Extension vardump
+  * Prints variable content for debug purpose
+  *
+  * Usage Example I:
+  * Content:  $template->assign('test', array( "name1", "value1",  "name2", "value2" ) );
+  *
+  * Template: DEBUG: {vardump:test}
+  *
+  * Result:   DEBUG: Array
+  *                  (
+  *                      [name1] => value1
+  *                      [name2] => value2
+  *                  )
+  *
+  * @author Andy Prevost andy@codeworxtech.com - original by Philipp v. Criegern philipp@criegern.de
+  */
+  function qx_vardump ( $param ) {
+    return '<pre>' . print_r($param, true) . '</pre>';
+  }
+
+?>

Property changes on: branches/2.8.x/wb/include/quickSkin/qx/qx_vardump.php
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Date Author Id Revision HeadURL
\ No newline at end of property
Index: branches/2.8.x/wb/include/quickSkin/qx/qx_load_file.php
===================================================================
--- branches/2.8.x/wb/include/quickSkin/qx/qx_load_file.php	(nonexistent)
+++ branches/2.8.x/wb/include/quickSkin/qx/qx_load_file.php	(revision 1535)
@@ -0,0 +1,31 @@
+<?php
+  /**
+  * QuickSkin Extension load_file
+  * Print out file content
+  *
+  * Usage Example:
+  * External Content Source (counter.txt):
+  *
+  *     1234
+  *
+  * Template:
+  *
+  *     You are visitor No: {load_file:"counter.txt"}
+  *
+  * Result:
+  *
+  *     You are visitor No: 1234
+  *
+  * @author Andy Prevost andy@codeworxtech.com - original by Philipp v. Criegern philipp@criegern.de
+  */
+  function qx_load_file ( $filename ) {
+    if (is_file($filename)) {
+      if($hd = @fopen($filename, 'r')) {
+        $content  =  fread($hd, filesize($filename));
+        fclose($hd);
+        return $content;
+      }
+    }
+  }
+
+?>

Property changes on: branches/2.8.x/wb/include/quickSkin/qx/qx_load_file.php
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Date Author Id Revision HeadURL
\ No newline at end of property
Index: branches/2.8.x/wb/include/quickSkin/qx/qx_current_date.php
===================================================================
--- branches/2.8.x/wb/include/quickSkin/qx/qx_current_date.php	(nonexistent)
+++ branches/2.8.x/wb/include/quickSkin/qx/qx_current_date.php	(revision 1535)
@@ -0,0 +1,22 @@
+<?php
+  /**
+  * QuickSkin Extension current_date
+  * Print Current Date
+  *
+  * Usage Example:
+  * Template: Today: {current_date:}
+  * Result:   Today: 30.01.2003
+  *
+  * @author Andy Prevost andy@codeworxtech.com - original by Philipp v. Criegern philipp@criegern.de
+  */
+  function qx_current_date () {
+    global $_CONFIG;
+
+    $dateFormat = 'F j, Y';
+    if ( !empty($_CONFIG['date_format']) ) {
+      $dateFormat = $_CONFIG['date_format'];
+    }
+    return date( $dateFormat );
+  }
+
+?>
\ No newline at end of file

Property changes on: branches/2.8.x/wb/include/quickSkin/qx/qx_current_date.php
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Date Author Id Revision HeadURL
\ No newline at end of property
Index: branches/2.8.x/wb/include/quickSkin/qx/qx_entity_decode.php
===================================================================
--- branches/2.8.x/wb/include/quickSkin/qx/qx_entity_decode.php	(nonexistent)
+++ branches/2.8.x/wb/include/quickSkin/qx/qx_entity_decode.php	(revision 1535)
@@ -0,0 +1,19 @@
+<?php
+  /**
+  * QuickSkin Extension entity_decode
+  * Convert all HTML entities to their applicable characters
+  *
+  * Usage Example:
+  * Content:  $template->assign('MESSAGE', 'Nicht m&ouml;glich!');
+  * Template: <a href="alert('{entity_decode:MESSAGE}');">Alert</a>
+  * Result:   <a href="alert('Nicht m?lich!');">Alert</a>
+  *
+  * @author Andy Prevost andy@codeworxtech.com - original by Philipp v. Criegern philipp@criegern.de
+  */
+  function qx_entity_decode ( $param ) {
+    $param  =  strtr($param, array_flip(get_html_translation_table(HTML_ENTITIES)));
+    $param  =  preg_replace("/&#([0-9]+);/me", "chr('\\1')", $param);
+    return $param;
+  }
+
+?>

Property changes on: branches/2.8.x/wb/include/quickSkin/qx/qx_entity_decode.php
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Date Author Id Revision HeadURL
\ No newline at end of property
Index: branches/2.8.x/wb/include/quickSkin/qx/qx_urlencode.php
===================================================================
--- branches/2.8.x/wb/include/quickSkin/qx/qx_urlencode.php	(nonexistent)
+++ branches/2.8.x/wb/include/quickSkin/qx/qx_urlencode.php	(revision 1535)
@@ -0,0 +1,17 @@
+<?php
+ /**
+  * QuickSkin Extension urlencode
+  * Inserts URL-encoded String
+  *
+  * Usage Example:
+  * Content:  $template->assign('PARAM', 'Delete User!');
+  * Template: go.php?param={urlencode:PARAM}
+  * Result:   go.php?param=Delete+User%21
+  *
+  * @author Andy Prevost andy@codeworxtech.com - original by Philipp v. Criegern philipp@criegern.de
+  */
+  function qx_urlencode ( $param ) {
+    return urlencode( $param );
+  }
+
+?>

Property changes on: branches/2.8.x/wb/include/quickSkin/qx/qx_urlencode.php
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Date Author Id Revision HeadURL
\ No newline at end of property
Index: branches/2.8.x/wb/include/quickSkin/class.quickskin.php
===================================================================
--- branches/2.8.x/wb/include/quickSkin/class.quickskin.php	(nonexistent)
+++ branches/2.8.x/wb/include/quickSkin/class.quickskin.php	(revision 1535)
@@ -0,0 +1,1008 @@
+<?php
+//error_reporting(E_ALL ^ E_NOTICE);
+/*~ class.quickskin.php
+.---------------------------------------------------------------------------.
+|  Software: QuickSkin Class                                                |
+|   Version: 5.0                                                            |
+|   Contact: andy.prevost@worxteam.com,andy@codeworx.ca                     |
+|      Info: http://quickskin.sourceforge.net                               |
+|   Support: http://sourceforge.net/projects/quickskin/                     |
+| ------------------------------------------------------------------------- |
+|    Author: Andy Prevost andy.prevost@worxteam.com (admin)                 |
+|    Author: Manuel 'EndelWar' Dalla Lana endelwar@aregar.it (former admin) |
+|    Author: Philipp v. Criegern philipp@criegern.com (original founder)    |
+| Copyright (c) 2002-2009, Andy Prevost. All Rights Reserved.               |
+|    * NOTE: QuickSkin is the SmartTemplate project renamed. SmartTemplate  |
+|            information and downloads can still be accessed at the         |
+|            smarttemplate.sourceforge.net site                             |
+| ------------------------------------------------------------------------- |
+|   License: Distributed under the Lesser General Public License (LGPL)     |
+|            http://www.gnu.org/copyleft/lesser.html                        |
+| This program is distributed in the hope that it will be useful - WITHOUT  |
+| ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or     |
+| FITNESS FOR A PARTICULAR PURPOSE.                                         |
+| ------------------------------------------------------------------------- |
+| We offer a number of paid services:                                       |
+| - Web Hosting on highly optimized fast and secure servers                 |
+| - Technology Consulting                                                   |
+| - Oursourcing (highly qualified programmers and graphic designers)        |
+'---------------------------------------------------------------------------'
+Last modified: January 01 2009 ~*/
+
+/* designed to work with PHP5 - will NOT work with PHP4 */
+
+/* PURPOSE: 'Compiles' HTML-Templates to PHP Code
+ *
+ * Usage Example I:
+ *
+ * $page = new QuickSkin( "template.html" );
+ * $page->assign( 'TITLE',  'TemplateDemo - Userlist' );
+ * $page->assign( 'user',   DB_read_all( 'select * from ris_user' ) );
+ * $page->output();
+ *
+ * Usage Example II:
+ *
+ * $data = array(
+ *             'TITLE' => 'TemplateDemo - Userlist',
+ *             'user'  => DB_read_all( 'select * from ris_user' )
+ *         );
+ * $page = new QuickSkin( "template.html" );
+ * $page->output( $data );
+ *
+ */
+
+class QuickSkin {
+
+  /////////////////////////////////////////////////
+  // PROPERTIES, PUBLIC
+  /////////////////////////////////////////////////
+
+  /**
+   * Reuse Code
+   * Whether to use stored compiled php code or not (for debug purpose)
+   * @var bool
+   */
+  public $reuse_code       = false;
+
+  /**
+   * Template Directory
+   * Directory where all templates are stored, can be overwritten by
+   * global configuration array $_CONFIG['template_dir']
+   * @var string
+   */
+  public $template_dir     = '_skins/';
+
+  /**
+   * Temp Directory
+   * Where to store compiled templates, can be overwritten by
+   * global configuration array $_CONFIG['quickskin_compiled']
+   * @var string
+   */
+  public $temp_dir         = '_skins_tmp/';
+
+  /**
+   * Cache Directory
+   * Temporary folder for output cache storage, can be overwritten by
+   * global configuration array $_CONFIG['quickskin_cache']
+   * Note: typically set the same as the Temp Directory, but can be unique
+   * @var string
+   */
+  public $cache_dir         = '_skins_tmp/';
+
+  /**
+   * Cache Lifetime
+   * Default Output Cache Lifetime in Seconds, can be overwritten by
+   * global configuration array $_CONFIG['cache_lifetime']
+   * @var int
+   */
+  public $cache_lifetime    = 600; // seconds
+
+  /**
+   * Extensions Directory
+   * Directory where all extensions are stored
+   * @var string
+   */
+  public $extensions_dir    = '_lib/qx';      /* Directory where all extensions are stored */
+
+  /**
+   * Extension Prefix
+   * Filename prefix on all the extensions files
+   * @var string
+   */
+  public $extension_prefix  = 'qx_';
+
+  /**
+   * Left Delimiter
+   * Default Left delimiter, can be overwritten by
+   * global configuration array $_CONFIG['left_delimiter']
+   * @var string
+   */
+  public $left_delimiter    = '{';
+
+  /**
+   * Right Delimiter
+   * Default Right delimiter, can be overwritten by
+   * global configuration array $_CONFIG['right_delimiter']
+   * @var string
+   */
+  public $right_delimiter   = '}';
+
+  /**
+   * Extension Tagged
+   * List of used QuickSkin Extensions
+   * @var array
+   */
+  public $extension_tagged  = array();
+
+  /**
+   * QuickSkin Version Number
+   * List of used QuickSkin Extensions
+   * @var string
+   */
+  public $version           = '5.0';
+
+  /////////////////////////////////////////////////
+  // PROPERTIES, PRIVATE
+  /////////////////////////////////////////////////
+
+  private $cache_filename; /* Temporary file for output cache storage */
+  private $tpl_file;       /* The template filename */
+  private $cpl_file;       /* The compiled template filename */
+  private $data = array(); /* Template content array */
+  private $parser;         /* Parser Class */
+  private $debugger;       /* Debugger Class */
+  private $skins_sub_dir;  /* temporary variable to hold the subdirectory of the main template */
+  private $supp_templates = '';   /* supplementary templates */
+  private $supptemplate   = '';   /* supplementary template */
+
+  /* QuickSkin Constructor
+   * @access public
+   * @param string $template_filename Template Filename
+   */
+  function __construct( $template_filename = '' ) {
+    global $_CONFIG;
+
+    if (!empty($_CONFIG['quickskin_compiled'])) {
+      $this->temp_dir  =  $_CONFIG['quickskin_compiled'];
+    }
+    if (!empty($_CONFIG['quickskin_cache'])) {
+      $this->cache_dir  =  $_CONFIG['quickskin_cache'];
+    }
+    if (is_numeric($_CONFIG['cache_lifetime'])) {
+      $this->cache_lifetime  =  $_CONFIG['cache_lifetime'];
+    }
+    if (!empty($_CONFIG['template_dir'])  &&  is_file($_CONFIG['template_dir'] . '/' . $template_filename)) {
+      $this->template_dir  =  $_CONFIG['template_dir'];
+    }
+    $this->tpl_file  =  $template_filename;
+    if ( dirname($this->tpl_file) != "") {
+      $this->skins_sub_dir = dirname($this->tpl_file);
+    }
+  }
+
+  /* DEPRECATED METHODS */
+  /* Methods used in older parser versions, soon will be removed */
+  function set_templatefile ($template_filename)  { $this->tpl_file  =  $template_filename; }
+  function add_value ($name, $value )       { $this->assign($name, $value); }
+  function add_array ($name, $value )       { $this->append($name, $value); }
+
+  /* Process file or contents to strip out the <body tag (inclusive)
+   * and the </body tag to the end
+   *
+   * Usage Example:
+   * $page->getContents( '', '/contents.htm' );
+   * or
+   * $page->getContents( 'start of data .... end of data' );
+   *
+   * @access public
+   * @param string $contents Parameter contents
+   * @param string $filename Parameter filename (fully qualified)
+   * @desc strip out body tags and return only page data
+   */
+  function getContents($contents, $filename="") {
+    if ( $contents == '' && $filename != '' && file_exists($filename) ) {
+      $contents = file_get_contents($filename);
+    }
+
+    // START process any PHP code
+    ob_start();
+    eval("?>".$contents."<?php ");
+    $contents = ob_get_contents();
+    ob_end_clean();
+    // END process any PHP code
+    $lower_contents = strtolower($contents);
+    // determine if a <body tag exists and process if necessary
+    $bodytag_start = strpos($lower_contents, "<body");
+    if ( $bodytag_start !== false ) {
+      $bodytag_end    = strpos($lower_contents, ">", $bodytag_start) + 1;
+      // get contents with <body tag removed
+      $contents       = substr($contents, $bodytag_end);
+      $lower_contents = strtolower($contents);
+      // work on </body closing tag
+      $end_start      = strpos($lower_contents, "</body");
+      $end_end        = strpos($lower_contents, ">", $bodytag_start) + 1;
+      // return stripped out <body and </body tags
+      return $this->getExtensions( substr($contents, 0, $end_start) );
+    } else {
+      // body tags not found, so return data
+      return $this->getExtensions( $contents );
+    }
+  }
+
+  /* Determine Contents Command from Variable Name
+   * {variable}             :  array( "echo",              "variable" )  ->  echo $_obj['variable']
+   * {variable > new_name}  :  array( "_obj['new_name']=", "variable" )  ->  $_obj['new_name']= $_obj['variable']
+   * @param string $tag Variale Name used in Template
+   * @return array  Array Command, Variable
+   * @access private
+   * @desc Determine Contents Command from Variable Name
+   */
+  function processCmd($tag) {
+    if (preg_match('/^(.+) > ([a-zA-Z0-9_.]+)$/', $tag, $tagvar)) {
+      $tag  =  $tagvar[1];
+      list($newblock, $newskalar)  =  $this->var_name($tagvar[2]);
+      $cmd  =  "\$$newblock"."['$newskalar']=";
+    } else {
+      $cmd  =  'echo';
+    }
+    $ret = array($cmd, $tag);
+    return $ret;
+  }
+
+  /* Load and process the Extensions that may be used in the Contents
+   *
+   * Usage Example:
+   * $tcnt = $this->getExtensions( $param );
+   *
+   * @access public
+   * @param string $param (content to process)
+   * @return string
+   * @desc Load and process the Extensions that may be used in the Contents
+   */
+  function getExtensions($contents) {
+    $header = '';
+    /* Include Extensions */
+    if (preg_match_all('/'.$this->left_delimiter.'([a-zA-Z0-9_]+):([^}]*)'.$this->right_delimiter.'/', $contents, $var)) {
+      foreach ($var[2] as $cnt => $tag) {
+        /* Determine Command (echo / $obj[n]=) */
+        list($cmd, $tag)  =  $this->processCmd($tag);
+
+        $extension  =  $var[1][$cnt];
+        //if (!isset($this->extension_tagged[$extension])) {
+          $header .= 'include_once "'.$this->extensions_dir."/".$this->extension_prefix."$extension.php\";\n";
+        //  $this->extension_tagged[$extension]  =  true;
+        //}
+        if (!strlen($tag)) {
+          $code  =  "<?php\n$cmd ".$this->extension_prefix."$extension();\n?>\n";
+        } elseif (substr($tag, 0, 1) == '"') {
+          $code  =  "<?php\n$cmd ".$this->extension_prefix."$extension($tag);\n?>\n";
+        } elseif (strpos($tag, ',')) {
+          list($tag, $addparam)  =  explode(',', $tag, 2);
+          list($block, $skalar)  =  $this->var_name($tag);
+          if (preg_match('/^([a-zA-Z_]+)/', $addparam, $match)) {
+            $nexttag   =  $match[1];
+            list($nextblock, $nextskalar)  =  $this->var_name($nexttag);
+            $addparam  =  substr($addparam, strlen($nexttag));
+            $code  =  "<?php\n$cmd ".$this->extension_prefix."$extension(\$$block"."['$skalar'],\$$nextblock"."['$nextskalar']"."$addparam);\n?>\n";
+          } else {
+            $code  =  "<?php\n$cmd ".$this->extension_prefix."$extension(\$$block"."['$skalar'],$addparam);\n?>\n";
+          }
+        } else {
+          list($block, $skalar) = $this->var_name($tag);
+          $code  =  "<?php\n$cmd ".$this->extension_prefix."$extension(\$$block"."['$skalar']);\n?>\n";
+        }
+        $contents  =  str_replace($var[0][$cnt],  $code,  $contents);
+      }
+    }
+    // START process any PHP code
+    ob_start();
+    eval($header);
+    eval("?>".$contents."<?php ");
+    $contents = ob_get_contents();
+    ob_end_clean();
+    // END process any PHP code
+    return $contents;
+  }
+
+  /* Assign Supplementary Template
+   *
+   * Usage Example:
+   * $page->addtpl( 'sponsors', 'default/poweredby.htm' );
+   *
+   * @access public
+   * @param string $name Parameter Name
+   * @param string $value Parameter Value
+   * @desc Assign Supplementary Template
+   */
+  function addtpl ( $name, $value = '' ) {
+    if (is_array($name)) {
+      foreach ($name as $k => $v) {
+        $this->supptemplate[$k]  =  $v;
+      }
+    } else {
+      $this->supptemplate[$name]  =  $value;
+    }
+  }
+
+  /* Assign Template Content
+   *
+   * Usage Example:
+   * $page->assign( 'TITLE',     'My Document Title' );
+   * $page->assign( 'userlist',  array(
+   *                               array( 'ID' => 123,  'NAME' => 'John Doe' ),
+   *                               array( 'ID' => 124,  'NAME' => 'Jack Doe' ),
+   *                             );
+   *
+   * @access public
+   * @param string $name Parameter Name
+   * @param mixed $value Parameter Value
+   * @desc Assign Template Content
+   */
+  function assign ( $name, $value = '' ) {
+    if (is_array($name)) {
+      foreach ($name as $k => $v) {
+        $this->data[$k]  =  $v;
+      }
+    } else {
+      $this->data[$name]  =  $value;
+    }
+  }
+
+  /* Assign Template Content
+   *
+   * Usage Example:
+   * $page->append( 'userlist',  array( 'ID' => 123,  'NAME' => 'John Doe' ) );
+   * $page->append( 'userlist',  array( 'ID' => 124,  'NAME' => 'Jack Doe' ) );
+   *
+   * @access public
+   * @param string $name Parameter Name
+   * @param mixed $value Parameter Value
+   * @desc Assign Template Content
+   */
+  function append ( $name, $value ) {
+    if (is_array($value)) {
+      $this->data[$name][]  =  $value;
+    } elseif (!is_array($this->data[$name])) {
+      $this->data[$name]  .=  $value;
+    }
+  }
+
+  /* Parser Wrapper
+   * Returns Template Output as a String
+   *
+   * @access public
+   * @param array $_top Content Array
+   * @return string  Parsed Template
+   * @desc Output Buffer Parser Wrapper
+   */
+  function result ( $_top = '' ) {
+    ob_start();
+    $this->output( $_top );
+    $result  =  ob_get_contents();
+    ob_end_clean();
+    return $result;
+  }
+
+  /* Execute parsed Template
+   * Prints Parsing Results to Standard Output
+   *
+   * @access public
+   * @param array $_top Content Array
+   * @desc Execute parsed Template
+   */
+  function output ( $_top = '' ) {
+    global $_top;
+
+    $data   = $this->data;
+    /* Process supplementary templates */
+    if ( is_array($this->supptemplate) && !empty($this->supptemplate) ) { // passed by addtpl functionality
+      foreach ($this->supptemplate as $key => $value) {
+        $supp_templates[$key] = file_get_contents($value);
+      }
+    }
+
+    /* Make sure that folder names have a trailing '/' */
+    if (strlen($this->template_dir)  &&  substr($this->template_dir, -1) != '/') {
+      $this->template_dir  .=  '/';
+    }
+    if (strlen($this->temp_dir)  &&  substr($this->temp_dir, -1) != '/') {
+      $this->temp_dir  .=  '/';
+    }
+
+    /* Prepare Template Content*/
+    if (!is_array($_top)) {
+      if (strlen($_top)) {
+        $this->tpl_file  =  $_top;
+      }
+      $_top  =  $this->data;
+    }
+    $_obj  =  &$_top;
+    $_stack_cnt  =  0;
+    $_stack[$_stack_cnt++]  =  $_obj;
+
+    /* Check if template is already compiled */
+    $queryString = $_SERVER['QUERY_STRING'];
+    $cpl_file_name = preg_replace('/[:\/.\\\\]/', '_', $this->tpl_file . '?' . $queryString);
+    if (strlen($cpl_file_name) > 0) {
+      $cpl_file_name = 'qs_' . md5($cpl_file_name);
+      $this->cpl_file  =  $this->temp_dir . $cpl_file_name . '.php';
+      $compile_template  =  true;
+      if ($this->reuse_code) {
+        if (is_file($this->cpl_file)) {
+          if ($this->mtime($this->cpl_file) > $this->mtime($this->template_dir . $this->tpl_file)) {
+            $compile_template  =  false;
+          }
+        }
+      }
+      if ($compile_template) {
+        $this->parser = new QuickSkinParser();
+        $this->parser->template_dir     = $this->template_dir;
+        $this->parser->skins_sub_dir    = $this->skins_sub_dir;
+        $this->parser->tpl_file         = $this->tpl_file;
+        $this->parser->left_delimiter   = $this->left_delimiter;
+        $this->parser->right_delimiter  = $this->right_delimiter;
+        $this->parser->extensions_dir   = $this->extensions_dir;
+        $this->parser->extension_prefix = $this->extension_prefix;
+        $this->parser->supp_templates   = $this->supp_templates;
+
+        if (!$this->parser->compile($this->cpl_file,$data,$this->supp_templates,$this->extensions_dir)) {
+          exit('QuickSkin Parser Error: ' . $this->parser->error);
+        }
+      }
+      /* Execute Compiled Template */
+      include($this->cpl_file);
+    } else {
+      exit('QuickSkin Error: You must set a template file name');
+    }
+    /* Delete Global Content Array in order to allow multiple use of QuickSkin class in one script */
+    unset ($GLOBALS['_top']);
+  }
+
+  /* Debug Template
+   *
+   * @access public
+   * @param array $_top Content Array
+   * @desc Debug Template
+   */
+  function debug ( $_top = '' ) {
+    /* Prepare Template Content */
+    if (!$_top) {
+      $_top  =  $this->data;
+    }
+    if (@include_once('class.quickskindebugger.php')) {
+      $this->debugger = new QuickSkinDebugger($this->template_dir . $this->tpl_file, $this->right_delimiter, $this->left_delimiter);
+      $this->debugger->start($_top);
+    } else {
+      exit( 'QuickSkin Error: Cannot find class.quickskindebugger.php; check QuickSkin installation');
+    }
+  }
+
+  /* Start Ouput Content Buffering
+   *
+   * Usage Example:
+   * $page = new QuickSkin('template.html');
+   * $page->use_cache();
+   * ...
+   *
+   * @access public
+   * @desc Output Cache
+   */
+  function use_cache ( $key = '' ) {
+    if (empty($_POST)) {
+      $this->cache_filename  =  $this->cache_dir . 'cache_' . md5($_SERVER['REQUEST_URI'] . serialize($key)) . '.ser';
+      if (($_SERVER['HTTP_CACHE_CONTROL'] != 'no-cache')  &&  ($_SERVER['HTTP_PRAGMA'] != 'no-cache')  &&  @is_file($this->cache_filename)) {
+        if ((time() - filemtime($this->cache_filename)) < $this->cache_lifetime) {
+          readfile($this->cache_filename);
+          exit;
+        }
+      }
+      ob_start( array( &$this, 'cache_callback' ) );
+    }
+  }
+
+  /* Output Buffer Callback Function
+   *
+   * @access private
+   * @param string $output
+   * @return string $output
+   */
+  function cache_callback ( $output ) {
+    if ($hd = @fopen($this->cache_filename, 'w')) {
+      fwrite($hd,  $output);
+      fclose($hd);
+    } else {
+      $output = 'QuickSkin Error: failed to open cache file "' . $this->cache_filename . '"';
+    }
+    return $output;
+  }
+
+  /* Determine Last Filechange Date (if File exists)
+   *
+   * @access private
+   * @param string $filename
+   * @return mixed
+   * @desc Determine Last Filechange Date
+   */
+  function mtime ( $filename ) {
+    if (@is_file($filename)) {
+      $ret = filemtime($filename);
+      return $ret;
+    }
+  }
+
+  /* Set (or reset) Properties (variables)
+   *
+   * Usage Example:
+   * $page->set('reuse_code', true);
+   *
+   * @access public
+   * @param string $name Parameter Name
+   * @param mixed $value Parameter Value
+   * NOTE: will not work with arrays, there are no arrays to set/reset */
+  function set ( $name, $value = '' ) {
+    if ( isset($this->$name) ) {
+      $this->$name = $value;
+    } else {
+      exit( 'QuickSkin Error: Attempt to set a non-existant class property: ' . $name);
+    }
+  }
+
+}
+
+/*~
+.---------------------------------------------------------------------------.
+|  Software: QuickSkinParser Class * Used by QuickSkin Class                |
+|   Version: 5.0                                                            |
+|   Contact: andy.prevost@worxteam.com,andy@codeworx.ca                     |
+|      Info: http://quickskin.sourceforge.net                               |
+|   Support: http://sourceforge.net/projects/quickskin/                     |
+| ------------------------------------------------------------------------- |
+|    Author: Andy Prevost andy.prevost@worxteam.com (admin)                 |
+|    Author: Manuel 'EndelWar' Dalla Lana endelwar@aregar.it (former admin) |
+|    Author: Philipp v. Criegern philipp@criegern.com (original founder)    |
+| Copyright (c) 2002-2009, Andy Prevost. All Rights Reserved.               |
+|    * NOTE: QuickSkin is the SmartTemplate project renamed. SmartTemplate  |
+|            information and downloads can still be accessed at the         |
+|            smarttemplate.sourceforge.net site                             |
+| ------------------------------------------------------------------------- |
+|   License: Distributed under the Lesser General Public License (LGPL)     |
+|            http://www.gnu.org/copyleft/lesser.html                        |
+| This program is distributed in the hope that it will be useful - WITHOUT  |
+| ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or     |
+| FITNESS FOR A PARTICULAR PURPOSE.                                         |
+| ------------------------------------------------------------------------- |
+| We offer a number of paid services:                                       |
+| - Web Hosting on highly optimized fast and secure servers                 |
+| - Technology Consulting                                                   |
+| - Oursourcing (highly qualified programmers and graphic designers)        |
+'---------------------------------------------------------------------------'
+Last modified: January 01 2009 ~*/
+
+class QuickSkinParser {
+
+  /////////////////////////////////////////////////
+  // PROPERTIES, PUBLIC
+  /////////////////////////////////////////////////
+
+  public $error;               /* Error messages */
+  public $template;            /* The template itself */
+  public $tpl_file;            /* The template filename */
+  public $template_dir;        /* The template filename used to extract the dirname for subtemplates */
+  public $skins_sub_dir;       /* The template subdirectory, passed by main class */
+  public $extensions_dir;      /* The extension directory */
+  public $extension_tagged = array(); /* List of used QuickSkin Extensions */
+  public $left_delimiter;      /* Default Left delimiter */
+  public $right_delimiter;     /* Default Right delimiter */
+  public $supp_templates = ''; /* Contains array or single supplementary template(s) */
+  public $extension_prefix;    /* filename prefix on all the extensions files */
+
+  /* QuickSkinParser Constructor */
+  /*
+  function __construct() {
+  }
+  */
+
+  /* Replace template logical expression in IF..ENDIF (|| or &&) with php logical expression
+   * @access private
+   * @desc replace template logical expression (|| or &&) with php logical expression
+   * @author Bruce Huang (msn: huang_x_c@163.com)
+   * @param string $src_page source page intended to be replaced
+   */
+  function replace_logic_expression( &$src_page ) {
+    /* cannot find '||' or '&&' */
+    if(!strpos($src_page, '||') && !strpos($src_page, '&&')) {
+      return;
+    }
+    /* match 'ELSE' and the last sub expression */
+    if (preg_match_all('/<!-- (ELSE)?IF \s*(\(*).*[|&]{2}\s*\(*\s*([a-zA-Z0-9_.]+)\s*([!=<>]+)\s*(["]?[^"]*?["]?)\s*(\)*)\s* -->/', $src_page, $var)) {
+      foreach ($var[3] as $cnt => $tag) {
+        list($parent, $block)  =  $this->var_name($tag);
+        $cmp   =  $var[4][$cnt];
+        $val   =  $var[5][$cnt];
+        $else  =  ($var[1][$cnt] == 'ELSE') ? '} else' : '';
+        if ($cmp == '=') {
+          $cmp  =  '==';
+        }
+        if (preg_match('/"([^"]*)"/',$val,$matches)) {
+          $code_suffix  =  "\$$parent"."['$block'] $cmp \"".$matches[1].$var[6][$cnt]."\"){\n?>";
+        } elseif (preg_match('/([^"]*)/',$val,$matches)) {
+          list($parent_right, $block_right)  =  $this->var_name($matches[1]);
+          $code_suffix  =  "\$$parent"."['$block'] $cmp \$$parent_right"."['$block_right']".$var[6][$cnt]."){\?>";
+        }
+
+        /* match other sub expressions */
+        if (preg_match_all('/([a-zA-Z0-9_.]+)\s*([!=<>]+)\s*(["]?[^"]*?["]?)\s*(\)*\s*[|&]{2}\s*\(*)\s*/', $var[0][$cnt], $sub_var)) {
+          $code_mid = '';
+          foreach($sub_var[1] as $sub_cnt => $sub_tag) {
+            list($sub_parent, $sub_block) = $this->var_name($sub_tag);
+            $cmp = $sub_var[2][$sub_cnt];
+            $val = $sub_var[3][$sub_cnt];
+            $logic_exp  =  $sub_var[4][$sub_cnt];
+            if ($cmp == '=') {
+              $cmp  =  '==';
+            }
+            if (preg_match('/"([^"]*)"/',$val,$matches)) {
+              $code_mid  =  $code_mid."\$$sub_parent"."['$sub_block'] $cmp \"".$matches[1]."\"".$logic_exp;
+            } elseif (preg_match('/([^"]*)/',$val,$matches)) {
+              list($sub_parent_right, $sub_block_right)  =  $this->var_name($matches[1]);
+              $code_mid  =  $code_mid."\$$sub_parent"."['$sub_block'] $cmp \$$sub_parent_right"."['$sub_block_right']".$logic_exp;
+            }
+          }
+        }
+        $code = "<?php\n".$else.'if ('.$var[2][$cnt].$code_mid.$code_suffix;
+        $src_page = str_replace($var[0][$cnt],  $code,  $src_page);
+      }
+    }
+  }
+
+  /* Main Template Parser
+   * @param string $compiled_template_filename Compiled Template Filename
+   * @desc Creates Compiled PHP Template
+   */
+  function compile( $compiled_template_filename = '', $data='', $supp_templates='', $extensions_dir='' ) {
+
+    $this->extension_prefix = preg_quote($this->extension_prefix);
+
+    /* Load Template */
+    $template_filename = $this->template_dir . $this->tpl_file;
+    if ($hd = @fopen($template_filename, 'r')) {
+      if (filesize($template_filename)) {
+        $this->template = fread($hd, filesize($template_filename));
+        $this->left_delimiter = preg_quote($this->left_delimiter);
+        $this->right_delimiter = preg_quote($this->right_delimiter);
+      } else {
+        $this->template = 'QuickSkin Parser Error: File size is zero byte: ' .$template_filename;
+      }
+      fclose($hd);
+    } else {
+      $this->template = 'QuickSkin Parser Error: File not found: ' .$template_filename;
+    }
+
+    if (empty($this->template)) {
+      return;
+    }
+
+    /* Do the variable substitution for paths, urls, subtemplates */
+    $this->template = $this->worx_var_swap($this->template, $data, $supp_templates);
+
+    $header = '';
+
+    /* Code to allow subtemplates */
+    if(eregi("<!-- INCLUDE", $this->template)) {
+      while ($this->count_subtemplates() > 0) {
+        preg_match_all('/<!-- INCLUDE ([a-zA-Z0-9\-_.]+) -->/', $this->template, $tvar);
+        foreach($tvar[1] as $subfile) {
+          if(file_exists($this->template_dir . '/' . $this->skins_sub_dir . '/' .$subfile)) {
+            $subst = implode('',file($this->template_dir . '/' . $this->skins_sub_dir . '/' .$subfile));
+          } else {
+            $subst = 'QuickSkin Parser Error: Subtemplate not found: \''.$subfile.'\'';
+          }
+          $this->template = str_replace("<!-- INCLUDE $subfile -->", $subst, $this->template);
+        }
+      }
+    }
+    /* END, ELSE Blocks */
+    $page  =  preg_replace("/<!-- ENDIF.+?-->/", "<?php\n}\n?>", $this->template);
+    $page  =  preg_replace("/<!-- END[ a-zA-Z0-9_.]* -->/",  "<?php\n}\n\$_obj=\$_stack[--\$_stack_cnt];}\n?>", $page);
+    $page  =  str_replace("<!-- ELSE -->", "<?php\n} else {\n?>", $page);
+
+    /* 'BEGIN - END' Blocks */
+    if (preg_match_all('/<!-- BEGIN ([a-zA-Z0-9_.]+) -->/', $page, $var)) {
+      foreach ($var[1] as $tag) {
+        list($parent, $block)  =  $this->var_name($tag);
+        $code  =  "<?php\n"
+            . "if (!empty(\$$parent"."['$block'])){\n"
+            . "if (!is_array(\$$parent"."['$block']))\n"
+            . "\$$parent"."['$block']=array(array('$block'=>\$$parent"."['$block']));\n"
+            . "\$_stack[\$_stack_cnt++]=\$_obj;\n"
+            . "\$rowcounter = 0;\n"
+            . "foreach (\$$parent"."['$block'] as \$rowcnt=>\$$block) {\n"
+              . "\$$block"."['ROWCNT']=(\$rowcounter);\n"
+              . "\$$block"."['ALTROW']=\$rowcounter%2;\n"
+              . "\$$block"."['ROWBIT']=\$rowcounter%2;\n"
+              . "\$rowcounter++;"
+              . "\$_obj=&\$$block;\n?>";
+        $page  =  str_replace("<!-- BEGIN $tag -->",  $code,  $page);
+      }
+    }
+
+    /* replace logical operator in [ELSE]IF */
+    $this->replace_logic_expression($page);
+
+    /* 'IF nnn=mmm' Blocks */
+    if (preg_match_all('/<!-- (ELSE)?IF ([a-zA-Z0-9_.]+)\s*([!=<>]+)\s*(["]?[^"]*["]?) -->/', $page, $var)) {
+      foreach ($var[2] as $cnt => $tag) {
+        list($parent, $block)  =  $this->var_name($tag);
+        $cmp   =  $var[3][$cnt];
+        $val   =  $var[4][$cnt];
+        $else  =  ($var[1][$cnt] == 'ELSE') ? '} else' : '';
+        if ($cmp == '=') {
+          $cmp  =  '==';
+        }
+
+        if (preg_match('/"([^"]*)"/',$val,$matches)) {
+          $code  =  "<?php\n$else"."if (\$$parent"."['$block'] $cmp \"".$matches[1]."\"){\n?>";
+        } elseif (preg_match('/([^"]*)/',$val,$matches)) {
+          list($parent_right, $block_right)  =  $this->var_name($matches[1]);
+          $code  =  "<?php\n$else"."if (\$$parent"."['$block'] $cmp \$$parent_right"."['$block_right']){\n?>";
+        }
+
+        $page  =  str_replace($var[0][$cnt],  $code,  $page);
+      }
+    }
+
+    /* 'IF nnn' Blocks */
+    if (preg_match_all('/<!-- (ELSE)?IF ([a-zA-Z0-9_.]+) -->/', $page, $var)) {
+      foreach ($var[2] as $cnt => $tag) {
+        $else  =  ($var[1][$cnt] == 'ELSE') ? '} else' : '';
+        list($parent, $block)  =  $this->var_name($tag);
+        $code  =  "<?php\n$else"."if (!empty(\$$parent"."['$block'])){\n?>";
+        $page  =  str_replace($var[0][$cnt],  $code,  $page);
+      }
+    }
+
+    /* 'IF {extension:variable}'=mmm Blocks
+     * e.g.
+     * <!-- IF {count:list} > 0 -->
+     * List populated
+     * <!-- ELSE -->
+     * List is empty
+     * <!-- ENDIF -->
+     * thanks to Khary Sharpe (ksharpe [at] kharysharpe [dot] com) for the initial code
+     */
+    if (preg_match_all('/<!-- (ELSE)?IF {([a-zA-Z0-9_]+):([^}]*)}\s*([!=<>]+)\s*(["]?[^"]*["]?) -->/', $page, $var)) {
+      foreach ($var[2] as $cnt => $tag) {
+        list($parent, $block)  =  $this->var_name($tag);
+        $cmp   =  $var[4][$cnt];
+        $val   =  $var[5][$cnt];
+        $else  =  ($var[1][$cnt] == 'ELSE') ? '} else' : '';
+        if ($cmp == '=') {
+          $cmp  =  '==';
+        }
+
+        $extension = $var[2][$cnt];
+        $extension_var = $var[3][$cnt];
+        if (!isset($this->extension_tagged[$extension])) {
+          $header .= 'include_once  "'.$this->extensions_dir."/".$this->extension_prefix."$extension.php\";\n";
+          $this->extension_tagged[$extension] = true;
+        }
+        if (!strlen($extension_var)) {
+          $code = "<?php\n$else"."if (".$this->extension_prefix."$extension() $cmp $val) {\n?>\n";
+        } elseif (substr($extension_var, 0, 1) == '"') {
+          $code = "<?php\n$else"."if (".$this->extension_prefix."$extension($extension_var) $cmp $val) {\n?>\n";
+        } elseif (strpos($extension_var, ',')) {
+          list($tag, $addparam) = explode(',', $extension_var, 2);
+          list($block, $skalar) = $this->var_name($extension_var);
+          if (preg_match('/^([a-zA-Z_]+)/', $addparam, $match)) {
+            $nexttag = $match[1];
+            list($nextblock, $nextskalar) = $this->var_name($nexttag);
+            $addparam = substr($addparam, strlen($nexttag));
+            $code = "<?php\n$else"."if (".$this->extension_prefix."$extension(\$$block"."['$skalar'],\$$nextblock"."['$nextskalar']"."$addparam) $cmp $val) {\n?>\n";
+          } else {
+            $code = "<?php\n$else"."if (".$this->extension_prefix."$extension(\$$block"."['$skalar'],$addparam) $cmp $val) {\n?>\n";
+          }
+        } else {
+          list($block, $skalar) = $this->var_name($extension_var);
+          $code = "<?php\n$else"."if (".$this->extension_prefix."$extension(\$$block"."['$skalar']) $cmp $val) {\n?>\n";
+        }
+        $page = str_replace($var[0][$cnt], $code, $page);
+      }
+    }
+
+    /* Replace Scalars */
+    if (preg_match_all('/'.$this->left_delimiter.'([a-zA-Z0-9_. >]+)'.$this->right_delimiter.'/', $page, $var)) {
+      foreach ($var[1] as $fulltag) {
+        /* Determine Command (echo / $obj[n]=) */
+        list($cmd, $tag)  =  $this->cmd_name($fulltag);
+        list($block, $skalar)  =  $this->var_name($tag);
+        $code  =  "<?php\n$cmd \$$block"."['$skalar'];\n?>\n";
+        $page  =  str_replace(stripslashes($this->left_delimiter).$fulltag.stripslashes($this->right_delimiter), $code, $page);
+      }
+    }
+
+    /* Replace Translations */
+    if (preg_match_all('/<"([a-zA-Z0-9_.]+)">/', $page, $var)) {
+      foreach ($var[1] as $tag) {
+        list($block, $skalar)  =  $this->var_name($tag);
+        $code  =  "<?php\necho gettext('$skalar');\n?>\n";
+        $page  =  str_replace('<"'.$tag.'">',  $code,  $page);
+      }
+    }
+
+    /* Include Extensions */
+    if (preg_match_all('/'.$this->left_delimiter.'([a-zA-Z0-9_]+):([^}]*)'.$this->right_delimiter.'/', $page, $var)) {
+      foreach ($var[2] as $cnt => $tag) {
+        /* Determine Command (echo / $obj[n]=) */
+        list($cmd, $tag)  =  $this->cmd_name($tag);
+
+        $extension  =  $var[1][$cnt];
+        if (!isset($this->extension_tagged[$extension])) {
+          $header .= 'include_once "'.$this->extensions_dir."/".$this->extension_prefix."$extension.php\";\n";
+          $this->extension_tagged[$extension]  =  true;
+        }
+        if (!strlen($tag)) {
+          $code  =  "<?php\n$cmd ".$this->extension_prefix."$extension();\n?>\n";
+        } elseif (substr($tag, 0, 1) == '"') {
+          $code  =  "<?php\n$cmd ".$this->extension_prefix."$extension($tag);\n?>\n";
+        } elseif (strpos($tag, ',')) {
+          list($tag, $addparam)  =  explode(',', $tag, 2);
+          list($block, $skalar)  =  $this->var_name($tag);
+          if (preg_match('/^([a-zA-Z_]+)/', $addparam, $match)) {
+            $nexttag   =  $match[1];
+            list($nextblock, $nextskalar)  =  $this->var_name($nexttag);
+            $addparam  =  substr($addparam, strlen($nexttag));
+            $code  =  "<?php\n$cmd ".$this->extension_prefix."$extension(\$$block"."['$skalar'],\$$nextblock"."['$nextskalar']"."$addparam);\n?>\n";
+          } else {
+            $code  =  "<?php\n$cmd ".$this->extension_prefix."$extension(\$$block"."['$skalar'],$addparam);\n?>\n";
+          }
+        } else {
+          list($block, $skalar) = $this->var_name($tag);
+          $code  =  "<?php\n$cmd ".$this->extension_prefix."$extension(\$$block"."['$skalar']);\n?>\n";
+        }
+        $page  =  str_replace($var[0][$cnt],  $code,  $page);
+      }
+    }
+
+    /* Add Include Header */
+    if (isset($header) && !empty($header)) {
+      $page  =  "<?php\n$header\n?>$page";
+    }
+
+    /* do substitutions on included supplementary templates */
+    $page = $this->worx_tpl_swap($page, $data, $supp_templates);
+
+    /* Store Code to Temp Dir */
+    if (strlen($compiled_template_filename)) {
+      if ($hd  =  fopen($compiled_template_filename,  'w')) {
+        fwrite($hd,  $page);
+        fclose($hd);
+        return true;
+      } else {
+        $this->error  =  'Could not write compiled file.';
+        return false;
+      }
+    } else {
+      return $page;
+    }
+  }
+
+  /* Splits Template-Style Variable Names into an Array-Name/Key-Name Components
+   * {example}               :  array( "_obj",                   "example" )  ->  $_obj['example']
+   * {example.value}         :  array( "_obj['example']",        "value" )    ->  $_obj['example']['value']
+   * {example.0.value}       :  array( "_obj['example'][0]",     "value" )    ->  $_obj['example'][0]['value']
+   * {top.example}           :  array( "_stack[0]",              "example" )  ->  $_stack[0]['example']
+   * {parent.example}        :  array( "_stack[$_stack_cnt-1]",  "example" )  ->  $_stack[$_stack_cnt-1]['example']
+   * {parent.parent.example} :  array( "_stack[$_stack_cnt-2]",  "example" )  ->  $_stack[$_stack_cnt-2]['example']
+   * @param string $tag Variale Name used in Template
+   * @return array  Array Name, Key Name
+   * @access private
+   * @desc Splits Template-Style Variable Names into an Array-Name/Key-Name Components
+   */
+  function var_name($tag) {
+    $parent_level  =  0;
+    while (substr($tag, 0, 7) == 'parent.') {
+      $tag  =  substr($tag, 7);
+      $parent_level++;
+    }
+    if (substr($tag, 0, 4) == 'top.') {
+      $obj  =  '_stack[0]';
+      $tag  =  substr($tag,4);
+    } elseif ($parent_level) {
+      $obj  =  '_stack[$_stack_cnt-'.$parent_level.']';
+    } else {
+      $obj  =  '_obj';
+    }
+    while (is_int(strpos($tag, '.'))) {
+      list($parent, $tag)  =  explode('.', $tag, 2);
+      if (is_numeric($parent)) {
+        $obj  .=  "[" . $parent . "]";
+      } else {
+        $obj  .=  "['" . $parent . "']";
+      }
+    }
+    $ret = array($obj, $tag);
+    return $ret;
+  }
+
+  /* Determine Template Command from Variable Name
+   * {variable}             :  array( "echo",              "variable" )  ->  echo $_obj['variable']
+   * {variable > new_name}  :  array( "_obj['new_name']=", "variable" )  ->  $_obj['new_name']= $_obj['variable']
+   * @param string $tag Variale Name used in Template
+   * @return array  Array Command, Variable
+   * @access private
+   * @desc Determine Template Command from Variable Name
+   */
+  function cmd_name($tag) {
+    if (preg_match('/^(.+) > ([a-zA-Z0-9_.]+)$/', $tag, $tagvar)) {
+      $tag  =  $tagvar[1];
+      list($newblock, $newskalar)  =  $this->var_name($tagvar[2]);
+      $cmd  =  "\$$newblock"."['$newskalar']=";
+    } else {
+      $cmd  =  'echo';
+    }
+    $ret = array($cmd, $tag);
+    return $ret;
+  }
+
+  /* @return int Number of subtemplate included
+   * @access private
+   * @desc Count number of subtemplates included in current template
+   */
+  function count_subtemplates() {
+    $ret = preg_match_all('/<!-- INCLUDE ([a-zA-Z0-9_.]+) -->/', $this->template, $tvar);
+    unset($tvar);
+    return $ret;
+  }
+
+  function worx_var_swap($tpldata, $data, $supp_templates) { /* do the substitution of the variables here */
+
+    /* replace all the template elements (sub templates) */
+    if ( is_array($supp_templates) && !empty($supp_templates) ) {
+      foreach ($supp_templates as $key => $val) {
+        $tpldata = str_replace("\{$key}", $val, $tpldata);
+      }
+    }
+    /* do the substitution of the directory names here */
+
+    return $tpldata;
+
+  }
+
+  function worx_tpl_swap($tpldata, $data, $supp_templates) { /* do the substitution of the sub templates here */
+
+    /* do the substitution of the directory names here */
+
+    /* do image link substitution */
+    if ( $data['tpl_img'] != '' && $data['url_img'] != '' ) {
+      $tpldata = str_replace($data['tpl_img'],$data['url_img'],$tpldata);
+      unset($data['tpl_img']);
+      unset($data['url_img']);
+    } elseif (defined(_URL_USRIMG)) {
+      $tpldata = str_replace('tplimgs/',_URL_USRIMG,$tpldata);
+    }
+
+    /* do javascript link substitution */
+    if ( $data['tpl_js'] != '' && $data['url_js'] != '' ) {
+      $tpldata = str_replace($data['tpl_js'],$data['url_js'],$tpldata);
+      unset($data['img_tpl']);
+      unset($data['url_js']);
+    } elseif (defined(_URL_USRJS)) {
+      $tpldata = str_replace('tpljs/',_URL_USRJS,$tpldata);
+    }
+
+    /* do css link substitution */
+    if ( $data['tpl_css'] != '' && $data['url_css'] != '' ) {
+      $tpldata = str_replace($data['tpl_css'],$data['url_css'],$tpldata);
+      unset($data['tpl_css']);
+      unset($data['url_css']);
+    } elseif (defined(_URL_USRCSS)) {
+      $tpldata = str_replace('url_css/',_URL_USRCSS,$tpldata);
+    }
+
+    return $tpldata;
+
+  }
+
+}
+
+?>

Property changes on: branches/2.8.x/wb/include/quickSkin/class.quickskin.php
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Date Author Id Revision HeadURL
\ No newline at end of property
Index: branches/2.8.x/wb/admin/interface/version.php
===================================================================
--- branches/2.8.x/wb/admin/interface/version.php	(revision 1534)
+++ branches/2.8.x/wb/admin/interface/version.php	(revision 1535)
@@ -52,5 +52,5 @@
 
 // check if defined to avoid errors during installation (redirect to admin panel fails if PHP error/warnings are enabled)
 if(!defined('VERSION')) define('VERSION', '2.8.2');
-if(!defined('REVISION')) define('REVISION', '1534');
+if(!defined('REVISION')) define('REVISION', '1535');
 if(!defined('SP')) define('SP', 'SP2');
Index: branches/2.8.x/wb/framework/class.database.php
===================================================================
--- branches/2.8.x/wb/framework/class.database.php	(revision 1534)
+++ branches/2.8.x/wb/framework/class.database.php	(revision 1535)
@@ -283,6 +283,26 @@
 		return $retval;
 	}
 
+	/**
+	* retuns the type of the engine used for requested table
+	* @param string $table name of the table, including prefix
+	* @return boolean/string false on error, or name of the engine (myIsam/InnoDb)
+	*/
+	public function getTableEngine($table)
+	{
+		$retVal = false;
+		$mysqlVersion = mysql_get_server_info($this->db_handle);
+		$engineValue = (version_compare($mysqlVersion, '5.0') < 0) ? 'Type' : 'Engine';
+		$sql = "SHOW TABLE STATUS FROM " . DB_NAME . " LIKE '" . $table . "'";
+		if(($result = $this->query($sql))) {
+			if(($row = $result->fetchRow(MYSQL_ASSOC))) {
+				$retVal = $row[$engineValue];
+			}
+		}
+		return $retVal;
+	}
+
+
 } /// end of class database
 
 class mysql {
@@ -358,4 +378,3 @@
 		}
 		return $retval;
 	}
-?>
\ No newline at end of file
Index: branches/2.8.x/wb/modules/droplets/example/SectionPicker.php
===================================================================
--- branches/2.8.x/wb/modules/droplets/example/SectionPicker.php	(nonexistent)
+++ branches/2.8.x/wb/modules/droplets/example/SectionPicker.php	(revision 1535)
@@ -0,0 +1,28 @@
+//:Load the view.php from any other section-module
+//:Use [[SectionPicker?sid=123]]
+global $database, $wb, $TEXT, $DGTEXT;
+$content = '';
+if( intval($sid)>0 ) {
+	$sql  = 'SELECT `page_id`, `section_id`, `module` FROM `'.TABLE_PREFIX.'sections` ';
+	$sql .= 'WHERE `section_id` = '.(int)$sid;
+	$sql .= '';
+	if($query_sec = $database->query($sql))
+	{
+		$section = $query_sec->fetchRow();
+		$section_id = $section['section_id'];
+		$module = $section['module'];
+		$_sFrontendCss = '/modules/'.$module.'/frontend.css';
+		if(is_readable(WB_PATH.$_sFrontendCss)) {
+			$_sSearch = preg_quote(WB_URL.'/modules/'.$module.'/frontend.css', '/');
+			if(preg_match('/<link[^>]*?href\s*=\s*\"'.$_sSearch.'\".*?\/>/si', $wb_page_data)) {
+				$_sFrontendCss = '';
+			}else {
+				$_sFrontendCss = '<link href="'.WB_URL.$_sFrontendCss.'" rel="stylesheet" type="text/css" media="screen" />';
+			}
+		}
+		ob_start();
+		require(WB_PATH.'/modules/'.$module.'/view.php');
+		$content = $_sFrontendCss.ob_get_clean();
+	}
+}
+return $content;

Property changes on: branches/2.8.x/wb/modules/droplets/example/SectionPicker.php
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Date Author Id Revision HeadURL
\ No newline at end of property
Index: branches/2.8.x/wb/modules/code/uninstall.php
===================================================================
--- branches/2.8.x/wb/modules/code/uninstall.php	(revision 1534)
+++ branches/2.8.x/wb/modules/code/uninstall.php	(revision 1535)
@@ -3,9 +3,7 @@
  *
  * @category        modules
  * @package         show_menu2
- * @author          Independend-Software-Team
  * @author          WebsiteBaker Project
- * @copyright       2004-2009, Ryan Djurovich
  * @copyright       2009-2011, Website Baker Org. e.V.
  * @link            http://www.websitebaker2.org/
  * @license         http://www.gnu.org/licenses/gpl.html
@@ -18,6 +16,10 @@
  */
 
 // Must include code to stop this file being access directly
-if(defined('WB_PATH') == false) { exit("Cannot access this file directly"); }
-
-?>
\ No newline at end of file
+/* -------------------------------------------------------- */
+if(defined('WB_PATH') == false)
+{
+	// Stop this file being access directly
+		die('<head><title>Access denied</title></head><body><h2 style="color:red;margin:3em auto;text-align:center;">Cannot access this file directly</h2></body></html>');
+}
+/* -------------------------------------------------------- */
Index: branches/2.8.x/wb/modules/code/view.php
===================================================================
--- branches/2.8.x/wb/modules/code/view.php	(revision 1534)
+++ branches/2.8.x/wb/modules/code/view.php	(revision 1535)
@@ -1,30 +1,28 @@
 <?php
-
-// $Id: view.php 1420 2011-01-26 17:43:56Z Luisehahne $
-
-/*
-
- Website Baker Project <http://www.websitebaker.org/>
- Copyright (C) 2004-2009, Ryan Djurovich
-
- Website Baker is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- Website Baker is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with Website Baker; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-
+/**
+ *
+ * @category        modules
+ * @package         code
+ * @author          WebsiteBaker Project
+ * @copyright       2009-2011, Website Baker Org. e.V.
+ * @link			http://www.websitebaker2.org/
+ * @license         http://www.gnu.org/licenses/gpl.html
+ * @platform        WebsiteBaker 2.8.x
+ * @requirements    PHP 5.2.2 and higher
+ * @version         $Id: info.php 1389 2011-01-16 12:39:50Z FrankH $
+ * @filesource		$HeadURL: http://svn.websitebaker2.org/branches/2.8.x/wb/modules/code/info.php $
+ * @lastmodified    $Date: 2011-01-16 13:39:50 +0100 (So, 16. Jan 2011) $
+ *
 */
 
 // Must include code to stop this file being access directly
-if(defined('WB_PATH') == false) { die("Cannot access this file directly"); }
+/* -------------------------------------------------------- */
+if(defined('WB_PATH') == false)
+{
+	// Stop this file being access directly
+		die('<head><title>Access denied</title></head><body><h2 style="color:red;margin:3em auto;text-align:center;">Cannot access this file directly</h2></body></html>');
+}
+/* -------------------------------------------------------- */
 // Get content
 $get_content = $database->query("SELECT content FROM ".TABLE_PREFIX."mod_code WHERE section_id = '$section_id'");
 $fetch_content = $get_content->fetchRow();
@@ -31,4 +29,3 @@
 $content = $fetch_content['content'];
 eval($content);
 
-?>
\ No newline at end of file
Index: branches/2.8.x/wb/modules/code/info.php
===================================================================
--- branches/2.8.x/wb/modules/code/info.php	(revision 1534)
+++ branches/2.8.x/wb/modules/code/info.php	(revision 1535)
@@ -4,7 +4,6 @@
  * @category        modules
  * @package         code
  * @author          WebsiteBaker Project
- * @copyright       2004-2009, Ryan Djurovich
  * @copyright       2009-2011, Website Baker Org. e.V.
  * @link			http://www.websitebaker2.org/
  * @license         http://www.gnu.org/licenses/gpl.html
@@ -16,13 +15,21 @@
  *
 */
 
+// Must include code to stop this file being access directly
+/* -------------------------------------------------------- */
+if(defined('WB_PATH') == false)
+{
+	// Stop this file being access directly
+		die('<head><title>Access denied</title></head><body><h2 style="color:red;margin:3em auto;text-align:center;">Cannot access this file directly</h2></body></html>');
+}
+/* -------------------------------------------------------- */
+
 $module_directory	= 'code';
-$module_name		= 'Code';
+$module_name		= 'Code 2.8.3';
 $module_function	= 'page';
-$module_version		= '2.8.2';
+$module_version		= '2.8.3';
 $module_platform	= '2.7 | 2.8.x';
 $module_author		= 'Ryan Djurovich';
 $module_license		= 'GNU General Public License';
 $module_description	= 'This module allows you to execute PHP commands (limit access to users you trust!!)';
 
-?>
\ No newline at end of file
Index: branches/2.8.x/wb/modules/code/save.php
===================================================================
--- branches/2.8.x/wb/modules/code/save.php	(revision 1534)
+++ branches/2.8.x/wb/modules/code/save.php	(revision 1535)
@@ -4,7 +4,6 @@
  * @category        modules
  * @package         code
  * @author          WebsiteBaker Project
- * @copyright       2004-2009, Ryan Djurovich
  * @copyright       2009-2011, Website Baker Org. e.V.
  * @link			http://www.websitebaker2.org/
  * @license         http://www.gnu.org/licenses/gpl.html
@@ -31,10 +30,9 @@
 	$admin->print_error($MESSAGE['GENERIC_SECURITY_ACCESS'], ADMIN_URL.'/pages/modify.php?page_id='.$page_id);
 }
 $admin->print_header();
-
 // Update the mod_wysiwygs table with the contents
 if(isset($_POST['content'])) {
-	$tags = array('<?php', '?>' , '<?');
+	$tags = array('<?php', '?>' , '<?', '<?=');
 	$content = $admin->add_slashes(str_replace($tags, '', $_POST['content']));
 	$query = "UPDATE ".TABLE_PREFIX."mod_code SET content = '$content' WHERE section_id = '$section_id'";
 	$database->query($query);	
@@ -49,5 +47,3 @@
 
 // Print admin footer
 $admin->print_footer();
-
-?>
\ No newline at end of file
Index: branches/2.8.x/wb/modules/code/delete.php
===================================================================
--- branches/2.8.x/wb/modules/code/delete.php	(revision 1534)
+++ branches/2.8.x/wb/modules/code/delete.php	(revision 1535)
@@ -1,31 +1,29 @@
 <?php
+/**
+ *
+ * @category        modules
+ * @package         code
+ * @author          WebsiteBaker Project
+ * @copyright       2009-2011, Website Baker Org. e.V.
+ * @link			http://www.websitebaker2.org/
+ * @license         http://www.gnu.org/licenses/gpl.html
+ * @platform        WebsiteBaker 2.8.x
+ * @requirements    PHP 5.2.2 and higher
+ * @version         $Id: info.php 1389 2011-01-16 12:39:50Z FrankH $
+ * @filesource		$HeadURL: http://svn.websitebaker2.org/branches/2.8.x/wb/modules/code/info.php $
+ * @lastmodified    $Date: 2011-01-16 13:39:50 +0100 (So, 16. Jan 2011) $
+ *
+*/
 
-// $Id: delete.php 1420 2011-01-26 17:43:56Z Luisehahne $
-
-/*
-
- Website Baker Project <http://www.websitebaker.org/>
- Copyright (C) 2004-2009, Ryan Djurovich
-
- Website Baker is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- Website Baker is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with Website Baker; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-
-*/
 // Must include code to stop this file being access directly
-if(defined('WB_PATH') == false) { die("Cannot access this file directly"); }
+/* -------------------------------------------------------- */
+if(defined('WB_PATH') == false)
+{
+	// Stop this file being access directly
+		die('<head><title>Access denied</title></head><body><h2 style="color:red;margin:3em auto;text-align:center;">Cannot access this file directly</h2></body></html>');
+}
+/* -------------------------------------------------------- */
 
 // Delete record from the database
 $database->query("DELETE FROM ".TABLE_PREFIX."mod_code WHERE section_id = '$section_id'");
 
-?>
\ No newline at end of file
Index: branches/2.8.x/wb/modules/code/install.php
===================================================================
--- branches/2.8.x/wb/modules/code/install.php	(revision 1534)
+++ branches/2.8.x/wb/modules/code/install.php	(revision 1535)
@@ -4,7 +4,6 @@
  * @category        modules
  * @package         code
  * @author          WebsiteBaker Project
- * @copyright       2004-2009, Ryan Djurovich
  * @copyright       2009-2011, Website Baker Org. e.V.
  * @link			http://www.websitebaker2.org/
  * @license         http://www.gnu.org/licenses/gpl.html
@@ -16,17 +15,25 @@
  *
  */
 
+/* -------------------------------------------------------- */
+if(defined('WB_PATH') == false)
+{
+	// Stop this file being access directly
+		die('<head><title>Access denied</title></head><body><h2 style="color:red;margin:3em auto;text-align:center;">Cannot access this file directly</h2></body></html>');
+}
+/* -------------------------------------------------------- */
+
 if(defined('WB_URL'))
 {
-	
+
 	// Create table
-	//$database->query("DROP TABLE IF EXISTS `".TABLE_PREFIX."mod_code`");
+	$database->query("DROP TABLE IF EXISTS `".TABLE_PREFIX."mod_code`");
 	$mod_code = 'CREATE TABLE IF NOT EXISTS `'.TABLE_PREFIX.'mod_code` ('
 		. ' `section_id` INT NOT NULL DEFAULT \'0\','
 		. ' `page_id` INT NOT NULL DEFAULT \'0\','
 		. ' `content` TEXT NOT NULL,'
 		. ' PRIMARY KEY ( `section_id` )'
-		. ' )';
+		. ' ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci';
 	$database->query($mod_code);
 
     $mod_search = "SELECT * FROM ".TABLE_PREFIX."search  WHERE value = 'code'";
@@ -59,5 +66,3 @@
 
     }
 }
-
-?>
\ No newline at end of file
Index: branches/2.8.x/wb/modules/code/modify.php
===================================================================
--- branches/2.8.x/wb/modules/code/modify.php	(revision 1534)
+++ branches/2.8.x/wb/modules/code/modify.php	(revision 1535)
@@ -4,20 +4,25 @@
  * @category        modules
  * @package         code
  * @author          WebsiteBaker Project
- * @copyright       2004-2009, Ryan Djurovich
  * @copyright       2009-2011, Website Baker Org. e.V.
  * @link			http://www.websitebaker2.org/
  * @license         http://www.gnu.org/licenses/gpl.html
  * @platform        WebsiteBaker 2.8.x
  * @requirements    PHP 5.2.2 and higher
- * @version         $Id: modify.php 1428 2011-02-07 04:55:31Z Luisehahne $
- * @filesource		$HeadURL: http://svn.websitebaker2.org/branches/2.8.x/wb/modules/code/modify.php $
- * @lastmodified    $Date: 2011-02-07 05:55:31 +0100 (Mo, 07. Feb 2011) $
+ * @version         $Id: info.php 1389 2011-01-16 12:39:50Z FrankH $
+ * @filesource		$HeadURL: http://svn.websitebaker2.org/branches/2.8.x/wb/modules/code/info.php $
+ * @lastmodified    $Date: 2011-01-16 13:39:50 +0100 (So, 16. Jan 2011) $
  *
- */
+*/
 
 // Must include code to stop this file being access directly
-if(defined('WB_PATH') == false) { die("Cannot access this file directly"); }
+/* -------------------------------------------------------- */
+if(defined('WB_PATH') == false)
+{
+	// Stop this file being access directly
+		die('<head><title>Access denied</title></head><body><h2 style="color:red;margin:3em auto;text-align:center;">Cannot access this file directly</h2></body></html>');
+}
+/* -------------------------------------------------------- */
 
 require_once(WB_PATH . '/include/editarea/wb_wrapper_edit_area.php');
 
@@ -51,5 +56,3 @@
 $template->set_unknowns('keep');
 $template->parse('main', 'main_block', false);
 $template->pparse('output', 'page', false);
-
-?>
\ No newline at end of file
Index: branches/2.8.x/wb/modules/code/upgrade.php
===================================================================
--- branches/2.8.x/wb/modules/code/upgrade.php	(revision 1534)
+++ branches/2.8.x/wb/modules/code/upgrade.php	(revision 1535)
@@ -2,10 +2,8 @@
 /**
  *
  * @category        modules
- * @package         show_menu2
- * @author          Independend-Software-Team
+ * @package         code
  * @author          WebsiteBaker Project
- * @copyright       2004-2009, Ryan Djurovich
  * @copyright       2009-2011, Website Baker Org. e.V.
  * @link            http://www.websitebaker2.org/
  * @license         http://www.gnu.org/licenses/gpl.html
@@ -16,8 +14,24 @@
  * @lastmodified    $Date: 2011-02-07 05:55:31 +0100 (Mo, 07. Feb 2011) $
  *
  */
-
 // Must include code to stop this file being access directly
-if(defined('WB_PATH') == false) { exit("Cannot access this file directly"); }
+/* -------------------------------------------------------- */
+if(defined('WB_PATH') == false)
+{
+	// Stop this file being access directly
+		die('<head><title>Access denied</title></head><body><h2 style="color:red;margin:3em auto;text-align:center;">Cannot access this file directly</h2></body></html>');
+}
+/* -------------------------------------------------------- */
 
-?>
\ No newline at end of file
+$msg = '';
+$sTable = TABLE_PREFIX.'mod_code';
+if(($sOldType = $database->getTableEngine($sTable))) {
+	if(('myisam' != strtolower($sOldType))) {
+		if(!$database->query('ALTER TABLE `'.$sTable.'` Engine = \'MyISAM\' ')) {
+			$msg = $database->get_error();
+		}
+	}
+} else {
+	$msg = $database->get_error();
+}
+// ------------------------------------
\ No newline at end of file
Index: branches/2.8.x/wb/modules/code/add.php
===================================================================
--- branches/2.8.x/wb/modules/code/add.php	(revision 1534)
+++ branches/2.8.x/wb/modules/code/add.php	(revision 1535)
@@ -1,31 +1,27 @@
 <?php
-
-// $Id: add.php 1420 2011-01-26 17:43:56Z Luisehahne $
-
 /*
+ *
+ * @category        modules
+ * @package         code
+ * @author          WebsiteBaker Project
+ * @copyright       2009-2011, Website Baker Org. e.V.
+ * @link			http://www.websitebaker2.org/
+ * @license         http://www.gnu.org/licenses/gpl.html
+ * @platform        WebsiteBaker 2.8.x
+ * @requirements    PHP 5.2.2 and higher
+ * @version         $Id: save.php 1425 2011-02-03 23:16:12Z Luisehahne $
+ * @filesource		$HeadURL: http://svn.websitebaker2.org/branches/2.8.x/wb/modules/code/save.php $
+ * @lastmodified    $Date: 2011-02-04 00:16:12 +0100 (Fr, 04. Feb 2011) $
+ *
+ */
 
- Website Baker Project <http://www.websitebaker.org/>
- Copyright (C) 2004-2009, Ryan Djurovich
-
- Website Baker is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- Website Baker is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with Website Baker; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-
-*/
-
 // Must include code to stop this file being access directly
-if(defined('WB_PATH') == false) { die("Cannot access this file directly"); }
+/* -------------------------------------------------------- */
+if(defined('WB_PATH') == false)
+{
+	// Stop this file being access directly
+		die('<head><title>Access denied</title></head><body><h2 style="color:red;margin:3em auto;text-align:center;">Cannot access this file directly</h2></body></html>');
+}
+/* -------------------------------------------------------- */
 // Insert an extra row into the database
 $database->query("INSERT INTO ".TABLE_PREFIX."mod_code (page_id,section_id) VALUES ('$page_id','$section_id')");
-
-?>
\ No newline at end of file
