corrected a bug
changed format of database, some changes in mysql db also.
Added code for generation random UID. Also included is the function to get list of fields according to privilegeNum.