mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-05 17:51:40 +09:00
add server Env view page
This commit is contained in:
parent
285797e777
commit
33489f6a5b
6 changed files with 161 additions and 0 deletions
|
|
@ -315,6 +315,9 @@ class adminAdminModel extends admin
|
|||
'ext' => array('pcre', 'json', 'hash', 'dom', 'session', 'spl', 'standard', 'date', 'ctype', 'tokenizer', 'apache2handler', 'filter', 'posix', 'reflection', 'pdo')
|
||||
, 'module' => array('addon', 'admin', 'autoinstall', 'comment', 'communication', 'counter', 'document', 'editor', 'file', 'importer', 'install', 'integration_search', 'layout', 'member', 'menu', 'message', 'module', 'opage', 'page', 'point', 'poll', 'rss', 'session', 'spamfilter', 'tag', 'trackback', 'trash', 'widget')
|
||||
, 'addon' => array('autolink', 'blogapi', 'captcha', 'counter', 'member_communication', 'member_extra_info', 'mobile', 'openid_delegation_id', 'point_level_icon', 'resize_image')
|
||||
, 'layout' => array('default')
|
||||
, 'widget' => array('content', 'language_select', 'login_info','mcontent')
|
||||
, 'widgetstyle' => array(),
|
||||
);
|
||||
$info = array();
|
||||
$db_info = Context::getDBInfo();
|
||||
|
|
@ -370,6 +373,45 @@ class adminAdminModel extends admin
|
|||
}
|
||||
$info['addon'] = substr($info['addon'], 1);
|
||||
|
||||
$info['layout'] = "";
|
||||
$oLayoutModel = getModel('layout');
|
||||
$layout_list = $oLayoutModel->getDownloadedLayoutList();
|
||||
foreach($layout_list as $layout)
|
||||
{
|
||||
if(in_array($layout->layout, $skip['layout']))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
$info['layout'] .= '|' . $layout->layout;
|
||||
}
|
||||
$info['layout'] = substr($info['layout'], 1);
|
||||
|
||||
$info['widget'] = "";
|
||||
$oWidgetModel = getModel('widget');
|
||||
$widget_list = $oWidgetModel->getDownloadedWidgetList();
|
||||
foreach($widget_list as $widget)
|
||||
{
|
||||
if(in_array($widget->widget, $skip['widget']))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
$info['widget'] .= '|' . $widget->widget;
|
||||
}
|
||||
$info['widget'] = substr($info['widget'], 1);
|
||||
|
||||
$info['widgetstyle'] = "";
|
||||
$oWidgetModel = getModel('widget');
|
||||
$widgetstyle_list = $oWidgetModel->getDownloadedWidgetStyleList();
|
||||
foreach($widgetstyle_list as $widgetstyle)
|
||||
{
|
||||
if(in_array($widgetstyle->widgetStyle, $skip['widgetstyle']))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
$info['widgetstyle'] .= '|' . $widgetstyle->widgetStyle;
|
||||
}
|
||||
$info['widgetstyle'] = substr($info['widgetstyle'], 1);
|
||||
|
||||
$param = '';
|
||||
foreach($info as $k => $v)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -534,6 +534,106 @@ class adminAdminView extends admin
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrun server environment to XML string
|
||||
* @return object
|
||||
*/
|
||||
function dispAdminViewServerEnv()
|
||||
{
|
||||
$info = array();
|
||||
|
||||
$oAdminModel = getAdminModel('admin');
|
||||
$envInfo = $oAdminModel->getEnv();
|
||||
$tmp = explode("&", $envInfo);
|
||||
$arrInfo = array();
|
||||
$xe_check_env = array();
|
||||
foreach($tmp as $value) {
|
||||
$arr = explode("=", $value);
|
||||
if($arr[0]=="type") {
|
||||
continue;
|
||||
}elseif($arr[0]=="phpext" ) {
|
||||
$str = urldecode($arr[1]);
|
||||
$xe_check_env[$arr[0]]= str_replace("|", ", ", $str);
|
||||
} elseif($arr[0]=="module" ) {
|
||||
$str = urldecode($arr[1]);
|
||||
$arrModuleName = explode("|", $str);
|
||||
$oModuleModel = getModel("module");
|
||||
$mInfo = array();
|
||||
foreach($arrModuleName as $moduleName) {
|
||||
$moduleInfo = $oModuleModel->getModuleInfoXml($moduleName);
|
||||
$mInfo[] = "{$moduleName}({$moduleInfo->version})";
|
||||
}
|
||||
$xe_check_env[$arr[0]]= join(", ", $mInfo);
|
||||
} elseif($arr[0]=="addon") {
|
||||
$str = urldecode($arr[1]);
|
||||
$arrAddonName = explode("|", $str);
|
||||
$oAddonModel = getAdminModel("addon");
|
||||
$mInfo = array();
|
||||
foreach($arrAddonName as $addonName) {
|
||||
$addonInfo = $oAddonModel->getAddonInfoXml($addonName);
|
||||
$mInfo[] = "{$addonName}({$addonInfo->version})";
|
||||
}
|
||||
$xe_check_env[$arr[0]]= join(", ", $mInfo);
|
||||
} elseif($arr[0]=="widget") {
|
||||
$str = urldecode($arr[1]);
|
||||
$arrWidgetName = explode("|", $str);
|
||||
$oWidgetModel = getModel("widget");
|
||||
$mInfo = array();
|
||||
foreach($arrWidgetName as $widgetName) {
|
||||
$widgetInfo = $oWidgetModel->getWidgetInfo($widgetName);
|
||||
$mInfo[] = "{$widgetName}({$widgetInfo->version})";
|
||||
}
|
||||
$xe_check_env[$arr[0]]= join(", ", $mInfo);
|
||||
} elseif($arr[0]=="widgetstyle") {
|
||||
$str = urldecode($arr[1]);
|
||||
$arrWidgetstyleName = explode("|", $str);
|
||||
$oWidgetModel = getModel("widget");
|
||||
$mInfo = array();
|
||||
foreach($arrWidgetstyleName as $widgetstyleName) {
|
||||
$widgetstyleInfo = $oWidgetModel->getWidgetStyleInfo($widgetstyleName);
|
||||
$mInfo[] = "{$widgetstyleName}({$widgetstyleInfo->version})";
|
||||
}
|
||||
$xe_check_env[$arr[0]]= join(", ", $mInfo);
|
||||
|
||||
} elseif($arr[0]=="layout") {
|
||||
$str = urldecode($arr[1]);
|
||||
$arrLayoutName = explode("|", $str);
|
||||
$oLayoutModel = getModel("layout");
|
||||
$mInfo = array();
|
||||
foreach($arrLayoutName as $layoutName) {
|
||||
$layoutInfo = $oLayoutModel->getLayoutInfo($layoutName);
|
||||
$mInfo[] = "{$layoutName}({$layoutInfo->version})";
|
||||
}
|
||||
$xe_check_env[$arr[0]]= join(", ", $mInfo);
|
||||
} else {
|
||||
$xe_check_env[$arr[0]] = urldecode($arr[1]);
|
||||
}
|
||||
}
|
||||
$info['XE_Check_Evn'] = $xe_check_env;
|
||||
|
||||
$ini_info = ini_get_all();
|
||||
$php_core = array();
|
||||
$php_core['max_file_uploads'] = "{$ini_info['max_file_uploads']['local_value']}";
|
||||
$php_core['post_max_size'] = "{$ini_info['post_max_size']['local_value']}";
|
||||
$php_core['memory_limit'] = "{$ini_info['memory_limit']['local_value']}";
|
||||
$info['PHP_Core'] = $php_core;
|
||||
|
||||
$str_info = "[XE Server Environment " . date("Y-m-d") . "]\n\n";
|
||||
foreach( $info as $key=>$value )
|
||||
{
|
||||
if( is_array( $value ) == false ) {
|
||||
$str_info .= "{$key} : {$value}\n";
|
||||
} else {
|
||||
//$str_info .= "\n{$key} \n";
|
||||
foreach( $value as $key2=>$value2 )
|
||||
$str_info .= "{$key2} : {$value2}\n";
|
||||
}
|
||||
}
|
||||
|
||||
Context::set('str_info', $str_info);
|
||||
$this->setTemplateFile('server_env.html');
|
||||
}
|
||||
|
||||
}
|
||||
/* End of file admin.admin.view.php */
|
||||
/* Location: ./modules/admin/admin.admin.view.php */
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@
|
|||
<action name="dispAdminConfigGeneral" type="view" menu_name="adminConfigurationGeneral" menu_index="true" />
|
||||
<action name="dispAdminConfigFtp" type="view" menu_name="adminConfigurationFtp" menu_index="true" />
|
||||
<action name="dispAdminSetup" type="view" menu_name="adminMenuSetup" menu_index="true" />
|
||||
<action name="dispAdminViewServerEnv" type="view" />
|
||||
|
||||
<action name="procAdminRemoveIcons" type="controller" />
|
||||
<action name="procAdminRecompileCacheFile" type="controller" />
|
||||
|
|
|
|||
|
|
@ -1240,6 +1240,15 @@
|
|||
<value xml:lang="zh-CN"><![CDATA[请确认是否初始化后台菜单]]></value>
|
||||
<value xml:lang="tr"><![CDATA[Admin menüsünü başlatmak istediğinize emin misiniz?]]></value>
|
||||
</item>
|
||||
<item name="cmd_view_server_env">
|
||||
<value xml:lang="ko"><![CDATA[서버정보출력]]></value>
|
||||
<value xml:lang="en"><![CDATA[View Server Env]]></value>
|
||||
</item>
|
||||
<item name="server_env">
|
||||
<value xml:lang="ko"><![CDATA[서버 정보]]></value>
|
||||
<value xml:lang="en"><![CDATA[Server Environment]]></value>
|
||||
</item>
|
||||
|
||||
<item name="ftp_form_title">
|
||||
<value xml:lang="ko"><![CDATA[FTP 계정 정보 입력]]></value>
|
||||
<value xml:lang="en"><![CDATA[FTP Account Information]]></value>
|
||||
|
|
|
|||
|
|
@ -10,6 +10,7 @@
|
|||
<button type="button" class="x_btn-link" onclick="doResetAdminMenu();">{$lang->cmd_admin_menu_reset}</button> <span class="vr">|</span>
|
||||
<button type="button" class="x_btn-link" onclick="doRecompileCacheFile();">{$lang->cmd_remake_cache}</button> <span class="vr">|</span>
|
||||
<button type="button" class="x_btn-link" onclick="doClearSession();">{$lang->cmd_clear_session}</button> <span class="vr">|</span>
|
||||
<a href="./index.php?module=admin&act=dispAdminViewServerEnv">{$lang->cmd_view_server_env}</a> <span class="vr">|</span>
|
||||
<a href="https://github.com/xpressengine/xe-core/issues" target="_blank" style="vertical-align:middle">{$lang->bug_report}</a>
|
||||
</p>
|
||||
</footer>
|
||||
|
|
|
|||
8
modules/admin/tpl/server_env.html
Normal file
8
modules/admin/tpl/server_env.html
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
<load target="./js/menu_setup.js" usecdn="true" />
|
||||
<div class="x_page-header">
|
||||
<h1>{$lang->server_env}</h1>
|
||||
</div>
|
||||
|
||||
<section class="section">
|
||||
<textarea style="width:96%;height:400px;">{$str_info}</textarea>
|
||||
</section>
|
||||
Loading…
Add table
Add a link
Reference in a new issue