Login   Register  
PHP Classes
elePHPant
Icontem

PageLogic: A way to organize files in a web module

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Info   View files View files (3)   DownloadInstall with Composer Download .zip   Reputation   Support forum   Blog    
Last Updated Ratings Unique User Downloads Download Rankings  
2002-12-05 (12 years ago) RSS 2.0 feedNot yet rated by the usersTotal: 922 All time: 3,611 This week: 1,665Up
Version License Categories  
pagelogic 1.0GNU General Public Lice...Files and Folders
Description Author  

I have written modules for webservers with so many php/html files that I lost track, so I come out with this simple module to simplify the logic among pages.

Imagine my module is a book, with many chapter inside.

-- The book is the main page, normally index.html or index.php.
-- The module comprises of many files, each file performs some functions.

Thus file is equivalent to a chapter.
-- Each file may contain several functions. This are the sections in the
chapter.

Imagine if I can say goto this book, this chapter and this section. I will need a content page to look up the pages. Thus the idea is formed.

The content pages is stored in an .ini format and read in using my INIPARSER class. It will be in the form:

[<LOGIC NAME>]
<action>=<php function name>
<action>=<php function name>, <file name>
<action>=<php function name>, <file name>, <file name 2> ...

If I hit the page with the action text embedded through
index.php?action="..."
or
<input type=hidden NAME="action" VALUE="...">

The index.php will just call up the function I want.

I hope that this will help to modularize your php codes as well.

Picture of Mark Quah
Name: Mark Quah <contact>
Classes: 7 packages by
Country: Singapore Singapore
Age: ???
All time rank: 2391 in Singapore Singapore
Week rank: 932 Down1 in Singapore Singapore Equal

  Files folder image Files  
File Role Description
Plain text file class_pagelogic.php Class Create interlinking web pages with index from an .ini file.
Accessible without login Plain text file ONEFILE_SAMPLE.PHP Example Display different html pages using one single file.
Accessible without login Plain text file README.TXT Doc. Explanation about PageLogic

 Version Control Unique User Downloads Download Rankings  
 0%Total:922All time:3,611
 This week:0This week:1,665Up