FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour FiveWeb
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: FiveWeb
Posted: Sun Jan 25, 2015 08:13 AM

Darrell,

I see that each task is managed by a DLL.

Do you create the DLLs using ClipWeb ?

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 708
Joined: Fri Oct 28, 2005 09:53 AM
Re: FiveWeb
Posted: Sun Jan 25, 2015 01:47 PM

Hi Antonio,

No, we create an EXE using xBase++ / Clipweb. We then take a DLL provided by Clipweb then name it to the application. For example, if we create tutor01.exe then we would have a DLL name tutor01.dll. We call tutor01.dll from web browser then it executes tutor01.exe and returns web page.

SIncerely,

*~*~*~*~*~*~*~*~*~*
Darrell Ortiz
CDM Software Solutions, Inc.
https://www.cdmsoft.com
Posts: 708
Joined: Fri Oct 28, 2005 09:53 AM
Re: FiveWeb
Posted: Sun Jan 25, 2015 01:49 PM

Hi Antonio,

Here is PRG:

include "adsdbe.ch"

include "ads.ch"

include "\CLIPWEB\INCLUDE\CLIPWEB.H"

include "cdm.h"

FUNCTION MAIN( cIniFile )

LOCAL oSession , ;
nCnt := 0 , ;
lPass := .F. , ;
cUID := '' , ;
cPID := '' , ;
cName := '' , ;
aUserPerm := {}

// Init...
CgiInit()

IF cIniFile != Nil
nHOut :=cgiForm(cIniFile)
else
RETURN Void
ENDIF

// Init...
SET EPOCH TO 1980
SET DATE FORMAT TO "MM/DD/YYYY"
SET EXCLUSIVE OFF
SET DELETED ON
SET DECIMALS TO 2

// Init...
cUID := _CgiGet( 'userid' )
cPID := _CgiGet( 'password' )
cUTYPE := "OPERATIONS"
cCID := ""
cULID := ""
cHdr := "#2B60DE"
cHdrTxt := "#000000"
cTable := '#BBBBFF'
cHover := '#6699CC'
cColOn := '#BBFFFF'
cColOff := '#BBBBFF'
cBkgrnd := ''
cTtlCol := '#2B60DE'
cTtlFnt := 'tahoma'
cTBback := '#2B60DE'
cTBtext := '#FFFFFF'
cPBback := '#254117'
cPBtext := '#FFFFFF'
cCricol := '#2B60DE'
cCWcol := '#2B60DE'
cDE01 := '#2B60DE'
cDE02 := '#2B60DE'
cDE03 := '#2B60DE'
cDE04 := '#2B60DE'
cDE05 := '#2B60DE'
cDE06 := '#2B60DE'
cDE07 := '#2B60DE'
cDE08 := '#2B60DE'
cDE09 := '#2B60DE'
cLogo := ""
cWid := "100"
cHgt := "100"
cComp := ""
lLink := .F.
cLastD := ""
cLastT := ""
nRowMax := nMax // 13
nRowCnt := 0

IF 'LINK=' $ cQueryString
lLink := .T.
lStart := .F.
cUID := ''
FOR nX=1 TO LEN( cQueryString )
cChar := SUBSTR( cQueryString, nX, 1 )
DO CASE
CASE cChar='='
lStart := .T.
CASE cChar='&'
EXIT
CASE lStart
cUID += cChar
ENDCASE
NEXT nX
ENDIF

// Default...
put( '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">' )

put( '<html>' )
put( '<head>' )
put( '<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />')
put( [<title>] + cTitle + [</title>] )
put( '<meta name="Description" content="U.S. Customs certified software provider for freight forwarders, NVOCC and logistics companies"/>')
put( '<meta name="Keywords" content="RFID, Asset, Asset Management, Inspection, Certification, Maintenance, Barcode"/>')
put( '<link REL="SHORTCUT ICON" HREF="http://www.isfsoftware.com/cdm.ico">' )
put( '<link media="screen" rel="stylesheet" type="text/css" href="css/style.css" />' )
put( '</head>' )

put( '<body>' )

SET DEFAULT TO ( cRoot )

// connect to the ADS server
IF lAds
oSession := dacSession():New( "ADSDBE", cRoot )

// check if we are connected to the ADS server
IF ( ! oSession:isConnected( ) )
   _AdsErr( LTRIM( STR( oSession:getLastError(), 9 ) ) )
   RETURN Void
ENDIF

// use FPT/CDX compatible files
DbeInfo( COMPONENT_DATA,  ADSDBE_TBL_MODE , ADSDBE_CDX)
DbeInfo( COMPONENT_ORDER, ADSDBE_INDEX_EXT, &quot;CDX&quot;)

ENDIF

// Load Profile...
IF ! _LoadProfile()
_AdsOpenErr( cRoot, 'aimmgr', oSession )
RETURN Void
ENDIF

// User...
lPass := _UserDetails( lLink, cUID, cPID, @cName, @cUTYPE, @cCID, @cULID, @cLastD, @cLastT, .T. )
IF ! lPass
_LoginError( cUID + IF( lLink, "--LINK=YES", "--LINK=NO"), oSession )
RETURN Void
ENDIF

// User Permissions...
aUserPerm := _UserAccess( cUID, "DASHBOARD" )

// Open...
_db( cRoot, 'job' )
_db( cRoot, 'maint' )

put( [<div id="wrapper">] )
put( [ <div id="head">] )
put( [ <div id="logo_user_details">] )
put( [ <h1 id="logo"><a href="#"><img src="images/logo.jpg" alt=""></a></h1>] )
put( [ <div id="user_details">] )
put( [ <ul id="user_details_menu">] )
put( [ <li>Welcome <strong>] + cName + [</strong></li>] )
put( [ <li class="user_details_menu_options">] )
put( [ <ul id="user_access">] )
put( [ <li class="first"><a target="_blank" href="aim.pdf">User Guide</a></li>] )
put( [ <li class="user_access_line">|</li>] )
put( [ <li class="last"><a href="login.htm">Log out</a></li>] )
put( [ </ul>] )
put( [ </li>] )
put( [ </ul>] )
put( [ </div>] )
put( [ </div>] )
put( [ </div>] )
put( [ <div id="content">] )
put( [ <div id="page">] )
put( [ <div class="inner">] )
put( [ <div class="section table_section">] )
put( [ <div class="title_wrapper">] )
put( [ <h2>] + cClientName + [ Asset Manager 2014</h2>] )
put( [ </div>] )
put( [ <div class="section_content">] )
put( [ <div class="section_content_padding">] )
put( [ <div class="dashboard_menu_wrapper">] )
put( [ <ul class="dashboard_menu">] )
IF aUserPerm[01] .AND. (cClient=="NOBLE")
put( [ <li><a class="noble" href="job.dll?LINK=] + cUid + ["><span>Service Calls</span></a></li>] )
ENDIF
IF aUserPerm[02]
put( [ <li><a class="item" href="product.dll?LINK=] + cUid + ["><span>Asset List</span></a></li>] )
ENDIF
IF aUserPerm[03] .AND. (cClient=="NOBLE")
put( [ <li><a class="d14" href="insp.dll?LINK=] + cUid + ["><span>Inspections</span></a></li>] )
ENDIF
IF aUserPerm[04]
put( [ <li><a class="service" href="maint.dll?LINK=] + cUid + ["><span>Maintenance</span></a></li>] )
ENDIF
IF aUserPerm[05]
put( [ <li><a class="event" href="event.dll?LINK=] + cUid + ["><span>Events</span></a></li>] )
ENDIF
IF aUserPerm[06]
put( [ <li><a class="d12" href="report.dll?LINK=] + cUid + ["><span>Reports</span></a></li>] )
ENDIF
IF aUserPerm[07]
put( [ <li><a class="edit" href="codes.dll?LINK=] + cUid + ["><span>Codes</span></a></li>] )
ENDIF
IF "ADMIN" $ cUType
put( [ <li><a class="d1" href="user.dll?LINK=] + cUid + ["><span>Security</span></a></li>] )
ENDIF
put( [ </ul>] )
put( [ </div>] )
put( [ </div>] )
put( [ </div>] )
put( [ </div>] )
put( [ <div class="section table_section">] )

DO CASE
CASE cClient=="NOBLE"
put( [ <div class="title_wrapper">] )
put( [ <h2>Service Calls</h2>] )
put( [ </div>] )
put( [ <div class="section_content">] )
put( [ <div class="table_wrapper">] )
put( [ <div class="table_wrapper_inner" style="padding:0;">] )
put( [ <table>] )
put( [ <tr>] )
put( [ <th><a href="javascript:void(0);">Job No.</a></th>] )
put( [ <th><a href="javascript:void(0);">Job Date</a></th>] )
put( [ <th><a href="javascript:void(0);">Job Site</a></th>] )
put( [ <th><a href="javascript:void(0);">Location</a></th>] )
put( [ <th><a href="javascript:void(0);">Customer</a></th>] )
put( [ <th><a href="javascript:void(0);">Customer PO</a></th>] )
put( [ <th><a href="javascript:void(0);">Call Type</a></th>] )
put( [ <th><a href="javascript:void(0);">Call Status</a></th>] )
put( [ </tr>] )

      SELECT job
      SET ORDER TO TAG S4
      GO TOP
      SEEK &quot;OPEN&quot;

      DO WHILE ! EOF() .AND. (nRowCnt&lt;nRowMax) .AND. ( ALLTRIM( job-&gt;callstat )==&quot;OPEN&quot; )

         IF ! cUTYPE $ &quot;SYSADMIN,CUSTADMIN,DISTRICTMGR&quot;
            IF ALLTRIM( job-&gt;location ) &lt;&gt; cULID
               SKIP
               LOOP
            ENDIF
         ENDIF

         put( [&lt;tr&gt;] )

         // Data...
         cDat := ALLTRIM( UPPER( job-&gt;jobno ) )
         IF EMPTY( cDat )
            cDat := &quot;&amp;nbsp;&quot;
         ENDIF
         put( [&lt;td&gt;] + cDat + [&lt;/td&gt;] )

         cDat := DTOC( job-&gt;jobdate )
         IF EMPTY( cDat )
            cDat := &quot;&amp;nbsp;&quot;
         ENDIF
         put( [&lt;td&gt;] + cDat + [&lt;/td&gt;] )

         cDat := ALLTRIM( job-&gt;jobsite )
         IF EMPTY( LEFT( cDat, 2 ) )
            cDat := &quot;&amp;nbsp;&quot;
         ENDIF
         put( [&lt;td&gt;] + cDat + [&lt;/td&gt;] )

         cDat := ALLTRIM( job-&gt;location )
         IF EMPTY( LEFT( cDat, 2 ) )
            cDat := &quot;&amp;nbsp;&quot;
         ENDIF
         put( [&lt;td&gt;] + cDat + [&lt;/td&gt;] )

         cDat := ALLTRIM( job-&gt;custname )
         IF EMPTY( cDat )
            cDat := &quot;&amp;nbsp;&quot;
         ENDIF
         put( [&lt;td&gt;] + cDat + [&lt;/td&gt;] )

         cDat := ALLTRIM( job-&gt;custpo )
         IF EMPTY( cDat )
            cDat := &quot;&amp;nbsp;&quot;
         ENDIF
         put( [&lt;td&gt;] + cDat + [&lt;/td&gt;] )

         cDat := ALLTRIM( job-&gt;calltype )
         IF EMPTY( cDat )
            cDat := &quot;&amp;nbsp;&quot;
         ENDIF
         put( [&lt;td&gt;] + cDat + [&lt;/td&gt;] )

         cDat := ALLTRIM( job-&gt;callstat )
         IF EMPTY( cDat )
            cDat := &quot;&amp;nbsp;&quot;
         ENDIF
         put( [&lt;td&gt;] + cDat + [&lt;/td&gt;] )

         put( [&lt;/tr&gt;] )

         // Counter...
         nRowCnt++

         SELECT job
         SKIP
      ENDDO

      put( [                      &lt;/table&gt;] )
      put( [                     &lt;/div&gt;] )
      put( [                  &lt;/div&gt;] )
      put( [            &lt;/div&gt;] )

 OTHERWISE
      put( [            &lt;div class=&quot;title_wrapper&quot;&gt;] )
      put( [               &lt;h2&gt;Last Maintenance Records&lt;/h2&gt;] )
      put( [            &lt;/div&gt;] )
      put( [            &lt;div class=&quot;section_content&quot;&gt;] )
      put( [                  &lt;div class=&quot;table_wrapper&quot;&gt;] )
      put( [                     &lt;div class=&quot;table_wrapper_inner&quot; style=&quot;padding:0;&quot;&gt;] )
      put( [                      &lt;table&gt;] )
      put( [                      &lt;tr&gt;] )
      put( [                        &lt;th&gt;&lt;a href=&quot;javascript&#058;void(0);&quot;&gt;Car No.&lt;/a&gt;&lt;/th&gt;] )
      put( [                        &lt;th&gt;&lt;a href=&quot;javascript&#058;void(0);&quot;&gt;Style&lt;/a&gt;&lt;/th&gt;] )
      put( [                        &lt;th&gt;&lt;a href=&quot;javascript&#058;void(0);&quot;&gt;Date of Service&lt;/a&gt;&lt;/th&gt;] )
      put( [                        &lt;th&gt;&lt;a href=&quot;javascript&#058;void(0);&quot;&gt;Technician&lt;/a&gt;&lt;/th&gt;] )
      put( [                        &lt;th&gt;&lt;a href=&quot;javascript&#058;void(0);&quot;&gt;Status&lt;/a&gt;&lt;/th&gt;] )
      put( [                      &lt;/tr&gt;] )

      SELECT maint
      SET ORDER TO TAG S1
      GO TOP

      DO WHILE ! EOF() .AND. (nRowCnt&lt;nRowMax)

         IF ! cUTYPE $ &quot;SYSADMIN,CUSTADMIN,DISTRICTMGR&quot;
            IF ALLTRIM( maint-&gt;location ) &lt;&gt; cULID
               SKIP
               LOOP
            ENDIF
         ENDIF

         put( [&lt;tr&gt;] )

         // Data...
         cDat := ALLTRIM( UPPER( maint-&gt;assetno ) )
         IF EMPTY( cDat )
            cDat := &quot;&amp;nbsp;&quot;
         ENDIF
         put( [&lt;td&gt;] + cDat + [&lt;/td&gt;] )

         cDat := ALLTRIM( maint-&gt;assettype )
         IF EMPTY( cDat )
            cDat := &quot;&amp;nbsp;&quot;
         ENDIF
         put( [&lt;td&gt;] + cDat + [&lt;/td&gt;] )

         cDat := DTOC( maint-&gt;mntdate )
         IF EMPTY( LEFT( cDat, 2 ) )
            cDat := &quot;&amp;nbsp;&quot;
         ENDIF
         put( [&lt;td&gt;] + cDat + [&lt;/td&gt;] )

         cDat := ALLTRIM( maint-&gt;mntby )
         IF EMPTY( LEFT( cDat, 2 ) )
            cDat := &quot;&amp;nbsp;&quot;
         ENDIF
         put( [&lt;td&gt;] + cDat + [&lt;/td&gt;] )

         cDat := ALLTRIM( maint-&gt;mntstat )
         IF EMPTY( cDat )
            cDat := &quot;&amp;nbsp;&quot;
         ENDIF
         put( [&lt;td&gt;] + cDat + [&lt;/td&gt;] )

         put( [&lt;/tr&gt;] )

         // Counter...
         nRowCnt++

         SELECT maint
         SKIP
      ENDDO

      put( [                      &lt;/table&gt;] )
      put( [                     &lt;/div&gt;] )
      put( [                  &lt;/div&gt;] )
      put( [            &lt;/div&gt;] )

ENDCASE

put( [ </div>] )
put( [ </div>] )
put( [ </div>] )
put( [ </div>] )
put( [</div>] )

// Footer...
_CdmFooter()

put( [</body>] )
put( [</html>] )

IF lAds
oSession:disconnect()
ENDIF
DbCloseAll()
CloseCGISession()

RETURN Void

*~*~*~*~*~*~*~*~*~*
Darrell Ortiz
CDM Software Solutions, Inc.
https://www.cdmsoft.com
Posts: 708
Joined: Fri Oct 28, 2005 09:53 AM
Re: FiveWeb
Posted: Sun Jan 25, 2015 01:51 PM

Hi Antonio,

Here is batch we use to create EXE

@echo OFF

CLS
ECHO Compiling...

DEL .OBJ
DEL
.EXE

call \utils\xpp190.bat

xpp \clipweb\source\errorsys\errorsys.xpp /m /n /I....\include %2
xpp dashboard /m /n /I....\include %2
xpp cdm /m /n /I....\include %2

IF ERRORLEVEL 1 GOTO EXIT

ECHO
ECHO Linking...

ALINK dashboard.obj cdm.obj errorsys.obj \clipweb\lib\cwebxpp.lib

*~*~*~*~*~*~*~*~*~*
Darrell Ortiz
CDM Software Solutions, Inc.
https://www.cdmsoft.com
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: FiveWeb
Posted: Sun Jan 25, 2015 04:47 PM

Darrell,

I see, the DLL calls the EXE and surely it may returns the output of the EXE.

Is the source code of that DLL provided ? Anyhow, even if it is not provided we can easily build ours :-)

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: FiveWeb
Posted: Sun Jan 25, 2015 05:12 PM
Darrell,

If you help me to test it, I think we will be running FiveWeb apps on IIS real soon :-)

First of all, lets build a fiveweb.dll and lets test it:

fiveweb.c
Code (fw): Select all Collapse
#include <windows.h>

#ifdef __BORLANDC__
#pragma argsused
#endif

BOOL WINAPI DllEntryPoint( HINSTANCE hinstDLL, DWORD fdwReason, 
                           LPVOID lpvReserved )
{
   WinExec( "tutor01.exe", SW_HIDE );
   
   return TRUE;
}


To build the fiveweb.dll run this go.bat
Code (fw): Select all Collapse
set path=c:\bcc582\bin
bcc32 -c fiveweb.c
ilink32 /Tpd c:\bcc582\lib\c0d32.obj fiveweb.obj, fiveweb.dll,, user32.lib cw32.lib import32.lib


You should have a fiveweb.dll that you could test from IIS. I appreciate if you give it a try, thanks!

Please have FiveWeb's tutor01.exe in the same path where fiveweb.dll is placed.
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 708
Joined: Fri Oct 28, 2005 09:53 AM
Re: FiveWeb
Posted: Sun Jan 25, 2015 05:41 PM

Hi Antonio,

I will happily test. However, it will be tomorrow as I am traveling to customer site today.

*~*~*~*~*~*~*~*~*~*
Darrell Ortiz
CDM Software Solutions, Inc.
https://www.cdmsoft.com
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: FiveWeb
Posted: Sun Jan 25, 2015 07:05 PM
Darrell,

Many thanks for your email and for your help. Have a nice flight :-)

I have not been able to make work the DLL (it gets downloaded instead of executed) but what I have found to my surprise is that this way we can perfectly execute FiveWeb's EXE from IIS :-)



Here you have all the steps that I have done, so now FiveWeb's EXEs can be executed from Microsoft IIS :-)











The fiveweb.dll is not needed at all to get the EXE running. I just left it there so you can see that both files are placed at the same location.
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: FiveWeb
Posted: Mon Jan 26, 2015 06:51 AM
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 284
Joined: Mon Oct 24, 2005 08:04 PM
Re: FiveWeb
Posted: Thu Jan 29, 2015 07:11 PM
Darrell:

Do your customers install your software on their servers or do you host the software on your servers?

If they host the software on their own server how hard is it for them to install and setup?

Do you have to use IIS? Could you use Apache instead?

Thanks,
Randal




cdmmaui wrote:Hi Randall,

Clipweb is no longer available as far as I know.

Antonio, I have tried to test. The biggest problem I have is that customers are using Windows 2008 and higher with IIS 7 and higher. In order to be successful with this product for my scenario, FiveWeb must in on Windows Server with IIS 7 or order. I have been able to modify xBase++ 2.0 and Clipweb to use MS SQL. I have been able to take advantage of CSS for the UI and Javascript.

Currently we have over 2500 in 23 countries users using our web based (Clipweb with DBFCDX) product.

For me, web based is the only option to manage multiple users, languages.

Sincerely,
Posts: 708
Joined: Fri Oct 28, 2005 09:53 AM
Re: FiveWeb
Posted: Fri Jan 30, 2015 12:16 AM
Hi Randal,

We install on our servers and on customer's servers. We are currently switching to Microsoft Server 2008 and 2012. We preferred IIS and do not have experience with Apache. We have been using this application with DBFCDX since 1998. However, we purchased xBase++ 2.0 (expensive at $1,995 USD) and we are converting an application to use MS SQL.

Here is a screen shot of the DBFCDX version,

*~*~*~*~*~*~*~*~*~*
Darrell Ortiz
CDM Software Solutions, Inc.
https://www.cdmsoft.com
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: FiveWeb
Posted: Fri Jan 30, 2015 04:53 AM

Darrell,

Harbour perfectly supports MS SQL so you really don't need xBase++

With Harbour you can use any database engine using ADO. It works great!

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 708
Joined: Fri Oct 28, 2005 09:53 AM
Re: FiveWeb
Posted: Fri Jan 30, 2015 05:22 AM

Hi Antonio,

Thank you. We have already invested thousands of hours with xBase and now that we got 2.0 working with Clipweb, we only need to change DBFCDX to MS SQL. We would need to rewrite completely to work with FiveWeb and I am not sure FiveWeb is stable enough to handle over 1000 simultaneous users at the same time. Once FiveWeb becomes more stable and their is ample documentation and support, we will reconsider. We are still moving forward with FiveWin Windows GUI for now (at least until end of 2016 or 2017) then we will have end of life of our FiveWin Windows GUI products and move completely to the web. Our backend web service, EDI, ERP integration systems will continue to be developed via FiveWin.

The industries that I serve are requiring web interfaces and if I do not provide them someone else will and basically put me out of business.

I love FiveWin and like many developers on this forum, we have been loyal to you and FiveTech Software. I truly appreciate the support you have given me personally and all the support from everyone on this forum.

SIncerely,

*~*~*~*~*~*~*~*~*~*
Darrell Ortiz
CDM Software Solutions, Inc.
https://www.cdmsoft.com
Posts: 284
Joined: Mon Oct 24, 2005 08:04 PM
Re: FiveWeb
Posted: Fri Feb 06, 2015 02:27 PM
cdmmaui wrote:Hi Randal,

We install on our servers and on customer's servers. We are currently switching to Microsoft Server 2008 and 2012. We preferred IIS and do not have experience with Apache. We have been using this application with DBFCDX since 1998. However, we purchased xBase++ 2.0 (expensive at $1,995 USD) and we are converting an application to use MS SQL.

Here is a screen shot of the DBFCDX version,



Darrell:

Thank you for the sample, very nice! I guess I would be correct to assume you do not subscribe to the conventional wisdom around here (and elsewhere) that CGI is obsolete?

Thanks,
Randal
Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
Re: FiveWeb
Posted: Fri Feb 06, 2015 02:47 PM
Randal,

Randal wrote:I guess I would be correct to assume you do not subscribe to the conventional wisdom around here (and elsewhere) that CGI is obsolete?


CGI is a great technology to me and it's not obsolete at all. It's only less and less supported by the providers and by the operating systems... :-)

I hope to be wrong.

EMG