WordPress.org

Plugin Directory

Changeset 563615


Ignore:
Timestamp:
06/25/12 15:58:10 (22 months ago)
Author:
sLaNGjI
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • wp-overview-lite/tags/2011.0723.2011/wp-overview-lite.php

    r563605 r563615  
    4747if(!function_exists('add_action')){header('HTTP/1.0 403 Forbidden');header('HTTP/1.1 403 Forbidden');exit();}?><?php 
    4848function wpo_footer_log(){echo"\n<!--Plugin WP Overview (lite) 2011.0723.2011 Active-->";}add_action('wp_head','wpo_footer_log');add_action('wp_footer','wpo_footer_log')?><?php 
    49 if(is_admin()){class wp_overview_lite{var$memory=false;function wpo(){return$this->__construct();}function __construct(){add_action('init',array(&$this,'wpo_limit'));add_action('wp_dashboard_setup',array(&$this,'wpo_dashboard'));add_filter('admin_footer_text',array(&$this,'wpo_footer'));$this->memory=array();}function wpo_limit(){$this->memory['wpo-limit']=(int)ini_get('memory_limit');}function wpo_load(){$this->memory['wpo-load']=function_exists('memory_get_usage')?round(memory_get_usage()/1024/1024,2):0;}function wpo_consumption(){$this->memory['wpo-consumption']=round($this->memory['wpo-load']/$this->memory['wpo-limit']*100,0);}function wpo_output(){$this->wpo_load();$this->wpo_consumption();$this->memory['wpo-load']=empty($this->memory['wpo-load'])?__('0'):$this->memory['wpo-load'].__('M')?><?php 
     49if(is_admin()){class wp_overview_lite{var$memory=false;function wpo(){return$this->__construct();}function __construct(){add_action('init',array(&$this,'wpo_limit'));add_action('wp_dashboard_setup',array(&$this,'wpo_dashboard'));add_action('wp_network_dashboard_setup',array(&$this,'wpo_network_dashboard'));add_filter('admin_footer_text',array(&$this,'wpo_footer'));$this->memory=array();}function wpo_limit(){$this->memory['wpo-limit']=(int)ini_get('memory_limit');}function wpo_load(){$this->memory['wpo-load']=function_exists('memory_get_usage')?round(memory_get_usage()/1024/1024,2):0;}function wpo_consumption(){$this->memory['wpo-consumption']=round($this->memory['wpo-load']/$this->memory['wpo-limit']*100,0);}function wpo_output(){$this->wpo_load();$this->wpo_consumption();$this->memory['wpo-load']=empty($this->memory['wpo-load'])?__('0'):$this->memory['wpo-load'].__('M')?><?php 
    5050global$wpdb,$wp_version,$wpmu_version;$cur_locale=get_locale();$mysql_status=array();$mysql_vars=array();foreach($wpdb->get_results('SHOW GLOBAL STATUS')as$result){$mysql_status[$result->Variable_name]=$result->Value;}foreach($wpdb->get_results('SHOW GLOBAL VARIABLES')as$result){$mysql_vars[$result->Variable_name]=$result->Value;}$uptime_days=$mysql_status['Uptime']/86400;$uptime_hours=($uptime_days-(int)$uptime_days)*24;$uptime_minutes=($uptime_hours-(int)$uptime_hours)*60;$uptime_seconds=($uptime_minutes-(int)$uptime_minutes)*60;$uptime_string=(int)$uptime_days.' days, '.(int)$uptime_hours.' hours, '.(int)$uptime_minutes.' minutes, '.(int)$uptime_seconds.' seconds'?> 
    5151<ul><li><strong>Mem</strong>: 
Note: See TracChangeset for help on using the changeset viewer.