using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Web;
using System.Web.SessionState;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;
using edu.jhu.Cas.Util;
namespace edu.jhu.Cas.Web
{
	/// <summary>
	/// Summary description for CreatePlot.
	/// </summary>
	public class CreatePlot : System.Web.UI.Page
	{
		protected string plotURL,lmessage,tableName;
		bool loggedin;
		private void Page_Load(object sender, System.EventArgs e){}
		protected PlotArgs pArgs;
		protected PlotInterface plot = new PlotInterface();
		protected long wsid;
		override protected void OnInit(EventArgs e)
		{
			
			InitializeComponent();
			base.OnInit(e);
			WebUtils.CheckLoggedIn(Session,Response,Request,true);
			lmessage = Request.Params["lmessage"];
			loggedin = Session["USER"] != null;  
			if (loggedin) 
				wsid = (long)Session["USER"];
			tableName = Request.Params["tableName"];
			pArgs = new PlotArgs();
			plotURL = plot.PlotTable(wsid,tableName,pArgs);
			
		}
		
		/// <summary>
		/// Required method for Designer support - do not modify
		/// the contents of this method with the code editor.
		/// </summary>
		private void InitializeComponent()
		{    
			this.Load += new System.EventHandler(this.Page_Load);
		}
		
	}
}