'; $html .=''; $html .=''; $html .=''; $html .= ''; $html .=''; $html .=''; $html .=''; return $html; } function generate_graphcolor($input,$instance) { if ($instance <20) { $color = array( "0xFF0000", "0x00FF00", "0x0000FF", "0xFF6600", "0x42FF8E", "0x6600FF", "0xFFFF00", "0x00FFFF", "0xFF00FF", "0x66FF00", "0x0066FF", "0xFF0066", "0xCC0000", "0x00CC00", "0x0000CC", "0xCC6600", "0x00CC66", "0x6600CC", "0xCCCC00", "0x00CCCC"); $out = $color[$instance]; } else { $out = "0x" . substr(md5($input), 0, 6); } return $out; } function save_xml_file($filename,$xml_file) { global $app_strings; if (!$handle = sugar_fopen($filename, 'w')) { $GLOBALS['log']->debug("Cannot open file ($filename)"); return; } if (fwrite($handle,$xml_file) === FALSE) { $GLOBALS['log']->debug("Cannot write to file ($filename)"); return false; } $GLOBALS['log']->debug("Success, wrote ($xml_file) to file ($filename)"); fclose($handle); return true; } function get_max($numbers) { $max = max($numbers); if ($max < 1) return $max; $base = pow(10, floor(log10($max))); return ceil($max/$base) * $base; } // retrieve the translated strings. global $current_language; $app_strings = return_application_language($current_language); if(isset($app_strings['LBL_CHARSET'])) { $charset = $app_strings['LBL_CHARSET']; } else { global $sugar_config; $charset = $sugar_config['default_charset']; } ?>