beautypg.com

Chapter 8, Handling html & cgi, Web configuration – Solvline Eddy DK User Manual

Page 125: Example of html code, Chapter 8. handling html & cgi, 1 web configuration, 2 example of html code

background image

Eddy DK Programmer Guide

125

Chapter 8. Handling HTML & CGI

This chapter describes the CGI module for the environment configuration used by HTML files and HTML codes.
Provided CGI source and HTML documents are used as Eddy’s default firmware, and it is modifiable as needed.

8.1 WEB Configuration

HTML sources for Eddy are located on src/Eddy_APPs/web/htdocs.
CGI sources containing information for HTML is located on src/Eddy_APPs/web/cgi.

getagent.c

It reads environment configuration file of /etc folder and transfers configuration value to the HTML page to show the
information on the web browser.

setagent.c

It reads configuration value modified by a user on the HTML page and saves the value to a temporary environment
configuration file on /etc.

8.2 Example of HTML Code

The following example shows a part of main.html source.
Coding is executed with values handed over from the CGI and linked symbols, due to the coding cannot be done on
a HTML using variables like on the C language.
Shown in red below are symbol link which transfers value from getagent.c.

(network.html 소스 요약)


IP Address

="N_IP

" value="[v

,n_ip

]" >



Subnet Mask
N_MASK

" value="[v,

n_mask

]" >



Gateway
N_GW

" value="[v,

n_gw

]" >



DNS