08-11-2009, 08:43 PM
|
#1 (permalink)
|
|
The Visitor
Join Date: Aug 2009
Posts: 1
Thanks: 0
|
Coding conventions on making a small CMS
Hi all,
First post here in the forums ... :)
I am in the stages of building a very small CMS for my needs in order to be able to create websites easy.
I have planned my project very well and structured but my problem is more in the coding conventions since it seems no matter where i look at people PHP codes you see they are unique which is fine but not anwering my question.
In order to clarify what i am after i will present a case i am working right now and would love to hear your suggestions on how to handle the situation.
I am in the part where a build a gallery manager module to my CMS.
I call it gallery.php. the script should be able to create new galleries and edit each gallery items.
i have these calls for the script:
$_GET methods for galleries listing:
- gallery.php? -> reguler call will list the galleries listing
- gallery.php?del=1 -> will delete gallery id which is 1
- gallery.php?edit=1 -> will load the gallery #1 and show items listing
- gallery.php?add=true -> will load the add gallery form
$_GET methods for gallery handling:
- gallery.php?gID=1&del=1 -> will delete item #1 from gallery #1
- gallery.php?gID=1&edit=1 -> will load item #1 for editing and perefences
- gallery.php?gID=1&addItem=true -> will load gallery #1 add item form
$_POST
all the actions that needed to be saved via add forms and such.
of course there are many types of stuff i need to do but my problem is that using many IF on the script and launching functions seems like a long stupid way.
Wanted to know how you will code this kind of need.
Thanks for you time for reading this.
$_POST methods:
|
|
|
|