function getItems()
 {
     $items = rex_session($this->sessKey, 'string');
     if (is_string($items) && $items != '') {
         $items = unserialize($items);
     } else {
         $items = array();
     }
     return $items;
 }
    $arg_fields .= '<input type="hidden" name="opener_input_field" value="' . htmlspecialchars($opener_input_field) . '" />' . "\n";
}
// -------------- CatId in Session speichern
$file_id = rex_request('file_id', 'int');
$file_name = rex_request('file_name', 'string');
$rex_file_category = rex_request('rex_file_category', 'rex-mediacategory-id', -1);
if ($file_name != "") {
    $sql = rex_sql::factory();
    $sql->setQuery("select * from " . $REX['TABLE_PREFIX'] . "file where filename='{$file_name}'");
    if ($sql->getRows() == 1) {
        $file_id = $sql->getValue("file_id");
        $rex_file_category = $sql->getValue("category_id");
    }
}
if ($rex_file_category == -1) {
    $rex_file_category = rex_session('media[rex_file_category]', 'int');
}
$gc = rex_sql::factory();
$gc->setQuery('SELECT * FROM ' . $REX['TABLE_PREFIX'] . 'file_category WHERE id=' . $rex_file_category);
if ($gc->getRows() != 1) {
    $rex_file_category = 0;
    $rex_file_category_name = $I18N->msg('pool_kats_no');
} else {
    $rex_file_category_name = $gc->getValue('name');
}
rex_set_session('media[rex_file_category]', $rex_file_category);
// -------------- PERMS
$PERMALL = false;
if ($REX['USER']->isAdmin() || $REX['USER']->hasPerm('media[0]')) {
    $PERMALL = true;
}
/**
 * Erweitert das Meta-Formular um die neuen Meta-Felder
 *
 * @param string   $prefix       Feldprefix
 * @param string   $params       EP Params
 * @param callback $saveCallback Callback, dass die Daten speichert
 */
function _rex_a62_metainfo_form($prefix, $params, $saveCallback)
{
    // Beim ADD gibts noch kein activeItem
    $activeItem = null;
    if (isset($params['activeItem'])) {
        $activeItem = $params['activeItem'];
    }
    $restrictionsCondition = '';
    if ($prefix == 'art_') {
        if ($params['id'] != '') {
            $s = '';
            $OOArt = OOArticle::getArticleById($params['id'], $params['clang']);
            // Alle Metafelder des Pfades sind erlaubt
            foreach (explode('|', $OOArt->getPath()) as $pathElement) {
                if ($pathElement != '') {
                    $s .= ' OR `p`.`restrictions` LIKE "%|' . $pathElement . '|%"';
                }
            }
            $restrictionsCondition = 'AND (`p`.`restrictions` = ""' . $s . ')';
        }
    } elseif ($prefix == 'cat_') {
        $s = '';
        if ($params['id'] != '') {
            $OOCat = OOCategory::getCategoryById($params['id'], $params['clang']);
            // Alle Metafelder des Pfades sind erlaubt
            foreach (explode('|', $OOCat->getPath()) as $pathElement) {
                if ($pathElement != '') {
                    $s .= ' OR `p`.`restrictions` LIKE "%|' . $pathElement . '|%"';
                }
            }
            // Auch die Kategorie selbst kann Metafelder haben
            $s .= ' OR `p`.`restrictions` LIKE "%|' . $params['id'] . '|%"';
        }
        $restrictionsCondition = 'AND (`p`.`restrictions` = ""' . $s . ')';
    } elseif ($prefix == 'med_') {
        $catId = rex_session('media[rex_file_category]', 'int');
        if ($activeItem) {
            $catId = $activeItem->getValue('category_id');
        }
        if ($catId !== '') {
            $s = '';
            if ($catId != 0) {
                $OOCat = OOMediaCategory::getCategoryById($catId);
                // Alle Metafelder des Pfades sind erlaubt
                foreach (explode('|', $OOCat->getPath()) as $pathElement) {
                    if ($pathElement != '') {
                        $s .= ' OR `p`.`restrictions` LIKE "%|' . $pathElement . '|%"';
                    }
                }
            }
            // Auch die Kategorie selbst kann Metafelder haben
            $s .= ' OR `p`.`restrictions` LIKE "%|' . $catId . '|%"';
            $restrictionsCondition = 'AND (`p`.`restrictions` = ""' . $s . ')';
        }
    }
    $sqlFields = _rex_a62_metainfo_sqlfields($prefix, $restrictionsCondition);
    $params = rex_call_func($saveCallback, array($params, $sqlFields), false);
    return rex_a62_metaFields($sqlFields, $activeItem, 'rex_a62_metainfo_form_item', $params);
}
Exemple #4
0
 protected function buildFilterCondition(array $params)
 {
     $restrictionsCondition = '';
     $catId = rex_session('media[rex_file_category]', 'int');
     if (isset($params['activeItem'])) {
         $catId = $params['activeItem']->getValue('category_id');
     }
     if ($catId !== '') {
         $s = '';
         if ($catId != 0) {
             $OOCat = rex_media_category::get($catId);
             // Alle Metafelder des Pfades sind erlaubt
             foreach ($OOCat->getPathAsArray() as $pathElement) {
                 if ($pathElement != '') {
                     $s .= ' OR `p`.`restrictions` LIKE "%|' . $pathElement . '|%"';
                 }
             }
         }
         // Auch die Kategorie selbst kann Metafelder haben
         $s .= ' OR `p`.`restrictions` LIKE "%|' . $catId . '|%"';
         $restrictionsCondition = 'AND (`p`.`restrictions` = "" OR `p`.`restrictions` IS NULL ' . $s . ')';
     }
     return $restrictionsCondition;
 }
    }
    if (!class_exists('rex_installer_socket')) {
        require_once $REX['INCLUDE_PATH'] . '/addons/installer/classes/rex_installer_socket.class.php';
    }
    // functions einbinden
    require_once $REX['INCLUDE_PATH'] . '/addons/installer/functions/global.func.php';
    require_once $REX['INCLUDE_PATH'] . '/addons/installer/functions/filehandling.func.php';
    require_once $REX['INCLUDE_PATH'] . '/addons/installer/functions/unzip.func.php';
    require_once $REX['INCLUDE_PATH'] . '/addons/installer/functions/api.func.php';
    require_once $REX['INCLUDE_PATH'] . '/addons/installer/functions/urls.func.php';
    require_once $REX['INCLUDE_PATH'] . '/addons/installer/functions/regex.func.php';
    rex_register_extension('PAGE_HEADER', 'Installer_add_assets');
    #
    // finally, some global vars and config-informations
    $versionswitch = rex_request('versionswitch', 'string');
    if ($versionswitch) {
        Installer_clearSessionCache();
        $useVersion = $versionswitch;
        rex_set_session('userexversion', $useVersion);
    } else {
        if (!rex_session('userexversion')) {
            $useVersion = $REX['VERSION'] . '.' . $REX['SUBVERSION'];
            rex_set_session('userexversion', $useVersion);
        }
    }
    $addonApi = 'http://www.redaxo.org/de/_system/_webservice/addons/?v=' . rex_session('userexversion');
    $addonDetailUrl = 'http://www.redaxo.org/de/download/addons/?addon_id=';
    $addonDir = 'addons/' . $mypage;
    $tmpDir = 'temp';
    $tmpFile = 'temp.zip';
}
function rex_medienpool_Mediaform($form_title, $button_title, $rex_file_category, $file_chooser, $close_form)
{
    global $I18N, $REX, $REX_USER, $subpage, $ftitle;
    $s = '';
    $cats_sel = new rex_select();
    $cats_sel->setStyle('class="inp100"');
    $cats_sel->setSize(1);
    $cats_sel->setName('rex_file_category');
    $cats_sel->setId('rex_file_category');
    $cats_sel->addOption($I18N->msg('pool_kats_no'), "0");
    $mediacat_ids = array();
    $rootCat = 0;
    if ($rootCats = OOMediaCategory::getRootCategories()) {
        foreach ($rootCats as $rootCat) {
            rex_medienpool_addMediacatOptionsWPerm($cats_sel, $rootCat, $mediacat_ids);
        }
    }
    $cats_sel->setSelected($rex_file_category);
    if (isset($msg) and $msg != "") {
        $s .= rex_warning($msg);
        $msg = "";
    }
    if (!isset($ftitle)) {
        $ftitle = '';
    }
    $add_file = '';
    if ($file_chooser) {
        $devInfos = '';
        if ($REX_USER->hasPerm('advancedMode[]')) {
            $devInfos = '<span class="rex-notice">
         <span>' . $I18N->msg('pool_max_uploadsize') . ':</span> ' . OOMedia::_getFormattedSize(rex_ini_get('upload_max_filesize')) . '

         <!-- Upload-Temp-Dir: ' . rex_ini_get('upload_tmp_dir') . '
         Uploads: ' . (rex_ini_get('file_uploads') == 1 ? 'On' : 'Off') . '<br />
         Max-Upload-Time: ' . rex_ini_get('max_input_time') . 's   -->

       </span>';
        }
        $add_file = '<p>
                   <label for="file_new">' . $I18N->msg('pool_file_file') . '</label>
                   <input type="file" id="file_new" name="file_new" size="30" />
                   ' . $devInfos . '
                 </p>';
    }
    $add_submit = '';
    if (rex_session('media[opener_input_field]') != '') {
        $add_submit = '<input type="submit" class="rex-sbmt" name="saveandexit" value="' . $I18N->msg('pool_file_upload_get') . '"' . rex_accesskey($I18N->msg('pool_file_upload_get'), $REX['ACKEY']['SAVE']) . ' />';
    }
    $s .= '
  		<div class="rex-mpl-oth">
  		<form action="index.php" method="post" enctype="multipart/form-data">
           <fieldset>
             <legend class="rex-lgnd"><span >' . $form_title . '</span></legend>
               <input type="hidden" name="page" value="medienpool" />
               <input type="hidden" name="media_method" value="add_file" />
               <input type="hidden" name="subpage" value="' . $subpage . '" />
               <p>
                 <label for="ftitle">' . $I18N->msg('pool_file_title') . '</label>
                 <input type="text" size="20" id="ftitle" name="ftitle" value="' . htmlspecialchars(stripslashes($ftitle)) . '" />
               </p>
               <p>
                 <label for="rex_file_category">' . $I18N->msg('pool_file_category') . '</label>
                 ' . $cats_sel->get() . '
               </p>
               ' . $add_file . '
               <p class="rex-sbmt">
                 <input type="submit" name="save" value="' . $button_title . '"' . rex_accesskey($button_title, $REX['ACKEY']['SAVE']) . ' />
                 ' . $add_submit . '
               </p>
           </fieldset>
        ';
    if ($close_form) {
        $s .= '</form></div>' . "\n";
    }
    return $s;
}
$addon_text_versions = "";
if ($addonid != "") {
    // Funktion aufrufen, um JSON von Redaxo-API zurückzubekommen
    // Rufe Session ab, welche bereits auf der addons.inc.php gespeichert wurde
    $addons = $_SESSION['addonsAsObject'];
    $addons = Installer_array_sort($addons, 'file_version', SORT_DESC);
    // Sort by oldest first
    ?>
	<div class="rex-addon-output">
		<h2 class="rex-hl2">Verfügbare Downloads
            <div class="action_bar_wrapper">
                <a href="#" class="closebox"><img src="media/addons/installer/close.gif" /></a>
            </div>
		</h2>
			<?php 
    echo rex_info('Bitte wähle jetzt ein Paket.<br />Alle hier gezeigten Downloads sind laut Entwickler kompatibel mit REX ' . rex_session('userexversion') . '. Du nutzt Version ' . $REX['VERSION'] . '.' . $REX['SUBVERSION'] . '. Bitte beachte zusätzlich alle Entwicklerhinweise, bevor du ein AddOn installierst.');
    if (Installer_check_if_addon_exists($REX['INCLUDE_PATH'] . "/addons/" . $installname)) {
        echo rex_warning('Achtung: Das Addon existiert bereits auf Deinem System. Wenn du die Installation fortführst, werden alle Daten von diesem AddOn überschrieben. Sollte es sich hierbei um ein Update des AddOns handeln, musst du dieses eventuell im Anschluss "re-installieren". Dies ist normalerweise nur notwendig, wenn Datenbankabhängigkeiten vom Addon aus bestehen. Bitte lege sicherheitshalber ein Backup des AddOns und der Datenbank an.');
    }
    // Debug only
    //print_r($addons);
    ?>
		<div class="rex-addon-content">
			<p class="rex-tx1">
            
				<?php 
    // Zähle Ergebnisse in Array
    $ergebnis = sizeof($addons);
    if ($ergebnis > 0) {
        echo '
						<table class="rex-table install-modal">
/**
 * Ausgabe des Medienpool Formulars
 */
function rex_mediapool_Mediaform($form_title, $button_title, $rex_file_category, $file_chooser, $close_form)
{
    global $I18N, $REX, $subpage, $ftitle, $warning, $info;
    $s = '';
    $cats_sel = new rex_mediacategory_select();
    $cats_sel->setStyle('class="rex-form-select"');
    $cats_sel->setSize(1);
    $cats_sel->setName('rex_file_category');
    $cats_sel->setId('rex_file_category');
    $cats_sel->addOption($I18N->msg('pool_kats_no'), "0");
    $cats_sel->setAttribute('onchange', 'this.form.submit()');
    $cats_sel->setSelected($rex_file_category);
    if (isset($warning) and $warning != "") {
        $s .= rex_warning($warning);
        $warning = "";
    }
    if (isset($info) and $info != "") {
        $s .= rex_info($info);
        $info = "";
    }
    if (!isset($ftitle)) {
        $ftitle = '';
    }
    $add_file = '';
    if ($file_chooser) {
        $devInfos = '';
        if ($REX['USER']->hasPerm('advancedMode[]')) {
            $devInfos = '<span class="rex-form-notice">
         ' . $I18N->msg('phpini_settings') . ':<br />
         ' . (rex_ini_get('file_uploads') == 0 ? '<span>' . $I18N->msg('pool_upload') . ':</span> <em>' . $I18N->msg('pool_upload_disabled') . '</em><br />' : '') . '
         <span>' . $I18N->msg('pool_max_uploadsize') . ':</span> ' . OOMedia::_getFormattedSize(rex_ini_get('upload_max_filesize')) . '<br />
         <span>' . $I18N->msg('pool_max_uploadtime') . ':</span> ' . rex_ini_get('max_input_time') . 's
       </span>';
        }
        $add_file = '
                <div class="rex-form-row">
                  <p class="rex-form-file">
                    <label for="file_new">' . $I18N->msg('pool_file_file') . '</label>
                    <input class="rex-form-file" type="file" id="file_new" name="file_new" size="30" />
                    ' . $devInfos . '
                  </p>
                </div>';
    }
    $add_submit = '';
    if (rex_session('media[opener_input_field]') != '') {
        $add_submit = '<input type="submit" class="rex-form-submit" name="saveandexit" value="' . $I18N->msg('pool_file_upload_get') . '"' . rex_accesskey($I18N->msg('pool_file_upload_get'), $REX['ACKEY']['SAVE']) . ' />';
    }
    $s .= '
      <div class="rex-form" id="rex-form-mediapool-other">
        <form action="index.php" method="post" enctype="multipart/form-data">
          <fieldset class="rex-form-col-1">
            <legend>' . $form_title . '</legend>
            <div class="rex-form-wrapper">
              <input type="hidden" name="page" value="mediapool" />
              <input type="hidden" name="media_method" value="add_file" />
              <input type="hidden" name="subpage" value="' . $subpage . '" />
              
              <div class="rex-form-row">
                <p class="rex-form-text">
                  <label for="ftitle">' . $I18N->msg('pool_file_title') . '</label>
                  <input class="rex-form-text" type="text" size="20" id="ftitle" name="ftitle" value="' . htmlspecialchars(stripslashes($ftitle)) . '" />
                </p>
              </div>
              
              <div class="rex-form-row">
                <p class="rex-form-select">
                  <label for="rex_file_category">' . $I18N->msg('pool_file_category') . '</label>
                  ' . $cats_sel->get() . '
                </p>
              </div>

              <div class="rex-clearer"></div>';
    // ----- EXTENSION POINT
    $s .= rex_register_extension_point('MEDIA_FORM_ADD', '');
    $s .= $add_file . '
              <div class="rex-form-row">
                <p class="rex-form-submit">
                 <input class="rex-form-submit" type="submit" name="save" value="' . $button_title . '"' . rex_accesskey($button_title, $REX['ACKEY']['SAVE']) . ' />
                 ' . $add_submit . '
                </p>
              </div>

              <div class="rex-clearer"></div>
            </div>
          </fieldset>
        ';
    if ($close_form) {
        $s .= '</form></div>' . "\n";
    }
    return $s;
}
        /**
         * creates and returns the uploadform
         */
        public function createUploadForm()
        {
            global $REX, $I18N, $PERMALL;
            $rex_file_category = '';
            if (!$rex_file_category) {
                $rex_file_category = rex_session('media[rex_file_category]', 'int');
            }
            $output = '';
            $script_page_header = '';
            $uploadPath = "index.php?page=" . $this->myself . "&subpage=upload&upload_folder=" . $this->folder . "&faceless=1";
            if ($this->sync_cat) {
                // include cat sync select
                $cats_sel = new rex_select();
                $cats_sel->setStyle('class="inp100"');
                $cats_sel->setSize(1);
                $cats_sel->setName('rex_file_category');
                $cats_sel->setId('rex_file_category_' . $this->time);
                $cats_sel->addOption($I18N->msg('pool_kats_no'), "0");
                $mediacat_ids = array();
                $rootCat = 0;
                $PERMALL = TRUE;
                if ($rootCats = OOMediaCategory::getRootCategories()) {
                    foreach ($rootCats as $rootCat) {
                        rex_mediapool_addMediacatOptionsWPerm($cats_sel, $rootCat, $mediacat_ids);
                    }
                }
                $cats_sel->setSelected($rex_file_category);
            }
            if ($this->markup) {
                $output .= '
          <div class="rex-form">
            <fieldset class="rex-form-col-1">
              <legend>Multiupload</legend>
              <div class="rex-form-wrapper">' . "\n";
                if ($this->sync_cat) {
                    $output .= '
                <div class="rex-form-row">
                  <p class="rex-form-text">
                    <label for="rex_file_category">' . $I18N->msg('pool_file_category') . '</label>
                    ' . $cats_sel->get() . '
                  </p>
                </div>' . "\n";
                }
                $output .= '
                <div class="rex-form-row">
                <label>Upload:</label>' . "\n";
            }
            $output .= '
            <div id="multiupload' . $this->time . '" class="' . ($this->markup ? 'behave_normal' : 'styleless') . '">    
              <noscript>      
                <p>JavaScript muss aktiviert sein.</p>
              </noscript>         
            </div>';
            if ($this->markup) {
                $output .= '
              </div>';
                if (!$this->clear_uploadlist_automatically) {
                    $output .= '<div class="rex-form-row">
                  <p class="rex-form-text">
                    <label>Aktionen</label>
                    <a href="javascript:void(0)" onclick="clearUploadList();">Abgeschlossene / fehlerhafte aus der Liste entfernen</a>
                  </p>
                </div>' . "\n";
                }
            }
            $script_page_header .= '
            <script>
              
              function rex_multiupload_createUploader' . $this->time . '(){            
                var uploader = new qq.FileUploader({
                  element: document.getElementById("multiupload' . $this->time . '"),
                  action: "' . $uploadPath . '",
                  mediaPoolSelector: "rex_file_category_' . $this->time . '",
                  sizeLimit: 0, // max size   
                  minSizeLimit: 0, // min size';
            $script_page_header .= '
                  onSubmit: function(id,filename) {' . "\n";
            if ($this->clear_uploadlist_automatically) {
                $script_page_header .= '
                   clearUploadList();';
            }
            if ($this->onSubmitCallback) {
                $script_page_header .= '
                   
                   if(typeof ' . $this->onSubmitCallback . ' == "function") { 
                     // user callback function
                     ' . $this->onSubmitCallback . '(filename);
                   }';
            }
            $script_page_header .= '
                  },
                  ';
            $script_page_header .= '
                  onUpload: function(id,fileName, xhr) {' . "\n";
            if ($this->onUploadCallback) {
                $script_page_header .= '
                    
                    if(typeof ' . $this->onUploadCallback . ' == "function") { 
                      // user callback function
                      ' . $this->onUploadCallback . '(fileName, xhr);
                    }';
            }
            $script_page_header .= '
                  
                    
                  },
                  ';
            $script_page_header .= '
                  onProgress: function(id,fileName, loaded, total) {' . "\n";
            if ($this->onProgressCallback) {
                $script_page_header .= '
                    
                    if(typeof ' . $this->onProgressCallback . ' == "function") { 
                      // user callback function
                      ' . $this->onProgressCallback . '(fileName, loaded, total);
                    }';
            }
            $script_page_header .= '
                  
                    
                  },
                  ';
            $script_page_header .= '
                  onComplete: function(id,filename,json) {' . "\n";
            if ($this->clear_file_after_finish) {
                $script_page_header .= '                        
                    window.setTimeout(function(){
                      clearUploadListSuccess();
                    }, 5000);';
            }
            if ($this->onCompleteCallback) {
                $script_page_header .= '
                    
                    if(typeof ' . $this->onCompleteCallback . ' == "function" && json.success) { 
                      // user callback function
                      ' . $this->onCompleteCallback . '(json);
                    }';
            }
            $script_page_header .= '
                  
                    
                  },
                  ';
            $script_page_header .= '
                  onCancel: function(id,filename) {' . "\n";
            if ($this->onCancelCallback) {
                $script_page_header .= '
                    
                    if(typeof ' . $this->onCancelCallback . ' == "function") { 
                      // user callback function
                      ' . $this->onCancelCallback . '(filename);
                    }';
            }
            $script_page_header .= '
                  
                    
                  },
                  ';
            if ($this->upload_simultaneously && is_numeric($this->upload_simultaneously)) {
                $script_page_header .= ' 
                  maxConnections: ' . $this->upload_simultaneously . ',';
            }
            $script_page_header .= '
                  debug: ' . ($this->javascript_debug ? "true" : "false") . '
                });           
              }
              
              jQuery(document).ready(function(){
                rex_multiupload_createUploader' . $this->time . '();
              });
            </script>' . "\n";
            if ($this->markup) {
                if ($this->showFootnote) {
                    $output .= '<div class="rex-form-row edit_panel">
                  <label>Dateien editieren</label>
                    <ul class="qq-upload-list edit_uploads">

                    </ul>
                  </p>
                </div>' . "\n";
                }
            }
            if ($this->markup) {
                if ($this->showFootnote) {
                    $output .= '<div class="rex-form-row">
                  <p class="rex-form-file">
                    <span class="rex-form-notice">
                      Mehrfachauswahl mit STRG(WIN) oder CMD(MAC).<br />
                      Die Dateien werden automatisch in die ausgewählte Kategorie sychronisiert.
                      Ein Wechsel der Medienkategorie greift immer vor Auswahl einer Datei. 
                      Findet ein Upload bereits statt, kann für diese Datei die Kategorie nicht mehr verändert werden.
                    </span>
                  </p>
                </div>' . "\n";
                }
                $output .= '  
                </div>
                </fieldset>
                </div>' . "\n";
            }
            // Register EXTENSION POINT
            $header_func = 'return str_replace("<!-- ###MULTIUPLOAD_EP_REPLACE### -->",\'' . $script_page_header . '\'."<!-- ###MULTIUPLOAD_EP_REPLACE### -->",$params["subject"]);';
            rex_register_extension('OUTPUT_FILTER', create_function('$params', $header_func));
            // TIME FOR OUTPUT
            return $output;
        }
</td>
        			    <td>
        			    	<?php 
    $versions = array('4.0', '4.1', '4.2', '4.3', '4.4', '4.5', '4.6');
    $versions_out = '
        			    			<p class="forceversion" title="Viele AddOn-Versionen sind untereinander kompatibel, die Entwickler haben eventuell die Versionsangabe nur noch nicht angepasst. Wird der Wert dieser Box verstellt, bezieht Installer die AddOns aus dem gewählten Versionspool. Achtung: Nicht alle AddOn-Versionen sind unter verschiedenen Systemen kompatibel. Bitte installiere nur AddOns von älteren Versionen, wenn du dir sicher bist, was du tust!">
        			    				<span>Andere Version erzwingen?</span>
        			    			</p>';
    $versions_out .= '
        			    		<form action="" method="get">
        			    			<input type="hidden" name="page" value="installer" />
        			    			<input type="hidden" name="subpage" value="addon_installer">
        			    			<select name="versionswitch" class="forceversionselect">';
    foreach ($versions as $v) {
        $addSelected = '';
        if (rex_session('userexversion') == $v) {
            $addSelected = 'selected="selected"';
        }
        $versions_out .= '<option ' . $addSelected . ' value="' . $v . '">REX ' . $v . '</option>';
    }
    $versions_out .= '</select></form>';
    echo $versions_out;
    ?>
        			    </td>
        			</tr>
        			    			
        			<tr>
        			    <td>Verfügbare Updates</td>
        			    <td><?php 
    echo $updatesAvailable;
    ?>
Exemple #11
0
 /**
  * Returns if the safe mode is active.
  *
  * @return bool
  */
 public static function isSafeMode()
 {
     return self::isBackend() && PHP_SESSION_ACTIVE == session_status() && rex_session('safemode', 'boolean', false);
 }
 protected function initSessionVar()
 {
     if (session_id() == '') {
         session_start();
     }
     if (rex_request('new_website_id') >= rex_website::firstId) {
         // user switched website
         rex_set_session('current_website_id', rex_request('new_website_id'));
     } elseif (rex_session('current_website_id') < rex_website::firstId) {
         // first time running
         rex_set_session('current_website_id', rex_website::firstId);
     } else {
         // session var is set correctly, nothing todo
     }
 }