コード例 #1
0
        $array = array();
        $array['configuration_value'] = $this->post['configuration']['global'];
        $query = $GLOBALS['TYPO3_DB']->UPDATEquery('tx_multishop_configuration', 'configuration_key=\'' . addslashes($this->post['configuration_key']) . '\'', $array);
        $res = $GLOBALS['TYPO3_DB']->sql_query($query);
    }
    if ($this->ms['MODULES']['GLOBAL_MODULES']['CACHE_FRONT_END'] or $this->conf['cacheConfiguration']) {
        if ($this->DOCUMENT_ROOT and !strstr($this->DOCUMENT_ROOT, '..')) {
            $command = "rm -rf " . $this->DOCUMENT_ROOT . "uploads/tx_multishop/tmp/cache/*";
            exec($command);
            $content .= '<br /><p><strong>' . $this->pi_getLL('admin_label_multishop_cache_has_been_cleared') . '</strong></p>';
        } else {
            $content .= '<br /><p><strong>' . $this->pi_getLL('admin_label_cache_not_cleared_something_is_wrong_with_configuration_document_root_is_not_set_directly') . '</strong></p>';
        }
    }
    if ($this->ms['MODULES']['GLOBAL_MODULES']['CACHE_FRONT_END']) {
        mslib_befe::cacheLite('clear_all', 'delete');
    }
    $string = 'loadConfiguration_' . $this->shop_pid;
    if ($this->post['tx_multishop_pi1']['referrer']) {
        header("Location: " . $this->post['tx_multishop_pi1']['referrer'] . "#module" . $this->post['tx_multishop_pi1']['gid']);
        exit;
    } else {
        header("Location: " . $this->FULL_HTTP_URL . mslib_fe::typolink($this->shop_pid . ',2003', 'tx_multishop_pi1[page_section]=admin_modules&gid=' . $this->post['gid'], 1));
        exit;
    }
}
if ($configuration['id'] or $_REQUEST['action'] == 'edit_module') {
    $configuration['parent_id'] = $this->get['cid'];
    $save_block = '
<div class="clearfix">
		<div class="pull-right">
コード例 #2
0
	 while (false !== ($file = readdir($handle))) {
		  if ($file != "." && $file != "..") {
			  if (preg_match("/^temp_CACHED_/",$file))
			  {
				  if (unlink($this->DOCUMENT_ROOT.'typo3conf/'.$file))
				  {
					  $content.= '<li>'.$file.' file removed</li>';
				  }
				  else
				  {
					  $content.='<li>'.'<strong>'. $file.' file can\'t be removed</strong></li>';					  
				  }
			  }
		  }
	 }
	 closedir($handle);
}
$content.='</ul>';
// clearing typo3 temp files eof	
*/
// if frontend caching is enabled also clear those cache files
if ($this->ms['MODULES']['GLOBAL_MODULES']['CACHE_FRONT_END'] or $this->conf['cacheConfiguration']) {
    if ($this->DOCUMENT_ROOT and !strstr($this->DOCUMENT_ROOT, '..')) {
        mslib_befe::cacheLite('delete_all');
        //$command="rm -rf ".$this->DOCUMENT_ROOT."uploads/tx_multishop/tmp/cache/*";
        //exec($command);
        $content .= '<br /><p><strong>' . $this->pi_getLL('admin_label_multishop_cache_has_been_cleared') . '</strong></p>';
    } else {
        $content .= '<br /><p><strong>' . $this->pi_getLL('admin_label_cache_not_cleared_something_is_wrong_with_configuration_document_root_is_not_set_directly') . '</strong></p>';
    }
}
コード例 #3
0
ファイル: core.php プロジェクト: bvbmedia/multishop
                    mslib_befe::cacheLite('save', $string, $lifetime, 0, $tmp);
                }
            }
            $content .= $tmp;
        }
        // load cms top eof
        if ($this->ms['MODULES']['HOME_PRODUCTS_LISTING']) {
            require \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath('multishop') . 'scripts/front_pages/products_listing.php';
        }
        // load cms bottom
        if (!$this->get['p']) {
            $string = 'home_bottom' . $GLOBALS['TSFE']->sys_language_uid;
            if (!$this->ms['MODULES']['CACHE_FRONT_END'] or $this->ms['MODULES']['CACHE_FRONT_END'] and !($tmp = mslib_befe::cacheLite('get', $string, $lifetime, 0))) {
                $tmp = mslib_fe::printCMScontent('home_bottom', $GLOBALS['TSFE']->sys_language_uid);
                if ($this->ms['MODULES']['CACHE_FRONT_END']) {
                    // if empty we stuff it with a space, so the database query wont be executed next time
                    if (!$tmp) {
                        $tmp = ' ';
                    }
                    mslib_befe::cacheLite('save', $string, $lifetime, 0, $tmp);
                }
            }
            $content .= $tmp;
        }
        // load cms bottom eof
        break;
}
if (!$this->ms['MODULES']['DISABLE_CRUMBAR'] and $GLOBALS['TYPO3_CONF_VARS']["tx_multishop"]['crumbar_html']) {
    $content = $GLOBALS['TYPO3_CONF_VARS']["tx_multishop"]['crumbar_html'] . $content;
}
$content = '<div id="tx_multishop_pi1_core">' . $content . '</div>';
コード例 #4
0
        $flat_database_extra_attribute_options = array();
        $array = explode(";", $this->ms['MODULES']['FLAT_DATABASE_EXTRA_ATTRIBUTE_OPTION_COLUMNS']);
        foreach ($array as $row) {
            $item = explode(":", $row);
            if (is_numeric($item[0])) {
                $columnName = mslib_fe::getProductsOptionName($item[0]);
                if ($columnName) {
                    $field_name = "a_" . str_replace("-", "_", mslib_fe::rewritenamein($columnName));
                    if ($field_name) {
                        $flat_database_extra_attribute_options[$item[0]] = array(0 => $field_name, 1 => $item[1]);
                    }
                }
            }
        }
        if ($this->ms['MODULES']['CACHE_FRONT_END']) {
            mslib_befe::cacheLite('save', $string, $lifetime, 1, $flat_database_extra_attribute_options);
        }
    }
    $this->ms['FLAT_DATABASE_ATTRIBUTE_OPTIONS'] = $flat_database_extra_attribute_options;
}
if (!$this->conf['disableMetatags']) {
    if ($this->ms['MODULES']['META_TITLE'] and !$GLOBALS['TSFE']->additionalHeaderData['title']) {
        $GLOBALS['TSFE']->additionalHeaderData['title'] = '<title>' . htmlspecialchars($this->ms['MODULES']['META_TITLE']) . '</title>';
    }
    if ($this->ms['MODULES']['META_DESCRIPTION'] and !$GLOBALS['TSFE']->additionalHeaderData['description']) {
        $GLOBALS['TSFE']->additionalHeaderData['description'] = '<meta name="description" content="' . htmlspecialchars($this->ms['MODULES']['META_DESCRIPTION']) . '" />';
    }
}
// if cache module is enabled and a admin is logged in temporary disable the caching module
if ($this->ms['MODULES']['CACHE_FRONT_END'] and $this->ADMIN_USER) {
    $this->ms['MODULES']['CACHE_FRONT_END'] = 0;