using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Text;
using digioz;

public partial class Smilies : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (Session["username"] != null)
        {
            StringBuilder lsbBuff = new StringBuilder();
            string lsError = String.Empty;
            SmileyList loSmileyList;

            if (Session["smileylist"] == null)
            {
                loSmileyList = SmileyManagement.GetSmileyList(out lsError);
                Session["smileylist"] = loSmileyList;
            }
            else
            {
                loSmileyList = (SmileyList)Session["smileylist"];
            }

            foreach (Smiley loSmiley in loSmileyList)
            {
                lsbBuff.Append("<img src=\"" + loSmiley.Image + "\" onclick=\"SetSmiley('" + loSmiley.Abbr + "')\" alt=\"\" />");
            }
            lblSmileyList.Text = lsbBuff.ToString();
        }
    }
}
