=0; $i--) { if ($Integer[$i]=="E") break; $Exponent = $Integer[$i] . $Exponent; } $Exponent = substr($Exponent,0,strlen($Exponent)-1); //set si prefix if ($Exponent>=18) return ($Integer/1000000000000000000)." E"; if ($Exponent>=15) return ($Integer/1000000000000000)." P"; if ($Exponent>=12) return ($Integer/1000000000000)." T"; if ($Exponent>=9) return ($Integer/1000000000)." G"; if ($Exponent>=6) return ($Integer/1000000)." M"; if ($Exponent>=3) return ($Integer/1000)." k"; if ($Exponent<3 && $Exponent>=0) return ($Integer/1)." "; if ($Exponent<-15) return ($Integer*1000000000000000)." a"; if ($Exponent<-12) return ($Integer*1000000000000000)." f"; if ($Exponent<-9) return ($Integer*1000000000000)." p"; if ($Exponent<-6) return ($Integer*1000000000)." n"; if ($Exponent<-3) return ($Integer*1000000)." µ"; if ($Exponent<0) return ($Integer*1000)." m"; } function OtherGetIcon ($IconName,$CssClass) { global $GlobalTemplate; $IconDirectory='./templates/'.$GlobalTemplate.'/icons/'; $Error = 0; $RetVal = ""; if (file_exists($IconDirectory.$IconName.".png")) $IconFile=$IconName.".png"; elseif (file_exists($IconDirectory.$IconName.".jpg")) $IconFile=$IconName.".jpg"; elseif (file_exists($IconDirectory.$IconName.".gif")) $IconFile=$IconName.".gif"; else { $Error = 1; //log if template directory is existing - if not, anyone else will report this if (file_exists("./templates/".$GlobalTemplate)) ErrorLog("Icon '$IconName' +[.png|.jpg|.gif] not found!"); } if (!$Error) { $RetVal = ""; } return $RetVal; } // Returns a html tag function OtherGetPictureImg($part_id, $max_width=0, $max_height=0) { // create anchor tag $tag = ""; // create img tag $tag .= " 0) $tag .= "&MaxWidth=$max_width"; if ($max_height > 0) $tag .= "&MaxHeight=$max_height"; $tag .= "\""; // finish src attribute $tag .= " alt=\"picture of part $part_id\""; $tag .= ">"; // finish img tag // close link $tag .= ''; return $tag; } ?>