get('measurement_type'); $multiplecity=$params->get('multiplecity'); $buttontype=$params->get('buttontype'); $urlstring=""; for($i=0;$i<5;$i++){ if($i==0){ $city=$params->get('locationcode');} if($i==1){ $city=$params->get('locationcode1'); if(($city=="")&&($multiplecity=1)){ $multiplecity=0;}} if($i==2){ $city=$params->get('locationcode2');} if($i==3){ $city=$params->get('locationcode3');} if($i==4){ $city=$params->get('locationcode4');} if((isset($city))&&($city!="")){ $cityarray=explode("|",$city); $producttype=$cityarray[0]; $locationcode=$cityarray[1]; }else{ break; } if($i==0){ $urlstring=$urlstring."&producttype=".$producttype."&locationcode=".$locationcode;} if($i==1){ $urlstring=$urlstring."&producttype1=".$producttype."&locationcode1=".$locationcode;} if($i==2){ $urlstring=$urlstring."&producttype2=".$producttype."&locationcode2=".$locationcode;} if($i==3){ $urlstring=$urlstring."&producttype3=".$producttype."&locationcode3=".$locationcode;} if($i==4){ $urlstring=$urlstring."&producttype4=".$producttype."&locationcode4=".$locationcode;} } if($multiplecity==0){ $buttontype=$buttontype."_singlecity"; } $widget_call_string="http://www.meteomedia.com/index.php?product=weatherbutton&buttontype=".$buttontype.$urlstring."&switchto=".$weatherdatatype."&cms=Joomla&version=1.6"; //echo ''; /** Modified for: DIG-100 https://arcanys.atlassian.net/browse/DIG-100 Date: 11-26-2012 Author: ARCANYS */ if(strstr($_SERVER['HTTP_USER_AGENT'],'iPhone')) { ini_set('user_agent', 'Mozilla/5.0 (iPad; CPU OS 5_0 like Mac OS X) AppleWebKit/534.46 (KHTML, like Gecko) Version/5.1 Mobile/9A334 Safari/7534.48.3'); $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $widget_call_string); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); $output = curl_exec($ch); curl_close($ch); echo ''; } else { echo ''; } ?>