1 ################################################
2 # First released by kylin 2008.09.11 #
3 #################################################
5 How to write a cgi page
7 Now, the cgi files is written by shell script. Generally, a page consists of 3 parts: header,
8 body, and footer. The "header" and "foter" part has been defined in library file. You can call
9 it directyly with "h_header" and "h_footer" functions. so at most time, you only need to write the
12 A cgi file looks like this:
14 ########## cgi file #######
18 this_page="share.list_user"
25 /* body part: do what you want. */
30 ######## cgi file ########
32 The variable "this_page" should be defined every page. Usually it consists two words seperated by "." sign.
33 for example "share.list_user". the first word "share" is to define the pages active global navigation. the second
34 word defines the pages active sub navigation.
35 There are also 2 library files. "lib.sh" contains the "header" and "footer" functions. "proccgi.sh" is used to
36 process CGI variables. Every cgi variable has a "$F_" as the prefix. For example, variable "ipaddr" should be
37 called as "$F_ipaddr" in cgi file.