![]() |
|
|
|
|
|
|
II.Installation
a). System Requirement Windows95 or 98 or NT Visual FoxPro 5.0 above WWW Server ( Such as Website) Caution: FoxNet can't work with www server of IIS. b).Unzip FoxNet
C).Install
d).Running FoxNet
e).Check
|
III. HtmlLib
Html is a language that is used to design homepages. When you design a dynamic homepage by a program, you have to use it. Programming by html is complicate and boring, but it is necessary. If you are not familiar with html language, you can use HtmlLib functions to instead. If you are good at html, you will find that HtmlLib can be vary helpful. Source codes of HtmlLib is supplied with this package, you can change and modify it freely, and I welcome anyone add new functions into it. Varible htmlclientip is a string, which store the IP address of user who login in. Example: userip=htmlclientip 2.User query input varible: htmlquery Varible htmlquery is a string, which store the query input of user. A query is the part after "?" in a browser's location input. For example: http://202.114.6.48/cgi-shl/foxcgic.exe/queryin.prg?Hollo! Example: userquery=htmlquery 3.User form input varibles: htmlparlen,htmlin(htmlparlen,2) Varible htmlquery is a string, which store the number of variables in a form. Varible htmlinis a two dimension string array, which store varibles name and value of a form input. A browser input form is like this: htmlparlen="3" htmin(1,1)="name" (Not the value of lable, but the name of edit box), htmin(1,2)="Lingsong He" htmin(2,1)="email" htmin(2,2)="heliso@public.wuhan.cngb.com" htmin(3,1)="problem" htmin(2,2)="How to buy FoxNet" Example: len=VAL(htmlparlen) for i=1 to len a(i,1)=htmin(i,1) a(i,2)=htmin(i,2) endfor 3.FUNCTION HtmlBegin( ) Output a html file head to FoxNet. It must be called before any other Html functions. Example: =HtmlBegin() 4.FUNCTION Htmlbcolor(color) Set background color of produced homepage. The color set are: White, Grey, Black, LightRed, Red, LightGreen, Green, LightBlue, Blue, LightYellow, Yellow, LightCayn, and Cayn. It should be called follow HtmlBegin(). Example: =Htmlbcolor("Grey") 5.FUNCTION HtmlBkImage(url) Set background image. It should be called follow HtmlBegin(). If this function is used, function htmlbcolor() is ignored. Example: =HtmlBkImage("http://202.114.6.48/pic/cloud.jpg") 6.FUNCTION HtmlTitle(title) Set title of the homepage. It must be called follow Htmlbcolor() or HtmlBkImage(). Example: =HtmlTitle("This page is generated by FoxNet") 7.FUNCTION HtmlEnd() Output a html file end to FoxNet. It must be called at end of a program. Example: =HtmlEnd() 8.FUNCTION HtmlLine() Insert a line in homepage. Like below: Example: =HtmlLine() 9.FUNCTION HtmlReturn() Insert a carriage return in homepage. Example: =HtmlReturn() 10.FUNCTION HtmlFontType(type) Set font type. Call before any htmlwrite functions. The font types are Normal, Bold, Italic, and Underline. Example: =HtmlFontType("Bold") 11.FUNCTION Htmlhtmlfcolor(color) Set font type. Call before any htmlwrite functions. Color set is defined above. 12.FUNCTION HtmlFontSize(size) Set font size. Call before any htmlwrite functions. The font sizes are 8, 10, 12, 14, 18, 24, and 36. Example: =HtmlFontSize("24") 13.FUNCTION Htmlalign(align) Set object align. Call before insert a object into homepage, such as a sentence or a image. They aligns are: Left Right
Example:
=Htmlalign("Center") 14.FUNCTION HtmlWords(words) Write some words into a homepage. Example: =Htmlwords("Hollo") 15.FUNCTION HtmlSentence(sentence) Write a line of sentence into a homepage. It is egual to HtmlWords()+HtmlReturn() Example: =HtmlSentence("How are you ?") 16.FUNCTION HtmlParagraph(paragraph) Write a paragraph into a homepage. Example: paragraph=artilce.content &&--(content is a memo field) =HtmlSentence(paragraph) 17.FUNCTION HtmlLinkWords(words,url) Write a linked words into a homepage. Like this. Example: =HtmlLinkWords("Infoseek","http://www.infoseek.com") 18.FUNCTION HtmlLinkSentence(sentence,url) Write a linked sentence into a homepage. Example: =HtmlLinkSentence("Press here to visit Infoseek","http://www.infoseek.com") 19.FUNCTION HtmlGraph(Imageurl) Insert a image into a home page. Like this: ![]() Example: =HtmlGraph("http://202.114.6.48/pic/search.gif") 20.FUNCTION HtmlLinkGraph(Imageurl,Linkurl) Insert a linked image into a home page. Example: =HtmlGraph("http://202.114.6.48/pic/search.gif","http://www.yahoo.com") 21.FUNCTION HtmlInsertFile(filename) Insert text file into a homepage. For example, you can output a report of a database to a ascii file, then insert into a homepage. Example: =HtmlInsertFile("C:\MyDocument\readme.txt") 22.FUNCTION HtmlArrayTable(array,row,colum) Insert a string arry into a homepage table. A homepage table is like this:
Dimension s(3,4) s(1,1)="Number" s(1,2)="Product" s(1,3)="Price" s(1,4)="Amount" s(2,1)="1" s(2,2)="chair" s(2,3)="10" s(2,4)="100" s(3,1)="2" s(3,2)="desk" s(3,3)="100" s(3,4)="20" =HtmlArrayTable(s,3,4) 23.FUNCTION HtmlDbfTable() Insert all records of current work area database into a homepage table. Example: use "c:\Mydbf\article.dbf" =HtmlDbfTable() use |
IV.Programming with FoxNet
A internet running program is usually composed of two parts. One is a form based homepage, which is running on user's browser and is used to get user's input. This homepage can be easily designed by FrontPage or by any other homepage design software. Below is a example, and its html source code. <HTML><HEAD> <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1"> <META NAME="Author" CONTENT="Lingsong He"> <META NAME="GENERATOR" CONTENT=" [Netscape]"> <TITLE>aaa</TITLE> </HEAD><BODY>Form Based User Input Homepage<BR> <FORM METHOD=POST ACTION="http://202.114.6.48/cgi-shl/foxcgi.exe/formin.prg"><B> UserName<INPUT NAME="name" VALUE="Lingsong He" TYPE =text SIZE=20></B> <BR> <B>Email<INPUT NAME="email" VALUE="heliso@public.wuhan.cngb.com" TYPE =text SIZE=30></B> <BR> <B>Problems<INPUT NAME="problen" VALUE="How to buy FoxNet" TYPE =text SIZE=20></B> <P><INPUT TYPE="submit" VALUE="Submit"><INPUT TYPE="reset" VALUE="Reset"> </FORM></BODY></HTML> Another is a CGI program, which is running on the host computer that
user visit. FoxNet is a connector between CGI program and FoxPro. By the
help of it, you can design CGI program by FoxPro. Below is a sample CGI
program of FoxPro:
|
V.Download
You can download FoxNet and try it freely. FoxNet is very small, but you will find it is very helpful. |
VI.Shareware Registration
If you want to remove the unregister message in the returned homepage, you can register the software by paying to me US$20. This will encourage me to keep on developing new programs and enhancing the old ones. My email is: heliso@public.wuhan.cngb.com (Contact me) |