25 return $this->
stop(
"msg_is_not_administrator");
38 return $this->
stop(
'msg_invalid_request');
43 if($oCacheHandler->isSupport())
46 $oCacheHandler->delete($cache_key);
66 $temp_cache_dir =
'./files/cache_' . $_SERVER[
'REQUEST_TIME'];
85 foreach($module_list as
$module)
88 $oModule =
getClass($module->module);
89 if(method_exists($oModule,
'recompileCache'))
91 $oModule->recompileCache();
100 if($oObjectCacheHandler->isSupport())
102 $truncated[] = $oObjectCacheHandler->truncate();
105 if($oTemplateCacheHandler->isSupport())
107 $truncated[] = $oTemplateCacheHandler->truncate();
110 if(count($truncated) && in_array(FALSE, $truncated))
112 return new BaseObject(-1,
'msg_self_restart_cache_engine');
119 foreach($tmp_cache_list as $tmp_dir)
130 if($db_type ==
'cubrid')
133 $db->deleteDuplicateIndexes();
138 $oAutoinstallAdminController->checkInstalled();
150 $oMemberController->procMemberLogout();
172 $vars->module_skin = json_decode($vars->module_skin);
179 $siteDesignFile =
_XE_PATH_ .
'files/site_design/design_' . $vars->site_srl .
'.php';
181 $layoutTarget =
'layout_srl';
182 $skinTarget =
'skin';
184 if($vars->target_type ==
'M')
186 $layoutTarget =
'mlayout_srl';
187 $skinTarget =
'mskin';
190 if(is_readable($siteDesignFile))
192 include($siteDesignFile);
199 $layoutSrl = (!$vars->layout_srl) ? 0 : $vars->layout_srl;
203 foreach($vars->module_skin as $moduleName => $skinName)
205 if($moduleName ==
'ARTICLE')
207 $moduleName =
'page';
211 $designInfo->module->{$moduleName}->{$skinTarget} = $skinName;
214 $this->makeDefaultDesignFile(
$designInfo, $vars->site_srl);
222 $buff[] =
'<?php if(!defined("__XE__")) exit();';
223 $buff[] =
'$designInfo = new stdClass;';
227 $buff[] = sprintf(
'$designInfo->layout_srl = %s; ',
$designInfo->layout_srl);
232 $buff[] = sprintf(
'$designInfo->mlayout_srl = %s;',
$designInfo->mlayout_srl);
235 $buff[] =
'$designInfo->module = new stdClass;';
237 foreach(
$designInfo->module as $moduleName => $skinInfo)
239 $buff[] = sprintf(
'$designInfo->module->%s = new stdClass;', $moduleName);
240 foreach($skinInfo as $target => $skinName)
242 $buff[] = sprintf(
'$designInfo->module->%s->%s = \'%s\';', $moduleName, $target, $skinName);
246 $siteDesignFile =
_XE_PATH_ .
'files/site_design/design_' . $site_srl .
'.php';
261 $output = $oModel->isExistsFavorite($siteSrl, $moduleName);
270 $favoriteSrl =
$output->get(
'favoriteSrl');
271 $output = $this->_deleteFavorite($favoriteSrl);
277 $output = $this->_insertFavorite($siteSrl, $moduleName);
286 $this->add(
'result', $result);
298 $output = $oModel->getFavoriteList();
304 $favoriteList =
$output->get(
'favoriteList');
310 $deleteTargets = array();
311 foreach($favoriteList as $favorite)
313 if($favorite->type ==
'module')
315 $modulePath =
_XE_PATH_ .
'modules/' . $favorite->module;
316 if(!is_dir($modulePath))
318 $deleteTargets[] = $favorite->admin_favorite_srl;
323 if(!count($deleteTargets))
328 $args =
new stdClass();
329 $args->admin_favorite_srls = $deleteTargets;
346 if($isAgree ==
'true')
348 $_SESSION[
'enviroment_gather'] =
'Y';
352 $_SESSION[
'enviroment_gather'] =
'N';
356 $this->setRedirectUrl($redirectUrl);
371 if(!is_object($oAdminConfig))
373 $oAdminConfig =
new stdClass();
376 if($file[
'tmp_name'])
378 $target_path =
'files/attach/images/admin/';
382 list($width, $height, $type, $attrs) = @getimagesize($file[
'tmp_name']);
396 $target_filename = sprintf(
'%s%s.%s.%s', $target_path,
'adminLogo', date(
'YmdHis'), $ext);
397 @move_uploaded_file($file[
'tmp_name'], $target_filename);
399 $oAdminConfig->adminLogo = $target_filename;
403 $oAdminConfig->adminTitle = strip_tags($adminTitle);
407 unset($oAdminConfig->adminTitle);
416 $this->setMessage(
'success_updated',
'info');
419 $this->setRedirectUrl($returnUrl);
432 unset($oAdminConfig->adminLogo);
437 $this->setMessage(
'success_deleted',
'info');
440 $this->setRedirectUrl($returnUrl);
449 $args =
new stdClass();
451 $args->site_srl = $siteSrl;
452 $args->module = $module;
464 $args =
new stdClass();
465 $args->admin_favorite_srl = $favoriteSrl;
476 $args =
new stdClass;
490 if($site_info->site_srl)
492 $virtual_site = $site_info->site_srl .
'/';
505 $this->setMessage(
'success_deleted');
515 $db_info->use_sitelock = ($vars->use_sitelock) ? $vars->use_sitelock :
'N';
516 $db_info->sitelock_title = $vars->sitelock_title;
517 $db_info->sitelock_message = $vars->sitelock_message;
519 $whitelist = $vars->sitelock_whitelist;
520 $whitelist = preg_replace(
"/[\r|\n|\r\n]+/",
",",$whitelist);
521 $whitelist = preg_replace(
"/\s+/",
"",$whitelist);
522 if(preg_match(
'/(<\?|<\?php|\?>)/xsm', $whitelist))
526 $whitelist .=
',127.0.0.1,' . $_SERVER[
'REMOTE_ADDR'];
527 $whitelist = explode(
',',trim($whitelist,
','));
528 $whitelist = array_unique($whitelist);
534 $db_info->sitelock_whitelist = $whitelist;
537 if(!$oInstallController->makeConfigFile())
539 return new BaseObject(-1,
'msg_invalid_request');
545 if(!$returnUrl) $returnUrl =
getNotEncodedUrl(
'',
'act',
'dispAdminConfigGeneral');
546 header(
'location:' . $returnUrl);
557 $white_object = $vars->embed_white_object;
558 $white_object = preg_replace(
"/[\r\n|\r|\n]+/",
'|@|', $white_object);
559 $white_object = preg_replace(
"/[\s\'\"]+/",
'', $white_object);
560 $white_object = explode(
'|@|', $white_object);
561 $white_object = array_unique($white_object);
563 $white_iframe = $vars->embed_white_iframe;
564 $white_iframe = preg_replace(
"/[\r\n|\r|\n]+/",
'|@|', $white_iframe);
565 $white_iframe = preg_replace(
"/[\s\'\"]+/",
'', $white_iframe);
566 $white_iframe = explode(
'|@|', $white_iframe);
567 $white_iframe = array_unique($white_iframe);
569 $whitelist =
new stdClass;
570 $whitelist->object = $white_object;
571 $whitelist->iframe = $white_iframe;
573 $db_info->embed_white_object = $white_object;
574 $db_info->embed_white_iframe = $white_iframe;
577 if(!$oInstallController->makeConfigFile())
579 return new BaseObject(-1,
'msg_invalid_request');
582 require_once(
_XE_PATH_ .
'classes/security/EmbedFilter.class.php');
584 $oEmbedFilter->_makeWhiteDomainList($whitelist);
589 if(!$returnUrl) $returnUrl =
getNotEncodedUrl(
'',
'act',
'dispAdminConfigGeneral');
590 header(
'location:' . $returnUrl);
setMessage($message= 'success', $type=NULL)
getController($module_name)
procAdminInsertDefaultDesignInfo()
& getInstance($target= 'object', $info=null, $always_use_file=false)
validate($ip_list=array())
writeFile($filename, $buff, $mode="w")
procAdminRecompileCacheFile()
procAdminToggleFavorite()
_insertFavorite($siteSrl, $module, $type= 'module')
setRedirectUrl($url= './', $output=NULL)
updateDefaultDesignInfo($vars)
getAdminModel($module_name)
getInstance($db_type=NULL)
makeDefaultDesignFile($designInfo, $site_srl=0)
procAdminUpdateEmbedWhitelist()
_deleteFavorite($favoriteSrl)
procAdminEnviromentGatheringAgreement()
getAdminController($module_name)
readDir($path, $filter= '', $to_lower=FALSE, $concat_prefix=FALSE)
executeQuery($query_id, $args=NULL, $arg_columns=NULL)
$module
Class name of Xe Module that is identified by mid.
procAdminUpdateSitelock()