PHP

I want to create a content management system in PHP. I am creating a fund raising website.  I want administrator to have all the rights. Admin should be able to make changes in the header section, footer section and the content section of the page. I would like to execute this using object oriented programming approach. How can I do this?
krutarth941Asked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

ecdmonkeyCommented:
Have you thought about using Drupal or similar to achieve your aims?  The software is free and easily customisable to achieve exactly what you are looking for without having to code a CMS from scratch.

just a thought
krutarth941Author Commented:
Yes, I did think of using joomla, but, my project leader was not happy with it. He would be more happy to see me do the coding part from the scratch.
Lukasz ChmielewskiCommented:
This is rather a big topic. Consider - at least - if not choosing a ready CMS, just looking at some of the code of the one. Do not reinvent the wheel. There should be something really that fits.
http://www.opensourcecms.com/
If you ask: how ? It would not be a one word answer. Plan things. Do a diagram, plan the database.
Acronis True Image 2019 just released!

Create a reliable backup. Make sure you always have dependable copies of your data so you can restore your entire system or individual files.

Lukasz ChmielewskiCommented:
Maybe Wordpress then ?
scifo_dkCommented:
I would create a table with permissions, something like:
CREATE TABLE `permissions` (
`id` int(6) NOT NULL auto_increment,
`level` varchar(1) NOT NULL default '',
`header` enum('N','Y') NOT NULL default 'N',
`content` enum('N','Y') NOT NULL default 'N',
`footer` enum('N','Y') NOT NULL default 'N',
PRIMARY KEY  (`id`),
UNIQUE KEY `id` (`id`)
) TYPE=MyISAM AUTO_INCREMENT=1 ;

Open in new window


Then for each level, you would set 1(allow) or 0(disallow) for each area, and in the user table, each user has a level depending on what they should be able to.

Then everytime a user clicks "Edit" or similar, you query for user permission level.
 
//Scifo_dk

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
krutarth941Author Commented:
The link you gave me was very helpful. Thank you.
I will do more research and then I will get back to you.
krutarth941Author Commented:
Can you please explain me the use of this -> keyword in PHP
scifo_dkCommented:
It is used in object oriented php (OOPHP) like this:
<?php

$obj = (object) array('foo' => 'bar', 'property' => 'value');

echo $obj->foo; // prints 'bar'
echo $obj->property; // prints 'value'

?>

Open in new window


More info here:
http://www.php.net/manual/en/language.oop5.php
krutarth941Author Commented:
great, thanks
scifo_dkCommented:
Your welcome
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
PHP

From novice to tech pro — start learning today.