Advertisement
Guest User

Add HTTPS support to gad-data-model.php

a guest
Aug 13th, 2012
129
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.72 KB | None | 0 0
  1.   function create_google_chart_url($width, $height)
  2.   {
  3.     $chart_url = 'http://chart.apis.google.com/chart?chs=';
  4.     // Change the chart source URL for secure (HTTPS) pages
  5.     if( isset( $_SERVER['HTTPS'] ) && 'on' == $_SERVER['HTTPS'] ) {
  6.         $chart_url = 'https://chart.googleapis.com/chart?chs=';
  7.     }
  8.     return $chart_url . $width . "x" . $height . "&chf=bg,s,FFFFFF00&cht=lc&chco=0077CC&chd=t:" . $this->chart_values . "&chds=" . ($this->minvalue - 20). "," . ($this->maxvalue + 20) . "&chxt=x,y&chxl=0:" . $this->x_axis_labels . "&chxr=1," . $this->minvalue . "," . $this->maxvalue . "&chxp=0," . $this->y_axis_labels . "&chm=V,707070,0," . $this->first_monday_index . ":" . $this->total_count . ":7,1|o,0077CC,0,-1.0,6";
  9.   }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement