1 | <?php
|
---|
2 | // $Id: xoops_version.php,v 1.8 2005/06/03 01:35:02 phppp Exp $
|
---|
3 | // ------------------------------------------------------------------------ //
|
---|
4 | // XOOPS - PHP Content Management System //
|
---|
5 | // Copyright (c) 2000 XOOPS.org //
|
---|
6 | // <http://www.xoops.org/> //
|
---|
7 | // ------------------------------------------------------------------------ //
|
---|
8 | // This program is free software; you can redistribute it and/or modify //
|
---|
9 | // it under the terms of the GNU General Public License as published by //
|
---|
10 | // the Free Software Foundation; either version 2 of the License, or //
|
---|
11 | // (at your option) any later version. //
|
---|
12 | // //
|
---|
13 | // You may not change or alter any portion of this comment or credits //
|
---|
14 | // of supporting developers from this source code or any supporting //
|
---|
15 | // source code which is considered copyrighted (c) material of the //
|
---|
16 | // original comment or credit authors. //
|
---|
17 | // //
|
---|
18 | // This program is distributed in the hope that it will be useful, //
|
---|
19 | // but WITHOUT ANY WARRANTY; without even the implied warranty of //
|
---|
20 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
|
---|
21 | // GNU General Public License for more details. //
|
---|
22 | // //
|
---|
23 | // You should have received a copy of the GNU General Public License //
|
---|
24 | // along with this program; if not, write to the Free Software //
|
---|
25 | // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA //
|
---|
26 | // ------------------------------------------------------------------------ //
|
---|
27 | // Author: phppp (D.J.) //
|
---|
28 | // URL: http://xoopsforge.com, http://xoops.org.cn //
|
---|
29 | // ------------------------------------------------------------------------- //
|
---|
30 | //include_once 'cp_functions.php';
|
---|
31 | include_once('./../../../include/cp_header.php');
|
---|
32 | xoops_cp_header();
|
---|
33 | include(dirname(__FILE__) . '/../wp-includes/version.php');
|
---|
34 |
|
---|
35 | echo "
|
---|
36 | <style type=\"text/css\">
|
---|
37 | label,text {
|
---|
38 | display: block;
|
---|
39 | float: left;
|
---|
40 | margin-bottom: 2px;
|
---|
41 | }
|
---|
42 | label {
|
---|
43 | text-align: right;
|
---|
44 | width: 200px;
|
---|
45 | padding-right: 20px;
|
---|
46 | }
|
---|
47 | br {
|
---|
48 | clear: left;
|
---|
49 | }
|
---|
50 | </style>
|
---|
51 | ";
|
---|
52 |
|
---|
53 | echo "<fieldset><legend style='font-weight: bold; color: #900;'>" . _AM_SYSTEM_INFO . "</legend>";
|
---|
54 | echo "<div style='padding: 8px;'>";
|
---|
55 | echo "<label>" . "<strong>SERVER:</strong>" . ":</label><text>" . $_SERVER['SERVER_SOFTWARE'] . "</text><br />";
|
---|
56 | echo "<label>" . "<strong>PHP Version:</strong>" . ":</label><text>" . phpversion() . "</text><br />";
|
---|
57 | echo "<label>" . "<strong>MySQL Version:</strong>" . ":</label><text>" . mysql_get_server_info() . "</text><br />";
|
---|
58 | echo "<label>" . "<strong>XOOPS Version:</strong>" . ":</label><text>" . XOOPS_VERSION . "</text><br />";
|
---|
59 | echo "<label>" . "<strong>XPressME Version:</strong>" . ":</label><text>" . $xoopsModule->getInfo('version') . ' ' . $xoopsModule->getInfo('codename') . "</text><br />";
|
---|
60 | echo "<label>" . "<strong>WordPress Version:</strong>" . ":</label><text>" . $wp_version . "</text><br />";
|
---|
61 | echo "<label>" . "<strong>WP DB Version:</strong>" . ":</label><text>" . $wp_db_version . "</text><br />";
|
---|
62 |
|
---|
63 | echo "</div>";
|
---|
64 | echo "<div style='padding: 8px;'>";
|
---|
65 | echo "<label>safemode:</label><text>";
|
---|
66 | echo ( ini_get( 'safe_mode' ) ) ? "ON" : "OFF";
|
---|
67 | echo "</text><br />";
|
---|
68 | echo "<label>register_globals:</label><text>";
|
---|
69 | echo ( ini_get( 'register_globals' )) ? "ON" : "OFF";
|
---|
70 | echo "</text><br />";
|
---|
71 | echo "<label>magic_quotes_gpc:</label><text>";
|
---|
72 | echo ( ini_get( 'magic_quotes_gpc' )) ? "ON" : "OFF";
|
---|
73 | echo "</text><br />";
|
---|
74 | echo "<label>XML extension:</label><text>";
|
---|
75 | echo ( extension_loaded( 'xml' )) ? "ON" : "OFF";
|
---|
76 | echo "</text><br />";
|
---|
77 | echo "<label>memory_limit:</label><text>";
|
---|
78 | echo ini_get( 'memory_limit' );
|
---|
79 | echo "</text><br />";
|
---|
80 | echo "<label>post_max_size:</label><text>";
|
---|
81 | echo ini_get( 'post_max_size' );
|
---|
82 | echo "</text><br />";
|
---|
83 | echo "<label>upload_max_filesize:</label><text>";
|
---|
84 | echo ini_get( 'upload_max_filesize' );
|
---|
85 | echo "</text><br />";
|
---|
86 | echo "<label>display_errors:</label><text>";
|
---|
87 | echo ( ini_get( 'display_errors' )) ? "ON" : "OFF";
|
---|
88 | echo "</text><br />";
|
---|
89 | echo "<label>MB extension:</label><text>";
|
---|
90 | echo ( extension_loaded( 'mbstring' )) ? "ON" : "OFF";
|
---|
91 | echo "</text><br />";
|
---|
92 | echo "<label>mbstring.language:</label><text>";
|
---|
93 | echo ini_get( 'mbstring.language' );
|
---|
94 | echo "</text><br />";
|
---|
95 | echo "<label>mbstring.encoding_translation:</label><text>";
|
---|
96 | echo ( ini_get( 'mbstring.encoding_translation' )) ? "ON" : "OFF";
|
---|
97 | echo "</text><br />";
|
---|
98 | echo "<label>mbstring.internal_encoding:</label><text>";
|
---|
99 | echo ini_get( 'mbstring.internal_encoding' );
|
---|
100 | echo "</text><br />";
|
---|
101 | echo "<label>mbstring.http_input:</label><text>";
|
---|
102 | echo ini_get( 'mbstring.http_input' );
|
---|
103 | echo "</text><br />";
|
---|
104 | echo "<label>mbstring.http_output:</label><text>";
|
---|
105 | echo ini_get( 'mbstring.http_output' );
|
---|
106 | echo "</text><br />";
|
---|
107 | echo "<label>mbstring.detect_order:</label><text>";
|
---|
108 | echo ini_get( 'mbstring.detect_order' );
|
---|
109 | echo "</text><br />";
|
---|
110 | echo "<label>mbstring.substitute_character:</label><text>";
|
---|
111 | echo ini_get( 'mbstring.substitute_character' );
|
---|
112 | echo "</text><br />";
|
---|
113 | echo "<label>mbstring.func_overload:</label><text>";
|
---|
114 | echo ( ini_get( 'mbstring.func_overload' )) ? "ON" : "OFF";
|
---|
115 | echo "</text><br />";
|
---|
116 | echo "</div>";
|
---|
117 | echo "</fieldset><br />";
|
---|
118 |
|
---|
119 | require_once dirname(dirname( __FILE__ )).'/class/config_from_xoops.class.php' ;
|
---|
120 | $xoops_config = new ConfigFromXoops;
|
---|
121 | echo "<fieldset><legend style='font-weight: bold; color: #900;'>" . _AM_XOOPS_CONFIG_INFO . "</legend>";
|
---|
122 | echo "<div style='padding: 8px;'>";
|
---|
123 | echo '<table width="400" cellspacing="1" cellpadding="1" border="1">';
|
---|
124 | echo '<tbody>';
|
---|
125 | echo '<tr>';
|
---|
126 | echo '<td>Define</td>';
|
---|
127 | echo '<td>XOOPS</td>';
|
---|
128 | echo '<td>xoops_config</td>';
|
---|
129 | echo '</tr>';
|
---|
130 | echo '<tr>';
|
---|
131 | if(XOOPS_ROOT_PATH !== $xoops_config->xoops_root_path)
|
---|
132 | echo '<td><strong><span style="color: rgb(255, 0, 0);">XOOPS_ROOT_PATH</span></strong></td>';
|
---|
133 | else
|
---|
134 | echo '<td>XOOPS_ROOT_PATH</td>';
|
---|
135 | echo '<td>' . XOOPS_ROOT_PATH . '</td>';
|
---|
136 | echo '<td>' . $xoops_config->xoops_root_path . '</td>';
|
---|
137 | echo '</tr>';
|
---|
138 |
|
---|
139 | echo '<tr>';
|
---|
140 | if(XOOPS_TRUST_PATH !== $xoops_config->xoops_trust_path)
|
---|
141 | echo '<td><strong><span style="color: rgb(255, 0, 0);">XOOPS_TRUST_PATH</span></strong></td>';
|
---|
142 | else
|
---|
143 | echo '<td>XOOPS_TRUST_PATH</td>';
|
---|
144 | echo '<td>' . XOOPS_TRUST_PATH . '</td>';
|
---|
145 | echo '<td>' . $xoops_config->xoops_trust_path . '</td>';
|
---|
146 | echo '</tr>';
|
---|
147 |
|
---|
148 | echo '<tr>';
|
---|
149 | if(XOOPS_URL !== $xoops_config->xoops_url)
|
---|
150 | echo '<td><strong><span style="color: rgb(255, 0, 0);">XOOPS_URL</span></strong></td>';
|
---|
151 | else
|
---|
152 | echo '<td>XOOPS_URL</td>';
|
---|
153 | echo '<td>' . XOOPS_URL . '</td>';
|
---|
154 | echo '<td>' . $xoops_config->xoops_url . '</td>';
|
---|
155 | echo '</tr>';
|
---|
156 |
|
---|
157 | if (defined('XOOPS_SALT')){
|
---|
158 | echo '<tr>';
|
---|
159 | if(XOOPS_SALT !== $xoops_config->xoops_salt)
|
---|
160 | echo '<td><strong><span style="color: rgb(255, 0, 0);">XOOPS_SALT</span></strong></td>';
|
---|
161 | else
|
---|
162 | echo '<td>XOOPS_SALT</td>';
|
---|
163 | echo '<td>' . XOOPS_SALT . '</td>';
|
---|
164 | echo '<td>' . $xoops_config->xoops_salt . '</td>';
|
---|
165 | echo '</tr>';
|
---|
166 | }
|
---|
167 |
|
---|
168 | if (defined('XOOPS_DB_SALT')){
|
---|
169 | echo '<tr>';
|
---|
170 | if(XOOPS_DB_SALT !== $xoops_config->xoops_db_salt)
|
---|
171 | echo '<td><strong><span style="color: rgb(255, 0, 0);">XOOPS_DB_SALT</span></strong></td>';
|
---|
172 | else
|
---|
173 | echo '<td>XOOPS_DB_SALT</td>';
|
---|
174 | echo '<td>' . XOOPS_DB_SALT . '</td>';
|
---|
175 | echo '<td>' . $xoops_config->xoops_db_salt . '</td>';
|
---|
176 | echo '</tr>';
|
---|
177 | }
|
---|
178 |
|
---|
179 | echo '<tr>';
|
---|
180 | if(XOOPS_DB_HOST !== $xoops_config->xoops_db_host)
|
---|
181 | echo '<td><strong><span style="color: rgb(255, 0, 0);">XOOPS_DB_HOST</span></strong></td>';
|
---|
182 | else
|
---|
183 | echo '<td>XOOPS_DB_HOST</td>';
|
---|
184 | echo '<td>' . XOOPS_DB_HOST . '</td>';
|
---|
185 | echo '<td>' . $xoops_config->xoops_db_host . '</td>';
|
---|
186 | echo '</tr>';
|
---|
187 |
|
---|
188 | echo '<tr>';
|
---|
189 | if(XOOPS_DB_USER !== $xoops_config->xoops_db_user)
|
---|
190 | echo '<td><strong><span style="color: rgb(255, 0, 0);">XOOPS_DB_USER</span></strong></td>';
|
---|
191 | else
|
---|
192 | echo '<td>XOOPS_DB_USER</td>';
|
---|
193 | echo '<td>' . XOOPS_DB_USER . '</td>';
|
---|
194 | echo '<td>' . $xoops_config->xoops_db_user . '</td>';
|
---|
195 | echo '</tr>';
|
---|
196 |
|
---|
197 | echo '<tr>';
|
---|
198 | if(XOOPS_DB_PASS !== $xoops_config->xoops_db_pass)
|
---|
199 | echo '<td><strong><span style="color: rgb(255, 0, 0);">XOOPS_DB_PASS</span></strong></td>';
|
---|
200 | else
|
---|
201 | echo '<td>XOOPS_DB_PASS</td>';
|
---|
202 | echo '<td>' . XOOPS_DB_PASS . '</td>';
|
---|
203 | echo '<td>' . $xoops_config->xoops_db_pass . '</td>';
|
---|
204 | echo '</tr>';
|
---|
205 |
|
---|
206 | echo '<tr>';
|
---|
207 | if(XOOPS_DB_NAME !== $xoops_config->xoops_db_name)
|
---|
208 | echo '<td><strong><span style="color: rgb(255, 0, 0);">XOOPS_DB_NAME</span></strong></td>';
|
---|
209 | else
|
---|
210 | echo '<td>XOOPS_DB_NAME</td>';
|
---|
211 | echo '<td>' . XOOPS_DB_NAME . '</td>';
|
---|
212 | echo '<td>' . $xoops_config->xoops_db_name . '</td>';
|
---|
213 | echo '</tr>';
|
---|
214 |
|
---|
215 | echo '<tr>';
|
---|
216 | if(XOOPS_DB_PREFIX !== $xoops_config->xoops_db_prefix)
|
---|
217 | echo '<td><strong><span style="color: rgb(255, 0, 0);">XOOPS_DB_PREFIX</span></strong></td>';
|
---|
218 | else
|
---|
219 | echo '<td>XOOPS_DB_PREFIX</td>';
|
---|
220 | echo '<td>' . XOOPS_DB_PREFIX . '</td>';
|
---|
221 | echo '<td>' . $xoops_config->xoops_db_prefix . '</td>';
|
---|
222 | echo '</tr>';
|
---|
223 | echo '</tbody>';
|
---|
224 | echo '</table>';
|
---|
225 | echo "</div>";
|
---|
226 | echo "</fieldset><br />";
|
---|
227 |
|
---|
228 | $xp_prefix = $GLOBALS['xoopsModule']->getInfo('dirname');
|
---|
229 | if ($xp_prefix == 'wordpress'){
|
---|
230 | $xp_prefix = 'wp';
|
---|
231 | }
|
---|
232 |
|
---|
233 | $prefix = $xoopsDB->prefix($xp_prefix . '_');
|
---|
234 | $sql = "SELECT COUNT(DISTINCT post_author) AS count_author, COUNT(*) AS count_article FROM ".$prefix . "posts WHERE post_type = 'post' AND (post_status = 'publish' OR post_status = 'private')";
|
---|
235 | $result = $xoopsDB->query($sql);
|
---|
236 | if($myrow = $xoopsDB->fetchArray($result)){
|
---|
237 | $count_article = $myrow["count_article"];
|
---|
238 | $count_author = $myrow["count_author"];
|
---|
239 | }
|
---|
240 |
|
---|
241 | if ($wp_db_version < 6124){
|
---|
242 | $sql = "SELECT COUNT(*) AS count_category FROM ".$xoopsDB->prefix($xp_prefix . "_categories");
|
---|
243 | } else {
|
---|
244 | $sql = "SELECT COUNT(*) AS count_category FROM ".$xoopsDB->prefix($xp_prefix . "_term_taxonomy") . " WHERE taxonomy = 'category'";
|
---|
245 | }
|
---|
246 | $result = $xoopsDB->query($sql);
|
---|
247 | if($myrow = $xoopsDB->fetchArray($result)){
|
---|
248 | $count_category = $myrow["count_category"];
|
---|
249 | }
|
---|
250 |
|
---|
251 | echo "<fieldset><legend style='font-weight: bold; color: #900;'>" . _AM_XPRESS_STATS . "</legend>";
|
---|
252 | echo "<div style='padding: 8px;'>";
|
---|
253 | echo "<label>" . _AM_XPRESS_CATEGORIES .":</label><text>".@$count_category;
|
---|
254 | echo "</text><br />";
|
---|
255 | echo "<label>" . _AM_XPRESS_ARTICLES .":</label><text>". $count_article;
|
---|
256 | echo "</text><br />";
|
---|
257 | echo "<label>" . _AM_XPRESS_AUTHORS .":</label><text>". $count_author;
|
---|
258 | echo "</text>";
|
---|
259 | echo "</div>";
|
---|
260 | echo "</fieldset>";
|
---|
261 | xoops_cp_footer();
|
---|
262 |
|
---|
263 | ?> |
---|