31 if(strpos($db_info->default_url,
'xn--') !== FALSE)
37 $xe_default_url = $db_info->default_url;
53 return $this->
stop(
"msg_is_not_administrator");
69 Context::set(
'use_rewrite', $db_info->use_rewrite ==
'Y' ?
'Y' :
'N');
70 Context::set(
'use_sso', $db_info->use_sso ==
'Y' ?
'Y' :
'N');
71 Context::set(
'use_html5', $db_info->use_html5 ==
'Y' ?
'Y' :
'N');
72 Context::set(
'use_spaceremover', $db_info->use_spaceremover ? $db_info->use_spaceremover :
'Y');
73 Context::set(
'qmail_compatibility', $db_info->qmail_compatibility ==
'Y' ?
'Y' :
'N');
74 Context::set(
'use_db_session', $db_info->use_db_session ==
'N' ?
'N' :
'Y');
75 Context::set(
'use_mobile_view', $db_info->use_mobile_view ==
'Y' ?
'Y' :
'N');
76 Context::set(
'use_ssl', $db_info->use_ssl ? $db_info->use_ssl :
"none");
77 if($db_info->http_port)
81 if($db_info->https_port)
97 if($lastTime > $_SERVER[
'REQUEST_TIME'] - 60 * 60 * 24 * 30)
102 $oAutoinstallModel =
getModel(
'autoinstall');
104 $params[
"act"] =
"getResourceapiLastupdate";
108 $lUpdateDoc = $xml_lUpdate->parse($buff);
109 $updateDate = $lUpdateDoc->response->updatedate->body;
117 $item = $oAutoinstallModel->getLatestPackage();
118 if(!$item || $item->updatedate < $updateDate)
121 $oController->_updateinfo();
132 $currentTime = $_SERVER[
'REQUEST_TIME'];
147 if(!$oDB->isColumnExists(
'menu_item',
'is_shortcut'))
153 $lang->menu_gnb_sub = $oAdminAdminModel->getAdminMenuLang();
155 $result = $oAdminAdminModel->checkAdminMenu();
156 include $result->php_file;
165 foreach((array) $moduleActionInfo->menu as $key => $value)
167 if(isset($value->acts) && is_array($value->acts) && in_array($currentAct, $value->acts))
169 $subMenuTitle = $value->title;
176 foreach((array) $menu->list as $parentKey => $parentMenu)
178 if(!is_array($parentMenu[
'list']) || !count($parentMenu[
'list']))
182 if($parentMenu[
'href'] ==
'#' && count($parentMenu[
'list']))
184 $firstChild = current($parentMenu[
'list']);
185 $menu->list[$parentKey][
'href'] = $firstChild[
'href'];
188 foreach($parentMenu[
'list'] as $childKey => $childMenu)
190 if($subMenuTitle == $childMenu[
'text'] && $parentSrl == 0)
192 $parentSrl = $childMenu[
'parent_srl'];
199 $gnbTitleInfo =
new stdClass();
200 $gnbTitleInfo->adminTitle = $objConfig->adminTitle ? $objConfig->adminTitle :
'XE Admin';
201 $gnbTitleInfo->adminLogo = $objConfig->adminLogo ? $objConfig->adminLogo :
'modules/admin/tpl/img/xe.h1.png';
203 $browserTitle = ($subMenuTitle ? $subMenuTitle :
'Dashboard') .
' - ' . $gnbTitleInfo->adminTitle;
207 $output = $oAdminAdminModel->getFavoriteList(0,
true);
214 if(!file_exists($cache_file) || filemtime($cache_file) + 60 * 60 < $_SERVER[
'REQUEST_TIME'])
222 if(file_exists($cache_file))
227 $item = $buff->zbxe_news->item;
232 $item = array($item);
235 foreach($item as $key => $val)
237 $obj =
new stdClass();
238 $obj->title = $val->body;
239 $obj->date = $val->attrs->date;
240 $obj->url = $val->attrs->url;
244 if(isset($news) && is_array($news))
249 Context::set(
'released_version', $buff->zbxe_news->attrs->released_version);
250 Context::set(
'download_link', $buff->zbxe_news->attrs->download_link);
270 $args =
new stdClass();
271 $args->date = date(
"Ymd000000", $_SERVER[
'REQUEST_TIME'] - 60 * 60 * 24);
272 $today = date(
"Ymd");
276 $status =
new stdClass();
277 $status->member =
new stdClass();
278 $status->member->todayCount = $oMemberAdminModel->getMemberCountByDate($today);
279 $status->member->totalCount = $oMemberAdminModel->getMemberCountByDate();
283 $statusList = array(
'PUBLIC',
'SECRET');
284 $status->document =
new stdClass();
285 $status->document->todayCount = $oDocumentAdminModel->getDocumentCountByDate($today, array(), $statusList);
286 $status->document->totalCount = $oDocumentAdminModel->getDocumentCountByDate(
'', array(), $statusList);
292 $columnList = array(
'document_srl',
'module_srl',
'category_srl',
'title',
'nick_name',
'member_srl');
293 $args->list_count = 5;
299 $oCommentModel =
getModel(
'comment');
300 $columnList = array(
'comment_srl',
'module_srl',
'document_srl',
'content',
'nick_name',
'member_srl');
301 $args =
new stdClass();
302 $args->list_count = 5;
303 $output = $oCommentModel->getNewestCommentList(
$args, $columnList);
306 foreach(
$output AS $key => $value)
308 $value->content = strip_tags($value->content);
317 if(is_array($module_list))
321 foreach($module_list AS $key => $value)
323 if($value->need_install)
327 if($value->need_update)
336 $needUpdateList = $oAutoinstallAdminModel->getNeedUpdateList();
338 if(is_array($needUpdateList))
340 foreach($needUpdateList AS $key => $value)
342 $helpUrl =
'./admin/help/index.html#';
346 $helpUrl .=
'UMAN_terminology_addon';
350 $helpUrl .=
'UMAN_terminology_layout';
353 $helpUrl .=
'UMAN_terminology_module';
356 $helpUrl .=
'UMAN_terminology_widget';
359 $helpUrl .=
'UMAN_terminology_widgetstyle';
364 $needUpdateList[$key]->helpUrl = $helpUrl;
370 $counterAddonActivated = $oAddonAdminModel->isActivatedAddon(
'counter', $site_module_info->site_srl );
371 if(!$counterAddonActivated)
373 $columnList = array(
'member_srl',
'nick_name',
'user_name',
'user_id',
'email_address');
374 $args =
new stdClass;
376 $args->list_count = 5;
387 Context::set(
'counterAddonActivated', $counterAddonActivated);
390 $oSecurity->encodeHTML(
'module_list..',
'module_list..author..',
'newVersionList..');
393 $mainVersion = join(
'.', array_slice(explode(
'.',
__XE_VERSION__), 0, 2));
395 $isEnviromentGatheringAgreement = FALSE;
396 if(file_exists($path))
398 $isEnviromentGatheringAgreement = TRUE;
400 Context::set(
'isEnviromentGatheringAgreement', $isEnviromentGatheringAgreement);
403 $isLicenseAgreement = FALSE;
405 $isLicenseAgreement = FALSE;
406 if(file_exists($path))
408 $isLicenseAgreement = TRUE;
410 Context::set(
'isLicenseAgreement', $isLicenseAgreement);
428 if(strpos($db_info->default_url,
'xn--') !== FALSE)
437 if(!$db_info->sitelock_title) $db_info->sitelock_title =
'Maintenance in progress...';
438 if(!in_array(
'127.0.0.1', $db_info->sitelock_whitelist)) $db_info->sitelock_whitelist[] =
'127.0.0.1';
439 if(!in_array($_SERVER[
'REMOTE_ADDR'], $db_info->sitelock_whitelist)) $db_info->sitelock_whitelist[] = $_SERVER[
'REMOTE_ADDR'];
440 $db_info->sitelock_whitelist = array_unique($db_info->sitelock_whitelist);
443 Context::set(
'sitelock_title', $db_info->sitelock_title);
444 Context::set(
'sitelock_message', htmlspecialchars($db_info->sitelock_message, ENT_COMPAT | ENT_HTML401,
'UTF-8',
false));
446 $whitelist = implode(
"\r\n", $db_info->sitelock_whitelist);
450 if($db_info->admin_ip_list) $admin_ip_list = implode(
"\r\n", $db_info->admin_ip_list);
451 else $admin_ip_list =
'';
457 $favicon_url = $oAdminModel->getFaviconUrl();
458 $mobicon_url = $oAdminModel->getMobileIconUrl();
459 Context::set(
'favicon_url', $favicon_url.
'?'.$_SERVER[
'REQUEST_TIME']);
460 Context::set(
'mobicon_url', $mobicon_url.
'?'.$_SERVER[
'REQUEST_TIME']);
464 Context::set(
'thumbnail_type', $config->thumbnail_type);
470 Context::set(
'htmlFooter', htmlspecialchars($config->htmlFooter));
473 require_once(
_XE_PATH_ .
'classes/security/EmbedFilter.class.php');
475 context::set(
'embed_white_object', implode(PHP_EOL, $oEmbedFilter->whiteUrlList));
476 context::set(
'embed_white_iframe', implode(PHP_EOL, $oEmbedFilter->whiteIframeUrlList));
478 $columnList = array(
'modules.mid',
'modules.browser_title',
'sites.index_module_srl');
486 $security->encodeHTML(
'news..',
'released_version',
'download_link',
'selected_lang',
'module_list..',
'module_list..author..',
'addon_list..',
'addon_list..author..',
'start_module.');
499 Context::set(
'sftp_support', function_exists(ssh2_sftp));
518 $output = $oMenuAdminModel->getMenuByTitle($oAdmin->getAdminMenuName());
537 $server =
'http://collect.xpressengine.com/env/img.php?';
538 $path =
'./files/env/';
539 $install_env = $path .
'install';
540 $mainVersion = join(
'.', array_slice(explode(
'.',
__XE_VERSION__), 0, 2));
545 $params = $oAdminAdminModel->getEnv(
'INSTALL');
546 $img = sprintf(
'<img src="%s" alt="" style="height:0px;width:0px" />', $server . $params);
553 if($_SESSION[
'enviroment_gather'] ==
'Y')
556 $params = $oAdminAdminModel->getEnv();
557 $img = sprintf(
'<img src="%s" alt="" style="height:0px;width:0px" />', $server . $params);
562 unset($_SESSION[
'enviroment_gather']);
575 $envInfo = $oAdminModel->getEnv();
576 $tmp = explode(
"&", $envInfo);
578 $xe_check_env = array();
579 foreach($tmp as $value) {
580 $arr = explode(
"=", $value);
581 if($arr[0]==
"type") {
583 }elseif($arr[0]==
"phpext" ) {
584 $str = urldecode($arr[1]);
585 $xe_check_env[$arr[0]]= str_replace(
"|",
", ", $str);
586 } elseif($arr[0]==
"module" ) {
587 $str = urldecode($arr[1]);
588 $arrModuleName = explode(
"|", $str);
591 foreach($arrModuleName as $moduleName) {
593 $mInfo[] =
"{$moduleName}({$moduleInfo->version})";
595 $xe_check_env[$arr[0]]= join(
", ", $mInfo);
596 } elseif($arr[0]==
"addon") {
597 $str = urldecode($arr[1]);
598 $arrAddonName = explode(
"|", $str);
601 foreach($arrAddonName as $addonName) {
602 $addonInfo = $oAddonModel->getAddonInfoXml($addonName);
603 $mInfo[] =
"{$addonName}({$addonInfo->version})";
605 $xe_check_env[$arr[0]]= join(
", ", $mInfo);
606 } elseif($arr[0]==
"widget") {
607 $str = urldecode($arr[1]);
608 $arrWidgetName = explode(
"|", $str);
611 foreach($arrWidgetName as $widgetName) {
612 $widgetInfo = $oWidgetModel->getWidgetInfo($widgetName);
613 $mInfo[] =
"{$widgetName}({$widgetInfo->version})";
615 $xe_check_env[$arr[0]]= join(
", ", $mInfo);
616 } elseif($arr[0]==
"widgetstyle") {
617 $str = urldecode($arr[1]);
618 $arrWidgetstyleName = explode(
"|", $str);
621 foreach($arrWidgetstyleName as $widgetstyleName) {
622 $widgetstyleInfo = $oWidgetModel->getWidgetStyleInfo($widgetstyleName);
623 $mInfo[] =
"{$widgetstyleName}({$widgetstyleInfo->version})";
625 $xe_check_env[$arr[0]]= join(
", ", $mInfo);
627 } elseif($arr[0]==
"layout") {
628 $str = urldecode($arr[1]);
629 $arrLayoutName = explode(
"|", $str);
632 foreach($arrLayoutName as $layoutName) {
633 $layoutInfo = $oLayoutModel->getLayoutInfo($layoutName);
634 $mInfo[] =
"{$layoutName}({$layoutInfo->version})";
636 $xe_check_env[$arr[0]]= join(
", ", $mInfo);
638 $xe_check_env[$arr[0]] = urldecode($arr[1]);
641 $info[
'XE_Check_Evn'] = $xe_check_env;
643 $ini_info = ini_get_all();
645 $php_core[
'max_file_uploads'] =
"{$ini_info['max_file_uploads']['local_value']}";
646 $php_core[
'post_max_size'] =
"{$ini_info['post_max_size']['local_value']}";
647 $php_core[
'memory_limit'] =
"{$ini_info['memory_limit']['local_value']}";
648 $info[
'PHP_Core'] = $php_core;
650 $str_info =
"[XE Server Environment " . date(
"Y-m-d") .
"]\n\n";
651 $str_info .=
"realpath : ".realpath(
'./').
"\n";
652 foreach( $info as $key=>$value )
654 if( is_array( $value ) ==
false ) {
655 $str_info .=
"{$key} : {$value}\n";
658 foreach( $value as $key2=>$value2 )
659 $str_info .=
"{$key2} : {$value2}\n";
670 $useRewrite = $oInstallController->checkRewriteUsable() ?
'Y' :
'N';
671 $_SESSION[
'use_rewrite'] = $useRewrite;
675 if($useRewrite ==
'N' && stripos($_SERVER[
'SERVER_SOFTWARE'],
'nginx') !==
false)
Context::set(
'use_nginx',
'Y');
677 Context::set(
'useable', $oInstallController->checkInstallEnv());
setTemplateFile($filename)
getController($module_name)
dispAdminCheckServerEnv()
if(file_exists(_XE_PATH_. 'config/config.user.inc.php')) if(!defined('__DEBUG__')) if(!defined('__DEBUG_OUTPUT__')) if(!defined('__DEBUG_PROTECT__')) if(!defined('__DEBUG_PROTECT_IP__')) if(!defined('__DEBUG_DB_OUTPUT__')) if(!defined('__LOG_SLOW_QUERY__')) if(!defined('__LOG_SLOW_TRIGGER__')) if(!defined('__LOG_SLOW_ADDON__')) if(!defined('__LOG_SLOW_WIDGET__')) if(!defined('__DEBUG_QUERY__')) if(!defined('__OB_GZHANDLER_ENABLE__')) if(!defined('__ENABLE_PHPUNIT_TEST__')) if(!defined('__PROXY_SERVER__')) if(!defined('__ERROR_LOG__')) if(!defined('__DISABLE_DEFAULT_CSS__')) if(!defined('__AUTO_OPCACHE_INVALIDATE__')) if((__DEBUG_OUTPUT__==2)&&version_compare(PHP_VERSION, '6.0.0')===-1) if(version_compare(PHP_VERSION, '5.3.0') >=0) $GLOBALS['__xe_autoload_file_map']
set($key, $val, $set_to_get_vars=0)
writeFile($filename, $buff, $mode="w")
setBrowserTitle($site_title)
getRemoteResource($url, $body=null, $timeout=3, $method= 'GET', $content_type=null, $headers=array(), $cookies=array(), $post_data=array(), $request_config=array())
const _XE_DOWNLOAD_SERVER_
makeGnbUrl($module= 'admin')
_markingCheckEasyinstall()
getRemoteFile($url, $target_filename, $body=null, $timeout=3, $method= 'GET', $content_type=null, $headers=array(), $cookies=array(), $post_data=array(), $request_config=array())
getAdminModel($module_name)
getInstance($db_type=NULL)
getAdminController($module_name)
executeQuery($query_id, $args=NULL, $arg_columns=NULL)
$module
Class name of Xe Module that is identified by mid.
if(isset($_REQUEST['encode'])) if(isset($_REQUEST['decode'])) $lang