Käynnissä

API functions + create simple MySQL database

A) Create API with functions:

1) for user auth (quite standard):

- auth_user($user,$pass) - does check hash with hash in sql db, returns true/false

- create_user($array) - create new user in sql, returns true/false, [$array: $login(email), $pass_hash, $nick(unique), $home_city, $age, $gender], returns $uid, create folder named 'trash' under '/' for this user

- request_pass($user) - new, random password sent by email on email add. from sql, saves pass_hash in sql, returns true/false, email is external template, prepare some example, can be with 'lorem ipsum dolor' + $new_password

- update_user($uid, $array) - updates data in sql, user record, returns true/false, [$array: $uid, $home_city, $age, $gender]

2) for file manager

- get_dirs($uid) - returns array of directories from SQL (with nesting info - bulid tree in arrays of dirs id (did))

- get_files($uid,$did) - return array of files from sql from files table, return an array of files with c_date, flid and file_name

- get_files_dirs($uid) - return array of all file/dir structure (whole tree with files, all with names, ids, c_dates), from sql

- create_folder($uid,$dir,$did) - create folder $dir with parent $did

- erase_dir($uid,$did) - remove $did from sql, erase_file on all files and erase_dir on all subdirs

- get_file($uid,$flid) - get from sql info about sid_a, then by sid ask by API apropriate IP for this file, and reutrn raw content (all by streams) (server's API explained below)

- erase_file($uid,$flid) - get from sql info about sid_a, then by sid ask by API apropriate IP for removing file (server's API explained below)

- put_file($uid,$flid,$raw,$did) - get from sql info what server has highest prio, redirect stream to api there (server's API explained below)

- move_file($uid,$flid,$did) - change file locations (into $dir) -> update in sql DB,

- empty_bin($uid) - empty content of $trash -> erase all files and dirs (erase_file()) from special folder trash

API to use on servers:

- get_file($flid)

- rm_file($flid)

- put_file($flid,$raw)

D) Create appropriate SQL structure (Proposed below, but I'm open to suggestions of changing it)

1) user table:

uid int

user(nickname) varchar

email varchar

pass varchar (password hash)

home_city varchar

age int

gender bool

2) dirs table:

uid int

c_date date_time (creation date)

dir varchar (dir name)

parent int (parent dir)

did int (dirs id)

3) files table:

uid int

file_name varchar

c_date date_time (creation date)

did int (parent dir)

flid int (file's id)

sid_a int storage_a (where file is stored)

sid_b int storage_b where file is stored)

4) servers table:

sid int

status tint

ip varchar

prio int

D) Create example test files, ie. [url removed, login to view] and [url removed, login to view], with execution every single API function, for test purposes

Taidot: MySQL, PHP, tietojärjestelmäarkkitehtuuri

Näytä lisää: what is tree in data structure with example, what is tree in data structure, what is tree data structure, what is record in data structure, what is a tree in data structure, what is a tree data structure, use of tree data structure, tree update, tree of data structure, tree in data structure, tree data structure in c, tree data structure example, tree data structure c, tree database structure, template creation software, simple file database, simple data structure, operation on arrays in data structure, operation manager, hash table in data structure, hash table data structure, hash in data structure, hash data structure, folder tree structure, execution table

Tietoa työnantajasta:
( 2 arvostelua ) Gdynia, Poland

Projektin tunnus: #4289998

Myönnetty käyttäjälle:

pesek

As discussed

175 $ USD 3 päivässä
(9 arvostelua)
4.6

3 freelanceria on tarjonnut keskimäärin 125 $ tähän työhön

truongnx15fl

I've read through your API document. Let me help you implement the system.

150 $ USD 10 päivässä
(23 arvostelua)
4.2
TheChristopher

Hello vexx12, I wanted to post up my bid because I am know I can get this job done properly and the way you need it.

50 $ USD 2 päivässä
(1 arvostelu)
0.0