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;

public partial class left : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        Loginjudge();
    }
    protected void ProductCommand(object sender, CommandEventArgs e)
    {
        switch (e.CommandName.ToString())
        {
           
            case "editjiajie":
                Response.Write("<Script>parent.right.location.href='Inputjianjie.aspx'</Script>");
                break;
            case "rongyu":
                Response.Write("<Script>parent.right.location.href='Inputglory.aspx'</Script>");
                break;
            case "contactus":
                Response.Write("<Script>parent.right.location.href='Inputcontactus.aspx'</Script>");
                break;
            case "note":
                Response.Write("<Script>parent.right.location.href='Inputnote.aspx'</Script>");
                break;
            case "survey":
                Response.Write("<Script>parent.right.location.href='Editsurvey.aspx'</Script>");
                break;
            case "addnews":
                Response.Write("<Script>parent.right.location.href='Inputnews.aspx'</Script>");
                break;
            case "news":
                Response.Write("<Script>parent.right.location.href='Managenews.aspx'</Script>");
                break;
            case "leibie":
                Response.Write("<Script>parent.right.location.href='Inputlei.aspx'</Script>");
                break;
            case "product":
                Response.Write("<Script>parent.right.location.href='Inputproduct.aspx'</Script>");
                break;
              case "manageproduct":
                Response.Write("<Script>parent.right.location.href='Manageproduct.aspx'</Script>");
                break;
            case "tuijian":
                Response.Write("<Script>parent.right.location.href='ManageXML.aspx'</Script>");
                break;
            case "leaveword":
                Response.Write("<Script>parent.right.location.href='Manageliuyan.aspx'</Script>");
                break;
            case "mima":
                Response.Write("<Script>parent.right.location.href='Remima.aspx'</Script>");
                break;
            case "miaoshu":
                Response.Write("<Script>parent.right.location.href='Manageconfig.aspx'</Script>");
                break;
            default:
                break;
        }
    }
    private void Loginjudge()
    {
        if (Session["Login"] == null)
        {
            Response.Redirect("Error.aspx");
        }
        else
        {
            if (Session["Login"] != "pass")
            {
                Response.Redirect("Error.aspx");
            }

        }
    }
   
}
