This topic is locked

Electronic Document Archive System (EDAS)

12/3/2022 3:53:47 PM
PHPRunner Tips and Tricks
fhumanes author

img alt
I had been wanting to dedicate time and effort to an easy and pleasant solution for having an electronic filing system.

This is an example of possibilities of a file system. It is made so that it can serve as an example/template for those PHPRunner developers who want to have a small, simple solution with high growth capacity, taking into account the great capacity that the PHPRunner solution has in network storage and management. of security and access that has been provided to the solution.


Have electronic document archiving management with very dynamic access security features, so that access can be organized by organizational structure of a company or by functional structure, depending on the company's procedures.


Test users: user1 , user2 , and admin . The password is the same as the login

System Requirements

  • It must be a system for the entire company, so its organization and structure must consider the mix of access by organic and functional structure.
  • Users will work with a single screen. Only administrators will have additional screens.
  • Functionally, it should work like the file structure of Windows or any other operating system. It will only offer the structure to those who have permission to view it.
  • The documents (does not mean file) can be a larger entity than the file, for example, a file, and it will contain the different files.
  • The documents/files will have a link that the system will provide a copy to the clipboard and with it you can directly access the document.
  • At all times, through the "crumb trail", the user will know the point of the structure and will be able, with a click, to quickly go up directory levels.
  • In the store ( file system in this case) a directory will be created with the record ID of file , so that the files are not mixed.

Immediately, I am going to start developing a complement to this system that will allow access to it through Rest Full API , and in this way it can be integrated into the developments that are done in PHPRunner or other systems. This new system is the one that I really wanted to undertake.

Technical solution

The data model I have used is very, very simple.

img alt

As you can see, it is a table to define the directories and their hierarchy and another for the files/documents .

The most special thing comes in the relations of users ( owners ) and access groups in reading and writing ( reading_groups and writing_groups ), which you can see are multiple values in a single field.

I have done the same in the relation of users to groups ( belongingGroups ), but to simplify the assignment of groups to users I have used functional templates, in such a way that it is much easier to manage permissions, with a solution (please , review it) which is very simple and elegant.

I will show some screens to explain those most relevant features.

img alt
As I have indicated, for the general user you will only have one option, which is "navigation" through the directories and documents that you have authorized access to.

img alt
As you can see I have used a “dashboard” page. It is made in PHPRunner 10.7. As you know, version 10.8 has improved the presentation of the "darhboard" and you can improve the presentation in that version.

(1) .- It provides the information of the directory where it is positioned.

(2) .- The system has been provided with a "crumb trail" or "path" so that you can identify the "depth" of the directory. This information can be used to navigate in that structure.

(3) .- Information of the directories that are below the current one and that the user has access to.

(4) .- Information of the files/documents that are dependent on the directory and that the user has access to.

(5) .- I have modified the presentation of the files to provide information, but not allow, from this page, the download of the same.

img alt
This is the display presentation. Internally, due to the fact of viewing, a record has been created in the "audit" table to leave a trace of this action.

(1) .- The "crumb trail" continues to be displayed, to provide information on the dependency.

(2) .- A button has been programmed to copy the "path" or "link" of the document to the clipboard. This facilitates communication by reference through email or any other application.

(3).- A reference implies that there can be several files, accessible if you have the permissions.

img alt
From any point there is a button (1) that enables a popup page to facilitate the path of a document (2) and positions you in the path information,

img alt
(1) .- It has been positioned in the last directory of the path. It has previously gone through all the directories and verified their existence and that the user has been granted access to each of them.

(2) .- You have searched for the requested document and it shows it in red.

(3) .- I show an example of viewing the set of permissions of the directory. It is shown with a visualization as if it were some tags.

There is very little code, so I consider it a good example for:

  • Information access management (directories and files) outside the PHPRunner standards.
  • Management of the files uploaded and managed by PHPRunner, to place them in a directory (registration ID) and thus use a tmp directory as an intermediate situation until the registration is complete.
  • Management of user authorizations through functional permission grouping templates.
  • Interface for "crumb trail" for use of hierarchical information structures.
  • Copy / paste functionality of information to facilitate the operation of users.

I hope you like it and if you need an explanation, tell me through my email

As always, I leave the sources for you to download and try on your PC's.

fhumanes author 12/8/2022

In addition to including some code improvements in the previous version, I have made a new version in PHPRunner 10.8 where instead of presenting the information in a dashboards page, I have made it in one of the master-> detail type because it is much faster and I think it's easier to integrate with anything else.

You can try both versions at:



Test users: user1 , user2 , and admin . The password is the same as the login

The image of this new version is:

img alt

(1) .- The directory path shows the total number of documents/files that exist in that directory.

(2) .- Shows the directory information where it is located.

(3) .- Shows the set of files to which the user has access and which belong to the directory informed in part (2).

This is the option I recommend.