After generating the PHP application based on your project, the next step is
to upload the files to your server and set up the database. The generated files
are saved to a folder you specify. Below is an example of files generated from
a project containing 8 tables.
To upload the generated files, you should use an FTP program. A very good (and free)
program is FileZilla, available from
SourceForge.
You should upload the entire folder to your web server. Make sure that your web server
is properly configured to run .php files as PHP scripts (otherwise, they will probably be
treated as text files and their entire source code will be displayed in the
visitors' browsers).
After you upload the files, you are ready to set up the database. Let's move on!
You may skip this part if you don't plan to modify the generated scripts.
For each table in your project, AppGini will generate 5 files. For example,
in the above file list, the "
categories" table has these files:
- categories_templateDV.html
This file contains the template for the detail view form for the
categories table. This form is where users can enter new records
or edit existing ones.
- categories_templateTV.html
This file contains the template for displaying each record in the
table view. The table view is a list of the records in the
table.
- categories_templateTVS.html
This is the same as the categories_templateTV.html, except that
it controls the template for the selected record only. Users can
click on a record in the table view to select it. The selected
record is highlighted in the table view, and its contents are
displayed in the detail view for editing or deleting.
- categories_dml.php
This is the code that controls what happens on inserting a new
record into the categories table, editing an existing record, or
deleting a record. For example, you can edit the code for the
insert() function to send you an email whenever a user adds a new
record.
This file also contains a form() function that controls the display
of the detail view, using the categories_templateDV.html template file.
- categories_view.php
This is the main page that welds all the above files together into a single page.
You can control several display options and permissions in this page. You can also
edit the SQL query used for displaying the table view here.
Your database contains important information that you do not want any unauthorized
person to mangle with ... So, only authorized users should have access to your database.
As of AppGini 4.0, the generated scripts implement an advanced, yet intuitive, user
management system. This system allows users to log into the generated application and have
limited permissions that you (the admin) have full control of.
The admin has access to an admin area where he can define
groups. Each group
has its own permissions over each table in your application. For example, let's say that
you have created an application for storing clients' contacts, vendors' contacts, and
employees' contacts. The admin can define a group called 'HR' which can view and edit
only the employees' contacts, a group called 'Sales' which can view and edit only the
clients' contacts, and a group called 'Procurement' which can view and edit only the
vendors' contacts. Each group can have one or more members, and each member inherits
his group's permissions. The following diagram explains this graphically.
If a user of the Sales group tries to access the Vendors table, he will not be permitted.
If an anonymous user tries to access any table, he will not be permitted. If the admin
changes the access permissions of a group, all members of that group will instantly be
granted the new permissions (and denied the old ones).
You can set the permissions of anonymous users in AppGini before file generation.
And you can change them later from the admin area.
Please be very careful with
setting the anonymous permissions to avoid compromizing your data.
© Copyright 2002-2008, BigProf Software. All rights reserved.