From 8a7c2663afff7069edadd1a03182a9f9ca2ed269 Mon Sep 17 00:00:00 2001 From: "Samuele E. Locatelli" Date: Wed, 14 Dec 2016 09:42:03 +0100 Subject: [PATCH] modifiche x nuovo URL Smart + redirect + gravatar... --- GPW/GPW.csproj | 8 +++++ GPW/Smart/Default.aspx | 16 ++++++++++ GPW/Smart/Default.aspx.cs | 18 +++++++++++ GPW/Smart/Default.aspx.designer.cs | 26 +++++++++++++++ GPW/Web.config | 3 +- .../Properties/PublishProfiles/IIS01.pubxml | 2 +- .../Properties/PublishProfiles/IIS02.pubxml | 2 +- GPW_Smart/WebUserControls/mod_opzioniSx.ascx | 7 ++-- .../WebUserControls/mod_opzioniSx.ascx.cs | 32 ++++++++++++++++++- GPW_Smart/WebUserControls/mod_title.ascx | 13 ++------ GPW_Smart/WebUserControls/mod_title.ascx.cs | 11 +++++-- .../mod_title.ascx.designer.cs | 9 ------ 12 files changed, 118 insertions(+), 29 deletions(-) create mode 100644 GPW/Smart/Default.aspx create mode 100644 GPW/Smart/Default.aspx.cs create mode 100644 GPW/Smart/Default.aspx.designer.cs diff --git a/GPW/GPW.csproj b/GPW/GPW.csproj index 69f7c61..4540fa0 100644 --- a/GPW/GPW.csproj +++ b/GPW/GPW.csproj @@ -502,6 +502,7 @@ + @@ -1029,6 +1030,13 @@ jumper.aspx + + Default.aspx + ASPXCodeBehind + + + Default.aspx + unauthorized.aspx ASPXCodeBehind diff --git a/GPW/Smart/Default.aspx b/GPW/Smart/Default.aspx new file mode 100644 index 0000000..153d578 --- /dev/null +++ b/GPW/Smart/Default.aspx @@ -0,0 +1,16 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="GPW.Smart.Default" %> + + + + + + + + +
+
+ +
+
+ + diff --git a/GPW/Smart/Default.aspx.cs b/GPW/Smart/Default.aspx.cs new file mode 100644 index 0000000..550f1fe --- /dev/null +++ b/GPW/Smart/Default.aspx.cs @@ -0,0 +1,18 @@ +using SteamWare; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Web; +using System.Web.UI; +using System.Web.UI.WebControls; + +namespace GPW.Smart +{ + public partial class Default : System.Web.UI.Page + { + protected void Page_Load(object sender, EventArgs e) + { + Response.Redirect(memLayer.ML.CRS("GpwSmartUrl")); + } + } +} \ No newline at end of file diff --git a/GPW/Smart/Default.aspx.designer.cs b/GPW/Smart/Default.aspx.designer.cs new file mode 100644 index 0000000..4290006 --- /dev/null +++ b/GPW/Smart/Default.aspx.designer.cs @@ -0,0 +1,26 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace GPW.Smart +{ + + + public partial class Default + { + + /// + /// form1 control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + } +} diff --git a/GPW/Web.config b/GPW/Web.config index 6c64f04..7d6fc58 100644 --- a/GPW/Web.config +++ b/GPW/Web.config @@ -120,7 +120,8 @@ - + + diff --git a/GPW_Smart/Properties/PublishProfiles/IIS01.pubxml b/GPW_Smart/Properties/PublishProfiles/IIS01.pubxml index 0885e37..4141657 100644 --- a/GPW_Smart/Properties/PublishProfiles/IIS01.pubxml +++ b/GPW_Smart/Properties/PublishProfiles/IIS01.pubxml @@ -13,7 +13,7 @@ by editing this MSBuild file. In order to learn more about this please visit htt True True https://IIS01:8172/MsDeploy.axd - Default Web Site/GPW/Smart + Default Web Site/GPW-Smart False WMSVC diff --git a/GPW_Smart/Properties/PublishProfiles/IIS02.pubxml b/GPW_Smart/Properties/PublishProfiles/IIS02.pubxml index 849f4b3..0304f3f 100644 --- a/GPW_Smart/Properties/PublishProfiles/IIS02.pubxml +++ b/GPW_Smart/Properties/PublishProfiles/IIS02.pubxml @@ -8,7 +8,7 @@ by editing this MSBuild file. In order to learn more about this please visit htt MSDeploy https://IIS02:8172/MsDeploy.axd - Default Web Site/GPW/Smart + Default Web Site/GPW-Smart False WMSVC diff --git a/GPW_Smart/WebUserControls/mod_opzioniSx.ascx b/GPW_Smart/WebUserControls/mod_opzioniSx.ascx index cf10aa8..2df3865 100644 --- a/GPW_Smart/WebUserControls/mod_opzioniSx.ascx +++ b/GPW_Smart/WebUserControls/mod_opzioniSx.ascx @@ -5,13 +5,14 @@
- +
- Jane Doe - Super Power User + <%: cognomeNome %> +
<%: email %>
+
<%: IP %>
diff --git a/GPW_Smart/WebUserControls/mod_opzioniSx.ascx.cs b/GPW_Smart/WebUserControls/mod_opzioniSx.ascx.cs index 8ab3c84..56d61fe 100644 --- a/GPW_Smart/WebUserControls/mod_opzioniSx.ascx.cs +++ b/GPW_Smart/WebUserControls/mod_opzioniSx.ascx.cs @@ -1,4 +1,5 @@ -using System; +using SteamWare; +using System; using System.Collections.Generic; using System.Linq; using System.Web; @@ -13,5 +14,34 @@ namespace GPW_Smart.WebUserControls { } + + public string hashEmail + { + get + { + return memLayer.ML.StringSessionObj("hashEmail"); + } + } + public string email + { + get + { + return memLayer.ML.StringSessionObj("email"); + } + } + public string cognomeNome + { + get + { + return memLayer.ML.StringSessionObj("cognomeNome"); + } + } + public string IP + { + get + { + return Request.UserHostName; + } + } } } \ No newline at end of file diff --git a/GPW_Smart/WebUserControls/mod_title.ascx b/GPW_Smart/WebUserControls/mod_title.ascx index 5b3cde6..aa12edc 100644 --- a/GPW_Smart/WebUserControls/mod_title.ascx +++ b/GPW_Smart/WebUserControls/mod_title.ascx @@ -1,13 +1,6 @@ <%@ Control Language="C#" AutoEventWireup="true" CodeBehind="mod_title.ascx.cs" Inherits="GPW.WebUserControls.mod_title" %> -
-
-
- -
-
-
-
- -
+
+
+
diff --git a/GPW_Smart/WebUserControls/mod_title.ascx.cs b/GPW_Smart/WebUserControls/mod_title.ascx.cs index dab44f9..afba071 100644 --- a/GPW_Smart/WebUserControls/mod_title.ascx.cs +++ b/GPW_Smart/WebUserControls/mod_title.ascx.cs @@ -26,7 +26,6 @@ namespace GPW.WebUserControls checkUser(); // sistemo visualizzazione postazione_IP = Request.UserHostName; - lblIpData.Text = postazione_IP; try { lblSwData.Text = memLayer.ML.StringSessionObj("cognomeNome"); @@ -59,7 +58,7 @@ namespace GPW.WebUserControls if (cookie == null || cookie.Value=="") { // rimando pagina x registrazione devices - Response.Redirect("~/A3/regNewDevice.aspx"); + Response.Redirect("~/regNewDevice.aspx"); } else { @@ -89,21 +88,27 @@ namespace GPW.WebUserControls // salvo in sessione utente memLayer.ML.setSessionVal("idxDipendente", idxDipendente); string CognomeNome = ""; + string email = ""; + string hashEmail = ""; try { DS_Applicazione.DipendentiRow rigaDip = DataProxy.DP.taDipendenti.getByIdx(idxDipendente)[0]; CognomeNome = string.Format("{0} {1}", rigaDip.Cognome, rigaDip.Nome); + email = rigaDip.email; + hashEmail = SteamCrypto.getHashStringMD5(email); } catch { } memLayer.ML.setSessionVal("cognomeNome", CognomeNome); + memLayer.ML.setSessionVal("email", email); + memLayer.ML.setSessionVal("hashEmail", hashEmail); } else { // svuoto cookie... memLayer.ML.emptyCookieVal("AuthGPW"); // rimando pagina x registrazione devices - Response.Redirect("~/A3/regNewDevice.aspx"); + Response.Redirect("~/regNewDevice.aspx"); } } } diff --git a/GPW_Smart/WebUserControls/mod_title.ascx.designer.cs b/GPW_Smart/WebUserControls/mod_title.ascx.designer.cs index 919f90a..983612a 100644 --- a/GPW_Smart/WebUserControls/mod_title.ascx.designer.cs +++ b/GPW_Smart/WebUserControls/mod_title.ascx.designer.cs @@ -20,14 +20,5 @@ namespace GPW.WebUserControls { /// To modify move field declaration from designer file to code-behind file. /// protected global::System.Web.UI.WebControls.Label lblSwData; - - /// - /// lblIpData control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.Label lblIpData; } }