Ignore:
Timestamp:
12/02/10 17:06:19 (13 years ago)
Author:
eduardoalex
Message:

Ticket #1405 - Classe utilitaria para criar a pagina home do mobile.

File:
1 copied

Legend:

Unmodified
Added
Removed
  • branches/2.2/mobile/inc/class.common_functions.inc.php

    r454 r3559  
    1111        \**************************************************************************/ 
    1212 
    13  
    14         /* 
    15          * Não é necessário 
    16          */ 
    17         function mobileExecMethod($method, $functionparams = '_UNDEF_', $loglevel = 3, $classparams = '_UNDEF_'){ 
    18  
    19         } 
     13        class common_functions 
     14        { 
     15            function borkb($size, $enclosed = NULL)  
     16            { 
     17                        if (!$size) 
     18                        $size = 0; 
     19         
     20                        if ($enclosed) 
     21                        { 
     22                                $left = '('; 
     23                                $right = ')'; 
     24                        } 
     25         
     26                        if ($size < 1024) 
     27                                $rstring = $left . $size . 'B' . $right; 
     28                        else if ($size < 1048576) 
     29                                $rstring = $left . round($size/1024) . 'KB' . $right; 
     30                        else if ($size < 1073741824) 
     31                                $rstring = $left . round($size/1024/1024) . 'MB' . $right; 
     32                        else 
     33                                $rstring = $left . round($size/1024/1024/1024) . 'GB' . $right; 
     34         
     35                        return $rstring; 
     36                } 
     37        } //end common class     
    2038 
    2139?> 
Note: See TracChangeset for help on using the changeset viewer.