<?xml version="1.0" encoding="ISO-8859-1"?>
<modulepackage><package_guid/>
<package_data>a:5:{s:7:"jsfiles";a:0:{}s:8:"tplfiles";a:0:{}s:8:"cssfiles";a:0:{}s:7:"layouts";a:0:{}s:12:"translations";a:2:{i:0;s:1:"1";i:1;s:1:"2";}}</package_data>
<module><name>OpenEstate_PHP_Wrapper</name>
<description>This module integrates PHP-exported properties from OpenEstate-ImmoTool into Contenido.

Author  : Andreas Rudolph &amp; Walter Wagner
Version : 0.3
License : GPL3
Website : http://www.openestate.org/</description>
<type>Content</type>
<input>?&gt;&lt;?php
/**
 * PHP-Wrapper für Contenido.
 * Administration im Backend
 * $Id: input.php 899 2011-06-16 00:04:52Z andy $
 *
 * @author Andreas Rudolph &amp; Walter Wagner
 * @copyright 2009-2011, OpenEstate.org
 * @license http://www.gnu.org/licenses/gpl-3.0.txt
 */

if (!defined('IMMOTOOL_WRAPPER_VERSION'))
  define( 'IMMOTOOL_WRAPPER_VERSION', '0.3' );

$scriptPath = trim(&quot;CMS_VALUE[0]&quot;);
if (strlen($scriptPath)&gt;0 &amp;&amp; substr($scriptPath,-1)!='/') $scriptPath .= '/';

$scriptUrl = trim(&quot;CMS_VALUE[1]&quot;);
if (strlen($scriptUrl)&gt;0 &amp;&amp; substr($scriptUrl,-1)!='/') $scriptUrl .= '/';

$scriptType = trim(&quot;CMS_VALUE[2]&quot;);

// ImmoTool-Umgebung einbinden
$environmentErrors = array();
$environmentFiles = array( 'config.php', 'include/functions.php', 'data/language.php' );
if (!is_dir($scriptPath)) {
  $environmentErrors[] = mi18n(&quot;ERROR_NO_EXPORT_PATH&quot;);
}
else {
  define('IMMOTOOL_BASE_PATH', $scriptPath);
  foreach ($environmentFiles as $file) {
    if (!is_file(IMMOTOOL_BASE_PATH.$file))
      $environmentErrors[] = mi18n(&quot;ERROR_NO_EXPORT_FILE_FOUND&quot;) . ': ' . $file;
  }
  if (count($environmentErrors)==0) {
    define('IN_WEBSITE', 1);
    foreach ($environmentFiles as $file) {
      //echo IMMOTOOL_BASE_PATH . $file . '&lt;hr/&gt;';
      include(IMMOTOOL_BASE_PATH.$file);
    }
    if (!defined('IMMOTOOL_SCRIPT_VERSION'))
      $environmentErrors[] = mi18n(&quot;ERROR_NO_EXPORT_VERSION_FOUND&quot;);
  }
}
$environmentIsValid = count($environmentErrors)==0;

// Wenn eine gültige ImmoTool-Umgebung konfiguriert ist, können weitere Einstellungen vorgenommen werden
$setupIndex = null;
$setupExpose = null;
$setupTranslations = null;
$setupLang = null;
if ($environmentIsValid) {
  $setupIndex = new immotool_setup_index();
  $setupExpose = new immotool_setup_expose();
  $setupLang = immotool_functions::init_language( $setupIndex-&gt;DefaultLanguage, $setupIndex-&gt;DefaultLanguage, $setupTranslations );
  if (!is_array($setupTranslations)) {
    $environmentErrors[] = mi18n(&quot;ERROR_NO_TRANSLATION_FOUND&quot;);
    $environmentIsValid = false;
  }
}
?&gt;
&lt;script language=&quot;JavaScript&quot; type=&quot;text/javascript&quot;&gt;
&lt;!--
function show_wrapper_settings( value )
{
  document.getElementById( 'immotool_wrap_script_index_settings' ).style.visibility = (value=='index')? 'visible': 'collapse';
  document.getElementById( 'immotool_wrap_script_expose_settings' ).style.visibility = (value=='expose')? 'visible': 'collapse';
}
function write_filter( key, value )
{
  var area = document.getElementById('FILTERS');
  var lines = area.value.split('\n');
  var keyFound = false;
  area.value = ''
  for (var i=0; i&lt;lines.length; i++)
  {
    if (lines[i].length==0) continue;
    var line = lines[i].split('=');
    if (line[0]==key)
    {
      keyFound = true;
      if (value.length&gt;0)
      {
        if (area.value.length&gt;0) area.value += '\n';
        area.value += key + '=' + value;
      }
    }
    else 
    {
      if (area.value.length&gt;0) area.value += '\n';
      area.value += line[0] + '=' + line[1];
    }
  }
  if (!keyFound &amp;&amp; value.length&gt;0)
  {
    if (area.value.length&gt;0) area.value += '\n';
    area.value += key + '=' + value;
  }
}
//--&gt;
&lt;/script&gt;
&lt;div style=&quot;float:right; width:160px; background-color: #F0F0F0; padding-left:0.5em; padding-bottom:0.5em; margin-left:1em;&quot;&gt;
  &lt;h3 style=&quot;margin-top:0.5em;&quot;&gt;&lt;?php echo mi18n(&quot;INFO_MODULE&quot;); ?&gt;&lt;/h3&gt;
  &lt;div style=&quot;text-align:center;&quot;&gt;
    OpenEstate PHP-Wrapper&lt;br/&gt;&lt;?php echo mi18n(&quot;SETUP_VERSION&quot;) . ' ' . IMMOTOOL_WRAPPER_VERSION; ?&gt;
  &lt;/div&gt;
  &lt;h3 style=&quot;margin-top:0.5em;&quot;&gt;&lt;?php echo mi18n(&quot;INFO_LICENSE&quot;); ?&gt;&lt;/h3&gt;
  &lt;div style=&quot;text-align:center;&quot;&gt;
    &lt;a href=&quot;http://www.gnu.org/licenses/gpl-3.0-standalone.html&quot; target=&quot;_blank&quot;&gt;GNU General Public License version 3&lt;/a&gt;
  &lt;/div&gt;
  &lt;h3 style=&quot;margin-top:0.5em;&quot;&gt;&lt;?php echo mi18n(&quot;INFO_AUTHORS&quot;); ?&gt;&lt;/h3&gt;
  &lt;div style=&quot;text-align:center;&quot;&gt;
    &lt;a href=&quot;http://www.openestate.org/&quot; target=&quot;_blank&quot;&gt;Andreas Rudolph, Walter Wagner&lt;/a&gt;
  &lt;/div&gt;
  &lt;h3 style=&quot;margin-top:0.5em;&quot;&gt;&lt;?php echo mi18n(&quot;INFO_SUPPORT_US&quot;); ?&gt;&lt;/h3&gt;
  &lt;div style=&quot;text-align:center;&quot;&gt;
    &lt;a href=&quot;http://www.openestate.org/sponsoren/&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;https://www.paypal.com/de_DE/DE/i/btn/btn_donateCC_LG.gif&quot; alt=&quot;support us!&quot; title=&quot;support us!&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;
  &lt;/div&gt;
&lt;/div&gt;

&lt;h2 style=&quot;margin-top:1em;&quot;&gt;&lt;?php echo mi18n(&quot;SETUP&quot;); ?&gt;&lt;/h2&gt;
&lt;table border=&quot;0&quot; style=&quot;margin-top:1em;&quot;&gt;
  &lt;tr valign=&quot;top&quot;&gt;
    &lt;td style=&quot;text-align:right;&quot;&gt;&amp;nbsp;&lt;/td&gt;
    &lt;td&gt;
&lt;?php
if ($environmentIsValid) {
  echo '&lt;h3 style=&quot;color:green; margin:0;&quot;&gt;' .
          mi18n(&quot;SETUP_SUCCESS&quot;) .'&lt;br/&gt;'.
          '&lt;span style=&quot;font-size:0.7em;&quot;&gt;' . mi18n(&quot;SETUP_VERSION&quot;) . ' ' . IMMOTOOL_SCRIPT_VERSION . '&lt;/span&gt;'.
          '&lt;/h3&gt;';
}
else {
  echo '&lt;h3 style=&quot;color:red; margin-top:0;&quot;&gt;' . mi18n(&quot;SETUP_PROBLEM&quot;) . '&lt;/h3&gt;';
  echo '&lt;ul&gt;';
  echo '&lt;li style=&quot;color:red;&quot;&gt;' . mi18n(&quot;SETUP_STEP_EXPORT&quot;) . '&lt;/li&gt;';
  echo '&lt;li style=&quot;color:red;&quot;&gt;' . mi18n(&quot;SETUP_STEP_CONFIG&quot;) . '&lt;/li&gt;';
  echo '&lt;/ul&gt;';
  echo '&lt;h3 style=&quot;color:red;&quot;&gt;' . mi18n(&quot;SETUP_ERRORS&quot;) . '&lt;/h3&gt;';
  echo '&lt;ul&gt;';
  foreach ($environmentErrors as $error) echo '&lt;li style=&quot;color:red;&quot;&gt;&amp;raquo; ' . $error . '&lt;/li&gt;';
  echo '&lt;/ul&gt;';
}
?&gt;
    &lt;/td&gt;
  &lt;/tr&gt;
  &lt;tr valign=&quot;top&quot;&gt;
    &lt;td style=&quot;text-align:right;&quot;&gt;&lt;b&gt;&lt;?php echo mi18n(&quot;SCRIPT_PATH&quot;);?&gt;&lt;/b&gt;&lt;/td&gt;
    &lt;td&gt;&lt;input type=&quot;text&quot; name=&quot;&lt;?php echo &quot;CMS_VAR[0]&quot;;?&gt;&quot; value=&quot;&lt;?php echo $scriptPath; ?&gt;&quot; style=&quot;width:100%; border:1px solid #c0c0c0;&quot;&gt;&lt;br/&gt;&lt;i&gt;&lt;?php echo mi18n(&quot;SCRIPT_PATH_INFO&quot;);?&gt;&lt;/i&gt; &lt;b&gt;&lt;?php echo $cfg['path']['contenido']; ?&gt;&lt;/b&gt;&lt;/td&gt;
  &lt;/tr&gt;
  &lt;tr valign=&quot;top&quot;&gt;
    &lt;td style=&quot;text-align:right;&quot;&gt;&lt;b&gt;&lt;?php echo mi18n(&quot;SCRIPT_URL&quot;);?&gt;&lt;/b&gt;&lt;/td&gt;
    &lt;td&gt;&lt;input type=&quot;text&quot; name=&quot;&lt;?php echo &quot;CMS_VAR[1]&quot;;?&gt;&quot; value=&quot;&lt;?php echo $scriptUrl; ?&gt;&quot; style=&quot;width:100%; border:1px solid #c0c0c0;&quot;&gt;&lt;br/&gt;&lt;i&gt;&lt;?php echo mi18n(&quot;SCRIPT_URL_INFO&quot;);?&gt;&lt;/i&gt; &lt;b&gt;&lt;?php echo $cfg['path']['contenido_fullhtml']; ?&gt;&lt;/b&gt;&lt;/td&gt;
  &lt;/tr&gt;
&lt;/table&gt;

&lt;?php
if ($environmentIsValid) {
?&gt;

&lt;h2 style=&quot;margin-top:1em; clear:both;&quot;&gt;&lt;?php echo mi18n(&quot;VIEW&quot;); ?&gt;&lt;/h2&gt;
&lt;h3 style=&quot;margin-top:1em;&quot;&gt;
  &lt;input type=&quot;radio&quot; id=&quot;immotool_wrap_script_index&quot; name=&quot;CMS_VAR[2]&quot; value=&quot;index&quot; onchange=&quot;show_wrapper_settings('index');&quot; &lt;?php echo ($scriptType=='index')? 'checked=&quot;checked&quot;': '' ?&gt;/&gt;
  &lt;label for=&quot;immotool_wrap_script_index&quot;&gt;&lt;?php echo mi18n(&quot;VIEW_INDEX&quot;); ?&gt;&lt;/label&gt;
&lt;/h3&gt;
&lt;table border=&quot;0&quot; id=&quot;immotool_wrap_script_index_settings&quot; style=&quot;width:100%; margin-top:1em; visibility:&lt;?php echo ($scriptType=='index')? 'visible': 'collapse' ?&gt;;&quot;&gt;

  &lt;tr valign=&quot;top&quot;&gt;
    &lt;td style=&quot;text-align:right; font-weight:bold; white-space:nowrap; padding-right:1em;&quot;&gt;&lt;?php echo mi18n(&quot;VIEW_INDEX_VIEW&quot;); ?&gt;&lt;/td&gt;
    &lt;td style=&quot;padding-bottom:0.8em;&quot;&gt;
      &lt;?php $value = trim(&quot;CMS_VALUE[100]&quot;); ?&gt;
      &lt;select name=&quot;CMS_VAR[100]&quot; style=&quot;border:1px solid #c0c0c0;&quot;&gt;
        &lt;option value=&quot;index&quot; &lt;?php echo ($value=='index')? 'selected=&quot;selected&quot;': ''; ?&gt;&gt;&lt;?php echo mi18n(&quot;VIEW_INDEX_VIEW_SUMMARY&quot;); ?&gt;&lt;/option&gt;
        &lt;option value=&quot;fav&quot; &lt;?php echo ($value=='fav')? 'selected=&quot;selected&quot;': ''; ?&gt;&gt;&lt;?php echo mi18n(&quot;VIEW_INDEX_VIEW_FAV&quot;); ?&gt;&lt;/option&gt;
      &lt;/select&gt;
    &lt;/td&gt;
  &lt;/tr&gt;

  &lt;tr valign=&quot;top&quot;&gt;
    &lt;td style=&quot;text-align:right; font-weight:bold; white-space:nowrap; padding-right:1em;&quot;&gt;&lt;?php echo mi18n(&quot;VIEW_INDEX_MODE&quot;); ?&gt;&lt;/td&gt;
    &lt;td style=&quot;padding-bottom:0.8em;&quot;&gt;
      &lt;?php $value = trim(&quot;CMS_VALUE[101]&quot;); ?&gt;
      &lt;select name=&quot;CMS_VAR[101]&quot; style=&quot;border:1px solid #c0c0c0;&quot;&gt;
        &lt;option value=&quot;entry&quot; &lt;?php echo ($value=='entry')? 'selected=&quot;selected&quot;': ''; ?&gt;&gt;&lt;?php echo mi18n(&quot;VIEW_INDEX_MODE_ENTRY&quot;); ?&gt;&lt;/option&gt;
        &lt;option value=&quot;gallery&quot; &lt;?php echo ($value=='gallery')? 'selected=&quot;selected&quot;': ''; ?&gt;&gt;&lt;?php echo mi18n(&quot;VIEW_INDEX_MODE_GALLERY&quot;); ?&gt;&lt;/option&gt;
      &lt;/select&gt;
    &lt;/td&gt;
  &lt;/tr&gt;

  &lt;tr valign=&quot;top&quot;&gt;
    &lt;td style=&quot;text-align:right; font-weight:bold; white-space:nowrap; padding-right:1em;&quot;&gt;&lt;?php echo mi18n(&quot;VIEW_INDEX_LANGUAGE&quot;); ?&gt;&lt;/td&gt;
    &lt;td style=&quot;padding-bottom:0.8em;&quot;&gt;
      &lt;?php $value = trim(&quot;CMS_VALUE[102]&quot;); ?&gt;
      &lt;select name=&quot;CMS_VAR[102]&quot; style=&quot;border:1px solid #c0c0c0;&quot;&gt;
          &lt;?php
          foreach (immotool_functions::get_language_codes() as $code) {
            $selected = ($value==$code)? 'selected=&quot;selected&quot;': '';
            echo '&lt;option value=&quot;' . $code . '&quot; ' . $selected . '&gt;' . $code . '&lt;/option&gt;';
            //echo '&lt;option value=&quot;' . $code . '&quot; ' . $selected . '&gt;' . immotool_functions::get_language_name( $code ) . '&lt;/option&gt;';
          }
          ?&gt;
      &lt;/select&gt;
    &lt;/td&gt;
  &lt;/tr&gt;

  &lt;tr valign=&quot;top&quot;&gt;
    &lt;td style=&quot;text-align:right; font-weight:bold; white-space:nowrap; padding-right:1em;&quot;&gt;&lt;?php echo mi18n(&quot;VIEW_INDEX_ORDER&quot;); ?&gt;&lt;/td&gt;
    &lt;td style=&quot;padding-bottom:0.8em;&quot;&gt;
      &lt;?php $value = trim(&quot;CMS_VALUE[103]&quot;); ?&gt;
      &lt;select name=&quot;CMS_VAR[103]&quot; style=&quot;border:1px solid #c0c0c0;&quot;&gt;
          &lt;?php
          $sortedOrders = array();
          $availableOrders = array();
          foreach ($setupIndex-&gt;OrderOptions as $key) {
            $orderObj = immotool_functions::get_order($key);
            //$by = $orderObj-&gt;getName();
            $by = $orderObj-&gt;getTitle( $setupTranslations, $setupLang );
            $sortedOrders[$key] = $by;
            $availableOrders[$key] = $orderObj;
          }
          asort($sortedOrders);

          echo '&lt;optgroup label=&quot;' . mi18n(&quot;VIEW_INDEX_ORDER_ASC&quot;) . '&quot;&gt;';
          foreach ($sortedOrders as $key=&gt;$by) {
            $orderObj = $availableOrders[$key];
            $o = $key . '-asc';
            $selected = ($value==$o)? 'selected=&quot;selected&quot;': '';
            echo '&lt;option value=&quot;' . $o . '&quot; ' . $selected . '&gt;&amp;uarr; ' . $by . ' &amp;uarr;&lt;/option&gt;';
          }
          echo '&lt;/optgroup&gt;';
          echo '&lt;optgroup label=&quot;' . mi18n(&quot;VIEW_INDEX_ORDER_DESC&quot;) . '&quot;&gt;';
          foreach ($sortedOrders as $key=&gt;$by) {
            $orderObj = $availableOrders[$key];
            $o = $key . '-desc';
            $selected = ($value==$o)? 'selected=&quot;selected&quot;': '';
            echo '&lt;option value=&quot;' . $o . '&quot; ' . $selected . '&gt;&amp;darr; ' . $by . ' &amp;darr;&lt;/option&gt;';
          }
          echo '&lt;/optgroup&gt;';
          ?&gt;
      &lt;/select&gt;
    &lt;/td&gt;
  &lt;/tr&gt;

  &lt;?php
    $filtersText = trim(&quot;CMS_VALUE[104]&quot;);
    $filters = array();
    foreach (explode(&quot;\n&quot;, $filtersText) as $line)
    {
      if (strlen(trim($line))==0) continue;
      $filter = explode( '=', trim($line) );
      $filters[$filter[0]] = $filter[1];
    }
    
    //foreach ($setupIndex-&gt;FilterOptions as $key)
    foreach (immotool_functions::list_available_filters() as $key) {
      $filterObj = immotool_functions::get_filter( $key );
      if (!is_object($filterObj)) {
        //echo &quot;Filter-Objekt $key nicht gefunden&lt;hr/&gt;&quot;;
        continue;
      }
      $filterValue = (isset($filters[$key]))? $filters[$key]: '';
      $filterWidget = $filterObj-&gt;getWidget( $filterValue, $setupLang, $setupTranslations, $setupIndex );
      if (!is_string($filterWidget) || strlen($filterWidget)==0) {
        //echo &quot;Filter-Widget $key nicht erzeugt&lt;hr/&gt;&quot;;
        continue;
      }
      $filterWidget = str_replace( '&lt;select ', '&lt;select style=&quot;border:1px solid #c0c0c0;&quot; ', $filterWidget );
      $filterWidget = str_replace( '&lt;select ', '&lt;select onchange=&quot;write_filter(\''.$key.'\',this.value);&quot; ', $filterWidget );
      $filterWidget = str_replace( 'type=&quot;checkbox&quot; ', 'type=&quot;checkbox&quot; onclick=&quot;write_filter(\''.$key.'\', (this.checked)? this.value: \'\' );&quot; ', $filterWidget );
      ?&gt;
  &lt;tr valign=&quot;top&quot;&gt;
    &lt;td style=&quot;text-align:right; font-weight:bold; white-space:nowrap; padding-right:1em;&quot;&gt;&lt;?php echo mi18n(&quot;VIEW_INDEX_FILTER&quot;); ?&gt;&lt;br/&gt;&lt;span style=&quot;font-weight:normal;font-size:0.9em;&quot;&gt;&lt;?php echo $filterObj-&gt;getTitle( $setupTranslations, $setupLang ); ?&gt;&lt;/span&gt;&lt;/td&gt;
    &lt;td style=&quot;padding-bottom:0.8em;&quot;&gt;&lt;?php echo $filterWidget; ?&gt;
&lt;script language=&quot;JavaScript&quot; type=&quot;text/javascript&quot;&gt;
&lt;!--
write_filter( '&lt;?php echo $key; ?&gt;', '&lt;?php echo $filterValue; ?&gt;' );
--&gt;
&lt;/script&gt;
    &lt;/td&gt;
  &lt;/tr&gt;
      &lt;?php
    }
    ?&gt;
    &lt;tr style=&quot;visibility:collapse;&quot;&gt;
      &lt;td colspan=&quot;2&quot;&gt;&lt;textarea id=&quot;FILTERS&quot; type=&quot;hidden&quot; name=&quot;CMS_VAR[104]&quot; cols=&quot;50&quot; rows=&quot;5&quot; readonly=&quot;readonly&quot;&gt;&lt;?php echo $filtersText; ?&gt;&lt;/textarea&gt;&lt;/td&gt;
    &lt;/tr&gt;
&lt;/table&gt;

&lt;h3 style=&quot;margin-top:1em;&quot;&gt;
  &lt;input type=&quot;radio&quot; id=&quot;immotool_wrap_script_expose&quot; name=&quot;CMS_VAR[2]&quot; value=&quot;expose&quot; onchange=&quot;show_wrapper_settings('expose');&quot; &lt;?php echo ($scriptType=='expose')? 'checked=&quot;checked&quot;': '' ?&gt;/&gt;
  &lt;label for=&quot;immotool_wrap_script_expose&quot;&gt;&lt;?php echo mi18n(&quot;VIEW_EXPOSE&quot;); ?&gt;&lt;/label&gt;
&lt;/h3&gt;
&lt;table border=&quot;0&quot; id=&quot;immotool_wrap_script_expose_settings&quot; style=&quot;width:100%; margin-top:1em; visibility:&lt;?php echo ($scriptType=='expose')? 'visible': 'collapse' ?&gt;;&quot;&gt;
  &lt;tr valign=&quot;top&quot;&gt;
    &lt;td style=&quot;text-align:right; font-weight:bold; white-space:nowrap; padding-right:1em;&quot;&gt;&lt;?php echo mi18n(&quot;VIEW_EXPOSE_ID&quot;); ?&gt;&lt;/td&gt;
    &lt;td style=&quot;padding-bottom:0.8em;&quot;&gt;
      &lt;?php $value = trim(&quot;CMS_VALUE[200]&quot;); ?&gt;
      &lt;input name=&quot;CMS_VAR[200]&quot; type=&quot;text&quot; style=&quot;border:1px solid #c0c0c0;&quot; maxlength=&quot;15&quot; value=&quot;&lt;?php echo (is_numeric($value))? $value: '' ?&gt;&quot;/&gt;
    &lt;/td&gt;
  &lt;/tr&gt;
  &lt;tr valign=&quot;top&quot;&gt;
    &lt;td style=&quot;text-align:right; font-weight:bold; white-space:nowrap; padding-right:1em;&quot;&gt;&lt;?php echo mi18n(&quot;VIEW_EXPOSE_VIEW&quot;); ?&gt;&lt;/td&gt;
    &lt;td style=&quot;padding-bottom:0.8em;&quot;&gt;
      &lt;?php $value = trim(&quot;CMS_VALUE[201]&quot;); ?&gt;
      &lt;select name=&quot;CMS_VAR[201]&quot; style=&quot;border:1px solid #c0c0c0;&quot;&gt;
        &lt;option value=&quot;details&quot; &lt;?php echo ($value=='details')? 'selected=&quot;selected&quot;': ''; ?&gt;&gt;&lt;?php echo mi18n(&quot;VIEW_EXPOSE_VIEW_DETAILS&quot;); ?&gt;&lt;/option&gt;
        &lt;option value=&quot;texts&quot; &lt;?php echo ($value=='texts')? 'selected=&quot;selected&quot;': ''; ?&gt;&gt;&lt;?php echo mi18n(&quot;VIEW_EXPOSE_VIEW_TEXTS&quot;); ?&gt;&lt;/option&gt;
        &lt;option value=&quot;gallery&quot; &lt;?php echo ($value=='gallery')? 'selected=&quot;selected&quot;': ''; ?&gt;&gt;&lt;?php echo mi18n(&quot;VIEW_EXPOSE_VIEW_GALLERY&quot;); ?&gt;&lt;/option&gt;
        &lt;option value=&quot;contact&quot; &lt;?php echo ($value=='contact')? 'selected=&quot;selected&quot;': ''; ?&gt;&gt;&lt;?php echo mi18n(&quot;VIEW_EXPOSE_VIEW_CONTACT&quot;); ?&gt;&lt;/option&gt;
        &lt;option value=&quot;terms&quot; &lt;?php echo ($value=='terms')? 'selected=&quot;selected&quot;': ''; ?&gt;&gt;&lt;?php echo mi18n(&quot;VIEW_EXPOSE_VIEW_TERMS&quot;); ?&gt;&lt;/option&gt;
      &lt;/select&gt;
    &lt;/td&gt;
  &lt;/tr&gt;
  &lt;tr valign=&quot;top&quot;&gt;
    &lt;td style=&quot;text-align:right; font-weight:bold; white-space:nowrap; padding-right:1em;&quot;&gt;&lt;?php echo mi18n(&quot;VIEW_EXPOSE_LANGUAGE&quot;); ?&gt;&lt;/td&gt;
    &lt;td style=&quot;padding-bottom:0.8em;&quot;&gt;
      &lt;?php $value = trim(&quot;CMS_VALUE[202]&quot;); ?&gt;
      &lt;select name=&quot;CMS_VAR[202]&quot; style=&quot;border:1px solid #c0c0c0;&quot;&gt;
          &lt;?php
          foreach (immotool_functions::get_language_codes() as $code) {
            $selected = ($value==$code)? 'selected=&quot;selected&quot;': '';
            echo '&lt;option value=&quot;' . $code . '&quot; ' . $selected . '&gt;' . $code . '&lt;/option&gt;';
            //echo '&lt;option value=&quot;' . $code . '&quot; ' . $selected . '&gt;' . immotool_functions::get_language_name( $code ) . '&lt;/option&gt;';
          }
          ?&gt;
      &lt;/select&gt;
    &lt;/td&gt;
  &lt;/tr&gt;
&lt;/table&gt;
&lt;?php
}</input>
<output>&lt;?php
/**
 * PHP-Wrapper für Contenido.
 * Ausgabe im Frontend
 * $Id: output.php 900 2011-06-16 00:06:46Z andy $
 *
 * @author Andreas Rudolph &amp; Walter Wagner
 * @copyright 2009-2011, OpenEstate.org
 * @license http://www.gnu.org/licenses/gpl-3.0.txt
 */

// Definition der zu verwendenden Parameter.
if (!defined('IMMOTOOL_PARAM_LANG'))
  define('IMMOTOOL_PARAM_LANG', 'wrapped_lang');
if (!defined('IMMOTOOL_PARAM_FAV'))
  define('IMMOTOOL_PARAM_FAV', 'wrapped_fav');
if (!defined('IMMOTOOL_PARAM_INDEX_PAGE'))
  define('IMMOTOOL_PARAM_INDEX_PAGE', 'wrapped_page');
if (!defined('IMMOTOOL_PARAM_INDEX_RESET'))
  define('IMMOTOOL_PARAM_INDEX_RESET', 'wrapped_reset');
if (!defined('IMMOTOOL_PARAM_INDEX_ORDER'))
  define('IMMOTOOL_PARAM_INDEX_ORDER', 'wrapped_order');
if (!defined('IMMOTOOL_PARAM_INDEX_FILTER'))
  define('IMMOTOOL_PARAM_INDEX_FILTER', 'wrapped_filter');
if (!defined('IMMOTOOL_PARAM_INDEX_FILTER_CLEAR'))
  define('IMMOTOOL_PARAM_INDEX_FILTER_CLEAR', 'wrapped_clearFilters');
if (!defined('IMMOTOOL_PARAM_INDEX_VIEW'))
  define('IMMOTOOL_PARAM_INDEX_VIEW', 'wrapped_view');
if (!defined('IMMOTOOL_PARAM_INDEX_MODE'))
  define('IMMOTOOL_PARAM_INDEX_MODE', 'wrapped_mode');
if (!defined('IMMOTOOL_PARAM_EXPOSE_ID'))
  define('IMMOTOOL_PARAM_EXPOSE_ID', 'wrapped_id');
if (!defined('IMMOTOOL_PARAM_EXPOSE_VIEW'))
  define('IMMOTOOL_PARAM_EXPOSE_VIEW', 'wrapped_view');
if (!defined('IMMOTOOL_PARAM_EXPOSE_IMG'))
  define('IMMOTOOL_PARAM_EXPOSE_IMG', 'wrapped_img');
if (!defined('IMMOTOOL_PARAM_EXPOSE_CONTACT'))
  define('IMMOTOOL_PARAM_EXPOSE_CONTACT', 'wrapped_contact');
if (!defined('IMMOTOOL_PARAM_EXPOSE_CAPTCHA'))
  define('IMMOTOOL_PARAM_EXPOSE_CAPTCHA', 'wrapped_captchacode');

// Server-Pfad zu den ImmoTool-Skripten
$scriptPath = trim('CMS_VALUE[0]');
if (strlen($scriptPath)&gt;0 &amp;&amp; substr($scriptPath,-1)!='/') $scriptPath .= '/';
if (!defined('IMMOTOOL_BASE_PATH')) define( 'IMMOTOOL_BASE_PATH', $scriptPath );  

// URL zu den ImmoTool-Skripten
$scriptUrl = trim('CMS_VALUE[1]');
if (strlen($scriptUrl)&gt;0 &amp;&amp; substr($scriptUrl,-1)!='/') $scriptUrl .= '/';
if (!defined('IMMOTOOL_BASE_URL')) define( 'IMMOTOOL_BASE_URL', $scriptUrl );

if (is_file($scriptPath . 'immotool.php.lock')) {
  echo mi18n(&quot;ERROR_UPDATE_IS_RUNNING&quot;);
}
else {
  // Script ermitteln
  $wrap = (isset($_REQUEST['wrap']) &amp;&amp; is_string($_REQUEST['wrap']))? $_REQUEST['wrap']: trim(&quot;CMS_VALUE[2]&quot;);
  if ($wrap=='expose') {
    $wrap = 'expose';
    $script = 'expose.php';

    // Standard-Parameter ggf. setzen
    //echo '&lt;pre&gt;';
    //print_r($_REQUEST);
    //echo '&lt;/pre&gt;';
    $params = array( 'wrap', IMMOTOOL_PARAM_LANG, IMMOTOOL_PARAM_EXPOSE_ID, IMMOTOOL_PARAM_EXPOSE_VIEW );
    $useDefaultParams = true;
    foreach ($params as $param) {
      if (isset($_REQUEST[ $param ])) {
        $useDefaultParams = false;
        break;
      }
    }
    if ($useDefaultParams) {
      $exposeLang = trim(&quot;CMS_VALUE[202]&quot;);
      if (strlen($exposeLang)&gt;0)
        $_REQUEST[ IMMOTOOL_PARAM_LANG ] = $exposeLang;
      $exposeId = trim(&quot;CMS_VALUE[200]&quot;);
      if (strlen($exposeId)&gt;0)
        $_REQUEST[ IMMOTOOL_PARAM_EXPOSE_ID ] = $exposeId;
      $exposeView = trim(&quot;CMS_VALUE[201]&quot;);
      if (strlen($exposeView)&gt;0)
        $_REQUEST[ IMMOTOOL_PARAM_EXPOSE_VIEW ] = $exposeView;
    }
  }
  else {
    $wrap = 'index';
    $script = 'index.php';

    // Standard-Parameter ggf. setzen
    //echo '&lt;pre&gt;';
    //print_r($_REQUEST);
    //echo '&lt;/pre&gt;';
    $params = array( 'wrap', IMMOTOOL_PARAM_LANG, IMMOTOOL_PARAM_INDEX_VIEW, IMMOTOOL_PARAM_INDEX_MODE, IMMOTOOL_PARAM_INDEX_ORDER, IMMOTOOL_PARAM_INDEX_FILTER );
    $useDefaultParams = true;
    foreach ($params as $param) {
      if (isset($_REQUEST[ $param ])) {
        $useDefaultParams = false;
        break;
      }
    }
    if ($useDefaultParams) {
      $indexLang = trim(&quot;CMS_VALUE[102]&quot;);
      if (strlen($indexLang)&gt;0)
        $_REQUEST[ IMMOTOOL_PARAM_LANG ] = $indexLang;
      $indexView = trim(&quot;CMS_VALUE[100]&quot;);
      if (strlen($indexView)&gt;0)
        $_REQUEST[ IMMOTOOL_PARAM_INDEX_VIEW ] = $indexView;
      $indexMode = trim(&quot;CMS_VALUE[101]&quot;);
      if (strlen($indexMode)&gt;0)
        $_REQUEST[ IMMOTOOL_PARAM_INDEX_MODE ] = $indexMode;
      $indexOrder = trim(&quot;CMS_VALUE[103]&quot;);
      if (strlen($indexOrder)&gt;0)
        $_REQUEST[ IMMOTOOL_PARAM_INDEX_ORDER ] = $indexOrder;
      $indexFilters = trim(&quot;CMS_VALUE[104]&quot;);
      if (strlen($indexFilters)&gt;0) {
        $_REQUEST[ IMMOTOOL_PARAM_INDEX_FILTER ] = array();
        foreach (explode(&quot;\n&quot;, $indexFilters) as $line) {
          if (strlen(trim($line))==0) continue;
          $filter = explode( '=', trim($line) );
          $_REQUEST[ IMMOTOOL_PARAM_INDEX_FILTER ][$filter[0]] = $filter[1];
        }
      }
    }
  }

  // Script ausführen
  ob_start();
  include( IMMOTOOL_BASE_PATH . $script );
  $content = ob_get_contents(); 
  ob_clean();

  //echo '&lt;pre&gt;'; print_r( $GLOBALS ); echo '&lt;/pre&gt;';

  // Stylesheets
  $stylesheets = array();
  $stylesheets[] = IMMOTOOL_BASE_URL . 'style.php';
  if (class_exists('immotool_setup')) {
    $setup = new immotool_setup();
    if (is_callable(array('immotool_myconfig', 'load_config_default'))) immotool_myconfig::load_config_default( $setup );
    if (is_string($setup-&gt;AdditionalStylesheet) &amp;&amp; strlen($setup-&gt;AdditionalStylesheet)&gt;0) $stylesheets[] = $setup-&gt;AdditionalStylesheet;
  }

  // Ausgabe erzeugen
  $baseUrl = $_SERVER['SCRIPT_NAME'].'?idcat='.$idcat.'&amp;amp;idart='.$idart.'&amp;amp;lang='.$lang;
  $hiddenParams = array(
          'idcat' =&gt; $idcat,
          'idart' =&gt; $idart,
          'lang' =&gt; $lang, );
  echo immotool_functions::wrap_page( $content, $wrap, $baseUrl, IMMOTOOL_BASE_URL, $stylesheets, $hiddenParams );
}
?&gt;</output>
</module>
<jsfiles/>
<tplfiles/>
<cssfiles/>
<layouts/>
<translations origin-language-id="1" origin-language-name="deutsch"><language>deutsch</language>
<string><original>SCRIPT_PATH</original>
<translation>Skript-Pfad</translation>
</string>
<string><original>SCRIPT_URL</original>
<translation>Skript-URL</translation>
</string>
<string><original>SCRIPT_PATH_INFO</original>
<translation>Tragen Sie den Pfad ein, unter welchem der PHP-Export des ImmoTools abgelegt wurde. Der Pfad dieser Contenido-Installation lautet: </translation>
</string>
<string><original>SCRIPT_URL_INFO</original>
<translation>Tragen Sie die Webadresse ein, unter welcher der PHP-Export des ImmoTools aufgerufen werden kann. Die URL dieser Contenido-Installation lautet: </translation>
</string>
<string><original>ERROR_NO_EXPORT_PATH</original>
<translation>Bitte tragen Sie einen gültigen Export-Pfad ein!</translation>
</string>
<string><original>ERROR_NO_EXPORT_FILE_FOUND</original>
<translation>Datei nicht im Export-Pfad gefunden</translation>
</string>
<string><original>ERROR_NO_EXPORT_VERSION_FOUND</original>
<translation>Die Skript-Version konnte nicht ermittelt werden!</translation>
</string>
<string><original>SETUP_PROBLEM</original>
<translation>Die ImmoTool-Skripte sind NICHT korrekt eingebunden!</translation>
</string>
<string><original>SETUP_STEP_EXPORT</original>
<translation>Führen Sie einen PHP-Export via ImmoTool auf diesen Webspace durch.</translation>
</string>
<string><original>SETUP_STEP_CONFIG</original>
<translation>Tragen Sie den Pfad und URL des Exportes ein und klicken Sie zur erneuten Prüfung auf 'Speichern'.</translation>
</string>
<string><original>SETUP_ERRORS</original>
<translation>Fehlermeldungen</translation>
</string>
<string><original>SETUP_SUCCESS</original>
<translation>Die ImmoTool-Skripte sind korrekt eingebunden!</translation>
</string>
<string><original>SETUP_VERSION</original>
<translation>version</translation>
</string>
<string><original>ERROR_NO_TRANSLATION_FOUND</original>
<translation>Übersetzung kann nicht ermittelt werden!</translation>
</string>
<string><original>VIEW</original>
<translation>Darstellung auf der Webseite</translation>
</string>
<string><original>VIEW_INDEX</original>
<translation>Immobilienübersicht / index.php</translation>
</string>
<string><original>VIEW_EXPOSE</original>
<translation>Exposéansicht / expose.php</translation>
</string>
<string><original>SETUP</original>
<translation>Einbindung des PHP-Exports</translation>
</string>
<string><original>VIEW_INDEX_VIEW_SUMMARY</original>
<translation>Immobilienübersicht</translation>
</string>
<string><original>VIEW_INDEX_VIEW_FAV</original>
<translation>Vormerkliste</translation>
</string>
<string><original>VIEW_INDEX_MODE_ENTRY</original>
<translation>als Liste</translation>
</string>
<string><original>VIEW_INDEX_MODE_GALLERY</original>
<translation>als Galerie</translation>
</string>
<string><original>VIEW_INDEX_ORDER_ASC</original>
<translation>aufsteigend</translation>
</string>
<string><original>VIEW_INDEX_FILTER</original>
<translation>Filterkriterium</translation>
</string>
<string><original>VIEW_INDEX_ORDER_DESC</original>
<translation>absteigend</translation>
</string>
<string><original>VIEW_INDEX_ORDER</original>
<translation>Sortierung</translation>
</string>
<string><original>VIEW_INDEX_LANGUAGE</original>
<translation>Sprache</translation>
</string>
<string><original>VIEW_INDEX_MODE</original>
<translation>Darstellung</translation>
</string>
<string><original>VIEW_INDEX_VIEW</original>
<translation>Ansicht</translation>
</string>
<string><original>INFO_SUPPORT_US</original>
<translation>Unterstützung</translation>
</string>
<string><original>VIEW_EXPOSE_VIEW_DETAILS</original>
<translation>Details</translation>
</string>
<string><original>VIEW_EXPOSE_VIEW_TEXTS</original>
<translation>Beschreibung</translation>
</string>
<string><original>VIEW_EXPOSE_VIEW_GALLERY</original>
<translation>Galerie</translation>
</string>
<string><original>VIEW_EXPOSE_VIEW_CONTACT</original>
<translation>Kontakt</translation>
</string>
<string><original>VIEW_EXPOSE_VIEW_TERMS</original>
<translation>AGB</translation>
</string>
<string><original>INFO_AUTHORS</original>
<translation>Autoren</translation>
</string>
<string><original>INFO_LICENSE</original>
<translation>Lizenz</translation>
</string>
<string><original>INFO_MODULE</original>
<translation>Modul</translation>
</string>
<string><original>VIEW_EXPOSE_ID</original>
<translation>ID der Immobilie</translation>
</string>
<string><original>VIEW_EXPOSE_VIEW</original>
<translation>Ansicht</translation>
</string>
<string><original>VIEW_EXPOSE_LANGUAGE</original>
<translation>Sprache</translation>
</string>
<string><original>ERROR_UPDATE_IS_RUNNING</original>
<translation>&lt;h3&gt;Der Immobilienbestand wird momentan aktualisiert!&lt;/h3&gt;&lt;p&gt;Bitte besuchen Sie diese Seite in wenigen Minuten erneut.&lt;/p&gt;</translation>
</string>
</translations>
<translations origin-language-id="2" origin-language-name="english"><language>english</language>
<string><original>SCRIPT_PATH</original>
<translation>Script Path</translation>
</string>
<string><original>SCRIPT_PATH_INFO</original>
<translation>Enter the path on your server, that points to the exported scripts. The path of this Contenido installation is:</translation>
</string>
<string><original>SCRIPT_URL</original>
<translation>Script URL</translation>
</string>
<string><original>SCRIPT_URL_INFO</original>
<translation>Enter the URL to your website, that points to the exported scripts.  The URL of this Contenido installation is:</translation>
</string>
<string><original>ERROR_NO_EXPORT_PATH</original>
<translation>Please enter a valid script path!</translation>
</string>
<string><original>ERROR_NO_EXPORT_FILE_FOUND</original>
<translation>This file was not found in the script path:</translation>
</string>
<string><original>ERROR_NO_EXPORT_VERSION_FOUND</original>
<translation>Can't load the script version!</translation>
</string>
<string><original>ERROR_NO_TRANSLATION_FOUND</original>
<translation>Can't find translation!</translation>
</string>
<string><original>INFO_MODULE</original>
<translation>Module</translation>
</string>
<string><original>SETUP_VERSION</original>
<translation>version</translation>
</string>
<string><original>INFO_LICENSE</original>
<translation>License</translation>
</string>
<string><original>INFO_AUTHORS</original>
<translation>Authors</translation>
</string>
<string><original>INFO_SUPPORT_US</original>
<translation>Support us!</translation>
</string>
<string><original>SETUP</original>
<translation>Configure exported scripts</translation>
</string>
<string><original>SETUP_SUCCESS</original>
<translation>The exported scripts are correctly configured!</translation>
</string>
<string><original>SETUP_PROBLEM</original>
<translation>The exported scripts are NOT correctly configured!</translation>
</string>
<string><original>SETUP_STEP_EXPORT</original>
<translation>Export your properties from ImmoTool to your website via PHP.</translation>
</string>
<string><original>SETUP_STEP_CONFIG</original>
<translation>Configure path and URL, that points to the exported scripts, and click 'Save' to perform a new validation.</translation>
</string>
<string><original>SETUP_ERRORS</original>
<translation>Error messages</translation>
</string>
<string><original>VIEW</original>
<translation>Configure generated view</translation>
</string>
<string><original>VIEW_INDEX</original>
<translation>Property listing / index.php</translation>
</string>
<string><original>VIEW_INDEX_VIEW</original>
<translation>View</translation>
</string>
<string><original>VIEW_INDEX_VIEW_SUMMARY</original>
<translation>Summary</translation>
</string>
<string><original>VIEW_INDEX_VIEW_FAV</original>
<translation>Favourites</translation>
</string>
<string><original>VIEW_INDEX_MODE</original>
<translation>Mode</translation>
</string>
<string><original>VIEW_INDEX_MODE_ENTRY</original>
<translation>Tabular mode</translation>
</string>
<string><original>VIEW_INDEX_MODE_GALLERY</original>
<translation>Gallery mode</translation>
</string>
<string><original>VIEW_INDEX_LANGUAGE</original>
<translation>Language</translation>
</string>
<string><original>VIEW_INDEX_ORDER</original>
<translation>Order</translation>
</string>
<string><original>VIEW_INDEX_ORDER_ASC</original>
<translation>ascending</translation>
</string>
<string><original>VIEW_INDEX_ORDER_DESC</original>
<translation>descending</translation>
</string>
<string><original>VIEW_INDEX_FILTER</original>
<translation>Filter</translation>
</string>
<string><original>VIEW_EXPOSE</original>
<translation>Property details / expose.php</translation>
</string>
<string><original>VIEW_EXPOSE_ID</original>
<translation>Property ID</translation>
</string>
<string><original>VIEW_EXPOSE_VIEW</original>
<translation>View</translation>
</string>
<string><original>VIEW_EXPOSE_VIEW_DETAILS</original>
<translation>Details</translation>
</string>
<string><original>VIEW_EXPOSE_VIEW_TEXTS</original>
<translation>Description</translation>
</string>
<string><original>VIEW_EXPOSE_VIEW_GALLERY</original>
<translation>Gallery</translation>
</string>
<string><original>VIEW_EXPOSE_VIEW_CONTACT</original>
<translation>Contact</translation>
</string>
<string><original>VIEW_EXPOSE_VIEW_TERMS</original>
<translation>Terms</translation>
</string>
<string><original>VIEW_EXPOSE_LANGUAGE</original>
<translation>Language</translation>
</string>
<string><original>ERROR_UPDATE_IS_RUNNING</original>
<translation>&lt;h3&gt;The properties are currently updated!&lt;/h3&gt;&lt;p&gt;Please revisit this page after some minutes.&lt;/p&gt;</translation>
</string>
</translations>
</modulepackage>

