PHP
  Home arrow PHP arrow Page 7 - Cracking The Vault (part 1)
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 
Moblin 
JMSL Numerical Library 
VPS Hosting 
Weekly Newsletter

 
Developer Updates  
Free Website Content 
 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

Cracking The Vault (part 1)
By: Vikram Vaswani, (c) Melonfire
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 5 stars5 stars5 stars5 stars5 stars / 2
    2001-05-14

    Table of Contents:
  • Cracking The Vault (part 1)
  • Just Another Day At The Office
  • An Evil Plan Is Born
  • Setting The Ground Rules
  • Design Time
  • Start Me Up
  • Entry Points
  • Seeding The System
  • Red And Green Clouds
  • Digging Deeper
  • Basic Maintenance
  • The D Word

  • 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


    Cracking The Vault (part 1) - Entry Points


    (Page 7 of 12 )

    Once the user is successfully logged in, "out.php" takes over and generates a list of documents available to the user; this list includes documents the user may have uploaded, as well as documents the user has "view" rights for. If this is the first time you are logging in, you will probably see nothing; once you add documents, the screen will fill up.



    Before we look at this script, however, I want to draw your attention to the script "add.php", accessible from the top right corner of the page and used to add new documents to the system. I'll explain this first, since it offers a logical starting point.

    The first thing "add.php" (and every other script) does is to verify the existence of a valid session - this is necessary to prevent unauthorized users from viewing the pages. If a session doesn't exist, the browser is immediately redirected to the error handler.

    <? // check to ensure valid session, else redirect session_start(); if (!session_is_registered("SESSION_UID")) { header("Location:error.php?ec=1"); exit; } // includes include("config.php"); ?>

    Assuming a session exists, a basic HTML page is built.

    <html> <head> <basefont face="Verdana"> </head> <body bgcolor="White"> <? include("menu.inc");?> <table width="100%" border="0" cellspacing="0" cellpadding="3"> <tr> <td bgcolor="#0000A0"> <b><font face="Arial" color="White">Add New Document</font></b> </td> </tr> </table> <!-- lots of code --> </body> </html>

    I'm not going to go into details here - it's essentially a bunch of HTML tables, all dressed up to look pretty - but I will draw your attention to the file "menu.inc", which contains the main menu for the page and is include()d on every page.

    This article copyright Melonfire 2001. All rights reserved.

    More PHP Articles
    More By Vikram Vaswani, (c) Melonfire


     

       

    PHP ARTICLES

    - Building a Database-Driven Application with ...
    - User Authentication for a Project Management...
    - Introduction to the CodeIgniter PHP Framework
    - Adding Users for a Project Management Applic...
    - Migrating Class Code for a MIME Email to PHP...
    - Login and Logout Authentication for a Projec...
    - Composing Messages in HTML for MIME Email wi...
    - Project Management: Authentication
    - A Better Way to Determine MIME Types for MIM...
    - Project Management Overview
    - 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...





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