Changeset 107 for trunk/admin
- Timestamp:
- Mar 15, 2009, 12:01:24 AM (16 years ago)
- Location:
- trunk/admin
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/admin/index.php
r61 r107 31 31 include_once('./../../../include/cp_header.php'); 32 32 xoops_cp_header(); 33 echo '<p>Yet Not Make XPressME index Page.</p>'; 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 $xp_prefix = $GLOBALS['xoopsModule']->getInfo('dirname'); 120 if ($xp_prefix == 'wordpress'){ 121 $xp_prefix = 'wp'; 122 } 123 124 $prefix = $xoopsDB->prefix($xp_prefix . '_'); 125 $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')"; 126 $result = $xoopsDB->query($sql); 127 if($myrow = $xoopsDB->fetchArray($result)){ 128 $count_article = $myrow["count_article"]; 129 $count_author = $myrow["count_author"]; 130 } 131 132 if ($wp_db_version < 6124){ 133 $sql = "SELECT COUNT(*) AS count_category FROM ".$xoopsDB->prefix($xp_prefix . "_categories"); 134 } else { 135 $sql = "SELECT COUNT(*) AS count_category FROM ".$xoopsDB->prefix($xp_prefix . "_term_taxonomy") . " WHERE taxonomy = 'category'"; 136 } 137 $result = $xoopsDB->query($sql); 138 if($myrow = $xoopsDB->fetchArray($result)){ 139 $count_category = $myrow["count_category"]; 140 } 141 142 echo "<fieldset><legend style='font-weight: bold; color: #900;'>" . _AM_XPRESS_STATS . "</legend>"; 143 echo "<div style='padding: 8px;'>"; 144 echo "<label>" . _AM_XPRESS_CATEGORIES .":</label><text>".@$count_category; 145 echo "</text><br />"; 146 echo "<label>" . _AM_XPRESS_ARTICLES .":</label><text>". $count_article; 147 echo "</text><br />"; 148 echo "<label>" . _AM_XPRESS_AUTHORS .":</label><text>". $count_author; 149 echo "</text>"; 150 echo "</div>"; 151 echo "</fieldset>"; 34 152 xoops_cp_footer(); 35 153 -
trunk/admin/menu.php
r61 r107 28 28 // URL: http://www.toemon.com // 29 29 // ------------------------------------------------------------------------- // 30 $dir_path = dirname(dirname(__FILE__)); 31 $dir_name = basename($dir_path); 32 33 $lang = @$GLOBALS["xoopsConfig"]['language']; 30 34 31 35 36 if( file_exists( $dir_path .'/language/'.$lang.'/modinfo.php' ) ) { 37 include_once $dir_path .'/language/'.$lang.'/modinfo.php' ; 38 } else if( file_exists( $dir_path .'/language/english/modinfo.php' ) ) { 39 include_once $dir_path .'/language/english/modinfo.php' ; 40 } 41 42 43 44 $i=0; 45 $adminmenu[$i]['title'] = _MI_MENU_SYS_INFO ; 46 $adminmenu[$i++]['link'] = "admin/index.php"; 47 32 48 ?>
Note: See TracChangeset
for help on using the changeset viewer.