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;

namespace JuSNS.Web.inc.Ajax.friend
{
    public partial class changeclass : JuSNS.UI.Page.UserPage
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            string a = Request.QueryString["a"];
            string fid = Request.QueryString["id"];
            string cname = Request.QueryString["cname"];
            if (a == "show")
            {
                Response.Write("<form id=\"form_" + fid + "\" name=\"form_" + fid + "\" method=\"post\" action=\"\"><input name=\"input_Name_" + fid + "\" class=\"f-text\" id=\"input_Name_" + fid + "\" type=\"text\" value=\"" + cname + "\" />&nbsp;<input type=\"button\" value=\"ok\" onclick=\"saveValue('" + fid + "');\" class=\"f-button\" /></form>");
                Response.End();
            }
            else if (a == "save")
            {
                string list = string.Empty;
                JuSNS.Home.Friend frd = new JuSNS.Home.Friend();
                frd.UpdateFriendClass(UserID, cname, Convert.ToInt32(fid));
                list += "<a href=\""+rooDir+"/home/friend/?c=" + fid + "\">" + cname + " &nbsp; <span style=\"display:none;\" id=\"edit_" + fid + "\" onclick=\"aedit('" + fid + "','" + cname + "');return false;\" class=\"c999\">±à¼­</span></a>";
                Response.Write(list);
                Response.End();
            }
        }
    }
}
