Forum Moderators: open

Message Too Old, No Replies

Home grown CMS

need a little help

         

hal12b

8:55 pm on Oct 18, 2010 (gmt 0)

10+ Year Member



Hey all -

I've been working on converting a heavily updated site to a simple in-house CMS. It's pretty simple.

    1) The user logs in

    2) They choose the page they want to edit.

    3) Then they are presented with FreeTextBox on it (anybody got something else?) Here they have a basic WYSIWYG to edit the page. The info is stored in a MS SQL database along with the last updated date/time. I have given them the ability to upload certain file types, but when they do this instead of all the files going into one folder OR me hard coding all the possibly folders, I'd like to dynamically be able to list the folders in a drop down menu. I am sure this can be done, just not sure how exactly or what it's called.



Can somebody point me in the right direction?

Thanks - HAL

Ocean10000

6:06 pm on Oct 19, 2010 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



So what you trying to do, is let the user determine which folder the uploaded file will go to?

You would need to access the filesystem, get the current top level of the website, and recursivly build folder paths going down, and save them in a dropdown list which will be displayed to the end user.

I would be carefull with this as it possible it can be later exploited if a hole is found in your cms, to upload files to your website.

hal12b

6:41 pm on Oct 19, 2010 (gmt 0)

10+ Year Member



Yes, that's pretty much it. The CMS is only accessible within our building and it is locked down to a few employees based on their network login, so it's pretty secure in that sense. I am also only allowing a few file types to be uploaded, just basics (gif, jpg, pdf, xls...) but yes, I agree that you can never not let your guard down.

Somebody might choose the folder "ABC", and then they will have the choice of subfolders within ABC.

So I guess I am just looking for some code samples at this point to work off of. Got anything?