protected void btnGoBackListe_Click(object sender, EventArgs e) { int idLog = iZyInt.ConvertStringToInt(MySession.GetParam("idLog")); Log myLog = LogManager.Load(idLog); if (myLog != null) { DisplayListeFichiers(myLog.cheminFichier); ScriptManager.RegisterStartupScript(this, this.GetType(), "HideFileDelay", "HideFileDelay();", true); upGeneral.Update(); } }
protected void Page_Load(object sender, EventArgs e) { Utilisateur myUser = GetUtilisateur(); if (myUser != null) { if (!IsPostBack) { int idLog = iZyInt.ConvertStringToInt(MySession.GetParam("idLog")); Log myLog = LogManager.Load(idLog); if (myLog != null) { lblNomFichier.Text = myLog.myProjet.libelle + " - " + myLog.libelle; lblCheminFichier.Text = myLog.cheminFichier; lblCommentaire.Text = myLog.commentaire; pnlHeader.CssClass += " " + myLog.myProjet.myTheme.cssClass; bool?isDirectory = IsDirectory(myLog.cheminFichier); if (isDirectory.HasValue) { if (isDirectory.Value) // c'est un répertoire { icon_folder.Visible = true; pnlListeFichier.Visible = true; pnlListeFichier.CssClass += " " + myLog.myProjet.myTheme.cssClass; DisplayListeFichiers(myLog.cheminFichier); } else // c'est un fichier { pnlListeFichier.Visible = false; pnlContenuFichier.CssClass += " visible"; icon_file.Visible = true; DisplayFichierContenu(myLog.cheminFichier); } } else { litFileContent.Text = "Le fichier n'existe pas ou le chemin est inaccessible"; } } } } else { Response.Redirect("~/Default.aspx"); } }
protected void Page_Init(object sender, EventArgs e) { if (Request.Params.Count == 0) { Response.Redirect("~/Default.aspx"); } string guid = null; if (Request.Params["oldGUID"] != null && Request.Params["newGUID"] != null) { string oldGUID = Request.Params["oldGUID"].ToString(); guid = Request.Params["newGUID"].ToString(); MySession.DuplicateSession(oldGUID, guid); SESSIONID.Value = guid; string parametres = MySession.GetParams(); Uri myUri = new Uri(HttpContext.Current.Request.Url.AbsoluteUri); string redirection = ""; if (parametres != null && parametres.Length > 0) { redirection = myUri.GetLeftPart(UriPartial.Path) + MySession.GenerateGetParamsWithNewGUID(parametres, guid); } else { redirection = myUri.GetLeftPart(UriPartial.Path) + MySession.GenerateGetParamsWithNewGUID(guid); } Response.Redirect(redirection); } else { if (guid == null || guid == string.Empty) { guid = Request.Form["ctl00$SESSIONID"]; } if (guid == null || guid == string.Empty) { guid = MySession.GetParam("SESSIONID"); } if (guid != null) { SESSIONID.Value = guid; } } }
protected void Page_Load(object sender, EventArgs e) { Utilisateur user = (Utilisateur)MySession.GetSession("user"); if (user != null) { if (!IsPostBack) { if (!string.IsNullOrEmpty(MySession.GetParam("menuDisabled"))) { pnlMenuContainer.Visible = false; } else { lblUsernameConnecte.Text = user.nom; MenuInit(); } } } }
protected Serveur GetServeur() { return(ServeurManager.Load(iZyInt.ConvertStringToInt(MySession.GetParam("id")))); }
protected Projet GetProjet() { return(ProjetManager.Load(iZyInt.ConvertStringToInt(MySession.GetParam("id")))); }