home *** CD-ROM | disk | FTP | other *** search
- ##########################################################
- # GDIdb demo script (c) 1998 Global Data Industries
- #
- # This example shows how a simple graph can be included
- # on a web page. The graph can be drawn using small "gif"
- # block images, or even just text characters. The data for
- # the graph is here generated by the script, but could just
- # as easily come from a database.
- ##########################################################
-
-
-
-
- ##########################################################
- # declare variables used in script
-
- &defvar(?count?,?function?)
-
-
-
-
- ##########################################################
- # Print the information screen
-
- &cls
- &print("Graphs Demo Script")
- &print("-----------------------------------")
-
-
-
-
- ##########################################################
- # generate the html
-
- &html("index.html")
- {
- <HTML>
- <HEAD>
- <TITLE>Graph of X Squared</TITLE>
- </HEAD>
- <BODY>
- <H1>Graph showing function X Squared</H1>
- &for(?count?,0,?count?<12,1)
- {
- # calculate X Squared.
- &assign(?function?,?count?*?count?)
- <NOBR>&repeat(?function?){<IMG SRC=\"graph.gif\">}</NOBR><BR>
- }
- </BODY>
- </HTML>
- }
-