logo4.gif (18K)  
 
overlap.gif (1K)home : windows estimator : data files
 jigsaw_we.gif (1K)
- home
  design
  technologies
  ideas
  hosting
  management"
  portfolio
  prices
  contact





[intro] [features] [demonstration] [setup] [configuration] [data files] [download]
[demonstration licence] [full licence]

windows estimator data files

why data files ?

When this system was developed it was considered that many target businesses would not have invested in the type of hosting accounts that provided database access.

Consequently this system was designed around a series of data files, one for each window type.

This simple but effective approach enables a large amount of information to be accessed without the resulting script complexity and concerns revolving around ensuring the integrity and security of databases.

However, we can (and probably will) develop a version of this system that utilizes databased information, along with an associated data administration tool at some point.


the data file system...

The data files are those files with names like: w1data.inc.php, w2data.inc.php ... w4data.inc.php.

Each data file holds the information about one window type.
The different window type described by each file is identified by the integer between the "w" and "data.inc.php".
Consequently you should have different numbered files for each of your window types.
Copy and paste files with new names to make more if you need more.


anatomy of a data file..

While attempts have been made to keep these as stright forward as possible, there is unfortunately scope for mistakes to be made.
The data files provide information to the main files by "setting" a few "variables".

While we do not expect you to become fully conversant with all that this means, it does mean that you need to "stick to the rules" to ensure that the system continues to work as expected.

Below is the names of the variables that are present within thesae data files, what they do and what sort of information they should have in them.

$name

This is the brief name or product code of the window type.
This mainly appears in page titles and subsequently any bookmarked pages.

format:

$name = "w1";


$message

This is the description of each window type.
This may be HTML formatted, however please place a "\" before any double-quotes.

format:

$message = "the simplest type of window";


$image_a

This is the location of the image of this particular window type. If there is no image you can leave the variable empty, like: $image_a = "";
Please place a "\" before any double-quotes.

format:

$image_a = "<img src=\"images/w1.gif\" alt=\"w1\" border=0>";



The data array...
Each file also contains a definition of an array, which is a compact way of storing data.

Let's look at an array segment before explaining it...

    $windowarray[0][0] = 1100;
    $windowarray[0][1] = 118;

    $windowarray[1][0] = 1200;
    $windowarray[1][1] = 128;

    $windowarray[2][0] = 1300;
    $windowarray[2][1] = 139;

Each pair of array variables defines one window size and price combination.
The numbers in the first square brackets must be the same for each size/price combination.
The numbers in the first square brackets must start from "0" and increase by "1" for each subsequent pair.
The numbers in the second square brackets must be "0" for the size in millimetres and "1" for the price.


testing, testing, 1, 2, 3 ...

You should now be able to access the file on your web site with a browser.

As users report difficulties with this system we will post the problems and their solutions here to benefi other users.

copyright 2008, Rylands Internet Solutions