2012-11-07 04:18 UTC+0100 Viktor Szakats (harbour syenar.net)

* extras/httpsrv/cgifunc.prg
  * extras/httpsrv/modules/tableservletdb.prg
  * extras/httpsrv/session.prg
  * extras/httpsrv/uhttpd.hbp
  * extras/httpsrv/uhttpd.prg
  * extras/httpsrv/uhttpdgd.hbp
  * extras/rddado/adordd.prg
    * formatted
    ! some commented code converted to #if 0/#endif block
This commit is contained in:
Viktor Szakats
2012-11-07 03:19:49 +00:00
parent 6d60145620
commit 2c4d86c392
8 changed files with 91 additions and 162 deletions

View File

@@ -779,55 +779,10 @@ STATIC FUNCTION TimeDiffAsSeconds( dDateStart, dDateEnd, cTimeStart, cTimeEnd )
__defaultNIL( @dDateEnd, Date() )
__defaultNIL( @cTimeEnd, Time() )
aRetVal := FT_ELAPSED( dDateStart, dDateEnd, cTimeStart, cTimeEnd )
aRetVal := ft_Elapsed( dDateStart, dDateEnd, cTimeStart, cTimeEnd )
RETURN aRetVal[ 4, 2 ]
// Nanforum ELAPSED
STATIC FUNCTION FT_ELAPSED( dStart, dEnd, cTimeStart, cTimeEnd )
LOCAL nTotalSec, nCtr, nConstant, nTemp, aRetVal[ 4, 2 ]
IF HB_ISSTRING( dStart )
cTimeStart := dStart
dStart := Date()
ELSEIF ! HB_ISDATE( dStart )
dStart := Date()
ENDIF
IF HB_ISSTRING( dEnd )
cTimeEnd := dEnd
dEnd := Date()
ELSEIF ! HB_ISDATE( dEnd )
dEnd := Date()
ENDIF
iif( ! HB_ISSTRING( cTimeStart ), cTimeStart := '00:00:00', )
iif( ! HB_ISSTRING( cTimeEnd ), cTimeEnd := '00:00:00', )
nTotalSec := ;
( dEnd - dStart ) * 86400 + ;
Val( cTimeEnd ) * 3600 + ;
Val( SubStr( cTimeEnd, At( ':', cTimeEnd ) + 1, 2 ) ) * 60 + ;
iif( RAt( ':', cTimeEnd ) == At( ':', cTimeEnd ), 0, ;
Val( SubStr( cTimeEnd, RAt( ':', cTimeEnd ) + 1 ) ) ) - ;
Val( cTimeStart ) * 3600 - ;
Val( SubStr( cTimeStart, At( ':', cTimeStart ) + 1, 2 ) ) * 60 - ;
iif( RAt( ':', cTimeStart ) == At( ':', cTimeStart ), 0, ;
Val( SubStr( cTimeStart, RAt( ':', cTimeStart ) + 1 ) ) )
nTemp := nTotalSec
FOR nCtr := 1 TO 4
nConstant := iif( nCtr == 1, 86400, iif( nCtr == 2, 3600, iif( nCtr == 3, 60, 1 ) ) )
aRetVal[ nCtr, 1 ] := Int( nTemp / nConstant )
aRetval[ nCtr, 2 ] := nTotalSec / nConstant
nTemp -= aRetVal[ nCtr, 1 ] * nConstant
NEXT
RETURN aRetVal
// ------------------------------
METHOD Encode() CLASS uhttpd_Session