1
0
Fork 0

edit: phpdoc stuff

add: pChart lib - no more usage of google api. There has to be the wp-content/cache writable for images
add: test-folder for later use
new: class agents, new isBot-functionality within this class, old function is deprecated, uses an ini-file with botnames
Dieser Commit ist enthalten in:
Oldperl 2011-11-14 14:21:22 +00:00
Ursprung 187cc396c4
Commit 86383bb510
53 geänderte Dateien mit 26319 neuen und 380 gelöschten Zeilen

Datei anzeigen

@ -2,22 +2,49 @@
/**
* file semmelstatzR_database.php
*
* @package SemmelstatzR
* @version $Rev$
* @author Ortwin Pinke <info@dceonline.de>
* @author Andreas 'Redunzl' Mueller
* @copyright (c)2011 PHP-Backoffice
* @copyright (c)2005-2009 kopfhoch-studio
* @link http://sourceforge.net/projects/semmelstatz/
* @license http://www.gnu.org/licenses/gpl-2.0.html
* @package SemmelstatzR
* @version $Rev$
* @since 1.0.0 Beta
* @author SEM-Team
* @copyright (c)2011 SEM-Team
* @link http://sourceforge.net/projects/semmelstatz/
* @license http://www.gnu.org/licenses/gpl-3.0.html
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
* $Id$
*
*/
/**
* based upon semmelstatz
* Copyright (c) 2005-2009 Andreas 'Redunzl' Mueller (redunzl@gmx.de)
*
* @license http://www.gnu.org/licenses/gpl-2.0.html
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License (version 2) as
* published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
define('SEMMELSTATZR_VERSION', '1.0.0 Beta');
define('SEMMELSTATZR_SRVPATH', dirname(__FILE__));
define('SEMMELSTATZR_HTML_RELPATH', WP_PLUGIN_URL.'/'.str_replace(basename( __FILE__),"",plugin_basename(__FILE__)));
if(current_user_can('manage_statz')) {
global $wpdb;
@ -39,34 +66,39 @@ if(current_user_can('manage_statz')) {
print "<th style='text-align:right;width:10%'>Index</th>";
print "<th style='text-align:right;width:10%'>Daten & Index</th>";
print "<th style='text-align:right;width:7%'>&Uuml;berhang</th>";
$row_usage = 0;
$data_usage = 0;
$index_usage = 0;
$total_usage = 0;
$overhead_usage = 0;
foreach($tablesstatus as $key=>$tablestatus) {
if(substr($tablestatus->Name,0,$lenpre) != $pre) continue;
if(substr($tablestatus->Name,0,$lenpre) != $pre) continue;
print "<tr"; if(1&$key) print " class='alternate'"; print ">";
print "<td style='text-align:center;'>".($key+1)."</td>";
print "<td style='text-align:left;'>".$tablestatus->Name."</td>";
print "<td style='text-align:right;'>".number_format($tablestatus->Rows,0,',','.')."</td>";
print "<td style='text-align:right;'>".number_format($tablestatus->Data_length/1024,0,',','.')."&nbsp;kb</td>";
print "<td style='text-align:right;'>".number_format($tablestatus->Index_length/1024,0,',','.')."&nbsp;kb</td>";
print "<td style='text-align:right;'>".number_format(($tablestatus->Data_length + $tablestatus->Index_length)/1024,0,',','.')."&nbsp;kb</td>";
print "<tr"; if(1&$key) print " class='alternate'"; print ">";
print "<td style='text-align:center;'>".($key+1)."</td>";
print "<td style='text-align:left;'>".$tablestatus->Name."</td>";
print "<td style='text-align:right;'>".number_format($tablestatus->Rows,0,',','.')."</td>";
print "<td style='text-align:right;'>".number_format($tablestatus->Data_length/1024,0,',','.')."&nbsp;kb</td>";
print "<td style='text-align:right;'>".number_format($tablestatus->Index_length/1024,0,',','.')."&nbsp;kb</td>";
print "<td style='text-align:right;'>".number_format(($tablestatus->Data_length + $tablestatus->Index_length)/1024,0,',','.')."&nbsp;kb</td>";
if($tablestatus->Data_free > 0) {
print "<td style='color:#ff0000;text-align:right;'>";
print "&nbsp;".number_format($tablestatus->Data_free/1024,2,',','.')."&nbsp;kb";
print "</td>";
}
else {
print "<td style='text-align:right;'>--</td>";
}
if($tablestatus->Data_free > 0) {
print "<td style='color:#ff0000;text-align:right;'>";
print "&nbsp;".number_format($tablestatus->Data_free/1024,2,',','.')."&nbsp;kb";
print "</td>";
}
else {
print "<td style='text-align:right;'>--</td>";
}
$row_usage += $tablestatus->Rows;
$data_usage += $tablestatus->Data_length;
$index_usage += $tablestatus->Index_length;
$total_usage += $tablestatus->Data_length + $tablestatus->Index_length;
$overhead_usage += $tablestatus->Data_free;
echo '</tr>';
$row_usage += $tablestatus->Rows;
$data_usage += $tablestatus->Data_length;
$index_usage += $tablestatus->Index_length;
$total_usage += $tablestatus->Data_length + $tablestatus->Index_length;
$overhead_usage += $tablestatus->Data_free;
echo '</tr>';
}
print "<tr>";