pagina admin (da fare...)
visibile SOLO ADMIN:
diff --git a/MedPred/UserAdmin.aspx.cs b/MedPred/UserAdmin.aspx.cs
index 8dd3a9b..2df4491 100644
--- a/MedPred/UserAdmin.aspx.cs
+++ b/MedPred/UserAdmin.aspx.cs
@@ -1,4 +1,5 @@
-using System;
+using SteamWare;
+using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
@@ -11,7 +12,52 @@ namespace MedPred
{
protected void Page_Load(object sender, EventArgs e)
{
+ // check visibilità controlli opzionali
+ checkVisibCtrl();
+ }
+ private void checkVisibCtrl()
+ {
+ // controllo se c'è chiamata x aggiungere device da authKey e mostro panel...
+ divEnrollByKey.Visible = (Request.QueryString["addDeviceByKey"] == "lvabe");
+ // se è admin vede anche i controlli x abilitare richieste utenti & co...
+ divAdmin.Visible = userIsAdmin;
+ }
+
+ public bool userIsAdmin
+ {
+ get
+ {
+ bool answ = false;
+ try
+ {
+ answ = user_std.UtSn.userHasRight("SuperAdmin");
+ }
+ catch
+ { }
+ return answ;
+ }
+ }
+ ///
+ /// richiesta reset dispositivi utente
+ ///
+ ///
+ ///
+ protected void btnReqNewKey_Click(object sender, EventArgs e)
+ {
+ // controllo email & co...
+ string email = txtEmailReq.Text.Trim();
+ if (email != "" && email.IndexOf("@")>0)
+ {
+ // rimando al jumper...
+ //Response.Redirect(string.Format("jumper?UserAuthkey={0}&USER_NAME={1}"));
+ Response.Redirect("UserAdmin");
+ }
+ else
+ {
+ lblOut.Text = "Attenzione! preogo inserire email valida!";
+ lblOut.Visible= true;
+ }
}
}
}
\ No newline at end of file
diff --git a/MedPred/UserAdmin.aspx.designer.cs b/MedPred/UserAdmin.aspx.designer.cs
index 4c11482..7986392 100644
--- a/MedPred/UserAdmin.aspx.designer.cs
+++ b/MedPred/UserAdmin.aspx.designer.cs
@@ -3,15 +3,58 @@
// This code was generated by a tool.
//
// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
+// the code is regenerated.
//
//------------------------------------------------------------------------------
-namespace MedPred
-{
-
-
- public partial class UserAdmin
- {
+namespace MedPred {
+
+
+ public partial class UserAdmin {
+
+ ///
+ /// txtEmailReq control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.TextBox txtEmailReq;
+
+ ///
+ /// btnReqNewKey control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Button btnReqNewKey;
+
+ ///
+ /// lblOut control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Label lblOut;
+
+ ///
+ /// divEnrollByKey control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.HtmlControls.HtmlGenericControl divEnrollByKey;
+
+ ///
+ /// divAdmin control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.HtmlControls.HtmlGenericControl divAdmin;
}
}
diff --git a/MedPred/WebUserControls/mod_footer.ascx b/MedPred/WebUserControls/mod_footer.ascx
index 5dda0fc..e8f8007 100644
--- a/MedPred/WebUserControls/mod_footer.ascx
+++ b/MedPred/WebUserControls/mod_footer.ascx
@@ -7,4 +7,3 @@
Config
-
diff --git a/MedPred/WebUserControls/mod_footer.ascx.cs b/MedPred/WebUserControls/mod_footer.ascx.cs
index 10874ce..401296b 100644
--- a/MedPred/WebUserControls/mod_footer.ascx.cs
+++ b/MedPred/WebUserControls/mod_footer.ascx.cs
@@ -35,8 +35,6 @@ namespace MedPred.WebUserControls
answ += " ui-state-disabled";
}
}
- // se admin mostro SOLO SE user in sessione è UN ADMIN...
-
return answ;
}
diff --git a/MedPred/jumper.aspx b/MedPred/jumper.aspx
index 55b0226..ea2d869 100644
--- a/MedPred/jumper.aspx
+++ b/MedPred/jumper.aspx
@@ -1,5 +1,5 @@
-<%@ Page Title="" Language="C#" MasterPageFile="~/WebMasterPages/jQueryMobileNoCookie.Master" AutoEventWireup="true" CodeBehind="jumper.aspx.cs" Inherits="MedPred.jumper" %>
-