phpgroupware-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Phpgroupware-cvs] CVS: phpGWShell_Win32_VB frmMain.frm,1.2,1.2.4.1 frmO


From: Chris Weiss <address@hidden>
Subject: [Phpgroupware-cvs] CVS: phpGWShell_Win32_VB frmMain.frm,1.2,1.2.4.1 frmOptions.frm,1.2,1.2.4.1 frmServers.frm,1.1,1.1.4.1 modMain.bas,1.2,1.2.4.1 phpGWShell.exe,1.1,1.1.4.1 phpGWShell.vbp,1.2,1.2.4.1 phpGWShell.vbw,1.2,1.2.4.1
Date: Wed, 26 Mar 2003 17:12:00 -0500

Update of /cvsroot/phpgroupware/phpGWShell_Win32_VB
In directory subversions:/tmp/cvs-serv26113

Modified Files:
      Tag: Version-0_9_14-branch
        frmMain.frm frmOptions.frm frmServers.frm modMain.bas 
        phpGWShell.exe phpGWShell.vbp phpGWShell.vbw 
Log Message:
fixed new mail check

Index: frmMain.frm
===================================================================
RCS file: /cvsroot/phpgroupware/phpGWShell_Win32_VB/frmMain.frm,v
retrieving revision 1.2
retrieving revision 1.2.4.1
diff -C2 -r1.2 -r1.2.4.1
*** frmMain.frm 19 Feb 2001 05:06:42 -0000      1.2
--- frmMain.frm 26 Mar 2003 22:11:57 -0000      1.2.4.1
***************
*** 1,4 ****
  VERSION 5.00
! Object = "{EAB22AC0-30C1-11CF-A7EB-0000C05BAE0B}#1.1#0"; "SHDOCVW.dll"
  Begin VB.Form frmMain 
     Caption         =   "phpGroupWare"
--- 1,4 ----
  VERSION 5.00
! Object = "{EAB22AC0-30C1-11CF-A7EB-0000C05BAE0B}#1.1#0"; "shdocvw.dll"
  Begin VB.Form frmMain 
     Caption         =   "phpGroupWare"
***************
*** 12,15 ****
--- 12,21 ----
     ScaleWidth      =   11490
     StartUpPosition =   3  'Windows Default
+    Begin VB.Timer tmrTrayDely 
+       Enabled         =   0   'False
+       Interval        =   1000
+       Left            =   10200
+       Top             =   7500
+    End
     Begin VB.Timer tmrNotify 
        Enabled         =   0   'False
***************
*** 91,99 ****
        Height          =   1155
        Index           =   0
!       Left            =   4920
        TabIndex        =   4
!       Top             =   420
!       Width           =   2055
!       ExtentX         =   3625
        ExtentY         =   2037
        ViewMode        =   0
--- 97,105 ----
        Height          =   1155
        Index           =   0
!       Left            =   60
        TabIndex        =   4
!       Top             =   60
!       Width           =   5175
!       ExtentX         =   9128
        ExtentY         =   2037
        ViewMode        =   0
***************
*** 161,164 ****
--- 167,179 ----
           Caption         =   "phpGroupWare Web Site"
        End
+       Begin VB.Menu mnuDash4 
+          Caption         =   "-"
+       End
+       Begin VB.Menu mnuDebug 
+          Caption         =   "Debug"
+          Begin VB.Menu mnuDebugNotify 
+             Caption         =   "Show Notify Window"
+          End
+       End
        Begin VB.Menu mnuDash2 
           Caption         =   "-"
***************
*** 193,197 ****
  Dim aByte() As Byte, bEnding As Boolean, bSendEmail As Boolean, strEmailTo As 
String
  Dim iCurrSeconds As Integer, lCurrDelay As Long
! Dim iNewEventServer As Integer, iCurrServer As Integer
  Public lEventDelay As Long
  
--- 208,212 ----
  Dim aByte() As Byte, bEnding As Boolean, bSendEmail As Boolean, strEmailTo As 
String
  Dim iCurrSeconds As Integer, lCurrDelay As Long
! Dim iNewEventServer As Integer, iCurrServer As Integer, bNewMailPrompt As 
Boolean
  Public lEventDelay As Long
  
***************
*** 258,261 ****
--- 273,281 ----
  End Sub
  
+ Private Sub mnuDebugNotify_Click()
+     wbNotify(iCurrServer).ZOrder
+     
+ End Sub
+ 
  Private Sub mnuExit_Click()
  On Error Resume Next
***************
*** 266,270 ****
      For i = 0 To UBound(arrServers)
          If arrServers(i).LoggedIn Then
!             wbMail(i).Navigate2 arrServers(i).BaseURL & "logout.php"
              bGotOne = True
          End If
--- 286,290 ----
      For i = 0 To UBound(arrServers)
          If arrServers(i).LoggedIn Then
!             NavigateMail i, "logout.php"
              bGotOne = True
          End If
***************
*** 288,291 ****
--- 308,315 ----
  End Sub
  
+ Private Sub mnuLogout_Click()
+     
+ End Sub
+ 
  Private Sub mnuphpGWSite_Click()
  On Error Resume Next
***************
*** 319,323 ****
          For i = 0 To UBound(arrServers)
              If arrServers(i).Events Then
!                 wbNotify(i).Navigate2 arrServers(i).BaseURL & 
"notify_simple.php?rnd=" & Rnd
              End If
          Next i
--- 343,347 ----
          For i = 0 To UBound(arrServers)
              If arrServers(i).Events Then
!                 NavigateNotify i, "notify_simple.php?rnd=" & Rnd
              End If
          Next i
***************
*** 328,331 ****
--- 352,361 ----
  End Sub
  
+ Private Sub tmrTrayDely_Timer()
+     tmrTrayDely.Enabled = False
+     SetInTray False
+     SetTrayTip "phpGWShell"
+ End Sub
+ 
  Private Sub wbMail_DownloadComplete(Index As Integer)
  On Error Resume Next
***************
*** 337,340 ****
--- 367,374 ----
      Dim i As Integer
      Screen.MousePointer = vbNormal
+     
+     arrCookies(Index).SessionID = RequestQS(URL, "sessionid")
+     arrCookies(Index).Domain = RequestQS(URL, "domain")
+     
      If bEnding Then
          arrServers(Index).LoggedIn = False
***************
*** 392,396 ****
  Private Sub wbMail_StatusTextChange(Index As Integer, ByVal Text As String)
  On Error Resume Next
!     lblStatus.Caption = Text
  End Sub
  
--- 426,430 ----
  Private Sub wbMail_StatusTextChange(Index As Integer, ByVal Text As String)
  On Error Resume Next
!     lblStatus.Caption = Replace(Text, "&", "&&")
  End Sub
  
***************
*** 417,421 ****
      End If
      Screen.MousePointer = vbHourglass
!     strPost = "login=" & arrServers(Index).LoginID & "&passwd=" & 
arrServers(Index).Password & "&submit=login"
      If arrServers(Index).DomainRequired Then
          strPost = strPost & "&logindomain=" & arrServers(Index).Domain
--- 451,455 ----
      End If
      Screen.MousePointer = vbHourglass
!     strPost = "login=" & arrServers(Index).LoginID & "&passwd=" & 
arrServers(Index).Password & "&submit=login&passwd_type=text"
      If arrServers(Index).DomainRequired Then
          strPost = strPost & "&logindomain=" & arrServers(Index).Domain
***************
*** 430,434 ****
  On Error Resume Next
      Screen.MousePointer = vbHourglass
!     wbMail(Index).Navigate2 arrServers(Index).BaseURL & 
"email/compose.php?folder=INBOX&to=" & strEmailTo
      bSendEmail = False
  End Sub
--- 464,468 ----
  On Error Resume Next
      Screen.MousePointer = vbHourglass
!     NavigateMail Index, "email/compose.php?folder=INBOX&to=" & strEmailTo
      bSendEmail = False
  End Sub
***************
*** 530,535 ****
  Private Sub NewMailPrompt(Index As Integer, Optional NumMsg As Long = 0)
  On Error Resume Next
!     
!     If arrServers(Index).LastNumMsg <> NumMsg Then
          SetInTray True
          SetTrayTip "New email on server """ & arrServers(Index).FriendlyName 
& """"
--- 564,568 ----
  Private Sub NewMailPrompt(Index As Integer, Optional NumMsg As Long = 0)
  On Error Resume Next
!     If arrServers(Index).LastNumMsg < NumMsg Then
          SetInTray True
          SetTrayTip "New email on server """ & arrServers(Index).FriendlyName 
& """"
***************
*** 538,546 ****
              Call PlaySound("MailBeep", 0, SND_ASYNC Or SND_NOWAIT)
          End If
!         If arrServers(Index).EventPrompt Then
              If vbYes = MsgBox("You have new email on server """ & 
arrServers(Index).FriendlyName & """.  Would you like to read it now?", 
vbQuestion + vbYesNo) Then
                  Screen.MousePointer = vbHourglass
!                 wbMail(Index).Navigate2 arrServers(Index).BaseURL & "email/"
              End If
          End If
      End If
--- 571,581 ----
              Call PlaySound("MailBeep", 0, SND_ASYNC Or SND_NOWAIT)
          End If
!         If arrServers(Index).EventPrompt And Not bNewMailPrompt Then
!             bNewMailPrompt = True
              If vbYes = MsgBox("You have new email on server """ & 
arrServers(Index).FriendlyName & """.  Would you like to read it now?", 
vbQuestion + vbYesNo) Then
                  Screen.MousePointer = vbHourglass
!                 NavigateMail Index, "email/"
              End If
+             bNewMailPrompt = False
          End If
      End If
***************
*** 746,751 ****
      SetForegroundWindow Me.hwnd                     ' Set current window as 
ForegroundWindow
      PostMessage Me.hwnd, WM_USER, 0&, 0&            ' Update form...
!     SetInTray False
!     SetTrayTip "phpGWShell"
      ShowServer iNewEventServer
  End Sub
--- 781,785 ----
      SetForegroundWindow Me.hwnd                     ' Set current window as 
ForegroundWindow
      PostMessage Me.hwnd, WM_USER, 0&, 0&            ' Update form...
!     tmrTrayDely.Enabled = True
      ShowServer iNewEventServer
  End Sub
***************
*** 799,803 ****
          wbNotify(i).Visible = True
          wbNotify(i).ZOrder 99
-         Debug.Print DoLogin & " " & arrServers(i).LoggedIn
          If DoLogin And Not arrServers(i).LoggedIn Then
              If arrServers(i).AutoLogin Then
--- 833,836 ----
***************
*** 811,812 ****
--- 844,884 ----
      ShowServer iDefaultServer
  End Sub
+ 
+ Private Sub NavigateMail(Index As Integer, Path As String)
+     Dim sAddOn As String
+     
+     If arrCookies(Index).SessionID <> "" Then
+         sAddOn = "sessionid=" & arrCookies(Index).SessionID
+     End If
+     If arrCookies(Index).Domain <> "" Then
+         If sAddOn <> "" Then sAddOn = sAddOn & "&"
+         sAddOn = sAddOn & "domain=" & arrCookies(Index).Domain
+     End If
+     If InStr(Path, "?") = 0 Then
+         sAddOn = "?" & sAddOn
+     Else
+         sAddOn = "&" & sAddOn
+     End If
+     
+     wbMail(Index).Navigate2 arrServers(Index).BaseURL & Path & sAddOn
+ End Sub
+ 
+ Private Sub NavigateNotify(Index As Integer, Path As String)
+     Dim sAddOn As String
+     
+     If arrCookies(Index).SessionID <> "" Then
+         sAddOn = "sessionid=" & arrCookies(Index).SessionID
+     End If
+     If arrCookies(Index).Domain <> "" Then
+         If sAddOn <> "" Then sAddOn = sAddOn & "&"
+         sAddOn = sAddOn & "domain=" & arrCookies(Index).Domain
+     End If
+     If InStr(Path, "?") = 0 Then
+         sAddOn = "?" & sAddOn
+     Else
+         sAddOn = "&" & sAddOn
+     End If
+     
+     wbNotify(Index).Navigate2 arrServers(Index).BaseURL & Path & sAddOn
+ End Sub
+ 

Index: frmOptions.frm
===================================================================
RCS file: /cvsroot/phpgroupware/phpGWShell_Win32_VB/frmOptions.frm,v
retrieving revision 1.2
retrieving revision 1.2.4.1
diff -C2 -r1.2 -r1.2.4.1
*** frmOptions.frm      19 Feb 2001 05:06:42 -0000      1.2
--- frmOptions.frm      26 Mar 2003 22:11:57 -0000      1.2.4.1
***************
*** 400,403 ****
--- 400,404 ----
      If lIndex > UBound(arrServers) Then
          ReDim Preserve arrServers(lIndex)
+         ReDim Preserve arrCookies(lIndex)
      End If
      

Index: frmServers.frm
===================================================================
RCS file: /cvsroot/phpgroupware/phpGWShell_Win32_VB/frmServers.frm,v
retrieving revision 1.1
retrieving revision 1.1.4.1
diff -C2 -r1.1 -r1.1.4.1
*** frmServers.frm      19 Feb 2001 05:06:42 -0000      1.1
--- frmServers.frm      26 Mar 2003 22:11:57 -0000      1.1.4.1
***************
*** 163,166 ****
--- 163,167 ----
      Next j
      ReDim Preserve arrServers(UBound(arrServers) - 1)
+     ReDim Preserve arrCookies(UBound(arrServers))
      SaveServers
      Fill_List Me, lstServers, arrServers

Index: modMain.bas
===================================================================
RCS file: /cvsroot/phpgroupware/phpGWShell_Win32_VB/modMain.bas,v
retrieving revision 1.2
retrieving revision 1.2.4.1
diff -C2 -r1.2 -r1.2.4.1
*** modMain.bas 19 Feb 2001 05:06:42 -0000      1.2
--- modMain.bas 26 Mar 2003 22:11:57 -0000      1.2.4.1
***************
*** 140,144 ****
--- 140,150 ----
  End Type
  
+ Public Type Cookie
+     SessionID As String
+     Domain As String
+ End Type
+ 
  Public arrServers() As Server
+ Public arrCookies() As Cookie
  Public iDefaultServer As Integer, iSecondsToLogout As Integer
  Public Dummy As Variant, bAppLoading As Boolean
***************
*** 310,313 ****
--- 316,320 ----
          Open App.Path & "\servers.dat" For Binary As #1
          ReDim arrServers(iCount)
+         ReDim arrCookies(iCount)
          Get #1, 1, arrServers
          Close #1
***************
*** 336,337 ****
--- 343,382 ----
      WriteSavedSetting "Options", "VersionRevision", App.Revision
  End Sub
+ 
+ Public Function RequestQS(ByVal strQueryString As String, strName As String) 
As String
+ On Error GoTo Error_Handle
+     Dim iStart, iEnd As Integer, Temp As String
+     
+     RequestQS = ""
+     If strQueryString = "" Or strQueryString = "http:///"; Then
+         Exit Function
+     End If
+     
+     iStart = InStr(strQueryString, strName & "=") + Len(strName) + 1
+     
+     iEnd = InStr(iStart, strQueryString, "&")
+     If iEnd = 0 Then iEnd = Len(strQueryString) + 1
+     If Len(strQueryString) = 0 Then iEnd = iStart
+     Temp = Mid(strQueryString, iStart, iEnd - iStart)
+     
+     'remove the HTML space code %20
+     RequestQS = ""
+     For iStart = 1 To Len(Temp)
+         If Mid(Temp, iStart, 3) = "%20" Then
+             RequestQS = RequestQS & " "
+             iStart = iStart + 2
+         Else
+             RequestQS = RequestQS & Mid(Temp, iStart, 1)
+         End If
+     Next iStart
+     
+ Exit_Proc:
+     Exit Function
+ 
+ Error_Handle:
+     MsgBox Error$ & " in RequestQS", vbExclamation, "Error"
+     GoTo Exit_Proc
+ 
+ End Function
+ 
+ 

Index: phpGWShell.exe
===================================================================
RCS file: /cvsroot/phpgroupware/phpGWShell_Win32_VB/phpGWShell.exe,v
retrieving revision 1.1
retrieving revision 1.1.4.1
diff -C2 -r1.1 -r1.1.4.1
Binary files /tmp/cvsFKoq7u and /tmp/cvsuL73OQ differ

Index: phpGWShell.vbp
===================================================================
RCS file: /cvsroot/phpgroupware/phpGWShell_Win32_VB/phpGWShell.vbp,v
retrieving revision 1.2
retrieving revision 1.2.4.1
diff -C2 -r1.2 -r1.2.4.1
*** phpGWShell.vbp      19 Feb 2001 05:06:42 -0000      1.2
--- phpGWShell.vbp      26 Mar 2003 22:11:58 -0000      1.2.4.1
***************
*** 1,5 ****
  Type=Exe
! 
Reference=*\G{00020430-0000-0000-C000-000000000046}#2.0#0#..\..\..\WINNT\System32\stdole2.tlb#OLE
 Automation
! Object={EAB22AC0-30C1-11CF-A7EB-0000C05BAE0B}#1.1#0; SHDOCVW.dll
  Form=frmMain.frm
  Form=frmOptions.frm
--- 1,5 ----
  Type=Exe
! 
Reference=*\G{00020430-0000-0000-C000-000000000046}#2.0#0#..\..\..\..\..\WINNT\System32\stdole2.tlb#OLE
 Automation
! Object={EAB22AC0-30C1-11CF-A7EB-0000C05BAE0B}#1.1#0; shdocvw.dll
  Form=frmMain.frm
  Form=frmOptions.frm

Index: phpGWShell.vbw
===================================================================
RCS file: /cvsroot/phpgroupware/phpGWShell_Win32_VB/phpGWShell.vbw,v
retrieving revision 1.2
retrieving revision 1.2.4.1
diff -C2 -r1.2 -r1.2.4.1
*** phpGWShell.vbw      19 Feb 2001 05:06:42 -0000      1.2
--- phpGWShell.vbw      26 Mar 2003 22:11:58 -0000      1.2.4.1
***************
*** 1,7 ****
! frmMain = 44, 44, 670, 488, , 22, 22, 648, 466, C
  frmOptions = 154, 154, 780, 598, C, 88, 88, 714, 532, C
! modMain = 176, 176, 802, 620, Z
  frmAbout = 0, 0, 0, 0, C, 88, 88, 714, 532, C
! modPrevInst = 66, 66, 692, 510, C
  ISubclass = 110, 110, 736, 554, C
  MSubclass = 198, 198, 824, 642, 
--- 1,7 ----
! frmMain = 44, 44, 670, 488, Z, 22, 22, 648, 466, C
  frmOptions = 154, 154, 780, 598, C, 88, 88, 714, 532, C
! modMain = 176, 176, 802, 620, 
  frmAbout = 0, 0, 0, 0, C, 88, 88, 714, 532, C
! modPrevInst = 66, 66, 692, 510, 
  ISubclass = 110, 110, 736, 554, C
  MSubclass = 198, 198, 824, 642, 





reply via email to

[Prev in Thread] Current Thread [Next in Thread]