modifiche x nuovo URL Smart + redirect + gravatar...

This commit is contained in:
Samuele E. Locatelli
2016-12-14 09:42:03 +01:00
parent 437a5ec1e0
commit 8a7c2663af
12 changed files with 118 additions and 29 deletions
+8
View File
@@ -502,6 +502,7 @@
<Content Include="Scripts\jquery.mobile-1.4.5.min.js" />
<Content Include="Scripts\nativedroid2.js" />
<Content Include="Scripts\nd2settings.js" />
<Content Include="Smart\Default.aspx" />
<Content Include="unauthorized.aspx" />
<Content Include="About.aspx" />
<Content Include="App_Readme\Elmah.txt" />
@@ -1029,6 +1030,13 @@
<Compile Include="jumper.aspx.designer.cs">
<DependentUpon>jumper.aspx</DependentUpon>
</Compile>
<Compile Include="Smart\Default.aspx.cs">
<DependentUpon>Default.aspx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="Smart\Default.aspx.designer.cs">
<DependentUpon>Default.aspx</DependentUpon>
</Compile>
<Compile Include="unauthorized.aspx.cs">
<DependentUpon>unauthorized.aspx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
+16
View File
@@ -0,0 +1,16 @@
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="GPW.Smart.Default" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
</head>
<body>
<form id="form1" runat="server">
<div>
</div>
</form>
</body>
</html>
+18
View File
@@ -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"));
}
}
}
+26
View File
@@ -0,0 +1,26 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace GPW.Smart
{
public partial class Default
{
/// <summary>
/// form1 control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
}
}
+2 -1
View File
@@ -120,7 +120,8 @@
<!--Gestione auth dispositivi mobile-->
<add key="authKey" value="keyhammer" />
<add key="baseUrl" value="http://iis02/GPW/" />
<add key="baseWebUrl" value="http://keyhammer.ath.cx:8083/GPW/" />
<add key="baseWebUrl" value="http://seriate.steamware.net:8083/GPW/" />
<add key="GpwSmartUrl" value="../GPW-Smart" />
<!--Gestione SSRS-->
<add key="reportBaseUrl" value="http://sql-steam/ReportServer?/Steamware/" />
<!--<add key="reportBaseUrl" value="http://sql-steam/Reports/Pages/Report.aspx?ItemPath=/Steamware/" />-->
@@ -13,7 +13,7 @@ by editing this MSBuild file. In order to learn more about this please visit htt
<LaunchSiteAfterPublish>True</LaunchSiteAfterPublish>
<ExcludeApp_Data>True</ExcludeApp_Data>
<MSDeployServiceURL>https://IIS01:8172/MsDeploy.axd</MSDeployServiceURL>
<DeployIisAppPath>Default Web Site/GPW/Smart</DeployIisAppPath>
<DeployIisAppPath>Default Web Site/GPW-Smart</DeployIisAppPath>
<RemoteSitePhysicalPath />
<SkipExtraFilesOnServer>False</SkipExtraFilesOnServer>
<MSDeployPublishMethod>WMSVC</MSDeployPublishMethod>
@@ -8,7 +8,7 @@ by editing this MSBuild file. In order to learn more about this please visit htt
<WebPublishMethod>MSDeploy</WebPublishMethod>
<SiteUrlToLaunchAfterPublish />
<MSDeployServiceURL>https://IIS02:8172/MsDeploy.axd</MSDeployServiceURL>
<DeployIisAppPath>Default Web Site/GPW/Smart</DeployIisAppPath>
<DeployIisAppPath>Default Web Site/GPW-Smart</DeployIisAppPath>
<RemoteSitePhysicalPath />
<SkipExtraFilesOnServer>False</SkipExtraFilesOnServer>
<MSDeployPublishMethod>WMSVC</MSDeployPublishMethod>
+4 -3
View File
@@ -5,13 +5,14 @@
<div class="row">
<div class='col-xs-4 center-xs'>
<div class='box'>
<img class="profile-thumbnail" src="//lorempixel.com/200/200/people/9/" />
<img class="profile-thumbnail" src="https://www.gravatar.com/avatar/<%: hashEmail %>?d=mm" />
</div>
</div>
<div class='col-xs-8'>
<div class='box profile-text'>
<strong>Jane Doe</strong>
<span class='subline'>Super Power User</span>
<strong><%: cognomeNome %></strong>
<div class='subline'><%: email %></div>
<div class='subline'><%: IP %></div>
</div>
</div>
</div>
@@ -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;
}
}
}
}
+3 -10
View File
@@ -1,13 +1,6 @@
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="mod_title.ascx.cs" Inherits="GPW.WebUserControls.mod_title" %>
<div class="ui-grid-a">
<div class="ui-block-a text-left">
<div style="margin-left: auto; margin-right: auto; margin-top: 4px; margin-bottom: 4px;">
<asp:Label runat="server" ID="lblSwData" />
</div>
</div>
<div class="ui-block-b text-right">
<div style="margin-left: auto; margin-right: auto; margin-top: 4px; margin-bottom: 4px;">
<asp:Label runat="server" ID="lblIpData" />
</div>
<div class="ui-grid-solo">
<div class="text-left">
<asp:Label runat="server" ID="lblSwData" />
</div>
</div>
+8 -3
View File
@@ -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");
}
}
}
-9
View File
@@ -20,14 +20,5 @@ namespace GPW.WebUserControls {
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Label lblSwData;
/// <summary>
/// lblIpData control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Label lblIpData;
}
}