HomePHP Page 4 - The Design of an Intranet Application Framework
More on Templates - PHP
This article is the second part of a series on intranet application frameworks. Now that we know what the application framework is all about and how it is going to work in an intranet environment, we are going to look at the overall structure and design of the intranet and the applications. Keep reading to see how this will be done.
The next two HTML pages are the templates that are going to be used to display the intranet and application pages respectively. The templates give the applications a uniform, neat and presentable look. They also, like the CSS sheet, make it easy to apply cosmetic changes in one place for all pages to accept those changes. In other words, it makes it very easy to maintain web pages.
Since we are discussing the wider intranet components, I thought we could deal with the validation class before moving on to the application framework components. The validation class is mainly used to validate form data. It has five functions:
filledin() - This function checks to see if the form variables are filled in.
isadmin() - This function checks to see if a user has admin level access.
checkemail() - This function checks to see if the email address supplied is valid.
savepass() - This function saves a password in hash form.
genpass() - This function generates a seven character password.
Below is a fuller outline of the validation class:
<?php class validate{ function filledin($form_vars){ foreach($form_vars as $key=> $value) { if(empty($key) || ($value == '')) return FALSE; } return TRUE; }
This article discussed the design of the intranet as well as the applications that it will host. The next article will discuss the components of the application framework.