Plugin Directory


Ignore:
Timestamp:
02/02/2010 06:07:02 AM (16 years ago)
Author:
ShaneF
Message:

fix whitespaces :-)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • woopra/trunk/inc/render.php

    r200966 r200971  
    1010 */
    1111class WoopraRender extends WoopraAdmin {
    12 
     12   
    1313    /**
    1414     * Site API Key
     
    120120                );
    121121            }
    122                        
     122           
    123123            $date_format = $_GET['date_format'];
    124124            $start_date = $_GET['from'];
     
    141141            if ( is_wp_error($xml_process) )
    142142                wp_die($xml_process->get_error_message());
    143 
     143           
    144144            // Clear up memory!
    145145            unset($xml_data, $xml_data_append);
     
    196196        return true;
    197197    }
    198 
     198   
    199199    /**
    200200     * Render the Results
     
    203203     */
    204204    function render_results() {
    205 
     205       
    206206        if ( !is_array($this->entries) )
    207207            return;
     
    330330                    <td class="wlinechart" id="linecharttd-<?php echo $hashid; ?>-<?php echo $counter ?>" colspan="4"></td>
    331331                </tr>
    332             <?php } ?>             
     332            <?php } ?>
    333333        </table>
    334334        <?php
     
    404404   
    405405    /** PRIVATE FUNCTIONS **/
    406 
     406   
    407407    /**
    408408     * Milliseconds to Mintues and Seconds
     
    558558        return "<img src=\"http://static.woopra.com/images/flags/$country.png\" />";
    559559    }
    560 
     560   
    561561    /**
    562562     * Get the broswer image.
     
    567567    function browser_icon($browser) {
    568568        $browser = strtolower($browser);
    569         if (stripos($browser, "firefox") !== false) {
    570             return $this->woopra_image("browsers/firefox");
    571         }
    572         if (stripos($browser, "explorer 7") !== false) {
    573             return $this->woopra_image("browsers/ie7");
    574         }
    575         if (stripos($browser, "explorer 8") !== false) {
    576             return $this->woopra_image("browsers/ie7"); //  should this me updated?
    577         }
    578         if (stripos($browser, "explorer") !== false) {
    579             return $this->woopra_image("browsers/ie");
    580         }
    581         if (stripos($browser, "safari") !== false) {
    582             return $this->woopra_image("browsers/safari");
    583         }
    584         if (stripos($browser, "chrome") !== false) {
    585             return $this->woopra_image("browsers/chrome");
    586         }
    587         if (stripos($browser, "opera") !== false) {
    588             return $this->woopra_image("browsers/opera");
    589         }
    590         if (stripos($browser, "mozilla") !== false) {
    591             return $this->woopra_image("browsers/mozilla");
    592         }
    593         if (stripos($browser, "netscape") !== false) {
    594             return $this->woopra_image("browsers/netscape");
    595         }
    596         if (stripos($browser, "konqueror") !== false) {
    597             return $this->woopra_image("browsers/konqueror");
    598         }
    599         if (stripos($browser, "iphone") !== false) {
     569        if ( stripos($browser, "firefox") !== false ) {
     570            return $this->woopra_image("browsers/firefox");
     571        }
     572        if ( stripos($browser, "explorer 7") !== false ) {
     573            return$this->woopra_image("browsers/ie7");
     574        }
     575        if ( stripos($browser, "explorer 8") !== false ) {
     576            return$this->woopra_image("browsers/ie7");  //  should this me updated?
     577        }
     578        if ( stripos($browser, "explorer") !== false ) {
     579            return$this->woopra_image("browsers/ie");
     580        }
     581        if ( stripos($browser, "safari") !== false ) {
     582            return$this->woopra_image("browsers/safari");
     583        }
     584        if ( stripos($browser, "chrome") !== false ) {
     585            return$this->woopra_image("browsers/chrome");
     586        }
     587        if ( stripos($browser, "opera") !== false ) {
     588            return$this->woopra_image("browsers/opera");
     589        }
     590        if ( stripos($browser, "mozilla") !== false ) {
     591            return$this->woopra_image("browsers/mozilla");
     592        }
     593        if ( stripos($browser, "netscape") !== false ) {
     594            return$this->woopra_image("browsers/netscape");
     595        }
     596        if ( stripos($browser, "konqueror") !== false ) {
     597            return$this->woopra_image("browsers/konqueror");
     598        }
     599        if ( stripos($browser, "iphone") !== false ) {
    600600            return $this->woopra_image("os/mac");
    601         }
    602         if (stripos($browser, "unknown") !== false || stripos($browser, "other") !== false) {
    603             return $this->woopra_image("browsers/unknown");
    604         }
    605         return "";
     601        }
     602        if ( stripos($browser, "unknown") !== false || stripos($browser, "other") !== false ) {
     603            return$this->woopra_image("browsers/unknown");
     604        }
     605        return "";
    606606    }
    607607   
     
    614614    function platform_icon($platform) {
    615615        $platform = strtolower($platform);
    616         if (stripos($platform, "windows") !== false) {
    617             return $this->woopra_image("os/windows");
    618         }
    619         if (stripos($platform, "mac") !== false) {
    620             return $this->woopra_image("os/mac");
    621         }
    622         if (stripos($platform, "apple") !== false) {
    623             return $this->woopra_image("os/mac");
    624         }
    625         if (stripos($platform, "ubuntu") !== false) {
    626             return $this->woopra_image("os/ubuntu");
    627         }
    628         if (stripos($platform, "redhat") !== false) {
    629             return $this->woopra_image("os/redhat");
    630         }
    631         if (stripos($platform, "suse") !== false) {
    632             return $this->woopra_image("os/suse");
    633         }
    634         if (stripos($platform, "fedora") !== false) {
    635             return $this->woopra_image("os/fedora");
    636         }
    637         if (stripos($platform, "debian") !== false) {
    638             return $this->woopra_image("os/debian");
    639         }
    640         if (stripos($platform, "linux") !== false) {
    641             return $this->woopra_image("os/linux");
    642         }
    643         if (stripos($platform, "playstation") !== false) {
    644             return $this->woopra_image("os/playstation");
    645         }
    646         if (stripos($platform, "nokia mobile") !== false) {
    647             return $this->woopra_image("browsers/unknown");
    648         }
    649         if (stripos($platform, "unknown") !== false || stripos($platform, "other") !== false) {
    650             return $this->woopra_image("browsers/unknown");
    651         }
    652         return "";
     616        if ( stripos($platform, "windows") !== false ) {
     617            return$this->woopra_image("os/windows");
     618        }
     619        if ( stripos($platform, "mac") !== false ) {
     620            return$this->woopra_image("os/mac");
     621        }
     622        if ( stripos($platform, "apple") !== false ) {
     623            return$this->woopra_image("os/mac");
     624        }
     625        if ( stripos($platform, "ubuntu") !== false ) {
     626            return$this->woopra_image("os/ubuntu");
     627        }
     628        if ( stripos($platform, "redhat") !== false ) {
     629            return$this->woopra_image("os/redhat");
     630        }
     631        if ( stripos($platform, "suse") !== false ) {
     632            return$this->woopra_image("os/suse");
     633        }
     634        if ( stripos($platform, "fedora") !== false ) {
     635            return$this->woopra_image("os/fedora");
     636        }
     637        if ( stripos($platform, "debian") !== false ) {
     638            return$this->woopra_image("os/debian");
     639        }
     640        if ( stripos($platform, "linux") !== false ) {
     641            return$this->woopra_image("os/linux");
     642        }
     643        if ( stripos($platform, "playstation") !== false ) {
     644            return$this->woopra_image("os/playstation");
     645        }
     646        if ( stripos($platform, "nokia mobile") !== false ) {
     647            return$this->woopra_image("browsers/unknown");
     648        }
     649        if ( stripos($platform, "unknown") !== false || stripos($platform, "other") !== false ) {
     650            return$this->woopra_image("browsers/unknown");
     651        }
     652        return "";
    653653    }
    654654   
     
    935935        return substr(md5($value),0,4);
    936936    }
    937 
     937   
    938938    /**
    939939     * Sort Analytics
Note: See TracChangeset for help on using the changeset viewer.