Mod Harbour challenge project

Mod Harbour challenge project

Postby Marc Venken » Wed Mar 31, 2021 9:00 am

Hey Otto and Mod Harbour friends

Today for first I see a project that could be of importance for me. Let me explane

Some of my customers want the possibility to order online, but specific they only want to see there products with the prices for them.

My webshop system is general and this functionality is not build in. (Way to expensive if they addapt, and still i would not be happy)

We have now Mod Harbour + FW and the people here !!

Project :

Log in with customer PW (possible small registration form to confirm by us ?)
retrieve customer specific data (now in dbf files local)
show a customer welcome screen with a logo and some manual for use
simple order form (xbrowse ?) where I show the product
and some extra fields (order nummer, intern doc, remarks fields)
and a send button so i can process it local for delivery

possible issue

many products have more than one color and more than one size, so the browse should have 2 combo's inside it

There is no need for payment or so... just a online ordering form

What do you think about it ? Is this not a good project to start with Mod ?
Marc Venken
Using: FWH 23.04 with Harbour
User avatar
Marc Venken
 
Posts: 1426
Joined: Tue Jun 14, 2016 7:51 am
Location: Belgium

Re: Mod Harbour challenge project

Postby Otto » Wed Mar 31, 2021 11:42 am

Hello Mark,
Yes, mod harbour is just suitable for that.

You can start with mod harbor HTML / JS or with the framework TWeb.
Charles has a web shop with mod harbour and TWeb.

There is a template HTML / JS in the mod harbor examples:
https://www.modharbour.club/modharbour_ ... /index.prg

Best regards,
Otto
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
User avatar
Otto
 
Posts: 6322
Joined: Fri Oct 07, 2005 7:07 pm

Re: Mod Harbour challenge project

Postby Marc Venken » Wed Mar 31, 2021 2:06 pm

Otto,

The sample for the reservation of table (yours) seems to be a far better sample for my purpose.
The sample is not on the sample list. Can I have access to it or should I contact you ?
Marc Venken
Using: FWH 23.04 with Harbour
User avatar
Marc Venken
 
Posts: 1426
Joined: Tue Jun 14, 2016 7:51 am
Location: Belgium

Re: Mod Harbour challenge project

Postby Otto » Wed Mar 31, 2021 2:52 pm

https://www.modharbour.club/mh_bestellservice/restaurant.prg

Hello Mark,
do you mean this project. If so, I can gladly give you the source code.

Ruth - my daughter and I worked on it in the first lockdown last year.
We haven't quite programmed it.
It would be nice if we could keep working on it together.

Best regards,
Otto
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
User avatar
Otto
 
Posts: 6322
Joined: Fri Oct 07, 2005 7:07 pm

Re: Mod Harbour challenge project

Postby Marc Venken » Wed Mar 31, 2021 3:06 pm

Indeed, that is the one.

I will have to look how to setup ModHarbour in order to get that sample working from my place, but you have the instructions for it.
Marc Venken
Using: FWH 23.04 with Harbour
User avatar
Marc Venken
 
Posts: 1426
Joined: Tue Jun 14, 2016 7:51 am
Location: Belgium

Re: Mod Harbour challenge project

Postby Antonio Linares » Wed Mar 31, 2021 6:08 pm

regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42076
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Mod Harbour challenge project

Postby Carles » Wed Mar 31, 2021 6:23 pm

Marc,

All your requirements are possible to do. In fact I show you in the animation just what you need, it is part of a system that is already in production.

Image

I write this post so that all the colleagues who are here, so that they know that mod_harbour is the new tool to make this movement to the web a reality. I'm not trying to sell anything, nor am I going to discuss with those who believe that this is not useful at all, etc ... I simply want to show you what you can do, clear up doubts, and I would like to add some first reflections so that you take them into account. If you are interested, we can use this thread from Marc to advance with these.

It is easy ?
No. A Hello world is easy, but an application needs your learning in the web environment

Can you make web programs 1 month?
The truth, I don't think so. The web is NOT easy, you need your learning, knowledge, experimentation, ...

Is it powerful ?
A lot. The power of your harbour at the server level is increased, even if you dare with Linux the speed is multiplied by 5

Is it reliable?
Completely. The modHarbour incorporates the VM and it is the same that you use in your programs

Does it work on Linux?
The same source works without touching a character in Windows and Linux

We can have a server in a hosting?
modHarbour is in the beginning and the hostings do not know it, but you can mount your server, or hire one to install the mod to your liking without any problem

How long do I need to make an application?
It depends on the level you have, but we could say that:
    - hello world 1 day
    - understand the web and create small forms 1 month
    - Interact with the DOM for 2 months
    - learn to design screens with standard html, css 3 months
    - learn 1 small application 6 months with all the components: system, login, form, layout, database,….

I don't want to learn frontend languages ​​(html, js, css, ...)
Then you will not program web. Whoever tells you otherwise will deceive you.

Can we create screens with FWH style language?
Yes. I have developed a library that you can use Tweb to help you and show the way for anyone who wants to develop their own, but the goal was to lay a foundation and see that the system works properly.

Can we port our win applications to the web?
NO. It is another architecture. You can wait sitting

Advantages over other web environments
    - The backend part is based on harbor. If you had for example to start with php (one of the most popular languages) you should add 1 year minimum to learn php, 2 years to have the level you currently have in harbor
    - Create a plus to your dbfs-based systems by creating modules for the web using your data
    - Possibility of creating your hrbs. You can compile your sources so that no one has access to them. Neither php has this option currently.

modHarbour allows you to make completely professional applications

To understand the little animation a bit now, you must now think about how it was built.

In the backend there are: java, phyton, php, ... and harbour!

The frontend part is the same for everyone

Thus, this application differs between making it with a language or harbour:


Code: Select all  Expand view
Backend:       php   |  harbour
---------------------+--------------
FrontEnd:        (html,js,css)
-------------------------------------


What does this mean ? You already know the backend part and you are experts

Finally, he just wants you to think that the tool is here. Now it is up to each one to take the leap and assimilate new concepts to be able to continue on their way ...

My respects to all those who do not believe in the web, I only try to convey knowledge to all of you in my final adventure with harbour and that you understand that the web is not easy, it is difficult (but for everyone), but ... yes you want, you can.


C.
Salutacions, saludos, regards

"...programar es fácil, hacer programas es difícil..."

UT Page -> https://carles9000.github.io/
Forum UT -> https://discord.gg/bq8a9yGMWh
Skype -> https://join.skype.com/cnzQg3Kr1dnk
User avatar
Carles
 
Posts: 1131
Joined: Fri Feb 10, 2006 2:34 pm
Location: Barcelona

Re: Mod Harbour challenge project

Postby ricbarraes » Wed Mar 31, 2021 6:38 pm

Marc,

I can tell you from my own experience... ModHarbour will decrease the learning curve of web developing by A LOT!

The main challenge here is understand the web paradigm. Charly was extremely precise in his explanation.

Here in the modharbour forum there's a lot of discussions and topics about it, I also recommend you to take a look at it:

https://forum.modharbour.app/viewforum.php?f=5
Sds,
Ricardo Arraes
ricardo@vfatec.com.br
User avatar
ricbarraes
 
Posts: 55
Joined: Tue Jun 30, 2015 2:26 am
Location: Brazil

Re: Mod Harbour challenge project

Postby Marc Venken » Thu Apr 01, 2021 8:00 am

Thanks for the great information. Usefull !!

I looked at the samples in Mod. Many are not usefull, but there should be a starting point.

It's like FW. There are many sampleis but only a few that will give a newby a great start like YUNUS.PRG

Yunus is a starting point and almost anything needed is there. (Layout, edit data, browses and pritn)

Use Yunus and changing to our purpose gives us a start in just a few days. The result is almost instantly visual and that gives the boost to devellop more. We see the result !!

Optimus looks great but seems to be already a commercial product, so the source will probably be shielded. (or not ?)
Otto's files are also great, and the code is free at this point, so that would be a great startup.

My programming skills are lets say 'ok' but I can't start from scratch. I need alway a sample and start from that. Fw Forum dilivers many samples and i always start from them.
A Sample from 20 lines become a function of 200 lines, mostly adapting to my needs.

BTW : In my case, i don't devellop for commercial use. I only use my own software for my firm.
Marc Venken
Using: FWH 23.04 with Harbour
User avatar
Marc Venken
 
Posts: 1426
Joined: Tue Jun 14, 2016 7:51 am
Location: Belgium

Re: Mod Harbour challenge project

Postby Otto » Thu Apr 01, 2021 10:08 am

Hello Mark,
I have integrated a dummy dbf file into eShop for a quick test.
I am posting the example on the mod harbor forum.

http://forums.fivetechsupport.com/viewtopic.php?f=45&t=40199&sid=bf47a3e870acc81fa4138e3b778593a1

Best regards,
Otto

Image
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
User avatar
Otto
 
Posts: 6322
Joined: Fri Oct 07, 2005 7:07 pm

Re: Mod Harbour challenge project

Postby Antonio Linares » Thu Apr 01, 2021 10:24 am

regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42076
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Mod Harbour challenge project

Postby Marc Venken » Thu Apr 01, 2021 10:52 am

Antonio Linares wrote:Marc,

have you reviewed mod_harbour genesis live example ?
https://www.modharbour.org/modharbour_samples/genesis/index.prg

Full source code:
https://github.com/FiveTechSoft/mod_harbour/tree/master/samples/genesis


Yes, but at first I had folowing error

Error opening table: views
UserName: Marc
File to open: /var/www/html/modharbour_samples/genesis/data/Marc/data/views
File exists: No
Error: Open error
filename: /var/www/html/modharbour_samples/genesis/data/Marc/data/views.dbf
called from: pcode.hrb, VIEW, line: 424
called from: pcode.hrb, LOGIN, line: 292
called from: pcode.hrb, CONTROLLER, line: 124
called from: pcode.hrb, MAIN, line: 13
called from: HB_HRBDO, line: 0
called from: ../source/exec.prg, EXECUTE, line: 70

Now it seems to work. Will look into it.
Marc Venken
Using: FWH 23.04 with Harbour
User avatar
Marc Venken
 
Posts: 1426
Joined: Tue Jun 14, 2016 7:51 am
Location: Belgium

Re: Mod Harbour challenge project

Postby Antonio Linares » Thu Apr 01, 2021 10:56 am

Marc,

Yes, there is an issue there to solve, thanks for the reminder

genesis example is a very simple code that shows the power of mod_harbour
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42076
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Mod Harbour challenge project

Postby Marc Venken » Thu Apr 01, 2021 9:10 pm

Excuses me, i just noticed that there is also a Mod forum for this )). Maybe it must move

I looked into the code of Genisis. It looks like code I did some years ago for my website.
I create then catalog pages with products, ....

the code then looked like this :

Code: Select all  Expand view

Function CreateOneHtmlPag()  // Maakt de pag waarop hij staat !!

   cFile = "c:\maveco\website\html\maveco folder\pag"+alltrim(fotoinde->code)+".htm"
   Fzoeken := FCREATE(cFile)

   FWRITE(Fzoeken,  "<html>" + chr(10)  )
   FWRITE(Fzoeken,  "<head>" + chr(10) )
   FWRITE(Fzoeken,  '<title>'+alltrim(fotoinde->titel)+'</title>' + chr(10))
   FWRITE(Fzoeken,  '<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">'  + chr(10))
   FWRITE(Fzoeken,  '</HEAD> ' + chr(10))
   FWRITE(Fzoeken,  '<body bgcolor="#FFFFFF" text="#000000" background="../../Internet%20Sources/Achtergrond.jpg" leftmargin="30">' + chr(10))

   FWRITE(Fzoeken,  '<table width="600" border="1" cellspacing="5" cellpadding="0"> ' + chr(10))
   FWRITE(Fzoeken,  '<tr>' + chr(10))
   FWRITE(Fzoeken,  '<td colspan="4"> ' + chr(10))
   FWRITE(Fzoeken,  '<div align="center"><font color="#0000FF"><b><font size="5">'+alltrim(fotoinde->titel) +'</font></b></font></div> ' + chr(10))
   FWRITE(Fzoeken,  '</td> ' + chr(10))
   FWRITE(Fzoeken,  '</tr> ' + chr(10))
   FWRITE(Fzoeken,  '<tr>' + chr(10))
   FWRITE(Fzoeken,  '<td width="140" height="99">  ' + chr(10))
   FWRITE(Fzoeken,  '<div align="center"><font color="#0000FF" size="5">'+alltrim(fotoinde->code)+'</font></div> ' + chr(10))
   FWRITE(Fzoeken,  '</td> ' + chr(10))
   FWRITE(Fzoeken,  '<td colspan="3" valign="top" height="77">' + chr(10))
   aText = formatMemo("FOTOPAG",fotoinde->info)
   FWRITE(Fzoeken,  '<p><font size="2" face="Verdana, Arial, Helvetica, sans-serif">' + chr(10))
   for mTel = 1 to Len(aText)
      FWRITE(Fzoeken,  alltrim(aText[mTel])+'<br>' + chr(10))
   next
   FWRITE(Fzoeken,  '</font></p> ' + chr(10))
   FWRITE(Fzoeken,  '</td> ' + chr(10))
   FWRITE(Fzoeken,  '</tr> ' + chr(10))

   fotodata->(dbseek(fotoinde->code))
   aInfo:={"","","",""} // 4 lege velden
   aPic150:={"","","",""}
   aPic400:={"","","",""}
   aHtmlFoto150:={"","","",""}
   aHtmlFoto400:={"","","",""}
   aHtmlArtNr :={"","","",""}
   aHtmlNom1 :={"","","",""}
   aHtmlNom2 :={"","","",""}
   nPosPag = 1
   do while fotodata->code = fotoinde->code
      if  empty(fotodata->artikel_nr)
          fotodata->(dbskip())
          loop
      endif
      artikel->(dbseek(fotodata->artikel_nr))
      if artikel->(rlock())
         artikel->fotopag = fotoinde->code
         artikel->online  = "PAG "+fotoinde->code
         artikel->(dbunlock())
      endif
      aPic150[nPosPag] = "c:\pictures\web150\"+substr(artikel->artikel_nr,1,3)+substr(artikel->artikel_nr,5,2)+substr(artikel->artikel_nr,8,2)+".jpg"
      aPic400[nPosPag] = "
c:\pictures\web400\"+substr(artikel->artikel_nr,1,3)+substr(artikel->artikel_nr,5,2)+substr(artikel->artikel_nr,8,2)+".jpg"
      if file(aPic150[nPosPag])
           cTarget = lower("
c:\maveco\website\pictures\"+substr(artikel->artikel_nr,1,3)+substr(artikel->artikel_nr,5,2)+substr(artikel->artikel_nr,8,2)+".jpg")
           copy file &(aPic150[nPosPag])  to &cTarget
      endif
      if file(aPic400[nPosPag])
           cTarget = lower("
c:\maveco\website\pictures\b"+substr(artikel->artikel_nr,1,3)+substr(artikel->artikel_nr,5,2)+substr(artikel->artikel_nr,8,2)+".jpg")
           copy file &(aPic400[nPosPag])  to &cTarget
      endif
      aHtmlFoto150[nPosPag] = '"
../../images/'+lower(substr(artikel->artikel_nr,1,3))+lower(substr(artikel->artikel_nr,5,2))+lower(substr(artikel->artikel_nr,8,2))+'.jpg" '
      //aHtmlFoto400[nPosPag] = "
'../../images/b"+substr(artikel->artikel_nr,1,3)+substr(artikel->artikel_nr,5,2)+substr(artikel->artikel_nr,8,2)+".jpg' "
      aHtmlArtNr[nPosPag] = lower(fotodata->artikel_nr)
      aHtmlNom1[nPosPag] = left(fotodata->benaming,25)
      aHtmlNom2[nPosPag] = substr(fotodata->benaming,26)
      aHtmlArtNr[nPosPag] = fotodata->artikel_nr

      nPosPag ++
      if nPosPag = 5 .or. fotodata->code <> fotoinde->code
         FWRITE(Fzoeken,  '<tr> ' + chr(10))
            for mDat = 1 to 4
               FWRITE(Fzoeken,  '<td width="
160" height="140"> ' + chr(10))
                  FWRITE(Fzoeken,  '<div align="
center">' + chr(10))
                  FWRITE(Fzoeken,  '<a href="
../../zoekindex.php?loc=zoekdetail&pcode=true&perform_query=true&pcode_query=' + lower(alltrim(aHtmlArtNr[mDat])) + '">' + chr(10))
                  FWRITE(Fzoeken,  '<img src=' + lower(aHtmlFoto150[mDat]) + ' alt="
Klik om te vergroten" border = "0" vspace="5" hspace="5" align="top" ></a></div>' + chr(10))
//                  FWRITE(Fzoeken,  '<font size="
1">' + chr(10))
//                  FWRITE(Fzoeken,  alltrim(aHtmlNom1[m])+'<br>'+ chr(10))
//                  FWRITE(Fzoeken,  alltrim(aHtmlNom2[m])+ chr(10))
//                  FWRITE(Fzoeken,  '<br><b><font size="
2">' + chr(10))
//                  FWRITE(Fzoeken,  alltrim(aHtmlArtNr[m]) + chr(10))
//                  FWRITE(Fzoeken,  '</b></font></div>' + chr(10))
               FWRITE(Fzoeken,  '</td> ' + chr(10))
            next
         FWRITE(Fzoeken,  '</tr> ' + chr(10))
         FWRITE(Fzoeken,  '<tr> ' + chr(10))
            for mDat = 1 to 4
               if empty(aHtmlArtNr[mDat])
                  FWRITE(Fzoeken,  '<td width="
160" height="26" > ' + chr(10))
               else
                  FWRITE(Fzoeken,  '<td width="
160" height="26" bgcolor="#72B8B8"> ' + chr(10))
               endif
                  FWRITE(Fzoeken,  '<div align="
center">' + chr(10))
//                  FWRITE(Fzoeken,  '<a href="
../../zoekindex.php?loc=zoekdetail&pcode=true&perform_query=true&pcode_query=' + alltrim(aHtmlArtNr[m]) + '">' + chr(10))
//                  FWRITE(Fzoeken,  '<img src=' + aHtmlFoto150[m] + ' alt="
Klik om te vergroten" border = "0" vspace="5" hspace="5" align="top" ></a> <br>' + chr(10))
                  FWRITE(Fzoeken,  '<b><font size="
2">' + chr(10))
                  FWRITE(Fzoeken,  lower(alltrim(aHtmlArtNr[mDat]))+'<br>' + chr(10))
                  FWRITE(Fzoeken,  '</b><font size="
1">' + chr(10))
                  FWRITE(Fzoeken,  alltrim(aHtmlNom1[mDat])+'<br>'+ chr(10))
                  FWRITE(Fzoeken,  alltrim(aHtmlNom2[mDat])+ chr(10))
                  FWRITE(Fzoeken,  '</font></div>' + chr(10))
            next
         FWRITE(Fzoeken,  '</tr> ' + chr(10))
         nPosPag = 1
         aInfo:={"
","","",""} // 4 lege velden
         aPic150:={"
","","",""}
         aPic400:={"
","","",""}
         aHtmlFoto150:={"
","","",""}
         aHtmlFoto400:={"
","","",""}
         aHtmlArtNr :={"
","","",""}
         aHtmlNom1 :={"
","","",""}
         aHtmlNom2 :={"
","","",""}
         endif
      fotodata->(dbskip())
   enddo
   FWRITE(Fzoeken,  '</table>' + chr(10))
   FWRITE(Fzoeken,  '</body>' + chr(10))
   FWRITE(Fzoeken,  '</html>' + chr(10))
   fClose(fZoeken)
return



Code: Select all  Expand view

function makeHtmlmenu()
   Local nDruk:=0, nDrukafstand:= 0.5, nDrukstart:= 0, nMeter:=1
   Local nFotoH:= 3.5, nFotoB:= 3.5, nFotoBlarge := 2.5
   Public cSubgroep:=""
   use artikel index artikel shared NEW
   use fotodata index fotodata shared NEW
   aDbf := {}
   AADD(aDbf, { "Titel", "C", 30, 0 })
   AADD(aDbf, { "Code",  "C",  8, 0 })
   DbCreate( "indexhtm.dbf", aDbf)
   use indexhtm NEW
   select indexhtm
   index on indexhtm->titel to indexhtm

   use fotoinde index fotoinde shared new
   htmlmenu->(dbgotop())

   //=========================
   cFile = "c:\maveco\website\catalog.htm"
   FCatalog := FCREATE(cFile)
   FWRITE(FCatalog,  MEMOREAD("c:\maveco\html\catbase.htm") + chr(10)  )

   DO while !htmlmenu->(eof())
      If !htmlmenu->selected
         htmlmenu->(dbskip())
         loop
      EndIF
      // Catalogus items worden toegevoegd.
      FWRITE(FCatalog, '<tr>' + chr(10)  )
         FWRITE(FCatalog, '<td width="40" height="40"> <div align="center">' + chr(10)  )
            FWRITE(FCatalog, '<a href="groepen/menu'+lower(alltrim(htmlmenu->code))+'.htm" onClick="window.self.location='+"'groepen/grp"+lower(alltrim(htmlmenu->code))+".htm'"+'" target="Menu Left">' + chr(10)  )
            FWRITE(FCatalog, '<img src="images/'+lower(alltrim(htmlmenu->foto))+'.jpg" width="40" height="40" border="0"> </a>' + chr(10)  )
         FWRITE(FCatalog, '</td>' + chr(10)  )
         FWRITE(FCatalog, '<td width="450" height="32"> <div align="center">' + chr(10)  )
            FWRITE(FCatalog, '<a href="groepen/menu'+lower(alltrim(htmlmenu->code))+'.htm" onClick="window.self.location='+"'groepen/grp"+lower(alltrim(htmlmenu->code))+".htm'"+'" target="Menu Left">' + chr(10)  )
            FWRITE(FCatalog, alltrim(htmlmenu->htmltitel) + '</a>' + chr(10)  )
         FWRITE(FCatalog, '</td>' + chr(10)  )


    //   FWRITE(FCatalog, '<a href="groepen/menu'+alltrim(htmlmenu->code)+'.htm" onClick="window.self.location='+"'groepen/grp"+alltrim(htmlmenu->code)+".htm'"+'" target="Menu Left">'+alltrim(htmlmenu->htmltitel)+'</a><br>' + chr(10)  )
    //     FWRITE(FCatalog, '' + chr(10)  )
    //     FWRITE(FCatalog, '<td width="39" height="32"> <div align="center"> <a href="groepen/menu'+alltrim(htmlmenu->code)+'.htm" onClick="window.self.location='+"'groepen/grp"+alltrim(htmlmenu->code)+".htm'"+'" target="Menu Left'+alltrim(htmlmenu->htmltitel)+'</a><br></td>' + chr(10)  )

      FWRITE(FCatalog, '</tr>' + chr(10)  )

  //    FWRITE(FCatalog, '<a href="menu%20bedrijfskleding.htm" onClick="window.self.location='bedrijfskleding.htm'" target="Menu Left"><img src="images/groepen/bedrijfskleding.jpg" width="40" height="40" border="0"></a></div>' + chr(10)  )
   //   FWRITE(FCatalog, '<a href="groepen/menu'+alltrim(htmlmenu->code)+'.htm" onClick="window.self.location='+"'groepen/grp"+alltrim(htmlmenu->code)+".htm'"+'" target="Menu Left">'+alltrim(htmlmenu->htmltitel)+'</a><br>' + chr(10)  )

      //=========================
      cFile = "c:\maveco\website\groepen\grp"+alltrim(htmlmenu->code)+".htm"
      FGroep := FCREATE(cFile)
      FWRITE(FGroep,  "<html>" + chr(10)  )
      FWRITE(FGroep,  "<head>" + chr(10) )
      FWRITE(FGroep,  '<title>'+alltrim(htmlmenu->htmltitel)+'</title>' + chr(10))
      FWRITE(FGroep,  '<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">'  + chr(10))
      FWRITE(FGroep,  '</HEAD> ' + chr(10))
      FWRITE(FGroep,  '<body bgcolor="#FFFFFF" text="#000000" background="../Internet%20Sources/Achtergrond.jpg" leftmargin="30">' + chr(10))
      FWRITE(FGroep,  '<table width="600" border="1" cellspacing="5" cellpadding="0">' + chr(10))
      FWRITE(FGroep,  '<tr bgcolor="#00CCFF"><td colspan="4"><div align="center"><font color="#0000FF"><b>' + chr(10))
      FWRITE(FGroep,  '<font size="5">'+alltrim(htmlmenu->htmltitel)+ chr(10))
      FWRITE(FGroep,  '</font></b></font></div></td></tr>' + chr(10))
      FWRITE(FGroep,  '<tr valign="top"><td colspan="4" height="99"><div align="center"></div><div align="left">' + chr(10))
      FWRITE(FGroep,  '<font face="Verdana, Arial, Helvetica, sans-serif" size="2">Informatie over de groep</font></div></td></tr>' + chr(10))
      FWRITE(FGroep,  '<tr bgcolor="#72B8B8"><td colspan="4" height="26"><div align="center"><font color="#666666"><b>Klik om deze groep te openen </b> </font> </div> </td> </tr> ' + chr(10))
      //=========================
      cFile = "c:\maveco\website\groepen\menu"+alltrim(htmlmenu->code)+".htm"
      FIndex := FCREATE(cFile)
      FWRITE(FIndex,  MEMOREAD("c:\maveco\html\menubase.htm") + chr(10)  )
      FWRITE(Findex,  '<img src="../assets/lijn.gif" width="160" height="13"><br>' + chr(10)  )
      FWRITE(Findex,  '<font size="4" color="#999999"><b><font color="#FFFFFF">'+alltrim(htmlmenu->htmltitel)+'</font></b></font>' + chr(10)  )
      FWRITE(Findex,  '<img src="../assets/lijn.gif" width="160" height="13"><br></p></div> ' + chr(10)  )
      FWRITE(Findex,  '<table width="170" border="0" cellspacing="0" cellpadding="0" align="left" height="0">' + chr(10)  )
      aPages := {}
      cMaat = alltrim(htmlmenu->files1)
      do while at(",",cMaat) > 0
         AADD(aPages,substr(cMaat,1,4))
         cMaat = substr(cMaat,at(",",cMaat)+1)
         loop
      enddo
      AADD(aPages,alltrim(cMaat))


      aHtmlFoto:={"","","",""} // 4 elementen
      aHtmlPage:={"","","",""}
      aHtmlTitel:={"","","",""}
      nPos = 1
      For i = 1 to len(aPages)
         if !fotoinde->(dbseek(aPages[i]))
            msginfo("Pagina "+aPages[i]+" bestaat niet")
         endif
         FWRITE(Findex,  '<tr><td width="181"><div align="center"><font size="2"><a href="../html/maveco%20folder/pag'+alltrim(fotoinde->code)+'.htm" target="Menu Right">'+alltrim(fotoinde->index)+'</a></font></div></td></tr>' + chr(10)  )
         CreateOneHtmlPag()

         indexhtm->(dbappend())
         indexhtm->titel = alltrim(fotoinde->Titel)
         indexhtm->Code  = alltrim(aPages[i])

         aHtmlFoto[nPos] = '"../images/'+lower(alltrim(fotoinde->foto))+'.jpg" '
         aHtmlPage[nPos] = aPages[i]
         aHtmlTitel[nPos] = alltrim(fotoinde->index)
         nPos ++
         if nPos = 5 .or. I = len(aPages)
            FWRITE(Fgroep,  '<tr> ' + chr(10))
               for m = 1 to 4
                  FWRITE(Fgroep,  '<td width="160" height="20"> ' + chr(10)) // foto = toch groter
                     if !empty(aHtmlpage[m])
                        FWRITE(Fgroep,  '<div align="center">' + chr(10))
                        FWRITE(Fgroep,  '<a href="../html/maveco%20folder/pag'+lower(aHtmlpage[m])+'.htm">' + chr(10))
                        FWRITE(Fgroep,  '<img src=' + aHtmlFoto[m] + ' border = "0" vspace="5" hspace="5" align="top"></a></div>' + chr(10))
                     endif
                  FWRITE(Fgroep,  '</td> ' + chr(10))
               next
            FWRITE(Fgroep,  '</tr> ' + chr(10))
            FWRITE(Fgroep,  '<tr> ' + chr(10))
               for m = 1 to 4
                  if empty(aHtmlpage[m])
                     FWRITE(Fgroep,  '<td width="160" height="26" > ' + chr(10))
                  else
                     FWRITE(Fgroep,  '<td width="160" height="26" bgcolor="#72B8B8"> ' + chr(10))
                  endif
                  FWRITE(Fgroep,  '<div align="center">' + chr(10))
                  FWRITE(Fgroep,  '<a href="../html/maveco%20folder/pag'+lower(aHtmlpage[m])+'.htm">' + chr(10))
                  FWRITE(Fgroep,  '<font size="2">' + chr(10))
                  FWRITE(Fgroep,  aHtmlTitel[m] + chr(10))
                  FWRITE(Fgroep,  '</font></div>' + chr(10))
                  FWRITE(Fgroep,  '</td> ' + chr(10))
               next
            FWRITE(Fgroep,  '</tr> ' + chr(10))

            nPos = 1
            aHtmlFoto:={"","","",""} // 4 elementen
            aHtmlPage:={"","","",""}
            aHtmlTitel:={"","","",""}
         endif
      Next
      FWRITE(Fgroep,  '</tr>' + chr(10))
      FWRITE(Fgroep,  '</table>' + chr(10))
      cHtmladdto = "c:\maveco\html\info"+lower(alltrim(htmlmenu->code))+".htm"
      if file(cHtmladdto)
         FWRITE(FGroep,  MEMOREAD(cHtmladdto) + chr(10)  )
      endif
      fClose(fgroep)

      FWRITE(Findex,  '</table>' + chr(10)  )
      FWRITE(Findex,  '</div>' + chr(10)  )
      FWRITE(Findex,  '</body>' + chr(10)  )
      FWRITE(Findex,  '</html>' + chr(10)  )
      fClose(findex)

      htmlmenu->(dbskip())
   enddo
   FWRITE(FCatalog, '</font></b></p></div></td></tr></table>' + chr(10)  )
   FWRITE(FCatalog, '<p align="center"><b><font color="#FF0000"><img src="index.jpg" width="96" height="22"><a name="Index"></a></font></b></p>'+ chr(10)  )
   FWRITE(FCatalog, '<p align="center"><font size="4" color="#FF0000">'+ chr(10)  )
   FWRITE(FCatalog, '<a href="#A">A </a><a href="#B">B </a><a href="#C">C </a><a href="#D">D </a><a href="#E">E </a><a href="#F">F </a><a href="#G">G </a>' + chr(10)  )
   FWRITE(FCatalog, '<a href="#H">H </a><a href="#I">I </a><a href="#J">J </a><a href="#K">K </a><a href="#L">L </a><a href="#M">M </a><a href="#N">N </a>'+ chr(10)  )
   FWRITE(FCatalog, '<a href="#O">O </a><a href="#P">P </a><a href="#Q">Q </a><a href="#R">R </a><a href="#S">S </a><a href="#T">T </a><a href="#U">U </a>'+ chr(10)  )
   FWRITE(FCatalog, '<a href="#V">V </a><a href="#W">W </a><a href="#Q">X </a><a href="#Y">Y </a><a href="#Z">Z </a></font></p>'+ chr(10)  )
   FWRITE(FCatalog, '<p align="center">&nbsp;</p>'+ chr(10)  )
   aAlfa:={"A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"}
   indexhtm->(dbgotop())
   For I = 1 to 26
      cLetter = aAlfa[I]
      FWRITE(FCatalog, '<p align="center"><img src="assets/lijn.gif" width="220" height="15"><font size="5" color="#000000" ><b> '+cLetter+' </b></font><img src="assets/lijn.gif" width="220" height="15"><a name="'+cLetter+'"></a></p>'+ chr(10)  )
      if upper(left(Indexhtm->titel,1)) = cLetter
         FWRITE(FCatalog, '<p align="center"><font size="4" color="#FF0000">'+ chr(10)  )
         do while upper(left(Indexhtm->titel,1)) = cLetter
            FWRITE(FCatalog,'<a href="html/maveco%20folder/pag'+lower(alltrim(indexhtm->Code))+'.htm">' + chr(10))
            FWRITE(FCatalog, alltrim(indexhtm->titel)+ '<br></a> '+ chr(10)  )
            Indexhtm->(dbskip())
         enddo
         FWRITE(FCatalog, '</font></p>'+ chr(10)  )
      endif
   next
   FWRITE(FCatalog, '</body></html>'+ chr(10)  )
   fClose(fCatalog)
   close all
return

 


And I did a php website for my soccerclub based on the open source : Multiflex php site sample

Code: Select all  Expand view

<?php
require_once("connect.php");
require_once("new_functions.php");
global $ploeg;
$ploeg = $_GET['ploeg'];

$query = mysql_query("SELECT * FROM basis") or die(mysql_error());
$data = mysql_fetch_assoc($query);
$set_week = $data['week'];

$sql_ploeg = mysql_query("SELECT * FROM ploegen2006 WHERE ploegnr='$ploeg'") or die(mysql_error());
$row_ploeg = mysql_fetch_assoc($sql_ploeg);
$cploegnaam = $row_ploeg['ploegnaam'];

?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en">


<!--  Version: Multiflex-5.4 / Overview                     -->
<!--  Type:    Design with sidebar                          -->
<!--  Date:    March 13, 2008                               -->
<!--  Design:  www.1234.info                                -->
<!--  License: Fully open source without restrictions.      -->
<!--           Please keep footer credits with the words    -->
<!--           "Design by 1234.info". Thank you!            -->

<head>
  <meta http-equiv="content-type" content="text/html; charset=utf-8" />
  <meta http-equiv="cache-control" content="no-cache" />
  <meta http-equiv="expires" content="3600" />
  <meta name="revisit-after" content="2 days" />
  <meta name="robots" content="index,follow" />
  <meta name="publisher" content="Your publisher infos here" />
  <meta name="copyright" content="Your copyright infos here" />
  <meta name="author" content="Designed by http://www.1234.info / Modified: Your Name" />
  <meta name="distribution" content="global" />
  <meta name="description" content="Your container description here" />
  <meta name="keywords" content="Your keywords, keywords, keywords, here" />
  <link rel="stylesheet" type="text/css" media="screen,projection,print" href="./css/mf54_reset.css" />
  <link rel="stylesheet" type="text/css" media="screen,projection,print" href="./css/mf54_grid.css" />
  <link rel="stylesheet" type="text/css" media="screen,projection,print" href="./css/mf54_content.css" />
  <link rel="stylesheet" type="text/css" media="screen,projection,print" href="./css/new_css.css" />

  <link rel="icon" type="image/x-icon" href="./img/favicon.ico" />
  <title>Kabouters Opglabbeek</title>


</head>

<!-- Global IE fix to avoid layout crash when single word size wider than column width -->
<!-- Following line MUST remain as a comment to have the proper effect -->
<!--[if IE]><style type="text/css"> body {word-wrap: break-word;}</style><![endif]-->

<body>
  <!-- CONTAINER FOR ENTIRE PAGE -->
  <div class="container">

    <!-- A. HEADER -->
    <div class="corner-page-top"></div>
    <div class="header">
      <div class="header-top">

        <!-- A.1 SITENAME -->
        <a class="sitelogo" href="index.php" title="Home"></a>
        <div class="sitename">
          <h1><a href="index.php" title="Home">Kabouters Opglabbeek</a></h1>
        </div>

        <!-- A.2 BUTTON NAVIGATION -->
        <!-- A.3 GLOBAL NAVIGATION -->
<div class="navglobal">
          <ul>
             <li><a href="new_contact.php">Contact</a></li>
          </ul>
        </div>
      </div>

      <!-- A.4 BREADCRUMB and SEARCHFORM -->
      <div class="header-bottom">

        <!-- Breadcrumb -->
        <ul>
          <li><a href="index.php">Home</a></li>
        </ul>

      </div>
    </div>
    <div class="corner-page-bottom"></div>

    <!-- B. NAVIGATION BAR -->
    <div class="corner-page-top"></div>
    <div class="navbar">

      <!-- Navigation item -->

     <ul>
          <li><a href="new_ploegen.php?ploeg=2007100">A-Team</a></li>
          <li><a href="new_ploegen.php?ploeg=2007101">B-Team</a></li>
          <li><a href="new_ploegen.php?ploeg=2007104">U17</a></li>
          <li><a href="new_ploegen.php?ploeg=2007105">U15</a></li>
          <li><a href="new_ploegen.php?ploeg=2007106">U12</a></li>
          <li><a href="new_ploegen.php?ploeg=2007109">U11</a></li>
          <li><a href="new_ploegen.php?ploeg=2007119">U8</a></li>
      </ul>

      <!-- Navigation item -->

    </div>

    <!-- C. MAIN SECTION -->
    <div class="main">
      <h1 class="pagetitle"><? echo"$cploegnaam"; ?> </h1>

      <!-- C.1 CONTENT -->
      <div class="content">

<!-- CONTENT CELL start -->
        <div class="corner-content-1col-top"></div>
            <div class="content-1col-nobox">
              <h1>Ploegfoto</h1>
              <p class="demo">
              <?
                $filename = "ploegfoto".$ploeg.".jpg";

                if (file_exists($filename)) {
                    ?>
                    <img src="<? echo ($filename);?>" alt="Groepsfoto" />
                    <?
                }else {
                    $filename = "nopic.jpg";
                    ?>
                    <img src="<? echo ($filename);?>" alt="Groepsfoto" />
                    <?
                echo $filename;
                }
              ?>
            </div>
        <div class="corner-content-1col-bottom"></div>
<!------------------------------------------------------------------------- CONTENT CELL EINDE -->

<!-- CONTENT CELL start -->
        <div class="corner-content-1col-top"></div>
            <div class="content-1col-nobox">
              <h1>Kalender : <? echo"$cploegnaam"; ?></h1>

          <p class="tekst"><? echo "Deze kalenders zijn geupdate op  : ".($_SESSION["kbvbfileupdate"]); ?> </p>

        <? //wedstrijden_van_een_ploeg ($ploeg,'',1);  ?>
        <? kbvb_wedstrijden_van_een_ploeg ($ploeg,'',1);  ?>

        <p class="demo">AMC = Algemeen forfait voor het volledige seizoen <br />
          FF = Forfait gegeven door deze ploeg<br />
          PP = Uitgestelde wedstrijd</p><br />
</div>
        <div class="corner-content-1col-bottom"></div>
<!------------------------------------------------------------------------- CONTENT CELL EINDE -->
<!-- CONTENT CELL start -->
        <div class="corner-content-1col-top"></div>
            <div class="content-1col-nobox">
            <h1>Informatie over de reeks</h1>
            <? //new_poulestand ($ploeg,'',1);  ?>
            <? kbvb_rangschikking($ploeg);  ?>
            <? kbvb_kalender_week($ploeg,20);  ?>
            <? kbvb_kalender($ploeg);  ?>




            <?
            $show_rang = "N";
            $link = "";
            if ($link <> ""){;
                echo('<a href="'.$link.'" target="_blank"><br />Klik hier voor een link naar HBVL</a>');
            }
            if ($show_rang == "J"){
                new_poulestand ($ploeg,'',1);
                echo("</div>");
            }
            ?>
            </div>
        <div class="corner-content-1col-bottom"></div>
<!------------------------------------------------------------------------- CONTENT CELL EINDE -->

<!-- CONTENT CELL -->

        <div class="corner-content-1col-top"></div>
            <div class="content-1col-nobox">
              <h1>Specifieke informatie voor de ploeg</h1>
              <? //require_once($ploeg.".html"); ?>
              <p class="demo">De trainers kunnen hier informatie m.b.t. de start van de trainingen,afspraken enz... vermelden.
              Deze informatie moeten ze even sturen naar de webmaster en die zal voor de verdere verwerking zorgen.
              Uiteraard kan hij ook gebruik maken van het forum waar iedere ploeg een eigen stukje kan hebben.</p>
            </div>
        <div class="corner-content-1col-bottom"></div>
        <!-- CONTENT CELL (subcells NOT boxes) -->

        <!-- ************************************************************************************************** -->
        <!-- **   9-02. MIXED MODE (2-Column / 1-Column)                                                     ** -->
        <!-- ************************************************************************************************** -->
        <!-- CONTENT CELL (subcells NOT boxes) -->
        </div>



      <!-- C.2 SUBCONTENT -->
      <div class="subcontent">

        <!-- SUBCONTENT CELL -->
        <div class="corner-subcontent-top"></div>
        <div class="subcontent-box">
          <h1>Rangschikking</h1>
          <h2><? echo"$cploegnaam";?> </h2>
          <?php rang($ploeg,$cploegnaam);?>
        </div>
        <div class="corner-subcontent-bottom"></div>
        <!-- END SUBCONTENT CELL -->

<!-- SUBCONTENT CELL -->
        <div class="corner-subcontent-top"></div>
        <div class="subcontent-box">
          <h1>Sponsors</h1>
          <p class="tekst">
          <img src="reklame.jpg" alt="Bel ons !!" width="225" />
          <a href="new_sponsor.php" target="_self">Klik hier voor de mogelijkheden</a>          </p>

      <!-- Level voor sponsoring -->
          <h2>Shirt-sponsor</h2>
          <p class="tekst">
          <?
          $filename = "shirtsponsor".$ploeg.".jpg";

          if (file_exists($filename)) {
                ?>
                        <img src="<? echo ($filename);?>" alt="Sponsor worden ?" /><br /><br /><br /><br /><br />


                <?
          }else {

                //echo $filename;
          }

          ?>

      <!-- End Level voor sponsoring -->

      <!-- Level voor sponsoring -->
          <h2>Training-sponsor</h2>
          <p class="tekst">
          <?
          $filename = "trainingsponsor".$ploeg.".jpg";

          if (file_exists($filename)) {
                ?>
                <img src="<? echo ($filename);?>" alt="Bedankt" /><br /><br /><br /><br />
                <?
                }else {
                //echo $filename;
           }

          ?>
      <!-- End Level voor sponsoring -->

      <!-- Level voor sponsoring -->
          <h2>Ploeg-sponsor</h2>
          <p class="tekst">
          <?
          $filename = "ploegsponsor".$ploeg.".jpg";
            if (file_exists($filename)) {
                ?>
                <img src="<? echo ($filename);?>" alt="Bedankt" /><br /><br /><br /><br />
                <?
            }
          ?>
      <!-- End Level voor sponsoring -->

          <!-- Level voor sponsoring -->
          <h2>Uit sympathie</h2>

          <p class="tekst">
          <?
                  $filename = "sympsponsor".$ploeg.".jpg";
            if (file_exists($filename)) {
                ?>
                <img src="<? echo ($filename);?>" alt="Bedankt" /><br /><br /><br /><br />
                <?
            }
          ?>
      <!-- End Level voor sponsoring -->


        </div>

        <div class="corner-subcontent-bottom"></div>
<!-- END SUBCONTENT CELL -->

<!--
        <!-- SUBCONTENT CELL -->
<!--        <div class="corner-subcontent-top"></div>
        <div class="subcontent-box">
          <h1>Ploegoverzicht</h1>
          <h2>Trainers</h2>
          <p class="tekst"><? //new_trainers($ploeg);?></p>

          <h2>Afgevaardigde</h2>
          <p class="tekst"><? //new_afgevaardigde($ploeg);?></p>

          <h2>Spelerslijst</h2>

          <? //include ("new_jarigen.php"); ?>

         <!--  Deze div zeker terug activeren als de spelers online staan
           </div>
         -->
<!--
        </div>
        <div class="corner-subcontent-bottom"></div>
        -->
        <!-- END SUBCONTENT CELL -->

        <!-- SUBCONTENT CELL -->
                <!-- SUBCONTENT CELL
        <div class="corner-subcontent-top"></div>
        <div class="subcontent-box">
          <h1>Weekoverzicht</h1>
          <h2><? //echo"$cploegnaam";?> </h2>
          <? //poulelijst($set_week,$ploeg,""); ?>
        </div>
        <div class="corner-subcontent-bottom"></div>
        <!-- END SUBCONTENT CELL -->
                <!-- END SUBCONTENT CELL -->





       </div>
      </div>



<!-- ************************************************************************************************** -->
<!-- ************************************************************************************************** -->
<!-- *********************************   END OF AVAILABLE GRID STYLES   ******************************* -->
<!-- ************************************************************************************************** -->
<!-- ************************************************************************************************** -->


    <!-- D. FOOTER -->
    <div class="footer">
      <p>Copyright &copy; 2016 Kabouters Opglabbeek&nbsp;&nbsp;|&nbsp;&nbsp;Rechten voorbehouden</p>
      <p class="credits"> Modified by Marc Venken | Powered by Maveco Bedrijfskleding Opglabbeek</p>
    </div>
    <div class="corner-page-bottom"></div>
  </div>

</body>
</html>
 
Marc Venken
Using: FWH 23.04 with Harbour
User avatar
Marc Venken
 
Posts: 1426
Joined: Tue Jun 14, 2016 7:51 am
Location: Belgium

Re: Mod Harbour challenge project

Postby Silvio.Falconi » Fri Apr 02, 2021 9:29 am

Carles wrote:...
C.


Carles
where I can download Tweb and How I can installed it ( on wich folder)
do you have a sample to use your lib ?
I would be interested to see if tweb use the commands like fwh
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
User avatar
Silvio.Falconi
 
Posts: 7048
Joined: Thu Oct 18, 2012 7:17 pm

Next

Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 112 guests