public static string GetParams()
    {
        string result = null;

        if (HttpContext.Current.Request.Params != null && HttpContext.Current.Request.Params["IS"] != null)
        {
            string parameters = HttpContext.Current.Request.Params["IS"];
            try
            {
                string   decryptParameters = iZyCrypt.Decrypte(parameters, key, IV);
                string[] paramTable        = decryptParameters.Split('&');
                if (paramTable != null && paramTable.Count() > 0)
                {
                    foreach (string item in paramTable)
                    {
                        if (item.Contains("=") && !item.Contains("SESSIONID="))
                        {
                            result += item + "&";
                        }
                    }
                }
            }
            catch (System.Security.Cryptography.CryptographicException)
            {
                HttpContext.Current.Response.Redirect("~/Default.aspx" + MySession.GenerateGetParams());
            }
        }
        if (result != null && result.Length > 0)
        {
            result = result.Substring(0, result.Length - 1);
        }
        return(result);
    }
Ejemplo n.º 2
0
    protected void btnConnecter_Click(object sender, EventArgs e)
    {
        string login    = tbLogin.Text.Trim();
        string password = tbPassword.Text;

        if (!string.IsNullOrEmpty(login) && !string.IsNullOrEmpty(password))
        {
            Utilisateur myUtilisateur = UtilisateurManager.Login(login, password);
            if (myUtilisateur != null)
            {
                //reussite
                MySession.SetSession("user", myUtilisateur);
                Session["GridviewUserIdKey"] = myUtilisateur.id;

                Response.Redirect("~/Espace/Default.aspx" + MySession.GenerateGetParams());
            }
            else
            {
                lblError.Text = "Mauvais login/mot de passe";
            }
        }
        else
        {
            lblError.Text = "Veuillez indiquer votre identifiant et votre mot de passe";
        }
    }
Ejemplo n.º 3
0
 protected void MenuInit()
 {
     hlMenuMonCompte.NavigateUrl    = "~/Espace/Default.aspx" + MySession.GenerateGetParams();
     hlMenuDashboard.NavigateUrl    = "~/Espace/Default.aspx" + MySession.GenerateGetParams();
     hlMenuServeurs.NavigateUrl     = "~/Espace/Serveurs.aspx" + MySession.GenerateGetParams();
     hlMenuProjets.NavigateUrl      = "~/Espace/Projets.aspx" + MySession.GenerateGetParams();
     hlMenuUtilisateurs.NavigateUrl = "~/Espace/Utilisateurs.aspx" + MySession.GenerateGetParams();
 }
    protected void btnServeur_Click(object sender, EventArgs e)
    {
        LinkButton btn = (LinkButton)sender;

        if (btn != null && !string.IsNullOrEmpty(btn.CommandArgument))
        {
            Response.Redirect("~/Espace/Serveur.aspx" + MySession.GenerateGetParams("id=" + btn.CommandArgument));
        }
    }
    public void Initialization()
    {
        hlBackProjet.NavigateUrl = "~/Espace/Projets.aspx" + MySession.GenerateGetParams();

        Projet myProjet = GetProjet();

        if (myProjet != null)
        {
            projetName.Text       = myProjet.libelle;
            pnlPageTitle.CssClass = "page-title " + myProjet.myTheme.cssClass;
            pnlUrlProd.CssClass   = "textbox-icon " + myProjet.myTheme.cssClass;
            pnlUrlTest.CssClass   = "textbox-icon " + myProjet.myTheme.cssClass;

            InfosGenerales_Init(myProjet);
            ListeLog_Init(myProjet);
            ListeBaseDonnees_Init(myProjet);
        }
    }
    protected void rptLogs_ItemDataBound(object sender, RepeaterItemEventArgs e)
    {
        if (e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem)
        {
            Log myLog = (Log)e.Item.DataItem;
            if (myLog != null)
            {
                // ~/Espace/ViewFile.aspx
                HyperLink btnSeeFile = (HyperLink)e.Item.FindControl("btnSeeFile");

                if (btnSeeFile != null)
                {
                    btnSeeFile.NavigateUrl = "~/Espace/ViewFile.aspx" + MySession.GenerateGetParams("idLog=" + myLog.id + "&menuDisabled=1");
                }

                LinkButton btnFavorisLog = (LinkButton)e.Item.FindControl("btnFavorisLog");
                if (ListeLogFavoris != null && btnFavorisLog != null)
                {
                    if (ListeLogFavoris.Find(l => l.id == myLog.id) != null)
                    {
                        Control favOn = e.Item.FindControl("logFavorisOn");
                        if (favOn != null)
                        {
                            favOn.Visible = true;
                        }
                        btnFavorisLog.CommandName = "1";
                    }
                    else
                    {
                        Control favOff = e.Item.FindControl("logFavorisOff");
                        if (favOff != null)
                        {
                            favOff.Visible = true;
                        }
                        btnFavorisLog.CommandName = "0";
                    }
                }
            }
        }
    }
Ejemplo n.º 7
0
    public void Initialization()
    {
        hlBackProjet.NavigateUrl = "~/Espace/Serveurs.aspx" + MySession.GenerateGetParams();

        Serveur myServeur = GetServeur();

        if (myServeur != null)
        {
            projetName.Text = myServeur.libelle;

            InfosGenerales_Init(myServeur);

            Microsoft.VisualBasic.Devices.ComputerInfo cptInfo = new Microsoft.VisualBasic.Devices.ComputerInfo();
            ulong totalRam = cptInfo.TotalPhysicalMemory;
            TotalRAM = Convert.ToInt32((totalRam / 1024) / 1024);
            //TotalRAM = Convert.ToInt32(cptInfo.TotalPhysicalMemory);

            InitCPU();
            InitRAM();
            InitStockage();
        }
    }
Ejemplo n.º 8
0
 protected void rptLogs_ItemDataBound(object sender, RepeaterItemEventArgs e)
 {
     if (e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem)
     {
         // ~/Espace/ViewFile.aspx
         HyperLink btnSeeFile = (HyperLink)e.Item.FindControl("btnSeeFile");
         Log       myLog      = (Log)e.Item.DataItem;
         if (btnSeeFile != null && myLog != null)
         {
             bool?isDirectory = IsDirectory(myLog.cheminFichier);
             if (isDirectory.HasValue)
             {
                 if (isDirectory.Value)
                 {
                     btnSeeFile.NavigateUrl = "~/Espace/FileSystem.aspx" + MySession.GenerateGetParams("idLog=" + myLog.id + "&menuDisabled=1");
                 }
                 else
                 {
                     btnSeeFile.NavigateUrl = "~/Espace/ViewFile.aspx" + MySession.GenerateGetParams("idLog=" + myLog.id + "&menuDisabled=1");
                 }
             }
         }
     }
 }
Ejemplo n.º 9
0
 protected void btnDeconnexion_Click(object sender, EventArgs e)
 {
     MySession.LogOut();
     Response.Redirect("~/Default.aspx" + MySession.GenerateGetParams());
 }