SEO Services
Home >>
Webmaster Forums >>
admin CP scriptadmin CP script
<h1> said: "Right so i've spent quite a lot of time developing this script but i've finally finished it (to a point). I have no database skills so I use a method where my files are my databases...essentially the method is known as flat-file databases but essentially it isn't. ;)
I use a multi-dimensional array to index which file to edit/display...
Also in the array are elements which uniquely define the page names depending on which array the page resides in.
So i'm not gonna show my index script its basically an html include script.
What I do want to show is my admin CP, to edit the html files.
The script has four stages.
1st stage the user specifies the section (left menu or right content)
2nd stage user specifies the page to edit
3rd stage the script displays the html and user can edit
4th stage is to save the edited html text.
I would show my sourecode but the script is a lil long so download the attached zip file which contains my admin.php and globals.php scripts.
To see this script in action goto
[url]http://www.sportstar.co.za/example/admin.php[/url]
Username: user
Password: pass
PLS remember to logout when you finshed.
Play around, this admin wont affect the main site in any way.
Any comments, suggestions?
Peace
Rich"
raven said: "Very nice!"
<h1> said: "thanx raven!
I'm now currently using embedded code (which is encoded and decoded depending on whether script is displaying or writing to file) to index areas in the html I want to change.
(This method may be a old i'm sure there's easier ways of doing this but it's nice to start at the bottom for learning purposes.)
So now instead of the client editing the html (which doesn't work if the client has no html experience), I am adding options that will allow the client to edit menus, banners etc through the script. (EG Add menu item, delete menu item etc). The script searches the html files, and determines where to edit depening on the embedded code. This requires a lot of code i'll post my results and successful methods when i'm finished.
PEACE
Rich"
raven said: "Excellent idea, Rich! Looking forward to checking out the finished product.
Oh, and Happy Valentine's Day :)"
Darksat said: "Very good, but perhaps it needs a file manager as well."
<h1> said: "Thanx raven and to you to!
I didnt get my girlfriend anything i'm pretty much broke other than the pound a day I spend at the internet cafe (and i'm not gonna give that up for some roses) ;) Tonight we'll celebrate the proper way :rolleyes:
[QUOTE=Darksat]Very good, but perhaps it needs a file manager as well.[/QUOTE]
Yes that is a good idea...I will do that..
I made a file manager before but the code is shitty I didn't know much php and i didn't finish it. It'll take me some time to complete but that would be a necessity I guess.
Thanx for the feedback raven and darksat
rich"
edwin said: "looking good.
why not use [url=http://pear.php.net/package/DB]pear db[/url]
its a very easy to use mysql database class."
Darksat said: "[QUOTE=
]
I made a file manager before but the code is shitty I didn't know much php and i didn't finish it. It'll take me some time to complete but that would be a necessity I guess.
rich[/QUOTE]
mail me the code at darksat{at}yahoo.com and I will take a look if you like.
Have fun tonight,
Mike ;)"
<h1> said: "thanx darksat but if I don't do it myself i'll never learn! I'm just so busy at the mo and not having an internet connection at home doesn't help. I guess that is the main reason why I don't use databases cos I have no resources to test my code.
I use a simple php development environment to execute and test my code offline but it's restricted a lot.
All I wanna do is code i've finally 'broken the surface' to give me the freedom to code without getting stuck, but times are tough my girlfriend lost her job today and I don't have a job yet so I don't know what is gonna happen. Anyways nuf of the rant i'll keep this admin cp thread updated as I go along.
Peace
Rich"
Darksat said: "Best of luck with that.
I commend your determination."
<h1> said: "well you might have noticed I haven't been on here as often as previously. There are a couple of reasons for this.
Firstly my laptop broke aARGGR!!! I am stuck in London with no money and now my best friend just died!!
And i've started working, which leaves me little time to do what i enjoy, but ofcourse no computer doesnt help. (Damn its been a long day I can't even make sense)
Anyways all my dreams for the script I was working on have now faded becuase I have no pc...buuuut, my gf and I are putting our money together and hopefully in about 2 months or so I should have a new laptop. So yeah php scripts are now currently offline so to speak :cool: i should stop typing about now
peace
rich"
raven said: "Ah, sorry to hear all that, Rich. Hope everything works out for you.
I'll keep your chair warm :)"
edwin said: "hang in there dude. better days are ahead i'm sure."
<h1> said: "damn i had such plans for this scripts i completely forgot about!!
Well in the time I have bought myself a new laptop and got a 2mb dsl line installed but ive lost all interest for this site and for the admin script i was developing...
I wish i had more time in my day!!
Anyways im currently working on my spliff site (oops dont ban me pls) and a inegrating a CMS for [url]www.afrobeat.co.za[/url]
I really dont like [url]www.sportstar.co.za[/url] anymore as u can see much work is needed...
if u guys want i can post a link to my spliff site that is by far my best im just afraid ill get banned...
so this post is i guess an ending to this thread .. :(
to be continued if the future sometime...thanx to all who posted here for keeping my motivation and inspiration goin.. :)"
raven said: "It sure won't bother me. I'd love to see it."
<h1> said: "ok then..i warned u though ;)
check it out
[url]www.spliffsa.com[/url]
recently installed new VB which im putting a lot of work into.."
raven said: "Wow, very cool! I love the colours and the layout. Good stuff :)"
<h1> said: "thanx raven!
Green was initially very hard to work with...had to get just the right tone for it to look good on the eyes.
Now u know what i do in my spare time..doh!"