Fix procedura registrazione con QRCode (richiesta https SOLO in 1 pag)
This commit is contained in:
@@ -1,5 +1,8 @@
|
||||
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="MoonProTablet.Default" %>
|
||||
|
||||
<%@ Register Src="~/WebUserControls/mod_checkHttps.ascx" TagPrefix="uc1" TagName="mod_checkHttps" %>
|
||||
|
||||
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
@@ -12,6 +15,7 @@
|
||||
<h1>Smart device</h1>
|
||||
<p>
|
||||
Default page
|
||||
<uc1:mod_checkHttps runat="server" ID="mod_checkHttps" />
|
||||
</p>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
Generated
+9
@@ -20,5 +20,14 @@ namespace MoonProTablet {
|
||||
/// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo mod_checkHttps.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Campo generato automaticamente.
|
||||
/// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
|
||||
/// </remarks>
|
||||
protected global::MoonProTablet.WebUserControls.mod_checkHttps mod_checkHttps;
|
||||
}
|
||||
}
|
||||
|
||||
+19
-6
@@ -21,12 +21,9 @@
|
||||
<UpgradeBackupLocation>
|
||||
</UpgradeBackupLocation>
|
||||
<OldToolsVersion>4.0</OldToolsVersion>
|
||||
<IISExpressSSLPort>
|
||||
</IISExpressSSLPort>
|
||||
<IISExpressAnonymousAuthentication>
|
||||
</IISExpressAnonymousAuthentication>
|
||||
<IISExpressWindowsAuthentication>
|
||||
</IISExpressWindowsAuthentication>
|
||||
<IISExpressSSLPort>44328</IISExpressSSLPort>
|
||||
<IISExpressAnonymousAuthentication>enabled</IISExpressAnonymousAuthentication>
|
||||
<IISExpressWindowsAuthentication>disabled</IISExpressWindowsAuthentication>
|
||||
<IISExpressUseClassicPipelineMode />
|
||||
<TargetFrameworkProfile />
|
||||
<UseGlobalApplicationHostFile />
|
||||
@@ -471,6 +468,7 @@
|
||||
<Content Include="Scripts\WebForms\WebUIValidation.js" />
|
||||
<Content Include="StoricoTC.aspx" />
|
||||
<Content Include="Test.aspx" />
|
||||
<Content Include="tryLogin.aspx" />
|
||||
<Content Include="Turni.aspx" />
|
||||
<Content Include="User.aspx" />
|
||||
<Content Include="UserList.aspx" />
|
||||
@@ -483,6 +481,7 @@
|
||||
<Content Include="Web.Release.config">
|
||||
<DependentUpon>Web.config</DependentUpon>
|
||||
</Content>
|
||||
<Content Include="WebUserControls\mod_checkHttps.ascx" />
|
||||
<Content Include="WebUserControls\mod_commenti.ascx" />
|
||||
<Content Include="WebUserControls\mod_confProd.ascx" />
|
||||
<Content Include="WebUserControls\mod_controlliProd.ascx" />
|
||||
@@ -660,6 +659,13 @@
|
||||
<Compile Include="Test.aspx.designer.cs">
|
||||
<DependentUpon>Test.aspx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="tryLogin.aspx.cs">
|
||||
<DependentUpon>tryLogin.aspx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
</Compile>
|
||||
<Compile Include="tryLogin.aspx.designer.cs">
|
||||
<DependentUpon>tryLogin.aspx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Turni.aspx.cs">
|
||||
<DependentUpon>Turni.aspx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
@@ -696,6 +702,13 @@
|
||||
<Compile Include="WebMasterPages\BootstrapNoUpdPnl.Master.designer.cs">
|
||||
<DependentUpon>BootstrapNoUpdPnl.Master</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="WebUserControls\mod_checkHttps.ascx.cs">
|
||||
<DependentUpon>mod_checkHttps.ascx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
</Compile>
|
||||
<Compile Include="WebUserControls\mod_checkHttps.ascx.designer.cs">
|
||||
<DependentUpon>mod_checkHttps.ascx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="WebUserControls\mod_commenti.ascx.cs">
|
||||
<DependentUpon>mod_commenti.ascx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
|
||||
@@ -1,9 +1,12 @@
|
||||
<%@ Page Title="" Language="C#" MasterPageFile="~/WebMasterPages/Bootstrap.Master" AutoEventWireup="true" CodeBehind="MappaStato.aspx.cs" Inherits="MoonProTablet.MappaStato" %>
|
||||
|
||||
<%@ Register Src="~/WebUserControls/mod_mappaStato.ascx" TagName="mod_mappaStato" TagPrefix="uc1" %>
|
||||
<%@ Register Src="~/WebUserControls/mod_checkHttps.ascx" TagPrefix="uc1" TagName="mod_checkHttps" %>
|
||||
|
||||
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
|
||||
<div class="container-fluid my-3 px-3 px-md-4" role="main">
|
||||
<uc1:mod_checkHttps runat="server" ID="mod_checkHttps" />
|
||||
<uc1:mod_mappaStato ID="mod_mappaStato1" runat="server" />
|
||||
</div>
|
||||
</asp:Content>
|
||||
|
||||
Generated
+9
@@ -12,6 +12,15 @@ namespace MoonProTablet {
|
||||
|
||||
public partial class MappaStato {
|
||||
|
||||
/// <summary>
|
||||
/// Controllo mod_checkHttps.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Campo generato automaticamente.
|
||||
/// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
|
||||
/// </remarks>
|
||||
protected global::MoonProTablet.WebUserControls.mod_checkHttps mod_checkHttps;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo mod_mappaStato1.
|
||||
/// </summary>
|
||||
|
||||
@@ -54,9 +54,6 @@
|
||||
<add key="_logDir" value="~/logs/" />
|
||||
<add key="_logLevel" value="5" />
|
||||
<add key="_logMaxMb" value="30" />
|
||||
<!--Ottimizzazioni liberie esterne-->
|
||||
<add key="EnableCdnAjax" value="false" />
|
||||
<add key="EnableCdnJQ" value="false" />
|
||||
<!--Gestione auth dispositivi mobile-->
|
||||
<add key="cookieName" value="AuthMoonPro" />
|
||||
<add key="mainPage" value="~/MappaStato.aspx" />
|
||||
|
||||
@@ -55,9 +55,6 @@
|
||||
<add key="_logDir" value="~/logs/" />
|
||||
<add key="_logLevel" value="5" />
|
||||
<add key="_logMaxMb" value="30" />
|
||||
<!--Ottimizzazioni liberie esterne-->
|
||||
<add key="EnableCdnAjax" value="false" />
|
||||
<add key="EnableCdnJQ" value="false" />
|
||||
<!--Gestione auth dispositivi mobile-->
|
||||
<add key="cookieName" value="AuthMoonPro" />
|
||||
<add key="mainPage" value="~/MappaStato.aspx" />
|
||||
|
||||
@@ -87,9 +87,6 @@
|
||||
<add key="_logDir" value="~/logs/" />
|
||||
<add key="_logLevel" value="7" />
|
||||
<add key="_logMaxMb" value="30" />
|
||||
<!--Ottimizzazioni liberie esterne-->
|
||||
<add key="EnableCdnAjax" value="false" />
|
||||
<add key="EnableCdnJQ" value="true" />
|
||||
<!--Gestione auth dispositivi mobile-->
|
||||
<add key="cookieName" value="Auth_MP_TAB" />
|
||||
<add key="mainPage" value="~/MappaStato.aspx" />
|
||||
|
||||
@@ -87,9 +87,6 @@
|
||||
<add key="_logDir" value="~/logs/" />
|
||||
<add key="_logLevel" value="7" />
|
||||
<add key="_logMaxMb" value="30" />
|
||||
<!--Ottimizzazioni liberie esterne-->
|
||||
<add key="EnableCdnAjax" value="false" />
|
||||
<add key="EnableCdnJQ" value="true" />
|
||||
<!--Gestione auth dispositivi mobile-->
|
||||
<add key="cookieName" value="Auth_MP_TAB" />
|
||||
<add key="mainPage" value="~/MappaStato.aspx" />
|
||||
|
||||
+2
-4
@@ -49,7 +49,6 @@
|
||||
<add key="downloadPath" value="c:\Steamware\installers\MP\TAB" />
|
||||
<add key="doShrinkFolder" value="true" />
|
||||
<add key="CodModulo" value="MoonPro" />
|
||||
<add key="EmbedQRead" value="true" />
|
||||
<!--impostazione cambio tempo calcolato tra minuti-ore-gg-->
|
||||
<add key="maxMinuti" value="60" />
|
||||
<add key="maxOre" value="1440" />
|
||||
@@ -71,9 +70,6 @@
|
||||
<add key="_logDir" value="~/logs/" />
|
||||
<add key="_logLevel" value="7" />
|
||||
<add key="_logMaxMb" value="30" />
|
||||
<!--Ottimizzazioni liberie esterne-->
|
||||
<add key="EnableCdnAjax" value="false" />
|
||||
<add key="EnableCdnJQ" value="true" />
|
||||
<!--Gestione auth dispositivi mobile-->
|
||||
<add key="cookieName" value="Auth_MP_TAB" />
|
||||
<add key="mainPage" value="~/MappaStato.aspx" />
|
||||
@@ -81,6 +77,8 @@
|
||||
<add key="user" value="Mobile" />
|
||||
<add key="cookieDayExpire" value="3650" />
|
||||
<add key="safePages" value="Test#regNewDevice" />
|
||||
<add key="EmbedQRead" value="true" />
|
||||
<add key="forceSecurePages" value="regNewDevice" />
|
||||
<!--conf commenti e ricalcoli-->
|
||||
<add key="idxTipoCommento" value="999" />
|
||||
<add key="commEnableEditDel" value="true" />
|
||||
|
||||
@@ -5,6 +5,13 @@
|
||||
<h3 class="text-center">QR SCanner</h3>
|
||||
</div>
|
||||
<div class="col-12 text-center">
|
||||
<asp:UpdatePanel runat="server" ID="upnDecode">
|
||||
<ContentTemplate>
|
||||
<asp:TextBox runat="server" ID="txtQRCode" Width="20em" AutoPostBack="true" OnTextChanged="txtQRCode_TextChanged" />
|
||||
<asp:HyperLink runat="server" ID="hlReload" Target="_blank" NavigateUrl="~/" CssClass="btn btn-success"><i class="fa fa-arrow-circle-right"></i> GO</asp:HyperLink>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
<hr />
|
||||
<video id="preview"></video>
|
||||
<script type="text/javascript">
|
||||
let scanner = new Instascan.Scanner({ video: document.getElementById('preview') });
|
||||
@@ -23,12 +30,5 @@
|
||||
console.error(e);
|
||||
});
|
||||
</script>
|
||||
<br />
|
||||
<asp:UpdatePanel runat="server" ID="upnDecode">
|
||||
<ContentTemplate>
|
||||
<asp:TextBox runat="server" ID="txtQRCode" Width="20em" AutoPostBack="true" OnTextChanged="txtQRCode_TextChanged" />
|
||||
<asp:HyperLink runat="server" ID="hlReload" Target="_blank" NavigateUrl="~/" CssClass="btn btn-success"><i class="fa fa-arrow-circle-right"></i> GO</asp:HyperLink>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -23,9 +23,11 @@ namespace MoonProTablet.WebUserControls
|
||||
|
||||
protected void txtQRCode_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
hlReload.NavigateUrl=txtQRCode.Text.Trim();
|
||||
hlReload.Text = txtQRCode.Text.Trim();
|
||||
hlReload.Enabled = true;
|
||||
//// rimando a pagina di login...
|
||||
//Response.Redirect(txtQRCode.Text.Trim());
|
||||
//hlReload.NavigateUrl=txtQRCode.Text.Trim();
|
||||
//hlReload.Text = txtQRCode.Text.Trim();
|
||||
//hlReload.Enabled = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="mod_checkHttps.ascx.cs" Inherits="MoonProTablet.WebUserControls.mod_checkHttps" %>
|
||||
@@ -0,0 +1,36 @@
|
||||
using SteamWare;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using System.Web.UI;
|
||||
using System.Web.UI.WebControls;
|
||||
|
||||
namespace MoonProTablet.WebUserControls
|
||||
{
|
||||
public partial class mod_checkHttps : SteamWare.UserControl
|
||||
{
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
if (!Page.IsPostBack)
|
||||
{
|
||||
// se pagina richiesta in http ma con QR code rimando in https...
|
||||
bool needHttps = memLayer.ML.CRS("forceSecurePages").IndexOf(titolo) >= 0;
|
||||
if (needHttps != Request.IsSecureConnection)
|
||||
{
|
||||
string newUrl = Request.Url.AbsoluteUri;
|
||||
// in questo caso scambio http <--> https
|
||||
if (needHttps)
|
||||
{
|
||||
newUrl = newUrl.Replace("http://", "https://");
|
||||
}
|
||||
else
|
||||
{
|
||||
newUrl = newUrl.Replace("https://", "http://");
|
||||
}
|
||||
Response.Redirect(newUrl);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// Codice generato da uno strumento.
|
||||
//
|
||||
// Le modifiche a questo file possono causare un comportamento non corretto e verranno perse se
|
||||
// il codice viene rigenerato.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace MoonProTablet.WebUserControls
|
||||
{
|
||||
|
||||
|
||||
public partial class mod_checkHttps
|
||||
{
|
||||
}
|
||||
}
|
||||
@@ -33,9 +33,9 @@ namespace MoonProTablet.WebUserControls
|
||||
/// <param name="e"></param>
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
// prima apertura registro NO popup = refresh enabled
|
||||
if (!Page.IsPostBack)
|
||||
{
|
||||
// prima apertura registro NO popup = refresh enabled
|
||||
memLayer.ML.setSessionVal("refreshEnabled", true);
|
||||
}
|
||||
// se ho user/dominio e matricola in sessione NON controllo coockie
|
||||
|
||||
@@ -21,14 +21,12 @@ namespace MoonProTablet
|
||||
string UserAuthKey = memLayer.ML.QSS("UserAuthKey");
|
||||
if (MatrOpr >= 0 && UserAuthKey != "")
|
||||
{
|
||||
// reset utente...
|
||||
|
||||
// salvo in sessione
|
||||
memLayer.ML.setSessionVal("MatrOpr", MatrOpr);
|
||||
memLayer.ML.setSessionVal("UserAuthKey", UserAuthKey);
|
||||
}
|
||||
// redirect...
|
||||
Response.Redirect("regNewDevice");
|
||||
Response.Redirect("tryLogin");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2,10 +2,13 @@
|
||||
|
||||
<%@ Register Src="WebUserControls/mod_regNewDevice.ascx" TagName="mod_regNewDevice" TagPrefix="uc1" %>
|
||||
<%@ Register Src="~/WebUserControls/mod_QRScanner.ascx" TagPrefix="uc1" TagName="mod_QRScanner" %>
|
||||
<%@ Register Src="~/WebUserControls/mod_checkHttps.ascx" TagPrefix="uc1" TagName="mod_checkHttps" %>
|
||||
|
||||
|
||||
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
|
||||
<div class="container-fluid my-3" role="main">
|
||||
<uc1:mod_checkHttps runat="server" ID="mod_checkHttps" />
|
||||
<uc1:mod_regNewDevice ID="mod_regNewDevice1" runat="server" />
|
||||
<uc1:mod_QRScanner runat="server" id="mod_QRScanner" />
|
||||
</div>
|
||||
|
||||
Generated
+9
@@ -12,6 +12,15 @@ namespace MoonProTablet {
|
||||
|
||||
public partial class regNewDevice {
|
||||
|
||||
/// <summary>
|
||||
/// Controllo mod_checkHttps.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Campo generato automaticamente.
|
||||
/// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
|
||||
/// </remarks>
|
||||
protected global::MoonProTablet.WebUserControls.mod_checkHttps mod_checkHttps;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo mod_regNewDevice1.
|
||||
/// </summary>
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="tryLogin.aspx.cs" Inherits="MoonProTablet.tryLogin" %>
|
||||
|
||||
<%@ Register Src="~/WebUserControls/mod_enrollByJumperAuthKey.ascx" TagPrefix="uc1" TagName="mod_enrollByJumperAuthKey" %>
|
||||
|
||||
|
||||
<!DOCTYPE html>
|
||||
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head runat="server">
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<title></title>
|
||||
</head>
|
||||
<body>
|
||||
<form id="form1" runat="server">
|
||||
<div>
|
||||
<uc1:mod_enrollByJumperAuthKey runat="server" ID="mod_enrollByJumperAuthKey" />
|
||||
</div>
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,17 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using System.Web.UI;
|
||||
using System.Web.UI.WebControls;
|
||||
|
||||
namespace MoonProTablet
|
||||
{
|
||||
public partial class tryLogin : System.Web.UI.Page
|
||||
{
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
Generated
+33
@@ -0,0 +1,33 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <generato automaticamente>
|
||||
// Codice generato da uno strumento.
|
||||
//
|
||||
// Le modifiche a questo file possono causare un comportamento non corretto e verranno perse se
|
||||
// il codice viene rigenerato.
|
||||
// </generato automaticamente>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace MoonProTablet {
|
||||
|
||||
|
||||
public partial class tryLogin {
|
||||
|
||||
/// <summary>
|
||||
/// Controllo form1.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Campo generato automaticamente.
|
||||
/// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo mod_enrollByJumperAuthKey.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Campo generato automaticamente.
|
||||
/// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
|
||||
/// </remarks>
|
||||
protected global::MoonProTablet.WebUserControls.mod_enrollByJumperAuthKey mod_enrollByJumperAuthKey;
|
||||
}
|
||||
}
|
||||
@@ -5,42 +5,6 @@ namespace MoonProTablet
|
||||
{
|
||||
public class utility
|
||||
{
|
||||
/// <summary>
|
||||
/// determina se si debba usare CDN x scaricare librerie asp.net ajax
|
||||
/// </summary>
|
||||
public static bool EnableCdnAjax
|
||||
{
|
||||
get
|
||||
{
|
||||
bool answ = false;
|
||||
try
|
||||
{
|
||||
answ = memLayer.ML.confReadBool("EnableCdnAjax");
|
||||
}
|
||||
catch
|
||||
{
|
||||
}
|
||||
return answ;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// determina se si debba usare CDN x scaricare librerie jquery
|
||||
/// </summary>
|
||||
public static bool EnableCdnJQ
|
||||
{
|
||||
get
|
||||
{
|
||||
bool answ = false;
|
||||
try
|
||||
{
|
||||
answ = memLayer.ML.confReadBool("EnableCdnJQ");
|
||||
}
|
||||
catch
|
||||
{
|
||||
}
|
||||
return answ;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// formatta la durata in minuti in un modo "human readable" gg/min/ore
|
||||
/// </summary>
|
||||
|
||||
Reference in New Issue
Block a user