Changeset 200971 for woopra/trunk/inc/render.php
- Timestamp:
- 02/02/2010 06:07:02 AM (16 years ago)
- File:
-
- 1 edited
-
woopra/trunk/inc/render.php (modified) (11 diffs)
Legend:
- Unmodified
- Added
- Removed
-
woopra/trunk/inc/render.php
r200966 r200971 10 10 */ 11 11 class WoopraRender extends WoopraAdmin { 12 12 13 13 /** 14 14 * Site API Key … … 120 120 ); 121 121 } 122 122 123 123 $date_format = $_GET['date_format']; 124 124 $start_date = $_GET['from']; … … 141 141 if ( is_wp_error($xml_process) ) 142 142 wp_die($xml_process->get_error_message()); 143 143 144 144 // Clear up memory! 145 145 unset($xml_data, $xml_data_append); … … 196 196 return true; 197 197 } 198 198 199 199 /** 200 200 * Render the Results … … 203 203 */ 204 204 function render_results() { 205 205 206 206 if ( !is_array($this->entries) ) 207 207 return; … … 330 330 <td class="wlinechart" id="linecharttd-<?php echo $hashid; ?>-<?php echo $counter ?>" colspan="4"></td> 331 331 </tr> 332 <?php } ?> 332 <?php } ?> 333 333 </table> 334 334 <?php … … 404 404 405 405 /** PRIVATE FUNCTIONS **/ 406 406 407 407 /** 408 408 * Milliseconds to Mintues and Seconds … … 558 558 return "<img src=\"http://static.woopra.com/images/flags/$country.png\" />"; 559 559 } 560 560 561 561 /** 562 562 * Get the broswer image. … … 567 567 function browser_icon($browser) { 568 568 $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 ) { 600 600 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 ""; 606 606 } 607 607 … … 614 614 function platform_icon($platform) { 615 615 $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 ""; 653 653 } 654 654 … … 935 935 return substr(md5($value),0,4); 936 936 } 937 937 938 938 /** 939 939 * Sort Analytics
Note: See TracChangeset
for help on using the changeset viewer.