49 if (!isset($instance)) {
51 $instance =
new $class();
61 if ($this->xoops->isUser()) {
62 $this->xoops->module = $this->xoops->getModuleByDirname(
'system');
63 if (!$this->xoops->user->isAdmin($this->xoops->module->mid())) {
83 $ret = (isset($global[$key]) && is_array($global[$key])) ? $global[$key] : $default;
86 $ret = (isset($global[$key])) ? strtotime($global[$key]) : $default;
89 $ret = (isset($global[$key])) ? filter_var($global[$key], FILTER_SANITIZE_MAGIC_QUOTES) : $default;
93 $ret = (isset($global[$key])) ? filter_var($global[$key], FILTER_SANITIZE_NUMBER_INT) : $default;
124 $path =
'modules/' . $domain .
'/language/';
126 $ret = include_once
$file;
128 $ret = include_once
$xoops->path(
$path .
'english/admin/' .
$name .
'.php');
140 static $tblVersion = array();
141 if (is_array($tblVersion) && array_key_exists($version .
'.' . $value, $tblVersion)) {
142 return $tblVersion[$version .
'.' . $value];
145 $path =
$xoops->path(
'modules/system/admin/' . $version .
'/xoops_version.php');
150 $tblVersion[$version .
'.' . $value] = $retvalue;
177 $total_smarty_cache = 0;
178 $total_smarty_compile = 0;
179 $total_xoops_cache = 0;
180 if (!empty($cache)) {
181 for (
$i = 0;
$i < count($cache); ++
$i) {
182 switch ($cache[
$i]) {
184 $files = glob($cachePath .
'smarty_cache/*.*');
185 $total_smarty_cache = 0;
186 foreach (
$files as $filename) {
187 if (basename(strtolower($filename)) !=
'index.html') {
189 ++$total_smarty_cache;
195 $files = glob($cachePath .
'smarty_compile/*.*');
196 $total_smarty_compile = 0;
197 foreach (
$files as $filename) {
198 if (basename(strtolower($filename)) !=
'index.html') {
200 ++$total_smarty_compile;
209 $files = glob($cachePath .
'xoops_cache/*.*');
210 $total_xoops_cache = 0;
211 foreach (
$files as $filename) {
212 if (basename(strtolower($filename)) !=
'index.html') {
214 ++$total_xoops_cache;
217 $total_xoops_cache =
$status || ($total_xoops_cache>0);
221 $ret[
'smarty_cache'] = $total_smarty_cache;
222 $ret[
'smarty_compile'] = $total_smarty_compile;
223 $ret[
'xoops_cache'] = $total_xoops_cache;
cleanVars(&$global, $key, $default= '', $type= 'int')
if(!isset($xoops->paths[$path_type])) if($path_type== 'var') $file
adminVersion($version, $value= '')
loadLanguage($name, $domain= '', $language=null)