Name ________________________________________________________________ Last 4 digits of PSID_______________
A simple content management database contains a single table that stores the HTML components of multiple pages. This table is named cm. Each HTML page has a unique identifier named page_name. Each HTML page contains mutiple DIV block or SPAN block elements each in a table row (element_name) that contain the actual content (cont) and several attributes (zindex, fontname, fontsize, backcolor, forecolor, toploc, lftloc, etc.). The structure of the table cm is:
Column Name [conditions or info] | CSS STYLE attribute name and format na = NOT APPLICABLE |
page_id bigint identity (1,1), | na |
page_name varchar(30), | na |
element_name varchar(30), | na |
div_or_span int, [1 is a DIV block, 2 is a SPAN block] | na |
zindex int, | z-index:[zindex value]; |
fontname varchar(40), | font-family:[fontname value]; |
fontsize int, | font-size:[fontsize value]px; |
backcolorhex char(6), | background-color:#[backcolorhex value]; |
forecolorhex char(6), | color:#[forecolorhex value]; |
toploc int, [value used to specify the element's Top attribute] | Top:[toploc value]px; |
lftloc int, [value used to specify the element's Left attribute] | Left:[lftloc value]px; |
hi int, [contains a positive integer for height only if div_or_span=1, otherwise contains a 0] | height:[hi value]px; |
wide int, [contains a positive integer for width if div_or_span=1, otherwise contains a 0], | width:[wide value]px; |
bordr_wid int, [contains a positive integer only if div_or_span=1, otherwise contains a 0], | CSS format:
|
bordr_color varchar(10), [contains a string only if div_or_span=1, otherwise contains a single blank], | |
bordr_style varchar(10), [contains a string only if div_or_span=1, otherwise contains a single blank], | |
cont varchar(8000), [this is the HTML content of the DIV or SPAN] | na |
PRIMARY KEY (page_name,element_name) |
<br><a href='modpage.asp?token=3&pn=[place the page_name from Pass1 here]&en=[place the element_name here]'>[place the element_name here]</a>
on the next line show the element's cont value.
some_URL/display.asp?pn=[some page_name that appears in the cm table]
display.asp is a single page that has the code to roll through ALL the elements in the cm table for the page_name specified and the necessary code to display the page's entire contents (i.e., all the DIV and/or SPAN elements with their content with CSS attributes). Issues: