PHP
  Home arrow PHP arrow Page 4 - The Design of an Intranet Application ...
Dev Shed Forums 
Administration  
AJAX  
Apache  
BrainDump  
DHTML  
Flash  
Java  
JavaScript  
Multimedia  
MySQL  
Oracle  
Perl  
PHP  
Practices  
Python  
Reviews  
Security  
Style-Sheets  
Web Services  
XML  
Zend  
Zope  
Forums Sitemap 
IBM® developerWorks 
Sun Developer Network 
Dedicated Servers 
E-Commerce Hosting 
Linux Web Hosting 
Managed Hosting 
Small Business Hosting 
Actuate Whitepapers 
Moblin 
VPS Hosting 
Weekly Newsletter

 
Developer Updates  
Free Website Content 
IBM developerWorks
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
PHP

The Design of an Intranet Application Framework
By: Chris Neeman
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 3 stars3 stars3 stars3 stars3 stars / 6
    2007-07-25

    Table of Contents:
  • The Design of an Intranet Application Framework
  • Intranet File Structure
  • Design Code/Templates
  • More on Templates

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    ADVERTISEMENT

    Stay one step ahead of the competition. Evaluate and give feedback on some of the hottest web development tools on the market today. Make your opinion heard! Click Here

    The Design of an Intranet Application Framework - More on Templates


    (Page 4 of 4 )

    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.

    Fig1. Intranet template

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
    <!-- TemplateBeginEditable name="doctitle" -->
    <title>Untitled Document</title>
    <!-- TemplateEndEditable -->
    <!-- TemplateBeginEditable name="head" -->
    <!-- TemplateEndEditable -->
    <link href="intranet.css" rel="stylesheet" type="text/css">
    <style type="text/css">
    <!--
    .style1 {color: #FFFFFF}
    body {
       background-color: #a4c2c2;
    }
    -->
    </style>
    </head>
    <body>
     
    <table width="100%" border="0" cellspacing="2">
     
      <tr>
     
        <td colspan="2" valign="top" class="logo">DAMARA NAMA PUBLISHING </td>
     
      </tr>
        <tr>
     
        <td width="16%" valign="top" bgcolor="#FFFFFF">&nbsp;</td>
     
        <td width="84%" valign="top" bgcolor="#FFFFFF"><!-- TemplateBeginEditable name="welcome" -->welcome<!-- TemplateEndEditable --></td>
     
      </tr>
     
      <tr>
     
        <td width="16%" valign="top" bgcolor="#FFFFFF"><!-- TemplateBeginEditable name="navigate" -->navigate<!-- TemplateEndEditable --></td>
     
        <td valign="top" bgcolor="#FFFFFF"><!-- TemplateBeginEditable name="main" -->main<!-- TemplateEndEditable --></td>
     
      </tr>
     
      <tr>
     
        <td valign="top">&nbsp;</td>
     
        <td valign="top" class="copyright">copyright&copy;2007</td>
     
      </tr>
     
    </table>
    </body>
    </html>

    Fig2. Application template

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
    <!-- TemplateBeginEditable name="doctitle" -->
    <title>Untitled Document</title>
    <!-- TemplateEndEditable -->
    <!-- TemplateBeginEditable name="head" -->
    <!-- TemplateEndEditable -->
    <link href="intranet.css" rel="stylesheet" type="text/css">
    <style type="text/css">
    <!--
    body {
       background-color: #a4c2c2;
    }
    -->
    </style></head>
    <body>
     
    <table width="100%" border="0" cellspacing="2">
     
      <tr>
     
        <td colspan="2" valign="top" class="logo">DAMARA NAMA PUBLISHING </td>
     
      </tr>  
     
      <tr>
     
        <td width="13%" valign="top" bgcolor="#FFFFFF">&nbsp;</td>
     
        <td width="87%" valign="top" bgcolor="#FFFFFF"><!-- TemplateBeginEditable name="welcome" -->welcome<!-- TemplateEndEditable --></td>
     
      </tr>
     
      <tr>
     
        <td width="13%" valign="top" bgcolor="#FFFFFF"><!-- TemplateBeginEditable name="navigate" -->navigate<!-- TemplateEndEditable --></td>
     
        <td valign="top" bgcolor="#FFFFFF"><!-- TemplateBeginEditable name="main" -->main<!-- TemplateEndEditable --></td>
     
      </tr>
     
      <tr>
     
        <td valign="top">&nbsp;</td>
     
        <td valign="top" class="copyright">copyright&copy;2007</td>
     
      </tr>
     
    </table>
    </body>
    </html>

    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;
      
    }

       function isadmin($sesslevel){
        
    if($sesslevel == "admin"){
          
    return TRUE;
        
    }else{
          
    return FALSE;
        
    }
      
    }

       function checkemail($aEmail){
        
    if(eregi("^([a-z.])+([a-z])+@([a-z])+(.)([a-z]{3})$",$aEmail))
          
    return TRUE;
        
    else
          
    return FALSE;
      
    }//end function

       /*password functions*/
      
    function savepass($apass){
     
        $salt = 'SHIFLETT';
     
        $password_hash = md5($salt . md5($apass . $salt));

         return $password_hash;
      
    }

       function genpass(){
     
       $chars = "1234567890abcdefghij345678klmnopqrs1234tuvwxyz1234567890";
     
       $thepass = '';
     
       for($i=0;$i<7;$i++){
     
         $thepass .= $chars{rand() % 39};
     
       }
     
       return $thepass;
     
      }
    }
    ?>

    Conclusion

    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.


    DISCLAIMER: The content provided in this article is not warranted or guaranteed by Developer Shed, Inc. The content provided is intended for entertainment and/or educational purposes in order to introduce to the reader key ideas, concepts, and/or product reviews. As such it is incumbent upon the reader to employ real-world tactics for security and implementation of best practices. We are not liable for any negative consequences that may result from implementing any information covered in our articles or tutorials. If this is a hardware review, it is not recommended to open and/or modify your hardware.

       · The article is OK, but the intranet requires more modules than stated on this...
       · it's true!
     

       

    PHP ARTICLES

    - Handling Attachments in MIME Email with PHP
    - Completing the Project Management Application
    - Sending MIME Email with PHP
    - Handling Files for a Project Management Appl...
    - Viewing and Editing Tasks for a Project Mana...
    - More on Private Methods with PHP 5 Member Vi...
    - Adding Tasks to a Project Management Applica...
    - Utilizing Private Methods with PHP 5 and Mem...
    - Making Changes in a Project Management Appli...
    - Defining Public and Protected Methods with M...
    - HTML for a Project Management Application
    - Using Subclasses and Accessors with Member V...
    - Implementing Internet Protocols with PHP
    - Project Management: The Application
    - Working with Private Properties to Protect P...





    © 2003-2008 by Developer Shed. All rights reserved. DS Cluster 2 hosted by Hostway