OldPasswordNames) Then Call Scrivi_Messaggio(doc, "Attenzione! La password inserita non è corretta. Riprovare.", "red", "0") Exit Sub Elseif (NewPassword = "") Then Call Scrivi_Messaggio(doc, "Attenzione! Inserire la nuova password. Riprovare.", "red", "0") Exit Sub Elseif (NewPassword<>ConfermaNewPassword) Then Call Scrivi_Messaggio(doc, "Attenzione! Nuova Password e Conferma Nuova Password non coincidono. Riprovare.", "red", "0") Exit Sub Else tag1 = || tag2 = || tag3 = || Descrizione = "qui" myURL = |http://| + ServerName + |:| + ServerPort + |/| + Database x = myURL + "?logout&redirectTo=" + myURL y = tag3 + |La password è stata cambiata. Le modifiche saranno attive nel giro di pochi secondi.| z = y + |
| + |Per utilizzare le nuove impostazioni personali cliccare | + || + Descrizione + || Call Scrivi_Messaggio(doc, z, "green", "1") docPeople.HTTPPassword = NewPassword Call docPeople.ComputeWithForm(False,False) Call docPeople.Save(True,True) '===== Refresh della Rubrica indirizzi PathDb = db.FilePath myStr = |nserver.exe -c "load updall names.nsf -r"| taskId = Shell(myStr, 1) End If End Sub SCRIVI_MESSAGGIO Sub Scrivi_Messaggio(doc As NotesDocument, Testo As String, Colore As String, Flag As String) If flag = "0" Then 'doc.OldPassword = "" doc.NewPassword = "" doc.ConfermaNewPassword = "" doc.Messaggio = || + Testo + || Else 'solo bold di differenza doc.Messaggio = || + Testo + || End If End Sub">
> |  
re : Problema con ChangeHTTPPassword
freemaui
usavo questa, negli ultimi tempi avevo preso una strada diversa..
se ho tempo e la trovo te la mando,
spero ti possa essere di "spunto"

Initialize
Sub Initialize
\'===== AGENTE PER CAMBIARE LA PASSWORD INTERNET DEGLI UTENTI
Dim session As New NotesSession
Dim db As NotesDatabase, dbNames As NotesDatabase
Dim doc As NotesDocument, docPeople As NotesDocument
Dim Vista As NotesView
Dim UtenteConnesso As String, ServerName As String, ServerPort As String, Database As String, PathDb As String, myStr As String
Dim OldPassword As String, NewPassword As String, ConfermaNewPassword As String, OldPasswordNames As String
Dim tag1 As String, tag2 As String, tag3 As String, Descrizione As String, myURL As String, x As String, y As String, z As String
Dim taskID As Integer
\'===== per leggere il contenuto dei campi a video nel browser accedo al Context della pagina web
Set doc = session.DocumentContext
Set db = Session.CurrentDatabase
ServerName = doc.Server_Name(0)
ServerPort = doc.Server_Port(0)
Database = doc.Database(0)
UtenteConnesso = doc.UtenteConnesso(0) \'è l\'utente collegato
OldPassword = doc.OldPassword(0)
OldPasswordNames = doc.OldPasswordNames(0)
NewPassword = doc.NewPassword(0)
ConfermaNewPassword = doc.ConfermaNewPassword(0)
\'=====
Set dbNames = New NotesDatabase("", "names.nsf" )
Set Vista = dbNames.GetView("($VIMPeople)")
Set docPeople = Vista.GetDocumentByKey(UtenteConnesso,True)
\'===== Controlli
If (OldPassword = "") Or (OldPassword<>OldPasswordNames) Then
Call Scrivi_Messaggio(doc, "Attenzione! La password inserita non è corretta. Riprovare.", "red", "0")
Exit Sub
Elseif (NewPassword = "") Then
Call Scrivi_Messaggio(doc, "Attenzione! Inserire la nuova password. Riprovare.", "red", "0")
Exit Sub
Elseif (NewPassword<>ConfermaNewPassword) Then
Call Scrivi_Messaggio(doc, "Attenzione! Nuova Password e Conferma Nuova Password non coincidono. Riprovare.", "red", "0")
Exit Sub
Else
tag1 = |<font face=Arial size=2>|
tag2 = |</font>|
tag3 = |<BASE TARGET = \'_top\'>|
Descrizione = "qui"
myURL = |http://| + ServerName + |:| + ServerPort + |/| + Database
x = myURL + "?logout&redirectTo=" + myURL
y = tag3 + |La password è stata cambiata. Le modifiche saranno attive nel giro di pochi secondi.|
z = y + |<br>| + |Per utilizzare le nuove impostazioni personali cliccare | + |<a href=| + x + |>| + Descrizione + |</a>|
Call Scrivi_Messaggio(doc, z, "green", "1")
docPeople.HTTPPassword = NewPassword
Call docPeople.ComputeWithForm(False,False)
Call docPeople.Save(True,True)
\'===== Refresh della Rubrica indirizzi
PathDb = db.FilePath
myStr = |nserver.exe -c "load updall names.nsf -r"|
taskId = Shell(myStr, 1)
End If

End Sub

SCRIVI_MESSAGGIO
Sub Scrivi_Messaggio(doc As NotesDocument, Testo As String, Colore As String, Flag As String)
If flag = "0" Then
\'doc.OldPassword = ""
doc.NewPassword = ""
doc.ConfermaNewPassword = ""
doc.Messaggio = |[<font face=Arial color=| + Colore + |>| + Testo + |</font>]|
Else
\'solo bold di differenza
doc.Messaggio = |[<font face=Arial color=| + Colore + |><b>| + Testo + |</b></font>]|
End If



End Sub




Problema con ChangeHTTPPassword - dcappellin -
    You are here re : Problema con ChangeHTTPPassword - freemaui -