namespace Kesion.NET.WebSite
{
    using System;
    using System.Data;
    using System.Configuration;
    using System.Collections;
    using System.Web;
    using System.Web.Security;
    using System.Web.UI;
    using System.Web.UI.WebControls;
    using System.Web.UI.WebControls.WebParts;
    using System.Web.UI.HtmlControls;
    using Kesion.Publics;
    using Kesion.BLL;
    public partial class Admin_Include_Preview : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            KSSecurity.CheckLoginAndClose();
          
            string PreviewImagePath = KSCMS.S("FilePath");
            if (!(PreviewImagePath.Equals("")))
            {
            string[] strFilenamea = PreviewImagePath.ToLower().Split('.');
            string Ext = strFilenamea[strFilenamea.Length - 1];
            if (Ext.Equals("gif") || Ext.Equals("jpg") || Ext.Equals("jpeg") || Ext.Equals("png") || Ext.Equals("bmp"))
            {
                this.Image1.ImageUrl = PreviewImagePath;
            }
            else if (Ext != "")
            {
                this.Image1.ImageUrl = "../../sysimg/FileIcon/" + KSCMS.GetFileIcon(PreviewImagePath);
                this.Image1.Width = 30;
                this.Image1.Height = 30;
               
            }
            }
            else
            {
                this.Image1.ImageUrl = "../../sysimg/FileIcon/DefaultPreview.gif";
            }
            
        }
    }
}