MODx.page.SystemInfo=function(A){A=A||{};Ext.applyIf(A,{components:[{xtype:"modx-panel-system-info",renderTo:"modx-panel-system-info-div",data:A.data}]});MODx.page.SystemInfo.superclass.constructor.call(this,A);};Ext.extend(MODx.page.SystemInfo,MODx.Component);Ext.reg("modx-page-system-info",MODx.page.SystemInfo);var viewPHPInfo=function(){window.location.href=MODx.config.connectors_url+"system/phpinfo.php?HTTP_MODAUTH="+MODx.siteId;};MODx.panel.SystemInfo=function(A){A=A||{};var B=[{html:"<p>"+_("sysinfo_desc")+"</p>",id:"modx-sysinfo-msg"},{xtype:"statictextfield",fieldLabel:_("modx_version"),name:"modx_version"},{xtype:"statictextfield",fieldLabel:_("version_codename"),name:"code_name"},{html:'<a href="javascript:;" onclick="viewPHPInfo();return false;">'+_("view")+"</a>",fieldLabel:"phpinfo()",name:"phpinfo",value:""},{xtype:"statictextfield",fieldLabel:_("servertime"),name:"servertime"},{xtype:"statictextfield",fieldLabel:_("localtime"),name:"localtime"},{xtype:"statictextfield",fieldLabel:_("serveroffset"),name:"serveroffset"},{html:"<hr />"},{xtype:"statictextfield",fieldLabel:_("extjs_version"),name:"extjs_version",value:"3.3.0"},{xtype:"statictextfield",fieldLabel:_("smarty_version"),name:"smarty_version",value:"3.0.4"},{xtype:"statictextfield",fieldLabel:_("phpmailer_version"),name:"phpmailer_version",value:"2.0.4"},{xtype:"statictextfield",fieldLabel:_("magpie_version"),name:"magpie_version",value:"0.7a"},{html:"<hr />"},{xtype:"statictextfield",fieldLabel:_("database_type"),name:"database_type"},{xtype:"statictextfield",fieldLabel:_("database_version"),name:"database_version"},{xtype:"statictextfield",fieldLabel:_("database_charset"),name:"database_charset"},{xtype:"statictextfield",fieldLabel:_("database_name"),name:"database_name"},{xtype:"statictextfield",fieldLabel:_("database_server"),name:"database_server"},{xtype:"statictextfield",fieldLabel:_("table_prefix"),name:"table_prefix"}];if(A.data){for(var D in A.data){B.push({html:"<hr />"});for(var C in A.data[D]){B.push({xtype:"statictextfield",fieldLabel:C,name:C,value:A.data[D][C]});}}}Ext.applyIf(A,{id:"modx-panel-system-info",url:MODx.config.connectors_url+"system/index.php",layout:"fit",items:[{html:"<h2>"+_("view_sysinfo")+"</h2>",id:"modx-error-log-header",cls:"modx-page-header",border:false,anchor:"100%"},MODx.getPageStructure([{title:_("view_sysinfo"),bodyStyle:"padding: 15px;",layout:"form",id:"modx-plugin-form",labelWidth:230,defaults:{border:false,msgTarget:"side",anchor:"97%"},items:B},{title:_("db_header"),bodyStyle:"padding: 15px;",id:"modx-sysinfo-dbtables",items:[{html:"<p>"+_("db_info")+"</p>",id:"modx-sysinfo-dbtables-msg",border:false},{xtype:"modx-grid-databasetables",preventRender:true}]},{title:_("recent_docs"),bodyStyle:"padding: 15px;",id:"modx-sysinfo-recent-docs",items:[{html:"<p>"+_("sysinfo_activity_message")+"</p>",id:"modx-sysinfo-recent-docs-msg",border:false},{xtype:"modx-grid-resource-active",title:_("recent_docs"),preventRender:true}]}])],listeners:{setup:{fn:this.setup,scope:this},success:{fn:this.success,scope:this},beforeSubmit:{fn:this.beforeSubmit,scope:this}}});MODx.panel.SystemInfo.superclass.constructor.call(this,A);};Ext.extend(MODx.panel.SystemInfo,MODx.FormPanel,{initialized:false,setup:function(){if(this.config.plugin===""||this.config.plugin===0||this.initialized){this.fireEvent("ready");return false;}MODx.Ajax.request({url:this.config.url,params:{action:"info"},listeners:{success:{fn:function(A){this.getForm().setValues(A.object);this.initialized=true;},scope:this}}});},beforeSubmit:function(A){},success:function(A){}});Ext.reg("modx-panel-system-info",MODx.panel.SystemInfo);