Board index   FAQ   Search  
Register  Login
Board index php forum :: php coding PHP coding => General

Advice for File Manager

Ask about general coding issues or problems here.

Moderators: macek, egami, gesf

Advice for File Manager

Postby Jrude92 » Thu Sep 13, 2012 6:30 am

I have no experience with PHP and am developing my first PHP site. In short, site users are allowed to join multiple groups and these groupe are what connect some users. I have completed the log in and group creation/ join feature, but I would like to develop a file management system where a group has its own Dropbox like feature. So far, I've written an upload feature, but basic PHP tutorials can only get me so far. Does anyone mind explaining the right way to go about allowing users to view and download others uploads? No scripts needed. Just the right way to do it, please
Jrude92
New php-forum User
New php-forum User
 
Posts: 2
Joined: Thu Sep 13, 2012 6:23 am

Re: Advice for File Manager

Postby johnj » Fri Sep 14, 2012 8:50 am

One way to do this will be - Create a table with columns to store file_name, file_url and use_group. The user_group could be for example - beginner, intermediate, advanced and expert. Four types of users. Each record inserted into this table will belong to one of these groups. So, when a user uploads a file, its name, url and group will get saved to this table. When another user logs in to view, you will check his/her group and show all the files (urls) belonging to that group.
johnj
php-forum Super User
php-forum Super User
 
Posts: 1805
Joined: Thu Mar 10, 2011 5:07 pm

Re: Advice for File Manager

Postby Jrude92 » Fri Sep 14, 2012 12:59 pm

Ok, that makes sense. But, what if a user, say Bob for now, is a member of multiple groups say X,Y, and Z. How would I allow other users of group X to see what Bob has uploaded strictly to group X, group Y to see what Bob has uploaded to group Y, and so on?
Jrude92
New php-forum User
New php-forum User
 
Posts: 2
Joined: Thu Sep 13, 2012 6:23 am

Re: Advice for File Manager

Postby johnj » Sat Sep 15, 2012 2:18 am

a.if bob belongs to multiple groups then usually he/she is given access of the highest group.

b.the documents when uploaded gets saved along with the group to which it is intended for.

example #1:

Bob belongs to Group A,B,D and F. In that case, Bob will have access to documents belonging to all the four groups.

example #2:
Bob uploads docA belonging to Group A, docD of 'D' group and docF of group F. When Tom (belonging to Group B and D) logs in he will be able to see ONLY docD because he doesn't have access to group A and F.
johnj
php-forum Super User
php-forum Super User
 
Posts: 1805
Joined: Thu Mar 10, 2011 5:07 pm


Return to PHP coding => General

Who is online

Users browsing this forum: No registered users and 1 guest

Sponsored by Sitebuilder Web hosting and Traduzioni Italiano Rumeno and antispam for cPanel.