using System;

namespace flash
{
	/// <summary>
	/// Global µÄÕªÒªËµÃ÷¡£
	/// </summary>
	public class Global
	{
		public static string GetPicture(string pic)
		{
			string[] tmp = pic.Split(',');
			if (tmp.Length>0)
				return System.Configuration.ConfigurationSettings.AppSettings["flash_picture"] + tmp[0];

			return "/images/none.jpg";
		}

		public static string GetString(string str, int len)
		{
			if (str != null)
			{
				if (str.Length < len)
					return str;
				else
					return str.Substring(0, len);
			}
			else
				return string.Empty;
		}
	}
}
