Completamento pagine di login sino ad auth device...
This commit is contained in:
Binary file not shown.
Binary file not shown.
Binary file not shown.
+2
-2
@@ -13,10 +13,10 @@
|
||||
Web Schedulatore Consegne Rigamonti
|
||||
<div style="text-align: center; margin: auto; width:810px;">
|
||||
<div style="min-width: 250px; min-height: 250px; padding: 10px; float: left;">
|
||||
Inserimento Commesse
|
||||
Inserimento Impegno
|
||||
</div>
|
||||
<div style="min-width: 250px; min-height: 250px; padding: 10px; float: left;">
|
||||
Visualizzazione Commesse
|
||||
Visualizzazione Impegni
|
||||
</div>
|
||||
<div style="min-width: 250px; min-height: 250px; padding: 10px; float: left;">
|
||||
Gestione squadre
|
||||
|
||||
@@ -11,7 +11,11 @@ namespace WebSCR
|
||||
{
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
#if false
|
||||
// resetto i dati utente all'accesso alla pagina default...
|
||||
devicesAuthProxy.stObj.clearAllUserData();
|
||||
Response.Redirect("Accettazione");
|
||||
#endif
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
<%@ Page Title="" Language="C#" MasterPageFile="~/JQMob.Master" AutoEventWireup="true" CodeBehind="ElencoImpegni.aspx.cs" Inherits="WebSCR.ElencoImpegni" %>
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
|
||||
</asp:Content>
|
||||
@@ -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 WebSCR
|
||||
{
|
||||
public partial class ElencoImpegni : System.Web.UI.Page
|
||||
{
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
Generated
+17
@@ -0,0 +1,17 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <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 WebSCR
|
||||
{
|
||||
|
||||
|
||||
public partial class ElencoImpegni
|
||||
{
|
||||
}
|
||||
}
|
||||
+3
-2
@@ -1,7 +1,8 @@
|
||||
<%@ Master Language="C#" AutoEventWireup="true" CodeBehind="JQMob.master.cs" Inherits="WebSCR.JQMob" %>
|
||||
|
||||
<%@ Register Src="~/WebUserControls/mod_footer.ascx" TagPrefix="uc1" TagName="mod_footer" %>
|
||||
<%@ Register Src="~/WebUserControls/mod_header.ascx" TagPrefix="uc1" TagName="mod_header" %>
|
||||
<%@ Register Src="~/WebUserControls/mod_header.ascx" TagPrefix="uc2" TagName="mod_header" %>
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -52,7 +53,7 @@
|
||||
<div id="textWrapper">
|
||||
<div data-role="page" class="ui-responsive-panel" data-url="<%= Request.Url.PathAndQuery %>">
|
||||
<div data-role="header" data-position="fixed" data-theme="a">
|
||||
<uc1:mod_header runat="server" ID="mod_header" />
|
||||
<uc2:mod_header runat="server" ID="mod_header" />
|
||||
</div>
|
||||
<div role="main" class="ui-content">
|
||||
<asp:ContentPlaceHolder ID="ContentPlaceHolder1" runat="server">
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
<%@ Page Title="" Language="C#" MasterPageFile="~/JQMob.Master" AutoEventWireup="true" CodeBehind="NuovoImpegno.aspx.cs" Inherits="WebSCR.NuovoImpegno" %>
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
|
||||
</asp:Content>
|
||||
@@ -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 WebSCR
|
||||
{
|
||||
public partial class NuovoImpegno : System.Web.UI.Page
|
||||
{
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
Generated
+17
@@ -0,0 +1,17 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <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 WebSCR
|
||||
{
|
||||
|
||||
|
||||
public partial class NuovoImpegno
|
||||
{
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
<%@ Page Title="" Language="C#" MasterPageFile="~/JQMob.Master" AutoEventWireup="true" CodeBehind="Squadre.aspx.cs" Inherits="WebSCR.Squadre" %>
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
|
||||
</asp:Content>
|
||||
@@ -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 WebSCR
|
||||
{
|
||||
public partial class Squadre : System.Web.UI.Page
|
||||
{
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
Generated
+17
@@ -0,0 +1,17 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <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 WebSCR
|
||||
{
|
||||
|
||||
|
||||
public partial class Squadre
|
||||
{
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
<%@ Page Title="" Language="C#" MasterPageFile="~/JQMob.Master" AutoEventWireup="true" CodeBehind="UserAdmin.aspx.cs" Inherits="WebSCR.UserAdmin" %>
|
||||
|
||||
<%@ Register Src="WebUserControls/mod_enrollByEmail.ascx" TagName="mod_enrollByEmail" TagPrefix="uc2" %>
|
||||
|
||||
<%@ Register Src="WebUserControls/mod_elencoRichResetUtenti.ascx" TagName="mod_elencoRichResetUtenti" TagPrefix="uc3" %>
|
||||
|
||||
<%@ Register src="WebUserControls/mod_enrollByAuthKey.ascx" tagname="mod_enrollByAuthKey" tagprefix="uc4" %>
|
||||
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
|
||||
<div id="divUnauth" runat="server">
|
||||
<h1>Gestione Accesso WebSCR</h1>
|
||||
Attenzione, se non è possibile accedere all'applicazione prego richiedere autorizzazione al responsabile del progetto.
|
||||
<br />
|
||||
<uc4:mod_enrollByAuthKey ID="mod_enrollByAuthKey1" runat="server" />
|
||||
<br />
|
||||
<uc2:mod_enrollByEmail ID="mod_enrollByEmail1" runat="server" />
|
||||
</div>
|
||||
<div id="divAdmin" runat="server" data-role="collapsible" data-iconpos="right" data-mini="true" data-theme="b" data-content-theme="b" data-collapsed="false">
|
||||
<h4>Admin Task</h4>
|
||||
<uc3:mod_elencoRichResetUtenti ID="mod_elencoRichResetUtenti1" runat="server" />
|
||||
</div>
|
||||
</asp:Content>
|
||||
@@ -0,0 +1,45 @@
|
||||
using SteamWare;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using System.Web.UI;
|
||||
using System.Web.UI.WebControls;
|
||||
using SteamWare;
|
||||
|
||||
namespace WebSCR
|
||||
{
|
||||
public partial class UserAdmin : System.Web.UI.Page
|
||||
{
|
||||
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...
|
||||
mod_enrollByAuthKey1.Visible = (Request.QueryString["addDeviceByKey"] == "lvabe");
|
||||
// se è admin vede anche i controlli x abilitare richieste utenti & co...
|
||||
divAdmin.Visible = userIsAdmin;
|
||||
divUnauth.Visible=!userIsAdmin;
|
||||
}
|
||||
|
||||
public bool userIsAdmin
|
||||
{
|
||||
get
|
||||
{
|
||||
bool answ = false;
|
||||
try
|
||||
{
|
||||
answ = devicesAuthProxy.stObj.userHasRight("SuperAdmin");
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
return answ;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
Generated
+60
@@ -0,0 +1,60 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <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 WebSCR {
|
||||
|
||||
|
||||
public partial class UserAdmin {
|
||||
|
||||
/// <summary>
|
||||
/// divUnauth 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.HtmlGenericControl divUnauth;
|
||||
|
||||
/// <summary>
|
||||
/// mod_enrollByAuthKey1 control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::WebSCR.WebUserControls.mod_enrollByAuthKey mod_enrollByAuthKey1;
|
||||
|
||||
/// <summary>
|
||||
/// mod_enrollByEmail1 control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::WebSCR.WebUserControls.mod_enrollByEmail mod_enrollByEmail1;
|
||||
|
||||
/// <summary>
|
||||
/// divAdmin 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.HtmlGenericControl divAdmin;
|
||||
|
||||
/// <summary>
|
||||
/// mod_elencoRichResetUtenti1 control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::WebSCR.WebUserControls.mod_elencoRichResetUtenti mod_elencoRichResetUtenti1;
|
||||
}
|
||||
}
|
||||
+53
-11
@@ -8,8 +8,42 @@
|
||||
<section name="errorFilter" requirePermission="false" type="Elmah.ErrorFilterSectionHandler, Elmah" />
|
||||
</sectionGroup>
|
||||
</configSections>
|
||||
<appSettings />
|
||||
<connectionStrings />
|
||||
<appSettings>
|
||||
<!--parametri base-->
|
||||
<add key="intUpdatePagina_ms" value="240000" />
|
||||
<!--nome sw e versioni-->
|
||||
<add key="CodModulo" value="WebSCR" />
|
||||
<add key="AutoAuth" value="true" />
|
||||
<add key="baseUrl" value="http://iis02/WebSCR" />
|
||||
<!--Logging-->
|
||||
<add key="_logDir" value="~/logs/"/>
|
||||
<add key="doShrinkFolder" value="true"/>
|
||||
<add key="_logLevel" value="6"/>
|
||||
<add key="_logMaxMb" value="30"/>
|
||||
<!--Gestione email-->
|
||||
<add key="_fromEmail" value="steamwarebot@gmail.com"/>
|
||||
<add key="_smtpCli" value="smtp.gmail.com"/>
|
||||
<add key="_emailUser" value="steamwarebot@gmail.com"/>
|
||||
<add key="_emailPwd" value="drmfsls16"/>
|
||||
<add key="_enableSSL" value="true"/>
|
||||
<!--gestione auth dispositivi-->
|
||||
<add key="AuthCookieName" value="AuthDevice"/>
|
||||
<add key="defaultDomain" value="WebSCR" />
|
||||
<add key="enablePlain" value="true"/>
|
||||
<add key="urlGestUtenti" value="UserAdmin"/>
|
||||
<add key="adminEmail" value="samuele@steamware.net"/>
|
||||
<add key="PageNoIndex" value="UserAdmin#Test" />
|
||||
<!--stringhe connessione-->
|
||||
<!--<add key="WebSCRConnectionString" value="Data Source=10.74.82.217\SQL2008R2;Initial Catalog=WebSCR;Persist Security Info=True;User ID=sa;Password=keyhammer;" />
|
||||
<add key="WebSCRFilesConnectionString" value="Data Source=10.74.82.217\SQL2008R2;Initial Catalog=WebSCR_files;Persist Security Info=True;User ID=sa;Password=keyhammer;" />
|
||||
<add key="DevicesAuthConnectionString" value="Data Source=10.74.82.217\SQL2008R2;Initial Catalog=WebSCR;Persist Security Info=True;User ID=sa;Password=keyhammer;" />-->
|
||||
</appSettings>
|
||||
<connectionStrings>
|
||||
<!--<add name="WebSCR_Data.Properties.Settings.WebSCRConnectionString" connectionString="Data Source=10.74.82.217\SQL2008R2;Initial Catalog=WebSCR;Persist Security Info=True;User ID=sa;Password=keyhammer" providerName="System.Data.SqlClient" />
|
||||
<add name="WebSCR_Data.Properties.Settings.WebSCR_filesConnectionString" connectionString="Data Source=10.74.82.217\SQL2008R2;Initial Catalog=WebSCR_files;Persist Security Info=True;User ID=sa;Password=keyhammer" providerName="System.Data.SqlClient" />
|
||||
<add name="SteamWare.Properties.Settings.WebSCRConnectionString" connectionString="Data Source=10.74.82.217\SQL2008R2;Initial Catalog=WebSCR;Persist Security Info=True;User ID=sa;Password=keyhammer" providerName="System.Data.SqlClient" />
|
||||
<add name="SteamWare.Properties.Settings.DS_AuthConnectionString" connectionString="Data Source=10.74.82.217\SQL2008R2;Initial Catalog=WebSCR;Persist Security Info=True;User ID=sa;Password=keyhammer" providerName="System.Data.SqlClient" />-->
|
||||
</connectionStrings>
|
||||
<!--
|
||||
For a description of web.config changes for .NET 4.5 see http://go.microsoft.com/fwlink/?LinkId=235367.
|
||||
|
||||
@@ -38,32 +72,40 @@
|
||||
<error statusCode="404" redirect="FileNotFound.htm" />
|
||||
</customErrors>
|
||||
-->
|
||||
<pages controlRenderingCompatibilityVersion="3.5" clientIDMode="AutoID"><controls>
|
||||
<add assembly="Microsoft.AspNet.Web.Optimization.WebForms" namespace="Microsoft.AspNet.Web.Optimization.WebForms" tagPrefix="webopt" />
|
||||
</controls></pages>
|
||||
<httpModules>
|
||||
<pages controlRenderingCompatibilityVersion="3.5" clientIDMode="AutoID">
|
||||
<namespaces>
|
||||
<add namespace="System.Web.Optimization" />
|
||||
</namespaces>
|
||||
<controls>
|
||||
<add assembly="Microsoft.AspNet.Web.Optimization.WebForms" namespace="Microsoft.AspNet.Web.Optimization.WebForms" tagPrefix="webopt" />
|
||||
</controls>
|
||||
</pages>
|
||||
<httpModules>
|
||||
<add name="ErrorLog" type="Elmah.ErrorLogModule, Elmah" />
|
||||
<add name="ErrorMail" type="Elmah.ErrorMailModule, Elmah" />
|
||||
<add name="ErrorFilter" type="Elmah.ErrorFilterModule, Elmah" />
|
||||
</httpModules></system.web>
|
||||
</httpModules>
|
||||
</system.web>
|
||||
<!--
|
||||
The system.webServer section is required for running ASP.NET AJAX under Internet
|
||||
Information Services 7.0. It is not necessary for previous version of IIS.
|
||||
-->
|
||||
<system.webServer>
|
||||
<system.webServer>
|
||||
<validation validateIntegratedModeConfiguration="false" />
|
||||
<modules>
|
||||
<add name="ErrorLog" type="Elmah.ErrorLogModule, Elmah" preCondition="managedHandler" />
|
||||
<add name="ErrorMail" type="Elmah.ErrorMailModule, Elmah" preCondition="managedHandler" />
|
||||
<add name="ErrorFilter" type="Elmah.ErrorFilterModule, Elmah" preCondition="managedHandler" />
|
||||
</modules>
|
||||
</system.webServer><elmah>
|
||||
</system.webServer>
|
||||
<elmah>
|
||||
<!--
|
||||
See http://code.google.com/p/elmah/wiki/SecuringErrorLogPages for
|
||||
more information on remote access and securing ELMAH.
|
||||
-->
|
||||
<security allowRemoteAccess="false" />
|
||||
</elmah><location path="elmah.axd" inheritInChildApplications="false">
|
||||
</elmah>
|
||||
<location path="elmah.axd" inheritInChildApplications="false">
|
||||
<system.web>
|
||||
<httpHandlers>
|
||||
<add verb="POST,GET,HEAD" path="elmah.axd" type="Elmah.ErrorLogPageFactory, Elmah" />
|
||||
@@ -76,7 +118,7 @@
|
||||
<allow roles="admin" />
|
||||
<deny users="*" />
|
||||
</authorization>
|
||||
-->
|
||||
-->
|
||||
</system.web>
|
||||
<system.webServer>
|
||||
<handlers>
|
||||
|
||||
+73
-9
@@ -318,8 +318,10 @@
|
||||
<Content Include="Content\jquery.mobile.theme-1.4.5.css" />
|
||||
<Content Include="Content\jquery.mobile.theme-1.4.5.min.css" />
|
||||
<Content Include="Default.aspx" />
|
||||
<Content Include="ElencoImpegni.aspx" />
|
||||
<Content Include="fonts\fontawesome-webfont.svg" />
|
||||
<Content Include="Global.asax" />
|
||||
<Content Include="NuovoImpegno.aspx" />
|
||||
<Content Include="Scripts\jquery-1.7.1.intellisense.js" />
|
||||
<Content Include="Scripts\jquery-1.7.1.js" />
|
||||
<Content Include="Scripts\jquery-1.7.1.min.js" />
|
||||
@@ -329,9 +331,15 @@
|
||||
<Content Include="Content\WebSCR.less" />
|
||||
<Content Include="Content\Style.less" />
|
||||
<Content Include="Scripts\jSteamware.js" />
|
||||
<Content Include="WebUserControl\mod_fileUpload.ascx" />
|
||||
<Content Include="WebUserControl\mod_footer.ascx" />
|
||||
<Content Include="WebUserControl\mod_header.ascx" />
|
||||
<Content Include="Squadre.aspx" />
|
||||
<Content Include="UserAdmin.aspx" />
|
||||
<Content Include="WebUserControls\mod_elencoRichResetUtenti.ascx" />
|
||||
<Content Include="WebUserControls\mod_enrollByAuthKey.ascx" />
|
||||
<Content Include="WebUserControls\mod_enrollByEmail.ascx" />
|
||||
<Content Include="WebUserControls\mod_enrollByJumperAuthKey.ascx" />
|
||||
<Content Include="WebUserControls\mod_fileUpload.ascx" />
|
||||
<Content Include="WebUserControls\mod_footer.ascx" />
|
||||
<Content Include="WebUserControls\mod_header.ascx" />
|
||||
<None Include="Scripts\jquery-2.1.3.intellisense.js" />
|
||||
<Content Include="Scripts\jquery-2.1.3.js" />
|
||||
<Content Include="Scripts\jquery-2.1.3.min.js" />
|
||||
@@ -353,6 +361,13 @@
|
||||
<Compile Include="Default.aspx.designer.cs">
|
||||
<DependentUpon>Default.aspx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="ElencoImpegni.aspx.cs">
|
||||
<DependentUpon>ElencoImpegni.aspx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
</Compile>
|
||||
<Compile Include="ElencoImpegni.aspx.designer.cs">
|
||||
<DependentUpon>ElencoImpegni.aspx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Global.asax.cs">
|
||||
<DependentUpon>Global.asax</DependentUpon>
|
||||
</Compile>
|
||||
@@ -363,6 +378,13 @@
|
||||
<Compile Include="JQMob.Master.designer.cs">
|
||||
<DependentUpon>JQMob.Master</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="NuovoImpegno.aspx.cs">
|
||||
<DependentUpon>NuovoImpegno.aspx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
</Compile>
|
||||
<Compile Include="NuovoImpegno.aspx.designer.cs">
|
||||
<DependentUpon>NuovoImpegno.aspx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="Site.Mobile.Master.cs">
|
||||
<DependentUpon>Site.Mobile.Master</DependentUpon>
|
||||
@@ -371,6 +393,20 @@
|
||||
<Compile Include="Site.Mobile.Master.designer.cs">
|
||||
<DependentUpon>Site.Mobile.Master</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Squadre.aspx.cs">
|
||||
<DependentUpon>Squadre.aspx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Squadre.aspx.designer.cs">
|
||||
<DependentUpon>Squadre.aspx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="UserAdmin.aspx.cs">
|
||||
<DependentUpon>UserAdmin.aspx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
</Compile>
|
||||
<Compile Include="UserAdmin.aspx.designer.cs">
|
||||
<DependentUpon>UserAdmin.aspx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="ViewSwitcher.ascx.cs">
|
||||
<DependentUpon>ViewSwitcher.ascx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
@@ -378,25 +414,53 @@
|
||||
<Compile Include="ViewSwitcher.ascx.designer.cs">
|
||||
<DependentUpon>ViewSwitcher.ascx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="WebUserControl\mod_fileUpload.ascx.cs">
|
||||
<Compile Include="WebUserControls\mod_elencoRichResetUtenti.ascx.cs">
|
||||
<DependentUpon>mod_elencoRichResetUtenti.ascx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
</Compile>
|
||||
<Compile Include="WebUserControls\mod_elencoRichResetUtenti.ascx.designer.cs">
|
||||
<DependentUpon>mod_elencoRichResetUtenti.ascx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="WebUserControls\mod_enrollByAuthKey.ascx.cs">
|
||||
<DependentUpon>mod_enrollByAuthKey.ascx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
</Compile>
|
||||
<Compile Include="WebUserControls\mod_enrollByAuthKey.ascx.designer.cs">
|
||||
<DependentUpon>mod_enrollByAuthKey.ascx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="WebUserControls\mod_enrollByEmail.ascx.cs">
|
||||
<DependentUpon>mod_enrollByEmail.ascx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
</Compile>
|
||||
<Compile Include="WebUserControls\mod_enrollByEmail.ascx.designer.cs">
|
||||
<DependentUpon>mod_enrollByEmail.ascx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="WebUserControls\mod_enrollByJumperAuthKey.ascx.cs">
|
||||
<DependentUpon>mod_enrollByJumperAuthKey.ascx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
</Compile>
|
||||
<Compile Include="WebUserControls\mod_enrollByJumperAuthKey.ascx.designer.cs">
|
||||
<DependentUpon>mod_enrollByJumperAuthKey.ascx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="WebUserControls\mod_fileUpload.ascx.cs">
|
||||
<DependentUpon>mod_fileUpload.ascx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
</Compile>
|
||||
<Compile Include="WebUserControl\mod_fileUpload.ascx.designer.cs">
|
||||
<Compile Include="WebUserControls\mod_fileUpload.ascx.designer.cs">
|
||||
<DependentUpon>mod_fileUpload.ascx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="WebUserControl\mod_footer.ascx.cs">
|
||||
<Compile Include="WebUserControls\mod_footer.ascx.cs">
|
||||
<DependentUpon>mod_footer.ascx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
</Compile>
|
||||
<Compile Include="WebUserControl\mod_footer.ascx.designer.cs">
|
||||
<Compile Include="WebUserControls\mod_footer.ascx.designer.cs">
|
||||
<DependentUpon>mod_footer.ascx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="WebUserControl\mod_header.ascx.cs">
|
||||
<Compile Include="WebUserControls\mod_header.ascx.cs">
|
||||
<DependentUpon>mod_header.ascx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
</Compile>
|
||||
<Compile Include="WebUserControl\mod_header.ascx.designer.cs">
|
||||
<Compile Include="WebUserControls\mod_header.ascx.designer.cs">
|
||||
<DependentUpon>mod_header.ascx</DependentUpon>
|
||||
</Compile>
|
||||
</ItemGroup>
|
||||
|
||||
@@ -0,0 +1,86 @@
|
||||
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="mod_elencoRichResetUtenti.ascx.cs" Inherits="WebSCR.WebUserControls.mod_elencoRichResetUtenti" %>
|
||||
<asp:GridView ID="grView" runat="server" DataSourceID="ods" AutoGenerateColumns="False" DataKeyNames="USER_NAME" CellPadding="4" ForeColor="#333333" GridLines="None" Width="100%" AllowPaging="false" OnSelectedIndexChanged="grView_SelectedIndexChanged" OnRowCommand="grView_RowCommand">
|
||||
<EditRowStyle BackColor="#2461BF" />
|
||||
<FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
|
||||
<HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
|
||||
<PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
|
||||
<RowStyle BackColor="#EFF3FB" HorizontalAlign="Left" />
|
||||
<SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
|
||||
<SortedAscendingCellStyle BackColor="#F5F7FB" />
|
||||
<SortedAscendingHeaderStyle BackColor="#6D95E1" />
|
||||
<SortedDescendingCellStyle BackColor="#E9EBEF" />
|
||||
<SortedDescendingHeaderStyle BackColor="#4870BE" />
|
||||
<AlternatingRowStyle BackColor="White" />
|
||||
<Columns>
|
||||
<asp:TemplateField ShowHeader="False" ItemStyle-HorizontalAlign="Center" HeaderStyle-HorizontalAlign="Center">
|
||||
<ItemTemplate>
|
||||
<div class="ui-nodisc-icon ui-alt-icon" style="white-space: nowrap; font-size: 0.85em;">
|
||||
<%--<asp:LinkButton CssClass="ui-btn ui-shadow ui-corner-all ui-icon-user ui-btn-icon-notext ui-btn-inline" ID="LinkButton1" data-icon="star" runat="server" CausesValidation="False" CommandArgument="select" CommandName="Select" Text="Sel" />--%>
|
||||
<asp:LinkButton ID="LinkButton2" CssClass="ui-btn ui-shadow ui-corner-all ui-icon-edit ui-btn-icon-notext ui-btn-inline" runat="server" CausesValidation="False" CommandArgument="edit" CommandName="Select" Text="Edit" />
|
||||
</div>
|
||||
</ItemTemplate>
|
||||
<HeaderStyle HorizontalAlign="Center"></HeaderStyle>
|
||||
|
||||
<ItemStyle HorizontalAlign="Center"></ItemStyle>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="nome" SortExpression="email">
|
||||
<ItemTemplate>
|
||||
<b>
|
||||
<asp:Label ID="lblCognome" Font-Size="0.9em" Font-Strikeout='<%# !toBool(Eval("attivo")) %>' runat="server" Text='<%# Eval("cognome") %>' /></b>
|
||||
<asp:Label ID="lblNome" Font-Size="0.9em" Font-Strikeout='<%# !toBool(Eval("attivo")) %>' runat="server" Text='<%# Eval("nome") %>' />
|
||||
<br />
|
||||
<asp:Label ID="lblEmail" Font-Size="0.75em" Font-Strikeout='<%# !toBool(Eval("attivo")) %>' runat="server" Text='<%# Eval("email") %>' />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Attivo" SortExpression="attivo">
|
||||
<ItemTemplate>
|
||||
<div class="ui-nodisc-icon ui-alt-icon" style="white-space: nowrap; font-size: 0.85em;">
|
||||
<asp:LinkButton CssClass="ui-btn ui-shadow ui-corner-all ui-icon-delete ui-btn-icon-notext ui-btn-inline" ID="lbDisattiva" data-icon="star" runat="server" CausesValidation="False" CommandArgument="Disattiva" CommandName="Select" Text="Disattiva" ToolTip="Disattiva utente e rimuove devices" Visible='<%# toBool(Eval("attivo")) %>' />
|
||||
<asp:LinkButton ID="lbAttiva" CssClass="ui-btn ui-shadow ui-corner-all ui-icon-check ui-btn-icon-notext ui-btn-inline" runat="server" CausesValidation="False" CommandArgument="Attiva" CommandName="Select" Text="Attiva" ToolTip="Attiva utente con nuova AuthKey" Visible='<%# !toBool(Eval("attivo")) %>' />
|
||||
</div>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="# Auth" SortExpression="numAuth">
|
||||
<ItemTemplate>
|
||||
<div class="ui-nodisc-icon ui-alt-icon" style="white-space: nowrap; font-size: 0.85em;">
|
||||
<asp:LinkButton CssClass="ui-btn ui-shadow ui-corner-all ui-icon-plus ui-btn-icon-notext ui-btn-inline" ID="lbAdd" data-icon="star" runat="server" CausesValidation="False" CommandArgument="+1" CommandName="Select" Text="+1" ToolTip="+1 device" Visible='<%# toBool(Eval("attivo")) %>' />
|
||||
<asp:Label ID="lblNumAuth" runat="server" Text='<%# Bind("numAuth") %>' />
|
||||
<asp:LinkButton ID="lbRem" CssClass="ui-btn ui-shadow ui-corner-all ui-icon-minus ui-btn-icon-notext ui-btn-inline" runat="server" CausesValidation="False" CommandArgument="-1" CommandName="Select" Text="-1" ToolTip="-1 device" Visible='<%# toBool(Eval("attivo")) %>' />
|
||||
</div>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Grp" SortExpression="CodGruppo">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="lblCodGruppo" Font-Size="0.7em" Font-Strikeout='<%# !toBool(Eval("attivo")) %>' runat="server" Text='<%# Eval("CodGruppo") %>' />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField ShowHeader="False" ItemStyle-HorizontalAlign="Center" HeaderStyle-HorizontalAlign="Center" HeaderText="Reset">
|
||||
<ItemTemplate>
|
||||
<div class="ui-nodisc-icon ui-alt-icon" style="white-space: nowrap; font-size: 0.85em;">
|
||||
<asp:LinkButton CssClass="ui-btn ui-shadow ui-corner-all ui-icon-forbidden ui-btn-icon-notext ui-btn-inline" ID="lbResetAuth" data-icon="star" runat="server" CausesValidation="False" CommandArgument="ResetKeyAndDevices" CommandName="Select" Text="Reset" Visible='<%# toBool(Eval("resetAuthKeyReq")) %>' ToolTip="Reset AuthKey & Disabilita Dispositivi" />
|
||||
<asp:LinkButton ID="lbSendMail" CssClass="ui-btn ui-shadow ui-corner-all ui-icon-mail ui-btn-icon-notext ui-btn-inline" runat="server" CausesValidation="False" CommandArgument="SendMail" CommandName="Select" Text="SendMail" ToolTip="Invia Email di autorizzazione" Visible='<%# toBool(Eval("attivo")) %>' />
|
||||
<asp:LinkButton ID="lbCancelResetAuth" CssClass="ui-btn ui-shadow ui-corner-all ui-icon-delete ui-btn-icon-notext ui-btn-inline" runat="server" CausesValidation="False" CommandArgument="NoReset" CommandName="Select" Text="NoReset" Visible='<%# toBool(Eval("resetAuthKeyReq")) %>' ToolTip="Rifiuta reset" />
|
||||
</div>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
|
||||
</asp:GridView>
|
||||
<asp:ObjectDataSource ID="ods" runat="server" SelectMethod="GetData" TypeName="SteamWare.DS_AuthTableAdapters.UtentiTableAdapter" OldValuesParameterFormatString="Original_{0}"></asp:ObjectDataSource>
|
||||
<br />
|
||||
<div data-role="collapsible" data-iconpos="right" data-theme="a" data-content-theme="a" style="font-size:0.8em;">
|
||||
<h3>Spiegazione</h3>
|
||||
Ogni riga rappresenta un utente, se questo è indicato <span style="text-decoration: line-through;">con un font barrato</span> significa che l'utente è disattivato e tutti i suoi devices (eventualmente registrati) sono stati disabilitati e rimossi dal DB (e <u>non possono più accedere alla piattaforma)</u>.
|
||||
<br />
|
||||
Partendo da sinistra verso destra abbiamo:
|
||||
<div class="ui-nodisc-icon ui-alt-icon">
|
||||
<ul>
|
||||
<%--<li><i class="ui-btn ui-shadow ui-corner-all ui-icon-user ui-btn-icon-notext ui-btn-inline"></i>seleziona l'utente per visualizzare i devices lui associati</li>
|
||||
<li>seleziona l'utente per modificare i dati quali cognome, nome, email</li>--%>
|
||||
<li>Attivazione: il pulsante <i class="ui-btn ui-shadow ui-corner-all ui-icon-delete ui-btn-icon-notext ui-btn-inline"></i> disattiva un utente (ed i relativi devices) mentre il pulsante <i class="ui-btn ui-shadow ui-corner-all ui-icon-check ui-btn-icon-notext ui-btn-inline"></i> lo riattiva (generando una NUOVA AuthKey) e permette nuovi enroll dei dispositivi.</li>
|
||||
<li>NumAuth: indica il numero di attivazioni residue per l'utente, si possono incrementare/decrementare con i button <i class="ui-btn ui-shadow ui-corner-all ui-icon-plus ui-btn-icon-notext ui-btn-inline"></i> e <i class="ui-btn ui-shadow ui-corner-all ui-icon-minus ui-btn-icon-notext ui-btn-inline"></i> </li>
|
||||
<li>Grp: indica il gruppo di appartenenza dell'utente</li>
|
||||
<li>Reset: permette di gestire le richieste di supporto: col pulsante <i class="ui-btn ui-shadow ui-corner-all ui-icon-forbidden ui-btn-icon-notext ui-btn-inline"></i> si possono approvare (generando una nuova auth key), con <i class="ui-btn ui-shadow ui-corner-all ui-icon-delete ui-btn-icon-notext ui-btn-inline"></i> si possono rifiutare le richieste e con <i class="ui-btn ui-shadow ui-corner-all ui-icon-mail ui-btn-icon-notext ui-btn-inline"></i> si possono inviare (per gli utenti ATTIVI) le email contenenti i link per autorizzare i dispositivi; nb: <b>numAuth deve essere maggiore di zero</b> altrimenti un link valido non permette comunque l'attivazione di nuovi devices utente.</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,135 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using System.Web.UI;
|
||||
using System.Web.UI.WebControls;
|
||||
using SteamWare;
|
||||
|
||||
namespace WebSCR.WebUserControls
|
||||
{
|
||||
public partial class mod_elencoRichResetUtenti : System.Web.UI.UserControl
|
||||
{
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
//if (!Page.IsPostBack)
|
||||
//{
|
||||
//}
|
||||
}
|
||||
/// <summary>
|
||||
/// ultimo comando letto da link button
|
||||
/// </summary>
|
||||
public string lastCmd { get; set; }
|
||||
/// <summary>
|
||||
/// gestione evento novo record
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnNew_Click(object sender, EventArgs e)
|
||||
{
|
||||
#if false
|
||||
// richiamo pagina di edit senza parametri x metodo NEW
|
||||
Response.Redirect("AccettazioneEdit");
|
||||
#endif
|
||||
}
|
||||
public bool toBool(object value)
|
||||
{
|
||||
bool answ = false;
|
||||
try
|
||||
{
|
||||
answ = Convert.ToBoolean(value);
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
return answ;
|
||||
}
|
||||
/// <summary>
|
||||
/// evento selezione paziente...
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void grView_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
// recupero dati utente...
|
||||
string USER_NAME = "";
|
||||
try
|
||||
{
|
||||
USER_NAME = grView.SelectedDataKey["USER_NAME"].ToString();
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
if (USER_NAME != "")
|
||||
{
|
||||
switch (lastCmd)
|
||||
{
|
||||
case "+1":
|
||||
devicesAuthProxy.stObj.taUtenti.UpdateNumAuth(1, USER_NAME);
|
||||
break;
|
||||
case "-1":
|
||||
devicesAuthProxy.stObj.taUtenti.UpdateNumAuth(-1, USER_NAME);
|
||||
break;
|
||||
case "Disattiva":
|
||||
case "Attiva":
|
||||
devicesAuthProxy.stObj.taUtenti.ToggleAttivo(SteamwareStrings.pseudoRandomString(20), USER_NAME);
|
||||
break;
|
||||
case "NoReset":
|
||||
devicesAuthProxy.stObj.taUtenti.rejectResetAK(USER_NAME);
|
||||
break;
|
||||
case "ResetKeyAndDevices":
|
||||
devicesAuthProxy.stObj.taUtenti.ResetKeyAndDevices(SteamwareStrings.pseudoRandomString(20), USER_NAME);
|
||||
break;
|
||||
case "SendMail":
|
||||
// cerco chiave...
|
||||
string AuthKey = "";
|
||||
try
|
||||
{
|
||||
AuthKey = devicesAuthProxy.stObj.taUtenti.getByEmail(USER_NAME)[0].authKey;
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
if (USER_NAME != "" && AuthKey != "")
|
||||
{
|
||||
// invio email!
|
||||
devicesAuthProxy.stObj.sendEmailAuthKey(USER_NAME, AuthKey);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
grView.DataBind();
|
||||
#if false
|
||||
// recupero dati paziente...
|
||||
int IdxPaziente = 0;
|
||||
try
|
||||
{
|
||||
IdxPaziente = Convert.ToInt32(grView.SelectedDataKey["IdxPaziente"]);
|
||||
memLayer.ML.setSessionVal("IdxPaziente", IdxPaziente);
|
||||
DS_Applicazione.AnagPazientiRow riga = DtProxy.man.taAP.getByKey(IdxPaziente)[0];
|
||||
memLayer.ML.setSessionVal("Paziente", string.Format("{0} {1} ({2:dd/MM/yyyy})", riga.Cognome, riga.Nome, riga.DataNasc));
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
if (lastCmd == "edit")
|
||||
{
|
||||
// richiamo pagina con edit del record richiesto
|
||||
Response.Redirect(string.Format("AccettazioneEdit?IdxPaziente={0}", grView.SelectedDataKey["IdxPaziente"]));
|
||||
}
|
||||
else if (lastCmd == "select")
|
||||
{
|
||||
// se utente abilitato ad accesso privilegiato
|
||||
if (false) // !!!FARE controllo livello accesso
|
||||
{
|
||||
Response.Redirect("Visite");
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
protected void grView_RowCommand(object sender, GridViewCommandEventArgs e)
|
||||
{
|
||||
// salvo il command argument...
|
||||
lastCmd = e.CommandArgument.ToString();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <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 WebSCR.WebUserControls {
|
||||
|
||||
|
||||
public partial class mod_elencoRichResetUtenti {
|
||||
|
||||
/// <summary>
|
||||
/// grView 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.GridView grView;
|
||||
|
||||
/// <summary>
|
||||
/// ods 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.ObjectDataSource ods;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="mod_enrollByAuthKey.ascx.cs"
|
||||
Inherits="WebSCR.WebUserControls.mod_enrollByAuthKey" %>
|
||||
|
||||
<div data-collapsed="false" data-role="collapsible" data-iconpos="right" data-mini="true">
|
||||
<h4>Registrazione da Auth Key</h4>
|
||||
<asp:TextBox runat="server" ID="txtEmailAK" placeholder="Prego digitare indirizzo email" />
|
||||
<asp:TextBox runat="server" ID="txtAuthKey" placeholder="Prego digitare auth key" TextMode="Password" />
|
||||
<asp:Button runat="server" CssClass="ui-btn ui-shadow ui-corner-all ui-icon-plus" ID="btnEnrollByAK" Text="Abilita Device Personale" data-theme="a" OnClick="btnEnrollByAK_Click" />
|
||||
<asp:Label runat="server" ID="lblOutRegAuthKey" Text="..." Visible="false" ForeColor="Red" />
|
||||
<div data-role="collapsible" data-iconpos="right" data-theme="a" data-content-theme="a">
|
||||
<h3>Spiegazione</h3>
|
||||
Questa funzione permette di inserire un devices tra quelli gestiti tramite digitazione della AuthKey personale (MD5 o meno se abilitato, da richiedere all'admin se non nota).
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,59 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using System.Web.UI;
|
||||
using System.Web.UI.WebControls;
|
||||
using SteamWare;
|
||||
using WebSCR_data;
|
||||
|
||||
namespace WebSCR.WebUserControls
|
||||
{
|
||||
public partial class mod_enrollByAuthKey : System.Web.UI.UserControl
|
||||
{
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// richiesta enroll device da chiave personale + email
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnEnrollByAK_Click(object sender, EventArgs e)
|
||||
{
|
||||
// controllo email & co...
|
||||
string email = txtEmailAK.Text.Trim();
|
||||
string authKey = txtAuthKey.Text.Trim();
|
||||
if (email != "" && email.IndexOf("@") > 0)
|
||||
{
|
||||
// ora controllo che l'email SIA nell'elenco delle email degli utenti...
|
||||
if (devicesAuthProxy.stObj.checkUserEmail(email))
|
||||
{
|
||||
// controllo se la authKey è corretta x utente...
|
||||
if (devicesAuthProxy.stObj.checkUserEmailAK(email, authKey))
|
||||
{
|
||||
// rimando al jumper...
|
||||
Response.Redirect(string.Format("jumper?UserAuthkey={0}&USER_NAME={1}", authKey, email));
|
||||
}
|
||||
else
|
||||
{
|
||||
lblOutRegAuthKey.Text = "Attenzione! auth key NON valida, prego contattare amministratore!";
|
||||
lblOutRegAuthKey.Visible = true;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
lblOutRegAuthKey.Text = "Attenzione! email non trovata, prego contattare amministratore!";
|
||||
lblOutRegAuthKey.Visible = true;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
lblOutRegAuthKey.Text = "Attenzione! preogo inserire email valida!";
|
||||
lblOutRegAuthKey.Visible = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,51 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <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 WebSCR.WebUserControls {
|
||||
|
||||
|
||||
public partial class mod_enrollByAuthKey {
|
||||
|
||||
/// <summary>
|
||||
/// txtEmailAK 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.TextBox txtEmailAK;
|
||||
|
||||
/// <summary>
|
||||
/// txtAuthKey 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.TextBox txtAuthKey;
|
||||
|
||||
/// <summary>
|
||||
/// btnEnrollByAK 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.Button btnEnrollByAK;
|
||||
|
||||
/// <summary>
|
||||
/// lblOutRegAuthKey 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 lblOutRegAuthKey;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="mod_enrollByEmail.ascx.cs"
|
||||
Inherits="WebSCR.WebUserControls.mod_enrollByEmail" %>
|
||||
|
||||
<div data-role="collapsible" data-iconpos="right" data-mini="true" data-collapsed="false">
|
||||
<h4>Richiesta Reset Chiave Personale</h4>
|
||||
<asp:TextBox runat="server" ID="txtEmailReq" placeholder="Prego digitare indirizzo email" />
|
||||
<asp:Button runat="server" CssClass="ui-btn ui-shadow ui-corner-all ui-icon-plus" ID="btnReqNewKey" Text="Richiedi Nuova Chiave Personale" data-theme="a" OnClick="btnReqNewKey_Click" />
|
||||
<asp:Label runat="server" ID="lblOutUnauth" Text="..." Visible="false" ForeColor="Red" />
|
||||
<div data-role="collapsible" data-iconpos="right" data-theme="a" data-content-theme="a">
|
||||
<h3>Spiegazione</h3>
|
||||
Con questa procedura l'utente richiede il reset della propria chiave di autenticazione personale. L'amministratore della piattaforma valuterà e validata la richiesta annullerà le chiavi emesse per i devices eventualmente già autorizzati ed inoltrerà, all'indirizzo email dell'utente, la nuova chiave da utilizzare per abilitare i devices desiderati.
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,50 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using System.Web.UI;
|
||||
using System.Web.UI.WebControls;
|
||||
using SteamWare;
|
||||
using WebSCR_data;
|
||||
|
||||
namespace WebSCR.WebUserControls
|
||||
{
|
||||
public partial class mod_enrollByEmail : System.Web.UI.UserControl
|
||||
{
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
/// <summary>
|
||||
/// richiesta reset dispositivi utente
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnReqNewKey_Click(object sender, EventArgs e)
|
||||
{
|
||||
// controllo email & co...
|
||||
string email = txtEmailReq.Text.Trim();
|
||||
if (email != "" && email.IndexOf("@") > 0)
|
||||
{
|
||||
// ora controllo che l'email SIA nell'elenco delle email degli utenti...
|
||||
if (devicesAuthProxy.stObj.checkUserEmail(email))
|
||||
{
|
||||
// registro richiesta reset ed invio email ad admin...
|
||||
devicesAuthProxy.stObj.reqResetAuthKey(email, memLayer.ML.confReadString("adminEmail"));
|
||||
lblOutUnauth.Text = "Richiesta inoltrata all'amministratore, attendere sua risposta alla casella email indicata.";
|
||||
lblOutUnauth.Visible = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
lblOutUnauth.Text = "Attenzione! email non trovata, prego contattare amministratore!";
|
||||
lblOutUnauth.Visible = true;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
lblOutUnauth.Text = "Attenzione! preogo inserire email valida!";
|
||||
lblOutUnauth.Visible = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <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 WebSCR.WebUserControls {
|
||||
|
||||
|
||||
public partial class mod_enrollByEmail {
|
||||
|
||||
/// <summary>
|
||||
/// txtEmailReq 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.TextBox txtEmailReq;
|
||||
|
||||
/// <summary>
|
||||
/// btnReqNewKey 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.Button btnReqNewKey;
|
||||
|
||||
/// <summary>
|
||||
/// lblOutUnauth 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 lblOutUnauth;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="mod_enrollByJumperAuthKey.ascx.cs" Inherits="WebSCR.WebUserControls.mod_enrollByJumperAuthKey" %>
|
||||
<%--è una procedura automatica, niente elementi grafici!--%>
|
||||
@@ -0,0 +1,68 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using System.Web.UI;
|
||||
using System.Web.UI.WebControls;
|
||||
using SteamWare;
|
||||
using WebSCR_data;
|
||||
|
||||
namespace WebSCR.WebUserControls
|
||||
{
|
||||
public partial class mod_enrollByJumperAuthKey : System.Web.UI.UserControl
|
||||
{
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
// procedo alla ricerca di dati via sessione x User AuthKey
|
||||
tryAutoEnroll();
|
||||
}
|
||||
/// <summary>
|
||||
/// prova a fare auto enroll
|
||||
/// </summary>
|
||||
public void tryAutoEnroll()
|
||||
{
|
||||
// recupero dati da session
|
||||
string UserAuthKey = "";
|
||||
string email = "";
|
||||
string userAgent = "";
|
||||
bool fatto = false;
|
||||
string DeviceName = "";
|
||||
string IPv4 = "";
|
||||
try
|
||||
{
|
||||
//UserAuthKey = memLayer.ML.StringSessionObj("UserAuthkey");
|
||||
//email = memLayer.ML.StringSessionObj("email");
|
||||
UserAuthKey = Request["UserAuthkey"];
|
||||
email = Request["USER_NAME"];
|
||||
userAgent = Request.UserAgent;
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
// se ci sono i dati effettua tentativo di AutoEnroll del device
|
||||
if (email != "" && UserAuthKey != "")
|
||||
{
|
||||
IPv4 = Request.UserHostAddress;
|
||||
DeviceName = SteamWare.dnsUtils.ReverseLookup(IPv4);
|
||||
//DeviceName = SteamWare.dnsUtils.DetermineCompName(IPv4); // WIN2012R2SAM
|
||||
//DeviceName = Request.UserHostName; // ::1
|
||||
|
||||
// prova ad usare la chiave DECODIFICATA x autorizzare device
|
||||
fatto = devicesAuthProxy.stObj.enrollDevice(devicesAuthProxy.decodeKey(UserAuthKey), IPv4, DeviceName, userAgent, email);
|
||||
// se NON ce l'ha fatta ed è abilitata l'autenticazione "plain" cerca di eseguire anche quella...
|
||||
if (memLayer.ML.confReadBool("enablePlain") && !fatto)
|
||||
{
|
||||
fatto = devicesAuthProxy.stObj.enrollDevice(UserAuthKey, IPv4, DeviceName, userAgent, email);
|
||||
}
|
||||
if (fatto)
|
||||
{
|
||||
Response.Redirect("Default");
|
||||
}
|
||||
else
|
||||
{
|
||||
Response.Redirect("UserAdmin");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <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 WebSCR.WebUserControls
|
||||
{
|
||||
|
||||
|
||||
public partial class mod_enrollByJumperAuthKey
|
||||
{
|
||||
}
|
||||
}
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,9 @@
|
||||
17:03:13 7924 [EXCEPTION] - Errore recupero permessi!
|
||||
System.InvalidCastException: Impossibile eseguire il cast di oggetti di tipo 'System.String' sul tipo 'PermessiDataTable'.
|
||||
in SteamWare.devicesAuthProxy.get_permessi() in c:\Users\samuele\Documents\Visual Studio 2012\Projects\SteamWareLibrary\SteamWare\devicesAuthProxy.cs:riga 314
|
||||
17:04:44 5248 [EXCEPTION] - Errore recupero permessi!
|
||||
System.InvalidCastException: Impossibile eseguire il cast di oggetti di tipo 'System.String' sul tipo 'PermessiDataTable'.
|
||||
in SteamWare.devicesAuthProxy.get_permessi() in c:\Users\samuele\Documents\Visual Studio 2012\Projects\SteamWareLibrary\SteamWare\devicesAuthProxy.cs:riga 314
|
||||
17:07:25 2768 [EXCEPTION] - Errore recupero permessi!
|
||||
System.InvalidCastException: Impossibile eseguire il cast di oggetti di tipo 'System.String' sul tipo 'PermessiDataTable'.
|
||||
in SteamWare.devicesAuthProxy.get_permessi() in c:\Users\samuele\Documents\Visual Studio 2012\Projects\SteamWareLibrary\SteamWare\devicesAuthProxy.cs:riga 314
|
||||
Binary file not shown.
@@ -1,14 +1,6 @@
|
||||
c:\users\samuele\documents\visual studio 2012\Projects\WebSCR\WebSCR\bin\NLog.config
|
||||
c:\users\samuele\documents\visual studio 2012\Projects\WebSCR\WebSCR\bin\WebSCR.dll
|
||||
c:\users\samuele\documents\visual studio 2012\Projects\WebSCR\WebSCR\bin\WebSCR.pdb
|
||||
c:\users\samuele\documents\visual studio 2012\Projects\WebSCR\WebSCR\bin\SteamWare.dll
|
||||
c:\users\samuele\documents\visual studio 2012\Projects\WebSCR\WebSCR\bin\Flesk.ViewState.dll
|
||||
c:\users\samuele\documents\visual studio 2012\Projects\WebSCR\WebSCR\bin\ICSharpCode.SharpZipLib.dll
|
||||
c:\users\samuele\documents\visual studio 2012\Projects\WebSCR\WebSCR\bin\SteamWare.pdb
|
||||
c:\users\samuele\documents\visual studio 2012\Projects\WebSCR\WebSCR\bin\SteamWare.xml
|
||||
c:\users\samuele\documents\visual studio 2012\Projects\WebSCR\WebSCR\obj\Debug\WebSCR.csprojResolveAssemblyReference.cache
|
||||
c:\users\samuele\documents\visual studio 2012\Projects\WebSCR\WebSCR\obj\Debug\WebSCR.dll
|
||||
c:\users\samuele\documents\visual studio 2012\Projects\WebSCR\WebSCR\obj\Debug\WebSCR.pdb
|
||||
C:\Users\samuele\documents\visual studio 2012\Projects\WebSCR\WebSCR\bin\NLog.config
|
||||
C:\Users\samuele\documents\visual studio 2012\Projects\WebSCR\WebSCR\bin\WebSCR.dll
|
||||
C:\Users\samuele\documents\visual studio 2012\Projects\WebSCR\WebSCR\bin\WebSCR.pdb
|
||||
C:\Users\samuele\documents\visual studio 2012\Projects\WebSCR\WebSCR\bin\Antlr3.Runtime.dll
|
||||
C:\Users\samuele\documents\visual studio 2012\Projects\WebSCR\WebSCR\bin\Elmah.dll
|
||||
C:\Users\samuele\documents\visual studio 2012\Projects\WebSCR\WebSCR\bin\Microsoft.AspNet.FriendlyUrls.dll
|
||||
@@ -17,12 +9,20 @@ C:\Users\samuele\documents\visual studio 2012\Projects\WebSCR\WebSCR\bin\Microso
|
||||
C:\Users\samuele\documents\visual studio 2012\Projects\WebSCR\WebSCR\bin\Newtonsoft.Json.dll
|
||||
C:\Users\samuele\documents\visual studio 2012\Projects\WebSCR\WebSCR\bin\NLog.dll
|
||||
C:\Users\samuele\documents\visual studio 2012\Projects\WebSCR\WebSCR\bin\NLog.Web.dll
|
||||
C:\Users\samuele\documents\visual studio 2012\Projects\WebSCR\WebSCR\bin\SteamWare.dll
|
||||
C:\Users\samuele\documents\visual studio 2012\Projects\WebSCR\WebSCR\bin\System.Web.Optimization.dll
|
||||
C:\Users\samuele\documents\visual studio 2012\Projects\WebSCR\WebSCR\bin\WebGrease.dll
|
||||
C:\Users\samuele\documents\visual studio 2012\Projects\WebSCR\WebSCR\bin\WebSCR_data.dll
|
||||
C:\Users\samuele\documents\visual studio 2012\Projects\WebSCR\WebSCR\bin\Flesk.ViewState.dll
|
||||
C:\Users\samuele\documents\visual studio 2012\Projects\WebSCR\WebSCR\bin\ICSharpCode.SharpZipLib.dll
|
||||
C:\Users\samuele\documents\visual studio 2012\Projects\WebSCR\WebSCR\bin\SteamWare.pdb
|
||||
C:\Users\samuele\documents\visual studio 2012\Projects\WebSCR\WebSCR\bin\SteamWare.xml
|
||||
C:\Users\samuele\documents\visual studio 2012\Projects\WebSCR\WebSCR\bin\WebSCR_data.pdb
|
||||
C:\Users\samuele\documents\visual studio 2012\Projects\WebSCR\WebSCR\bin\Antlr3.Runtime.pdb
|
||||
C:\Users\samuele\documents\visual studio 2012\Projects\WebSCR\WebSCR\bin\Microsoft.AspNet.FriendlyUrls.xml
|
||||
C:\Users\samuele\documents\visual studio 2012\Projects\WebSCR\WebSCR\bin\Newtonsoft.Json.xml
|
||||
C:\Users\samuele\documents\visual studio 2012\Projects\WebSCR\WebSCR\bin\NLog.xml
|
||||
C:\Users\samuele\documents\visual studio 2012\Projects\WebSCR\WebSCR\bin\System.Web.Optimization.xml
|
||||
C:\Users\samuele\documents\visual studio 2012\Projects\WebSCR\WebSCR\bin\WebSCR_data.dll
|
||||
C:\Users\samuele\documents\visual studio 2012\Projects\WebSCR\WebSCR\bin\WebSCR_data.pdb
|
||||
C:\Users\samuele\documents\visual studio 2012\Projects\WebSCR\WebSCR\obj\Debug\WebSCR.csprojResolveAssemblyReference.cache
|
||||
C:\Users\samuele\documents\visual studio 2012\Projects\WebSCR\WebSCR\obj\Debug\WebSCR.dll
|
||||
C:\Users\samuele\documents\visual studio 2012\Projects\WebSCR\WebSCR\obj\Debug\WebSCR.pdb
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -1,12 +1,12 @@
|
||||
C:\Users\samuele\documents\visual studio 2012\Projects\WebSCR\WebSCR_data\bin\Debug\WebSCR_data.dll
|
||||
C:\Users\samuele\documents\visual studio 2012\Projects\WebSCR\WebSCR_data\bin\Debug\WebSCR_data.pdb
|
||||
C:\Users\samuele\documents\visual studio 2012\Projects\WebSCR\WebSCR_data\obj\Debug\WebSCR_data.csprojResolveAssemblyReference.cache
|
||||
C:\Users\samuele\documents\visual studio 2012\Projects\WebSCR\WebSCR_data\obj\Debug\WebSCR_data.dll
|
||||
C:\Users\samuele\documents\visual studio 2012\Projects\WebSCR\WebSCR_data\obj\Debug\WebSCR_data.pdb
|
||||
C:\Users\samuele\documents\visual studio 2012\Projects\WebSCR\WebSCR_data\bin\Debug\NLog.config
|
||||
C:\Users\samuele\documents\visual studio 2012\Projects\WebSCR\WebSCR_data\bin\Debug\WebSCR_data.dll.config
|
||||
C:\Users\samuele\documents\visual studio 2012\Projects\WebSCR\WebSCR_data\bin\Debug\WebSCR_data.dll
|
||||
C:\Users\samuele\documents\visual studio 2012\Projects\WebSCR\WebSCR_data\bin\Debug\WebSCR_data.pdb
|
||||
C:\Users\samuele\documents\visual studio 2012\Projects\WebSCR\WebSCR_data\bin\Debug\SteamWare.dll
|
||||
C:\Users\samuele\documents\visual studio 2012\Projects\WebSCR\WebSCR_data\bin\Debug\Flesk.ViewState.dll
|
||||
C:\Users\samuele\documents\visual studio 2012\Projects\WebSCR\WebSCR_data\bin\Debug\ICSharpCode.SharpZipLib.dll
|
||||
C:\Users\samuele\documents\visual studio 2012\Projects\WebSCR\WebSCR_data\bin\Debug\SteamWare.pdb
|
||||
C:\Users\samuele\documents\visual studio 2012\Projects\WebSCR\WebSCR_data\bin\Debug\SteamWare.xml
|
||||
C:\Users\samuele\documents\visual studio 2012\Projects\WebSCR\WebSCR_data\obj\Debug\WebSCR_data.csprojResolveAssemblyReference.cache
|
||||
C:\Users\samuele\documents\visual studio 2012\Projects\WebSCR\WebSCR_data\obj\Debug\WebSCR_data.dll
|
||||
C:\Users\samuele\documents\visual studio 2012\Projects\WebSCR\WebSCR_data\obj\Debug\WebSCR_data.pdb
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user